/* Adulting Hub – styles
   Light theme by default. Dark theme follows the device setting,
   unless the person picks one with the ☀️/🌙 switch. */

:root {
  --bg: #fbf8f3;
  --bg-2: #f3eee5;
  --surface: #ffffff;
  --surface-2: #f4f0e8;
  --text: #1c2026;
  --muted: #5c636e;
  --line: #e6e0d5;
  --brand: #3b5bdb;
  --brand-2: #7c3aed;
  --brand-ink: #ffffff;
  --brand-soft: #e8ecff;
  --good: #1f8a5b;
  --good-soft: #def5e9;
  --warn: #b45309;
  --warn-soft: #fdecd8;
  --tip-soft: #fff4cc;
  --danger: #c62828;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(28,32,38,.04), 0 6px 20px rgba(28,32,38,.06);
  --shadow-hover: 0 4px 10px rgba(28,32,38,.06), 0 14px 32px rgba(28,32,38,.10);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --read: 70ch;
  color-scheme: light;
}

/* Dark theme values (used by the switch and by the device setting) */
:root[data-theme="dark"] {
  --bg: #111318; --bg-2: #171a21; --surface: #1b1f27; --surface-2: #242934; --text: #eef1f6; --muted: #a7afbc;
  --line: #2e3440; --brand: #8da2ff; --brand-2: #b794ff; --brand-ink: #0e1220; --brand-soft: #232b48;
  --good: #5fd39c; --good-soft: #17342a; --warn: #f5a35c; --warn-soft: #3a2a19; --tip-soft: #3a3418;
  --danger: #ff8a80; --shadow: 0 1px 2px rgba(0,0,0,.35); --shadow-hover: 0 10px 28px rgba(0,0,0,.45);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111318; --bg-2: #171a21; --surface: #1b1f27; --surface-2: #242934; --text: #eef1f6; --muted: #a7afbc;
    --line: #2e3440; --brand: #8da2ff; --brand-2: #b794ff; --brand-ink: #0e1220; --brand-soft: #232b48;
    --good: #5fd39c; --good-soft: #17342a; --warn: #f5a35c; --warn-soft: #3a2a19; --tip-soft: #3a3418;
    --danger: #ff8a80; --shadow: 0 1px 2px rgba(0,0,0,.35); --shadow-hover: 0 10px 28px rgba(0,0,0,.45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--font); transition: background-color .25s ease, color .25s ease; }
a { color: var(--brand); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
h1[tabindex="-1"]:focus, h1[tabindex="-1"]:focus-visible { outline: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--brand); color: var(--brand-ink); padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }

/* ---------- header ---------- */
.topbar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1080px; margin: 0 auto; padding: 10px 18px; display: flex; align-items: center; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.12rem; text-decoration: none; color: var(--text); letter-spacing: -.01em; }
.logo-mark { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; display: grid; place-items: center; font-size: 1.1rem; box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 35%, transparent); }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a { text-decoration: none; color: var(--muted); padding: 8px 14px; border-radius: 999px; font-size: .95rem; font-weight: 600; transition: background .15s, color .15s; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--brand-soft); color: var(--brand); }
.theme-toggle { flex: none; width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 1.15rem; display: grid; place-items: center; transition: transform .2s ease; }
.theme-toggle:hover { transform: rotate(-15deg) scale(1.05); }

main { max-width: 1080px; margin: 0 auto; padding: 24px 18px 64px; animation: fadeUp .35s ease both; }
.footer { max-width: 1080px; margin: 0 auto; padding: 24px 18px 40px; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); }
.footer a { color: var(--muted); }

.tabbar { display: none; }
@media (max-width: 720px) {
  .nav { display: none; }
  .account-btn { margin-left: auto; }
  body { padding-bottom: 76px; }
  .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { flex: 1; text-align: center; text-decoration: none; color: var(--muted); font-size: .74rem; font-weight: 650; padding: 5px 0; border-radius: 12px; }
  .tabbar a span { display: block; font-size: 1.3rem; line-height: 1.25; }
  .tabbar a.active { color: var(--brand); background: var(--brand-soft); }
}

