/* Logga — app styles. CSS custom properties are populated at runtime from
   src/skin/theme.js (THEMES / RADIUS / TARGETS) — no colour or radius is hard-coded
   here outside of that contract. */

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%;
  background: #0b0c0e;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }

.num { font-variant-numeric: tabular-nums; }
[data-appearance="dark"] .num { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

:focus-visible { outline: 2px solid var(--accentText); outline-offset: 2px; }

/* ── page shell ── */
.page {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0b0c0e;
  background-image: radial-gradient(ellipse at top, #1b1d22 0%, #0b0c0e 60%);
}

/* ── demo bar (outside the app, always visually distinct) ── */
.demoBar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: #16181d;
  border-bottom: 1px solid #24272e;
  position: sticky; top: 0; z-index: 50;
}
.demoBar__brand { display: flex; align-items: center; gap: 8px; color: #f2f1ed; font-weight: 700; letter-spacing: .01em; margin-right: 6px; }
.demoBar__brand small { display: block; color: #7a7f8a; font-weight: 500; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.demoBar__group { display: flex; align-items: center; gap: 6px; background: #1e2026; border: 1px solid #2b2e36; border-radius: 999px; padding: 4px; }
.demoBar__persona {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; border: none; background: transparent; color: #b7bcc6;
  font-size: 12.5px; font-weight: 600; min-height: 32px;
}
.demoBar__persona[aria-pressed="true"] { background: #30e88b; color: #07130c; }
.demoBar__theme {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px; border: none; background: #262932; color: #eef1f5;
  font-size: 12.5px; font-weight: 600; min-height: 32px;
}
.demoBar__theme svg { width: 15px; height: 15px; }
.demoBar__label { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #6c7180; padding: 0 4px; }

/* ── phone stage ── */
.phoneStage { padding: 16px; width: 100%; display: flex; justify-content: center; }
.phone {
  width: 390px; height: min(780px, calc(100dvh - 32px));
  background: var(--bg);
  border-radius: 46px;
  border: 10px solid #0a0a0a;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.04);
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column;
  color: var(--ink);
}
.phone::before { /* notch */
  content: ""; position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 24px; background: #0a0a0a; border-radius: 14px; z-index: 40;
}

.statusBar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 26px 4px; font-size: 14px; font-weight: 600; color: var(--ink); flex-shrink: 0;
}
.statusBar__battery { display: flex; align-items: center; gap: 4px; }
.statusBar__battery svg { width: 22px; height: 11px; }

.screen {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 6px 18px 18px;
  animation: screenIn .22s ease both;
}
@keyframes screenIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.tabBar {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-around;
  padding: 8px 10px calc(env(safe-area-inset-bottom, 0px) + 10px);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.tabBtn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; padding: 4px 8px; min-width: var(--target-min); min-height: var(--target-min);
  color: var(--muted); font-size: 10.5px; font-weight: 600; border-radius: var(--radius-control);
}
.tabBtn svg { width: 22px; height: 22px; }
.tabBtn[aria-current="true"] { color: var(--accentText); }
.tabBtn--capture {
  width: var(--target-capture); height: var(--target-capture);
  border-radius: 50%;
  background: var(--accent); color: var(--onAccent);
  display: flex; align-items: center; justify-content: center;
  margin-top: -26px;
  box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--accent) 70%, transparent);
  border: 4px solid var(--bg);
}
.tabBtn--capture svg { width: 26px; height: 26px; }

/* ── common building blocks ── */
.h1 { font-size: 24px; font-weight: 800; margin: 10px 0 2px; letter-spacing: -.01em; }
.h2 { font-size: 17px; font-weight: 750; margin: 0 0 8px; }
.sub { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; line-height: 1.4; }
.eyebrow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-panel);
  padding: 14px; margin-bottom: 12px;
}
.card--tap { display: block; width: 100%; text-align: left; }
.card--tap:active { transform: scale(.99); }

.rows { display: flex; flex-direction: column; gap: 10px; }

.statGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.statTile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-panel); padding: 12px 8px; text-align: center; }
.statTile__n { font-size: 21px; font-weight: 800; }
.statTile__l { font-size: 10.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }

