/* Chief of Staff app (step 5, D-103): calm and plain, light/dark follows the
   device, colour for status plus one accent (L's computer design, 2 Nov).
   Phone first; desktop from 1000px. */

:root {
  --accent: #5B47E0;
  --accent-soft: #EEEBFD;
  --on-accent: #FFFFFF;
  --bg: #F6F7F8;
  --surface: #FFFFFF;
  --ink: #16181D;
  --muted: #5B626D;
  --faint: #8A919C;
  --line: #E4E7EB;
  --line-strong: #D2D6DC;
  --press: #EEF0F2;
  --btn: #16181D;
  --btn-ink: #FFFFFF;
  --green: #23744A;
  --amber: #B86E00;
  --red: #B42318;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #A99CFF;
    --accent-soft: #24213A;
    --on-accent: #14121F;
    --bg: #0F1114;
    --surface: #171A1F;
    --ink: #E7E9EC;
    --muted: #A1A8B3;
    --faint: #737B87;
    --line: #252930;
    --line-strong: #343943;
    --press: #1F232A;
    --btn: #E7E9EC;
    --btn-ink: #0F1114;
    --green: #4DB37B;
    --amber: #E2A23C;
    --red: #F07467;
  }
}
:root[data-theme="dark"] {
  --accent: #A99CFF;
  --accent-soft: #24213A;
  --on-accent: #14121F;
  --bg: #0F1114;
  --surface: #171A1F;
  --ink: #E7E9EC;
  --muted: #A1A8B3;
  --faint: #737B87;
  --line: #252930;
  --line-strong: #343943;
  --press: #1F232A;
  --btn: #E7E9EC;
  --btn-ink: #0F1114;
  --green: #4DB37B;
  --amber: #E2A23C;
  --red: #F07467;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* Shell: sidebar on a computer, a scrolling strip on a phone */
.side-nav {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 4px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px; overflow-x: auto; scrollbar-width: none;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: none; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; white-space: nowrap; }
.brand-mark { width: 26px; height: 26px; flex: none; border-radius: 8px; background: var(--accent);
  box-shadow: inset 0 0 0 8px var(--accent), inset 0 0 0 10px var(--on-accent); }
.nav-list { display: flex; gap: 2px; }
.nav-i {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  font-size: 14px; color: var(--muted); text-decoration: none; white-space: nowrap;
}
.nav-i:hover { color: var(--ink); background: var(--press); }
.nav-i.on { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.nav-n { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #FFFFFF;
  font-size: 11.5px; font-weight: 600; line-height: 19px; text-align: center; }
.nav-out { border: 0; background: none; cursor: pointer; font: inherit; font-size: 14px; }
.content { padding: 18px 16px 48px; }

/* Login, then the authenticator code (D-104) */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.gate-box { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; padding: 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.gate .brand { display: flex; }
.gate h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.gate p { font-size: 14.5px; color: var(--muted); }
.gate-form { display: flex; flex-direction: column; gap: 12px; }
.gate-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.gate-form input { height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; }
.gate-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.gate-form .btn { height: 44px; }
.gate .gate-err { color: var(--red); }
.gate-qr { width: 200px; height: 200px; align-self: center; padding: 8px; border-radius: 12px; background: #FFFFFF; }
.gate-secret { word-break: break-all; }
.link { align-self: flex-start; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px;
  text-decoration: underline; cursor: pointer; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.top-date { font-size: 13px; color: var(--muted); }
.page-head h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.pill {
  font-size: 12px; font-weight: 500; color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}
.sec-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.sec-head h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.005em; }
.sec-head .count { font-size: 14px; color: var(--muted); }
.sec-head .note { margin-left: auto; font-size: 12.5px; color: var(--faint); }
.chev { color: var(--faint); flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Home: L's computer design (canvas "Home sketch", 2 Nov) */
.home { display: flex; flex-direction: column; gap: 16px; }
.hello { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.hello-mark { width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 6px var(--accent-soft); margin: 6px; }
.hello-text { flex: 1 1 260px; min-width: 0; }
.hello h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.hello p { margin-top: 4px; font-size: 14.5px; color: var(--muted); }
.hello-side { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hello-side .read-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px;
  font-size: 13px; text-decoration: none; }
.date-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 500; white-space: nowrap; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { display: flex; align-items: center; gap: 12px; padding: 14px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.tile:hover { border-color: var(--line-strong); }
.tile-ic { display: flex; color: var(--accent); }
.tile b { display: block; font-size: 13.5px; font-weight: 600; letter-spacing: 0.03em; }
.tile-st { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 13px; font-weight: 500; }
.tile-read { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }

.ask { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.ask-mark { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); }
.ask-text { flex: 1 1 200px; }
.ask-text h2 { font-size: 15px; font-weight: 600; }
.ask-text p { margin-top: 2px; font-size: 13px; color: var(--muted); }
.ask-field { flex: 999 1 320px; display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 16px;
  border: 1px solid var(--line-strong); border-radius: 999px; }
.ask-field:focus-within { border-color: var(--accent); }
.ask-field input { flex: 1; min-width: 0; height: 36px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 14.5px; outline: none; }
.ask-field button { width: 38px; height: 38px; flex: none; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); cursor: pointer; }
.ask-receipt { flex-basis: 100%; font-size: 13px; color: var(--muted); }

.grid2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.tile-box { min-width: 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.tile-box .box-foot { margin: 10px -16px -14px; }
.tile-box .empty { padding: 8px 0; }
.box-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.box-head h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; }
.box-head h2 span { display: flex; }
.box-head .count { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }
.box-sub { margin-bottom: 8px; font-size: 13px; color: var(--muted); }

/* Tick boxes: kept on this screen only until the login is built */
.tick { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line);
  font-size: 14.5px; line-height: 1.4; cursor: pointer; }
.tick:last-of-type { border-bottom: 0; }
.tick input { width: 17px; height: 17px; flex: none; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.tick-main { flex: 1; min-width: 0; }
.tick-main .a { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; color: var(--faint); }
.tick-main .a:empty { display: none; }
.tick input:checked + .tick-main { color: var(--muted); text-decoration: line-through; }
.tick.start { margin: 2px -10px 4px; padding: 10px; border: 0; border-radius: 10px; background: var(--accent-soft); }
.tick.start .a { color: var(--accent); }
.tick-when { padding-top: 2px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }

/* Time Blocking */
.blocks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.blocks li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; }
.bt { font: 500 12.5px var(--mono); color: var(--muted); }
.blk { padding: 9px 12px; border-radius: 8px; border-left: 3px solid var(--accent); background: var(--accent-soft); font-size: 14px; line-height: 1.35; }
.blk .a { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; color: var(--accent); }
.blk.loose { border-left-color: var(--line-strong); background: var(--press); }
.blk.loose .a { color: var(--faint); }

/* Client Snapshot: one row per area */
.snap-wrap { overflow-x: auto; }
.snap { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 14px; }
.snap th { padding: 6px 12px 8px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: bottom;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); }
.snap td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.snap tr:last-child td { border-bottom: 0; }
.snap .n { width: 92px; text-align: center; }
.snap a { font-weight: 600; letter-spacing: 0.03em; text-decoration: none; }
.snap a:hover { text-decoration: underline; }
.ws { display: flex; align-items: center; gap: 10px; }
.bar { flex: 1; min-width: 60px; height: 6px; border-radius: 3px; background: var(--press); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--green); }
.ws-l { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.num { display: inline-block; min-width: 28px; padding: 2px 8px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: var(--faint); font-variant-numeric: tabular-nums; }
.num.n-need { color: var(--accent); background: var(--accent-soft); }
.num.n-late { color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }
.num.n-risk { color: var(--amber); background: color-mix(in srgb, var(--amber) 14%, transparent); }
.num.n-date { color: var(--ink); background: var(--press); }

/* Card (D-098): buttons in a bar at the bottom on a phone, under the card on a computer */
.back { display: inline-block; margin-bottom: 14px; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; }
.card-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; padding-bottom: 140px; }
.card-main { display: flex; flex-direction: column; gap: 14px; padding: 18px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.card-meta2 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--muted); }
.card-meta2 .area { font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em; color: var(--ink); }
.card-meta2 .since { margin-left: auto; }
.card-main h1 { font-size: 23px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.card-ask { padding: 14px 16px; border-radius: 12px; background: var(--bg); font-size: 16px; line-height: 1.45; }
.card-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; font-size: 13.5px; color: var(--muted); }
.btn.accent { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600; }
.btn:disabled { opacity: 0.6; cursor: default; }
.decide-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line); }
.decide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.decide .btn { height: 46px; }
.decide .btn.accent { grid-column: 1 / -1; height: 50px; font-size: 16px; }
.decide-hints { display: none; }
.form-err { margin-bottom: 8px; font-size: 14px; color: var(--red); }
.card-where { display: flex; flex-direction: column; gap: 10px; }
.card-state { padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); font-size: 14.5px; line-height: 1.45; }
.card-state b { display: block; margin-bottom: 2px; font-weight: 600; }
.card-state.closed { background: color-mix(in srgb, var(--green) 13%, transparent); }
.next-btn { display: inline-flex; align-items: center; justify-content: center; align-self: flex-start; text-decoration: none; }
.card-side { display: flex; flex-direction: column; gap: 16px; }
.side-box { padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; font-size: 14px; line-height: 1.45; }
.side-box h2 { margin-bottom: 8px; font-size: 15px; font-weight: 600; }
.side-box ol { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.test-note { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); font-size: 13px; }
.hist { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 6px 10px; font-size: 13.5px; }
.hist .when { color: var(--muted); }

