/* Radar by Yoni 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:not([data-theme="light"]) {
    --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;
  }
}
/* 0.7: a page can force its theme (demo scenes): data-theme="dark" on <html> */
:root[data-theme="dark"] {
  --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; --link: #93C5FD;
}
* { 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; inset-inline-end: 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: start; 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[type=date], input[type=time], 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-inline-start: 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-inline-start: 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-inline-end: 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-inline-start: 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-inline-start: 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 0 0; margin-inline-end: 16px; 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-inline-end: 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: start; 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: end; 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-inline-end: 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-inline-end: 4px; }
.small-link { font-size: 13px; margin-inline-start: 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-inline-end: 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-inline-end: 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-inline-start: 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-inline-start: auto; }
  .top-right { margin-inline-start: 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-inline-start: 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; inset-inline-end: 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-inline-start: 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 0 6px; margin-inline-end: 6px; }
.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: start; }
  .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: start; }
}
/* 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-inline-start: 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-inline-start: 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 0; margin-inline-end: 4px; 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); }
.goal-facts { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 13.5px; margin: 0 0 6px; color: var(--ink-2); }
.goal-facts b { color: var(--ink); font-weight: 700; }
.goal-facts .good b { color: var(--good); }
.goal-bar.reached .goal-track .done { background: var(--good); }
.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-inline-start: 5px solid var(--line-2); }
.task.lvl-amber { border-inline-start-color: #F59E0B; }
.task.lvl-red { border-inline-start-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-inline-start: 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; }
}

/* ---------------------------------------------------------------- 0.6: cleaner screens */
/* Cards in a list: title, one "Do this" line, money and "See details". Actions live in the detail page. */
.card-do { margin: 2px 0 0; color: var(--ink-2); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-do b { color: var(--ink); font-weight: 600; }
.card-foot { justify-content: space-between; }
.meta .since { margin-inline-start: auto; letter-spacing: 0; text-transform: none; font-weight: 500; font-size: 12.5px; color: var(--muted); }
.badge-new, .badge-upd, .badge-urgent { border-radius: 999px; padding: 2px 9px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; }
.badge-new { background: var(--accent); color: var(--accent-ink); }
.badge-upd { background: var(--pred-soft); color: var(--pred); }
.badge-urgent { background: var(--err-soft); color: var(--err); }
.card.is-old { box-shadow: inset 3px 0 0 #F59E0B, var(--shadow); }
.old-note { margin: 0; font-size: 12.5px; font-weight: 600; color: #B45309; }
.list-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.sort-form { margin-inline-start: auto; }
.sort-form label, .period-form label { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.sort-form select, .period-form select { min-height: 38px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }
.period-form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters a { text-decoration: none; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 14px; font-size: 13.5px; font-weight: 600; }
.filters a.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.results-tabs { margin: 16px 0 6px; }
.value-line { margin: 8px 0 0; font-size: 14px; color: var(--ink-2); }
.wins { display: flex; gap: 14px; align-items: center; background: var(--act-soft); color: var(--ink); border-radius: var(--radius); padding: 14px 18px; margin: 16px 0 0; }
.wins-icon { font-size: 26px; }
.wins-body { flex: 1; min-width: 0; }
.wins-body p { margin: 0 0 4px; font-weight: 600; }
.setup-soft { background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 14px 18px; }
.setup-soft p { margin: 6px 0 0; }
.setup-top { display: flex; align-items: center; gap: 12px; }
.setup-track { flex: 1; height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; display: block; min-width: 80px; }
.setup-track span { display: block; height: 100%; background: var(--act); border-radius: 999px; }
.setup-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.setup-list li { display: flex; gap: 10px; align-items: flex-start; }
.setup-list .tick { flex: none; width: 22px; height: 22px; border-radius: 999px; border: 2px solid var(--line-2); display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; }
.setup-list li.done .tick { background: var(--act); border-color: var(--act); }
.setup-list li.done strong { color: var(--muted); }

/* Detail page: the essentials open, the rest folded. */
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp.open { display: block; -webkit-line-clamp: unset; }
.see-more { font-size: 13px; color: var(--muted); margin: 2px 0 6px; }
details.fold { border-top: 1px solid var(--line); padding: 10px 0 2px; margin-top: 12px; }
details.fold > summary { font-family: var(--display); font-size: 16px; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 8px; }
details.fold > summary::before { content: "›"; display: inline-block; transition: transform .15s ease; font-size: 20px; line-height: 1; color: var(--muted); }
details.fold[open] > summary::before { transform: rotate(90deg); }
details.fold > summary::-webkit-details-marker { display: none; }
details.block.fold { margin-top: 0; }
.counter { margin-inline-start: auto; font-family: var(--body); font-size: 13px; font-weight: 600; color: var(--act); background: var(--act-soft); border-radius: 999px; padding: 2px 10px; }
.people { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.person { display: flex; gap: 12px; align-items: center; justify-content: space-between; background: var(--surface-2); border-radius: var(--radius-s); padding: 10px 12px; transition: opacity .3s ease; }
.person .who { min-width: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.person .who .small-note { flex-basis: 100%; }
.person .acts { display: flex; gap: 6px; flex: none; }
.person.is-sent { opacity: .5; }
.email-line { flex-basis: 100%; font-size: 12.5px; color: var(--muted); }
.warn-tag { background: #FEF3C7; border-color: #FCD34D; color: #92400E; }
.all-sent { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--act-soft); border-radius: var(--radius-s); padding: 10px 12px; margin: 8px 0; }
.all-sent[hidden] { display: none; }
.email-to { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-2); }
.email-to[hidden], a[hidden] { display: none; }
.specialist { margin-top: 12px; background: var(--surface-2); border-radius: var(--radius-s); padding: 10px 14px; }
pre.code { white-space: pre-wrap; word-break: break-word; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; font-size: 12.5px; }
.rewrites { display: grid; gap: 12px; margin-top: 12px; }
.rewrite { background: var(--surface-2); border-radius: var(--radius-s); padding: 12px 14px; }
.rewrite h3 { margin: 0; font-size: 15px; word-break: break-all; }
.copy-field { margin-top: 8px; }
.copy-field b { font-size: 12.5px; }
.copy-field p { margin: 2px 0 4px; }
.cotm-box { margin-top: 12px; display: grid; gap: 12px; }
.cotm-preview img { width: 100%; max-width: 640px; border-radius: 10px; box-shadow: var(--shadow); display: block; }
.cotm-form { display: grid; gap: 8px; max-width: 640px; }
.warn-text { color: #B45309; font-weight: 600; font-size: 12.5px; }

/* Results: tiles of "My numbers", changes, plan, simulator. */
.stat.wide { grid-column: 1 / -1; }
.stat em { font-style: normal; font-size: 13px; font-weight: 600; }
.stat em.good, td.good, .d-good em { color: var(--good); }
.stat em.bad, td.bad, .d-bad em { color: var(--err); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; display: grid; gap: 3px; align-content: start; }
.tile-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.tile strong { font-family: var(--display); font-size: 22px; }
.tile em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--muted); }
.tile p { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.changes { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.changes li { background: var(--surface); border-radius: var(--radius-s); box-shadow: var(--shadow); padding: 12px 16px; border-inline-start: 4px solid var(--line-2); }
.changes li.v-better { border-inline-start-color: var(--act); }
.changes li.v-worse { border-inline-start-color: var(--err); }
.changes li p { margin: 4px 0; }
.plan { margin: 0; padding-inline-start: 22px; display: grid; gap: 6px; }
.score-pill { display: inline-block; min-width: 36px; text-align: center; border-radius: 999px; padding: 2px 8px; font-weight: 700; }
.score-pill.sgood { background: var(--act-soft); color: var(--act); }
.score-pill.smid { background: #FEF3C7; color: #92400E; }
.score-pill.sbad { background: var(--err-soft); color: var(--err); }
.simulator label { display: grid; gap: 4px; margin: 10px 0; }
.simulator input[type=range] { width: 100%; }
.sim-result { background: var(--surface-2); border-radius: var(--radius-s); padding: 12px 16px; display: grid; gap: 2px; margin-top: 10px; }
.sim-result strong { font-family: var(--display); font-size: 26px; }
.stack-form { display: grid; gap: 10px; max-width: 640px; }
.panel.narrow { max-width: 720px; }
fieldset.metrics { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px; display: grid; gap: 6px; }

/* Settings: an index, and a Save per section that wakes up when something changes. */
.settings-index { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0; }
.settings-index a { text-decoration: none; font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px; }
.save-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.save-row .btn[disabled] { opacity: .45; cursor: default; }
.saved-note { color: var(--act); font-weight: 700; font-size: 14px; }
form.panel { display: block; }
.hint-fold summary { font-weight: 500; color: var(--muted); }
[id] { scroll-margin-top: 80px; }

/* Admin menu: a scrolling row on computers, a 2-column grid of buttons on phones. */
.admin-pills { display: flex; gap: 8px; margin: 18px 0 16px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.admin-pills::-webkit-scrollbar { display: none; }
.admin-pills a { flex: none; text-decoration: none; background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; padding: 10px 16px; border-radius: 999px; box-shadow: var(--shadow); }
.admin-pills a.on { background: var(--ink); color: var(--bg); }
@media (max-width: 760px) {
  .admin-pills { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; }
  .admin-pills a { text-align: center; border-radius: var(--radius-s); padding: 12px 8px; font-size: 13.5px; white-space: normal; }
  .person { flex-direction: column; align-items: stretch; }
  .person .acts .btn { flex: 1; }
  .wins { flex-direction: column; align-items: flex-start; }
  .meta .since { margin-inline-start: 0; }
  .list-tools { margin-top: 12px; }
}
[hidden] { display: none !important; }
.see-more { justify-self: start; text-align: start; display: inline-block; }

/* ---------------------------------------------------------------- 0.7: demo store */
.tag.t-demo, .t-demo { background: #FEF3C7; color: #92400E; }
.demo-tools { background: #1F2937; color: #E5E7EB; font-size: 13px; padding: 7px 0; }
.demo-tools .wrap { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.demo-tools a, .demo-tools .linklike { color: #FDE68A; font-weight: 600; }
.demo-chip { position: fixed; inset-inline-start: 12px; bottom: 12px; z-index: 30; font: 600 10.5px/1 var(--body); letter-spacing: .06em; text-transform: uppercase;
  color: rgba(15, 23, 42, .55); background: rgba(255, 255, 255, .72); border: 1px solid rgba(15, 23, 42, .08); padding: 5px 8px; border-radius: 999px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); pointer-events: none; }
.has-bottombar .demo-chip { bottom: calc(76px + env(safe-area-inset-bottom)); }
.in-frame .demo-tools, .in-frame .asbar, .in-frame .testbar, .in-frame .staff-only { display: none !important; }
.demo-panel .row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }

/* 0.7 ------------------------------------------------------------------ calm motion (Apple-like)
   Motion always says something: what is new, what is alive, what changed. Short, soft, then still. */
:root { --ease-out: cubic-bezier(.2, .8, .2, 1); --ease-spring: cubic-bezier(.34, 1.4, .64, 1); }
@keyframes sr-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes sr-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sr-breathe { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent); }
  50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 24%, transparent); } }
@keyframes sr-ping { 0% { transform: scale(1); opacity: .55; } 80%, 100% { transform: scale(2.6); opacity: 0; } }
@keyframes sr-draw { from { stroke-dashoffset: 1; } }
@keyframes sr-ring { from { stroke-dashoffset: var(--c); } }
@keyframes sr-grow { from { transform: scaleX(0); } }
@keyframes sr-pop { 0% { opacity: 0; transform: translateY(-8px) scale(.97); } 60% { opacity: 1; transform: translateY(1px) scale(1.005); } 100% { transform: none; } }
@keyframes sr-shine { from { transform: translateX(-120%) skewX(-18deg); } to { transform: translateX(260%) skewX(-18deg); } }
@keyframes sr-shimmer { from { background-position: -240px 0; } to { background-position: 240px 0; } }

/* Things arrive softly, one after the other */
.cards > .card, .kpis > .kpi, .stats > .stat, .tiles > .tile, .grid-main > aside > .panel, .side > .panel, main > .hero, main > .panel, main > section.panel {
  animation: sr-rise .55s var(--ease-out) backwards; }
.cards > .card:nth-child(2), .kpis > .kpi:nth-child(2), .stats > .stat:nth-child(2), .tiles > .tile:nth-child(2) { animation-delay: .05s; }
.cards > .card:nth-child(3), .kpis > .kpi:nth-child(3), .stats > .stat:nth-child(3), .tiles > .tile:nth-child(3) { animation-delay: .1s; }
.cards > .card:nth-child(4), .tiles > .tile:nth-child(4) { animation-delay: .15s; }
.cards > .card:nth-child(5) { animation-delay: .2s; } .cards > .card:nth-child(n+6) { animation-delay: .24s; }

/* A card nobody opened yet breathes twice, then rests; its "New" dot keeps a slow, quiet pulse */
.card:has(.badge-new) { position: relative; }
.card:has(.badge-new)::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; animation: sr-breathe 1.8s ease-in-out .9s 2; }
.badge-new { position: relative; padding-inline-start: 18px; }
.badge-new::before, .badge-new::after { content: ""; position: absolute; inset-inline-start: 7px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: currentColor; }
.badge-new::after { animation: sr-ping 2.4s var(--ease-out) infinite; }

/* The app is alive: the "Updated" dot */
.when .dot.ok { position: relative; }
.when .dot.ok::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #4ADE80; animation: sr-ping 2.8s var(--ease-out) infinite; }

/* Charts draw themselves; bars grow; rings close */
.spark polyline { stroke-dasharray: 1; animation: sr-draw 1.2s .25s var(--ease-out) backwards; }
.spark circle { animation: sr-fade .3s 1.3s both; }
.goal-track .done, .setup-track > span, .panel.health .bar > span, .step .bar > span, .bar-fill { transform-origin: left center; animation: sr-grow .9s .15s var(--ease-out) backwards; }
.ring { display: block; flex: none; }
.ring .ring-bg { stroke: color-mix(in srgb, var(--brand) 14%, transparent); }
.ring .ring-fg { stroke: var(--brand); animation: sr-ring 1.3s .2s var(--ease-out) backwards; }
.ring-wrap { position: relative; display: inline-grid; place-items: center; }
.ring-wrap .ring-num { position: absolute; font: 800 19px/1 var(--display); color: var(--brand); }
.panel.health .score.ring-wrap { font-size: 0; }
.goal-title { display: inline-flex; align-items: center; gap: 10px; }
.setup-top .ring { margin-inline-end: -2px; }

/* Good news pops in with one soft shine */
.wins { position: relative; overflow: hidden; animation: sr-pop .7s var(--ease-spring) backwards; }
.wins::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 38%; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); animation: sr-shine 1.4s .6s ease-in-out both; }
.wins-icon { animation: sr-pop .6s .25s var(--ease-spring) backwards; }

/* Touch feedback, and the active topic slides into place */
.btn, .pills a, .bottombar a, .filters a, .results-tabs a { transition: transform .18s var(--ease-out), background-color .2s, color .2s, box-shadow .2s; }
.btn:active, .pills a:active, .filters a:active { transform: scale(.97); }
.card.clickable { transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out); }
.card.clickable:hover { transform: translateY(-2px); }
.card.clickable:active { transform: scale(.992); }
.pills { position: relative; }
.pills .slider { position: absolute; z-index: 0; top: 0; left: 0; height: calc(100% - 2px); border-radius: 999px; background: var(--ink); transition: transform .45s var(--ease-out), width .45s var(--ease-out); pointer-events: none; }
.pills.has-slider a { position: relative; z-index: 1; }
.pills.has-slider a.on { background: transparent; }
.pills.sliding a.on { color: var(--ink); } .pills.sliding a.on .n { color: var(--muted); }

/* Folded parts open without a jump */
details[open] > :not(summary) { animation: sr-fade .3s var(--ease-out); }
details.fold-panel { border: 1px solid var(--line); border-radius: var(--radius-s); margin-top: 10px; }
details.fold-panel > summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; padding: 12px 14px; list-style: none; }
details.fold-panel > summary::-webkit-details-marker { display: none; }
details.fold-panel > summary .fold-hint { color: var(--link); font-size: 13px; font-weight: 600; white-space: nowrap; }
details.fold-panel > summary .fold-hint::after { content: " ▾"; display: inline-block; transition: transform .25s var(--ease-out); }
details.fold-panel[open] > summary .fold-hint { font-size: 0; }
details.fold-panel[open] > summary .fold-hint::after { content: "Hide ▴"; font-size: 13px; }
details.fold-panel > :not(summary) { padding: 0 14px 14px; }

/* While something loads: grey lines with a soft shine, never a blank space */
.skeleton { display: grid; gap: 10px; padding: 6px 0; }
.skeleton i { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2) 0, var(--line) 50%, var(--surface-2) 100%) 0 0 / 480px 100%;
  animation: sr-shimmer 1.2s linear infinite; }
