/*
  Bright Street Dental: dental practice website (Screenery template, slug "dentist")
  The world is the dental chart: numbered teeth in two arches, ruled record rows, clinical codes in mono.

  Contents
   1. Tokens
   2. Base and browser surfaces
   3. Components (the themed kit: buttons, select, fields, radios, switch, checkbox, notes, slip, tooltip)
   4. Header
   5. Hero: the chart, the mouth readout, the record row
   6. Emergency band
   7. Sections: price ledger, roster, promise, first visit, hours and map, questions
   8. New patient form, success state
   9. Footer and phone dock
  10. Motion (entrance, state changes, scroll-linked), reduced motion
  11. Narrow screens
*/

/* ---------- 1. Tokens ---------- */
:root {
  /* Palette: four colours, everything else is mixed from them */
  --enamel: #f4fbf8;
  --teal: #0b3d3a;
  --mint: #7fd1b9;
  --coral: #ff6b5e;

  --teal-deep: color-mix(in srgb, var(--teal) 62%, #000);       /* small print on coral, footer ground */
  --teal-soft: color-mix(in srgb, var(--teal) 76%, var(--enamel)); /* secondary text on enamel */
  --enamel-dim: color-mix(in srgb, var(--enamel) 74%, var(--teal)); /* secondary text on teal */
  --rule: color-mix(in srgb, var(--teal) 16%, var(--enamel));   /* chart ruling on enamel */
  --rule-dark: color-mix(in srgb, var(--enamel) 20%, var(--teal)); /* chart ruling on teal */
  --mint-wash: color-mix(in srgb, var(--mint) 24%, var(--enamel));
  --mint-deep: color-mix(in srgb, var(--mint) 82%, var(--teal));
  --coral-wash: color-mix(in srgb, var(--coral) 14%, var(--enamel));
  --coral-ink: color-mix(in srgb, var(--coral) 62%, var(--teal-deep)); /* coral that passes AA as text on enamel */

  /* Type */
  --sans: "Albert Sans", "Avenir Next", "Segoe UI", sans-serif;
  --mono: "Sometype Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --fs-0: 0.75rem;     /* 12, codes */
  --fs-1: 0.8125rem;   /* 13 */
  --fs-2: 0.9375rem;   /* 15 */
  --fs-3: 1.0625rem;   /* 17, body */
  --fs-4: 1.25rem;     /* 20, ledes */
  --fs-5: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
  --fs-h2: clamp(2.25rem, 1.2rem + 4.2vw, 4.25rem);
  --fs-h1: clamp(2.875rem, 0.6rem + 7.4vw, 6rem);

  /* Space */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 72px;
  --s-9: clamp(72px, 9vw, 136px);
  --gutter: clamp(18px, 4vw, 56px);
  --wide: 1320px;

  /* Shape: instruments are square-shouldered, teeth are not */
  --r-1: 3px;
  --r-2: 8px;
  --line: 1.5px;
  --top-h: 68px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 160ms;
  --t-mid: 320ms;
}

/* ---------- 2. Base and browser surfaces ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-padding-top: calc(var(--top-h) + 16px);
  scrollbar-color: var(--teal) var(--mint-wash);
  -webkit-text-size-adjust: 100%;
}
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--mint-wash); }
::-webkit-scrollbar-thumb { background: var(--teal); border: 3px solid var(--mint-wash); border-radius: 8px; }

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--sans);
  font-size: var(--fs-3);
  line-height: 1.55;
  color: var(--teal);
  background: var(--enamel);
  accent-color: var(--teal);
  caret-color: var(--coral);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--mint); color: var(--teal-deep); }

h1, h2, h3, p, ul, ol, dl, dd, fieldset, legend, figure, table { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
address { font-style: normal; }
table { border-collapse: collapse; width: 100%; }
small { font-size: inherit; }

h1, h2 { font-weight: 800; letter-spacing: -0.035em; line-height: 0.98; text-wrap: balance; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-4); font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
p { text-wrap: pretty; }

a { color: inherit; text-decoration-thickness: var(--line); text-underline-offset: 0.2em; }

:focus-visible { outline: 2.5px solid var(--coral); outline-offset: 3px; border-radius: var(--r-1); }

.icon { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.defs { position: absolute; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }

.skip { position: absolute; left: var(--s-4); top: -80px; z-index: 100; padding: var(--s-3) var(--s-4); background: var(--mint); color: var(--teal-deep); font-weight: 600; border-radius: var(--r-1); }
.skip:focus { top: var(--s-3); }

/* ---------- 3. Components ----------
   The themed kit. Everything here is driven by the tokens above; lift the block as it is. */

/* Buttons: flat blocks, square shoulders */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 44px; padding: 0 var(--s-5);
  border: var(--line) solid transparent; border-radius: var(--r-1);
  font-weight: 600; font-size: var(--fs-2); line-height: 1.1; text-decoration: none; white-space: nowrap;
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast), translate var(--t-fast) var(--ease-out);
}
.btn:active { translate: 0 1px; }
.btn--lg { min-height: 56px; padding: 0 var(--s-6); font-size: var(--fs-3); }
.btn--mint { background: var(--mint); color: var(--teal-deep); }
.btn--mint:hover { background: var(--enamel); }
.btn--teal { background: var(--teal); color: var(--enamel); }
.btn--teal:hover { background: var(--teal-deep); }
.btn--coral { background: var(--coral); color: var(--teal-deep); }
.btn--coral:hover { background: color-mix(in srgb, var(--coral) 86%, var(--enamel)); }
.btn--line { border-color: var(--enamel-dim); color: var(--enamel); }
.btn--line:hover { background: var(--enamel); color: var(--teal); border-color: var(--enamel); }
.btn--line-dark { border-color: var(--teal); color: var(--teal); }
.btn--line-dark:hover { background: var(--teal); color: var(--enamel); }
.btn[disabled] { cursor: progress; opacity: 0.75; }

