/* Tenon Labs launch board. Same tokens, type and hairline language as tenonlabs.us. */
@font-face { font-family: "TenonSans"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/TenonSans-400.v2.woff2") format("woff2"); }
@font-face { font-family: "TenonSans"; font-weight: 500; font-style: normal; font-display: swap; src: url("/assets/fonts/TenonSans-500.v2.woff2") format("woff2"); }
@font-face { font-family: "TenonSans"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/TenonSans-600.v2.woff2") format("woff2"); }
@font-face { font-family: "TenonSans"; font-weight: 700; font-style: normal; font-display: swap; src: url("/assets/fonts/TenonSans-700.v2.woff2") format("woff2"); }
@font-face { font-family: "TenonSans"; font-weight: 800; font-style: normal; font-display: swap; src: url("/assets/fonts/TenonSans-800.v2.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --bg: #050607; --bg-2: #0a0b0d; --surface: #0f1013; --surface-2: #15161a;
  --ink: #f1f1ec; --ink-2: #c8c8c1; --muted: #8f9089; --dim: #5b5c57;
  --line: rgba(241, 241, 236, 0.10); --line-2: rgba(241, 241, 236, 0.22);
  --accent: #009cfa; --accent-2: #00d1fa;
  /* Status (reserved; never reused for identity) */
  --done: #17a862; --progress: #0090e8; --todo: #4a4b50; --todo-ink: #8f9089; --overdue: #e66767; --soon: #c98500;
  /* Workstream identity, fixed order (validated for the dark surface) */
  --ws-1: #3987e5; --ws-2: #d95926; --ws-3: #199e70; --ws-4: #c98500; --ws-5: #d55181; --ws-6: #008300; --ws-7: #9085e9; --ws-8: #e66767;
  --display: 'TenonSans', 'Sora', 'Segoe UI', Helvetica, Arial, sans-serif;
  --body: 'TenonSans', 'Sora', 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 64px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --nav-h: 64px;
  --j-top: #2a2b2f; --j-x: #1c1d21; --j-y: #121316; --j-edge: rgba(241, 241, 236, 0.32);
  --j-hole-far: #050607; --j-hole-floor: #34353a; --j-hole-wall: #0d0e11;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.55; letter-spacing: 0.005em; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; text-wrap: balance; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: #050607; }
.wrap { max-width: 1480px; margin: 0 auto; }
section { position: relative; padding: clamp(48px, 6vw, 96px) var(--gutter); }
.mono { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; background: var(--accent); }
.display { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: -0.02em; line-height: 0.94; }
.h-xl { font-size: clamp(44px, 7.6vw, 124px); }
.h-md { font-size: clamp(26px, 3.2vw, 48px); }
.lede { color: var(--ink-2); font-size: clamp(16px, 1.25vw, 19px); line-height: 1.55; max-width: 56ch; }
.num { font-variant-numeric: tabular-nums; }

.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 20px clamp(24px, 4vw, 64px); padding-top: 20px; border-top: 1px solid var(--line-2); margin-bottom: clamp(28px, 4vw, 56px); }
.sec-head .idx { display: flex; flex-direction: column; gap: 10px; }
.sec-head .idx .n { font-family: var(--mono); font-size: 12px; color: var(--ink); letter-spacing: 0.12em; }
.sec-head .right { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.sec-head p { color: var(--muted); margin-top: 10px; max-width: 60ch; }
@media (max-width: 820px) { .sec-head { grid-template-columns: 1fr; } }

.btn { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; padding: 12px 16px; text-decoration: none; border: 1px solid var(--line-2); color: var(--ink); background: transparent; cursor: pointer; transition: color 220ms var(--ease), border-color 220ms var(--ease), background 220ms var(--ease); white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn-solid { background: var(--ink); color: #050607; border-color: var(--ink); }
.btn-solid:hover { background: #fff; border-color: #fff; }
.btn-sm { padding: 8px 12px; font-size: 10.5px; }
.btn[disabled] { opacity: 0.5; cursor: progress; }
.btn.ms { gap: 12px; }

/* Nav */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--nav-h); display: flex; align-items: center; gap: 24px; padding: 0 var(--gutter); background: rgba(5, 6, 7, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav .brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.nav .brand img { height: 30px; width: auto; }
.nav .brand .mono { color: var(--ink-2); display: none; }
.nav ul { list-style: none; margin: 0 auto; padding: 0; display: flex; gap: 26px; }
.nav ul a { text-decoration: none; font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); transition: color 200ms; }
.nav ul a:hover { color: var(--ink); }
.nav .tools { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.nav .me { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.nav form { margin: 0; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; padding: 7px 10px; border: 1px solid var(--line-2); color: var(--ink-2); background: transparent; cursor: pointer; }
.pill i { width: 6px; height: 6px; background: var(--done); box-shadow: 0 0 0 3px rgba(23, 168, 98, 0.2); }
.pill.warn i { background: var(--soon); box-shadow: 0 0 0 3px rgba(201, 133, 0, 0.2); }
.pill.err i { background: var(--overdue); box-shadow: 0 0 0 3px rgba(230, 103, 103, 0.2); }
.pill.busy i { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }
@media (max-width: 1100px) { .nav ul { display: none; } .nav .me { display: none; } }
@media (max-width: 640px) { .nav .brand .mono { display: none; } .nav .pill span { display: none; } }

/* Hero */
.hero { position: relative; min-height: 100svh; display: grid; align-content: end; padding: calc(var(--nav-h) + 40px) var(--gutter) clamp(24px, 3vw, 40px); overflow: hidden; isolation: isolate; }
.hero .grid { position: absolute; inset: 0; z-index: -2; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 120px 120px; mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%); opacity: 0.55; }
.hero .glow { position: absolute; z-index: -1; width: 60vw; height: 60vw; right: -15vw; top: -10vw; background: radial-gradient(circle, rgba(0, 156, 250, 0.16), transparent 60%); pointer-events: none; }
.hero .grain { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.07; mix-blend-mode: overlay; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(28px, 4vw, 64px); align-items: end; }
.hero h1 { margin-top: 20px; }
.hero h1 .t { color: var(--accent); }
.hero .lede { margin-top: 22px; }
.countdown { display: flex; gap: clamp(14px, 2.5vw, 32px); margin-top: 28px; }
.countdown div { display: grid; gap: 6px; }
.countdown b { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 3.6vw, 52px); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.countdown .mono { color: var(--dim); }
.joint-wrap { position: relative; padding: clamp(18px, 2.5vw, 36px); border: 1px solid var(--line); background: rgba(10, 11, 13, 0.7); backdrop-filter: blur(6px); }
.joint-wrap .cap { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.joint-wrap .cap b { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 22px; letter-spacing: -0.01em; }
.joint-wrap .cap b small { font-size: 13px; color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; margin-left: 10px; }
.joint { width: 100%; height: auto; display: block; max-width: 520px; margin: 0 auto; }
.joint-wrap .foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; }
.frame::before, .frame::after, .frame > .c::before, .frame > .c::after { content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none; z-index: 2; border-color: rgba(241, 241, 236, 0.7); border-style: solid; border-width: 0; }
.frame::before { top: 10px; left: 10px; border-top-width: 1px; border-left-width: 1px; }
.frame::after { top: 10px; right: 10px; border-top-width: 1px; border-right-width: 1px; }
.frame > .c::before { bottom: 10px; left: 10px; border-bottom-width: 1px; border-left-width: 1px; }
.frame > .c::after { bottom: 10px; right: 10px; border-bottom-width: 1px; border-right-width: 1px; }
.gates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 40px); margin-top: clamp(28px, 4vw, 48px); padding-top: 18px; border-top: 1px solid var(--line-2); }
.gate { display: grid; gap: 10px; }
.gate .k { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.gate .k b { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 15px; letter-spacing: 0.01em; }
.gate .bar { height: 3px; background: rgba(241, 241, 236, 0.14); position: relative; overflow: hidden; }
.gate .bar i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--p, 0)); background: var(--ink); transition: transform 1200ms var(--ease); }
.gate .bar i.progress { background: var(--progress); opacity: 0.5; transform: scaleX(var(--p2, 0)); }
.gate .k .mono.late { color: var(--overdue); }
.gate.passed .bar i { background: var(--done); }
@media (max-width: 960px) { .hero-inner { grid-template-columns: 1fr; } .gates { grid-template-columns: 1fr; gap: 18px; } .hero { min-height: 0; } }

/* KPI tiles */
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.tile { padding: clamp(18px, 2vw, 28px); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 14px; align-content: start; min-height: 150px; background: var(--bg); position: relative; }
.tile .v { font-family: var(--display); font-weight: 700; font-size: clamp(34px, 3.4vw, 56px); line-height: 1; letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 10px; }
.tile .v small { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--muted); font-weight: 500; }
.tile .d { color: var(--muted); font-size: 13.5px; }
.tile::after { content: ""; position: absolute; left: 0; top: 0; width: 3px; height: 100%; background: var(--tile-accent, transparent); }
.tile.done { --tile-accent: var(--done); } .tile.progress { --tile-accent: var(--progress); } .tile.overdue { --tile-accent: var(--overdue); } .tile.soon { --tile-accent: var(--soon); }
.tile .spark { height: 28px; }
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tile { min-height: 0; } }

/* Cards + charts */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card { background: var(--bg-2); padding: clamp(18px, 2vw, 28px); display: grid; gap: 16px; align-content: start; min-width: 0; }
.card.wide { grid-column: 1 / -1; }
.card .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.card h3 { font-size: 18px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.01em; line-height: 1.1; }
.card .head p { color: var(--muted); font-size: 13px; margin-top: 6px; max-width: 54ch; }
.seg { display: inline-flex; border: 1px solid var(--line-2); }
.seg button { background: transparent; border: 0; color: var(--muted); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; padding: 7px 11px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #050607; }
.legend { display: flex; flex-wrap: wrap; gap: 14px 18px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.legend i.line { height: 2px; width: 16px; border-radius: 0; }
.legend i.ring { border: 2px solid var(--overdue); background: transparent; border-radius: 50%; width: 8px; height: 8px; }
.viz { width: 100%; height: auto; display: block; }
.card .vizbox { overflow-x: auto; }
.card .vizbox .viz { min-width: 540px; }
.card.wide .vizbox .viz { min-width: 760px; }
.viz text { font-family: var(--mono); font-size: 11px; fill: var(--muted); letter-spacing: 0.04em; }
.viz .lbl { fill: var(--ink-2); font-size: 12px; letter-spacing: 0; font-family: var(--body); }
.viz .val { fill: var(--ink); font-variant-numeric: tabular-nums; }
.viz .grid-l { stroke: var(--line); stroke-width: 1; }
.viz .axis { stroke: var(--line-2); stroke-width: 1; }
.viz .bar { rx: 0; }
.viz .hit { fill: transparent; cursor: pointer; }
.viz .hit:hover + .bar, .viz g.row:hover rect.seg { opacity: 0.85; }
.viz .today { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 4; }
.viz .gate-l { stroke: var(--accent); stroke-width: 1; opacity: 0.55; }
.viz .gate-t { fill: var(--accent); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; }
.card table, .drawer table { width: 100%; border-collapse: collapse; font-size: 13px; }
.card th, .card td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.card th { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.card td.n { text-align: right; font-variant-numeric: tabular-nums; }
.card .tbl { max-height: 420px; overflow: auto; }
.hidden { display: none !important; }
@media (max-width: 960px) { .cards { grid-template-columns: 1fr; } }

/* Runway timeline */
.runway-card { background: var(--bg-2); border: 1px solid var(--line); padding: clamp(14px, 2vw, 24px); display: grid; gap: 12px; }
.runway-card .head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.runway { width: 100%; overflow-x: auto; }
.runway svg { display: block; min-width: 720px; width: 100%; height: auto; }
.runway .phase { fill: rgba(241, 241, 236, 0.035); }
.runway .phase-t { fill: var(--ink-2); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; }
.runway .lane-t { fill: var(--ink-2); font-size: 12px; font-family: var(--body); letter-spacing: 0; }
.runway .dot { cursor: pointer; transition: r 160ms var(--ease); }
.runway .dot:hover { r: 7; }
.runway .month { fill: var(--muted); font-size: 10.5px; }

/* Board */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 22px; }
.filters input, .filters select { background: var(--surface); border: 1px solid var(--line-2); color: var(--ink); padding: 10px 12px; font-size: 13.5px; min-width: 0; }
.filters input { flex: 1 1 220px; }
.filters select { flex: 0 1 auto; }
.filters label.chk { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); padding: 10px 12px; border: 1px solid var(--line-2); cursor: pointer; }
.filters .count { margin-left: auto; color: var(--muted); font-size: 13px; }
.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.col { background: var(--bg); min-width: 0; display: grid; align-content: start; }
.col .col-h { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); position: sticky; top: var(--nav-h); background: rgba(5, 6, 7, 0.92); backdrop-filter: blur(8px); z-index: 2; }
.col .col-h b { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 14px; letter-spacing: 0.02em; display: inline-flex; align-items: center; gap: 10px; }
.col .col-h b i { width: 8px; height: 8px; }
.col.todo .col-h b i { background: var(--todo-ink); } .col.progress .col-h b i { background: var(--progress); } .col.done .col-h b i { background: var(--done); }
.col .list { display: grid; gap: 1px; background: var(--line); }
.col .empty { padding: 28px 16px; color: var(--dim); font-size: 13px; background: var(--bg); }
.col .more { background: var(--bg); border: 0; color: var(--accent); font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; padding: 16px; cursor: pointer; text-align: center; }
.col .more:hover { color: var(--accent-2); }
.task { background: var(--bg-2); padding: 14px 16px; display: grid; gap: 10px; cursor: pointer; text-align: left; border: 0; width: 100%; color: inherit; transition: background 160ms var(--ease); position: relative; }
.task:hover { background: var(--surface-2); }
.task .top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.task .id { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; color: var(--dim); }
.task .ws { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.task .ws i, .chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--muted)); flex: none; }
.task .pri { margin-left: auto; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--soon); border: 1px solid rgba(201, 133, 0, 0.5); padding: 2px 6px; }
.task .ms-tag { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); border: 1px solid rgba(0, 156, 250, 0.5); padding: 2px 6px; }
.task h4 { font-size: 14.5px; font-weight: 600; line-height: 1.3; letter-spacing: 0; text-wrap: pretty; }
.task .bot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.avatars { display: flex; }
.av { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line-2); display: grid; place-items: center; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.04em; color: var(--ink-2); margin-left: -6px; }
.av:first-child { margin-left: 0; }
.due { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.due.late { color: var(--overdue); } .due.soon { color: var(--soon); } .due.ok { color: var(--done); }
.due::before { content: ""; width: 5px; height: 5px; background: currentColor; }
.task.late::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--overdue); }
@media (max-width: 900px) { .kanban { grid-template-columns: 1fr; } .col .col-h { position: static; } }

