/* CrackWatch: a consumer phone app. White canvas, soft tiles, one giant number per screen, black capsules,
   one brand orange, colour only for meaning (green stable, amber watch, red act). Own typeface: Onest (OFL). */

@font-face { font-family: "Onest"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/onest-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Onest"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/onest-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Onest"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/onest-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Onest"; font-weight: 800; font-style: normal; font-display: swap; src: url("/fonts/onest-latin-800-normal.woff2") format("woff2"); }

:root {
  --canvas: light-dark(#FFFFFF, #000000);
  --tile: light-dark(#F5F5F7, #1C1C1E);
  --tile-2: light-dark(#ECECF0, #2C2C2E);
  --ink: light-dark(#0B0B0C, #FFFFFF);
  --ink-2: light-dark(#6E6E73, #A1A1A6);           /* 5.0:1 on white, 7.4:1 on black */
  --line: light-dark(#E6E6EA, #2C2C2E);
  --brand: light-dark(#FF5A1F, #FF6A2E);            /* CrackWatch orange: logo, chart line, focus */
  --brand-text: light-dark(#C2410C, #FF8A57);
  --brand-tint: light-dark(#FFF1EA, #3A1D10);
  --ok: light-dark(#1F9D55, #30D158);   --ok-text: light-dark(#167A41, #4CD97B);   --ok-tint: light-dark(#E8F7EE, #12301E);
  --watch: light-dark(#E5A000, #FFD60A); --watch-text: light-dark(#8A5A00, #FFD60A); --watch-tint: light-dark(#FFF6DD, #33290A);
  --act: light-dark(#E5383B, #FF453A);  --act-text: light-dark(#C0262B, #FF6961);   --act-tint: light-dark(#FDECEC, #3A1414);
  /* shared system re-tokenised */
  --font-sans: "Onest", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-display: var(--font-sans);
  --label: var(--ink); --label-secondary: var(--ink-2); --bg-grouped: var(--canvas); --bg-grouped-secondary: var(--tile); --bg-elevated: var(--canvas);
  --separator: var(--line); --accent: var(--ink); --accent-text: var(--ink); --accent-on: var(--canvas); --focus-ring: var(--brand);
  --status-ok: var(--ok); --status-critical: var(--act); --status-critical-text: var(--act-text);
  --pad: 20px;
}

html, body { background: var(--canvas); }
/* An app never pans sideways: clip (not hidden, which would break the sticky top bar) any horizontal overflow. */
html, body { overflow-x: clip; overscroll-behavior-x: none; }
body { margin: 0; color: var(--ink); font: 400 17px/1.45 var(--font-sans); -webkit-font-smoothing: antialiased; touch-action: manipulation; }
body, button, a, img { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, select { -webkit-user-select: text; user-select: text; font-size: max(17px, 1em); }
img { -webkit-user-drag: none; }
:focus-visible { outline: 3px solid var(--brand) !important; outline-offset: 2px; }
[hidden] { display: none !important; }
code { font-size: 0.9em; }

/* ---------- Top bar: round bordered buttons ---------- */
.topbar { display: flex; align-items: center; gap: 10px; max-width: 640px; margin: 0 auto; box-sizing: border-box;
  padding: calc(12px + env(safe-area-inset-top)) var(--pad) 6px;
  /* Pinned under the status bar on an opaque canvas, so it never slides away blurred behind it while scrolling.
     The shadow + clip paints the canvas edge to edge although the bar itself keeps the page width. */
  position: sticky; top: 0; z-index: 30; background: var(--canvas);
  box-shadow: 0 0 0 100vmax var(--canvas); clip-path: inset(0 -100vmax -14px); }
/* Soft fade under the bar so content slides under it instead of being cut by a hard edge. */
.topbar::after { content: ""; position: absolute; left: calc(50% - 50vw); width: 100vw; top: 100%; height: 14px; pointer-events: none;
  background: linear-gradient(var(--canvas), transparent); }
.round { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none; cursor: pointer;
  border: 1px solid var(--line); background: var(--canvas); color: var(--ink); transition: transform 160ms var(--ease-bouncy, ease); }
.round:active { transform: scale(0.94); }
.round .ui-icon { width: 22px; height: 22px; }
.logo { width: 24px; height: 24px; fill: none; stroke: var(--brand); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.topbar__end { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.lang { display: flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: var(--canvas); }
.lang button { min-width: 44px; height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font: 600 14px/1 var(--font-sans); cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--canvas); }

/* ---------- Page ---------- */
.page { display: block; max-width: 640px; margin: 0 auto; box-sizing: border-box; padding: 10px var(--pad) calc(120px + env(safe-area-inset-bottom)); }
.view { animation: in 360ms cubic-bezier(.2, .8, .2, 1) both; }
@keyframes in { from { opacity: 0; transform: translateY(8px); } }
.display { margin: 18px 0 12px; font: 800 36px/1.06 var(--font-sans); letter-spacing: -0.03em; text-wrap: balance; }
.title-xl { margin: 14px 0 18px; font: 800 36px/1.06 var(--font-sans); letter-spacing: -0.03em; }
.title { margin: 6px 0 4px; font: 800 28px/1.1 var(--font-sans); letter-spacing: -0.02em; }
.lede { margin: 0 0 24px; font-size: 18px; line-height: 1.45; color: var(--ink-2); text-wrap: pretty; }
.section-title { margin: 0 0 12px; font: 700 20px/1.2 var(--font-sans); letter-spacing: -0.01em; }
.muted { color: var(--ink-2); margin: 0; }
.fine { font-size: 14px; line-height: 1.45; color: var(--ink-2); margin: 14px 0 0; }
.center { text-align: center; }
.block { margin-top: 28px; }
.tile { background: var(--tile); border-radius: 24px; }

/* ---------- Buttons: big capsules ---------- */
.cta { display: grid; gap: 10px; margin: 8px 0 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; padding: 0 24px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 18px/1 var(--font-sans); text-decoration: none; transition: transform 200ms cubic-bezier(.3, 1.4, .5, 1), opacity 160ms; }
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.4; pointer-events: none; }
.btn .ui-icon { width: 22px; height: 22px; }
.btn--primary { background: var(--ink); color: var(--canvas); }
.btn--soft { background: var(--tile); color: var(--ink); }
.btn--soft.is-act { color: var(--act-text); }
.link-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 2px; border: 0; background: none; color: var(--ink); font: 600 16px/1 var(--font-sans); text-decoration: none; cursor: pointer; }
.link-btn .ui-icon { width: 20px; height: 20px; }
.link-btn.is-danger { color: var(--act-text); }
.row-actions { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 18px; }

/* ---------- How it works (3 illustrated steps) ---------- */
.how { margin-top: 40px; }
.how__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.how__item { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; align-items: center; padding: 16px; }
.how__item h3 { margin: 0 0 4px; font: 700 18px/1.25 var(--font-sans); }
.how__item p { margin: 0; font-size: 15.5px; color: var(--ink-2); }
.how__item .link-btn { margin-top: 6px; color: var(--brand-text); }
.art { width: 112px; height: 76px; background: var(--canvas); border-radius: 16px; }
.art__line { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.art__wall { stroke: var(--line); }
.art__fill { fill: var(--ink); }
.art__card { fill: var(--canvas); }
.art__crack { fill: none; stroke: var(--brand); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.art__accent { fill: var(--brand); }

/* ---------- Photos ---------- */
.photo { position: relative; border-radius: 24px; overflow: hidden; background: #111; aspect-ratio: 4 / 3; margin-top: 8px; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.photo--wide { aspect-ratio: 3 / 2; background: var(--tile); }
.photo__badge, .badge-example { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; font: 600 14px/1 var(--font-sans);
  background: var(--brand-tint); color: var(--brand-text); flex: none; }
.photo__badge { position: absolute; left: 12px; top: 12px; background: rgba(255, 255, 255, 0.92); color: #C2410C; }
.photo .scan { position: absolute; left: 0; right: 0; top: 0; height: 26%; opacity: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(255, 90, 31, 0.22)); border-bottom: 2px solid var(--brand); }
.photo.is-scanning .scan { opacity: 1; animation: scan 2.2s cubic-bezier(.45, 0, .55, 1) infinite alternate; }
@keyframes scan { from { transform: translateY(-100%); } to { transform: translateY(385%); } }
.legend { display: flex; align-items: center; gap: 8px; margin: 10px 4px 0; font-size: 14px; color: var(--ink-2); }
.legend__ramp { width: 64px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, rgb(255,200,60), rgb(215,30,40)); }

/* ---------- Analysis: plain-words checklist ---------- */
.an-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.ex-strip { list-style: none; margin: 14px 0 6px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ex-strip li { display: grid; justify-items: center; gap: 4px; font-size: 12.5px; color: var(--ink-2); text-align: center; }
.ex-strip__n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--tile); color: var(--ink-2); font: 700 13px/1 var(--font-sans); }
.ex-strip .is-now .ex-strip__n { background: var(--brand); color: #fff; }
.ex-strip .is-now { color: var(--ink); font-weight: 600; }
.ex-strip .is-done .ex-strip__n { background: var(--ink); color: var(--canvas); }
.ticks { list-style: none; margin: 18px 0 8px; padding: 0; display: grid; gap: 2px; }
.ticks li { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 17px; animation: in 300ms cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 120ms); }
.tick { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--tile); color: var(--ink-2); }
.tick .ui-icon { width: 16px; height: 16px; stroke-width: 2.4; }
.ticks .is-ok .tick { background: var(--ok); color: #fff; }
.ticks .is-bad .tick { background: var(--act); color: #fff; }
.ticks .is-bad { color: var(--act-text); font-weight: 600; }
.ticks .is-skip { color: var(--ink-2); }
.ticks .is-wait { color: var(--ink-2); animation: none; }
.ticks .is-wait .tick { background: transparent; border: 2px solid var(--line); box-sizing: border-box; }
.ticks .is-wait:first-child .tick { border-color: var(--brand); border-right-color: transparent; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ticks__d { margin-left: auto; font-size: 14.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.note { padding: 16px 18px; border-radius: 20px; background: var(--tile); margin: 14px 0 6px; }
.note strong { display: block; font-size: 17px; margin-bottom: 4px; }
.note p { margin: 0; color: var(--ink-2); font-size: 16px; }
.note p b { color: var(--ink); }
.note--watch { background: var(--watch-tint); }
.note--watch p { color: var(--ink); }

/* ---------- Result: one giant number ---------- */
.kicker { margin: 26px 0 0; font: 600 16px/1.2 var(--font-sans); color: var(--ink-2); }
.hero { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; margin: 2px 0 6px; }
.hero__num { font: 800 96px/0.95 var(--font-sans); letter-spacing: -0.055em; font-variant-numeric: tabular-nums; }
.hero__unit { font: 800 32px/1 var(--font-sans); letter-spacing: -0.02em; }
.hero__unc { flex-basis: 100%; font: 500 17px/1.3 var(--font-sans); color: var(--ink-2); margin-top: 6px; }
.hero--md .hero__num { font-size: 48px; letter-spacing: -0.045em; }
.hero--md .hero__unit { font-size: 20px; }
@media (max-width: 360px) { .hero__num { font-size: 80px; } }
.verdict { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 24px; background: var(--tile); margin: 16px 0 0; }
.verdict__dot { width: 14px; height: 14px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--ink-2); }
.verdict h2 { margin: 0 0 4px; font: 700 21px/1.25 var(--font-sans); letter-spacing: -0.01em; }
.verdict p { margin: 0; font-size: 16.5px; color: var(--ink-2); }
.verdict.is-ok .verdict__dot { background: var(--ok); } .verdict.is-watch .verdict__dot { background: var(--watch); } .verdict.is-act .verdict__dot { background: var(--act); }
.verdict.is-act { background: var(--act-tint); } .verdict.is-act h2 { color: var(--act-text); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.fact { padding: 16px 18px; display: grid; gap: 4px; }
.fact span { font-size: 14.5px; color: var(--ink-2); }
.fact strong { font: 800 26px/1.1 var(--font-sans); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.fact strong.is-act { color: var(--act-text); }
.more { margin-top: 22px; padding: 4px 18px; }
.more summary { list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 52px; font-weight: 600; cursor: pointer; }
.more summary::-webkit-details-marker { display: none; }
.more[open] summary .ui-icon { transform: rotate(180deg); }
.more p { margin: 0 0 10px; font-size: 15.5px; color: var(--ink-2); }
.more__list { margin: 0 0 8px; padding-left: 18px; font-size: 14.5px; color: var(--ink-2); }

/* ---------- My cracks ---------- */
.cards { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 12px; }
.crack-card { display: grid; gap: 14px; padding: 16px 18px 18px; color: var(--ink); text-decoration: none; transition: transform 200ms cubic-bezier(.3, 1.4, .5, 1); }
.crack-card:active { transform: scale(0.985); }
.crack-card__top { display: flex; align-items: center; gap: 12px; }
.thumb { width: 56px; height: 56px; border-radius: 16px; object-fit: cover; background: var(--tile-2); flex: none; }
.thumb:not([src]) { visibility: visible; }
.crack-card__id { display: grid; min-width: 0; flex: 1; }
.crack-card__id strong { font-size: 18px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crack-card__id span { font-size: 15px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crack-card__bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.crack-card .hero { margin: 0; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--canvas); font: 600 15px/1 var(--font-sans); white-space: nowrap; }
.chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-2); }
.chip--ok i { background: var(--ok); } .chip--watch i { background: var(--watch); } .chip--act i { background: var(--act); }
.chip--act { background: var(--act-tint); color: var(--act-text); }
.chips { margin: 4px 0 4px; }
.crack-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.chips .chip { background: var(--tile); }
.chips .chip--act { background: var(--act-tint); }
.chart-tile { padding: 18px 18px 14px; }
.chart-tile__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.mini { display: block; width: 100%; height: auto; overflow: visible; }
.mini__line { fill: none; stroke: var(--brand); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.mini__g0 { stop-color: var(--brand); stop-opacity: 0.22; } .mini__g1 { stop-color: var(--brand); stop-opacity: 0; }
.mini__dot { fill: var(--brand); }
.mini__last { fill: var(--canvas); stroke: var(--brand); stroke-width: 3; }
.mini__label { fill: var(--ink-2); font: 500 12.5px var(--font-sans); }
.mini__empty { fill: var(--ink-2); font: 500 14px var(--font-sans); }
.visits { list-style: none; margin: 0; padding: 4px 18px; }
.visits li { display: grid; grid-template-columns: 1fr auto 14px; gap: 14px; align-items: center; min-height: 52px; font-size: 16px; }
.visits li + li { border-top: 1px solid var(--line); }
.visits strong { font-weight: 700; font-variant-numeric: tabular-nums; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-2); }
.dot.is-ok { background: var(--ok); } .dot.is-watch { background: var(--watch); } .dot.is-act { background: var(--act); }
.empty { text-align: center; padding: 30px 8px 10px; display: grid; justify-items: center; }
.empty .art { width: 150px; height: 100px; margin-bottom: 12px; background: var(--tile); }
.empty h2 { margin: 0 0 6px; font: 800 24px/1.2 var(--font-sans); letter-spacing: -0.02em; }
.empty p { margin: 0 0 18px; color: var(--ink-2); max-width: 30ch; }
.empty .cta { width: 100%; }

/* before / after slider */
.ba { position: absolute; inset: 0; --pos: 50%; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba .ba__after { clip-path: inset(0 0 0 var(--pos)); }
.ba__line { position: absolute; top: 0; bottom: 0; left: var(--pos); border-left: 2px solid #fff; pointer-events: none; }
.ba__knob { position: absolute; top: 50%; left: 0; width: 44px; height: 44px; margin: -22px 0 0 -23px; border-radius: 50%; background: #fff; color: #0B0B0C; display: grid; place-items: center; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25); }
.ba__tag { position: absolute; bottom: 12px; padding: 6px 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.6); color: #fff; font: 600 13.5px/1 var(--font-sans); }
.ba__tag--l { left: 12px; } .ba__tag--r { right: 12px; }
.ba__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }

/* ---------- Floating capsule tab bar (2 tabs) ---------- */
.tabbar { position: fixed; z-index: 50; left: 50%; transform: translateX(-50%); bottom: max(16px, env(safe-area-inset-bottom)); display: flex; gap: 4px; padding: 6px;
  border-radius: 999px; background: color-mix(in srgb, var(--canvas) 86%, transparent); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12); }
.tabbar a { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 22px; border-radius: 999px; color: var(--ink); text-decoration: none; font: 600 16px/1 var(--font-sans); }
.tabbar a .ui-icon { width: 22px; height: 22px; }
.tabbar a[aria-current="page"] { background: var(--ink); color: var(--canvas); }
.tabbar .count { min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 999px; background: var(--brand); color: #fff; font: 700 12px/20px var(--font-sans); text-align: center; }
body[data-view="analyze"] .tabbar { display: none; }

/* ---------- Sheets, fields, settings ---------- */
.ui-sheet { background: var(--canvas); border-radius: 28px; }
@media (max-width: 699px) { .ui-sheet { border-radius: 28px 28px 0 0; } }
.ui-sheet__title { font: 700 17px/1.2 var(--font-sans); }
.ui-button { border-radius: 999px; font-family: var(--font-sans); }
.ui-button--plain { color: var(--ink); font-weight: 600; }
.label { display: block; margin: 16px 2px 8px; font: 600 15px/1.2 var(--font-sans); }
.field { width: 100%; box-sizing: border-box; min-height: 54px; padding: 14px 16px; border: 0; border-radius: 16px; background: var(--tile); color: var(--ink); font: 400 17px/1.3 var(--font-sans); }
textarea.field { min-height: 96px; resize: vertical; }
.field:focus { outline: 2px solid var(--ink); }
.field[aria-invalid="true"] { outline: 2px solid var(--act); }
.field-err { margin: 6px 2px 0; color: var(--act-text); font-size: 14.5px; }
.lede-sm { margin: 0 0 14px; font-size: 16.5px; color: var(--ink-2); }
.summary { display: grid; gap: 4px; padding: 16px 18px; }
.pick { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.pick__row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 0; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.pick__row span { display: grid; flex: 1; } .pick__row small { color: var(--ink-2); }
.set-row { display: grid; gap: 8px; margin: 6px 0 16px; font-weight: 600; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 999px; background: var(--tile); }
.seg button { min-height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font: 600 15px/1 var(--font-sans); cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--canvas); color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); }
.ui-alert { background: var(--canvas); border-radius: 24px; }
.ui-toast { border-radius: 999px !important; }

@media (min-width: 700px) {
  .display { font-size: 48px; }
  .hero__num { font-size: 120px; }
  .how__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .how__item { grid-template-columns: 1fr; }
  .cta { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .view, .ticks li { animation: none; }
  .photo.is-scanning .scan { animation: none; transform: none; opacity: 0.6; }
  .ticks .is-wait:first-child .tick { animation: none; }
}

.photo img.is-cover { object-fit: cover; }
.tabbar a { white-space: nowrap; padding: 0 20px; }
.crack-card .hero { flex-wrap: nowrap; }
.cards li, .crack-card { min-width: 0; }
.crack-card__bottom { flex-wrap: wrap; row-gap: 10px; }
.chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* ---------- iPad and desktop: wider page, two blocks, tab bar in the header ---------- */
.split__a, .split__b { display: contents; }
.split { display: flex; flex-direction: column; }
.o1 { order: 1; } .o2 { order: 2; } .o3 { order: 3; } .o4 { order: 4; } .o5 { order: 5; } .o6 { order: 6; } .o7 { order: 7; } .o8 { order: 8; }
@media (min-width: 900px) {
  .topbar, .page { max-width: 1080px; }
  .page { padding-left: 32px; padding-right: 32px; padding-bottom: 64px; }
  .topbar { padding-left: 32px; padding-right: 32px; }
  .tabbar { top: 12px; bottom: auto; box-shadow: none; }
  .split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: start; }
  .split__a, .split__b { display: flex; flex-direction: column; min-width: 0; }
  .split__a { position: sticky; top: 24px; }
  .split .o1, .split .o2, .split .o3, .split .o4, .split .o5, .split .o6, .split .o7, .split .o8 { order: 0; }
  .split__b > .block:first-child, .split__b > .kicker:first-child { margin-top: 0; }
  #view-measure .display { max-width: 18ch; font-size: 56px; }
  #view-measure .lede { max-width: 40rem; }
  #view-measure .cta { max-width: 560px; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  #view-cracks .cta { max-width: 420px; }
  .hero__num { font-size: 112px; }
  .an-head, .ex-strip { max-width: none; }
}
@media (min-width: 700px) and (max-width: 899px) {
  .topbar, .page { max-width: 720px; }
}
.art__accent-line { fill: none; stroke: var(--brand); stroke-width: 2.2; }
.art__ring { fill: none; stroke: var(--brand); stroke-width: 2; stroke-dasharray: 4 5; }
.precision { padding: 16px 18px; margin: 4px 0 8px; }
.precision strong { display: block; font-size: 17px; margin-bottom: 4px; }
.precision p { margin: 0 0 4px; font-size: 15px; color: var(--ink-2); }
.precision .link-btn { color: var(--brand-text); }
.inline-link { color: var(--brand-text); font-weight: 600; }
.pro { padding: 20px 20px 12px; margin: 28px 0 16px; }
.pro__title { margin: 0 0 6px; font: 800 20px/1.2 var(--font-sans); letter-spacing: -0.01em; }
.pro p { margin: 0 0 12px; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.pro__steps { margin: 0 0 6px; padding-left: 22px; font-size: 15px; line-height: 1.45; color: var(--ink); }
.pro__steps li + li { margin-top: 6px; }
.pro__steps li::marker { color: var(--brand-text); font-weight: 700; }
.pro .link-btn { color: var(--brand-text); }
.photo--free { aspect-ratio: auto; margin-left: auto; margin-right: auto; background: #111; }
.photo--free img { object-fit: fill; }
.cands { position: absolute; inset: 0; width: 100%; height: 100%; }
.cand { cursor: pointer; outline: none; }
.cand__hit { fill: none; stroke: transparent; stroke-width: 44; stroke-linecap: round; stroke-linejoin: round; pointer-events: stroke; }
.cand__halo { fill: none; stroke: rgba(0, 0, 0, 0.45); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.cand__line { fill: none; stroke: #fff; stroke-width: 4; stroke-dasharray: 10 10; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.cand.is-on .cand__line { stroke: var(--brand); stroke-dasharray: none; stroke-width: 6; }
.cand__seg { stroke-width: 6; stroke-linecap: round; pointer-events: none; }
.cand:focus-visible .cand__halo { stroke: var(--brand); stroke-opacity: 0.5; }
.pick-hint { display: flex; align-items: center; gap: 8px; margin: 10px 4px 0; font: 600 15px/1.3 var(--font-sans); }
.pick-hint .ui-icon { width: 18px; height: 18px; color: var(--brand-text); }
@media (min-width: 900px) { .split .cta { grid-template-columns: 1fr; } }
.lang { padding: 2px; }
.lang button { height: 44px; }

/* ---------- measurement stations (vector, over the clean photo) ---------- */
.cands--clean .cand:not(.is-on) .cand__line { stroke: rgba(255, 255, 255, 0.7); }
.cands--clean .cand:not(.is-on) .cand__halo { stroke: rgba(0, 0, 0, 0.25); }
.st { pointer-events: none; }
.st__lead { stroke: rgba(255, 255, 255, 0.8); stroke-linecap: round; }
.st__dot { fill: #fff; stroke: rgba(0, 0, 0, 0.55); }
.st__id { fill: #111; font-family: var(--font-sans); font-weight: 800; }
.st__txt { fill: #fff; font-family: var(--font-sans); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
  stroke: rgba(0, 0, 0, 0.45); paint-order: stroke; stroke-linejoin: round; }
.st__under { stroke-linecap: round; }
.st__pin.is-max .st__txt { font-weight: 700; }
.st__pin.is-max .st__dot { fill: var(--brand); stroke: #fff; }
.st__pin.is-max .st__id { fill: #fff; }
.st__pin.is-sig .st__under { stroke: var(--act); }
.stations-box { padding: 14px 16px 10px; margin-top: 12px; }
.stations__title { margin: 0 0 6px; font: 600 15px/1.2 var(--font-sans); color: var(--ink-2); }
.stations { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.stations li { display: flex; align-items: center; gap: 12px; min-height: 36px; }
.stations__id { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 800 13px/1 var(--font-sans);
  background: var(--canvas); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink-2); }
.stations__id.is-max { background: var(--brand); color: #fff; box-shadow: none; }
.stations__v { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-size: 16px; font-variant-numeric: tabular-nums; }
.stations__v strong { font-weight: 700; }
.stations__v small { font-size: 13.5px; }
.stations__v .muted, .stations__v small.muted { color: var(--ink-2); }
.stations__v .is-act { color: var(--act-text); font-weight: 700; }
.stations-box .fine { margin: 6px 0 0; }

.cmp-line { display: flex; gap: 10px; align-items: center; margin: 10px 4px 0; font-size: 16px; color: var(--ink); }
.cmp-line .verdict__dot { width: 10px; height: 10px; margin: 0; }
.cmp-line.is-ok .verdict__dot { background: var(--ok); } .cmp-line.is-act .verdict__dot { background: var(--act); }
