[hidden] { display: none !important; }
/* Shopper Profit IQ styles. Mobile first, iPhone safe areas, light and dark themes. */
:root {
  --bg: #edf1ee;
  --surface: #ffffff;
  --surface-2: #f5f8f6;
  --ink: #102a2b;
  --ink-2: #4b605f;
  --line: #d2dcd7;
  --brand: #1f6f5c;
  --brand-ink: #ffffff;
  --focus: #1d5fd6;
  --sign-green: #0a6b3f;
  --sign-yellow: #ffcc1a;
  --sign-red: #b8232b;
  --sign-gray: #e4e9e7;
  --below: #a8231d; --below-bg: #fbe8e6;
  --min: #8a5a00; --min-bg: #fff0cf;
  --pref: #11663a; --pref-bg: #e1f3e7;
  --unk: #56676a; --unk-bg: #e9eeed;
  --warn-bg: #fff6d6; --warn-ink: #5b4300;
  --radius-lg: 18px; --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 0 rgba(16, 42, 43, 0.06), 0 6px 18px -10px rgba(16, 42, 43, 0.25);
  --font: "Barlow", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-num: "Barlow Semi Condensed", "Barlow", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --nav-h: 64px;
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1b1c; --surface: #152526; --surface-2: #1b2e2f; --ink: #e2ebe7; --ink-2: #9fb2ae; --line: #2a3f40;
    --brand: #4fb597; --brand-ink: #062019; --focus: #8ab4ff;
    --sign-gray: #2a3a3b;
    --below: #ff8f85; --below-bg: #3a1f1c; --min: #f3c46a; --min-bg: #352a12; --pref: #7fd9a0; --pref-bg: #15321f;
    --unk: #a9b8b5; --unk-bg: #223233; --warn-bg: #3a3112; --warn-ink: #f6dc8a;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 8px 20px -12px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1b1c; --surface: #152526; --surface-2: #1b2e2f; --ink: #e2ebe7; --ink-2: #9fb2ae; --line: #2a3f40;
  --brand: #4fb597; --brand-ink: #062019; --focus: #8ab4ff;
  --sign-gray: #2a3a3b;
  --below: #ff8f85; --below-bg: #3a1f1c; --min: #f3c46a; --min-bg: #352a12; --pref: #7fd9a0; --pref-bg: #15321f;
  --unk: #a9b8b5; --unk-bg: #223233; --warn-bg: #3a3112; --warn-ink: #f6dc8a;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 8px 20px -12px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  min-height: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- layout ---------- */
.app-top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.app-top-inner { max-width: 760px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 10px; }
.brand { font-family: var(--font-num); font-weight: 700; font-size: 20px; letter-spacing: 0.2px; margin: 0; }
.brand span { color: var(--brand); }
.top-status { margin-left: auto; font-size: 13px; color: var(--ink-2); text-align: right; }
.demo-banner { background: var(--sign-yellow); color: #1a1400; font-weight: 600; font-size: 14px; text-align: center; padding: 6px 12px; }
main { max-width: 760px; margin: 0 auto; padding: 14px 14px calc(var(--nav-h) + 96px); }
.screen-title { font-family: var(--font-num); font-weight: 700; font-size: 30px; line-height: 1.1; margin: 6px 2px 2px; }
.screen-sub { margin: 0 2px 14px; color: var(--ink-2); font-size: 15px; }
.stack > * + * { margin-top: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 620px) { .grid-wide { grid-template-columns: repeat(3, 1fr); } }

/* ---------- panels ---------- */
.panel { background: var(--surface); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow); }
.panel.flat { box-shadow: none; border: 1px solid var(--line); }
.panel h2 { font-family: var(--font-num); font-size: 21px; font-weight: 700; margin: 0 0 10px; line-height: 1.2; }
.panel h3 { font-size: 16px; font-weight: 600; margin: 14px 0 6px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.panel-head h2 { margin-bottom: 8px; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.tiny { font-size: 13px; }
.note { font-size: 14px; color: var(--ink-2); margin: 8px 0 0; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ---------- metrics ---------- */
.metric { background: var(--surface-2); border-radius: var(--radius); padding: 10px 12px; min-width: 0; }
.metric .k { font-size: 13px; color: var(--ink-2); line-height: 1.25; }
.metric .v { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 24px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.metric .d { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.metric .v.txt { font-size: 17px; font-family: var(--font); line-height: 1.25; padding-top: 3px; }
.rate-na { opacity: .55; }
.metric.wide { grid-column: 1 / -1; }

/* ---------- shift clock ---------- */
.clock { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.clock .big { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 54px; font-weight: 700; line-height: 1; letter-spacing: -0.5px; }
.clock .lbl { font-size: 13px; color: var(--ink-2); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-2); }
.pill.on .dot { background: #19a35b; box-shadow: 0 0 0 3px color-mix(in srgb, #19a35b 25%, transparent); }
.pill.pause .dot { background: #d99a00; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 18px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); font-weight: 600; font-size: 16px; cursor: pointer; text-decoration: none;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: transparent; }
.btn.danger { color: var(--below); border-color: color-mix(in srgb, var(--below) 40%, var(--line)); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--brand); padding-left: 8px; padding-right: 8px; }
.btn.sm { min-height: 40px; padding: 6px 12px; font-size: 15px; border-radius: 11px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.row > .grow { flex: 1 1 0; }

/* ---------- segmented and chips ---------- */
.seg { display: flex; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 3px; border: 1px solid var(--line); }
.seg button { flex: 1; min-height: 40px; border: 0; background: transparent; border-radius: 9px; font-weight: 600; font-size: 14.5px; cursor: pointer; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 38px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14.5px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span, .field > label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--ink-2); font-weight: 400; }
.input, .field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface-2); font-size: 17px; font-variant-numeric: tabular-nums;
}
.field textarea { min-height: 88px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.field.big input { font-family: var(--font-num); font-size: 28px; font-weight: 700; min-height: 58px; }
.field.invalid input, .field.invalid select { border-color: var(--below); }
.field .err { color: var(--below); font-size: 13px; font-weight: 600; }
.money-in { position: relative; }
.money-in::before { content: "$"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-2); font-weight: 600; pointer-events: none; }
.money-in input { padding-left: 26px; }
.field.big .money-in::before { font-size: 22px; }
.field.big .money-in input { padding-left: 30px; }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; font-weight: 600; }
.check input { width: 22px; height: 22px; accent-color: var(--brand); }
details.more { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 4px; }
details.more > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; color: var(--brand); list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: "+"; margin-left: auto; font-size: 22px; font-weight: 500; }
details.more[open] > summary::after { content: "×"; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }

/* ---------- verdict: the road sign ---------- */
.sign {
  --plate: var(--sign-gray); --plate-ink: var(--ink);
  background: var(--plate); color: var(--plate-ink);
  border-radius: 16px; padding: 7px;
}
.sign-inner {
  border: 3px solid currentColor; border-radius: 11px; padding: 12px 14px 12px;
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 4px 12px;
}
.sign.below { --plate: var(--sign-red); --plate-ink: #ffffff; }
.sign.minimum { --plate: var(--sign-yellow); --plate-ink: #1a1400; }
.sign.preferred { --plate: var(--sign-green); --plate-ink: #ffffff; }
.sign .rate { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 58px; line-height: 0.95; letter-spacing: -1px; }
.sign .rate small { font-size: 22px; font-weight: 600; letter-spacing: 0; margin-left: 2px; }
.sign .label { font-family: var(--font-num); font-weight: 700; font-size: 21px; line-height: 1.1; text-align: right; }
.sign .sub { grid-column: 1 / -1; font-size: 14.5px; font-weight: 500; opacity: 0.95; }
.sign.compact .rate { font-size: 34px; }
.sign.compact .label { font-size: 16px; }
.sign.compact .sign-inner { padding: 8px 10px; }
.sign.compact { padding: 5px; border-radius: 13px; }
.sign.compact .sign-inner { border-width: 2px; border-radius: 9px; }
.sticky-verdict { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 54px); z-index: 10; margin: 0 -2px 12px; }
.sticky-verdict .sign { box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.5); }

.gauge { position: relative; height: 34px; margin: 14px 4px 4px; }
.gauge .track { position: absolute; left: 0; right: 0; top: 12px; height: 10px; border-radius: 6px; overflow: hidden; display: flex; }
.gauge .track i { display: block; height: 100%; }
.gauge .z1 { background: var(--below-bg); } .gauge .z2 { background: var(--min-bg); } .gauge .z3 { background: var(--pref-bg); }
.gauge .tick { position: absolute; top: 6px; width: 2px; height: 22px; background: var(--ink-2); }
.gauge .tick b { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.gauge .needle { position: absolute; top: 2px; width: 4px; height: 30px; border-radius: 2px; background: var(--ink); transform: translateX(-2px); transition: left 180ms ease; }
@media (prefers-reduced-motion: reduce) { .gauge .needle { transition: none; } }

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; padding: 3px 8px; border-radius: 7px; white-space: nowrap; }
.badge.below { background: var(--below-bg); color: var(--below); }
.badge.minimum { background: var(--min-bg); color: var(--min); }
.badge.preferred { background: var(--pref-bg); color: var(--pref); }
.badge.unknown { background: var(--unk-bg); color: var(--unk); }
.badge.prov { background: var(--warn-bg); color: var(--warn-ink); }
.badge.plain { background: var(--surface-2); color: var(--ink-2); }

.callout { background: var(--warn-bg); color: var(--warn-ink); border-radius: var(--radius); padding: 10px 12px; font-size: 14.5px; }
.callout ul { margin: 4px 0 0; padding-left: 18px; }
.callout.info { background: var(--surface-2); color: var(--ink); }
.callout.bad { background: var(--below-bg); color: var(--below); }
.explain { margin: 6px 0 0; padding-left: 20px; font-size: 15px; }
.explain li { margin: 3px 0; font-variant-numeric: tabular-nums; }

/* ---------- lists and tables ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-top: 1px solid var(--line); padding: 12px 2px; }
.list > li:first-child { border-top: 0; }
.item-row { display: flex; gap: 10px; align-items: center; }
.item-row .main { flex: 1; min-width: 0; }
.item-row .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.item-row .meta { font-size: 13.5px; color: var(--ink-2); }
.item-row .val { text-align: right; font-family: var(--font-num); font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.tap { width: 100%; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; min-height: 44px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 8px 6px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th:first-child, table.data td:first-child { text-align: left; white-space: normal; }
table.data th { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
table.data tr.cur td { font-weight: 700; background: var(--surface-2); }
table.data td .muted, .muted { color: var(--ink-3, var(--ink-2)); font-weight: 400; }
table.data tr.thin td { color: var(--ink-2); }
.bar { height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 6px; }
.empty { text-align: center; padding: 18px 8px; color: var(--ink-2); }
.empty strong { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }

/* ---------- navigation ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tabbar ul { list-style: none; margin: 0 auto; padding: 0 4px; display: grid; grid-template-columns: repeat(5, 1fr); max-width: 760px; }
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: var(--nav-h); text-decoration: none; color: var(--ink-2); font-size: 11.5px; font-weight: 600;
}
.tabbar a svg { width: 25px; height: 25px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a[aria-current="page"] { color: var(--brand); }
.fab {
  position: fixed; right: 16px; z-index: 29;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 14px);
  min-height: 54px; padding: 0 20px 0 16px; border-radius: 27px; border: 0;
  background: var(--brand); color: var(--brand-ink); font-weight: 700; font-size: 16.5px;
  box-shadow: 0 12px 26px -12px rgba(0, 0, 0, 0.55); display: inline-flex; align-items: center; gap: 8px; cursor: pointer; text-decoration: none;
}
.fab svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; }
@media (min-width: 800px) { .fab { right: calc(50% - 380px + 16px); } }

/* ---------- sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(4, 16, 17, 0.5); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: 640px; max-height: calc(100% - env(safe-area-inset-top, 0px) - 24px); overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--surface); border-radius: 22px 22px 0 0; padding: 8px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  animation: rise 200ms ease-out;
}
@media (min-width: 700px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: 22px; } }
@keyframes rise { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 10px; }
.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sheet-head h2 { font-family: var(--font-num); margin: 0; font-size: 23px; flex: 1; }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 60;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 82px);
  background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 12px; font-weight: 600; font-size: 15px;
  box-shadow: var(--shadow); max-width: calc(100% - 32px);
}

/* ---------- charts ---------- */
.chart svg { display: block; width: 100%; max-width: 620px; height: auto; margin: 0 auto; overflow: visible; }
.chart .axis { stroke: var(--line); }
.chart text { fill: var(--ink-2); font-size: 12.5px; font-family: var(--font); }
.chart .barfill { fill: var(--brand); }
.chart .barfill.neg { fill: var(--below); }
.chart .line-min { stroke: var(--min); stroke-dasharray: 4 4; }
.chart .line-pref { stroke: var(--pref); stroke-dasharray: 4 4; }
.chart .dot { fill: var(--ink); }
.chart .path { stroke: var(--ink); fill: none; stroke-width: 2; }
.progress { height: 14px; border-radius: 8px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.progress > i { display: block; height: 100%; background: var(--brand); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 15px; margin: 0; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.divider { height: 1px; background: var(--line); margin: 12px 0; border: 0; }
.star { background: none; border: 0; font-size: 24px; min-width: 44px; min-height: 44px; cursor: pointer; color: var(--ink-2); }
.star[aria-pressed="true"] { color: #d9a300; }
.safety { font-size: 13px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; margin: -4px 2px 12px; }
settings-section { display: block; }
details.set { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 0 16px; }
details.set > summary { list-style: none; min-height: 58px; display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 700; font-size: 17px; }
details.set > summary::-webkit-details-marker { display: none; }
details.set > summary .muted { font-weight: 500; font-size: 14px; margin-left: auto; text-align: right; }
details.set[open] { padding-bottom: 16px; }
details.set[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; min-height: 140px; }

/* ---------- Welcome dialog and plain-language tutorial (v1.1) ---------- */
.header-tutorial {
  flex: 0 0 auto; text-decoration: none; color: var(--brand); font-weight: 700;
  font-size: 14px; border: 1px solid var(--line); background: var(--surface);
  padding: 7px 9px; border-radius: 11px; min-height: 39px; display: inline-flex; align-items: center;
}
.header-tutorial[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
@media (max-width: 400px) {
  .app-top-inner { gap: 7px; padding-left: 11px; padding-right: 11px; }
  .brand { font-size: 18px; }
  .top-status { font-size: 11px; }
  .header-tutorial { padding: 7px 8px; font-size: 13px; }
}
.context-help { color: var(--brand); font-weight: 700; white-space: normal; }
.welcome-visible { overflow: hidden; }
.welcome-overlay {
  position: fixed; z-index: 100; inset: 0; padding: max(14px, env(safe-area-inset-top, 0px)) 14px max(14px, env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; justify-content: center; background: rgba(2, 18, 18, .77);
}
.welcome-dialog {
  background: var(--surface); border-radius: 23px; width: min(100%, 535px);
  max-height: 100%; overflow: auto; padding: clamp(17px, 4vw, 28px);
  box-shadow: 0 20px 80px rgba(0, 0, 0, .34); border: 1px solid var(--line);
}
.welcome-kicker, .tutorial-eyebrow, .tutorial-section-kicker { font-size: 12px; letter-spacing: .1em; font-weight: 800; color: var(--brand); }
.welcome-dialog h2 { font-family: var(--font-num); font-size: clamp(24px, 5vw, 34px); line-height: 1.1; margin: 8px 0 12px; }
.welcome-dialog p { margin: 0; }
.welcome-dialog > p { margin: 0 0 12px; }
.welcome-steps { display: grid; gap: 9px; margin: 16px 0; }
.welcome-steps > div { display: flex; gap: 12px; background: var(--surface-2); border-radius: 12px; padding: 10px; font-size: 15px; }
.welcome-steps > div > span { flex: 0 0 27px; width: 27px; height: 27px; line-height: 27px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); font-weight: 700; text-align: center; }
.welcome-tip { border-left: 4px solid var(--brand); padding: 8px 10px; background: var(--surface-2); font-size: 15px; }
.welcome-dialog .welcome-limits { color: var(--ink-2); font-size: 13px; }
.welcome-check { display: flex; align-items: center; gap: 9px; font-size: 14px; margin: 12px 0; }
.welcome-check input { accent-color: var(--brand); width: 20px; height: 20px; flex: 0 0 auto; }
.welcome-actions { display: grid; grid-template-columns: 1.5fr 1fr; gap: 10px; }
.welcome-actions .btn { min-width: 0; }
.tutorial-hero { border-radius: 22px; background: var(--surface); padding: 22px 20px; border-top: 5px solid var(--brand); margin: 2px 0 14px; box-shadow: var(--shadow); }
.tutorial-hero h1 { font-family: var(--font-num); font-size: clamp(30px, 6.5vw, 42px); line-height: 1.07; margin: 7px 0 10px; }
.tutorial-hero p { margin: 0 0 16px; color: var(--ink-2); max-width: 58ch; }
.tutorial-alert { border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); padding: 13px 15px; margin-bottom: 12px; font-size: 15px; }
.tutorial-section { scroll-margin-top: calc(env(safe-area-inset-top, 0px) + 75px); margin: 14px 0; }
.tutorial-section h2 { margin-top: 7px; font-size: 25px; }
.tutorial-section h3 { margin-top: 21px; font-size: 18px; }
.tutorial-section > p { max-width: 72ch; }
.tutorial-nav-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.tutorial-nav-item { border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; text-decoration: none; color: var(--ink); padding: 10px 12px; display: flex; align-items: center; gap: 12px; min-height: 58px; }
.tutorial-nav-item > span:nth-child(2) { flex: 1; min-width: 0; }
.tutorial-nav-item strong { display: block; font-size: 15px; }
.tutorial-nav-item small { display: block; color: var(--ink-2); font-size: 13px; }
.tutorial-nav-num { font-family: var(--font-num); font-weight: 700; color: var(--brand); font-size: 18px; }
.tutorial-progress { margin: 12px 0; }
.tutorial-progress-head { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.tutorial-progress-track { background: var(--line); height: 9px; border-radius: 9px; overflow: hidden; margin-top: 7px; }
.tutorial-progress-track > i { background: var(--brand); height: 100%; display: block; transition: width .16s ease; }
.tutorial-check-row { display: flex; align-items: center; gap: 9px; border-bottom: 1px solid var(--line); padding: 12px 0; }
.tutorial-check-row:last-child { border-bottom: 0; }
.tutorial-check-label { display: flex; align-items: flex-start; flex: 1; gap: 10px; cursor: pointer; min-width: 0; }
.tutorial-check-label input { flex: 0 0 auto; accent-color: var(--brand); width: 20px; height: 20px; margin-top: 3px; }
.tutorial-check-label strong, .tutorial-check-label small { display: block; }
.tutorial-check-label small { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.tutorial-terms { margin: 10px 0 18px; }
.tutorial-terms > div { border-bottom: 1px solid var(--line); padding: 9px 2px; }
.tutorial-terms dt { font-weight: 700; margin-bottom: 3px; }
.tutorial-terms dd { margin: 0; color: var(--ink-2); font-size: 15px; }
.tutorial-how, .tutorial-note, .tutorial-example { padding: 14px; margin: 15px 0; border-radius: 13px; background: var(--surface-2); }
.tutorial-how ol, .tutorial-routine ol { padding-left: 20px; margin: 6px 0 0; }
.tutorial-how li, .tutorial-routine li { margin-bottom: 6px; }
.tutorial-note { border-left: 4px solid var(--brand); font-size: 15px; }
.tutorial-example { border: 1px solid var(--line); }
.tutorial-example-title { color: var(--brand); font-weight: 800; letter-spacing: .04em; font-size: 13px; }
.tutorial-example-math { font-variant-numeric: tabular-nums; line-height: 1.9; background: var(--surface); border-radius: 10px; padding: 10px; }
.tutorial-status-list { display: grid; gap: 8px; margin: 14px 0; }
.tutorial-status-list > div { background: var(--surface-2); border-radius: 11px; padding: 10px 12px; }
.tutorial-status-list p { margin: 6px 0 0; }
.tutorial-routine { display: grid; gap: 10px; margin: 14px 0; }
.tutorial-routine > div { border-radius: 12px; background: var(--surface-2); padding: 12px 14px; }
.tutorial-back { display: block; color: var(--brand); font-weight: 700; padding: 14px 0 0; }
@media (min-width: 600px) {
  .tutorial-nav-grid, .tutorial-routine { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { .tutorial-progress-track > i { transition: none; } }
