/* DexaScan design system.
   Colour psychology: black = authority, precision, luxury; DexaScan yellow = energy, optimism,
   attention, used only where the eye should go; warm ivory and white = clinical calm without the
   coldness of pure grey. Yellow never carries text on white: deep gold does. */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap;
  src: url("../fonts/Inter-Regular-latin.b006029b133a.ttf") format("truetype"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap;
  src: url("../fonts/Inter-Regular-latinext.a316cbbb2195.ttf") format("truetype"); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap;
  src: url("../fonts/Inter-SemiBold-latin.c0e5d504b6e7.ttf") format("truetype"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap;
  src: url("../fonts/Inter-SemiBold-latinext.546af89ff2dc.ttf") format("truetype"); unicode-range: U+0100-024F, U+1E00-1EFF; }

/* Headings: Fraunces (SIL OFL 1.1, see fonts/Fraunces-OFL.txt), subset to Latin + Czech. */
@font-face { font-family: "Fraunces"; font-weight: 400 700; font-display: swap;
  src: url("../fonts/Fraunces-var-latin.f920fc70615d.ttf") format("truetype"); }

:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #fbfaf7;
  --ink: #0f0f10;
  --ink-2: #3a3a3d;
  --muted: #6b6a66;
  --faint: #a3a19b;
  --line: #ebe8e0;
  --line-2: #d9d5ca;

  --brand: #fdc010;
  --brand-hover: #f2b400;
  --brand-soft: #fff5d6;
  --brand-ink: #0a0a0b;
  --gold-deep: #8a6400;
  --black: #0a0a0b;
  --black-2: #1c1c1e;

  --info: #2b2b2e;
  --info-soft: #efeee9;
  --ok: #1f7a35;
  --ok-soft: #e8f5ec;
  --warn: #a35200;
  --warn-soft: #fff1e2;
  --err: #c4001a;
  --err-soft: #ffeceb;

  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(40, 30, 0, 0.04), 0 10px 30px rgba(40, 30, 0, 0.05);
  --shadow-lift: 0 2px 4px rgba(40, 30, 0, 0.05), 0 18px 44px rgba(40, 30, 0, 0.09);
  --focus: 0 0 0 4px rgba(253, 192, 16, 0.35);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
img, svg { max-width: 100%; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--gold-deep); }
[hidden] { display: none !important; }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.022em; line-height: 1.15; margin: 0 0 8px; }
h1, h2 { font-family: var(--font-display); font-weight: 560; letter-spacing: -0.012em; font-optical-sizing: auto; }
h1 { font-size: clamp(28px, 4vw, 40px); }
h2 { font-size: 22px; }
h3 { font-size: 17px; letter-spacing: -0.01em; }
p { margin: 0 0 12px; }
.lead { font-size: 19px; color: var(--ink-2); line-height: 1.45; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 8px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 680px; }
body { min-height: 100vh; display: flex; flex-direction: column; }
main { padding: 32px 0 72px; flex: 1; }
.stack > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 28px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .grid-4 { gap: 10px; } }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* ---------- header / footer ---------- */
/* Brand chrome: DexaScan yellow header and footer with black type, as on the PDF report. */
.site-header {
  position: sticky; top: 0; z-index: 10; background: var(--brand);
  box-shadow: 0 1px 0 rgba(10, 10, 11, 0.12), 0 6px 18px rgba(40, 30, 0, 0.06);
}
.site-header .container { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 28px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; font-size: 14px; font-weight: 600; }
.nav::-webkit-scrollbar { display: none; }
.nav-end { justify-content: flex-end; }
.nav a { color: var(--black); padding: 8px 14px; border-radius: 10px; text-decoration: none; transition: background 0.15s ease, color 0.15s ease; }
.nav a:hover { background: rgba(10, 10, 11, 0.1); color: var(--black); }
.nav a[aria-current="page"] { background: var(--black); color: #fff; }
.header-side { display: flex; align-items: center; gap: 10px; flex: none; margin-left: auto; }
.header-side form { margin: 0; }
.nav-cta { background: var(--black); color: #fff; border-radius: 999px; padding: 10px 20px; font-size: 14px; font-weight: 600; text-decoration: none; transition: background 0.15s ease; }
.nav-cta:hover { background: var(--black-2); color: var(--brand); }
.profile { display: inline-flex; align-items: center; gap: 9px; padding: 4px 14px 4px 4px; background: rgba(255, 255, 255, 0.55); border: 1px solid rgba(10, 10, 11, 0.1); border-radius: 999px; }
.profile-badge { width: 30px; height: 30px; border-radius: 50%; background: var(--black); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.profile-text { display: flex; flex-direction: column; line-height: 1.15; }
.profile-text b { font-size: 13px; }
.profile-text small { font-size: 11px; color: rgba(10, 10, 11, 0.65); }
.nav-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border: 1px solid rgba(10, 10, 11, 0.28); border-radius: 10px; background: transparent; color: var(--black); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease; }
.nav-btn:hover { background: var(--black); color: var(--brand); border-color: var(--black); }
.nav-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.site-header a:focus-visible, .site-header button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--black); }
@media (max-width: 760px) {
  .site-header .container { height: 56px; gap: 10px; }
  .brand img { height: 24px; }
  .nav a { padding: 7px 10px; }
  /* More items than fit: fade the edge so it is clear the menu scrolls sideways. */
  .nav { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); padding-right: 20px; }
  .profile { padding: 3px; }
  .profile-text, .nav-btn span { display: none; }
  .nav-btn { padding: 0 10px; }
  .nav-cta { padding: 9px 14px; }
}