/* Later and Edit: a sheet from the bottom on a phone, a small window on a computer */
.sheet-back { position: fixed; inset: 0; z-index: 20; background: rgba(15, 17, 20, 0.4); }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-height: 90vh; overflow: auto; display: flex; flex-direction: column; gap: 14px;
  padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); background: var(--surface); border-radius: 20px 20px 0 0; }
.sheet h2 { font-size: 19px; font-weight: 600; }
.sheet p { margin-top: 4px; font-size: 14px; color: var(--muted); }
.opts { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 13px 14px; cursor: pointer; }
.opt + .opt { border-top: 1px solid var(--line); }
.opt > span:first-of-type { flex: 1; }
.opt-d { color: var(--muted); }
.opt input[type="radio"] { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.opt input[type="date"] { height: 34px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }
.sheet textarea { width: 100%; min-height: 120px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px;
  background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; line-height: 1.45; resize: vertical; }
.sheet textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.sheet-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sheet-btns .btn { height: 48px; }

/* Life Balance: kept as drawn, no numbers until time is counted per area */
.balance { display: flex; align-items: center; gap: 20px; }
.ring { flex: none; color: var(--press); }
.balance-note { font-weight: 600; }

.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--faint); display: inline-block; }
.dot.green { background: var(--green); }
.dot.amber { background: var(--amber); }
.dot.red { background: var(--red); }

