/* Store Radar 0.3: bold and modern. Brand colours come from the store (set by the admin) through
   --brand, --accent and --accent-ink on <html>; the kinds of advice keep fixed colours everywhere. */
:root {
  --brand: #0B3B8C;
  --accent: #2F6BFF;
  --accent-ink: #FFFFFF;
  --bg: #EEF2F8;
  --surface: #FFFFFF;
  --surface-2: #F6F8FC;
  --ink: #0B1220;
  --ink-2: #334155;
  --muted: #5B6679;
  --line: #E2E8F0;
  --line-2: #CBD5E1;
  --warn: #C2410C; --warn-soft: #FFEDD5;
  --pred: #5B21B6; --pred-soft: #EDE9FE;
  --act: #047857; --act-soft: #D1FAE5;
  --good: #047857;
  --err: #B91C1C; --err-soft: #FEE2E2;
  --radius: 20px;
  --radius-s: 12px;
  --shadow: 0 1px 2px rgba(11, 18, 32, .04), 0 4px 16px rgba(11, 18, 32, .05);
  --display: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A0F1A; --surface: #121A2A; --surface-2: #182236; --ink: #EEF2F8; --ink-2: #C7D0DE; --muted: #93A0B5;
    --line: #243049; --line-2: #33415E;
    --warn: #FDBA74; --warn-soft: #3A2415; --pred: #C4B5FD; --pred-soft: #2A2145; --act: #6EE7B7; --act-soft: #0F2F26;
    --good: #6EE7B7; --err: #FCA5A5; --err-soft: #3B1A1A; --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--body); }
a { color: var(--link); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: 34px; font-weight: 800; margin: 0; }
h2 { font-size: 20px; font-weight: 700; margin: 0; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px 14px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; margin: 8px 0; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.lead { color: var(--ink-2); font-size: 16px; margin: 6px 0 0; }
.small-note { font-size: 13px; }
.num-big { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; }

/* Top bar */
.top { background: var(--brand); color: #FFFFFF; position: sticky; top: 0; z-index: 20; }
.top-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #FFFFFF; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 19px; white-space: nowrap; }
.brand img { height: 34px; width: auto; max-width: 160px; object-fit: contain; display: block; }
.brand svg { flex: none; }
.topnav { display: flex; gap: 4px; flex: 1; }
.topnav a { color: rgba(255,255,255,.82); text-decoration: none; font-weight: 500; font-size: 15px; padding: 9px 14px; border-radius: 10px; }
.topnav a.on { background: rgba(255,255,255,.16); color: #FFFFFF; font-weight: 600; }
.topnav a:hover { color: #FFFFFF; }
.top-right { display: flex; align-items: center; gap: 14px; font-size: 13px; color: rgba(255,255,255,.85); }
.top-right form { margin: 0; }
.linklike { background: none; border: 0; color: inherit; cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #94A3B8; flex: none; }
.dot.ok { background: #4ADE80; } .dot.warning { background: #FBBF24; } .dot.error { background: #F87171; } .dot.running { background: #60A5FA; }
.more-menu { display: none; position: relative; }
.more-menu summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; }
.more-menu summary::-webkit-details-marker { display: none; }
.more-menu[open] summary { background: rgba(255,255,255,.16); }
.more-menu .menu { position: absolute; right: 0; top: 50px; background: var(--surface); color: var(--ink); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 8px; min-width: 190px; display: grid; }
.more-menu .menu a, .more-menu .menu button { color: var(--ink); text-decoration: none; padding: 12px 14px; border-radius: 10px; font: 500 15px var(--body); text-align: left; background: none; border: 0; cursor: pointer; }
.more-menu .menu a:hover, .more-menu .menu button:hover { background: var(--surface-2); }

.asbar { background: #FEF3C7; color: #78350F; font-size: 13px; }
.asbar .wrap { display: flex; gap: 10px; align-items: center; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.asbar form { margin: 0; }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--radius-s); border: 1px solid transparent; padding: 0 18px; min-height: 44px; font: 600 14px/1.2 var(--body); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn.primary { background: var(--brand); color: #FFFFFF; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 13.5px; }
.btn.danger { background: var(--err); color: #FFFFFF; }
.btn.wa { background: #128C4B; color: #FFFFFF; }
.btn svg { flex: none; }
.form { display: grid; gap: 16px; margin-top: 16px; }
.form.narrow { max-width: 460px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.form label.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.form label.check input { width: 20px; height: 20px; }
input[type=text], input[type=email], input[type=password], input[type=number], input:not([type]), input[type=file], select, textarea {
  font: 400 15px var(--body); color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-s); padding: 11px 13px; width: 100%; min-height: 46px;
}
textarea { min-height: 110px; line-height: 1.5; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 16px; display: grid; gap: 12px; }
legend { font-weight: 700; padding: 0 6px; }
.hint { color: var(--muted); font-size: 13px; margin: -6px 0 0; font-weight: 400; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.flash { padding: 12px 16px; border-radius: var(--radius-s); margin: 18px 0; font-size: 14px; font-weight: 500; }
.flash.ok { background: var(--act-soft); color: var(--act); }
.flash.err { background: var(--err-soft); color: var(--err); }

/* Hero and KPI tiles */
.hero { padding: 30px 0 4px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.hero .date { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 20px 0 0; }
.kpi { background: var(--surface); border-radius: var(--radius); padding: 18px 22px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); min-width: 0; }
.kpi span { font-size: 13.5px; color: var(--muted); font-weight: 500; }
.kpi strong { font-family: var(--display); font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.kpi em { font-style: normal; font-size: 13px; color: var(--muted); }
.kpi.brand { background: var(--brand); color: #FFFFFF; }
.kpi.brand span, .kpi.brand em { color: rgba(255,255,255,.82); }
.kpi .good { color: var(--good); }
.kpi.brand .good { color: #FFFFFF; }
.kpi-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.spark { display: block; color: var(--accent); flex: none; }
.up { color: var(--good); font-weight: 600; }
.down { color: var(--err); font-weight: 600; }

/* Topic pills */
.pills { display: flex; gap: 8px; margin: 24px 0 16px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.pills::-webkit-scrollbar { display: none; }
.pills a { flex: none; text-decoration: none; background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14.5px; padding: 11px 18px; border-radius: 999px; box-shadow: var(--shadow); }
.pills a .n { color: var(--muted); font-weight: 500; margin-left: 4px; }
.pills a.on { background: var(--ink); color: var(--bg); }
.pills a.on .n { color: var(--bg); opacity: .75; }
.tabsum { margin: 0 0 14px; color: var(--ink-2); font-size: 15px; }

/* Layout of Today */
.grid-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cards { display: grid; gap: 14px; }
.side { display: grid; gap: 14px; }

/* Advice card: big icon, then the words */
.card { background: var(--surface); border-radius: var(--radius); padding: 20px 22px; display: flex; gap: 18px; box-shadow: var(--shadow); }
.icon { width: 58px; height: 58px; flex: none; border-radius: 16px; display: grid; place-items: center; }
.k-warning .icon { background: var(--warn-soft); color: var(--warn); }
.k-prediction .icon { background: var(--pred-soft); color: var(--pred); }
.k-action .icon { background: var(--act-soft); color: var(--act); }
.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.meta { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; flex-wrap: wrap; }
.k-warning .meta .kind { color: var(--warn); } .k-prediction .meta .kind { color: var(--pred); } .k-action .meta .kind { color: var(--act); }
.meta .impact { margin-left: auto; letter-spacing: 0; text-transform: none; font-weight: 600; font-size: 13px; color: var(--muted); }
.meta .impact b { color: var(--ink); }
.card-title { font-family: var(--display); font-size: 21px; font-weight: 700; margin: 2px 0 0; letter-spacing: -0.01em; line-height: 1.25; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.card-summary { margin: 0; color: var(--ink-2); }
.card-action { margin: 4px 0 0; background: var(--surface-2); border-radius: var(--radius-s); padding: 10px 14px; color: var(--ink); }
.card-action b { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.card-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.money { display: flex; align-items: baseline; gap: 8px; margin-right: auto; flex-wrap: wrap; }
.money strong { font-family: var(--display); font-size: 25px; font-weight: 800; letter-spacing: -0.02em; }
.money span { color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions form { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.empty { background: var(--surface); border-radius: var(--radius); padding: 26px; color: var(--ink-2); box-shadow: var(--shadow); }

/* Panels */
.panel { background: var(--surface); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); margin-bottom: 14px; }
.panel h2 { margin: 0 0 10px; font-size: 19px; }
.panel.dark { background: var(--ink); color: var(--bg); }
.panel.dark .muted, .panel.dark p { color: var(--line-2); }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.week-lines { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 7px; color: var(--ink-2); font-size: 14.5px; }
.season { display: flex; gap: 14px; align-items: flex-start; }
.season .icon { background: rgba(255,255,255,.12); color: #FFFFFF; width: 48px; height: 48px; border-radius: 14px; }
.season b { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #93C5FD; }
.season strong { display: block; font-family: var(--display); font-size: 18px; margin: 2px 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Journey (tracker) */
.journey { display: grid; gap: 8px; margin-top: 10px; }
.journey .step { display: grid; grid-template-columns: minmax(120px, 1.2fr) 3fr auto; gap: 12px; align-items: center; font-size: 14px; }
.journey .bar { height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.journey .bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.journey .n { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Detail page */
.back { color: var(--muted); text-decoration: none; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; margin-top: 22px; }
.detail { background: var(--surface); border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow); margin: 12px 0 24px; }
.detail-head { display: flex; gap: 20px; align-items: flex-start; }
.detail-head .icon { width: 68px; height: 68px; border-radius: 20px; }
.detail h1 { font-size: 30px; margin: 6px 0 8px; }
.detail .card-summary { font-size: 17px; }
.detail .money { margin: 12px 0 0; }
.detail .money strong { font-size: 32px; }
.block { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; }
.block h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; font-family: var(--body); font-weight: 700; }
.do-box { background: var(--surface-2); border-radius: var(--radius-s); padding: 16px 18px; border-left: 4px solid var(--brand); }
.do-box p { margin: 0; font-size: 16px; }
.gift { margin-top: 10px !important; font-size: 14.5px !important; color: var(--ink-2); }
.ext { display: inline-flex; margin: 14px 16px 0 0; font-size: 14px; font-weight: 600; }
.draft { margin-top: 14px; display: grid; gap: 12px; }
.draft[hidden] { display: none; }
.draft-box { margin-top: 16px; }
.draft label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.draft .compare span { display: block; word-break: break-word; }
.draft .compare .btn { margin-top: 8px; }
.draft .copy-row { display: flex; gap: 8px; flex-wrap: wrap; }
.checks-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 14px; }
.checks-list li::before { content: "✓"; color: var(--good); font-weight: 800; margin-right: 8px; }
.checks-list li.no::before { content: "✗"; color: var(--err); }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.compare > div { background: var(--surface-2); border-radius: var(--radius-s); padding: 12px 14px; font-size: 14px; }
.compare b { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
.table th, .table td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: 13px; }
.table .num { text-align: right; white-space: nowrap; }
.raw > summary { cursor: pointer; font-weight: 700; }
.written-by { display: inline-block; font-size: 12px; color: var(--muted); }

/* Results */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 20px 0; }
.outcome { font-weight: 700; font-size: 12px; padding: 3px 9px; border-radius: 999px; margin-right: 6px; background: var(--surface-2); white-space: nowrap; }
.o-worked { background: var(--act-soft); color: var(--act); }
.o-no_result { background: var(--warn-soft); color: var(--warn); }
.hours > summary { cursor: pointer; list-style: none; }
.hours > summary::-webkit-details-marker { display: none; }
.section-title { font-size: 19px; margin: 26px 0 8px; }

/* Settings & admin */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.ok-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #22C55E; margin-right: 4px; }
.small-link { font-size: 13px; margin-left: 6px; }
.engines { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.engines li { font-size: 14px; }
.eng { font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; margin-right: 6px; letter-spacing: .04em; }
.eng.ready { background: var(--act-soft); color: var(--act); }
.eng.wait { background: var(--surface-2); color: var(--muted); }
.count { background: var(--surface-2); border-radius: 999px; padding: 1px 9px; font-size: 13px; font-weight: 600; }
.plain { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; font-size: 14px; }
form.inline { display: inline; margin: 0; }
.bad { color: var(--err); }
.danger { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.danger > summary { cursor: pointer; color: var(--err); font-weight: 700; }
.optional { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 3px 9px; vertical-align: middle; font-family: var(--body); letter-spacing: 0; }
.season-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 14px; }
.swatch { width: 28px; height: 28px; border-radius: 8px; display: inline-block; border: 1px solid var(--line); vertical-align: middle; }
.brand-preview { border-radius: var(--radius); padding: 18px; color: #FFFFFF; display: grid; gap: 10px; }
.brand-preview img { max-height: 36px; max-width: 170px; object-fit: contain; }
.fam-table input { min-height: 38px; padding: 7px 10px; font-size: 14px; }

/* Progress */
.progress { margin: 18px 0; }
.bar-p { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 10px 0; }
.bar-p span { display: block; height: 100%; width: 5%; background: var(--accent); transition: width .6s; }

/* Sign in and setup pages */
.auth-page { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; background: var(--bg); }
.auth-card { background: var(--surface); border-radius: 24px; padding: 32px; width: 100%; max-width: 440px; box-shadow: var(--shadow); }
.auth-card.wide { max-width: 760px; }
.auth-card .brand { color: var(--ink); margin-bottom: 20px; }
.auth-card .brand .mark { color: var(--brand); }
.auth-card h1 { font-size: 28px; margin-bottom: 6px; }
.checks { list-style: none; padding: 0; font-size: 14px; }
.checks .ok { color: var(--good); } .checks .bad { color: var(--err); }
.stepper { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 24px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.stepper li { display: flex; align-items: center; gap: 6px; padding-right: 8px; }
.stepper span { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--surface-2); font-weight: 700; font-size: 12px; }
.stepper li.on { color: var(--ink); font-weight: 600; }
.stepper li.on span { background: var(--brand); color: #FFFFFF; }
.stepper li.done span { background: var(--act-soft); color: var(--act); }
.promise { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0; }
.promise div { background: var(--surface-2); border-radius: var(--radius-s); padding: 14px 16px; }
.promise strong { display: block; font-family: var(--display); }
.promise span { color: var(--ink-2); font-size: 14px; }
.guide { padding-left: 20px; color: var(--ink-2); font-size: 14px; display: grid; gap: 6px; }
.tabs { display: flex; gap: 6px; margin: 16px 0 4px; flex-wrap: wrap; }
.tab { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; cursor: pointer; font: 500 14px var(--body); color: var(--ink-2); min-height: 40px; }
.tab.on { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 600; }
.tabs.sub .tab { font-size: 13px; padding: 7px 12px; }
.foot { color: var(--muted); font-size: 12px; padding-top: 28px; padding-bottom: 28px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot strong { color: var(--ink); }

/* Phone: bottom bar within thumb reach */
.bottombar { display: none; }
@media (max-width: 760px) {
  body.has-bottombar { padding-bottom: 96px; }
  .wrap { padding: 0 16px; }
  h1 { font-size: 26px; }
  .top-inner { height: 60px; gap: 12px; }
  .topnav, .top-right .when, .top-right > form { display: none; }
  .more-menu { display: block; margin-left: auto; }
  .top-right { margin-left: auto; }
  .kpis, .stats, .grid2, .promise, .grid-main, .compare { grid-template-columns: 1fr; }
  .kpis { gap: 10px; }
  .kpi { padding: 14px 16px; }
  .kpi strong { font-size: 26px; }
  .card { padding: 16px; gap: 12px; flex-direction: column; }
  .card .icon { width: 46px; height: 46px; border-radius: 14px; }
  .card-head { display: flex; gap: 12px; align-items: center; }
  .card-title { font-size: 18px; }
  .meta .impact { margin-left: 0; }
  .detail { padding: 20px 18px; }
  .detail-head { flex-direction: column; gap: 12px; }
  .detail h1 { font-size: 24px; }
  .table th, .table td { padding: 8px 6px; }
  .journey .step { grid-template-columns: 1fr auto; }
  .journey .bar { grid-column: 1 / -1; order: 3; }
  .pills { display: none; }
  .bottombar { display: flex; position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 30; height: 70px; background: #0B1220; border-radius: 24px; justify-content: space-around; align-items: center; padding: 0 6px; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
  .bottombar a { position: relative; width: 64px; height: 56px; border-radius: 16px; color: #CBD5E1; text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 600; }
  .bottombar a.on { background: var(--brand); color: #FFFFFF; }
  .bottombar .badge { position: absolute; top: 5px; right: 10px; min-width: 17px; height: 17px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 10px; display: grid; place-items: center; padding: 0 4px; }
}
.steps-list { margin: 8px 0 12px; padding-left: 20px; display: grid; gap: 6px; font-size: 14.5px; }
details > summary { cursor: pointer; font-weight: 600; margin: 6px 0; }
/* Admin brand editor */
.brand-edit { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.color-row { display: flex; gap: 8px; align-items: center; }
.color-row input[type=color] { width: 48px; height: 44px; padding: 2px; border: 1px solid var(--line-2); border-radius: var(--radius-s); background: var(--surface); flex: none; }
.brand-preview { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg); }
.bp-top { background: var(--p-brand); color: #FFFFFF; padding: 14px 16px; font-weight: 700; font-family: var(--display); min-height: 56px; display: flex; align-items: center; }
.bp-top span { display: inline-flex; align-items: center; gap: 8px; }
.bp-top img { max-height: 34px; max-width: 200px; object-fit: contain; }
.bp-body { padding: 16px; }
.bp-btn, .bp-acc { display: inline-block; padding: 9px 14px; border-radius: var(--radius-s); font-weight: 600; font-size: 13.5px; margin: 0 6px 6px 0; }
.bp-btn { background: var(--p-brand); color: #FFFFFF; }
.bp-acc { background: var(--p-accent); color: var(--p-ink); }
@media (max-width: 760px) { .brand-edit { grid-template-columns: 1fr; } }
/* Fixed dark panel in both themes; the sales number stays on one line next to its chart */
.panel.dark { background: #0B1220; color: #F1F5F9; border: 1px solid rgba(255,255,255,.06); }
.panel.dark .muted, .panel.dark p, .panel.dark .small-note { color: #CBD5E1; }
.kpi-row strong { white-space: nowrap; font-size: clamp(24px, 2.6vw, 34px); }
.kpi-row .spark { flex: 0 1 auto; min-width: 0; color: var(--accent); }
.more-menu .menu form { margin: 0; display: grid; }
/* Tables that become stacked rows on a phone */
@media (max-width: 760px) {
  .table.stack thead { display: none; }
  .table.stack, .table.stack tbody, .table.stack tr, .table.stack td { display: block; width: 100%; }
  .table.stack tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  .table.stack td { border: 0; padding: 3px 0; text-align: left; }
  .table.stack td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 12.5px; font-weight: 600; }
  .table.stack td.num { text-align: left; }
}
/* Links use the main color (always readable); the second color is only for highlights */
:root { --link: var(--brand); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --link: #93C5FD; } }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 20px 0; }
.stat { background: var(--surface); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow); display: grid; gap: 4px; }
.stat span { font-size: 13.5px; color: var(--muted); font-weight: 500; }
.stat strong { font-family: var(--display); font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.hours summary { font-weight: 400; }
.meta .early { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--line-2); border-radius: 999px; padding: 2px 8px; font-size: 10.5px; letter-spacing: .04em; }
.quiet-note { background: var(--surface); border-radius: var(--radius-s); padding: 10px 14px; font-size: 13.5px; color: var(--ink-2); margin: 14px 0 0; box-shadow: var(--shadow); }

/* ======================= 0.5 ======================= */
.testbar { background: #F59E0B; color: #1F1300; text-align: center; font: 700 12px/1 var(--body); letter-spacing: .06em; padding: 7px 10px; }
.flash.warn { background: var(--warn-soft); color: var(--warn); }
.flash a { color: inherit; font-weight: 700; }
.warn-panel { border: 1px solid var(--warn); background: var(--warn-soft); }
.warn-panel h2 { color: var(--warn); }
.grid2.tight { gap: 4px 18px; }
.optional { font: 500 12px var(--body); color: var(--muted); margin-left: 6px; letter-spacing: 0; }

/* Cards: the whole card opens the details; "See details" is the main button */
.card.clickable { cursor: pointer; transition: box-shadow .15s ease, transform .15s ease; }
.card.clickable:hover { box-shadow: 0 2px 4px rgba(11,18,32,.06), 0 10px 28px rgba(11,18,32,.10); transform: translateY(-1px); }
.btn.details-btn { min-height: 44px; padding: 0 20px; font-size: 14.5px; box-shadow: 0 2px 10px color-mix(in srgb, var(--brand) 35%, transparent); }
.card-foot .actions { flex-wrap: wrap; justify-content: flex-end; }
.meta .network { background: var(--pred-soft); color: var(--pred); border-radius: 999px; padding: 2px 9px; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; }
.source-line { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; font-style: italic; }

/* Card details: send a task, tasks list, causes, sources */
.send-task { margin-top: 16px; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-s); }
.send-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-weight: 600; margin: 0 0 8px; }
.send-row select { flex: 1; min-width: 180px; }
.send-task input[type="text"] { width: 100%; }
.task-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.task-list li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.age { font-size: 12.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--line); color: var(--ink-2); }
.lvl-amber .age { background: #FEF3C7; color: #92400E; }
.lvl-red .age { background: var(--err-soft); color: var(--err); }
.why-block h3 { font: 700 15px var(--display); margin: 16px 0 6px; }
.causes, .sources-list { margin: 0 0 6px; padding-left: 20px; }
.causes li, .sources-list li { margin: 3px 0; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--ink-2); margin: 2px 4px 2px 0; white-space: nowrap; }
.tag.t-vip, .tag.t-future_vip { background: #FEF3C7; border-color: #FCD34D; color: #92400E; }
.tag.t-at_risk, .tag.t-refused, .tag.t-no_contact { background: var(--err-soft); border-color: transparent; color: var(--err); }
.tag.t-new { background: var(--act-soft); border-color: transparent; color: var(--act); }
.tag.sent { background: var(--pred-soft); border-color: transparent; color: var(--pred); }

/* Today: goal, health, hours */
.goal-bar { background: var(--surface); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow); margin: 14px 0; }
.goal-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: 14px; }
.goal-track { position: relative; height: 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); margin: 10px 0 8px; overflow: visible; }
.goal-track .done { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--brand); }
.goal-track .pace { position: absolute; top: -5px; width: 3px; height: 20px; background: var(--accent); border-radius: 2px; transform: translateX(-1px); }
.goal-bar p { margin: 0; color: var(--ink-2); }
.panel.health .score { font: 800 30px/1 var(--display); color: var(--brand); }
.panel.health .score small { font-size: 14px; color: var(--muted); font-weight: 600; }
.health .parts { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; font-size: 13px; }
.health .parts li { display: grid; grid-template-columns: 1fr 90px; gap: 10px; align-items: center; }
.health .bar { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.health .bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.health .bar span.low { background: var(--warn); }
.panel.paid { background: var(--act-soft); }
.panel.paid p { margin: 0; color: var(--act); font-weight: 600; }
.panel.paid.big p { font-size: 16px; }
.heat { display: grid; gap: 3px; margin: 12px 0 6px; overflow-x: auto; }
.heat-row { display: grid; grid-template-columns: 38px repeat(24, minmax(10px, 1fr)); gap: 3px; align-items: center; }
.heat-day { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.heat-cell { height: 18px; border-radius: 4px; background: color-mix(in srgb, var(--brand) calc(var(--o) * 100%), var(--surface-2)); }
.heat-hours span { font-size: 10px; color: var(--muted); }

/* Customers */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.filters input[type="search"] { flex: 1; min-width: 200px; }
.profile-hero { align-items: flex-start; }
.tags-row { margin: 8px 0 0; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 16px 0; }

/* Ask me */
.ask-box textarea { width: 100%; font: 15px/1.5 var(--body); }
.ask-box form { display: grid; gap: 10px; }
.ask-answer { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-s); background: var(--surface-2); border: 1px solid var(--line); white-space: pre-wrap; line-height: 1.6; }
.ask-answer.err { background: var(--err-soft); color: var(--err); border-color: transparent; }
.credits { font-weight: 700; background: var(--surface); padding: 8px 14px; border-radius: 999px; box-shadow: var(--shadow); }
.qa summary { cursor: pointer; }
.ask-text { margin-top: 10px; line-height: 1.6; }

/* Worker task page */
.worker-page main { padding-bottom: 40px; }
.tasks { display: grid; gap: 12px; margin: 16px 0; }
.task { background: var(--surface); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); border-left: 5px solid var(--line-2); }
.task.lvl-amber { border-left-color: #F59E0B; }
.task.lvl-red { border-left-color: var(--err); }
.task h2 { font-size: 18px; margin: 8px 0; }
.task-head { display: flex; gap: 8px; align-items: center; }
.task .urgent { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--err); }
.task-body { color: var(--ink-2); font-size: 14.5px; }
.task-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.task-actions details { flex: 1; min-width: 200px; }
.task-actions details[open] { display: grid; gap: 8px; }
.task-actions summary { list-style: none; }
.push-box { margin: 10px 0; }

/* Legal pages */
.auth-card.wide:has(.legal) { max-width: 820px; }
.legal h1 { font-size: 28px; margin-bottom: 4px; }
.legal h2 { font-size: 17px; margin: 22px 0 6px; }
.legal p, .legal li { line-height: 1.65; color: var(--ink-2); }
.legal-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.legal-nav a { font-size: 13px; padding: 6px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); text-decoration: none; }
.legal-nav a.on { background: var(--brand); color: #FFFFFF; }
.auth-legal { margin: 22px 0 0; font-size: 12px; color: var(--muted); text-align: center; }
.auth-legal a, .foot .legal-links a { color: var(--muted); }
.foot .legal-links { font-size: 12.5px; }

/* Admin */
.admin-pills { margin-top: 4px; }
.notices { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.notices li { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.notices li.n-access_lost, .notices li.n-delete_request, .notices li.n-dfs_credit { background: var(--err-soft); }
.checklist { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.checklist li { display: flex; gap: 10px; align-items: baseline; font-size: 14px; }
.checklist .mark { width: 20px; height: 20px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; }
.checklist li.ok .mark { background: var(--act-soft); color: var(--act); }
.checklist li.todo .mark { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line-2); }
.syscheck { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.syscheck li { display: flex; gap: 10px; align-items: baseline; font-size: 14px; }
.syscheck .light { width: 11px; height: 11px; border-radius: 999px; flex: none; transform: translateY(1px); }
.syscheck .s-ok .light { background: #10B981; }
.syscheck .s-warn .light { background: #F59E0B; }
.syscheck .s-bad .light { background: #EF4444; }
.ideas { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ideas li { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-s); }
.ideas p { margin: 6px 0; }
.row-warn td { background: var(--warn-soft); }
.row-actions { white-space: nowrap; }
.row-actions form.inline, .row-actions .btn { margin-left: 6px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 12px; }
.inline-form label { flex: 1; min-width: 160px; margin: 0; }
.settings-form .panel { margin-bottom: 14px; }

/* Six topics on the phone bar */
@media (max-width: 760px) {
  .bottombar a { width: auto; flex: 1; max-width: 64px; font-size: 10px; }
  .btn.details-btn { width: 100%; }
  .card-foot .actions form { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
  .card-foot .actions form .btn { flex: 1; }
  .heat-row { grid-template-columns: 30px repeat(24, minmax(8px, 1fr)); gap: 2px; }
  .heat-cell { height: 14px; }
}