/* Milestones ledger */
.ledger { border-top: 1px solid var(--line-2); }
.ms { display: grid; grid-template-columns: 120px minmax(0, 1.6fr) minmax(0, 1fr) 130px; gap: 16px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); cursor: pointer; transition: padding-left 300ms var(--ease); }
.ms:hover { padding-left: 8px; }
.ms .d { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: var(--ink); }
.ms b { font-family: var(--display); font-weight: 700; font-size: clamp(15px, 1.4vw, 20px); text-transform: uppercase; letter-spacing: -0.005em; line-height: 1.1; }
.ms .who { color: var(--muted); font-size: 13px; }
.ms .st { justify-self: end; }
.ms.next { background: linear-gradient(90deg, rgba(0, 156, 250, 0.08), transparent 60%); }
.ms.next .d { color: var(--accent); }
.ms.year { grid-template-columns: 1fr; padding: 26px 0 8px; cursor: default; border-bottom: 1px solid var(--line-2); }
.ms.year:hover { padding-left: 0; }
.status { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; padding: 5px 9px; border: 1px solid var(--line-2); color: var(--ink-2); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.status i { width: 6px; height: 6px; background: var(--todo-ink); }
.status.progress i { background: var(--progress); box-shadow: 0 0 0 3px rgba(0, 144, 232, 0.2); }
.status.done i { background: var(--done); } .status.done { color: var(--done); border-color: rgba(23, 168, 98, 0.4); }
.status.late i { background: var(--overdue); } .status.late { color: var(--overdue); border-color: rgba(230, 103, 103, 0.4); }
@media (max-width: 760px) { .ms { grid-template-columns: 1fr; gap: 6px; } .ms .st { justify-self: start; } }

/* Drawer */
.drawer-bg { position: fixed; inset: 0; background: rgba(5, 6, 7, 0.6); z-index: 80; opacity: 0; pointer-events: none; transition: opacity 240ms var(--ease); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--bg-2); border-left: 1px solid var(--line-2); z-index: 90; transform: translateX(100%); transition: transform 320ms var(--ease); overflow-y: auto; padding: 24px var(--gutter) 40px; display: grid; gap: 18px; align-content: start; }
body.drawer-open .drawer { transform: none; } body.drawer-open .drawer-bg { opacity: 1; pointer-events: auto; }
.drawer .top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.drawer h3 { font-size: clamp(20px, 2vw, 26px); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.drawer dl { display: grid; grid-template-columns: 110px 1fr; gap: 10px 14px; margin: 0; font-size: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.drawer dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.drawer dd { margin: 0; color: var(--ink-2); }
.drawer .notes { white-space: pre-wrap; color: var(--ink-2); font-size: 14px; line-height: 1.6; border-top: 1px solid var(--line); padding-top: 14px; overflow-wrap: anywhere; }
.drawer .notes a { color: var(--accent); }
.drawer .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 7px; }

/* Footer */
footer { padding: clamp(32px, 4vw, 56px) var(--gutter) 36px; border-top: 1px solid var(--line); }
footer .wrap { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: 32px; }
footer .brand img { height: 44px; width: auto; }
footer .brand p { color: var(--muted); font-size: 13.5px; margin-top: 14px; max-width: 48ch; }
footer .col { display: grid; gap: 10px; align-content: start; }
footer .col .mono { color: var(--dim); }
footer .col a { text-decoration: none; font-size: 14px; color: var(--ink-2); }
footer .col a:hover { color: var(--ink); }
footer .legal { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sync-note { border: 1px solid var(--line-2); padding: 16px 18px; display: grid; gap: 8px; font-size: 13.5px; color: var(--ink-2); background: var(--bg-2); }
.sync-note.err { border-color: rgba(201, 133, 0, 0.55); }
.sync-note b { color: var(--ink); }
.sync-note code { font-family: var(--mono); font-size: 12px; color: var(--accent-2); }
@media (max-width: 860px) { footer .wrap { grid-template-columns: 1fr; } }

/* Tooltip */
.tip { position: fixed; z-index: 100; pointer-events: none; background: rgba(15, 16, 19, 0.96); border: 1px solid var(--line-2); padding: 10px 12px; font-size: 12.5px; color: var(--ink-2); max-width: 300px; opacity: 0; transition: opacity 120ms; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }
.tip.on { opacity: 1; }
.tip b { color: var(--ink); display: block; margin-bottom: 4px; font-weight: 600; }
.tip .mono { display: block; margin-top: 6px; }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 800ms var(--ease), transform 800ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* Login page */
.login-body { min-height: 100svh; display: grid; place-items: center; align-content: center; gap: 24px; padding: 24px var(--gutter); background: radial-gradient(ellipse at 70% 20%, rgba(0, 156, 250, 0.12), transparent 55%), var(--bg); }
.login-card { width: min(520px, 100%); border: 1px solid var(--line-2); padding: clamp(28px, 4vw, 44px); display: grid; gap: 18px; background: rgba(10, 11, 13, 0.8); }
.login-card .logo { height: 44px; width: auto; }
.login-card h1 { font-size: clamp(36px, 5vw, 56px); }
.login-card .lede { font-size: 15px; }
.login-card .btn { justify-content: center; }
.login-card .hint { color: var(--muted); font-size: 13px; }
.notice { border: 1px solid var(--line-2); padding: 12px 14px; font-size: 14px; color: var(--ink-2); }
.notice.error { border-color: rgba(230, 103, 103, 0.5); color: #f3b0b0; }
.login-card .dev { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.login-card .dev input { background: var(--surface); border: 1px solid var(--line-2); padding: 10px 12px; }
.login-foot { color: var(--dim); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .pill.busy i { animation: none; }
  .drawer, .drawer-bg, .gate .bar i { transition: none; }
}