.textbtn { padding: var(--s-3) 0; border: 0; background: none; font-weight: 600; font-size: var(--fs-2); text-decoration: underline; text-decoration-thickness: var(--line); text-underline-offset: 0.2em; }
.textbtn:hover { color: var(--coral); }

/* Fields: a ruled box, label in mono like a record heading */
.field { display: grid; gap: var(--s-2); align-content: start; }
.field--inline { grid-auto-flow: column; align-items: center; gap: var(--s-3); }
.field__label { font-family: var(--mono); font-size: var(--fs-0); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }
.field__opt { color: var(--teal-soft); text-transform: none; letter-spacing: 0; }
.form .field__opt { color: var(--enamel-dim); } /* full-strength tint, not opacity: keeps AA on teal */
fieldset.field > legend.field__label { margin-bottom: var(--s-2); } /* a legend sits outside the grid gap */
.input {
  width: 100%; min-height: 52px; padding: var(--s-3) var(--s-4);
  background: var(--enamel); color: var(--teal);
  border: var(--line) solid var(--teal); border-radius: var(--r-1);
  transition: box-shadow var(--t-fast), border-color var(--t-fast);
}
.input::placeholder { color: color-mix(in srgb, var(--teal) 78%, var(--enamel)); opacity: 1; }
.input:hover { box-shadow: inset 0 0 0 1px var(--teal); }
.input:focus-visible { outline: 2.5px solid var(--mint); outline-offset: 2px; }
.input--area { min-height: 96px; resize: none; line-height: 1.45; }
.input:-webkit-autofill { -webkit-text-fill-color: var(--teal); box-shadow: inset 0 0 0 100px var(--mint-wash); }
.input[aria-invalid="true"] { border-color: var(--coral); box-shadow: inset 0 0 0 1.5px var(--coral); background: var(--coral-wash); }
.field__err { display: flex; gap: var(--s-2); align-items: baseline; font-size: var(--fs-1); font-weight: 600; color: var(--coral); }
.field__err::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; translate: 0 -1px; }

/* Select: a record field that opens a ruled list of coded entries.
   Markup: .select > button[role=combobox] + .select__pop > ul[role=listbox] > li[role=option][data-value][data-code] + input[type=hidden] */
.select { position: relative; min-width: 0; }
.select__btn {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s-3);
  width: 100%; min-height: 52px; padding: 0 var(--s-4) 0 0;
  background: var(--enamel); color: var(--teal); text-align: left;
  border: var(--line) solid var(--teal); border-radius: var(--r-1);
}
.select__code {
  align-self: stretch; display: grid; place-items: center; min-width: 58px; padding: 0 var(--s-3);
  background: var(--teal); color: var(--mint);
  font-family: var(--mono); font-size: var(--fs-0); font-weight: 500; letter-spacing: 0.04em;
}
.select__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.select__chev { font-size: 1rem; transition: rotate var(--t-mid) var(--ease-out); }
.select__btn[aria-expanded="true"] .select__chev { rotate: 180deg; }
.select__btn:hover { box-shadow: inset 0 0 0 1px var(--teal); }
.select__btn:focus-visible { outline: 2.5px solid var(--coral); outline-offset: 2px; }
.select__pop {
  position: absolute; z-index: 30; left: 0; top: calc(100% + 6px); min-width: 100%; width: max-content; max-width: min(92vw, 420px);
  background: var(--enamel); color: var(--teal);
  border: var(--line) solid var(--teal); border-radius: var(--r-1);
  box-shadow: 0 18px 40px -12px color-mix(in srgb, var(--teal-deep) 55%, transparent);
  transform-origin: 50% 0;
}
.select--up .select__pop { top: auto; bottom: calc(100% + 6px); transform-origin: 50% 100%; }
.select__list { max-height: min(60vh, 340px); overflow: auto; outline: 0; scrollbar-width: thin; scrollbar-color: var(--teal) transparent; }
.select__list [role="option"] {
  display: grid; grid-template-columns: 58px 1fr 16px; align-items: center; gap: var(--s-3);
  min-height: 46px; padding: 0 var(--s-4) 0 0; cursor: pointer; font-weight: 500;
  border-top: 1px solid var(--rule);
}
.select__list [role="option"]:first-child { border-top: 0; }
.select__list [role="option"]::before { content: attr(data-code); padding-left: var(--s-3); font-family: var(--mono); font-size: var(--fs-0); color: var(--teal-soft); letter-spacing: 0.04em; }
.select__list [role="option"]::after { content: ""; width: 9px; height: 9px; border-radius: 50%; border: var(--line) solid transparent; }
.select__list [role="option"][aria-selected="true"]::after { background: var(--coral); }
.select__list [role="option"].is-active { background: var(--mint); color: var(--teal-deep); }
.select__list [role="option"].is-active::before { color: var(--teal-deep); }

/* Segmented radios: the concern picker and "best time" */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: var(--line) solid var(--teal); border-radius: var(--r-1); background: var(--enamel); }
.seg__opt { position: relative; display: grid; }
.seg__opt + .seg__opt { border-left: var(--line) solid var(--teal); }
.seg__opt input, .concern input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.seg__opt span { display: grid; place-items: center; min-height: 49px; padding: 0 var(--s-2); color: var(--teal); font-weight: 500; font-size: var(--fs-2); transition: background-color var(--t-fast); }
.seg__opt:hover span { background: var(--mint-wash); }
.seg__opt input:checked + span { background: var(--teal); color: var(--enamel); }
.seg__opt input:focus-visible + span { outline: 2.5px solid var(--coral); outline-offset: 2px; position: relative; z-index: 1; }