/* ---------- type ---------- */
h1 { font-size: clamp(1.7rem, 4.2vw, 2.4rem); line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.02em; }
h2 { font-size: 1.32rem; line-height: 1.3; margin: 1.8em 0 .6em; letter-spacing: -.01em; }
h2.first { margin-top: 0; }
h3 { font-size: 1.1rem; margin: 1.3em 0 .4em; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: var(--read); margin: 0 0 1.2em; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }

/* ---------- cards ---------- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
a.card { display: block; text-decoration: none; color: inherit; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: color-mix(in srgb, var(--c, var(--brand)) 45%, var(--line)); }
.card h3 { margin: 0 0 4px; font-size: 1.07rem; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.card-row { display: flex; align-items: flex-start; gap: 14px; }
.icon-bubble { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; background: var(--surface-2); }
.icon-bubble.tinted { background: color-mix(in srgb, var(--c, var(--brand)) 16%, var(--surface)); }
.item-card { border-left: 5px solid var(--c, var(--brand)); }
.item-card.is-complete { background: color-mix(in srgb, var(--good) 6%, var(--surface)); }

.topic-card { position: relative; overflow: hidden; padding-top: 18px; }
.topic-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--c); }
.topic-card::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: color-mix(in srgb, var(--c) 10%, transparent); transition: transform .3s ease; }
.topic-card:hover::after { transform: scale(1.25); }
.topic-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; position: relative; z-index: 1; }
.topic-icon { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; font-size: 1.5rem; background: color-mix(in srgb, var(--c, var(--brand)) 16%, var(--surface)); flex: none; }
.topic-count { font-size: .78rem; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface)); padding: 3px 10px; border-radius: 999px; }
.topic-progress { margin-top: 14px; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.topic-progress .progress > span { background: var(--c); }
.quick-card { display: flex !important; gap: 14px; align-items: center; }
.level-card { display: flex !important; gap: 16px; align-items: flex-start; }
.level-num { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; color: #fff; background: var(--lv); }
.lv1 { --lv: #1f8a5b; } .lv2 { --lv: #3b5bdb; } .lv3 { --lv: #d97706; } .lv4 { --lv: #7c3aed; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(135deg, #3b5bdb 0%, #6d47e0 55%, #c2459b 100%); color: #fff; border-radius: 26px; padding: 34px 28px 28px; margin-bottom: 30px; box-shadow: 0 16px 40px rgba(59,91,219,.25); }
.hero-inner { position: relative; z-index: 1; max-width: 720px; }
.hero-blob { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .35; animation: float 9s ease-in-out infinite; }
.hero-blob.b1 { width: 260px; height: 260px; right: -60px; top: -80px; background: #ffd166; }
.hero-blob.b2 { width: 180px; height: 180px; right: 120px; bottom: -90px; background: #06d6a0; animation-delay: -4s; }
.hero h1 { color: #fff; font-size: clamp(1.6rem, 4.4vw, 2.5rem); }
.hero p { color: rgba(255,255,255,.92); margin: 0 0 18px; max-width: 60ch; }
.hero-kicker { font-weight: 700; letter-spacing: .02em; margin-bottom: 6px !important; opacity: .95; }
.hero .search { margin-bottom: 18px; }
.hero-progress { display: block; color: #fff; text-decoration: none; max-width: 460px; }
.hero .progress { background: rgba(255,255,255,.25); }
.hero .progress > span { background: #fff; }
.hero .progress-label { color: rgba(255,255,255,.95); }
.search { display: flex; gap: 8px; }
.search input { flex: 1; min-width: 0; padding: 13px 16px; border-radius: 14px; border: 0; color: #1c2026; background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.hero .search .btn { background: #1c2026; color: #fff; border-color: #1c2026; }

/* ---------- BudgetNest feature ---------- */
.bn-feature { background: linear-gradient(135deg, color-mix(in srgb, #0f766e 12%, var(--surface)), var(--surface) 60%); border-color: color-mix(in srgb, #0f766e 35%, var(--line)); }
.bn-feature-inner { display: flex; gap: 18px; align-items: flex-start; }
.bn-feature .btn-row { margin-top: 14px; }
.bn-logo { flex: none; width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; font-size: 1.9rem; background: linear-gradient(135deg, #14b8a6, #0f766e); box-shadow: 0 6px 16px rgba(15,118,110,.3); }

/* ---------- badges & progress ---------- */
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.badge.guide { background: var(--brand-soft); color: var(--brand); }
.badge.checklist { background: var(--good-soft); color: var(--good); }
.badge.done { background: var(--good); color: #fff; }
.badge.lv1, .badge.lv2, .badge.lv3, .badge.lv4 { background: color-mix(in srgb, var(--lv) 14%, var(--surface)); color: var(--lv); }
.meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.progress { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--good), #34d399); border-radius: 999px; transition: width .5s cubic-bezier(.2,.8,.2,1); }
.progress-label { display: flex; justify-content: space-between; font-size: .86rem; color: var(--muted); margin-bottom: 6px; font-weight: 600; }

/* ---------- article ---------- */
.article { max-width: var(--read); }
.article .card { padding: 24px 26px; }
.article h2 { font-size: 1.15rem; margin: 1.4em 0 .4em; color: var(--c, var(--text)); }
.article .card > h2:first-child { margin-top: 0; }
.article ul, .article ol { padding-left: 1.3em; }
.article li { margin: .35em 0; }
.page-head { display: flex; gap: 16px; align-items: center; margin-bottom: 8px; }
.page-head .topic-icon { width: 60px; height: 60px; font-size: 1.8rem; border-radius: 18px; }
.page-head h1 { margin: 0; }
.callout { display: flex; gap: 10px; padding: 13px 15px; border-radius: 14px; margin: 1em 0; }
.callout.tip { background: var(--tip-soft); }
.callout.warn { background: var(--warn-soft); }
.callout-icon { flex: none; }

/* ---------- checklist ---------- */
.checklist { list-style: none; padding: 0; margin: 0; }
.check-item { display: flex; gap: 14px; padding: 14px 6px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 10px; transition: background .15s; }
.check-item:hover { background: var(--surface-2); }
li:last-child > .check-item { border-bottom: 0; }
.check-item input { flex: none; width: 24px; height: 24px; margin-top: 2px; accent-color: var(--good); cursor: pointer; }
.check-item .t { font-weight: 650; }
.check-item .w { color: var(--muted); font-size: .93rem; }
.check-item.is-done .t { text-decoration: line-through; color: var(--muted); }
.check-item.pop input { animation: pop .3s ease; }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 650; text-decoration: none; color: var(--text); transition: transform .12s ease, border-color .15s, box-shadow .15s; }
.btn:hover { border-color: var(--brand); }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--brand-ink); border-color: transparent; box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 30%, transparent); }
.btn.good { background: var(--good); color: #fff; border-color: var(--good); }
.btn.danger { color: var(--danger); }
.btn.small { padding: 6px 13px; font-size: .9rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 650; font-size: .95rem; }
.field .hint, .hint { font-size: .85rem; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); outline: none; }
textarea.input { min-height: 120px; resize: vertical; line-height: 1.5; }
.input-money { position: relative; }
.input-money::before { content: "£"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-money .input { padding-left: 26px; }
.form-grid { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* ---------- tools ---------- */
.tool-card .icon-bubble { background: color-mix(in srgb, var(--c, var(--brand)) 16%, var(--surface)); }
.result-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.result-table th, .result-table td { text-align: right; padding: 9px 8px; border-bottom: 1px solid var(--line); }
.result-table th:first-child, .result-table td:first-child { text-align: left; }
.result-table tr.total td { font-weight: 800; border-top: 2px solid var(--text); border-bottom: 0; }
.big-number { font-size: 2.2rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stack-bar { display: flex; height: 26px; border-radius: 10px; overflow: hidden; margin: 14px 0 8px; background: var(--surface-2); }
.stack-bar span { display: block; height: 100%; transition: width .4s ease; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .88rem; color: var(--muted); }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.hbar { display: grid; grid-template-columns: 110px 1fr 96px; gap: 10px; align-items: center; margin: 8px 0; font-variant-numeric: tabular-nums; }
.hbar strong { text-align: right; }
.hbar .bar { height: 22px; background: var(--surface-2); border-radius: 8px; overflow: hidden; }
.hbar .bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 8px; transition: width .4s ease; }
.icon-btn { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 1.1rem; padding: 6px; border-radius: 8px; }
.icon-btn:hover { background: var(--surface-2); color: var(--danger); }
.two-col { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1.05fr .95fr; align-items: start; } .sticky { position: sticky; top: 84px; } }
.notice { padding: 13px 15px; border-radius: 14px; background: var(--brand-soft); font-size: .95rem; }
.notice.error { background: var(--warn-soft); }
.notice.success { background: var(--good-soft); }
.bn-row { display: grid; gap: 8px; align-items: center; margin-bottom: 8px; }
.bn-head { font-size: .78rem; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.bn-steps { padding-left: 1.3em; margin: 0; }
.bn-steps > li { margin: 0 0 14px; }
.bn-steps ul { margin: 4px 0 0; padding-left: 1.1em; color: var(--muted); }
@media (max-width: 560px) {
  .bn-row { grid-template-columns: 1fr 1fr !important; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .bn-row > :first-child { grid-column: 1 / -1; }
  .bn-row .icon-btn { justify-self: start; }
  .bn-head { display: none; }
  .hbar { grid-template-columns: 64px 1fr 88px; }
  .bn-feature-inner { flex-direction: column; }
  .hero { padding: 26px 20px 22px; border-radius: 22px; }
}
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: 0; }
.empty { text-align: center; padding: 40px 10px; color: var(--muted); }

/* ---------- celebration ---------- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 100; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 10px; height: 14px; border-radius: 3px; animation: fall 1.6s ease-in forwards; }

/* ---------- motion ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes float { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-14px, 12px); } }
@keyframes pop { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes fall { to { transform: translateY(105vh) rotate(540deg); opacity: .2; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .confetti { display: none; }
}

@media print {
  .topbar, .tabbar, .footer, .btn-row, .no-print, .hero-blob, .confetti { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; padding: 0; }
  .card { box-shadow: none; border-color: #ccc; }
}
.article .card p, .article .card li { color: var(--text); font-size: 1rem; }
.article .card p { margin: 0 0 .8em; }

.callout.nest { background: color-mix(in srgb, #0f766e 12%, var(--surface)); border: 1px solid color-mix(in srgb, #0f766e 30%, var(--line)); }
.nest-label { color: #0f766e; }
:root[data-theme="dark"] .nest-label { color: #5eead4; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nest-label { color: #5eead4; } }
.nest-link { display: inline-block; margin-top: 6px; font-weight: 700; }

/* slim BudgetNest strip at the top of the home page */
.nest-strip { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; margin: -6px 0 16px; border-radius: 999px; font-size: .92rem;
  background: color-mix(in srgb, #0f766e 10%, var(--surface)); border: 1px solid color-mix(in srgb, #0f766e 28%, var(--line)); }
.nest-strip-icon { flex: none; font-size: 1.1rem; }
.nest-strip-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nest-strip-text strong { color: #0f766e; }
:root[data-theme="dark"] .nest-strip-text strong { color: #5eead4; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nest-strip-text strong { color: #5eead4; } }
.nest-strip-link { flex: none; font-weight: 650; font-size: .88rem; }
.nest-strip-btn { flex: none; text-decoration: none; font-weight: 700; font-size: .85rem; color: #fff; background: #0f766e; padding: 5px 12px; border-radius: 999px; }
.nest-strip-btn:hover { background: #115e59; }
@media (max-width: 560px) { .nest-strip-more { display: none; } .nest-strip { margin-top: -8px; } }

/* account */
.account-btn { flex: none; width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; text-decoration: none; font-size: 1.1rem; position: relative; transition: transform .2s ease; }
.account-btn:hover { transform: scale(1.06); }
.account-btn.signed-in { border-color: var(--good); background: var(--good-soft); }
.account-btn.signed-in::after { content: ""; position: absolute; right: 1px; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; background: var(--good); border: 2px solid var(--surface); }
.account-wrap { max-width: 480px; margin: 10px auto 0; }
.account-wrap h1 { font-size: 1.7rem; }
.account-head { display: flex; gap: 14px; align-items: center; }
.account-head h1 { margin: 0; }
.avatar { flex: none; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.4rem; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.account-switch { margin-top: 16px; text-align: center; font-size: .95rem; color: var(--muted); }
.linkish { border: 0; background: none; padding: 0; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-weight: 650; }
details > summary { cursor: pointer; }

/* admin analytics */
.admin-tabs { display: flex; gap: 6px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.admin-tab { border: 0; background: none; padding: 10px 16px; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.admin-tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.stat-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.stat-tile { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; }
.stat-label { font-size: .85rem; font-weight: 650; color: var(--muted); }
.stat-value { font-size: 2rem; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: .8rem; color: var(--muted); }
.stat-tile.live { background: linear-gradient(135deg, color-mix(in srgb, var(--good) 14%, var(--surface)), var(--surface)); border-color: color-mix(in srgb, var(--good) 35%, var(--line)); }
.live-pill { display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; font-weight: 800; color: var(--good); background: var(--good-soft); padding: 5px 12px; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--good); animation: pulse 1.6s ease-in-out infinite; }
.live-pill.off { color: var(--muted); background: var(--surface-2); }
.live-pill.off .live-dot { background: var(--muted); animation: none; }
.day-chart { display: flex; align-items: flex-end; gap: 4px; height: 190px; padding-top: 18px; }
.day-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.day-bar { width: 100%; max-width: 38px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--brand-2), var(--brand)); transition: height .4s ease; }
.day-col:hover .day-bar { filter: brightness(1.15); }
.day-num { font-size: .7rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.day-lbl { font-size: .72rem; color: var(--muted); height: 1em; }
.top-row { grid-template-columns: minmax(0, 1.4fr) 1fr 52px; }
.top-row > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .92rem; }
.activity { list-style: none; padding: 0; margin: 0; max-height: 330px; overflow: auto; font-size: .92rem; }
.activity li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.activity li:last-child { border-bottom: 0; }
.act-when { display: inline-block; min-width: 62px; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.act-new { animation: flashIn 1.6s ease; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
@keyframes flashIn { from { background: var(--good-soft); } to { background: transparent; } }

/* admin section on the account page */
.admin-card { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); background: linear-gradient(135deg, var(--brand-soft), var(--surface) 70%); }
.admin-avatar { background: linear-gradient(135deg, #1c2026, #3b5bdb); font-size: 1.3rem; }
.admin-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.admin-link { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); transition: transform .15s ease, border-color .15s; }
.admin-link:hover { transform: translateY(-2px); border-color: var(--brand); }
.admin-link span { font-size: 1.5rem; }
.admin-link small { color: var(--muted); font-size: .82rem; }
@media (max-width: 420px) { .admin-links { grid-template-columns: 1fr; } }