/* What's going on: one panel per area */
.panels { display: grid; grid-template-columns: 1fr; gap: 12px; }
.panel {
  display: flex; flex-direction: column; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 14px;
}
.panel:hover { border-color: var(--line-strong); }
.panel:active { background: var(--press); }
.panel-head { display: flex; align-items: center; gap: 10px; }
.panel-head h3 { font-size: 15px; font-weight: 600; letter-spacing: 0.03em; }
.chip { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; color: var(--muted); background: var(--press); white-space: nowrap; }
.chip.c-red { color: var(--red); background: color-mix(in srgb, var(--red) 13%, transparent); }
.chip.c-amber { color: var(--amber); background: color-mix(in srgb, var(--amber) 15%, transparent); }
.chip.c-green { color: var(--green); background: color-mix(in srgb, var(--green) 13%, transparent); }
.panel-n { margin-left: auto; font-size: 12.5px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.panel-why { margin: 8px 0 2px; font-size: 14.5px; font-weight: 500; line-height: 1.4; }
.panel .label { margin: 12px 0 3px; }
.lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.lines li { position: relative; padding-left: 13px; font-size: 13.5px; color: var(--muted); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lines li::before { content: ""; position: absolute; left: 1px; top: 0.62em; width: 4px; height: 4px; border-radius: 50%; background: var(--faint); }
.lines.ws li { padding-left: 0; display: flex; gap: 8px; align-items: baseline; }
.lines.ws li::before { display: none; }
.lines.ws b { color: var(--ink); font-weight: 600; }
.quiet { font-size: 13.5px; color: var(--faint); }
@media (max-width: 999px) {  /* phone: shorter panels; the area page has the rest */
  .lines.moving li:nth-child(n+3), .lines.waiting li:nth-child(n+2) { display: none; }
}
.next { font-size: 13.5px; color: var(--ink); line-height: 1.4; }
.next .when { color: var(--muted); font-weight: 500; margin-right: 4px; font-variant-numeric: tabular-nums; }
.panel-open { margin-top: auto; padding-top: 14px; font-size: 13px; font-weight: 500; color: var(--muted); }

/* Needs you, ranked (D-097); the full card opens on tap (D-098) */
.need-list { list-style: none; margin: 0; padding: 0; }
.need-list li + li { border-top: 1px solid var(--line); }
.need { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 12px 14px 12px 16px; text-decoration: none; }
.need:active { background: var(--press); }
.need-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12.5px; color: var(--muted); }
.need-meta .area { font-weight: 600; letter-spacing: 0.03em; color: var(--ink); font-size: 12px; }
.kind { font-size: 11.5px; border: 1px solid var(--line-strong); border-radius: 6px; padding: 0 6px; color: var(--muted); }
.need-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 3px; font-size: 15px; font-weight: 500; line-height: 1.35; }
.need-age { font-size: 12.5px; color: var(--faint); white-space: nowrap; }

