:root {
  --ink: #101214;
  --ground: #F3F1EC;
  --panel: #FFFFFF;
  --sunk: #E9E6DF;
  --line: #DEDBD4;
  --fg: #101214;
  --muted: #5B5F63;
  --gold: #C9A227;
  --austin: #A84E26;
  --sd: #1C5873;
  --bad: #A8322A;
  --good: #2F7A4D;
  --warn: #9A6B00;
  --sans: Archivo, "Helvetica Neue", Arial, sans-serif;
  --mono: "Space Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0D0F11; --panel: #16191C; --sunk: #1E2226; --line: #2B3035;
    --fg: #ECEBE7; --muted: #A3A8AC; --austin: #D9774B; --sd: #5FA6C4; --bad: #E0766D; --good: #5DB384; --warn: #D9A93A;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--ground); color: var(--fg); font-family: var(--sans); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }
.boot { padding: 40px 20px; color: var(--muted); font-family: var(--mono); font-size: 13px; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.title { font-size: clamp(28px, 4vw, 40px); font-weight: 800; line-height: 1.1; margin: 4px 0 0; text-wrap: balance; letter-spacing: -.01em; }
h2 { font-size: 20px; font-weight: 800; margin: 0; }
h3 { font-size: 16px; font-weight: 700; margin: 0; }

/* shell */
.shell { min-height: 100vh; display: flex; }
.side { display: none; }
.main { flex: 1; min-width: 0; padding: calc(12px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(96px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.wrap { max-width: 1080px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 8px; }
.topbar .brandmini { background: var(--ink); padding: 8px 10px; display: inline-flex; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(var(--tabs), 1fr); background: var(--ink); padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 2px 8px; color: #9DA3A8; text-decoration: none; font-size: 11px; font-weight: 600; min-width: 0; position: relative; }
.tabbar a[aria-current="page"] { color: #fff; }
.tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 2px; background: var(--gold); }
.tabbar svg, .side nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.badge { display: inline-flex; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--gold); color: #101214; font-size: 11px; font-weight: 800; align-items: center; justify-content: center; }
.tabbar .badge { position: absolute; top: 4px; right: calc(50% - 22px); }
@media (min-width: 900px) {
  .side { display: flex; flex-direction: column; gap: 26px; width: 236px; flex: none; background: var(--ink); color: #fff; padding: 26px 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
  .side nav { display: flex; flex-direction: column; gap: 2px; }
  .side nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; color: #B8BDC1; text-decoration: none; font-weight: 600; font-size: 15px; }
  .side nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
  .side nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.08); box-shadow: inset 2px 0 0 var(--gold); }
  .side nav .badge { margin-left: auto; }
  .side .who { margin-top: auto; font-size: 13px; color: #9DA3A8; overflow-wrap: anywhere; }
  .side .who b { color: #fff; display: block; font-size: 14px; }
  .tabbar, .topbar .brandmini { display: none; }
  .main { padding: 32px 40px 60px; }
}
.viewas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.viewas span { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #9DA3A8; width: 100%; }
.viewas button { background: transparent; border: 1px solid #3A3F44; color: #B8BDC1; padding: 4px 9px; font-size: 12px; font-weight: 600; cursor: pointer; }
.viewas button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #101214; }
.viewbar { background: var(--gold); color: #101214; padding: 8px 12px; font-size: 13px; font-weight: 600; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.viewbar button { background: #101214; color: #fff; border: 0; padding: 4px 10px; font-size: 12px; cursor: pointer; }

/* building blocks */
.card { background: var(--panel); border: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card.tight { padding: 14px 16px; gap: 8px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); }
.stats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); }
.stat { background: var(--panel); border: 1px solid var(--line); padding: 14px 16px; text-decoration: none; display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 28px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }
.stat.alert b { color: var(--bad); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--line); background: var(--panel); text-decoration: none; min-width: 0; }
a.tile:hover, button.tile:hover { border-color: var(--fg); }
button.tile { text-align: left; cursor: pointer; font: inherit; }
.tile b { font-weight: 700; }
.tile span { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list > li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); min-width: 0; }
.list > li:first-child { border-top: 0; }
.list a.rowlink { text-decoration: none; display: block; }
.meta { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.pill { display: inline-flex; align-items: center; padding: 1px 8px; border: 1px solid var(--line); font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.austin { border-color: var(--austin); color: var(--austin); }
.pill.san_diego { border-color: var(--sd); color: var(--sd); }
.pill.bad { border-color: var(--bad); color: var(--bad); }
.pill.good { border-color: var(--good); color: var(--good); }
.pill.warn { border-color: var(--warn); color: var(--warn); }
.pill.gold { background: var(--gold); border-color: var(--gold); color: #101214; }
.over { color: var(--bad); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1px solid var(--line); background: var(--panel); padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--fg); color: var(--ground); border-color: var(--fg); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border: 1px solid var(--fg); background: transparent; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.primary { background: #ECEBE7; border-color: #ECEBE7; color: #101214; } }
.btn.small { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn.ghost { border-color: var(--line); }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn:disabled { opacity: .5; cursor: default; }
.linkbtn { background: none; border: 0; padding: 0; font-weight: 600; text-decoration: underline; cursor: pointer; font-size: 14px; }
.fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); min-width: 0; }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--fg); font-weight: 500; font-size: 14px; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); font-size: 16px; font-weight: 400; border-radius: 0; min-width: 0; }
label.check input { width: auto; }
textarea { min-height: 84px; resize: vertical; }
.full { grid-column: 1 / -1; }
.note { background: var(--sunk); padding: 12px 14px; font-size: 14px; }
.note.bad { border-left: 3px solid var(--bad); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(88px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: #fff; padding: 10px 16px; font-size: 14px; z-index: 50; max-width: calc(100% - 32px); }
@media (min-width: 900px) { .toast { bottom: 28px; } }
.check-item { display: flex; gap: 10px; align-items: flex-start; }
.check-item input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.done-text { text-decoration: line-through; color: var(--muted); }
.thread { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 85%; padding: 10px 12px; background: var(--sunk); font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.mine { align-self: flex-end; background: var(--ink); color: #fff; }
@media (prefers-color-scheme: dark) { .msg.mine { background: #2B3035; } }
.msg small { display: block; font-size: 11px; opacity: .7; margin-top: 4px; }
.progress { height: 6px; background: var(--sunk); }
.progress i { display: block; height: 100%; background: var(--gold); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
details summary { cursor: pointer; font-weight: 700; }

/* sign-in */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr; background: var(--ink); color: #fff; }
.auth .pane { padding: calc(40px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) 40px max(20px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 22px; max-width: 520px; width: 100%; margin: 0 auto; }
.auth h1 { font-size: clamp(34px, 6vw, 52px); font-weight: 800; line-height: 1.05; margin: 0; letter-spacing: -.01em; }
.auth p { color: #B8BDC1; margin: 0; }
.auth .eyebrow { color: #9DA3A8; }
.auth label { color: #B8BDC1; }
.auth input { background: #1B1E21; border-color: #33383D; color: #fff; }
.auth .btn { border-color: #fff; color: #fff; }
.auth .btn.primary { background: #fff; color: #101214; }
.auth .google { background: #fff; color: #101214; border-color: #fff; }
.auth .google svg { width: 18px; height: 18px; }
.auth .or { display: flex; align-items: center; gap: 12px; color: #6D7378; font-size: 12px; font-family: var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.auth .or::before, .auth .or::after { content: ""; flex: 1; height: 1px; background: #2B3035; }
.auth .linkbtn { color: #fff; }
.auth .note { background: #1B1E21; color: #D7DADC; }
.auth .foot { font-size: 12px; color: #6D7378; }
.auth .foot a { color: #9DA3A8; }
.wordmark { display: block; }
#f-quicktask input[name="title"] { flex: 1 1 220px; }
#f-quicktask input[name="due"] { flex: 0 1 170px; }