.site-footer { background: var(--brand); color: rgba(10, 10, 11, 0.75); padding: 40px 0 24px; font-size: 14px; }
.site-footer a { color: var(--black); text-decoration: none; }
.site-footer a:hover { color: var(--black); text-decoration: underline; text-decoration-color: var(--black); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; }
.footer-brand img { height: 26px; width: auto; display: block; margin-bottom: 14px; }
.footer-brand p { max-width: 34ch; margin: 0; }
.footer-title { color: var(--black); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 12px; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 32px; padding-top: 18px; border-top: 1px solid rgba(10, 10, 11, 0.15); font-size: 13px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
/* Staff see one quiet line instead of the public footer. */
.app-footer { background: var(--brand); color: rgba(10, 10, 11, 0.75); font-size: 13px; padding: 14px 0; }
.app-footer .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 28px; }
.card-accent { border-top: 4px solid var(--brand); }
.card-sm { padding: 20px; border-radius: var(--radius); }
.card-flat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card + .card { margin-top: 16px; }
.grid > .card { margin-top: 0; }
.fold > summary { cursor: pointer; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; list-style: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary h2 { margin: 0; }
.fold > summary h2::before { content: "+"; display: inline-block; width: 22px; color: var(--muted); }
.fold[open] > summary h2::before { content: "–"; }
.card-header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.divider { height: 1px; background: var(--line); margin: 24px 0; border: 0; }
.section { margin-top: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }

/* ---------- buttons ---------- */
.btn, :where(button[type="submit"]:not(.link, .nav-btn, .slot)), .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px; border-radius: 980px; border: 0;
  font: 600 15px/1 var(--font); letter-spacing: -0.01em; cursor: pointer;
  background: var(--black); color: #fff; text-decoration: none;
  transition: background 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease, color 0.15s ease;
}
.btn:hover, :where(button[type="submit"]:not(.link, .nav-btn, .slot)):hover { background: var(--black-2); color: var(--brand); text-decoration: none; }
.btn:active, button[type="submit"]:active { transform: scale(0.98); }
.btn:focus-visible, button:focus-visible, a:focus-visible { outline: none; box-shadow: var(--focus); }
.btn-secondary, .btn.btn-secondary { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn-secondary:hover, .btn.btn-secondary:hover { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--black); }
.btn-brand, .btn.btn-brand { background: var(--brand); color: var(--black); }
.btn-brand:hover, .btn.btn-brand:hover { background: var(--brand-hover); color: var(--black); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 17px; }
.btn-block { width: 100%; }
button.link { background: none; border: 0; padding: 0; color: var(--ink); font: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 3px; }
button.link:hover { text-decoration: underline; }
button.link.danger { color: var(--err); }