/* ── Home quick-action squares (replace the old Home stat-tile row) — the three core
   actions are the biggest things on screen when the app opens ── */
.actionGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.actionSq {
  display: flex; flex-direction: column; align-items: flex-start; gap: 9px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-panel);
  padding: 12px 11px; min-height: 96px; text-align: left; color: var(--ink);
}
.actionSq:active { transform: scale(.98); }
.actionSq__icn {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: color-mix(in srgb, var(--accent) 14%, var(--soft)); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.actionSq__icn svg { width: 19px; height: 19px; }
.actionSq__l { font-size: 12.5px; font-weight: 750; line-height: 1.25; }
.actionSq--primary { background: var(--accentBtn); border-color: transparent; color: var(--onAccent); }
.actionSq--primary:active { background: var(--accentDeep); }
.actionSq--primary .actionSq__icn { background: color-mix(in srgb, var(--onAccent) 20%, transparent); color: var(--onAccent); }

/* Home dashboard (2026-07-15) — the SAME 5-tile report the Export screen shows (reuses
   .statTile for a visually-identical look), below the squares, tappable through to the
   full report. 3-then-2 layout on a 6-col grid so no cell sits empty (unlike .statGrid's
   plain 3-col, which leaves one empty on a 5-tile set) — the top 3 tiles span 2 cols each,
   the bottom 2 span 3 cols each. */
.homeStatsCard { display: block; width: 100%; text-align: left; background: none; border: none; padding: 0; margin-bottom: 14px; }
.homeStatsCard:active { transform: scale(.99); }
.homeStatsGrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.homeStatsGrid .statTile:nth-child(-n+3) { grid-column: span 2; }
.homeStatsGrid .statTile:nth-child(n+4) { grid-column: span 3; }

.banner { border-radius: var(--radius-panel); padding: 13px 14px; margin-bottom: 14px; border: 1px solid var(--line); }
.banner--neutral { background: var(--soft); }
.banner--warn { background: var(--warnBg); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.banner--bad { background: var(--badBg); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.banner__top { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; margin-bottom: 3px; }
.banner__top svg { width: 16px; height: 16px; flex-shrink: 0; }
.banner p { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.banner .linklike { margin-top: 2px; }

/* compact trial chip — the everyday "still in trial" state (full banners stay for the
   day-75 export nudge and the lapsed state) */
.trialChip {
  display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap;
  background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius-control);
  padding: 9px 13px; margin-bottom: 14px;
}
.trialChip__l { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--ink); }
.trialChip__l svg { width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; }
.trialChip .linklike { min-height: auto; padding: 0; font-size: 12.5px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--target-min); padding: 0 18px; border-radius: var(--radius-control);
  border: none; font-weight: 700; font-size: 14.5px; width: 100%;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--accentBtn); color: var(--onAccent); }
.btn--primary:active { background: var(--accentDeep); }
.btn--ghost { background: var(--soft); color: var(--ink); }
.btn--outline { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn--danger { background: var(--badBg); color: var(--bad); }
.btn--sm { min-height: var(--target-min); font-size: 13px; padding: 0 14px; width: auto; }
.btn--capture { min-height: var(--target-capture); font-size: 16px; }
.btn[disabled] { opacity: .5; }

.linklike { background: none; border: none; padding: 4px 0; color: var(--accentText); font-weight: 700; font-size: 13px; min-height: var(--target-min); display: inline-flex; align-items: center; gap: 4px; }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.chip--active { background: var(--goodBg); color: var(--good); }
.chip--done { background: var(--soft); color: var(--muted); }
.chip--warn { background: var(--warnBg); color: var(--warn); }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius-control);
  padding: 11px 12px; font-size: 14.5px; color: var(--ink); min-height: var(--target-min);
}
.field textarea { min-height: 72px; resize: vertical; }
/* Explicit placeholder colour = --muted at full opacity. The browser default fades the
   placeholder to ~54%, which fails AA against the field bg; --muted on --soft is gate-verified. */
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }
.field__hint { font-size: 11px; color: var(--muted); margin-top: 4px; }
.field__confidence { font-size: 10.5px; font-weight: 700; margin-top: 4px; display: inline-block; padding: 2px 7px; border-radius: 999px; }
.field__confidence--high { background: var(--goodBg); color: var(--good); }
.field__confidence--med { background: var(--warnBg); color: var(--warn); }
.field__confidence--low { background: var(--badBg); color: var(--bad); }