.skeleton i:nth-child(2) { width: 88%; } .skeleton i:nth-child(3) { width: 64%; }
form[data-busy].busy button { opacity: .7; pointer-events: none; }

/* 0.7: changes made by hand, several areas at once */
fieldset.areas { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 16px; }
fieldset.areas legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.area-verdicts { list-style: none; padding: 0; margin: 6px 0 0; font-size: 13px; display: grid; gap: 3px; }
.area-verdicts .v-better strong { color: var(--good); } .area-verdicts .v-worse strong { color: var(--err); }

/* Anyone who asked the phone or computer to reduce motion gets a still app */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* 0.7: the number tiles on a phone use the whole width and big amounts never spill out */
@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stats > .stat:only-child, .stats > .stat:nth-child(odd):last-child:not(.wide) { grid-column: 1 / -1; }
  .stat { padding: 14px 16px; }
  .stat strong { font-size: 22px; overflow-wrap: anywhere; }
}

/* ---------------------------------------------------------------- 1.0: Arabic, right to left
   Spacing above uses logical properties (inline-start/end), so it follows dir="rtl" by itself.
   Here: the Arabic fonts (served from assets/fonts, only downloaded for Arabic letters), and what must be
   mirrored by hand: arrows, bars and charts that grow from one side, and the shine that sweeps across. */
