/* Founder OS — Ai Sikho Academy. One violet accent, warm-grey page, white hairline cards. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap; src: url(/fonts/barlow-condensed-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+2000-206F,U+20AC,U+2212; }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-display: swap; src: url(/fonts/barlow-condensed-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+2000-206F,U+20AC,U+2212; }
@font-face { font-family: 'Barlow Condensed'; font-weight: 800; font-display: swap; src: url(/fonts/barlow-condensed-latin-800-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+2000-206F,U+20AC,U+2212; }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap; src: url(/fonts/barlow-condensed-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02AF,U+20A0-20C0; }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-display: swap; src: url(/fonts/barlow-condensed-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02AF,U+20A0-20C0; }
@font-face { font-family: 'Barlow Condensed'; font-weight: 800; font-display: swap; src: url(/fonts/barlow-condensed-latin-ext-800-normal.woff2) format('woff2'); unicode-range: U+0100-02AF,U+20A0-20C0; }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-display: swap; src: url(/fonts/jetbrains-mono-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-display: swap; src: url(/fonts/jetbrains-mono-latin-500-normal.woff2) format('woff2'); }

:root {
  --bg: #f3f2ef; --side: #f3f2ef; --card: #ffffff; --line: #e6e4df; --line2: #efede9;
  --ink: #16151a; --ink2: #47454d; --muted: #86838c; --faint: #a9a6ae;
  --accent: #4f3fd9; --accent-hover: #4334c4; --accent-soft: #eeecfc; --accent-softer: #f6f5fe; --accent-ink: #3626b0;
  --good: #1a7f47; --good-soft: #e7f5ed; --bad: #c8372d; --bad-soft: #fdecea; --warn-ink: #7d5a00; --warn-soft: #fdf3d3;
  --cmp: #8a8792;
  --c-mail: #d9473b; --c-wa: #1f9d5c; --c-ig: #c93f86; --c-ads: #3a63d8; --c-sales: #b57900; --c-team: #7a4fd0; --c-cal: #0f8f8a; --c-link: #5f5d66;
  --r: 14px; --r-sm: 10px;
  --ui: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Barlow Condensed', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --side-w: 224px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--ui); font-feature-settings: 'cv11', 'ss01'; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.mono { font-family: var(--mono); font-feature-settings: normal; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Shell */