/* Switch */
.switch { display: grid; grid-template-columns: auto 1fr; gap: var(--s-4); align-items: start; cursor: pointer; position: relative; }
.switch input { position: absolute; opacity: 0; width: 56px; height: 32px; margin: 0; cursor: pointer; }
.switch__track { width: 56px; height: 32px; padding: 3px; border: var(--line) solid var(--enamel-dim); border-radius: 16px; transition: background-color var(--t-mid), border-color var(--t-mid); }
.switch__thumb { display: block; width: 23px; height: 23px; border-radius: 50%; background: var(--enamel); transition: translate var(--t-mid) var(--ease-out), background-color var(--t-mid); }
.switch input:checked + .switch__track { background: var(--mint); border-color: var(--mint); }
.switch input:checked + .switch__track .switch__thumb { translate: 24px 0; background: var(--teal-deep); }
.switch input:focus-visible + .switch__track { outline: 2.5px solid var(--coral); outline-offset: 3px; }
.switch__text { font-weight: 600; padding-top: 3px; }
.switch__text small { display: block; font-weight: 400; font-size: var(--fs-2); color: var(--enamel-dim); }

/* Checkbox */
.check { display: grid; grid-template-columns: auto 1fr; gap: var(--s-4); align-items: start; cursor: pointer; position: relative; }
.check input { position: absolute; opacity: 0; width: 28px; height: 28px; margin: 0; cursor: pointer; }
.check__box { display: grid; place-items: center; width: 28px; height: 28px; border: var(--line) solid var(--enamel-dim); border-radius: var(--r-1); font-size: 1.125rem; color: var(--teal-deep); transition: background-color var(--t-fast), border-color var(--t-fast); }
.check__box .icon { stroke-width: 2; scale: 0; transition: scale var(--t-mid) var(--ease-out); }
.check input:checked + .check__box { background: var(--mint); border-color: var(--mint); }
.check input:checked + .check__box .icon { scale: 1; }
.check input:focus-visible + .check__box { outline: 2.5px solid var(--coral); outline-offset: 3px; }
.check input[aria-invalid="true"] + .check__box { border-color: var(--coral); box-shadow: inset 0 0 0 1.5px var(--coral); }

/* Inline alert */
.alert { display: grid; gap: var(--s-4); justify-items: start; padding: var(--s-5); background: var(--coral); color: var(--teal-deep); border-radius: var(--r-1); }

/* Notes: toasts, printed as a line from the record */
.notes { position: fixed; z-index: 60; left: 50%; bottom: var(--s-5); translate: -50% 0; display: grid; gap: var(--s-2); width: min(92vw, 460px); pointer-events: none; }
.note {
  pointer-events: auto;
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: var(--s-3);
  min-height: 56px; padding: 0 var(--s-2) 0 0;
  background: var(--enamel); color: var(--teal);
  border: var(--line) solid var(--teal); border-radius: var(--r-1);
  box-shadow: 0 16px 36px -14px color-mix(in srgb, var(--teal-deep) 70%, transparent);
  font-size: var(--fs-2); font-weight: 500;
}
.note__code { align-self: stretch; display: grid; place-items: center; min-width: 58px; padding: 0 var(--s-3); background: var(--teal); color: var(--mint); font-family: var(--mono); font-size: var(--fs-1); font-weight: 600; }
.note--warn .note__code { background: var(--coral); color: var(--teal-deep); }
.note__text { padding: var(--s-3) 0; }
.note__act { min-height: 40px; padding: 0 var(--s-3); border: 0; background: none; font-weight: 600; text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: var(--line); }
.note__act:hover { color: var(--coral-ink); }
.note__close { display: grid; place-items: center; width: 40px; height: 40px; border: 0; background: none; border-radius: var(--r-1); }
.note__close:hover { background: var(--mint-wash); }

/* Slip: the confirmation dialog, an amendment to the record */
.slip {
  width: min(92vw, 440px); padding: 0; border: var(--line) solid var(--teal); border-radius: var(--r-1);
  background: var(--enamel); color: var(--teal);
  box-shadow: 0 30px 70px -20px color-mix(in srgb, var(--teal-deep) 80%, transparent);
}
.slip::backdrop { background: color-mix(in srgb, var(--teal-deep) 72%, transparent); }
.slip__code { padding: var(--s-2) var(--s-5); background: var(--coral); color: var(--teal-deep); font-family: var(--mono); font-size: var(--fs-0); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.slip h2 { padding: var(--s-5) var(--s-5) var(--s-2); font-size: 1.875rem; letter-spacing: -0.03em; line-height: 1.05; }
.slip > p:not(.slip__code) { padding: 0 var(--s-5); color: var(--teal-soft); }
.slip__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); padding: var(--s-5); }
.slip__actions .btn { flex: 1 1 150px; }

/* Tooltip: a chart callout, shown on hover and on keyboard focus */
.tip {
  position: absolute; z-index: 5; left: 0; top: 0; pointer-events: none;
  padding: 6px 10px; white-space: nowrap;
  background: var(--enamel); color: var(--teal-deep); border-radius: var(--r-1);
  font-size: var(--fs-1); font-weight: 600;
  box-shadow: 0 8px 20px -8px #000;
}
.tip b { font-family: var(--mono); font-weight: 600; margin-right: 6px; color: var(--coral-ink); }

/* Disclosure (questions) */
.q { border-top: var(--line) solid var(--teal); }
.q:last-child { border-bottom: var(--line) solid var(--teal); }
.q summary { display: grid; grid-template-columns: 1fr auto; gap: var(--s-4); align-items: center; padding: var(--s-5) 0; cursor: pointer; list-style: none; font-size: var(--fs-5); font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.q summary::-webkit-details-marker { display: none; }
.q summary:hover { color: var(--coral-ink); }
.q__mark { font-size: 1.5rem; transition: rotate var(--t-mid) var(--ease-out); }
.q[open] .q__mark { rotate: 45deg; }
.q__a { padding: 0 0 var(--s-5); max-width: 62ch; color: var(--teal-soft); }

/* ---------- 4. Header ---------- */
.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: var(--s-6);
  height: var(--top-h); padding: 0 var(--gutter);
  background: var(--teal); color: var(--enamel);
}
.brand { display: inline-flex; align-items: center; gap: var(--s-3); font-weight: 800; font-size: 1.1875rem; letter-spacing: -0.02em; text-decoration: none; white-space: nowrap; }
.brand__mark { font-size: 1.75rem; color: var(--mint); }
.brand__kind { font-weight: 400; }
.top__nav { display: flex; gap: var(--s-5); margin-left: auto; }
.top__nav a { padding: var(--s-3) 0; font-size: var(--fs-2); font-weight: 500; text-decoration: none; }
.top__nav a:hover { color: var(--mint); text-decoration: underline; }
.status { display: inline-flex; align-items: center; gap: var(--s-2); font-family: var(--mono); font-size: var(--fs-1); white-space: nowrap; color: var(--enamel); }
.status__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--enamel-dim); }
.status.is-open .status__dot { background: var(--mint); }
.status.is-closed .status__dot { background: var(--coral); }