/* ---------- forms ---------- */
form { margin: 0; }
.field { margin-bottom: 18px; }
.field > label, .field .label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field .help { font-size: 13px; color: var(--muted); margin-top: 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="month"], input[type="file"], select, textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font: 16px/1.3 var(--font);
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none; appearance: none;
}
input[type="file"] { padding: 10px; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
.has-error input, .has-error textarea, .has-error select { border-color: var(--err); }
.errorlist { list-style: none; margin: 6px 0 0; padding: 0; color: var(--err); font-size: 13px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }

/* segmented yes/no */
.segmented { display: inline-flex; background: #efede6; border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.segmented label { position: relative; margin: 0; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: block; padding: 9px 18px; border-radius: 9px; font-size: 15px; cursor: pointer;
  color: var(--ink-2); transition: background 0.15s, box-shadow 0.15s;
}
.segmented input:checked + span { background: var(--black); color: #fff; font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); }
.segmented input:focus-visible + span { box-shadow: var(--focus); }

/* choice cards (service) */
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.choice { position: relative; display: block; cursor: pointer; margin: 0; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .choice-body {
  display: block; height: 100%; border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 16px; background: var(--surface); transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.choice:hover .choice-body { border-color: var(--line-2); }
.choice .choice-body { position: relative; }
.choice input:checked + .choice-body { border-color: var(--black); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--black) inset; }
.choice input:checked + .choice-body::after {
  content: "✓"; position: absolute; top: 14px; right: 14px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--black); color: var(--brand); font-size: 13px; font-weight: 700; display: grid; place-items: center;
}
.choice input:focus-visible + .choice-body { box-shadow: var(--focus); }
.choice-title { display: block; font-weight: 600; font-size: 17px; }
.choice-meta { display: block; margin-top: 4px; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.choice-meta small { font-size: 14px; font-weight: 400; color: var(--muted); }

/* consents */
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); }
.check:first-of-type { border-top: 0; }
.check input[type="checkbox"] { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.check label { font-size: 15px; cursor: pointer; }
.check details { margin-top: 4px; font-size: 13px; color: var(--muted); }
.check summary { cursor: pointer; color: var(--gold-deep); font-weight: 600; }
.required-mark { color: var(--muted); }

/* ---------- stepper ---------- */
.stepper { display: flex; list-style: none; padding: 0; margin: 0 0 32px; counter-reset: step; }
.stepper li { flex: 1; position: relative; text-align: center; font-size: 13px; color: var(--faint); counter-increment: step; }
.stepper li::before {
  content: counter(step); position: relative; z-index: 1; display: grid; place-items: center; margin: 0 auto 8px;
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface);
  font-weight: 600; font-size: 14px; color: var(--faint);
}
.stepper li + li::after {
  content: ""; position: absolute; top: 15px; right: calc(50% + 20px); left: calc(-50% + 20px); height: 2px; background: var(--line-2);
}
.stepper li.done { color: var(--ink-2); }
.stepper li.done::before { content: "✓"; background: var(--black); border-color: var(--black); color: var(--brand); }
.stepper li.done::after, .stepper li.current::after { background: var(--black); }
.stepper li.current { color: var(--ink); font-weight: 600; }
.stepper li.current::before { background: var(--brand); border-color: var(--black); color: var(--black); box-shadow: 0 0 0 5px var(--brand-soft); }
@media (max-width: 480px) { .stepper li span { display: none; } .stepper li.current span { display: inline; } }

/* ---------- chips / alerts ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 980px;
  font-size: 13px; font-weight: 600; white-space: nowrap; background: #efede6; color: var(--ink-2);
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.8; }
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-info { background: var(--info-soft); color: var(--info); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-err { background: var(--err-soft); color: var(--err); }
.chip-brand { background: var(--brand-soft); color: var(--gold-deep); }
.chip-muted { color: var(--faint); }
.alert { border-radius: var(--radius); padding: 14px 16px; margin-bottom: 20px; font-size: 15px; display: flex; gap: 10px; }
.alert p { margin: 0; }
.alert-error, .alert.error { background: var(--err-soft); color: var(--err); }
.alert-success, .alert.success { background: var(--ok-soft); color: var(--ok); }
.alert-warning, .alert.warning { background: var(--warn-soft); color: var(--warn); }
.alert-info, .alert.info { background: var(--info-soft); color: var(--info); }
.error { color: var(--err); }
a.error { text-decoration-color: currentColor; }

/* ---------- data ---------- */
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; font-weight: 600; }
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }

