/* Private. The Studio look: Geist and Geist Mono, flat, square, one red for what needs you. */
@font-face { font-family: "Geist"; src: url("fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #fcfcfc; --panel: #ffffff; --line: #e4e4e4; --line-2: #d0d0d0;
  --ink: #171717; --ink-2: #5f5f5f; --ink-3: #8d8d8d;
  --fill: #171717; --on-fill: #ffffff; --hover: #f3f3f3;
  --signal: #ce2c31; --signal-bg: #fff4f3; --soon: #8a5a00; --soon-bg: #fff8e6; --ok-bg: #f1f6f1; --ok: #2a6a3a;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 3px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #111111; --panel: #181818; --line: #2a2a2a; --line-2: #3a3a3a;
    --ink: #ededed; --ink-2: #a8a8a8; --ink-3: #7a7a7a;
    --fill: #ededed; --on-fill: #111111; --hover: #1f1f1f;
    --signal: #ff6b63; --signal-bg: #2a1614; --soon: #f0c060; --soon-bg: #262010; --ok-bg: #15201a; --ok: #7fcf96;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
h1 { font-size: 22px; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
h2 { font: 500 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 8px; display: flex; align-items: baseline; gap: 8px; }
p { margin: 0; }
a { color: inherit; }
.link { text-decoration: underline; text-underline-offset: 3px; }
.quiet, .hint, .lede { color: var(--ink-2); }
.hint { font-size: 13px; }
.count { font: 500 11px/1 var(--mono); color: var(--ink-3); }
code { font: 500 14px/1.3 var(--mono); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* shell */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 20px; height: 52px; padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); background: var(--bg); border-bottom: 1px solid var(--line); }
.brand { font: 600 13px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; }
.tabs-top { display: none; gap: 4px; flex: 1; }
.tab { text-decoration: none; color: var(--ink-2); }
.tabs-top .tab { padding: 6px 10px; border-radius: var(--r); font-weight: 500; }
.tabs-top .tab:hover { background: var(--hover); }
.tabs-top .tab.is-on { color: var(--ink); background: var(--hover); }
.icon-btn { margin-left: auto; display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r); color: var(--ink-2); }
.icon-btn:hover, .icon-btn.is-on { background: var(--hover); color: var(--ink); }
.tabs-bottom { position: fixed; inset: auto 0 0 0; z-index: 5; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--bg); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs-bottom .tab { display: grid; justify-items: center; gap: 2px; padding: 8px 0 7px; font: 500 10px/1.2 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.tabs-bottom .tab.is-on { color: var(--ink); box-shadow: inset 0 2px 0 var(--ink); }
.page { max-width: 720px; margin: 0 auto; padding: 20px max(16px, env(safe-area-inset-right)) calc(96px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 20px; }
.page.is-plain { min-height: 100dvh; justify-content: center; padding-bottom: 20px; }
@media (min-width: 760px) { .tabs-top { display: flex; } .tabs-bottom { display: none; } .page { padding-bottom: 60px; padding-top: 28px; } }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; font-size: 13px; align-self: flex-start; }
.back:hover { color: var(--ink); }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot { font: 11px/1 var(--mono); color: var(--ink-3); }

/* buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel); color: var(--ink); font: 500 14px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn.is-primary { background: var(--fill); border-color: var(--fill); color: var(--on-fill); }
.btn.is-primary:hover { opacity: 0.88; }
.btn.is-ghost { border-color: transparent; background: none; color: var(--ink-2); }
.btn.is-ghost:hover { background: var(--hover); color: var(--ink); }
.btn.is-danger { color: var(--signal); border-color: var(--signal); background: none; }
.btn.is-sm { min-height: 32px; padding: 0 11px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: default; }
.inline { display: inline; margin: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .pair { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-label { font: 500 11px/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.input, .select, .textarea { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel); color: var(--ink); font: 16px/1.4 var(--sans); }
.input.is-mono { font-family: var(--mono); font-size: 15px; }
.textarea { resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.search { display: flex; gap: 8px; }
.search .input { flex: 1; min-width: 0; }
.search .btn { min-height: 40px; }

/* panels and lists */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.block { display: flex; flex-direction: column; gap: 8px; }
.block h2 { margin: 0; }
.block.is-late h2 { color: var(--signal); }
.rows { list-style: none; margin: 0; padding: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--line); min-width: 0; }
.row:first-child { border-top: 0; }
.row.is-late { box-shadow: inset 2px 0 0 var(--signal); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; text-decoration: none; }
.row-title { font-weight: 500; overflow-wrap: anywhere; }
.row-sub { font-size: 13px; color: var(--ink-2); }
.row-need { font-size: 13px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.ref { display: flex; align-items: center; gap: 4px; min-width: 0; }
.ref code { overflow-wrap: anywhere; user-select: all; }
.when { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.when-date { font: 500 13px/1.4 var(--mono); }
.when-away { font: 12px/1.4 var(--mono); color: var(--ink-2); }
.row.is-late .when-away { color: var(--signal); }
.row.is-soon .when-away { color: var(--soon); }
@media (max-width: 480px) { .row { flex-wrap: wrap; } .row-main { flex-basis: 100%; } .when { flex-direction: row; gap: 8px; align-items: baseline; margin-right: auto; } .ref { flex: 1; justify-content: space-between; } }
.tag { font: 500 11px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 7px; border: 1px solid var(--line-2); border-radius: var(--r); color: var(--ink-2); white-space: nowrap; }
.fold summary { cursor: pointer; font: 500 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); padding: 4px 0 8px; display: flex; gap: 8px; align-items: baseline; }
.log { list-style: none; margin: 0; padding: 0; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.log-at { font: 12px/1.4 var(--mono); color: var(--ink-3); margin-right: 10px; }
.flash { padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--ok-bg); color: var(--ok); font-weight: 500; }
.flash.is-error { background: var(--signal-bg); color: var(--signal); border-color: var(--signal); }

/* sign-in */
.auth { width: 100%; max-width: 380px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.auth-mark { font: 600 12px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.auth h1 { font-size: 28px; }
.auth .btn { min-height: 46px; }