/* ---------- 5. Hero ---------- */
.hero {
  display: grid; grid-template-rows: 1fr auto;
  min-height: calc(100svh - var(--top-h));
  background: var(--teal); color: var(--enamel);
}
.hero__main {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s-7);
  width: 100%; max-width: calc(var(--wide) + 2 * var(--gutter)); margin-inline: auto;
  padding: var(--s-5) var(--gutter) var(--s-6);
}
.hero__text { display: grid; gap: var(--s-5); justify-items: start; }
.hero h1 { font-size: var(--fs-h1); max-width: 8ch; }
.hero__lede { max-width: 43ch; font-size: var(--fs-4); line-height: 1.45; color: var(--enamel-dim); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-3); }

/* The chart sizes itself from the height left on the first screen */
.chart {
  position: relative; container-type: inline-size;
  height: clamp(440px, calc(100svh - var(--top-h) - 190px), 780px);
  aspect-ratio: 560 / 680;
}
.chart__svg { display: block; width: 100%; height: 100%; overflow: visible; outline: 0; }
.chart__fallback { fill: var(--enamel); font-size: 15px; }
.gum { fill: none; stroke: var(--coral); stroke-width: 66; stroke-linecap: round; }
.midline { stroke: var(--rule-dark); stroke-width: 1.5; stroke-dasharray: 3 6; }
.tooth { cursor: pointer; outline: 0; }
.tooth__body { fill: var(--enamel); stroke: var(--teal); stroke-width: 1.5; transition: fill var(--t-fast); }
.tooth__fissure { fill: none; stroke: color-mix(in srgb, var(--teal) 34%, var(--enamel)); stroke-width: 1.5; stroke-linecap: round; }
.tooth:hover .tooth__body { fill: var(--mint-wash); }
.tooth[aria-checked="true"] .tooth__body { fill: var(--mint); stroke-width: 3; }
.tooth[aria-checked="true"] .tooth__fissure { stroke: var(--teal); }
.tooth:focus-visible .tooth__body { stroke: var(--teal-deep); stroke-width: 5; }
.tooth.is-missing .tooth__body { fill: color-mix(in srgb, var(--coral) 70%, var(--teal)); stroke: var(--enamel); stroke-dasharray: 4 4; stroke-width: 1.5; }
.tooth.is-missing .tooth__fissure { display: none; }
.tooth__mark { pointer-events: none; fill: var(--coral); stroke: var(--teal-deep); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tooth__mark .ln { fill: none; stroke: var(--coral-ink); stroke-width: 2.5; }
.tooth.is-missing .tooth__mark .ln { stroke: var(--enamel); }
.tooth__num { fill: var(--mint); font-family: var(--mono); font-size: 14px; font-weight: 500; text-anchor: middle; dominant-baseline: central; pointer-events: none; transition: fill var(--t-fast); }
.tooth__num.is-on { fill: var(--enamel); font-weight: 600; }
.chart__side { position: absolute; top: 50%; font-family: var(--mono); font-size: var(--fs-0); letter-spacing: 0.08em; text-transform: uppercase; color: var(--enamel-dim); writing-mode: vertical-rl; }
.chart__side--r { right: 100%; rotate: 180deg; translate: -6px -50%; }
.chart__side--l { left: 100%; translate: 6px -50%; }

/* The readout sits in the mouth */
.mouth { position: absolute; inset: 22% 25% 22%; display: grid; align-content: center; justify-items: center; gap: 1.6cqw; text-align: center; pointer-events: none; }
.mouth > * { pointer-events: auto; }
.mouth__num { font-family: var(--mono); font-weight: 600; font-size: clamp(3.25rem, 19cqw, 6rem); line-height: 0.9; letter-spacing: -0.04em; }
.mouth__name { min-height: 2.5em; font-size: clamp(0.8125rem, 3.4cqw, 1.0625rem); font-weight: 500; line-height: 1.25; color: var(--enamel-dim); text-wrap: balance; }
.concerns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; margin-top: 1cqw; }
.concern { position: relative; display: grid; }
.concern span {
  display: grid; place-items: center; min-height: 40px;
  border: var(--line) solid var(--rule-dark); border-radius: var(--r-1);
  font-size: clamp(0.8125rem, 3cqw, 0.9375rem); font-weight: 600;
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.concern:hover span { border-color: var(--enamel); }
.concern input:checked + span { background: var(--enamel); color: var(--teal-deep); border-color: var(--enamel); }
.concern input:focus-visible + span { outline: 2.5px solid var(--coral); outline-offset: 2px; }

/* The record row */
.record { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; background: var(--mint); color: var(--teal-deep); }
.record__cells { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.9fr) minmax(0, 0.7fr) minmax(0, 1.15fr); padding-left: calc(var(--gutter) - var(--s-5)); }
.record__cell { display: grid; align-content: start; gap: var(--s-2); padding: var(--s-5); border-left: var(--line) solid color-mix(in srgb, var(--teal) 28%, var(--mint)); overflow: hidden; }
.record__cell:first-child { border-left: 0; }
.record dt { font-family: var(--mono); font-size: var(--fs-0); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.record dd { font-size: var(--fs-3); font-weight: 500; line-height: 1.3; }
.record dd small { display: block; margin-top: 2px; font-size: var(--fs-2); font-weight: 400; color: color-mix(in srgb, var(--teal-deep) 86%, var(--mint)); }
.record__big { font-family: var(--mono); font-size: clamp(1.25rem, 0.8rem + 1.3vw, 1.75rem) !important; font-weight: 600 !important; letter-spacing: -0.03em; white-space: nowrap; }
.record__cell--tooth dd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s-3); }
.record__add { min-height: 100%; min-width: 16rem; padding: 0 var(--s-7); /* fixed width so "On my chart" does not reflow the cells */ border-radius: 0; font-size: var(--fs-3); background: var(--enamel); color: var(--teal-deep); }
.record__add:hover { background: var(--teal-deep); color: var(--enamel); }
.record__add.is-done .icon { rotate: 45deg; opacity: 0; width: 0; margin-right: calc(var(--s-2) * -1); }