/* metric tiles */
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.tile-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.tile-value { font-size: 32px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.tile-value small { font-size: 15px; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-left: 4px; }
.tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; min-height: 32px; }
.delta { font-size: 13px; font-weight: 600; }
.delta-ok { color: var(--ok); }
.delta-warn { color: var(--warn); }
.delta-neutral { color: var(--muted); }
.spark { width: 120px; height: 32px; }
@media (max-width: 420px) {
  .tile { padding: 14px 14px 12px; }
  .tile-value { font-size: 26px; }
  .tile-foot { flex-direction: column; align-items: flex-start; }
  .spark { width: 100%; }
}
.spark polyline { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* appointment / hero card */
.feature { background: var(--black); color: #fff; border-radius: var(--radius-lg); padding: 28px; position: relative; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(253, 192, 16, 0.28), var(--shadow-lift); }
.feature .eyebrow { color: var(--brand); }
.feature h2 { color: #fff; font-size: 26px; }
.feature .muted { color: rgba(255, 255, 255, 0.7); }
.feature a:not(.btn) { color: var(--brand); }
.feature::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(253, 192, 16, 0.35), transparent 70%);
}

/* list rows */
.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.list-item:first-child { border-top: 0; padding-top: 0; }
.list-item:last-child { padding-bottom: 0; }
.list-title { font-weight: 600; }
/* Report rows: title on the left, actions on the right, the same on every row. */
.doc-item { flex-wrap: nowrap; }
.doc-main { flex-wrap: nowrap; min-width: 0; }
.doc-actions { flex: none; flex-wrap: nowrap; gap: 14px; }
@media (max-width: 480px) { .doc-item { flex-wrap: wrap; } .doc-actions { padding-left: 56px; } }
.list-sub { font-size: 14px; color: var(--muted); }
/* Icon badge: soft brand tint, hairline ring, crisp black glyph – calmer than a hard black outline. */
.icon-circle { width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(145deg, #ffe58a 0%, var(--brand) 100%); box-shadow: inset 0 0 0 1px rgba(10, 10, 11, 0.08), 0 4px 12px rgba(253, 192, 16, 0.28); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.icon-circle svg { width: 24px; height: 24px; stroke: var(--black); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* slots */
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.day-name { font-weight: 600; text-transform: capitalize; }
.day-date { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
button.slot {
  min-height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface);
  font: 600 15px var(--font); color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums;
  transition: background 0.12s, border-color 0.12s;
}
button.slot:hover { border-color: var(--black); background: var(--brand); }
.pager { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 16px; }

/* timeline */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 18px 28px; color: var(--faint); }
.timeline li::before { content: ""; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); }
.timeline li::after { content: ""; position: absolute; left: 6px; top: 18px; bottom: -2px; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.done { color: var(--ink); }
.timeline li.done::before { background: var(--ink); border-color: var(--ink); }
.timeline li.current { color: var(--ink); font-weight: 600; }
.timeline li.current::before { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }

/* hero */
.hero { position: relative; padding: 48px 0 16px; }
.hero-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 48px; align-items: center; }
.report-preview { position: relative; margin: 0; justify-self: center; width: min(100%, 400px); }
.report-preview::before {
  content: ""; position: absolute; inset: 8% -10% -6% 12%; z-index: 0; border-radius: 50%;
  background: url("../img/monogram-yellow.a84b1d603048.svg") no-repeat center / 70%, radial-gradient(circle, rgba(253, 192, 16, 0.32), transparent 68%);
  opacity: 0.55;
}
.report-preview img {
  position: relative; z-index: 1; display: block; width: 100%; height: auto; border-radius: 12px;
  border: 1px solid var(--line); box-shadow: 0 30px 70px rgba(40, 30, 0, 0.18), 0 4px 12px rgba(40, 30, 0, 0.08);
  transform: rotate(2deg); transition: transform 0.4s ease;
}
.report-preview:hover img { transform: rotate(0deg) translateY(-4px); }
.report-preview figcaption { position: relative; z-index: 1; margin-top: 16px; text-align: center; font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }
@media (max-width: 860px) {
  .hero-split { grid-template-columns: 1fr; gap: 32px; }
  .report-preview { width: min(100%, 320px); }
}
.hero h1 { font-size: clamp(36px, 6vw, 60px); letter-spacing: -0.02em; line-height: 1.05; max-width: 14ch; }
.hero .lead { max-width: 46ch; margin-top: 14px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.feature-list li { display: flex; gap: 14px; align-items: flex-start; }
.feature-list strong { display: block; }

/* tabs */
.tabs { display: inline-flex; background: #efede6; border-radius: 12px; padding: 3px; gap: 2px; margin-bottom: 20px; }
.tabs a { padding: 8px 16px; border-radius: 9px; color: var(--ink-2); font-size: 14px; text-decoration: none; }
.tabs a[aria-current="page"] { background: var(--black); color: #fff; font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); }

/* misc */
.qr { background: #fff; display: inline-block; padding: 12px; border-radius: var(--radius); border: 1px solid var(--line); }
.qr svg { width: 180px; height: 180px; display: block; }
code.secret { word-break: break-all; font-size: 13px; background: rgba(0, 0, 0, 0.05); padding: 2px 6px; border-radius: 6px; }
.badge { background: var(--brand-soft); color: var(--gold-deep); border-radius: 980px; padding: 2px 10px; font-size: 12px; font-weight: 600; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.auth-card { max-width: 440px; margin: 24px auto 0; border-top: 4px solid var(--brand); }
.auth-mark { display: block; width: 40px; height: auto; margin: 0 0 18px; }
.auth-mark-center { margin-left: auto; margin-right: auto; }
.empty { text-align: center; padding: 32px 16px; color: var(--muted); }
.actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.price { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.sticky-summary { position: sticky; top: 92px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .sticky-summary { position: static; } }

/* ---------- motion: calm, never in the way ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  main .card, main .tile, main .feature, .hero > *, .stepper { animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  main .card:nth-of-type(2), .hero > *:nth-child(2) { animation-delay: 0.06s; }
  main .card:nth-of-type(3) { animation-delay: 0.12s; }
  .btn, :where(button[type="submit"]:not(.link, .nav-btn, .slot)) { will-change: transform; }
  .btn:hover, :where(button[type="submit"]:not(.link, .nav-btn, .slot)):hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(10, 10, 11, 0.16); }
  .choice .choice-body, button.slot, .day { transition: border-color 0.15s, background 0.15s, box-shadow 0.2s, transform 0.2s; }
  .choice:hover .choice-body, .day:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
}

/* ---------- clinic day board ---------- */
.db-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.db-title { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 30px; font-weight: 560; letter-spacing: -0.01em; }
.db-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2px var(--black); flex: none; }
.db-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.db-right .tabs { margin: 0; }
.db-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 700px) { .db-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.db-count { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.db-count span { font-size: 13px; color: var(--muted); font-weight: 600; }
.db-count b { font-size: 34px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.tone-ok { color: var(--ok); } .tone-warn { color: var(--warn); } .tone-err { color: var(--err); }
.db-free { margin: -4px 2px 14px; }
.db-free b { color: var(--ink); }
.db-nowline { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 12px; font-weight: 700; }
.db-nowline::before, .db-nowline::after { content: ""; height: 2px; background: var(--black); border-radius: 2px; }
.db-nowline::before { width: 64px; }
.db-nowline::after { flex: 1; }
.db-nowline span { background: var(--brand); padding: 2px 8px; border-radius: 999px; }
.db-nowline + .db-row { border-top: 0; }
.db-move { margin-bottom: 16px; border-top: 4px solid var(--brand); }
.db-slots { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.db-slots button.slot { padding: 0 16px; }
.db-day { padding: 6px 20px; }
.db-day + .db-day { margin-top: 14px; }
.db-day-head { padding: 12px 0 6px; }
.db-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 16px 0; border-top: 1px solid var(--line); }
.db-day-head + .db-row, .db-row:first-child { border-top: 0; }
.db-time { font-size: 20px; font-weight: 600; padding-top: 1px; }
.db-name { font-weight: 600; font-size: 16px; }
.db-phone { display: inline-block; margin-top: 2px; font-size: 14px; color: var(--ink-2); text-decoration: none; }
.db-phone:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--brand); }
.db-born { margin-top: 1px; }
.db-print { color: var(--ink-2); }
.db-times { font-size: 14px; color: var(--muted); }
.db-alert { font-size: 13px; font-weight: 600; color: var(--err); }
.db-undo { font-size: 13px; color: var(--muted); text-decoration-color: var(--line-2); }
.db-more { position: relative; }
.db-more summary { list-style: none; cursor: pointer; padding: 4px 10px; border-radius: 8px; color: var(--muted); font-weight: 600; }
.db-more summary::-webkit-details-marker { display: none; }
.db-more[open] summary { background: var(--surface-2); }
.db-more-menu { position: absolute; right: 0; top: 100%; z-index: 5; margin-top: 4px; min-width: 200px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lift); padding: 8px; display: grid; gap: 4px; }
.db-more-menu a, .db-more-menu button.link { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; font-size: 14px; text-align: left; width: 100%; }
.db-more-menu a:hover, .db-more-menu button.link:hover { background: var(--surface-2); }
.db-note { margin-top: 6px; font-size: 13px; }
.db-note summary { cursor: pointer; color: var(--muted); }
.db-note form { display: flex; gap: 8px; margin-top: 6px; }
.db-note input[type="text"] { min-height: 36px; padding: 6px 10px; font-size: 14px; }
.db-status { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.db-status form { display: inline-flex; align-items: center; gap: 8px; }
.db-check { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; cursor: pointer; }
.db-check input { width: 18px; height: 18px; accent-color: var(--black); }
.btn-sm, .btn.btn-sm, :where(button[type="submit"]).btn-sm { min-height: 34px; padding: 0 14px; font-size: 14px; }
.state-done .db-name, .state-no_show .db-name { color: var(--ink-2); }
.state-no_show .db-name { text-decoration: line-through; text-decoration-color: var(--err); }
@media (max-width: 760px) {
  .db-row { grid-template-columns: 52px minmax(0, 1fr); }
  .db-status { grid-column: 2; justify-content: flex-start; max-width: none; }
}

/* Day overview: arrival is green, departure red; rows show their state at a glance. */
.btn-arrive, .btn-depart { min-height: 38px; padding: 0 18px; font-weight: 600; border-radius: 10px; color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.btn-arrive { background: var(--ok); }
.btn-arrive:hover { background: #17612a; color: #fff; }
.btn-depart { background: var(--err); }
.btn-depart:hover { background: #8f1f1f; color: #fff; }
.db-count { position: relative; overflow: hidden; }
.db-count::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--line-2); }
.count-here::before { background: var(--ok); }
.count-done::before { background: var(--black); }
.count-missed::before { background: var(--err); }
.count-missed b { color: var(--err); }
.db-day { padding: 4px 8px; }
.db-day-head { padding: 12px 12px 6px; }
.db-row { padding: 14px 12px; border-radius: 12px; align-items: center; transition: background 0.15s ease; }
.db-row:hover { background: var(--surface-2); }
.db-row.state-here { background: var(--ok-soft); box-shadow: inset 4px 0 0 var(--ok); }
.db-row.state-late .db-time { color: var(--err); }
.db-row.state-done .db-time, .db-row.state-no_show .db-time { color: var(--faint); }
.db-done { color: var(--ok); font-weight: 600; }
.db-nowline { margin: 4px 12px; }
.db-check { padding: 6px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.btn-noshow { min-height: 38px; padding: 0 16px; font-weight: 600; border-radius: 10px; background: var(--surface); color: var(--err); box-shadow: inset 0 0 0 1.5px var(--err); }
.btn-noshow:hover { background: var(--err-soft); color: var(--err); }
.db-clinics { display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; margin: 0 0 16px; }

/* Admin overview: one card per open task, with the items to open directly. */
.ov-task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 4px; }
.ov-task { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: var(--surface); box-shadow: inset 4px 0 0 var(--brand); }
.ov-task.ov-muted { box-shadow: inset 4px 0 0 var(--line-2); }
.ov-task p { margin: 4px 0 10px; }
.ov-task-title { font-weight: 600; text-decoration: none; color: var(--ink); }
.ov-task-title:hover { text-decoration: underline; text-decoration-color: var(--brand); }
.ov-count { min-width: 30px; height: 26px; padding: 0 9px; border-radius: 999px; background: var(--black); color: var(--brand); display: inline-grid; place-items: center; font-size: 13px; font-weight: 700; }
.ov-items { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.ov-items a { text-decoration: none; color: var(--ink-2); }
.ov-items a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--brand); }
.ov-items li::before { content: "›"; color: var(--gold-deep); margin-right: 6px; font-weight: 700; }
.ov-done { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.ov-done a { color: var(--muted); text-decoration: none; }
.ov-done a:hover { color: var(--ink); }