/* Inline "field + button" row — used by the Saved-jobs "+ Add a job name" input. */
.addRow { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.addRow .field { flex: 1; margin-bottom: 0; }
.addRow .btn { width: auto; padding: 0 16px; }

.catGrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
.catBtn { padding: 12px 8px; border-radius: var(--radius-control); border: 1.5px solid var(--line); background: var(--soft); font-size: 12.5px; font-weight: 700; min-height: var(--target-min); }
.catBtn[aria-pressed="true"] { border-color: var(--accent); background: var(--soft); color: var(--accentText); }

.list-empty { text-align: center; padding: 30px 10px; color: var(--muted); font-size: 13px; }

.activity {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.activity:last-child { border-bottom: none; }
.activity__icn { width: 32px; height: 32px; border-radius: 10px; background: var(--soft); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--accent); }
.activity__icn svg { width: 16px; height: 16px; }
.activity__body { flex: 1; min-width: 0; }
.activity__t { font-size: 13.5px; font-weight: 700; }
.activity__s { font-size: 12px; color: var(--muted); margin-top: 1px; }
.activity__d { font-size: 11px; color: var(--muted); white-space: nowrap; margin-left: 6px; }

.doctrine { display: flex; gap: 8px; padding: 11px 12px; background: var(--soft); border-radius: var(--radius-control); margin: 4px 0 14px; }
.doctrine svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--muted); margin-top: 1px; }
.doctrine p { margin: 0; font-size: 11.5px; line-height: 1.45; color: var(--muted); }

.priceLine { font-size: 30px; font-weight: 800; }
.priceLine small { font-size: 13px; font-weight: 600; color: var(--muted); }

.gstBadge { font-size: 10.5px; font-weight: 700; color: var(--muted); background: var(--soft); padding: 3px 8px; border-radius: 999px; display: inline-block; margin-top: 6px; }

.recordDot { width: 9px; height: 9px; border-radius: 50%; background: var(--bad); animation: pulse 1.4s ease infinite; flex-shrink: 0; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }

.kmCounter { text-align: center; padding: 18px 0 6px; }
.kmCounter__n { font-size: 52px; font-weight: 800; letter-spacing: -.01em; line-height: 1; }
.kmCounter__u { font-size: 14px; color: var(--muted); font-weight: 700; margin-top: 4px; }
.kmCounter__elapsed { font-size: 13px; color: var(--muted); margin-top: 10px; font-weight: 600; }

.checklistRow { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); }
.checklistRow:last-child { border-bottom: none; }
.checklistRow__l { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 650; }
.checklistRow__l svg { width: 17px; height: 17px; color: var(--accent); }
.checklistRow__n { font-size: 12.5px; color: var(--muted); font-weight: 700; }

.successCheck { width: 56px; height: 56px; border-radius: 50%; background: var(--goodBg); color: var(--good); display: flex; align-items: center; justify-content: center; margin: 8px auto 14px; }
.successCheck svg { width: 28px; height: 28px; }

/* ── sheet / modal ── */
.scrim { position: absolute; inset: 0; background: rgba(0,0,0,.45); z-index: 60; opacity: 0; animation: scrimIn .18s ease forwards; }
@keyframes scrimIn { to { opacity: 1; } }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 61;
  max-height: 88%; background: var(--bg); border-radius: 22px 22px 0 0;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column;
  transform: translateY(100%); animation: sheetUp .24s cubic-bezier(.2,.8,.3,1) forwards;
  box-shadow: 0 -20px 40px -20px rgba(0,0,0,.5);
}
@keyframes sheetUp { to { transform: translateY(0); } }
.sheet__grab { width: 36px; height: 4px; background: var(--line); border-radius: 999px; margin: 10px auto 2px; flex-shrink: 0; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px 4px; flex-shrink: 0; }
.sheet__head h3 { margin: 0; font-size: 16.5px; font-weight: 800; }
.sheet__close { position: relative; width: 30px; height: 30px; border-radius: 50%; background: var(--soft); border: none; display: flex; align-items: center; justify-content: center; color: var(--muted); }
/* 30px visual, 44px tap target */
.sheet__close::before { content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: var(--target-min); height: var(--target-min); }
.sheet__close svg { width: 15px; height: 15px; }
.sheet__body { padding: 8px 18px 22px; overflow-y: auto; }