.caveat { max-width: calc(var(--wide) + 2 * var(--gutter)); margin-inline: auto; padding: var(--s-4) var(--gutter); font-size: var(--fs-1); color: var(--teal-soft); }

/* ---------- 6. Emergency band ---------- */
.urgent {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--s-6) var(--s-7);
  padding: var(--s-9) max(var(--gutter), calc((100vw - var(--wide)) / 2)) var(--s-8);
  background: var(--coral); color: var(--teal-deep);
}
.urgent h2 { font-size: var(--fs-h2); }
.urgent__live { max-width: 34ch; margin-top: var(--s-4); font-size: var(--fs-5); font-weight: 500; line-height: 1.3; }
.urgent__phone { font-family: var(--mono); font-weight: 600; font-size: clamp(2.125rem, 0.4rem + 6.4vw, 5.25rem); letter-spacing: -0.06em; line-height: 1; text-decoration: none; white-space: nowrap; }
.urgent__phone:hover { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 0.12em; }
.urgent__facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); border-top: var(--line) solid var(--teal-deep); }
.urgent__facts div { padding: var(--s-4) var(--s-5) 0 0; }
.urgent__facts dt { font-family: var(--mono); font-size: var(--fs-0); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.urgent__facts dd { font-weight: 600; }

/* ---------- 7. Sections ---------- */
.section { max-width: calc(var(--wide) + 2 * var(--gutter)); margin-inline: auto; padding: var(--s-9) var(--gutter) 0; }
.section:last-of-type { padding-bottom: var(--s-9); }
.section__head { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--s-5) var(--s-7); align-items: end; margin-bottom: var(--s-7); }
.section__head p { max-width: 44ch; color: var(--teal-soft); }

/* Price ledger */
.prices__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); padding-bottom: var(--s-4); }
.prices__bar .select { width: min(78vw, 340px); }
.prices__count { font-family: var(--mono); font-size: var(--fs-1); color: var(--teal-soft); }
.ledger { font-variant-numeric: tabular-nums; }
.ledger thead th { padding: var(--s-3) var(--s-4) var(--s-3) 0; text-align: left; font-family: var(--mono); font-size: var(--fs-0); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; border-block: var(--line) solid var(--teal); }
.ledger td, .ledger tbody th { padding: var(--s-4) var(--s-4) var(--s-4) 0; text-align: left; vertical-align: baseline; border-bottom: 1px solid var(--rule); }
.ledger tbody th { font-size: var(--fs-4); font-weight: 600; letter-spacing: -0.01em; }
.ledger tbody th small { display: block; font-size: var(--fs-2); font-weight: 400; letter-spacing: 0; color: var(--teal-soft); }
.ledger td:first-child { width: 7.5rem; font-family: var(--mono); font-size: var(--fs-1); color: var(--teal-soft); white-space: nowrap; }
.ledger td:nth-child(3) { width: 9rem; font-size: var(--fs-2); color: var(--teal-soft); white-space: nowrap; }
.ledger .num { width: 7rem; padding-right: 0; text-align: right; font-family: var(--mono); font-size: var(--fs-4); font-weight: 600; white-space: nowrap; }
.ledger thead .num { font-size: var(--fs-0); font-weight: 500; }
.ledger tbody tr { transition: background-color var(--t-fast); }
.ledger tbody tr:hover { background: var(--mint-wash); }
.ledger tbody tr.is-match { background: var(--mint-wash); }

/* Roster */
.roster { --days-w: min(42%, 420px); border-top: var(--line) solid var(--teal); position: relative; }
.roster__days, .week { display: grid; grid-template-columns: repeat(6, 1fr); width: var(--days-w); }
.roster__days { margin-left: auto; padding: var(--s-3) 0; font-family: var(--mono); font-size: var(--fs-0); letter-spacing: 0.08em; text-transform: uppercase; text-align: center; border-bottom: var(--line) solid var(--teal); width: 100%; grid-template-columns: 1fr repeat(6, calc(var(--days-w) / 6)); }
.roster__days::before { content: ""; }
.roster__days .is-today { font-weight: 600; color: var(--coral-ink); }
.dentist { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) var(--days-w); align-items: center; border-bottom: 1px solid var(--rule); }
.dentist__chair { align-self: start; padding-top: calc(var(--s-5) + 0.5rem); font-family: var(--mono); font-size: var(--fs-1); color: var(--teal-soft); }
.dentist__who { padding: var(--s-5) var(--s-6) var(--s-5) 0; }
.dentist__who h3 { font-size: var(--fs-5); font-weight: 800; letter-spacing: -0.025em; }
.dentist__who p { max-width: 52ch; margin-top: var(--s-1); font-size: var(--fs-2); color: var(--teal-soft); }
.week { align-self: stretch; width: 100%; }
.week li { display: grid; place-items: center; }
.week li.is-today { background: var(--mint-wash); }
/* a day in is a molar seen from above; a day off is an empty socket */
.week li span { width: 26px; height: 26px; border-radius: 9px; border: var(--line) dashed color-mix(in srgb, var(--teal) 34%, var(--enamel)); }
.week li.is-in span { background: var(--teal); border: 0; }
.week li.is-in.is-today span { background: var(--coral); }
.team__also { max-width: 62ch; margin-top: var(--s-5); color: var(--teal-soft); }

