/* Page shell around <roadmap-board>. The board carries its own styles. */
:root {
  color-scheme: light dark;
  --page: #f6f7f9;
  --ink: #111827;
  --ink-3: #6b7280;
  --ink-2: #4b5563;
  --line: #cdd2d9;
  --line-soft: #e3e6ea;
  --brand: #1d4ed8;
  --accent: #c2410c;
  --shipped: #15803d;
  --planned: #7f8896;
  --doing: #1d4ed8;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --page: #0f1520; --ink: #e8ebf1; --ink-2: #b3bbc9; --ink-3: #8b94a5; --line: #35425a; --line-soft: #253044; --brand: #7aa7ff; --accent: #ff8a65; --shipped: #3fa866; --planned: #6f7b8f; --doing: #7aa7ff; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--page); }
body { margin: 0; color: var(--ink); font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: min(100% - 48px, 1192px); margin: 0 auto; padding: 16px 0; border-bottom: 1px solid var(--line); }
.mark { display: inline-flex; align-items: baseline; gap: 10px; color: inherit; text-decoration: none; font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em; }
.mark-sub { font-family: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.out { color: var(--ink); font-weight: 600; font-size: 0.92rem; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.out:hover { color: var(--brand); }
.side { display: inline-flex; align-items: baseline; gap: 20px; flex-wrap: wrap; justify-content: flex-end; }
.who { color: var(--ink-3); font-size: 0.86rem; }
.who a { color: var(--ink); font-weight: 600; margin-left: 8px; text-underline-offset: 3px; }
.who a:hover { color: var(--brand); }
.plain h1 { font-size: 1.6rem; letter-spacing: -0.01em; margin: 0 0 12px; }
.plain p { max-width: 60ch; line-height: 1.6; }
.plain { max-width: 1240px; margin: 40px auto; padding: 0 24px; }
.plain ul { padding-left: 1.1rem; line-height: 1.9; }
.plain a { color: var(--brand); font-weight: 600; }
@media (max-width: 860px) { .top { width: calc(100% - 32px); padding: 14px 0; } .plain { padding: 0 16px; } }

/* ---------- home: the roadmaps this person may open ---------- */
.mono { font-family: var(--mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; word-spacing: -0.25em; text-transform: uppercase; }
.home { width: min(100% - 48px, 1192px); margin: 0 auto; padding-bottom: 72px; }
.home-head { padding: 64px 0 44px; }
.home h1 { margin: 0; font-size: clamp(2.1rem, 4.4vw, 3.5rem); font-weight: 800; line-height: 1.03; letter-spacing: -0.028em; }
.home-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 28px 0 0; color: var(--ink-2); }
.home-none { margin: 18px 0 20px; color: var(--ink-2); }
.btn { display: inline-block; padding: 10px 18px; border: 0; border-radius: 6px; background: var(--ink); color: var(--page); font: inherit; font-weight: 600; font-size: 0.92rem; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--brand); }

/* One row per roadmap. Its marks are one per item, so rows compare by length on a shared unit. */
.rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.row { --brand: var(--brand-l, #1d4ed8); display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.3fr) 4.5rem; gap: 10px 40px; align-items: start; padding: 30px 0 32px; border-bottom: 1px solid var(--line-soft); color: inherit; text-decoration: none; }
@media (prefers-color-scheme: dark) { .row { --brand: var(--brand-d, #7aa7ff); } }
.row-main { display: grid; gap: 8px; min-width: 0; }
.row-tag { color: var(--accent); }
.row-name { font-size: clamp(1.55rem, 2.7vw, 2.15rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.022em; overflow-wrap: anywhere; }
.row-go { display: inline-block; color: var(--ink-3); font-weight: 400; }
.row-latest { color: var(--ink-2); font-size: 0.98rem; line-height: 1.4; min-height: 1.4em; }
.row-latest .tick { display: inline-block; height: 12px; margin-right: 9px; vertical-align: -1px; }
.row-latest .mono { margin-left: 6px; color: var(--ink-3); font-weight: 400; white-space: nowrap; }
.row-marks { display: grid; gap: 12px; min-width: 0; padding-top: 6px; }
.ticks { display: flex; flex-wrap: wrap; gap: 4px 2px; }
.tick { display: block; flex: none; width: 4px; height: 18px; }
.tick[data-status="shipped"] { background: var(--shipped); }
.tick[data-status="in_progress"] { background: linear-gradient(to top, var(--shipped) 0 50%, transparent 50% 100%); box-shadow: inset 0 0 0 1px var(--shipped); }
.tick[data-status="planned"] { box-shadow: inset 0 0 0 1px var(--planned); }
.row-counts { display: flex; flex-wrap: wrap; gap: 2px 18px; color: var(--ink-2); font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.count b { color: var(--ink); font-weight: 650; }
.row-total { display: grid; justify-items: end; gap: 6px; text-align: right; }
.row-total b { font-size: 2rem; font-weight: 650; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.row-total .mono { color: var(--ink-3); font-weight: 400; }
.row:hover .row-name, .row:focus-visible .row-name, .row:hover .row-go, .row:focus-visible .row-go { color: var(--brand); }
.row:hover .row-go, .row:focus-visible .row-go { transform: translateX(5px); }
.row:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
@media (prefers-reduced-motion: no-preference) { .row-name { transition: color 120ms ease; } .row-go { transition: transform 160ms ease, color 120ms ease; } }

.home-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding-top: 18px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 0.84rem; }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend .tick { height: 14px; }
.home-stamp { margin: 0; color: var(--ink-3); font-weight: 400; }

@media (max-width: 860px) {
  .home { width: calc(100% - 32px); padding-bottom: 56px; }
  .home-head { padding: 40px 0 30px; }
  .row { grid-template-columns: minmax(0, 1fr) auto; gap: 16px 16px; padding: 24px 0 26px; }
  .row-marks { grid-column: 1 / -1; grid-row: 2; padding-top: 0; }
  .row-total { grid-column: 2; grid-row: 1; }
  .row-total b { font-size: 1.6rem; }
}

/* ---------- admin: people, companies and their roadmaps ---------- */
.admin { width: min(100% - 48px, 1000px); margin: 0 auto; padding-bottom: 80px; }
.admin-head { padding: 56px 0 28px; }
.admin-head .eyebrow { margin: 0 0 12px; color: var(--accent); }
.admin h1 { margin: 0; font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.025em; }
.admin .lede { max-width: 62ch; margin: 16px 0 0; color: var(--ink-2); line-height: 1.55; }
.admin-note { margin: 0 0 8px; padding: 12px 16px; border-left: 3px solid var(--shipped); background: color-mix(in srgb, var(--shipped) 9%, transparent); line-height: 1.45; }
.admin-note.bad { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.block { margin-top: 36px; border-top: 1px solid var(--ink); }
.block-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0 6px; }
.block h2 { margin: 0; font-size: 1.15rem; font-weight: 750; letter-spacing: -0.01em; }
.company { padding: 18px 0 6px; border-bottom: 1px solid var(--line-soft); }
.company-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.company h3 { margin: 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.quiet { color: var(--ink-3); font-size: 0.88rem; }
.none { margin: 10px 0 14px; }
.people, .maps { margin: 10px 0 0; padding: 0; list-style: none; }
.person { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; gap: 8px 24px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.person.editing { grid-template-columns: 1fr; }
.who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.who b { font-weight: 650; }
.who .quiet { flex-basis: 100%; overflow-wrap: anywhere; }
.tag { padding: 1px 6px; border: 1px solid var(--line); border-radius: 3px; color: var(--ink-2); font-size: 0.64rem; }
.sees { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 8%, transparent); font-size: 0.82rem; font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.link { padding: 2px 0; border: 0; background: none; color: var(--brand); font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.link.danger { color: var(--accent); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { background: transparent; box-shadow: inset 0 0 0 1px var(--ink); }
.btn[disabled] { opacity: 0.55; cursor: default; }
.in { height: 40px; min-width: 0; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--ink); font: inherit; font-size: 0.94rem; }
select.in { background: var(--page); }
.new-person { margin: 10px 0 6px; padding: 18px 20px 20px; border: 1px solid var(--line); border-radius: 8px; }
.person-form { display: grid; gap: 12px; }
.person-form .fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.person-form .label { margin-top: 4px; color: var(--ink-3); }
.picks { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 0.94rem; cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); }
.maps li { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(150px, 240px); gap: 8px 18px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.map-name { color: var(--ink); font-weight: 650; text-underline-offset: 3px; }
.map-name:hover { color: var(--brand); }
.add-company { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 10px; }
.add-company .in { flex: 1 1 220px; max-width: 320px; }
:is(.admin, .top) :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 860px) {
  .admin { width: calc(100% - 32px); }
  .admin-head { padding: 36px 0 20px; }
  .person { grid-template-columns: 1fr; gap: 8px; }
  .maps li { grid-template-columns: minmax(0, 1fr) auto; }
  .maps li select { grid-column: 1 / -1; }
}