.sheetOption { display: flex; align-items: center; gap: 13px; width: 100%; padding: 14px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-panel); margin-bottom: 10px; text-align: left; min-height: 60px; }
.sheetOption__icn { width: 40px; height: 40px; border-radius: 12px; background: var(--soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sheetOption__icn svg { width: 20px; height: 20px; }
.sheetOption__t { font-weight: 750; font-size: 14.5px; }
.sheetOption__s { font-size: 12px; color: var(--muted); margin-top: 1px; }
.sheetOption__chev { margin-left: auto; color: var(--muted); flex-shrink: 0; }
.sheetOption__chev svg { width: 16px; height: 16px; }

.scanning { display: flex; flex-direction: column; align-items: center; padding: 46px 10px; gap: 16px; }
.scanning__ring { width: 56px; height: 56px; border-radius: 50%; border: 3px solid var(--soft); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.scanning__thumb { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius-panel); border: 1px solid var(--line); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── real receipt scanner: capture choice, OCR progress, thumbnails ── */
.captureChoice { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.captureChoice__btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--target-capture); padding: 0 18px; border-radius: var(--radius-control);
  background: var(--soft); color: var(--ink); font-weight: 700; font-size: 14.5px;
  border: 1.5px solid var(--line); cursor: pointer;
}
.captureChoice__btn--primary { background: var(--accentBtn); color: var(--onAccent); border-color: transparent; }
.captureChoice__btn svg { width: 20px; height: 20px; }

.ocrProgress { width: 100%; max-width: 220px; height: 6px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.ocrProgress__bar { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .25s ease; }

.receiptThumb { width: 46px; height: 46px; border-radius: var(--radius-control); background: var(--soft); display: flex; align-items: center; justify-content: center; color: var(--muted); overflow: hidden; flex-shrink: 0; }
.receiptThumb img { width: 100%; height: 100%; object-fit: cover; }
.receiptThumb--empty { color: var(--muted); }
.receiptThumb--lg { width: 100%; height: 180px; border-radius: var(--radius-panel); margin-bottom: 14px; object-fit: cover; background: var(--soft); }

.activity__icn--thumb { overflow: hidden; padding: 0; }
.activity__icn--thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }

.rowActions { display: flex; gap: 6px; margin-top: 8px; }
.iconBtn { position: relative; width: 32px; height: 32px; border-radius: var(--radius-control); background: var(--soft); border: none; color: var(--muted); display: flex; align-items: center; justify-content: center; }
/* keep the 32px visual chip, expand the tap target to TARGETS.min (44px) with an invisible overlay */
.iconBtn::before { content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: var(--target-min); height: var(--target-min); }
.iconBtn svg { width: 15px; height: 15px; }
.iconBtn--danger { color: var(--bad); }

/* ── toast ── */
.toast {
  position: absolute; left: 18px; right: 18px; bottom: 92px; z-index: 80;
  background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: var(--radius-control);
  font-size: 13px; font-weight: 650; text-align: center;
  transform: translateY(20px); opacity: 0; pointer-events: none;
  transition: transform .22s ease, opacity .22s ease;
  box-shadow: 0 12px 24px -8px rgba(0,0,0,.4);
}
.toast--show { transform: translateY(0); opacity: 1; }

/* ── onboarding ── */
.ob { position: absolute; inset: 0; z-index: 30; background: var(--bg); display: flex; flex-direction: column; }
.ob__skip { position: absolute; top: 46px; right: 18px; z-index: 5; }
.ob__body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 30px 24px; text-align: center; overflow-y: auto; }
.ob__mark { width: 64px; height: 64px; border-radius: 20px; background: var(--accent); color: var(--onAccent); display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.ob__mark svg { width: 32px; height: 32px; }
.ob__title { font-size: 25px; font-weight: 800; margin: 0 0 8px; letter-spacing: -.01em; }
.ob__body p.sub { text-align: center; margin: 0 auto 20px; max-width: 300px; }
.ob__foot { padding: 16px 24px calc(env(safe-area-inset-bottom, 0px) + 22px); flex-shrink: 0; }
.ob__dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 14px; }
.ob__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.ob__dot[aria-current="true"] { background: var(--accent); width: 18px; border-radius: 4px; }
.ob__nameField { max-width: 280px; margin: 6px auto 0; text-align: left; }

.personaGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: left; margin-top: 4px; }
.personaTile { border: 1.5px solid var(--line); background: var(--card); border-radius: var(--radius-panel); padding: 14px 12px; min-height: 108px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; }
.personaTile__icn { width: 34px; height: 34px; border-radius: 10px; background: var(--soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.personaTile__icn svg { width: 18px; height: 18px; }
.personaTile__t { font-size: 13.5px; font-weight: 750; }
.personaTile[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--card)); }