/* Promise */
.promise { margin-top: var(--s-9); padding: var(--s-9) max(var(--gutter), calc((100vw - var(--wide)) / 2)); background: var(--mint); color: var(--teal-deep); }
.promise__head { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--s-5) var(--s-7); align-items: end; }
.promise h2 { font-size: clamp(2.75rem, 0.8rem + 8vw, 6rem); }
.promise__lede { font-size: var(--fs-4); line-height: 1.45; max-width: 34ch; padding-bottom: 0.4em; }
.promise__list { margin-top: var(--s-8); border-top: var(--line) solid var(--teal-deep); }
.promise__list li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: var(--s-2) var(--s-7); align-items: baseline; padding: var(--s-5) 0; border-bottom: var(--line) solid color-mix(in srgb, var(--teal) 30%, var(--mint)); font-size: var(--fs-4); line-height: 1.4; }
.promise__list strong { font-size: var(--fs-5); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.promise__sign { margin-top: var(--s-5); font-family: var(--mono); font-size: var(--fs-1); }

/* First visit: a bar forty minutes long, each part as wide as its share */
.minutes { display: grid; grid-template-columns: 5fr 15fr 8fr 12fr; }
.minutes li { --fill: var(--teal); position: relative; padding: var(--s-6) var(--s-5) 0 0; min-width: 0; }
.minutes li::before { content: ""; position: absolute; left: 0; right: 3px; top: 0; height: 12px; background: var(--fill); border-radius: 2px; transform-origin: 0 50%; }
.minutes li:nth-child(1) { --fill: var(--mint-deep); }
.minutes li:nth-child(3) { --fill: var(--mint-deep); }
.minutes li:nth-child(4) { --fill: var(--coral); }
.minutes__time { display: block; font-family: var(--mono); font-size: var(--fs-1); color: var(--teal-soft); white-space: nowrap; }
.minutes h3 { margin-top: var(--s-2); font-size: var(--fs-5); font-weight: 800; letter-spacing: -0.025em; }
.minutes p { margin-top: var(--s-2); max-width: 36ch; font-size: var(--fs-2); color: var(--teal-soft); }

/* Hours and map */
.where { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-7) var(--s-8); align-items: start; }
.where h2 { margin-bottom: var(--s-6); }
.hours { font-variant-numeric: tabular-nums; border-top: var(--line) solid var(--teal); }
.hours th, .hours td { padding: var(--s-3) var(--s-3); border-bottom: 1px solid var(--rule); font-size: var(--fs-4); }
.hours th { text-align: left; font-weight: 500; }
.hours td { text-align: right; font-family: var(--mono); font-size: var(--fs-3); }
.hours tr.is-today th, .hours tr.is-today td { background: var(--teal); color: var(--enamel); font-weight: 600; border-color: var(--teal); }
.where__note { margin-top: var(--s-4); font-size: var(--fs-2); color: var(--teal-soft); max-width: 44ch; }
.map { display: block; width: 100%; height: auto; border-radius: var(--r-1); }
.map__ground { fill: var(--mint-wash); }
.map__block { fill: var(--enamel); }
.map__park { fill: var(--mint); }
.map__water { fill: color-mix(in srgb, var(--mint) 55%, var(--enamel)); }
.map__road { fill: none; stroke: var(--mint-wash); stroke-width: 0; }
.map__walk { fill: none; stroke: var(--teal); stroke-width: 2; stroke-dasharray: 2 7; stroke-linecap: round; }
.map__label { font-family: var(--mono); font-size: 11px; fill: var(--teal); letter-spacing: 0.04em; }
.map__label--soft { fill: var(--teal-soft); }
.map__station rect { fill: var(--teal); }
.map__station text { font-family: var(--mono); font-size: 10.5px; fill: var(--enamel); }
.map__pin circle { fill: var(--coral); }
.map__pin path { fill: var(--enamel); }
.where__addr { display: grid; gap: var(--s-2); margin-top: var(--s-4); }
.where__addr strong { font-size: var(--fs-5); font-weight: 800; letter-spacing: -0.02em; }
.where__addr span { max-width: 52ch; font-size: var(--fs-2); color: var(--teal-soft); }

/* Questions */
.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: var(--s-6) var(--s-8); align-items: start; }
.faq { padding-bottom: var(--s-9); }
.faq h2 { font-size: clamp(2rem, 1.2rem + 3vw, 3.25rem); }

/* ---------- 8. New patient form ---------- */
.register {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: var(--s-7) var(--s-8); align-items: start;
  padding: var(--s-9) max(var(--gutter), calc((100vw - var(--wide)) / 2));
  background: var(--teal); color: var(--enamel);
}
.register h2 { font-size: clamp(2.75rem, 1rem + 6.4vw, 5.5rem); }
.register__intro > p { max-width: 36ch; margin-top: var(--s-5); font-size: var(--fs-4); line-height: 1.45; color: var(--enamel-dim); }
.mychart { margin-top: var(--s-7); border-top: var(--line) solid var(--rule-dark); padding-top: var(--s-4); }
.mychart h3 { font-family: var(--mono); font-size: var(--fs-0); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.mychart__empty { max-width: 40ch; margin-top: var(--s-3); font-size: var(--fs-2); color: var(--enamel-dim); }
.mychart__list li { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto auto; align-items: center; gap: var(--s-3); min-height: 56px; border-bottom: 1px solid var(--rule-dark); }
.mychart__list b { font-family: var(--mono); font-size: var(--fs-5); font-weight: 600; color: var(--mint); }
.mychart__list span { font-size: var(--fs-2); line-height: 1.3; }
.mychart__list em { font-style: normal; font-family: var(--mono); font-size: var(--fs-1); color: var(--enamel-dim); white-space: nowrap; }
.mychart__rm { display: grid; place-items: center; width: 40px; height: 40px; border: 0; background: none; border-radius: var(--r-1); color: var(--enamel); }
.mychart__rm:hover { background: var(--coral); color: var(--teal-deep); }
.mychart .textbtn { color: var(--enamel); }
.mychart .textbtn:hover { color: var(--coral); }

.form { display: grid; gap: var(--s-5); }
.form__pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
.form .field__label { color: var(--mint); }
.form .field__err { color: color-mix(in srgb, var(--coral) 78%, var(--enamel)); } /* plain coral is 4.3:1 on teal */
.form .input, .form .select__btn, .form .seg { border-color: var(--enamel); }
.form__send { justify-self: start; position: relative; min-width: 220px; }
.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, var(--teal-deep) 25%, transparent); border-top-color: var(--teal-deep); animation: spin 0.8s linear infinite; }
.form.is-loading .spinner { display: block; }
.form.is-loading .input, .form.is-loading .select__btn, .form.is-loading .seg { opacity: 0.6; }

