@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

/* ============ THEMES ============
   Every colour in Cliff comes from these tokens. Add a theme by copying a block.
   Default = Berkeley (navy + California Gold). */
:root, [data-theme="berkeley"] {
  --bg: #0B0F17; --sidebar: #090D14; --card: #0E1422; --card-2: #121A2B;
  --line: #1C2538; --line-2: #26314A;
  --text: #E9EDF5; --muted: #8A94A9; --faint: #5B667C;
  --accent: #FDB515; --accent-text: #FDB515; --accent-ink: #1A1300; --accent-soft: rgba(253,181,21,.12); --accent-line: rgba(253,181,21,.45);
  --primary: #003262; --primary-2: #1F5FA8;
  --info: #5E93D6; --info-text: #9CC0EE; --info-soft: rgba(31,95,168,.18); --info-line: rgba(94,147,214,.45);
  --up: #2BC48A; --up-soft: rgba(43,196,138,.14); --down: #F0616D; --down-soft: rgba(240,97,109,.14);
  --warn: #F3A95B; --grid: #1C2538; --axis: #8A94A9;
  --avatar: linear-gradient(135deg, #1F5FA8, #003262);
  color-scheme: dark;
}
[data-theme="daylight"] {
  --bg: #F4F6FA; --sidebar: #FFFFFF; --card: #FFFFFF; --card-2: #F1F4F9;
  --line: #E3E8F0; --line-2: #D2D9E5;
  --text: #0E1422; --muted: #556074; --faint: #8A94A9;
  --accent: #FDB515; --accent-text: #8F6300; --accent-ink: #1A1300; --accent-soft: rgba(253,181,21,.18); --accent-line: rgba(201,139,0,.45);
  --primary: #003262; --primary-2: #1F5FA8;
  --info: #2B6CB6; --info-text: #1F5FA8; --info-soft: rgba(31,95,168,.10); --info-line: rgba(31,95,168,.35);
  --up: #12956A; --up-soft: rgba(18,149,106,.12); --down: #D2434F; --down-soft: rgba(210,67,79,.10);
  --warn: #D9822B; --grid: #E3E8F0; --axis: #6B7489;
  --avatar: linear-gradient(135deg, #2B6CB6, #003262);
  color-scheme: light;
}
[data-theme="sarge"] {
  --bg: #0F120C; --sidebar: #0B0D09; --card: #161B11; --card-2: #1C2216;
  --line: #262E1D; --line-2: #323C26;
  --text: #ECEBDD; --muted: #9EA08A; --faint: #6C705C;
  --accent: #D4BC72; --accent-text: #D4BC72; --accent-ink: #1A1606; --accent-soft: rgba(212,188,114,.13); --accent-line: rgba(212,188,114,.38);
  --primary: #3E4F2A; --primary-2: #6E8A4A;
  --info: #8FAE63; --info-text: #B8CF94; --info-soft: rgba(110,138,74,.2); --info-line: rgba(110,138,74,.5);
  --up: #8FC56A; --up-soft: rgba(143,197,106,.14); --down: #E07A5F; --down-soft: rgba(224,122,95,.14);
  --warn: #E0A85F; --grid: #262E1D; --axis: #9EA08A;
  --avatar: linear-gradient(135deg, #6E8A4A, #3E4F2A);
  color-scheme: dark;
}
[data-theme="black-pink"] {
  --bg: #0A0A0D; --sidebar: #070709; --card: #131218; --card-2: #19171F;
  --line: #24212C; --line-2: #302C3A;
  --text: #F3EEF5; --muted: #A097AB; --faint: #6D6577;
  --accent: #FF5FA2; --accent-text: #FF7AB3; --accent-ink: #22000F; --accent-soft: rgba(255,95,162,.13); --accent-line: rgba(255,95,162,.4);
  --primary: #3A1F4D; --primary-2: #8B5CF6;
  --info: #B18CFF; --info-text: #CDB5FF; --info-soft: rgba(139,92,246,.18); --info-line: rgba(139,92,246,.5);
  --up: #4ED8B0; --up-soft: rgba(78,216,176,.13); --down: #FF6B7D; --down-soft: rgba(255,107,125,.13);
  --warn: #FFB86B; --grid: #24212C; --axis: #A097AB;
  --avatar: linear-gradient(135deg, #FF5FA2, #8B5CF6);
  color-scheme: dark;
}
[data-theme="matrix"] {
  --bg: #040805; --sidebar: #030503; --card: #08100A; --card-2: #0C160F;
  --line: #13261A; --line-2: #1B3524;
  --text: #D4F5DE; --muted: #7FAE8C; --faint: #4D7258;
  --accent: #3DFF8F; --accent-text: #3DFF8F; --accent-ink: #001A0A; --accent-soft: rgba(61,255,143,.1); --accent-line: rgba(61,255,143,.35);
  --primary: #0E3B22; --primary-2: #1F8A4C;
  --info: #39C779; --info-text: #8BE9B0; --info-soft: rgba(31,138,76,.2); --info-line: rgba(31,138,76,.5);
  --up: #3DFF8F; --up-soft: rgba(61,255,143,.1); --down: #FF5C5C; --down-soft: rgba(255,92,92,.12);
  --warn: #E6E65C; --grid: #13261A; --axis: #7FAE8C;
  --avatar: linear-gradient(135deg, #1F8A4C, #0E3B22);
  color-scheme: dark;
}
[data-theme="ember"] {
  --bg: #110B08; --sidebar: #0C0806; --card: #1A120D; --card-2: #211711;
  --line: #2C1F17; --line-2: #3A291E;
  --text: #F6EBE3; --muted: #B09A8B; --faint: #7A6759;
  --accent: #FF7A2F; --accent-text: #FF8E4D; --accent-ink: #1F0A00; --accent-soft: rgba(255,122,47,.13); --accent-line: rgba(255,122,47,.4);
  --primary: #5A1E0E; --primary-2: #C2410C;
  --info: #F2A65A; --info-text: #F7C08A; --info-soft: rgba(242,166,90,.15); --info-line: rgba(242,166,90,.45);
  --up: #5BCB8C; --up-soft: rgba(91,203,140,.13); --down: #F25C54; --down-soft: rgba(242,92,84,.14);
  --warn: #FFC857; --grid: #2C1F17; --axis: #B09A8B;
  --avatar: linear-gradient(135deg, #FF7A2F, #5A1E0E);
  color-scheme: dark;
}
:root { --radius: 12px; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1, "cv11" 1;
}
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.gold { color: var(--accent-text); }
.pos { color: var(--up); }
.neg { color: var(--down); }

/* ---------- desktop shell ---------- */
.app { display: grid; grid-template-columns: 232px 1fr; height: 100vh; overflow: hidden; }
.sidebar {
  background: var(--sidebar); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 16px 14px 12px; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 14px; }
.brand-word { font-weight: 800; font-size: 19px; letter-spacing: 0.08em; }
.brand-sub { font-size: 10.5px; color: var(--accent-text); font-weight: 500; letter-spacing: 0.02em; margin-top: -2px; }
.nav-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); padding: 8px 10px 3px; font-weight: 600; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 5px 10px; border-radius: 8px;
  color: var(--muted); text-decoration: none; font-weight: 500; font-size: 13.5px;
}
.nav a svg { width: 17px; height: 17px; flex: none; }
.nav a.active { background: var(--accent-soft); color: var(--accent-text); }
.nav a .badge { margin-left: auto; font-size: 10px; background: var(--down); color: var(--bg); border-radius: 6px; padding: 1px 6px; font-weight: 700; }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 8px 2px; border-top: 1px solid var(--line); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--avatar); display: grid; place-items: center; font-weight: 700; font-size: 12px; color: var(--text); flex: none; }
.who b { display: block; font-size: 13px; }
.who span { font-size: 11px; color: var(--muted); }

.main { overflow: hidden; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 18px 28px 14px;
}
.topbar h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.topbar .crumb { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.topbar .spacer { flex: 1; }
.clock { font-size: 13px; color: var(--muted); }
.clock b { color: var(--text); font-weight: 600; }
.content { padding: 4px 28px 0; flex: 1; overflow: hidden; }
.footer-note { padding: 10px 28px 14px; font-size: 11.5px; color: var(--faint); display: flex; gap: 18px; }

/* ---------- primitives ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card-h { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.card-h h3 { font-size: 13.5px; font-weight: 600; }
.card-h .sub { font-size: 12px; color: var(--muted); }
.card-h .right { margin-left: auto; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600;
  padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap;
}
.chip.gold { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-text); }
.chip.blue { border-color: var(--info-line); background: var(--info-soft); color: var(--info-text); }
.chip.green { border-color: var(--up); background: var(--up-soft); color: var(--up); }
.chip.red { border-color: var(--down); background: var(--down-soft); color: var(--down); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.live .dot { box-shadow: 0 0 0 3px var(--down-soft); }
.tag { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 6px; background: var(--info-soft); color: var(--info-text); white-space: nowrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: inherit; font-weight: 600; font-size: 13px;
  border-radius: 9px; padding: 8px 14px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--text); cursor: pointer;
}
.btn svg { width: 15px; height: 15px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; }
.bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.kv { display: flex; justify-content: space-between; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv b { font-weight: 600; font-variant-numeric: tabular-nums; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .l { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.stat .v { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.stat .d { font-size: 11.5px; color: var(--muted); }

table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-size: 11px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; padding: 0 10px 9px; border-bottom: 1px solid var(--line); }
table.t td { padding: 10px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t tr:last-child td { border-bottom: 0; }
table.t .r { text-align: right; }

.chart svg { display: block; width: 100%; height: 100%; }

/* ---------- mobile shell ---------- */
.phone { width: 390px; height: 844px; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }
.status { height: 47px; display: flex; align-items: center; justify-content: space-between; padding: 0 26px 0 32px; font-weight: 600; font-size: 15px; flex: none; }
.status .icons { display: flex; gap: 6px; align-items: center; }
.m-head { padding: 6px 20px 12px; display: flex; align-items: center; gap: 10px; flex: none; }
.m-head h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.m-body { flex: 1; overflow: hidden; padding: 0 16px; display: flex; flex-direction: column; gap: 12px; }
.tabbar { flex: none; height: 84px; border-top: 1px solid var(--line); background: var(--sidebar); display: grid; grid-template-columns: repeat(5, 1fr); padding-top: 9px; }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; color: var(--faint); text-decoration: none; }
.tabbar a svg { width: 23px; height: 23px; }
.tabbar a.active { color: var(--accent-text); }

/* fills that must use the raw accent, not the text-safe variant */
.fill-accent { background: var(--accent); color: var(--accent-ink); }
.c-p { color: var(--accent-text); } .c-c { color: var(--info-text); } .c-f { color: var(--warn); }
.bg-c { background: var(--info) !important; } .bg-f { background: var(--warn) !important; }

/* ---------- section-page utilities (Rev. 3 build-out) ---------- */
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.g { display: grid; gap: 14px; }
.sub { font-size: 12px; color: var(--muted); }
.ico { width: 16px; height: 16px; display: inline-block; flex: none; }
.ico svg { width: 100%; height: 100%; display: block; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; }
.seg span { padding: 6px 11px; font-size: 12px; font-weight: 600; color: var(--muted); border-right: 1px solid var(--line-2); white-space: nowrap; }
.seg span:last-child { border-right: 0; }
.seg span.on { background: var(--accent-soft); color: var(--accent-text); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pills span { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.pills span.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pills span.ok { border-color: var(--info-line); background: var(--info-soft); color: var(--info-text); }
.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs span { padding: 0 2px 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.tabs span.on { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.li:last-child { border-bottom: 0; }
.li .t { flex: 1; min-width: 0; }
.li .t b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .t span { font-size: 11.5px; color: var(--muted); }
.li .r { margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ib { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--card-2); border: 1px solid var(--line); color: var(--accent-text); flex: none; }
.ib svg { width: 17px; height: 17px; }
.ck { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--line-2); flex: none; display: grid; place-items: center; }
.ck.on { background: var(--up); border-color: var(--up); color: var(--bg); }
.ck svg { width: 12px; height: 12px; }
.tg { width: 34px; height: 20px; border-radius: 99px; background: var(--line-2); position: relative; flex: none; }
.tg::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); }
.tg.on { background: var(--accent); }
.tg.on::after { left: auto; right: 3px; background: var(--accent-ink); }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; background: var(--accent-soft); border: 1px solid var(--accent-line); }
.note.info { background: var(--info-soft); border-color: var(--info-line); }
.note .ico { color: var(--accent-text); margin-top: 1px; }
.note.info .ico { color: var(--info-text); }
.thumb { border-radius: 10px; background-size: cover; background-position: center; position: relative; overflow: hidden; }
.thumb .dur { position: absolute; right: 8px; bottom: 8px; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: rgba(9,13,20,.82); color: #fff; }
.thumb .pl { position: absolute; inset: 0; display: grid; place-items: center; }
.thumb .pl i { width: 46px; height: 46px; border-radius: 50%; background: rgba(9,13,20,.6); display: grid; place-items: center; color: #fff; }
.thumb .pl i svg { width: 20px; height: 20px; margin-left: 3px; }
.thumb .prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.25); }
.thumb .prog i { display: block; height: 100%; background: var(--accent); }
.big { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ringw { position: relative; display: grid; place-items: center; flex: none; }
.ringw .c { position: absolute; text-align: center; }
.ringw .c b { display: block; font-size: 20px; font-weight: 800; line-height: 1; }
.ringw .c span { font-size: 10.5px; color: var(--muted); }
.vbars { display: flex; align-items: flex-end; gap: 4px; }
.vbars i { flex: 1; border-radius: 3px 3px 1px 1px; background: var(--info); display: block; }

/* ---------- chart series (validated with dataviz validate_palette.js: dark on #0E1422, light on #FFF) ----------
   Categorical identity only: s1 lean/blue, s2 fat/orange, s3 water/aqua, s4 bone/yellow. Never cycled. */
:root { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; }
[data-theme="daylight"] { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; }
.lg { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.lg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.chart-tip { position: fixed; pointer-events: none; background: var(--card-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 9px; font-size: 12px; color: var(--text); box-shadow: 0 6px 20px rgba(0,0,0,.35); display: none; z-index: 9; }

/* Cliff, refined: independent palettes and day/night surfaces. */
:root { --radius: 16px; --photo-ink: #ffffff; --photo-scrim: #080e18; --shadow: 0 8px 32px #0000000a; }
[data-theme="berkeley"] { --bg:#0c111b; --sidebar:#0d1420; --card:#121c2b; --card-2:#192537; --line:#243044; --line-2:#354159; --muted:#a0aec3; --faint:#8796ae; }
[data-theme="sarge"] { --radius:8px; }
[data-theme="black-pink"] { --radius:22px; }
[data-theme="matrix"] { --radius:5px; }
[data-theme="ember"] { --radius:14px; }
[data-mode="day"] {
  --bg:#f5f6f8; --sidebar:#fff; --card:#fff; --card-2:#edf1f5;
  --line:#dfe4eb; --line-2:#c9d1dd; --text:#172338; --muted:#58677b; --faint:#65758a;
  --accent:#fdb515; --accent-text:#805600; --accent-ink:#211700; --accent-soft:#fdb51518; --accent-line:#c08b2e70;
  --primary:#003262; --primary-2:#1f5fa8; --info:#2b6cb6; --info-text:#275e9b; --info-soft:#2b6cb612; --info-line:#2b6cb64d;
  --up:#14764f; --up-soft:#14764f12; --down:#bd3b4d; --down-soft:#bd3b4d12; --warn:#a45d1c;
  --grid:var(--line); --axis:var(--muted); color-scheme:light;
}
[data-theme="sarge"][data-mode="day"], [data-mode="day"] [data-theme="sarge"] {
  --bg:#f1f0e8; --sidebar:#e9e9dd; --card:#fbfbf4; --card-2:#e8eade; --line:#d6d9c8; --line-2:#bfc6ae;
  --text:#293421; --muted:#5b654f; --faint:#68715a; --accent:#607343; --accent-text:#4e6032; --accent-ink:#fff;
  --accent-soft:#60734315; --accent-line:#60734360; --primary:#3e4f2a; --info:#627d49; --info-text:#4e6837; --info-soft:#627d4914; --info-line:#627d4955;
}
[data-theme="black-pink"][data-mode="day"], [data-mode="day"] [data-theme="black-pink"] {
  --bg:#fbf3f7; --sidebar:#fff9fc; --card:#fff; --card-2:#f8edf4; --line:#ecdbe5; --line-2:#dac0d0;
  --text:#382235; --muted:#7a5b72; --faint:#81647b; --accent:#d82d78; --accent-text:#b92364; --accent-ink:#fff;
  --accent-soft:#d82d7810; --accent-line:#d82d7840; --primary:#3a1f4d; --info:#8253bc; --info-text:#7346a9; --info-soft:#8253bc12; --info-line:#8253bc50;
}
[data-theme="matrix"][data-mode="day"], [data-mode="day"] [data-theme="matrix"] {
  --bg:#edf5ef; --sidebar:#f7fcf8; --card:#fcfffc; --card-2:#e6f1e8; --line:#d1e4d6; --line-2:#b2ccba;
  --text:#163622; --muted:#4e6c58; --faint:#587361; --accent:#08733c; --accent-text:#08733c; --accent-ink:#fff;
  --accent-soft:#08733c12; --accent-line:#08733c50; --primary:#0e3b22; --info:#237a60; --info-text:#256b54; --info-soft:#237a6012; --info-line:#237a6045;
}
[data-theme="ember"][data-mode="day"], [data-mode="day"] [data-theme="ember"] {
  --bg:#f7f0e9; --sidebar:#fcf7f1; --card:#fffaf5; --card-2:#f1e6da; --line:#e6d6c8; --line-2:#d3bcaa;
  --text:#3e2a20; --muted:#7d6251; --faint:#806653; --accent:#bc4b24; --accent-text:#a23d1b; --accent-ink:#fff;
  --accent-soft:#bc4b2410; --accent-line:#bc4b2445; --primary:#5a1e0e; --info:#a6672c; --info-text:#8e561f; --info-soft:#a6672c12; --info-line:#a6672c50;
}
html[data-theme="matrix"] body { font-family:"SFMono-Regular",Consolas,"Liberation Mono",monospace; font-size:13px; }
html[data-theme="ember"] h1, html[data-theme="ember"] h2 { font-family:Georgia,serif; font-weight:400; }
html[data-theme="sarge"] .eyebrow { letter-spacing:.17em; }
button, a, summary { -webkit-tap-highlight-color:transparent; }
a { color:inherit; }
button { font-family:inherit; }
a.btn { text-decoration:none; }
button:focus-visible,a:focus-visible,summary:focus-visible { outline:2px solid var(--accent-text); outline-offset:4px; }
.btn { min-height:34px; transition:background .16s,transform .16s,border-color .16s; }
.btn:hover { border-color:var(--accent-line); background:var(--accent-soft); }
.btn.primary:hover { background:var(--accent); filter:brightness(1.07); transform:translateY(-1px); }
.app { grid-template-columns:222px minmax(0,1fr); }
.sidebar { padding:25px 16px 15px; gap:12px; scrollbar-width:thin; scrollbar-color:var(--line-2) transparent; }
.brand { padding:0 9px 20px; color:var(--text); text-decoration:none; }
.brand-word { font-size:25px; letter-spacing:.08em; line-height:1.1; }
.brand-period { color:var(--accent); }
.brand-sub { font-size:10px; margin-top:4px; color:var(--muted); }
.nav-caption,.eyebrow { font-size:9px; font-weight:700; color:var(--muted); letter-spacing:.13em; }
.nav-caption { padding:0 12px; }
.nav { display:flex; flex-direction:column; gap:4px; }
.nav a,.nav-folder summary { min-height:39px; padding:10px 12px; font-size:12px; gap:12px; border-radius:8px; }
.nav a:hover,.nav-folder summary:hover { background:var(--card-2); color:var(--text); }
.nav a.active { box-shadow:inset 3px 0 var(--accent); color:var(--accent-text); background:var(--accent-soft); }
.nav-folder summary { display:flex; align-items:center; color:var(--muted); cursor:pointer; list-style:none; font-weight:500; }
.nav-folder summary::-webkit-details-marker { display:none; }
.nav-folder summary svg { width:17px; height:17px; flex:none; }
.nav-folder summary svg:last-child { margin-left:auto; width:12px; height:12px; transition:transform .2s; }
.nav-folder[open] summary svg:last-child { transform:rotate(90deg); }
.nav-folder>div { margin:2px 0 6px 20px; border-left:1px solid var(--line-2); padding-left:7px; }
.nav-folder>div a { font-size:11px; min-height:32px; padding:7px 9px; }
.nav-folder>div a svg { width:14px; height:14px; }
.nav-divider { height:1px; background:var(--line); margin:12px; }
.sidebar-bottom { margin-top:auto; display:grid; gap:4px; }
.sidebar-program { background:var(--accent-soft); border:1px solid var(--accent-line); border-radius:var(--radius); padding:14px; display:grid; gap:7px; margin-bottom:10px; }
.sidebar-program b { font-size:18px; }
.sidebar-program>span:not(.eyebrow) { font-size:10px; color:var(--muted); }
.sidebar-program a { font-size:11px; text-decoration:none; color:var(--accent-text); display:flex; justify-content:space-between; margin-top:2px; }
.sidebar-program a svg { width:13px; height:13px; }
.utility-link { display:flex; align-items:center; gap:10px; padding:8px 10px; text-decoration:none; font-size:11px; color:var(--muted); background:none; border:0; cursor:pointer; text-align:left; }
.utility-link:hover { color:var(--text); }
.utility-link svg { width:15px; height:15px; }
.sidebar-foot { color:var(--text); text-decoration:none; margin-top:4px; padding-top:15px; }
.sidebar-foot>svg { width:17px; height:17px; color:var(--muted); margin-left:auto; }
.avatar { background:var(--accent-soft); color:var(--accent-text); border:1px solid var(--accent-line); }
.main { min-width:0; }
.topbar { padding:22px 28px 19px; min-height:89px; flex:none; border-bottom:1px solid var(--line); margin-bottom:20px; }
.topbar h1 { font-size:23px; letter-spacing:-.04em; }
.topbar .crumb { font-size:11px; margin-top:5px; }
.content { overflow:auto; padding-bottom:10px; scrollbar-width:thin; scrollbar-color:var(--line-2) transparent; }
.card { box-shadow:var(--shadow); min-width:0; }
.card-h h3 { font-size:13px; letter-spacing:-.02em; }
.footer-note { color:var(--muted); flex:none; font-size:11.5px; line-height:1.5; }
.shell-controls { margin-left:auto; display:flex; gap:7px; }
.shell-controls .btn { background:var(--card); }
.icon-btn { width:34px; height:34px; padding:8px; flex:none; }
.icon-btn svg { width:16px; height:16px; }
.sidebar-reveal { display:none; }
[data-sidebar="hidden"] .app { grid-template-columns:minmax(0,1fr); }
[data-sidebar="hidden"] .sidebar { display:none; }
[data-sidebar="hidden"] .sidebar-reveal { display:inline-flex; }
.appearance-dialog { position:fixed; inset:80px 24px auto auto; width:320px; max-width:calc(100vw - 32px); padding:25px; color:var(--text); background:var(--card); border:1px solid var(--line-2); border-radius:20px; box-shadow:0 20px 80px #0005; }
.appearance-dialog::backdrop { background:#0005; backdrop-filter:blur(3px); }
.dialog-close { position:absolute; right:12px; top:10px; border:0; font-size:22px; background:transparent; }
.appearance-heading { display:grid; gap:8px; margin-bottom:20px; }
.appearance-heading b { font-size:17px; letter-spacing:-.03em; }
.theme-options { display:grid; gap:6px; }
.theme-choice { display:flex; align-items:center; gap:10px; border:1px solid transparent; border-radius:9px; background:var(--card-2); color:var(--text); padding:11px; font-size:12px; cursor:pointer; text-align:left; }
.theme-choice[aria-pressed="true"] { border-color:var(--accent); background:var(--accent-soft); }
.theme-check { margin-left:auto; visibility:hidden; color:var(--accent-text); }
.theme-choice[aria-pressed="true"] .theme-check { visibility:visible; }
.theme-dot { width:17px; height:17px; border-radius:50%; background:var(--accent); box-shadow:inset 0 0 0 4px var(--bg); border:1px solid var(--accent); }
.mode-options { display:flex; padding:4px; background:var(--card-2); border:1px solid var(--line); border-radius:10px; gap:4px; margin-top:20px; }
.mode-options button { display:flex; flex:1; align-items:center; justify-content:center; gap:6px; padding:8px 6px; background:transparent; color:var(--muted); border:0; border-radius:6px; cursor:pointer; font-size:11px; }
.mode-options button svg { width:14px; height:14px; }
.mode-options button[aria-pressed="true"] { background:var(--card); color:var(--text); box-shadow:var(--shadow); }
.appearance-hint { font-size:10px; color:var(--muted); margin-top:12px; line-height:1.6; }
.appearance-all { display:flex; justify-content:space-between; align-items:center; color:var(--accent-text); font-size:12px; text-decoration:none; margin-top:20px; }
.appearance-all svg { width:14px; height:14px; }
.phone { width:min(100%,390px); min-height:100dvh; height:844px; }
.m-body { overflow-y:auto; }
@media (max-height:820px) and (min-width:761px) { .sidebar-program { display:none; } .sidebar { padding-top:18px; } .topbar { padding-top:16px; padding-bottom:16px; min-height:76px; margin-bottom:14px; } }
@media (max-width:1100px) { .app { grid-template-columns:200px minmax(0,1fr); } .topbar { gap:10px; padding-left:20px; padding-right:20px; } .content { padding-left:20px; padding-right:20px; } .topbar .clock { display:none; } }
@media (max-width:760px) {
  .app { grid-template-columns:minmax(0,1fr); height:100dvh; }
  .sidebar { display:none; }
  [data-nav-open] .sidebar { display:flex; position:fixed; inset:0 auto 0 0; width:260px; z-index:30; box-shadow:0 0 0 100vmax #0008; }
  [data-sidebar="hidden"][data-nav-open] .sidebar { display:flex; }
  .sidebar-reveal { display:inline-flex; }
  .topbar { padding:16px; gap:10px; min-height:80px; margin-bottom:14px; }
  .topbar h1 { font-size:18px; }
  .topbar .crumb { font-size:10px; max-width:260px; }
  .topbar>.chip,.topbar>.clock,.topbar>.spacer { display:none; }
  .content { padding:0 16px 16px; }
  .footer-note { padding:12px 16px; flex-wrap:wrap; font-size:11.5px; }
  .content>.g { grid-template-columns:minmax(0,1fr) !important; }
  .content>.g>* { grid-column:1 / -1 !important; }
  .content>.g>.col { grid-column:1 / -1 !important; }
  .card-h { flex-wrap:wrap; }
  .shell-controls { gap:4px; }
  .shell-controls .btn { width:30px; height:30px; min-height:30px; padding:6px; }
  .content table { display:block; overflow-x:auto; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto !important; animation:none !important; transition:none !important; } }
@media(max-width:760px) { .m-head .sidebar-reveal { display:none; } .m-head .shell-controls { gap:4px; } }