.vehicleGrid { display: flex; flex-direction: column; gap: 8px; text-align: left; margin-top: 4px; }
.vehicleRow { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line); background: var(--card); border-radius: var(--radius-panel); padding: 12px 14px; min-height: var(--target-min); text-align: left; }
.vehicleRow__icn { width: 34px; height: 34px; border-radius: 10px; background: var(--soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.vehicleRow__icn svg { width: 17px; height: 17px; }
.vehicleRow[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--card)); }

.detailHead { margin-bottom: 8px; }
.detailHead__row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.backRow { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 700; font-size: 13px; padding: 6px 0; min-height: var(--target-min); }
.backRow svg { width: 16px; height: 16px; }

.switchRow { display: flex; align-items: center; justify-content: space-between; padding: 12px 2px; }
.switchRow__t { font-size: 13.5px; font-weight: 700; }
.switchRow__s { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.toggle { width: 44px; height: 26px; border-radius: 999px; background: var(--line); border: none; position: relative; flex-shrink: 0; }
/* 26px visual track, 44px tall tap target */
.toggle::before { content: ""; position: absolute; top: 50%; left: 0; transform: translateY(-50%); width: 100%; height: var(--target-min); }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s ease; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.toggle[aria-pressed="true"] { background: var(--accent); }
.toggle[aria-pressed="true"]::after { transform: translateX(18px); }

.sectionGap { height: 6px; }

/* ── responsive: fill the screen on a narrow / mobile viewport ── */
@media (max-width: 720px) {
  .phoneStage { padding: 0; }
  .phone {
    width: 100%; height: 100dvh;
    border-radius: 0; border: none; box-shadow: none;
  }
  .phone::before { display: none; }
  .demoBar { position: sticky; }
}

/* ── demo bar: collapse to a compact single wrapping row when vertical space is tight
   or the viewport is narrow, so it never pushes the onboarding CTA below the fold ── */
@media (max-height: 700px), (max-width: 480px) {
  .demoBar { gap: 6px 8px; padding: 6px 10px; }
  .demoBar__brand { font-size: 12.5px; margin-right: 2px; }
  .demoBar__brand small { display: none; }
  .demoBar__group { padding: 3px; gap: 4px; }
  .demoBar__persona { padding: 4px 9px; font-size: 11.5px; min-height: 28px; }
  .demoBar__theme { padding: 4px 10px; font-size: 11.5px; min-height: 28px; }
}

/* ── reduced motion ── neutralise the screen/sheet/scrim entrances and the two infinite
   loops (scanner ring, record dot) for users who ask for less motion. Everything still
   RESOLVES to its resting, fully-visible state — never left mid-transition or off-screen. */
@media (prefers-reduced-motion: reduce) {
  .screen { animation: none; }
  .sheet { animation: none; transform: none; }        /* base transform is translateY(100%) — must reset or the sheet stays off-screen */
  .scrim { animation: none; opacity: 1; }              /* base opacity is 0 — must reset or the scrim is invisible */
  .scanning__ring { animation: none; }                 /* static ring instead of an infinite spin */
  .recordDot { animation: none; }                      /* still a solid red dot, just not pulsing */
  .toast { transition: opacity .12s ease; }            /* fade only, no slide-up */
}