.done { align-self: start; display: grid; align-content: start; justify-items: start; gap: var(--s-4); padding: var(--s-7); background: var(--mint); color: var(--teal-deep); border-radius: var(--r-1); outline-offset: 4px; }
.done:focus { outline: 0; } /* focused by script on success so screen readers land here; not a control */
.done__mark { width: 56px; height: 56px; padding: 12px; border-radius: 50%; background: var(--teal-deep); color: var(--mint); stroke-width: 2; }
.done h3 { font-size: clamp(2rem, 1.3rem + 2.4vw, 3rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.done > p { max-width: 40ch; font-size: var(--fs-4); line-height: 1.4; }
.done__facts { display: grid; grid-template-columns: repeat(3, auto); gap: var(--s-6); width: 100%; margin-block: var(--s-3); padding-top: var(--s-4); border-top: var(--line) solid var(--teal-deep); justify-content: start; }
.done__facts dt { font-family: var(--mono); font-size: var(--fs-0); letter-spacing: 0.08em; text-transform: uppercase; }
.done__facts dd { font-family: var(--mono); font-weight: 600; }
.done .btn--line { border-color: var(--teal-deep); color: var(--teal-deep); }
.done .btn--line:hover { background: var(--teal-deep); color: var(--mint); }

/* ---------- 9. Footer and phone dock ---------- */
.foot {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s-6) var(--s-7);
  padding: var(--s-8) max(var(--gutter), calc((100vw - var(--wide)) / 2));
  background: var(--teal-deep); color: var(--enamel);
}
.foot__brand { display: flex; gap: var(--s-4); align-items: start; font-weight: 600; }
.foot__links { display: grid; gap: 2px; align-content: start; font-size: var(--fs-2); }
.foot__links a { display: inline-block; padding: 5px 0; text-decoration: none; overflow-wrap: anywhere; }
.foot__links a:hover { color: var(--mint); text-decoration: underline; }
.foot__small { grid-column: 1 / -1; padding-top: var(--s-5); border-top: 1px solid var(--rule-dark); font-size: var(--fs-1); color: var(--enamel-dim); }

.dock { display: none; }

/* ---------- 10. Motion ---------- */
@keyframes spin { to { rotate: 360deg; } }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  /* Entrance: the gums draw round, the teeth erupt from the midline outwards, the record row prints last */
  @keyframes erupt { from { opacity: 0; scale: 0.4; } }
  @keyframes draw { from { stroke-dashoffset: 1; } }
  @keyframes rise { from { opacity: 0; translate: 0 22px; } }
  @keyframes print { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
  .gum { stroke-dasharray: 1; animation: draw 900ms var(--ease-out) backwards; }
  .tooth__body, .tooth__fissure { transform-box: fill-box; transform-origin: center; animation: erupt 620ms var(--ease-out) backwards; animation-delay: calc(260ms + var(--i) * 46ms); }
  .tooth__num { animation: rise 500ms var(--ease-out) backwards; animation-delay: calc(420ms + var(--i) * 46ms); }
  .hero__text > * { animation: rise 760ms var(--ease-out) backwards; }
  .hero__text > :nth-child(2) { animation-delay: 110ms; }
  .hero__text > :nth-child(3) { animation-delay: 220ms; }
  .mouth { animation: rise 700ms var(--ease-out) 760ms backwards; }
  .record { animation: print 900ms var(--ease-out) 620ms backwards; }

  /* State: a changed value in the record is re-printed */
  @keyframes reprint { from { opacity: 0; translate: 0 0.5em; filter: blur(3px); } }
  .is-fresh { animation: reprint var(--t-mid) var(--ease-out); }
  .mouth__num.is-fresh { animation-duration: 420ms; }

  /* Components */
  @keyframes pop { from { opacity: 0; scale: 1 0.92; translate: 0 -4px; } }
  .select__pop:not([hidden]) { animation: pop 220ms var(--ease-out); }
  @keyframes note-in { from { opacity: 0; translate: 0 16px; } }
  .note { animation: note-in var(--t-mid) var(--ease-out); transition: opacity 200ms, translate 200ms; }
  .note.is-leaving { opacity: 0; translate: 0 8px; }
  @keyframes slip-in { from { opacity: 0; translate: 0 18px; scale: 0.97; } }
  @keyframes fade { from { opacity: 0; } }
  .slip[open] { animation: slip-in 300ms var(--ease-out); }
  .slip[open]::backdrop { animation: fade 240ms; }
  .tip { animation: fade 120ms; }
  .q[open] .q__a { animation: rise 360ms var(--ease-out); }
  .mychart__list li { animation: rise var(--t-mid) var(--ease-out); }
  .done:not([hidden]) { animation: rise 520ms var(--ease-out); }
  .ledger tbody tr.is-in { animation: fade 280ms var(--ease-out); }

  /* Scroll-linked: the forty-minute bar fills as it comes up the screen */
  @supports (animation-timeline: view()) {
    @keyframes fill { from { scale: 0 1; } }
    .minutes li::before { animation: fill linear both; animation-timeline: view(); animation-range: entry 10% cover 34%; }
    .minutes li:nth-child(2)::before { animation-range: entry 22% cover 40%; }
    .minutes li:nth-child(3)::before { animation-range: entry 34% cover 46%; }
    .minutes li:nth-child(4)::before { animation-range: entry 46% cover 52%; }
    @keyframes ring-up { from { letter-spacing: 0.04em; opacity: 0.35; } }
    .urgent__phone { animation: ring-up linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .spinner { animation-duration: 1.6s !important; }
}

/* ---------- 11. Narrow screens ---------- */
@media (max-width: 1180px) {
  .top__nav { display: none; }
  .status { margin-left: auto; }
  .record { grid-template-columns: 1fr; }
  .record__add { min-height: 60px; }
  .record__cells { padding-inline: calc(var(--gutter) - var(--s-5)); }
}

@media (max-width: 900px) {
  .hero__main { grid-template-columns: 1fr; gap: var(--s-5); padding-top: var(--s-6); }
  .hero h1 { max-width: none; }
  .chart { justify-self: center; height: auto; width: min(100%, 470px); }
  .hero__text { display: contents; }
  .hero__lede { order: 3; }
  .hero__actions { order: 4; margin-top: 0; }
  .chart { order: 2; }
  .chart__side--r { right: auto; left: 0; translate: -2px -50%; }
  .chart__side--l { left: auto; right: 0; translate: 2px -50%; }
  .record__cells { grid-template-columns: 1fr 1fr; }
  .record__cell--tooth, .record__cell--treat { grid-column: 1 / -1; }
  .record__cell { border-left: 0; border-top: var(--line) solid color-mix(in srgb, var(--teal) 28%, var(--mint)); padding-block: var(--s-4); }
  .record__cell:first-child { border-top: 0; }
  .record__cell:last-child { border-left: var(--line) solid color-mix(in srgb, var(--teal) 28%, var(--mint)); }

  .urgent { grid-template-columns: 1fr; align-items: start; }
  .urgent__facts { grid-template-columns: 1fr; }
  .section__head, .where, .faq, .register, .promise__head, .promise__list li { grid-template-columns: 1fr; }
  .promise__list { margin-top: var(--s-6); }
  .tooth__num { font-size: 18px; }
  .section__head { margin-bottom: var(--s-6); }

  .roster { --days-w: 100%; }
  .roster__days { display: none; }
  .dentist { grid-template-columns: 1fr; padding: var(--s-5) 0; gap: var(--s-3); }
  .dentist__chair { padding: 0; }
  .dentist__who { padding: 0; }
  .week { gap: 4px; }
  .week li { grid-auto-flow: row; gap: 6px; padding: var(--s-2) 0; font-family: var(--mono); font-size: var(--fs-0); text-transform: uppercase; }
  .week li::after { content: attr(data-short); }

  .minutes { grid-template-columns: 1fr; gap: var(--s-5); }
  .minutes li { padding: 0 0 0 var(--s-6); min-height: calc(var(--span) * 7px); }
  .minutes li::before { right: auto; bottom: 0; width: 12px; height: auto; transform-origin: 50% 0; }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot__brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  :root { --top-h: 58px; }
  body { padding-bottom: 64px; }
  .top { gap: var(--s-3); }
  .top__book { display: none; }
  .brand { font-size: 1.0625rem; }
  .brand__mark { font-size: 1.5rem; }
  .hero { min-height: 0; }
  .hero__actions { display: none; }
  .hero__lede { font-size: var(--fs-3); }

  .ledger thead { display: none; }
  .ledger tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s-4); padding: var(--s-3) 0; border-bottom: 1px solid var(--rule); }
  .ledger td, .ledger tbody th { padding: 0; border: 0; width: auto !important; }
  .ledger td:first-child { grid-column: 1 / -1; }
  .ledger tbody th { font-size: var(--fs-3); }
  .ledger td:nth-child(3) { grid-column: 1; grid-row: 3; font-size: var(--fs-1); }
  .ledger .num { grid-column: 2; grid-row: 2; align-self: start; }
  .prices__bar .field--inline { grid-auto-flow: row; width: 100%; }
  .prices__bar .select { width: 100%; }

  .form__pair { grid-template-columns: 1fr; }
  .form__send { justify-self: stretch; }
  .done { padding: var(--s-5); }
  .done__facts { grid-template-columns: 1fr; gap: var(--s-3); }
  .foot { grid-template-columns: 1fr; }
  .notes { bottom: 76px; }
  .note { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: var(--s-3); }
  .note__code { grid-row: 1 / span 2; }
  .note__text { grid-column: 2; grid-row: 1; }
  .note__close { grid-column: 3; grid-row: 1; }
  .note__act { grid-column: 2; grid-row: 2; justify-self: start; min-height: 32px; margin: calc(var(--s-2) * -1) 0 var(--s-2); padding: 0; }
  .mychart__list li { grid-template-columns: 2.75rem minmax(0, 1fr) auto; row-gap: 2px; padding-block: var(--s-3); }
  .mychart__list b { grid-row: 1 / span 2; }
  .mychart__list em { grid-column: 2; grid-row: 2; }
  .mychart__rm { grid-column: 3; grid-row: 1 / span 2; }
  .status { min-width: 0; font-size: var(--fs-0); letter-spacing: -0.02em; }
  .status [data-status="short"] { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

  .dock {
    position: fixed; z-index: 50; left: 0; right: 0; bottom: 0;
    display: grid; grid-template-columns: auto 1fr; height: 64px;
    border-top: var(--line) solid var(--teal-deep);
  }
  .dock a { display: flex; align-items: center; justify-content: center; gap: var(--s-2); padding: 0 var(--s-5); font-weight: 600; text-decoration: none; }
  .dock__call { background: var(--coral); color: var(--teal-deep); }
  .dock__book { background: var(--mint); color: var(--teal-deep); }
}

@media (max-width: 380px) {
  .status [data-status="short"] { max-width: 9.5em; overflow: hidden; text-overflow: ellipsis; }
  .concern span { min-height: 36px; }
}
