/* Online vision check (app/vision.js). Colours and radii come from the page's tokens. */
.vc {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-items: stretch;
  justify-content: stretch;
  gap: var(--s-5, 24px);
  height: var(--vc-h, 100%);
  min-height: 0;
  padding: var(--s-7, 48px);
  border-radius: var(--r-lg, 20px);
  background: var(--surface, #f4f1ea);
  color: var(--ink, #101618);
  font-family: var(--font-text, system-ui, sans-serif);
  position: relative;
}
.vc__head { display: grid; gap: var(--s-2, 8px); align-content: start; }
.vc__step { margin: 0; font-size: var(--t-label, 13px); font-weight: 500; color: var(--muted, #676c6e); }
/* the widget sits in the kit's .frame: that frame's spacer has no job in this grid */
.vc.frame::before { display: none; }
.vc__title { margin: 0; font: 500 var(--t-card, 20px)/1.3 var(--font-text, system-ui, sans-serif); letter-spacing: -0.01em; outline: none; }
.vc__head .btn-row { margin-top: var(--s-3, 12px); }
.vc__hint { margin: 0; font-size: var(--t-body, 16px); line-height: 1.5; max-width: 46ch; }
.vc__body { display: grid; grid-auto-rows: auto; align-content: center; justify-items: center; min-height: 0; overflow: hidden; }
.vc[data-step="far"] .vc__body, .vc[data-step="farLeft"] .vc__body, .vc[data-step="near"] .vc__body, .vc[data-step="age"] .vc__body { align-content: start; }
.vc__foot .btn-row { margin: 0; }
.vc__live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; }

/* the chart */
.vc-chart { display: grid; justify-items: center; align-content: center; width: 100%; }
.vc-row { display: flex; align-items: center; justify-content: center; gap: var(--s-4, 16px); position: relative; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; }
.vc-row__l { display: flex; gap: var(--vc-gap, 12px); }
.vc-row__n { position: absolute; right: 100%; margin-right: var(--s-5, 24px); font-size: var(--t-label, 13px); color: var(--muted, #676c6e); font-variant-numeric: tabular-nums; }
.vc-glyph { display: block; flex: none; overflow: visible; }
.vc-glyph path { fill: none; stroke: currentColor; stroke-width: 1; stroke-linecap: butt; stroke-linejoin: miter; }
/* the start state: five rows of the table as one drawing that fills the frame's body */
.vc-preview { display: block; width: 100%; height: 100%; min-height: 0; max-height: 380px; }
.vc-preview path { fill: none; stroke: currentColor; stroke-width: 1; stroke-linecap: butt; stroke-linejoin: miter; }
.vc__body:has(> .vc-preview) { align-content: stretch; align-items: center; }

/* rows as answers */
.vc-chart--pick { grid-auto-flow: column; grid-template-rows: repeat(4, auto); grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-5, 24px); align-content: start; justify-items: stretch; border-top: 1px solid var(--line, rgba(16, 22, 24, .11)); }
.vc-chart--pick .vc-row { width: 100%; min-height: 48px; justify-content: flex-start; padding: 0 var(--s-3, 12px) 0 36px; border-bottom: 1px solid var(--line, rgba(16, 22, 24, .11)); cursor: pointer; transition: background-color 150ms var(--ease, ease-out); }
.vc-chart--pick .vc-row__n { position: absolute; left: var(--s-3, 12px); right: auto; margin: 0; }
.vc[data-step="far"] .vc-choices, .vc[data-step="farLeft"] .vc-choices { border-top: 0; margin-top: 0; }
.vc-chart--pick .vc-row:hover, .vc-chart--pick .vc-row:focus-visible { background: color-mix(in oklab, var(--ink, #101618) 7%, transparent); }
.vc-row:focus-visible, .vc-near__line:focus-visible { outline: 2px solid var(--action, #00787a); outline-offset: 2px; }

/* the chart at its true size covers the window */
.vc--full { position: fixed; inset: 0; z-index: 100; height: auto; border-radius: 0; padding: 24px 36px; background: #fff; color: #000; grid-template-rows: minmax(0, 1fr); gap: 0; }
.vc--full .vc__head, .vc--full .vc__foot { display: none; }
.vc--full .vc__body { grid-template-rows: minmax(0, 1fr) auto; align-content: stretch; overflow: visible; }
.vc--full .vc-chart { align-self: center; }
.vc--full .vc-row__n { color: #666; }
.vc-full__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5, 24px); width: 100%; padding-top: var(--s-4, 16px); border-top: 1px solid rgba(0, 0, 0, .12); }
.vc-full__bar p { margin: 0; font-size: var(--t-body, 16px); line-height: 1.5; color: #333; max-width: 52ch; }
.vc:fullscreen { padding: 24px 36px; }

/* calibration */
.vc-calib { display: grid; gap: var(--s-5, 24px); width: 100%; justify-items: center; }
.vc-calib__stage { display: grid; place-items: center; width: 100%; min-height: 0; overflow: hidden; }
.vc-card { position: relative; max-width: 100%; border: 2px dashed var(--ink, #101618); border-radius: 3.7% / 5.9%; background: color-mix(in oklab, var(--action, #00787a) 9%, transparent); }
.vc-card__chip { position: absolute; left: 9%; top: 34%; width: 13%; aspect-ratio: 1.25; border-radius: 3px; border: 2px solid color-mix(in oklab, var(--ink, #101618) 45%, transparent); }
.vc-calib__ctl { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: var(--s-4, 16px); align-items: center; width: min(100%, 420px); }
.vc-range { width: 100%; height: 44px; margin: 0; accent-color: var(--action, #00787a); }
.vc-nudge { width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-strong, rgba(16, 22, 24, .2)); border-radius: var(--r-btn, 8px); background: var(--bg, #fff); color: inherit; font: 400 22px/1 var(--font-text, system-ui, sans-serif); cursor: pointer; }
.vc-nudge:hover { border-color: var(--ink, #101618); }
.vc-nudge:focus-visible, .vc-choice:focus-visible { outline: 2px solid var(--action, #00787a); outline-offset: 2px; }

/* answers: rows, as in the page's lists */
.vc-choices { display: grid; width: 100%; align-self: end; margin-top: var(--s-4, 16px); border-top: 1px solid var(--line, rgba(16, 22, 24, .11)); }
.vc-choice { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4, 16px); width: 100%; min-height: 48px; padding: 0 var(--s-4, 16px); border: 0; border-bottom: 1px solid var(--line, rgba(16, 22, 24, .11)); background: none; color: inherit; font: 500 var(--t-body, 16px)/1.3 var(--font-text, system-ui, sans-serif); text-align: left; cursor: pointer; transition: background-color 150ms var(--ease, ease-out); }
.vc-choice::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-top: 1.5px solid currentColor; transform: rotate(45deg); opacity: .55; }
.vc-choice:hover { background: color-mix(in oklab, var(--ink, #101618) 7%, transparent); }

/* text steps */
.vc-list { margin: 0; padding-left: 1.3em; display: grid; gap: var(--s-3, 12px); font-size: var(--t-body, 16px); line-height: 1.5; justify-self: start; max-width: 46ch; }
.vc-q { margin: var(--s-5, 24px) 0 0; font-size: var(--t-body, 16px); line-height: 1.5; justify-self: start; max-width: 46ch; }
.vc-dial { width: min(100%, 280px, 42vh); aspect-ratio: 1; }
.vc-dial svg { display: block; width: 100%; height: 100%; }
.vc-dial path { stroke: currentColor; stroke-width: 2; fill: none; }
.vc-dial circle { fill: currentColor; }

/* near reading */
.vc-near { display: grid; width: 100%; align-content: start; }
.vc-near__line { display: block; width: 100%; min-height: 44px; padding: 8px var(--s-4, 16px); border: 0; border-bottom: 1px solid var(--line, rgba(16, 22, 24, .11)); background: none; color: inherit; font-family: var(--font-text, system-ui, sans-serif); line-height: 1.2; text-align: left; cursor: pointer; transition: background-color 150ms var(--ease, ease-out); }
.vc-near__line:hover { background: color-mix(in oklab, var(--ink, #101618) 7%, transparent); }

/* result */
.vc-res { display: grid; gap: var(--s-4, 16px); align-content: center; justify-self: start; max-width: 52ch; }
.vc-res__list { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-3, 12px); font-size: var(--t-lead, 20px); line-height: 1.4; }
.vc-res__advice { margin: 0; font-size: var(--t-body, 16px); line-height: 1.5; font-weight: 500; }
.vc-res__note { margin: 0; font-size: var(--t-small, 14px); line-height: 1.45; color: var(--muted, #676c6e); }

@media (min-width: 640px) and (max-width: 1279px) { .vc { padding: var(--s-6, 32px); } }
@media (max-width: 639px) {
  .vc { padding: var(--s-5, 24px); gap: var(--s-4, 16px); }
  .vc-res__list { font-size: var(--t-body, 16px); }
  .vc--full { padding: 16px; }
  .vc-full__bar { flex-direction: column; align-items: stretch; gap: var(--s-3, 12px); }
  .vc-row__n { margin-right: var(--s-3, 12px); }
  /* a card is wider than a phone: only its short side is matched, the frame runs off the stage */
  .vc-calib__stage { align-items: start; height: 150px; }
  .vc-card { border-bottom: 0; border-radius: 12px 12px 0 0; }
}
@media (prefers-reduced-motion: reduce) { .vc-chart--pick .vc-row, .vc-near__line { transition: none; } }
