/* Hallmark · shared system for the brand sheet, the trust site and the console · theme: custom · idea: "the clinic's marble counter, where every move the bot makes is written down in gold" · vibe: "bright clinic, white marble, gold leaf, black ink" · paper: oklch(98.6% 0.004 95) · accent: oklch(52% 0.105 82) · display: Taviraj · body: Anuphan · axes: light/roman-serif/chromatic-gold · posture: gold leaf only as hairline, fill on black and the price; black lacquer as one surface per screen; single light theme because the brand is a bright clinic · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V4 · weakest: S, the ledger row is the signature on every page, so it must read the same everywhere; it is one component here */
:root {
  /* spacing, a 4px base with wide section steps */
  --space-3xs: 2px; --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px;
  --space-xl: 40px; --space-2xl: 64px; --space-3xl: 96px; --space-4xl: 144px;

  /* type: page scale is fluid, the console scale is fixed at 1.2 */
  --text-xs: 0.8125rem; --text-sm: 0.9375rem; --text-md: 1.0625rem; --text-lg: 1.25rem; --text-xl: 1.5625rem; --text-2xl: 1.953rem;
  --text-display: clamp(2.5rem, 3.8vw + 1rem, 4.4rem);
  --text-section: clamp(2rem, 2.2vw + 1rem, 3.1rem);
  --text-title: clamp(1.3rem, 0.7vw + 0.95rem, 1.65rem);
  --text-lead: clamp(1.125rem, 0.35vw + 1rem, 1.35rem);
  --text-price: clamp(2.8rem, 3.6vw + 1.2rem, 4.4rem);
  --app-xs: 0.8125rem; --app-sm: 0.875rem; --app-md: 1rem; --app-lg: 1.2rem; --app-xl: 1.44rem; --app-2xl: 1.728rem;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-micro: 120ms; --dur-short: 220ms; --dur-long: 520ms;

  --container: 1240px; --gutter: 56px; --gap-columns: 56px; --section-gap: 136px;
  --radius-card: 2px; --radius-input: 6px; --radius-pill: 999px; --rule-hair: 1px; --rule-leaf: 2px;

  /* colour: white marble, gold leaf, black lacquer */
  --color-paper: oklch(98.6% 0.004 95);      /* #FBFAF7 white marble, clinic bright */
  --color-paper-2: oklch(96.2% 0.007 90);    /* #F4F2ED honed marble, the second neutral */
  --color-paper-3: oklch(17.5% 0.006 80);    /* #12100E black lacquer */
  --color-ink: oklch(18% 0.008 80);          /* #13110E */
  --color-ink-2: oklch(33% 0.01 80);         /* #383530 */
  --color-muted: oklch(47% 0.012 80);        /* #5E5A53, 6.6:1 on paper */
  --color-rule: oklch(87% 0.014 85);         /* #D8D4CA */
  --color-accent: oklch(52% 0.105 82);       /* #876207 gold ink, the only gold allowed as text on white */
  --color-accent-ink: oklch(98.6% 0.004 95);
  --color-leaf: oklch(81% 0.115 88);         /* #E0BD64 ทองเปลว, on black or as a hairline, never text on white */
  --color-on-dark: oklch(95% 0.006 90);      /* #F0EEEA */
  --color-on-dark-muted: oklch(74% 0.012 85);/* #AEAAA2 */
  --color-focus: oklch(52% 0.105 82);
  --color-focus-on-dark: oklch(81% 0.115 88);
  --color-success: oklch(50% 0.12 150);      /* #21763C booked */
  --color-success-wash: oklch(95.5% 0.03 150);
  --color-warn: oklch(55% 0.13 60);          /* #A75C00 handed to staff */
  --color-warn-wash: oklch(95.5% 0.035 75);
  --color-warn-ink: oklch(47% 0.115 60);     /* #884800 warn text on its wash, 6.2:1 */
  --color-error: oklch(52% 0.19 27);         /* #BE2323 */
  --color-error-wash: oklch(96% 0.025 27);
  --color-shadow: oklch(33% 0.01 80 / 0.22);

  --font-display: "Taviraj", "Noto Serif Thai", ui-serif, serif;
  --font-body: "Anuphan", "Leelawadee UI", "Noto Sans Thai", ui-sans-serif, system-ui, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-padding-top: var(--space-3xl); scrollbar-color: var(--color-muted) var(--color-paper); }
