/* Ads. Colours, type, spacing and radii from docs/design/tokens.json ("The Suasion", v1).
   Light is the default, as in the design canvas; dark follows the system setting. */

@font-face { font-family: "Inter Tight"; src: url("/static/fonts/inter-tight-latin.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
  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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Tight"; src: url("/static/fonts/inter-tight-latin-ext.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, 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: "JetBrains Mono"; src: url("/static/fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 100 800; font-display: swap;
  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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; src: url("/static/fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  font-weight: 100 800; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light;
  --bg: #f5f5f3;
  --panel: #ffffff;
  --panel-2: #f0f0ee;
  --raise: #e7e7e4;
  --header-bg: rgba(245, 245, 243, 0.88);
  --line: #d9d9d5;
  --line-2: #898e89;
  --ctl: #858a85;
  --ctl-hover: #747975;
  --focus: #202220;
  --fg-strong: #111211;
  --fg: #292a29;
  --text: #383a38;
  --muted: #5c605d;
  --faint: #686d69;
  --accent: #bd1824;
  --accent-soft: rgba(189, 24, 36, 0.09);
  --accent-ink: #ffffff;
  --accent-border: rgba(189, 24, 36, 0.4);
  --ok: #176a41;
  --ok-border: rgba(23, 106, 65, 0.35);
  --warn: #795000;
  --bad: #bd1824;

  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gap: 14px;
  --gutter: 20px;
  --page-width: 1440px;
  --radius: 10px;
  --radius-control: 8px;
  --radius-badge: 6px;
  --radius-pill: 999px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #050505;
    --panel: #0b0b0b;
    --panel-2: #111111;
    --raise: #161616;
    --header-bg: rgba(5, 5, 5, 0.82);
    --line: #1f1f1f;
    --line-2: #2a2a2a;
    --ctl: #626262;
    --ctl-hover: #626262;
    --focus: #ededed;
    --fg-strong: #f7f7f7;
    --fg: #ededed;
    --text: #cfcfcf;
    --muted: #9a9a9a;
    --faint: #777b79;
    --accent: #ff2a2a;
    --accent-soft: rgba(255, 42, 42, 0.12);
    --accent-ink: #050505;
    --accent-border: rgba(255, 42, 42, 0.35);
    --ok: #3ddc84;
    --ok-border: rgba(61, 220, 132, 0.3);
    --warn: #ffb020;
    --bad: #ff2a2a;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { color: var(--fg-strong); margin: 0; }
p { margin: 0; }
.noscript, .boot { padding: 40px var(--gutter); }

/* Labels */
.eyebrow { font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.14em; font-size: 11px; color: var(--muted); }
.fl { font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.12em; font-size: 10px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.error { color: var(--bad); font-size: 14px; min-height: 0; }
.error:empty { display: none; }

/* Controls */
button, .btn {
  font: inherit; font-size: 16px; color: var(--fg); cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--ctl); border-radius: var(--radius-control);
  padding: 7px 16px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; transition: border-color 0.15s, background 0.15s;
}
button:hover, .btn:hover { border-color: var(--ctl-hover); background: var(--raise); }
button.primary { background: var(--fg); color: var(--accent-ink); border-color: var(--fg); font-weight: 600; }
button.primary:hover { background: var(--fg-strong); }
button:disabled { opacity: 0.55; cursor: default; }
input, select {
  font: inherit; font-size: 16px; color: var(--fg); background: var(--bg);
  border: 1px solid var(--ctl); border-radius: var(--radius-control); padding: 8px 12px; min-height: 44px; width: 100%;
}
input::placeholder { color: var(--faint); }
input[type="checkbox"] { width: auto; min-height: 0; accent-color: var(--fg); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.12em; font-size: 10px; color: var(--muted); }
.field-hint { font-size: 13px; color: var(--muted); }

/* Sign in (docs/design/Login.dc.html) */
.login { min-height: 100vh; display: flex; flex-direction: column; }
.login-bar { display: flex; align-items: center; padding: 14px 32px; }
.login-main { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 40px 20px 120px; }
.login-stack { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 28px; }
.login-head { display: flex; flex-direction: column; gap: 12px; }
.login-head h1 { font-weight: 300; font-size: 44px; line-height: 1.04; letter-spacing: -0.02em; }
.login-head p:last-child { color: var(--text); }
.login-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 16px;
}
.login-card button { min-height: 48px; }
.login-card input { min-height: 48px; }
.login-foot { font-size: 14px; color: var(--muted); }

/* Shell */
.brand { font-weight: 600; font-size: 18px; letter-spacing: -0.01em; color: var(--fg-strong); text-decoration: none; }
.bar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 12px var(--gutter); background: var(--header-bg); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1 1 auto; }
.nav-link { padding: 6px 12px; border-radius: var(--radius-control); text-decoration: none; color: var(--muted); }
.nav-link:hover { background: var(--panel-2); color: var(--fg); }
.nav-link.active { background: var(--raise); color: var(--fg-strong); }
.who { text-decoration: none; font-size: 14px; }
.who:hover { color: var(--fg); }
.page { max-width: var(--page-width); margin: 0 auto; padding: 32px var(--gutter) 80px; display: flex; flex-direction: column; gap: 24px; }
.page-title { font-size: 36px; font-weight: 300; letter-spacing: -0.02em; line-height: 1.1; }
.lede { max-width: 70ch; color: var(--text); }
.section-title { font-size: 18px; font-weight: 500; }

/* Cards and lists */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
.card.off { opacity: 0.65; }
.card header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.card h2 { font-size: 18px; font-weight: 500; letter-spacing: -0.005em; }
.cards { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.row > .field { flex: 1 1 180px; }
.check { display: inline-flex; gap: 8px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--radius-pill); padding: 2px 10px;
}
.badge { font-size: 12px; border-radius: var(--radius-badge); padding: 2px 8px; background: var(--raise); color: var(--fg); }
.badge.owner { background: var(--accent-soft); color: var(--accent); }
.empty { border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 6px; }
.empty-title { color: var(--fg-strong); font-weight: 500; }
.narrow { max-width: 560px; }

#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 20; }
.toast { background: var(--fg); color: var(--accent-ink); border-radius: var(--radius-control); padding: 10px 14px; font-size: 14px; max-width: 360px; }
.toast.error { background: var(--bad); color: #ffffff; }

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .login-bar { padding: 14px 16px; }
  .login-head h1 { font-size: 36px; }
  .page-title { font-size: 30px; }
  .cards { grid-template-columns: 1fr; }
}