.shell { min-height: 100vh; }
.side { position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: var(--side); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: calc(18px + env(safe-area-inset-top, 0px)) 12px calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 18px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand span { font-family: var(--display); font-weight: 800; font-size: 17px; letter-spacing: .01em; line-height: 1.05; text-transform: uppercase; }
.nav { flex: 1; overflow-y: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav .grp { font: 500 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 16px 10px 7px; }
.nav .grp:first-child { padding-top: 4px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; color: var(--ink2); font-weight: 500; font-size: 13.5px; margin: 1px 0; }
.nav a:hover { background: #eae8e3; text-decoration: none; color: var(--ink); }
.nav a.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.nav a.on svg.i { stroke: var(--accent); }
.nav a .lbl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cnt { font: 500 11px/1 var(--mono); padding: 3px 6px; border-radius: 999px; background: #e7e5e0; color: var(--ink2); min-width: 20px; text-align: center; }
.cnt.hot { background: var(--accent); color: #fff; }
.nav a.on .cnt:not(.hot) { background: #fff; color: var(--accent-ink); }
.me { display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--line); margin-top: 8px; }
.me .who { flex: 1; min-width: 0; line-height: 1.25; }
.me b { display: block; font-size: 13px; }
.me span { font-size: 12px; color: var(--muted); }
.me a { color: var(--muted); font-size: 12px; padding: 6px; border-radius: 8px; display: flex; }
.me a:hover { background: #eae8e3; color: var(--ink); }
.av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; font: 600 12px/1 var(--ui); color: #fff; background: var(--ink); letter-spacing: .02em; }
.av.sm { width: 30px; height: 30px; font-size: 11px; }

.main { margin-left: var(--side-w); min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: calc(12px + env(safe-area-inset-top, 0px)) 28px 12px;
  background: rgba(243, 242, 239, .9); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.search { position: relative; flex: 1; max-width: 520px; }
.search > svg.i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { width: 100%; height: 38px; padding: 0 14px 0 38px; border-radius: 999px; border: 1px solid var(--line); background: #fff; outline: none; }
.search input::placeholder { color: var(--faint); }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.results { position: absolute; left: 0; right: 0; top: 44px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 6px;
  box-shadow: 0 12px 32px -12px rgba(22, 21, 26, .18); max-height: 60vh; overflow-y: auto; }
.results a { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 9px; color: inherit; }
.results a:hover, .results a.sel { background: var(--accent-softer); text-decoration: none; }
.results .t { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results .s { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results .none { padding: 10px; color: var(--muted); }
.sync { display: flex; align-items: center; gap: 8px; color: var(--ink2); font-size: 12.5px; white-space: nowrap; margin-left: auto; }
.sync .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-soft); }
.sync .dot.off { background: var(--faint); box-shadow: 0 0 0 3px #ebe9e5; }
.menu-btn { display: none; }
.view { padding: 8px 28px 64px; max-width: 1320px; }

/* ---------- Buttons, chips, toggles */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; color: var(--ink); transition: border-color .15s, background .15s; }
.btn:hover { border-color: #cdcac3; text-decoration: none; }
.btn.outline { border-color: #d6d3cc; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.btn.icon { width: 38px; padding: 0; justify-content: center; }
.btn:disabled { opacity: .5; cursor: default; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: #f1f0ec; border: 1px solid var(--line2); }
.seg button { border: 0; background: transparent; height: 26px; padding: 0 11px; border-radius: 999px; cursor: pointer; font: 500 12px/1 var(--mono); color: var(--ink2); }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--ink); color: #fff; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; background: #f0efeb; color: var(--ink2); }
.chip.red { background: var(--bad-soft); color: var(--bad); }
.chip.yellow { background: var(--warn-soft); color: var(--warn-ink); }
.chip.green { background: var(--good-soft); color: var(--good); }
.chip.violet { background: var(--accent-soft); color: var(--accent-ink); }
.chip.sample { background: #fdf3d3; color: #7d5a00; }
.pill { font: 500 11px/1 var(--mono); padding: 4px 8px; border-radius: 999px; background: var(--accent); color: #fff; white-space: nowrap; }
.pill.grey { background: #efede9; color: var(--ink2); }
.switch { position: relative; width: 36px; height: 21px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #dcd9d3; transition: background .15s; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(15px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- Page head */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 14px 0 22px; }
.head h1 { font: 800 44px/0.95 var(--display); text-transform: uppercase; letter-spacing: -.005em; margin: 0; }
.head .sub { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.head .sub b { color: var(--ink2); font-weight: 600; }
.head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; min-height: 26px; }
.card-h h2 { margin: 0; font-size: 14px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.label { font: 500 10.5px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.card-f { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line2); }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.more:hover { text-decoration: none; gap: 9px; }
.more svg.i { width: 14px; height: 14px; transition: transform .15s; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.stack { display: grid; gap: 16px; align-content: start; }

/* Today grid */
.today { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); align-items: start; }
.today .left { display: grid; gap: 16px; min-width: 0; }
.today .pair { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }

/* Big numbers */
.big { font: 800 64px/0.9 var(--display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; margin-top: 10px; }
.kpi { font: 700 34px/1 var(--display); font-variant-numeric: tabular-nums; margin-top: 8px; }
.change { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; margin-top: 10px; }
.change.up { color: var(--good); } .change.down { color: var(--bad); } .change.flat { color: var(--muted); font-weight: 500; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 18px; border-top: 1px solid var(--line2); padding-top: 14px; }
.stats > div { padding-right: 10px; }
.stats > div + div { border-left: 1px solid var(--line2); padding-left: 14px; }
.stats .v { font: 700 22px/1.1 var(--display); font-variant-numeric: tabular-nums; margin-top: 5px; }

/* Rows (needs, messages, team, lists) */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line2); }
.rows > li:first-child { border-top: 0; padding-top: 2px; }
.rows .body { flex: 1; min-width: 0; }
.rows .t { font-weight: 650; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows .s { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows .s.wrap { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rows .when { font: 400 11.5px/1 var(--mono); color: var(--muted); white-space: nowrap; }
a.rowlink { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: inherit; border-radius: 10px; margin: -6px -8px; padding: 6px 8px; transition: background .12s; }
a.rowlink:hover { background: var(--accent-softer); text-decoration: none; }
.ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; color: #fff; }
.ico svg.i { width: 16px; height: 16px; stroke-width: 2; }
.ico.sm { width: 26px; height: 26px; border-radius: 8px; } .ico.sm svg.i { width: 14px; height: 14px; }
.unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }

/* Schedule */
.sched li { align-items: flex-start; }
.sched .time { font: 500 12px/1.45 var(--mono); color: var(--ink2); width: 62px; flex: none; padding-top: 1px; }
.sched .time small { display: block; color: var(--faint); font-weight: 400; }

/* Chart */
.chart { position: relative; margin-top: 14px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink2); margin-top: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 0; border-top: 2px solid var(--accent); display: inline-block; }
.legend i.cmp { border-top: 2px dashed var(--cmp); }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: 12px; padding: 7px 9px; border-radius: 8px; white-space: nowrap;
  transform: translate(-50%, calc(-100% - 10px)); opacity: 0; transition: opacity .1s; z-index: 2; line-height: 1.45; }
.tip.on { opacity: 1; }
.tip .mono { color: #c9c6d0; font-size: 11px; }
details.tbl summary { cursor: pointer; color: var(--muted); font-size: 12.5px; margin-top: 10px; list-style: none; }
details.tbl summary::-webkit-details-marker { display: none; }
details.tbl summary::before { content: '▸ '; } details.tbl[open] summary::before { content: '▾ '; }

/* Tables */
.tablewrap { overflow-x: auto; margin: 0 -4px; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th { text-align: left; font: 500 10.5px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 8px; border-bottom: 1px solid var(--line2); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #faf9f7; }
tr.flagged td { background: var(--bad-soft); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .t { font-weight: 600; }
td .s { color: var(--muted); font-size: 12px; }

/* Empty / notices */
.empty { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; padding: 10px 12px; border: 1px dashed #dad7d0; border-radius: var(--r-sm); background: #fbfaf8; }
.empty svg.i { color: var(--faint); }
.empty a { font-weight: 600; margin-left: auto; white-space: nowrap; }
.empty.big-empty { padding: 28px 20px; justify-content: center; flex-direction: column; text-align: center; gap: 6px; }
.empty.big-empty a { margin: 4px 0 0; }
.calm { color: var(--muted); font-size: 13px; padding: 4px 0; }
.notice { border-radius: var(--r-sm); padding: 12px 14px; font-size: 13.5px; margin-bottom: 16px; }
.notice b { display: block; margin-bottom: 2px; }
.notice.err { background: var(--bad-soft); color: #7a1f17; }
.notice.info { background: var(--accent-softer); color: var(--accent-ink); border: 1px solid var(--accent-soft); }
.notice.warn { background: var(--warn-soft); color: var(--warn-ink); }
.flag { color: var(--bad); font-weight: 600; font-size: 12.5px; }
code { font: 12px var(--mono); background: #f0eee9; padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }

/* Brief */
.brief { white-space: pre-wrap; font-size: 14px; line-height: 1.7; margin: 0; }
.brief-lines { list-style: none; margin: 0; padding: 0; counter-reset: l; }
.brief-lines li { counter-increment: l; display: flex; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line2); font-size: 13.5px; }
.brief-lines li:first-child { border-top: 0; }
.brief-lines li::before { content: counter(l, decimal-leading-zero); font: 500 11px/1.9 var(--mono); color: var(--faint); }

/* Shortcuts */
.tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.tile { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: inherit; transition: border-color .12s, transform .12s; }
.tile:hover { border-color: var(--accent); text-decoration: none; }
.tile .t { font-weight: 600; font-size: 13.5px; }
.tile .s { font: 11px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile > div { min-width: 0; }

/* Keys */
.keys { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.key { font: 11.5px var(--mono); padding: 3px 8px; border-radius: 6px; background: #f3f2ee; color: var(--ink2); display: inline-flex; align-items: center; gap: 6px; }
.key::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.key.set::before { background: var(--good); }
.key.missing { color: var(--muted); }

/* Dialogs (Ask, brief) */
dialog { border: 0; padding: 0; border-radius: 18px; width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 64px); background: #fff; color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(22, 21, 26, .35); }
dialog::backdrop { background: rgba(22, 21, 26, .32); backdrop-filter: blur(2px); }
.dlg { padding: 22px; }
.dlg-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dlg-h h2 { margin: 0; font: 800 26px/1 var(--display); text-transform: uppercase; }
.ask-in { display: flex; gap: 8px; }
.ask-in input { flex: 1; min-width: 0; height: 42px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; outline: none; }
.ask-in input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ask-in .btn { height: 42px; border-radius: 12px; }
.answer { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--accent-softer); border: 1px solid var(--accent-soft); white-space: pre-wrap; font-size: 14px; line-height: 1.6; }
.answer .q { font: 500 11px var(--mono); color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .06em; }
.hints { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.hints button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 11px; font-size: 12.5px; cursor: pointer; color: var(--ink2); }
.hints button:hover { border-color: var(--accent); color: var(--accent-ink); }

/* Loading */
.loading { color: var(--muted); padding: 40px 0; font: 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; }

/* Forms (login, check-in) */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 28px 16px; }
.panel { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px; }
.panel .brand { padding: 0 0 22px; }
.panel h1 { font: 800 38px/0.95 var(--display); text-transform: uppercase; margin: 0 0 6px; }
.panel .sub { color: var(--muted); margin: 0 0 6px; }
label { display: block; font: 500 10.5px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 18px 0 6px; }
label .muted { text-transform: none; letter-spacing: 0; font-family: var(--ui); }
.field { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: #fff; outline: none; font-size: 14px; }
textarea.field { min-height: 76px; resize: vertical; line-height: 1.5; }
.field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.panel .btn.primary { width: 100%; justify-content: center; height: 44px; margin-top: 22px; font-size: 14px; }
.msg { margin-top: 12px; font-size: 13.5px; }
.msg.bad { color: var(--bad); } .msg.good { color: var(--good); }

/* ---------- Phone + tablet */
.tabbar { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(22, 21, 26, .3); z-index: 25; }
@media (max-width: 1100px) {
  .today { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .side { transform: translateX(-100%); transition: transform .2s ease; box-shadow: none; width: 260px; background: #f7f6f3; }
  .side.open { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, .2); }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; gap: 8px; }
  .sync .txt { display: none; }
  .sync { margin-left: 0; }
  .view { padding: 4px 16px calc(96px + env(safe-area-inset-bottom, 0px)); }
  .head { margin: 10px 0 18px; }
  .head h1 { font-size: 36px; }
  .big { font-size: 52px; }
  .today .pair { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .stats > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .card { padding: 16px; }
  .g2 { grid-template-columns: minmax(0, 1fr); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; font: 500 10.5px/1 var(--ui); color: var(--muted); padding: 6px 0;
    background: none; border: 0; cursor: pointer; position: relative; }
  .tabbar svg.i { width: 20px; height: 20px; }
  .tabbar .on { color: var(--accent); }
  .tabbar .badge { position: absolute; top: 1px; left: calc(50% + 6px); font: 500 9.5px/1 var(--mono); background: var(--accent); color: #fff; border-radius: 999px; padding: 2px 5px; }
}
@media (max-width: 480px) {
  .search input { font-size: 16px; } /* stops iPhone zoom */
  .head .actions { width: 100%; } .head .actions .btn { flex: 1; justify-content: center; }
  .big { font-size: 46px; }
}