body {
  margin: 0; background: var(--color-paper); color: var(--color-ink);
  font-family: var(--font-body); font-size: var(--text-md); line-height: 1.65;
  -webkit-font-smoothing: antialiased; caret-color: var(--color-accent);
}
::selection { background: var(--color-leaf); color: var(--color-ink); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 400; font-synthesis: none; overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
abbr[title] { text-decoration: none; }
[hidden] { display: none !important; }
.num, time { font-variant-numeric: tabular-nums; }
.container {
  width: 100%; max-width: var(--container); margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.skip { position: absolute; left: var(--space-md); top: calc(-1 * var(--space-4xl)); background: var(--color-paper-3); color: var(--color-on-dark); padding: var(--space-xs) var(--space-md); z-index: 30; }
.skip:focus-visible { top: var(--space-md); }
.wordmark { font-family: var(--font-display); font-size: var(--text-lg); text-decoration: none; white-space: nowrap; }

/* one primary button, one quiet button, every state */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  min-height: 48px; padding: 0 var(--space-lg); border: var(--rule-hair) solid var(--color-paper-3);
  border-radius: var(--radius-pill); background: var(--color-paper-3); color: var(--color-leaf);
  font: 500 var(--text-md)/1 var(--font-body); white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}
.btn:hover { background: var(--color-ink-2); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; transition: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn[aria-busy="true"] { cursor: progress; }
.btn--quiet { background: transparent; color: var(--color-ink); border-color: var(--color-rule); }
.btn--quiet:hover { background: var(--color-paper-2); }

/* state tags on ledger rows: colour plus words, never colour alone */
.tag {
  display: inline-flex; align-items: center; min-height: 24px; padding: 0 var(--space-xs);
  border-radius: var(--radius-input); font-size: var(--app-xs); font-weight: 500; line-height: 1.2; white-space: nowrap;
  background: var(--color-paper-2); color: var(--color-ink-2); border: var(--rule-hair) solid var(--color-rule);
}
.tag--bot { background: var(--color-paper-3); color: var(--color-leaf); border-color: var(--color-paper-3); }
.tag--booking { background: var(--color-success-wash); color: var(--color-success); border-color: transparent; }
.tag--handoff { background: var(--color-warn-wash); color: var(--color-warn-ink); border-color: transparent; }
.tag--customer { background: var(--color-paper); color: var(--color-ink-2); }
.tag--system { background: transparent; color: var(--color-muted); border-style: dashed; }

/* the ledger row: the signature, the same on the hero, the console and the brand sheet */
.ledger { display: grid; }
.entry {
  display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: var(--space-md);
  padding-block: var(--space-sm); border-top: var(--rule-hair) solid var(--color-rule);
}
.entry:first-child { border-top: 0; }
.entry time { font-size: var(--app-sm); color: var(--color-muted); padding-top: var(--space-3xs); }
.entry-body { display: grid; gap: var(--space-2xs); min-width: 0; }
.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); font-size: var(--app-xs); color: var(--color-muted); }
.entry-text { font-size: var(--app-md); line-height: 1.55; overflow-wrap: anywhere; }
.entry-why { font-size: var(--app-sm); color: var(--color-muted); }
.entry-why b { font-weight: 500; color: var(--color-ink-2); }
.entry.is-new { animation: arrive var(--dur-long) var(--ease-out); }
@keyframes arrive { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .entry.is-new { animation: none; }
  .btn { transition: background-color var(--dur-short) linear; }
  html { scroll-behavior: auto; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; --gap-columns: 32px; --section-gap: 96px; }
}
