/* DO brand: Poppins, Off-White ground, accents blue, green, pink, gold.
   Status: works = green, weak = gold, missing = pink (dashed), unknown = dotted. */
:root {
  --bg: #F8F8F7;
  --surface: #FFFFFF;
  --alt: #F3F3F1;
  --ink: #0B0B0A;
  --muted: #5C5B55;
  --line: #E2E1DC;
  --works: #C7E0CB;
  --works-t: #F3F9F4;
  --weak: #F1DDA4;
  --weak-t: #FCF7E8;
  --missing: #D9AFCB;
  --missing-t: #F9F5F8;
  --blue: #C6D3E6;
  --blue-t: #F4F8FC;
  --pin: #0B0B0A;
  --on-pin: #FFFFFF;
  --shadow: 0 18px 50px rgba(11, 11, 10, 0.16);
  --display: "Poppins", "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F0F0E; --surface: #181816; --alt: #1F1F1D; --ink: #F3F3F1; --muted: #A6A59E; --line: #302F2B;
    --works: #3B5A42; --works-t: #141C16; --weak: #6B5A26; --weak-t: #1E1B12; --missing: #6A4560; --missing-t: #1D1519;
    --blue: #2A3950; --blue-t: #151B24; --pin: #F3F3F1; --on-pin: #0B0B0A; --shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F0F0E; --surface: #181816; --alt: #1F1F1D; --ink: #F3F3F1; --muted: #A6A59E; --line: #302F2B;
  --works: #3B5A42; --works-t: #141C16; --weak: #6B5A26; --weak-t: #1E1B12; --missing: #6A4560; --missing-t: #1D1519;
  --blue: #2A3950; --blue-t: #151B24; --pin: #F3F3F1; --on-pin: #0B0B0A; --shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.page { max-width: 1480px; margin: 0 auto; padding: 28px 16px 80px; display: grid; gap: 22px; }
@media (min-width: 700px) { .page { padding: 40px 28px 96px; } }

.eyebrow { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.02em; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0; }

/* Header */
.top { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: end; justify-content: space-between; }
.top .intro { display: grid; gap: 8px; max-width: 760px; }
.top .lede { color: var(--muted); font-size: 15.5px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 8px 16px; font-size: 14px; font-weight: 500; white-space: nowrap;
}
.btn:hover { background: var(--alt); }
.btn.primary { background: var(--pin); color: var(--on-pin); border-color: var(--pin); }
.btn.primary:hover { opacity: 0.9; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.small { padding: 5px 12px; font-size: 13px; }
.btn.danger { color: #9B2C55; }

.bar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: 13px; }
.chip[aria-pressed="true"] { background: var(--pin); color: var(--on-pin); border-color: var(--pin); }
.stats { font-size: 13.5px; color: var(--muted); }
.stats b { color: var(--ink); font-weight: 600; }

.swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.sw-works { background: var(--works); }
.sw-weak { background: var(--weak); }
.sw-missing { background: var(--missing-t); border: 1.5px dashed var(--missing); }
.sw-unknown { background: transparent; border: 1.5px dotted var(--muted); }
.pin-demo { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 999px; }
.pin-demo.fills { background: var(--pin); color: var(--on-pin); }
.pin-demo.polish { border: 1px dashed var(--muted); }

/* Grid */
.map { display: grid; gap: 10px; }
.map-head, .map-row { display: grid; grid-template-columns: minmax(220px, 1.15fr) repeat(4, minmax(0, 1fr)); gap: 10px; }
.map-head > div { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 0 4px; }
.map-head small { display: block; font-family: var(--display); text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 400; }
.group-label { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 14px 4px 0; border-top: 1px solid var(--line); margin-top: 6px; }

.rowhead { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 6px; align-content: start; }
.rowhead .rt { display: flex; gap: 10px; align-items: baseline; }
.rowhead .rank { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 18px; }
.rowhead .rank.new { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border: 1px dashed var(--muted); border-radius: 999px; padding: 1px 7px; }
.rowhead .title { font-size: 15.5px; font-weight: 600; line-height: 1.25; }
.rowhead .sub { font-size: 12.5px; color: var(--muted); }
.rowhead .arr { font-size: 12.5px; }
.rowhead .arr b { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.meter { display: flex; gap: 3px; margin-top: 2px; }
.meter i { flex: 1; height: 6px; border-radius: 3px; background: var(--alt); }
.meter i.works { background: var(--works); }
.meter i.weak { background: var(--weak); }
.meter i.missing { background: var(--missing); }
.meter i.unknown { background: var(--line); }
.outlook { font-size: 12.5px; font-weight: 500; border-radius: 10px; padding: 5px 9px; width: fit-content; }
.outlook.complete { background: var(--works); }
.outlook.covered { background: var(--blue); }
.outlook.half { background: var(--missing-t); border: 1px solid var(--missing); }
.outlook.idle { color: var(--muted); padding-left: 0; }

.cell { border-radius: 18px; padding: 12px 13px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; align-content: start; min-width: 0; border: 1px solid var(--line); background: var(--surface); position: relative; }
.cell.works { background: var(--works-t); border-color: var(--works); }
.cell.weak { background: var(--weak-t); border-color: var(--weak); }
.cell.missing { background: var(--missing-t); border: 1.5px dashed var(--missing); }
.cell.unknown { background: var(--surface); border: 1.5px dotted var(--muted); }
.cell.na { background: var(--alt); border-color: transparent; color: var(--muted); }
.cell.weakest { box-shadow: inset 0 0 0 2px var(--ink); }
.cell.span { grid-column: 2 / -1; }
.cell .lbl { display: none; }
.status {
  font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  border: 0; background: transparent; padding: 0; text-align: left; display: inline-flex; gap: 6px; align-items: center; width: fit-content;
}
.status:hover { text-decoration: underline; }
.status .wk { background: var(--ink); color: var(--bg); border-radius: 999px; padding: 0 6px; letter-spacing: 0.04em; }
.cell .note { font-size: 12.5px; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pins { display: flex; flex-wrap: wrap; gap: 5px; }
.pin {
  border: 1px solid var(--pin); background: var(--pin); color: var(--on-pin); border-radius: 999px;
  font-size: 12px; font-weight: 500; line-height: 1.3; padding: 4px 10px 4px 8px; text-align: left;
  display: inline-flex; gap: 6px; align-items: center; max-width: 100%;
}
.pin span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pin.polish { background: transparent; color: var(--ink); border: 1px dashed var(--muted); }
.pin.dim { opacity: 0.35; }
.pin.flash { animation: flash 1.6s ease-out 2; }
@keyframes flash { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 40% { box-shadow: 0 0 0 5px var(--blue); } }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--muted); }
.dot.live { background: #2F8F4E; }
.dot.in_progress { background: #3B6FB6; }
.dot.committed { background: #C79A1E; }
.dot.declined { background: #9B2C55; }

/* Trays */
.trays { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-top: 8px; }
.tray { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px; display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 12px; align-content: start; }
.tray.inbox { border-style: dashed; }
.tray header { display: grid; gap: 4px; }
.tray header p { font-size: 13px; color: var(--muted); }
.cards { display: grid; gap: 8px; }
.card { border: 1px solid var(--line); background: var(--bg); border-radius: 14px; padding: 11px 13px; display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 5px; text-align: left; width: 100%; }
.card:hover { border-color: var(--muted); }
.card .ct { font-weight: 600; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.card p { font-size: 12.5px; color: var(--muted); }
.card .q { color: var(--ink); }
.empty { font-size: 13px; color: var(--muted); }
details.tray summary { cursor: pointer; font-weight: 600; }

/* Drawer */
.drawer { position: fixed; inset: 0 0 0 auto; width: min(520px, 100vw); grid-template-columns: minmax(0, 1fr); background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow); overflow-y: auto; z-index: 20; padding: 22px 20px 40px; display: grid; gap: 16px; align-content: start; }
.drawer[hidden], .modal[hidden], .toast[hidden] { display: none; }
.drawer .dh { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.x { border: 0; background: var(--alt); border-radius: 999px; width: 32px; height: 32px; font-size: 18px; line-height: 1; flex: none; }
.field { display: grid; gap: 5px; }
.field > label, .field > .fl { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea { border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 8px 10px; width: 100%; font-size: 14px; }
.field input[type=checkbox] { width: auto; flex: none; }
.field textarea { min-height: 76px; resize: vertical; line-height: 1.45; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.verdict { background: var(--blue-t); border: 1px solid var(--blue); border-radius: 14px; padding: 12px 14px; font-size: 14px; }
.question { background: var(--missing-t); border: 1px dashed var(--missing); border-radius: 14px; padding: 10px 14px; font-size: 14px; }
.pl-list { display: grid; gap: 8px; }
.pl { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: start; border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; background: var(--bg); }
.pl .where { font-weight: 600; font-size: 13.5px; }
.pl .why { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }
.pl .st { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.add-pl { display: grid; grid-template-columns: 1fr 120px; gap: 6px; }
.add-pl input { grid-column: 1 / -1; }
.add-pl .btn { grid-column: 1 / -1; justify-self: start; }
.refs { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13.5px; }
.refs a { color: var(--ink); }
.meta { font-size: 12px; color: var(--muted); }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; position: sticky; bottom: -40px; background: var(--surface); padding: 12px 0; border-top: 1px solid var(--line); }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(11, 11, 10, 0.4); z-index: 30; display: grid; place-items: center; padding: 16px; }
.modal .box { background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); width: min(620px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 22px; display: grid; gap: 14px; }
.modal .box textarea { min-height: 160px; }
.hint { font-size: 13px; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--pin); color: var(--on-pin); border-radius: 999px; padding: 10px 18px; font-size: 14px; z-index: 40; max-width: calc(100vw - 32px); }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.login { max-width: 460px; margin: 12vh auto 0; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 26px; display: grid; gap: 14px; }

/* Phone and tablet: each row becomes a card; cells stack with their link name. */
@media (max-width: 900px) {
  .map-head { display: none; }
  .map-row { grid-template-columns: 1fr; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 10px; }
  .rowhead { border: 0; padding: 6px 6px 2px; }
  .cell.span { grid-column: auto; }
  .cell .lbl { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
  .drawer { width: 100vw; border-left: 0; }
}

/* Tabs */
.tabs { display: flex; gap: 4px; background: var(--alt); border-radius: 999px; padding: 4px; width: fit-content; }
.tab { border: 0; background: transparent; border-radius: 999px; padding: 6px 18px; font-size: 14px; font-weight: 500; color: var(--muted); }
.tab[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(11, 11, 10, 0.12); }
.beta-badge { font-family: var(--mono); font-size: 10.5px; opacity: 0.8; }

/* Betas: by feature */
.betas { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); align-items: start; }
.beta { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.beta.stage-ended, .beta.stage-ga { opacity: 0.75; }
.beta.flash { animation: flash 1.6s ease-out 2; }
.beta header { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.beta-name { border: 0; background: transparent; padding: 0; font-size: 17px; font-weight: 600; text-align: left; }
.beta-name:hover { text-decoration: underline; }
.beta .meta code { font-family: var(--mono); font-size: 12px; background: var(--alt); border-radius: 6px; padding: 1px 6px; }
.beta .goal { font-size: 13.5px; }
.linkish { border: 0; background: transparent; padding: 0; font-size: 13px; text-align: left; text-decoration: underline; color: var(--ink); width: fit-content; }
.stage-chip { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; border-radius: 999px; padding: 2px 9px; background: var(--alt); flex: none; }
.stage-chip.beta { background: var(--blue); }
.stage-chip.internal { background: var(--weak); }
.stage-chip.ga { background: var(--works); }
.check { font-size: 12.5px; color: var(--muted); }
.check.bad { color: #9B2C55; font-weight: 500; }
.members { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.member { width: 100%; display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 6px 10px; font-size: 13.5px; text-align: left; }
.member:hover { border-color: var(--muted); }
.member.issue { border: 1.5px dashed var(--missing); background: var(--missing-t); }
.member .mc { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member .tag { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); border: 1px dotted var(--muted); border-radius: 999px; padding: 0 6px; flex: none; }
.small { font-size: 12px; }
.ms { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; border-radius: 999px; padding: 1px 8px; flex: none; background: var(--alt); }
.ms.using { background: var(--works); }
.ms.on { background: var(--blue); }
.ms.invited { background: var(--weak); }
.ms.dropped { background: var(--missing-t); border: 1px dashed var(--missing); }

/* Betas: by customer */
.by-customer { display: grid; gap: 8px; }
.cust { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); gap: 12px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.cust.heavy { box-shadow: inset 0 0 0 2px var(--ink); }
.cust .cn { display: grid; gap: 2px; }
.cust .cb { display: flex; flex-wrap: wrap; gap: 6px; }
.cust .cb .member { width: auto; }
@media (max-width: 700px) { .cust { grid-template-columns: 1fr; } }

/* Projects list: the map, inverted */
.tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; flex: 1 1 420px; }
.search { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-size: 14px; width: min(320px, 100%); }
.sort { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 12px; font-size: 13.5px; }
.plist { display: grid; gap: 10px; }
.plist > header { display: grid; gap: 2px; margin-top: 10px; }
.plist > header h2 { display: flex; gap: 10px; align-items: baseline; }
.plist .count { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--muted); }
.prow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
.plist.inbox .prow { border-style: dashed; }
.plist.declined .prow { opacity: 0.65; }
.pmain, .pfit { display: grid; gap: 7px; align-content: start; min-width: 0; }
.ptitle { border: 0; background: transparent; padding: 0; font-size: 16px; font-weight: 600; text-align: left; display: inline-flex; gap: 8px; align-items: center; width: fit-content; }
.ptitle:hover { text-decoration: underline; }
.pmeta { font-size: 12.5px; color: var(--muted); }
.psum { font-size: 13.5px; }
.pcust { font-size: 12.5px; color: var(--muted); }
.pcust b { color: var(--ink); font-weight: 600; }
.fits { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.fits li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; border-radius: 10px; padding: 7px 10px; border: 1px solid var(--line); background: var(--bg); }
.fits li.fills { border-left: 4px solid var(--pin); }
.fits li.polish { border-left: 4px dashed var(--muted); }
.fits .fw { font-weight: 600; font-size: 13.5px; }
.fits .fh { font-size: 12px; color: var(--muted); }
.fits .fh.missing, .fits .fh.weak { color: var(--ink); }
.pverdict { font-size: 13.5px; background: var(--blue-t); border: 1px solid var(--blue); border-radius: 12px; padding: 9px 12px; }
.prow .outlook { font-size: 12px; }
.prow.flash { animation: flash 1.6s ease-out 2; }
@media (max-width: 800px) { .prow { grid-template-columns: 1fr; gap: 12px; } }
.pmeta .anchor { color: var(--ink); font-weight: 500; }
.pmeta .anchor.none { color: #9B2C55; }