/* Next 7 days */
.wday { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 10px 16px; }
.wday + .wday { border-top: 1px solid var(--line); }
.wday-l { font-size: 13px; font-weight: 600; color: var(--ink); }
.wday ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.wday li { display: grid; grid-template-columns: 42px 1fr; gap: 8px; font-size: 14px; line-height: 1.4; }
.wt { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.wday .a { font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; color: var(--faint); margin-right: 2px; }

/* Cards (D-098) */
.cards { display: flex; flex-direction: column; gap: 10px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px 14px;
}
.card-meta { display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.card-meta .area { font-weight: 600; letter-spacing: 0.02em; color: var(--ink); }
.card-meta .sep { color: var(--faint); }
.due-late { color: var(--red); font-weight: 500; }
.due-soon { color: var(--amber); font-weight: 500; }
.card-title { font-size: 16px; font-weight: 600; line-height: 1.3; letter-spacing: -0.005em; }
.card-q { margin-top: 6px; color: var(--muted); font-size: 14.5px; }
.card-q { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.card-src { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.card-age { color: var(--faint); white-space: nowrap; }
.card-src:hover { color: var(--ink); }
.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.actions .btn { padding: 0 8px; }
.btn {
  height: 38px; padding: 0 14px; border-radius: 9px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-strong); font-weight: 500; font-size: 14px;
}
.btn:active { background: var(--press); }
.btn.primary { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }

.box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.label { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.box-foot { padding: 10px 16px; font-size: 12.5px; color: var(--faint); border-top: 1px solid var(--line); }

/* Projects */
.rows { list-style: none; margin: 0; padding: 0; }
.row { border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row a { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; align-items: center; padding: 12px 16px; text-decoration: none; }
.row a:active { background: var(--press); }
.row .name { font-weight: 600; font-size: 14.5px; letter-spacing: 0.01em; }
.row .word { font-size: 13px; font-weight: 500; margin-left: 6px; }
.row .why { grid-column: 2 / 4; font-size: 13.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .n { font-size: 12.5px; color: var(--muted); }
.w-green { color: var(--green); }
.w-amber { color: var(--amber); }
.w-red { color: var(--red); }
.w-grey { color: var(--muted); }

/* Learn and Done (collapsed, D-096) */
.fold { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.fold + .fold { margin-top: 8px; }
.fold summary { display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; list-style: none; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary b { font-weight: 600; }
.fold summary span { flex: 1; color: var(--muted); font-size: 14px; }
.fold summary .chev { flex: none; }
.fold[open] .chev { transform: rotate(90deg); }
.fold .fold-body { padding: 0 16px 14px; color: var(--muted); font-size: 14px; }

.empty { padding: 14px 16px; color: var(--muted); font-size: 14px; }
.mono { font-family: var(--mono); font-size: 0.92em; }

/* Desktop (D-103) */
@media (min-width: 1000px) {
  .wrap { padding: 0 32px; }
  .shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); align-items: start; }
  .side-nav { height: 100vh; flex-direction: column; align-items: stretch; gap: 0; padding: 24px 14px 18px;
    overflow-y: auto; background: var(--surface); border-bottom: 0; border-right: 1px solid var(--line);
    backdrop-filter: none; -webkit-backdrop-filter: none; }
  .brand { display: flex; padding: 0 10px 22px; }
  .nav-list { flex-direction: column; }
  .nav-i { padding: 9px 12px; }
  .nav-out { margin-top: auto; }
  .content { max-width: 1240px; padding: 28px 32px 64px; }
  .page-head h1 { font-size: 24px; }
  .hello h1 { font-size: 26px; }
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .tile { padding: 16px 18px; gap: 14px; }
  .ask { padding: 14px 18px; }
  .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span2 { grid-column: span 2; }
  .tile-box { padding: 16px 20px; }
  .tile-box .box-foot { margin: 12px -20px -16px; padding: 10px 20px; }
  .card-page { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); padding-bottom: 0; }
  .card-main { padding: 24px 28px; }
  .card-main h1 { font-size: 26px; }
  .decide-bar { position: static; padding: 4px 0 0; background: none; border: 0; }
  .decide { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .decide .btn.accent { grid-column: auto; height: 46px; font-size: 15px; }
  .decide-hints { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 8px; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
  .sheet { left: 50%; right: auto; top: 50%; bottom: auto; width: 440px; transform: translate(-50%, -50%); border-radius: 16px; padding: 24px; }
  .panels { grid-template-columns: 1fr 1fr; gap: 16px; }
  .panel { padding: 18px 20px 16px; }
  .need { padding: 13px 16px 13px 18px; }
  .wday { grid-template-columns: 92px 1fr; gap: 12px; }
  .wday-l { padding-top: 1px; }
  .card { padding: 16px 18px; }
  .actions { display: flex; }
  .actions .btn { min-width: 92px; }
}