@font-face { font-family: "Noto Sans Arabic"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/noto-sans-arabic-arabic-400-normal.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Noto Sans Arabic"; font-style: normal; font-weight: 500 600; font-display: swap; src: url(fonts/noto-sans-arabic-arabic-600-normal.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Noto Sans Arabic"; font-style: normal; font-weight: 700 900; font-display: swap; src: url(fonts/noto-sans-arabic-arabic-700-normal.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Noto Kufi Arabic"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/noto-kufi-arabic-arabic-600-normal.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Noto Kufi Arabic"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/noto-kufi-arabic-arabic-700-normal.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Noto Kufi Arabic"; font-style: normal; font-weight: 800 900; font-display: swap; src: url(fonts/noto-kufi-arabic-arabic-800-normal.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

/* Latin letters and numbers keep Inter; Arabic letters use Noto (Kufi for headings, Sans for reading). */
:root[lang="ar"] {
  --display: "Inter Tight", "Inter", "Noto Kufi Arabic", "Noto Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --body: "Inter", "Noto Sans Arabic", "Noto Naskh Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
}
[lang="ar"] body { line-height: 1.7; }
/* Spacing between letters breaks the joined Arabic letters, and Arabic has no capitals. */
[lang="ar"] *, [lang="ar"] *::before, [lang="ar"] *::after { letter-spacing: 0 !important; text-transform: none !important; }
[lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3, [lang="ar"] .card-title, [lang="ar"] .detail h1, [lang="ar"] .season strong { line-height: 1.45; }
[lang="ar"] .kpi strong, [lang="ar"] .stat strong, [lang="ar"] .money strong, [lang="ar"] .tile strong { line-height: 1.3; }
[lang="ar"] .meta, [lang="ar"] .card-action b, [lang="ar"] .compare b, [lang="ar"] .block h2, [lang="ar"] .hero .date,
[lang="ar"] .season b, [lang="ar"] .eng, [lang="ar"] .task .urgent, [lang="ar"] .testbar { font-size: 13px; }
[lang="ar"] .card-do { line-height: 1.7; }
[lang="ar"] .bottombar a { font-size: 11px; line-height: 1.3; }

/* Addresses, numbers, codes and phone numbers are always written left to right, even inside Arabic. */
[dir="rtl"] input[type=number], [dir="rtl"] input[type=email], [dir="rtl"] input[type=url], [dir="rtl"] input[type=tel],
[dir="rtl"] input[type=password], [dir="rtl"] input[type=color] { direction: ltr; text-align: right; }
[dir="rtl"] input[type=email]::placeholder, [dir="rtl"] input[type=url]::placeholder, [dir="rtl"] input[type=tel]::placeholder { direction: rtl; }
[dir="rtl"] code { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] pre, [dir="rtl"] pre.code { direction: ltr; text-align: left; unicode-bidi: isolate; }

/* Arrows and chevrons point the other way. */
[dir="rtl"] .details-btn svg, [dir="rtl"] .back svg, [dir="rtl"] svg.flip-rtl, [dir="rtl"] .flip-rtl { transform: scaleX(-1); }
/* The "›" of folded parts is mirrored by the browser itself in right-to-left text (it becomes "‹"), so it turns the other way to open. */
[dir="rtl"] details.fold[open] > summary::before { transform: rotate(-90deg); }
/* Card icons that show a direction (trend lines, undo/redo circles, megaphone, truck, cart) are mirrored; symbols like $ are not. */
[dir="rtl"] .icon svg:has(path[d^="M3 3v18h18"]), [dir="rtl"] .icon svg:has(path[d^="M3 17l6-6 4 4 8-8"]),
[dir="rtl"] .icon svg:has(path[d^="M3 12a9 9 0 1 0 3-6.7"]), [dir="rtl"] .icon svg:has(path[d^="M21 12a9 9 0 1 1-3-6.7"]),
[dir="rtl"] .icon svg:has(path[d^="M3 11l18-8v18L3 13z"]), [dir="rtl"] .icon svg:has(path[d^="M1 3h15v13H1z"]),
[dir="rtl"] .icon svg:has(path[d^="M2 3h3l2.6 12.4"]), [dir="rtl"] .icon svg:has(path[d^="M17 11h6"]) { transform: scaleX(-1); }

/* Bars fill from the right; charts read from right to left (the newest point sits on the left end). */
[dir="rtl"] .setup-track > span, [dir="rtl"] .panel.health .bar > span, [dir="rtl"] .step .bar > span, [dir="rtl"] .bar-fill { transform-origin: right center; }
[dir="rtl"] .goal-track { transform: scaleX(-1); } /* the bar and the pace mark (placed with left: in the page) swap sides together */
[dir="rtl"] .spark, [dir="rtl"] .ring { transform: scaleX(-1); }
[dir="rtl"] .card.is-old { box-shadow: inset -3px 0 0 #F59E0B, var(--shadow); }
[dir="rtl"] .wins::after { left: auto; right: 0; background: linear-gradient(270deg, transparent, rgba(255, 255, 255, .55), transparent); animation-name: sr-shine-rtl; }
@keyframes sr-shine-rtl { from { transform: translateX(120%) skewX(18deg); } to { transform: translateX(-260%) skewX(18deg); } }
[dir="rtl"] .skeleton i { animation-direction: reverse; }
[dir="rtl"] .more-menu .menu { text-align: start; }

/* 1.1 ------------------------------------------------------------------------------ */
.tag.t-ok { background: var(--act-soft); border-color: transparent; color: var(--act); }
.install-bar { background: var(--surface-2); border-bottom: 1px solid var(--line-2); padding: 10px 0; font-size: 14px; }
.install-bar .wrap { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.install-bar .ios-steps { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.install-bar .ios-steps span { display: inline-flex; align-items: center; gap: 6px; }
.install-bar [data-install-close] { margin-inline-start: auto; }
.qr-box { margin-top: 10px; }
.qr-box [data-qr] { width: 200px; max-width: 70vw; background: #fff; padding: 6px; border-radius: 10px; border: 1px solid var(--line-2); }
.qr-box svg { display: block; width: 100%; height: auto; }
.device-list li { padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.device-list li:last-child { border-bottom: 0; }
.phone-link .row { display: flex; flex-wrap: wrap; gap: 8px; }
.task-contacts { margin: 10px 0; display: grid; gap: 10px; }
.task-contact { border: 1px solid var(--line-2); border-radius: var(--radius-s); padding: 10px 12px; background: var(--surface); }
.task-contact .row-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ready-list { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.ready-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-s); }
.ready-list .tick { flex: 0 0 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); font-weight: 700; font-size: 13px; }
.ready-list li.done .tick { background: var(--act-soft); color: var(--act); }
.setup-wait { display: flex; align-items: center; gap: 8px; margin: 12px 0; color: var(--ink-2); font-size: 14px; }
.spinner { width: 14px; height: 14px; border: 2px solid var(--line-2); border-top-color: var(--brand); border-radius: 50%; display: inline-block; animation: sr-spin 1s linear infinite; }
@keyframes sr-spin { to { transform: rotate(360deg); } }
.sa-box { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius-s); }
.sa-box code { font-size: 15px; font-weight: 700; word-break: break-all; }
.panel.mini { padding: 14px 16px; margin: 0; }
.panel.mini h2 { font-size: 16px; }
.g-state { color: var(--act); }
.btn.big { padding: 14px 22px; font-size: 16px; }
.small-head { font-size: 14px; margin: 16px 0 6px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.finish-setup .setup-track { display: block; margin: 4px 0 10px; }
.finish-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.finish-list li { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; padding: 8px 0; border-top: 1px solid var(--line-2); }
.finish-list li:first-child { border-top: 0; }
.health-groups { display: grid; gap: 4px; margin-top: 10px; }
.hgroup summary { list-style: none; display: grid; grid-template-columns: 1fr 90px; gap: 10px; align-items: center; cursor: pointer; font-size: 14px; padding: 4px 0; }
.hgroup summary::-webkit-details-marker { display: none; }
.hgroup summary > span:first-child::after { content: " ›"; color: var(--muted); }
.hgroup[open] summary > span:first-child::after { content: " ⌄"; }
.health .hgroup .parts { margin: 4px 0 10px; padding-inline-start: 10px; border-inline-start: 2px solid var(--line-2); }
.health .hgroup .parts li { display: block; }
.health .part-row { display: grid; grid-template-columns: 1fr 90px; gap: 10px; align-items: center; }

/* 1.1 Store checkup */
.ck-score .ring-wrap { position: relative; display: inline-grid; place-items: center; }
.ck-score .ring-num { position: absolute; font-size: 24px; font-weight: 800; }
.ck-sum { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; }
.ck-sum .small-note { flex: 1 1 260px; margin: 0; }
.ck-counts { display: flex; gap: 14px; flex-wrap: wrap; }
.ck-c { font-size: 14px; }
.ck-c strong { font-size: 20px; }
.ck-c.miss strong { color: var(--bad, #B91C1C); }
.ck-c.warn strong { color: #B45309; }
.ck-c.ok strong { color: var(--good, #15803D); }
.ck-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; }
.ck-item summary { list-style: none; display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; cursor: pointer; padding: 8px 0; border-top: 1px solid var(--line-2); }
.ck-item summary::-webkit-details-marker { display: none; }
.ck-ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: var(--muted); }
.ck-item.ok .ck-ic { background: var(--good, #15803D); }
.ck-item.warn .ck-ic { background: #D97706; }
.ck-item.miss .ck-ic { background: var(--bad, #B91C1C); }
.ck-t { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.ck-t .small-note { flex-basis: 100%; }
.ck-body { padding: 0 0 10px 36px; }
[dir="rtl"] .ck-body { padding: 0 36px 10px 0; }
.ck-body p { margin: 4px 0; }
.ck-ex { margin: 6px 0 0; padding-inline-start: 18px; }
.ck-ex code { font-size: 12px; word-break: break-all; }
.ok-tag { background: #DCFCE7; border-color: #86EFAC; color: #166534; }
.ck-t .small-note { font-weight: 400; }
.row-actions + .hint { margin-top: 10px; }

/* 1.2 */
.more-menu .menu a.on { background: var(--surface-2); font-weight: 700; }
.qbar { display: block; height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; margin: 6px 0 2px; min-width: 60px; }
.qbar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.qbar.high > span { background: var(--warn); }
.qbar.full > span { background: var(--err); }
.qbar.thin { height: 6px; margin: 0; }
.day-bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 13px; }
.day-bars li { display: grid; grid-template-columns: 7.5em 1fr auto; gap: 10px; align-items: center; }
.team-item h3, .pattern h3 { margin: 6px 0 4px; font-size: 17px; }
.team-item .money { font-family: var(--display); }
.advice-box { margin-top: 12px; padding: 12px; border-radius: var(--radius-s); background: var(--surface-2); }
.advice-box textarea { width: 100%; }
.ck-item.off { opacity: .65; }
.pattern.broken { border-inline-start: 4px solid var(--warn); }
.pattern .do-box { margin: 8px 0; }
.explore-head { margin: 4px 0 12px; font-size: 15.5px; }
.table.explore th[scope=row] { text-align: start; font-weight: 600; white-space: nowrap; }
.table.explore td { position: relative; white-space: nowrap; }
.table.explore td.x-hi { background: color-mix(in srgb, var(--act) calc(var(--o) * 32%), transparent); }
.table.explore td.x-lo { background: color-mix(in srgb, var(--warn) calc(var(--o) * 32%), transparent); }
.explore-form label, .heat-controls label { display: inline-flex; gap: 6px; align-items: center; }
.heat-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; margin: 14px 0; }
.heat-map { min-height: 460px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--surface-2); }
.heat-list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; max-height: 520px; overflow: auto; }
.heat-layout .heat-list:only-child { grid-column: 1 / -1; max-height: none; }
.area-list { margin: 0; padding-inline-start: 1.4em; display: grid; gap: 4px; }
.area-list summary { cursor: pointer; }
.area-list .num { float: inline-end; font-weight: 700; }
.map-info { font: 13px/1.45 var(--body); color: #0B1220; max-width: 260px; }
.map-info ul { margin: 6px 0 0; padding-inline-start: 1.1em; }
.profiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.profile .kv { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0 10px; color: var(--ink-2); }
.comp-status { margin: 4px 0 10px; }
.comp-status .cs-ok { color: var(--good); }
.comp-status .cs-bad { color: var(--err); }
.comp-status .cs-wait { color: var(--muted); }
.team-links .row-actions { flex-wrap: wrap; }
@media (max-width: 760px) {
  .heat-layout { grid-template-columns: 1fr; }
  .heat-map { min-height: 340px; }
  .day-bars li { grid-template-columns: 6em 1fr auto; }
}
.more-patterns > summary { list-style: none; margin: 6px 0 14px; display: inline-flex; }
.more-patterns > summary::-webkit-details-marker { display: none; }

/* 1.2.1: what a customer has bought */
.bought-box { margin-top: 12px; }
.bought-box .table-wrap, .person-bought .table-scroll { max-height: 460px; overflow: auto; }
.bought-table td.gift-cell { text-align: end; white-space: nowrap; }
.bought-table tr.is-gift td { background: color-mix(in srgb, var(--accent, #2F6BFF) 8%, transparent); }
.bought-table form { margin: 0; }
.person-bought { margin-top: 6px; }
.person-bought > summary { cursor: pointer; }
.person-bought .table { margin-top: 6px; font-size: .92em; }
.gift form.inline { display: inline; margin-inline-start: 6px; }

/* ================================================================ 1.3 */
/* Attention budget: the phone shows the first 5 cards; the counters say how many wait. */
.phone-only { display: none; }
@media (max-width: 760px) {
  .card.over-phone { display: none; }
  .phone-only { display: block; }
  .desk-only { display: none; }
}
.card-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.card-btns .move-form { margin: 0; }
.card-btns .more-btn { min-height: 44px; }
.card.is-moved { opacity: .82; }
@media (max-width: 760px) {
  .card-btns { width: 100%; }
  .card-btns .more-btn, .card-btns .details-btn { flex: 1; justify-content: center; }
  .card-btns .move-form { width: 100%; text-align: end; }
}
/* Group by type */
.card-group { margin: 0 0 14px; border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px 2px; background: var(--surface); }
.card-group > summary { cursor: pointer; font-weight: 700; padding: 6px 4px 8px; list-style: none; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.card-group > summary::-webkit-details-marker { display: none; }
.card-group > summary::before { content: "▾"; color: var(--muted); font-size: 12px; }
.card-group:not([open]) > summary::before { content: "▸"; }
.card-group .group-name { font-size: 16px; }
.group-tools { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 4px 10px; }
.moved-fold { margin-top: 12px; }
.ask-type { border-inline-start: 4px solid var(--brand); }
.ask-type p { margin: 0 0 8px; }
/* Tools page */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tool-tile { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: inherit; text-decoration: none; }
.tool-tile:hover { border-color: var(--brand); }
.tool-tile strong { display: block; margin-bottom: 4px; }
.tool-tile span { color: var(--muted); font-size: 13.5px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 14px; align-items: end; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.note-list { list-style: none; padding: 0; margin: 0; }
.note-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.pill-state { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: var(--surface-2); color: var(--ink-2); }
.pill-state.good { background: var(--act-soft); color: var(--good); }
.pill-state.bad { background: var(--err-soft); color: var(--err); }
.pill-state.warn { background: var(--warn-soft); color: var(--warn); }
.free-map { height: 420px; border-radius: 14px; overflow: hidden; }
.map-credit { font-size: 11px; color: var(--muted); }

/* 1.4: reactivation emails and Conversations. */
.topnav a .n, .menu a .n { display: inline-block; min-width: 18px; padding: 0 6px; margin-inline-start: 4px; border-radius: 9px; background: var(--warn); color: #FFFFFF; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.pills a .n.hot { background: var(--warn); color: #FFFFFF; border-radius: 9px; padding: 0 6px; }
.mail-queue { display: grid; gap: 12px; margin: 12px 0; }
.mail-draft { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface); }
.mail-draft.is-approved { border-color: var(--good); background: var(--act-soft); }
.mail-draft-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.mail-draft-head label.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.mail-draft-head label.check input { width: 20px; height: 20px; }
.mail-subject { margin: 10px 0 4px; }
.mail-body { white-space: normal; line-height: 1.55; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); color: var(--ink); overflow-wrap: anywhere; }
.mail-thread { display: grid; gap: 10px; margin: 12px 0 16px; }
.mail-msg { max-width: 78%; }
.mail-msg.dir-in, .mail-msg.dir-aut { justify-self: start; }
.mail-msg.dir-out, .mail-msg.dir-first { justify-self: end; }
.mail-msg.dir-out .mail-body, .mail-msg.dir-first .mail-body { background: var(--act-soft); }
.mail-msg.dir-aut .mail-body { opacity: .75; font-style: italic; }
.readonly-box { border: 1px dashed var(--line-2); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); }
.readonly-box dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 8px 0 0; }
.readonly-box dt { color: var(--muted); }
.readonly-box dd { margin: 0; }
.dns-table td code { overflow-wrap: anywhere; font-size: 12px; }
@media (max-width: 640px) { .mail-msg { max-width: 100%; } }
.form .angles-box { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 18px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.form .angles-box legend { padding: 0 6px; }
.form .angles-box label.check { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; text-align: start; font-weight: 500; margin: 0; }
.form .angles-box label.check input { width: 18px; height: 18px; margin: 0; flex: none; }
.actions + .hint { margin-top: 12px; }

/* 1.5 ideas board */
.pills.idea-pills { display: flex; } /* also on phones, where the Today pills give way to the bottom bar */
.idea-kinds { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: -6px 0 16px; font-size: 14px; }
.idea-kinds a { color: var(--muted); text-decoration: none; font-weight: 600; padding: 2px 0; border-bottom: 2px solid transparent; }
.idea-kinds a.on { color: var(--ink); border-bottom-color: var(--accent); }
.idea-list { display: grid; gap: 12px; margin-bottom: 14px; }
.idea { display: flex; gap: 18px; align-items: flex-start; background: var(--surface); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow); border: 1px solid transparent; }
.idea.voted { border-color: var(--act-soft); }
.idea-vote { flex: none; width: 92px; display: grid; justify-items: center; gap: 2px; text-align: center; }
.idea-vote strong { font: 800 26px/1 var(--display); color: var(--ink); }
.idea-vote > span { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.idea-vote form { margin: 0; }
.idea-vote .btn { padding: 0 12px; }
.idea-body { flex: 1; min-width: 0; }
.idea-body h2 { margin: 6px 0 4px; font-size: 18px; }
.idea-body p { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.idea-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.idea-meta .tag { margin: 0; }
.tag.t-fix { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.form label.check.idea-urgent[hidden], .form [data-for][hidden] { display: none; }
.idea-shot { max-width: 100%; max-height: 360px; border: 1px solid var(--line); border-radius: 10px; }
.idea-sub { margin-top: 22px !important; }
.idea-admin { align-items: start; }
.idea-lang { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 14px; display: grid; gap: 10px; margin: 0; }
.idea-lang legend { padding: 0 6px; font-weight: 700; font-size: 13.5px; }
@media (max-width: 640px) {
  .idea { padding: 14px 16px; gap: 12px; }
  .idea-vote { width: 72px; }
  .idea-admin { grid-template-columns: 1fr; }
}

/* 1.5 website demo visitors */
.demo15-bar { background: #FFF7E6; color: #7A4B00; border-bottom: 1px solid #F5D9A6; padding: 9px 16px; font-size: 14px; text-align: center; }
.demo15-bar a { color: inherit; font-weight: 700; text-decoration: underline; }

/* 1.5 Admin > Website */
.web15-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 18px; }
.web15-2 h3 { margin: 0 0 8px; font-size: 15px; }
.kpis.web15-k { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.web-mail { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 0 0 12px; }
.web-mail summary { cursor: pointer; }
.web-text-field { margin: 0 0 14px; }
.web-text-field .path { font: 12px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); display: block; margin-bottom: 4px; }
.web-text-field.changed textarea, .web-text-field.changed input { border-color: var(--brand); }
.web-text-field .orig { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
@media (max-width: 760px) { .web15-2, .kpis.web15-k { grid-template-columns: 1fr; } }
.web15-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.web15-actions form { margin: 0; }
td.web15-actions { margin: 0; }
