:root {
  color-scheme: light;
  --paper: #f5f7f7;
  --surface: #ffffff;
  --ink: #17202b;
  --muted: #69727d;
  --line: #d6dce0;
  --line-strong: #bcc4ca;
  --body-ink: #3f4a55;
  --panel: #eef1f2;
  --bar: #e9efff;
  --seg: #e3e7e9;
  --hover: #f8f9fc;
  --chip-ink: #3d4852;
  --blue: #194fd1;
  --blue-soft: #e7edff;
  --cyan: #2cc7c9;
  --green: #16784b;
  --green-soft: #dff4e9;
  --yellow: #a76500;
  --yellow-soft: #fff0c9;
  --red: #b42d37;
  --red-soft: #ffe4e5;
  --radius: 6px;
  --star-border: #e0aa24;
  --star-ink: #a86c00;
  --star-bg: #fff4cc;
}

html.dark {
  color-scheme: dark;
  --paper: #0e141d;
  --surface: #182230;
  --ink: #eef2f7;
  --muted: #a0abb8;
  --line: #2c3947;
  --line-strong: #41505f;
  --body-ink: #c9d2dc;
  --panel: #141d29;
  --bar: #16202e;
  --seg: #1f2a37;
  --hover: #1f2b39;
  --chip-ink: #c9d2dc;
  --blue: #86abff;
  --blue-soft: #1e2c48;
  --green: #57d197;
  --green-soft: #143323;
  --yellow: #f2b968;
  --yellow-soft: #3d2f12;
  --red: #ff8a92;
  --red-soft: #3d191e;
  --star-border: #8a6a10;
  --star-ink: #ffd97a;
  --star-bg: #4a3a10;
}

* { box-sizing: border-box; }
/* An author `display:` rule outranks the UA stylesheet's [hidden] rule, so every
   element given a display value would otherwise ignore its own hidden attribute. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Arial Narrow", "Roboto Condensed", Arial, sans-serif; }
button, input, select { font: inherit; }
/* Form controls do not inherit colour, so without this every textarea and bare
   input stayed on the UA's white background in dark mode. */
input, select, textarea { color: var(--ink); background: var(--surface); }
::placeholder { color: var(--muted); }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue), transparent 65%); outline-offset: 2px; }

.access-gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; overflow: auto; background: var(--paper); }
.access-gate-loading { z-index: 110; }
.gate-panel { width: min(620px, 100%); padding: clamp(30px, 6vw, 64px); border-top: 5px solid var(--blue); background: var(--surface); box-shadow: 0 24px 80px #1823321f; }
.gate-panel .brand-mark { margin-bottom: 42px; }
/* The gate headings are h2 so that each rendered view has exactly one h1. */
.gate-panel h1, .gate-panel h2 { margin-bottom: 24px; font-size: clamp(38px, 7vw, 65px); }
.gate-panel > p:not(.eyebrow, .gate-status) { max-width: 480px; color: var(--muted); font: 16px/1.55 Georgia, serif; }
.gate-status { min-height: 18px; margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.gate-status.error { color: var(--red); }
.auth-form label { display: block; margin-top: 20px; }
.auth-form label span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.auth-form input { width: 100%; height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); }
.auth-form .primary-button { width: 100%; margin-top: 8px; padding: 13px 18px; }
.group-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px clamp(20px, 5vw, 80px); border-bottom: 1px solid var(--line); background: var(--bar); }
.group-bar > div { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.group-bar strong { font: 700 15px Georgia, serif; }
.group-bar #group-status { color: var(--muted); font-size: 12px; }
.group-bar-actions { display: flex; gap: 16px; flex-shrink: 0; }
.range-input { width: 100%; height: 40px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--ink); background: var(--surface); }
.group-form { width: min(440px, calc(100vw - 32px)); padding: 32px; border: 0; position: relative; }
.group-form h2 { margin: 0 0 12px; font: 700 36px Georgia, serif; }
.group-form > p:not(.eyebrow, .gate-status) { color: var(--muted); font: 15px/1.5 Georgia, serif; }
.group-form label { display: block; margin-top: 20px; }
.group-form label span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.group-form input { width: 100%; height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); }
.team-switch { grid-template-columns: repeat(2, 1fr); margin-top: 22px; }
.team-switch button { font-size: 12px; padding: 9px 3px; }
.team-panel { margin-top: 22px; padding: 18px; border-top: 3px solid var(--blue); background: var(--paper); }
.team-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.team-panel-head strong { font: 700 20px Georgia, serif; }
.team-count { color: var(--blue); font-size: 12px; font-weight: 700; letter-spacing: .04em; white-space: nowrap; }
.team-roster { margin: 14px 0 0; padding: 0; list-style: none; }
.team-roster li { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--line); font: 14px Georgia, serif; }
.lead-badge { padding: 3px 7px; border-radius: 3px; color: var(--blue); background: var(--blue-soft); font-family: "Arial Narrow", Arial, sans-serif; font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.team-full-note { margin: 14px 0 0; color: var(--red); font-size: 12px; font-weight: 700; }
#team-leave { margin-top: 12px; color: var(--red); }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 200; transform: translateX(-50%); max-width: min(420px, calc(100vw - 32px)); padding: 12px 18px; border-radius: var(--radius); color: var(--paper); background: var(--ink); box-shadow: 0 12px 34px #0b121c55; font-size: 13px; }
.toast.error { background: var(--red); }
.dialog-form-close { position: absolute; top: 18px; right: 18px; }
.primary-button { margin-top: 20px; padding: 11px 18px; border: 0; border-radius: var(--radius); color: white; background: var(--blue); }
.comment-form { margin-top: 18px; }
.comment-form textarea { width: 100%; min-height: 88px; resize: vertical; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); font: 14px/1.5 Georgia, serif; }
.comment-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.comment { padding: 12px 0; border-bottom: 1px solid var(--line); }
.comment-meta { color: var(--muted); font-size: 11px; }
.comment p { margin: 5px 0 0; color: var(--body-ink); font: 14px/1.5 Georgia, serif; white-space: pre-wrap; }

.masthead { height: 76px; padding: 0 clamp(20px, 5vw, 80px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 94%, transparent); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.brand { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: block; border-radius: 8px; object-fit: cover; }
.gate-panel .brand-mark { width: 64px; height: 64px; }
.brand strong, .brand small { display: block; line-height: 1; }
.brand strong { font-size: 19px; letter-spacing: .08em; }
.brand small { margin-top: 5px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.deadline { display: flex; align-items: baseline; gap: 12px; font-size: 12px; }
.masthead-actions { display: flex; align-items: center; gap: 16px; }
.deadline span { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.deadline strong { color: var(--blue); }

main { max-width: 1600px; margin: auto; }
.intro { padding: clamp(48px, 7vw, 96px) clamp(20px, 5vw, 80px) clamp(42px, 6vw, 72px); display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr); gap: 8vw; align-items: end; position: relative; overflow: hidden; }
.intro::after { content: "226"; position: absolute; right: 2vw; bottom: -55px; z-index: -1; color: transparent; -webkit-text-stroke: 1px #dfe3e5; font: 700 clamp(150px, 22vw, 340px)/.7 Georgia, serif; }
.eyebrow { margin: 0 0 18px; color: var(--blue); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; }
h1 { margin: 0; max-width: 850px; font: 700 clamp(46px, 6.2vw, 94px)/.9 Georgia, "Times New Roman", serif; letter-spacing: 0; }
h1 em { color: var(--blue); font-weight: 400; }
.intro-note { max-width: 460px; padding-bottom: 5px; }
.intro-note > p { margin: 0 0 28px; font: 18px/1.55 Georgia, serif; }
.dataset-summary { display: flex; border-top: 1px solid var(--ink); padding-top: 14px; gap: 24px; }
.dataset-summary span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.dataset-summary strong { display: block; margin-bottom: 4px; color: var(--ink); font: 700 26px/1 Georgia, serif; }

.workspace { display: grid; grid-template-columns: 310px minmax(0, 1fr); min-height: 70vh; border-top: 1px solid var(--line); }
.filters { padding: 28px 28px 64px clamp(20px, 5vw, 80px); border-right: 1px solid var(--line); background: var(--panel); }
.filter-heading, .filter-heading > div, .results-toolbar, .results-toolbar > div, .toolbar-actions { display: flex; align-items: center; }
.filter-heading, .results-toolbar { justify-content: space-between; }
.filter-heading { margin-bottom: 28px; }
.filter-heading-actions { gap: 10px; }
.filter-close { display: none; }
.section-index { margin-right: 10px; color: var(--blue); font: italic 700 12px Georgia, serif; }
.filter-heading h2 { margin: 0; font: 700 18px Georgia, serif; }
.text-button { border: 0; padding: 4px 0; color: var(--muted); background: transparent; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.search-field > span:first-child, .filter-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .11em; }
.search-input-wrap { height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.search-input-wrap svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.search-input-wrap input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; }
kbd { padding: 2px 6px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); background: var(--paper); font-size: 11px; }
.filter-block { min-width: 0; margin: 22px 0 0; padding: 0; border: 0; }
.filter-block select, .sort-control select { width: 100%; height: 40px; padding: 0 34px 0 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--ink); background: var(--surface); }
.quick-picks { display: flex; flex-wrap: wrap; gap: 7px; }
.quick-picks button, .active-filter, .mobile-filter-button { border: 1px solid var(--line-strong); border-radius: 999px; padding: 7px 10px; color: var(--chip-ink); background: transparent; font-size: 12px; }
.quick-picks button.active { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--seg); }
.segmented button { min-width: 0; border: 0; border-radius: 3px; padding: 7px 3px; color: var(--muted); background: transparent; font-size: 11px; }
.segmented button.active { color: var(--ink); background: var(--surface); box-shadow: 0 1px 3px #9ba4aa66; }
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.results-panel { min-width: 0; padding: 28px clamp(20px, 5vw, 72px) 80px clamp(24px, 3.5vw, 56px); background: var(--surface); }
.results-toolbar { min-height: 40px; }
.results-toolbar p { margin: 0; color: var(--muted); font-size: 13px; }
.results-toolbar p strong { color: var(--ink); font: 700 20px Georgia, serif; }
.toolbar-actions { gap: 12px; }
.sort-control { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.sort-control select { width: 164px; height: 36px; color: var(--ink); font-size: 12px; text-transform: none; letter-spacing: 0; }
.mobile-filter-button { display: none; }
.group-form.compare-form { width: min(1080px, calc(100vw - 32px)); max-width: none; }
.compare-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 22px; }
.compare-card { min-width: 0; padding: 18px; border-top: 4px solid var(--blue); background: var(--paper); overflow-wrap: break-word; }
.compare-card h3 { margin: 8px 0 10px; font: 700 22px Georgia, serif; }
.compare-card p { margin: 0 0 10px; color: var(--body-ink); font: 14px/1.6 Georgia, serif; }
.compare-card .detail-tag { margin: 0 6px 6px 0; display: inline-block; }
.compare-card ul { margin: 8px 0 0; padding-left: 20px; }
.compare-card li + li { margin-top: 6px; }
.review-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 18px; }
.review-summary:empty { display: none; }
.summary-card { padding: 12px 14px; border-top: 3px solid var(--blue); background: var(--paper); }
.summary-card strong { display: block; font: 700 24px/1 Georgia, serif; }
.summary-card span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.review-board { display: grid; gap: 18px; margin-top: 18px; }
.review-board:empty { display: none; }
.board-section { padding: 18px; border-top: 3px solid var(--blue); background: var(--paper); }
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.board-head h3 { margin: 0; font: 700 20px Georgia, serif; }
.board-toggle { border: 0; color: var(--muted); background: transparent; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.board-items { display: grid; gap: 10px; }
.board-items[hidden] { display: none; }
.board-item { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.board-item:last-child { border-bottom: 0; padding-bottom: 0; }
.board-item-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; flex-shrink: 0; }
.board-item-actions button { flex-shrink: 0; }
.board-copy strong { display: block; font: 700 15px Georgia, serif; }
.board-copy p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.filter-block select { width: 100%; height: 40px; padding: 0 34px 0 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--ink); background: var(--surface); }
.active-filters { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 16px; }
.active-filters:empty { display: none; }
.active-filter { border-color: var(--line); padding: 5px 9px; background: var(--paper); }
.active-filter::after { content: " ×"; color: var(--muted); }

.problem-list { margin-top: 20px; border-top: 1px solid var(--ink); }
.load-more { display: block; min-width: 150px; margin: 30px auto 0; padding: 11px 18px; border: 1px solid var(--blue); border-radius: var(--radius); color: var(--blue); background: var(--surface); }
.problem-card { display: grid; grid-template-columns: 105px minmax(0, 1fr) 180px 42px; gap: 20px; align-items: start; padding: 25px 0; border-bottom: 1px solid var(--line); cursor: pointer; transition: background-color .15s ease, transform .15s ease; }
.problem-card:hover { background: var(--hover); transform: translateX(3px); }
.problem-card:hover .card-main h2, .problem-card:focus-visible .card-main h2 { color: var(--blue); }
.problem-card:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue), transparent 65%); outline-offset: 3px; }
.problem-card [data-star] { cursor: pointer; }
.ps-id { color: var(--blue); font: italic 700 14px Georgia, serif; }
.ps-category { display: block; margin-top: 9px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .09em; }
.card-main { min-width: 0; }
.card-main h2 { margin: -3px 0 8px; font: 700 clamp(18px, 1.55vw, 24px)/1.17 Georgia, serif; transition: color .15s ease; }
.card-org { margin: 0 0 14px; color: var(--muted); font-size: 12px; }
.card-statuses { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 12px; }
.card-summary { display: -webkit-box; overflow: hidden; margin: 0; color: var(--body-ink); font: 14px/1.55 Georgia, serif; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.card-more { display: inline-block; margin-top: 10px; color: var(--blue); font-size: 12px; font-weight: 700; letter-spacing: .03em; }
.card-facts { display: grid; gap: 10px; }
.fact { display: grid; grid-template-columns: 68px 1fr; gap: 8px; align-items: baseline; font-size: 11px; }
.fact span:first-child { color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.fact strong { font-size: 12px; }
.status-badge { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.reading-to-read { color: var(--yellow); background: var(--yellow-soft); }
.reading-read { color: var(--blue); background: var(--blue-soft); }
.decision-keep { color: var(--blue); background: var(--blue-soft); }
.decision-accept { color: var(--green); background: var(--green-soft); }
.decision-reject { color: var(--red); background: var(--red-soft); }
.vote-yes { color: var(--green); background: var(--green-soft); }
.vote-maybe { color: var(--yellow); background: var(--yellow-soft); }
.vote-no { color: var(--red); background: var(--red-soft); }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: transparent; }
.icon-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.icon-button.starred { border-color: var(--star-border); color: var(--star-ink); background: var(--star-bg); }
.icon-button.starred svg { fill: currentColor; }
.dataset-dot { color: var(--green); }

.empty-state { padding: 80px 20px; text-align: center; }
.empty-state span { color: #dce1e5; font: 700 110px/.8 Georgia, serif; }
.empty-state h2 { margin: 20px 0 8px; font: 700 28px Georgia, serif; }
.empty-state p { color: var(--muted); }
.empty-state button { padding: 10px 16px; border: 0; border-radius: var(--radius); color: white; background: var(--blue); }

dialog { width: min(940px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; padding: 0; border: 0; border-radius: 8px; color: var(--ink); background: var(--surface); box-shadow: 0 30px 80px #07101e55; }
dialog::backdrop { background: #111923a8; backdrop-filter: blur(3px); }

/* Full problem statement page. Nothing here clips: no max-height, no overflow
   hidden, no line clamp. The container grows with the content. */
.detail-view { padding: 0 0 96px; }
.detail-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px clamp(20px, 5vw, 80px); border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 76px; z-index: 10; flex-wrap: wrap; }
.detail-bar > div { display: flex; align-items: center; gap: 12px; }
.detail-bar #detail-number { color: var(--blue); font: italic 700 14px Georgia, serif; }
.detail-bar .text-button { font-size: 13px; white-space: nowrap; }
.detail-nav { flex-wrap: wrap; }
.detail-scope { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.detail-scope span { white-space: nowrap; }
.detail-scope select { height: 34px; padding: 0 26px 0 8px; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--ink); background: var(--surface); font-size: 12px; text-transform: none; letter-spacing: 0; }
.detail-tools { display: flex; align-items: center; gap: 10px; }
.ask-menu { position: relative; }
.ask-menu summary { list-style: none; cursor: pointer; color: var(--muted); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.ask-menu summary::-webkit-details-marker { display: none; }
.ask-menu[open] .ask-menu-list { display: grid; }
.ask-menu-list { display: none; position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 150px; gap: 2px; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 14px 40px #0b121c40; }
.ask-menu-list button { border: 0; padding: 8px 10px; border-radius: 4px; color: var(--ink); background: transparent; font-size: 13px; text-align: left; }
.ask-menu-list button:hover { background: var(--hover); }

/* Collapsible detail sections: title bar is the summary, content slides open. */
details.detail-collapse { padding: 0; border-bottom: 1px solid var(--line); }
details.detail-collapse > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; cursor: pointer; list-style: none; }
details.detail-collapse > summary::-webkit-details-marker { display: none; }
details.detail-collapse > summary h3 { margin: 0; border-bottom: 0; font: 700 17px Georgia, serif; }
details.detail-collapse > summary:hover h3 { color: var(--blue); }
.collapse-hint { flex-shrink: 0; position: relative; width: 11px; height: 11px; }
.collapse-hint::before, .collapse-hint::after { content: ""; position: absolute; inset: 4px 0; background: var(--muted); transition: transform .15s ease; }
.collapse-hint::after { transform: rotate(90deg); }
details[open] > summary .collapse-hint::after { transform: rotate(0deg); }
.collapse-body { padding-bottom: 18px; }

/* Spotlight tour. */
.tour-backdrop { position: fixed; inset: 0; z-index: 300; }
.tour-spotlight { position: fixed; border-radius: 8px; box-shadow: 0 0 0 100vmax #111923b0; pointer-events: none; }
.tour-card { position: fixed; width: 320px; max-width: calc(100vw - 32px); padding: 22px; border-top: 4px solid var(--blue); border-radius: var(--radius); background: var(--surface); box-shadow: 0 24px 60px #0b121c66; }
.tour-card h2 { margin: 0 0 10px; font: 700 22px Georgia, serif; }
.tour-card > p:not(.eyebrow) { margin: 0; color: var(--body-ink); font: 14px/1.6 Georgia, serif; }
.tour-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.tour-actions .primary-button { margin-top: 0; }
.detail-body { padding: clamp(32px, 5vw, 56px) clamp(20px, 5vw, 80px) 0; }
.detail-eyebrow { margin: 0; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.detail-body h1, .detail-body h2 { max-width: 900px; margin: 10px 0 18px; font: 700 clamp(28px, 4vw, 48px)/1.05 Georgia, serif; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 38px; }
.detail-tag { padding: 6px 9px; border: 1px solid var(--line); border-radius: 3px; color: var(--body-ink); background: var(--paper); font-size: 11px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(240px, .5fr); gap: 48px; align-items: start; }
.detail-section { margin-top: 34px; }
.detail-section:first-child { margin-top: 0; }
.detail-section h3 { margin: 0 0 12px; padding-bottom: 9px; border-bottom: 1px solid var(--ink); font: 700 17px Georgia, serif; }
.detail-section p, .detail-section li { color: var(--body-ink); font: 15px/1.7 Georgia, serif; }
.detail-section ul { margin: 0; padding-left: 20px; }
.detail-section li + li { margin-top: 7px; }
.detail-prose { margin: 0; white-space: pre-wrap; overflow-wrap: break-word; }
.scorecard { margin: 0; }
.scorecard > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.scorecard dt { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.scorecard dd { margin: 5px 0 0; }
.scorecard dd strong { display: block; font: 700 15px Georgia, serif; }
.scorecard dd span { display: block; margin-top: 4px; color: var(--body-ink); font: 14px/1.6 Georgia, serif; }
.review-panel { margin-top: 0; padding: 20px; border-top: 4px solid var(--blue); background: var(--paper); }
.review-group + .review-group { margin-top: 16px; }
.review-group > span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.review-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.review-button { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; color: var(--ink); background: var(--surface); font-size: 12px; }
.review-button.active { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.review-button.clear { color: var(--muted); background: transparent; }
.private-note-form { margin-top: 16px; }
.private-note-form textarea { width: 100%; min-height: 110px; resize: vertical; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); font: 14px/1.5 Georgia, serif; }
.private-note-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }
.private-note-actions { display: flex; gap: 8px; }
.mini-stat { padding: 14px 0; border-bottom: 1px solid var(--line); }
.mini-stat span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .09em; }
.mini-stat strong { display: block; margin-top: 5px; font: 700 16px Georgia, serif; }
.mini-stat .mini-note { margin-top: 6px; color: var(--body-ink); font: 13px/1.55 Georgia, serif; letter-spacing: 0; text-transform: none; }
.mini-stat .mini-note:empty { display: none; }
.detail-link { display: inline-block; margin-top: 14px; color: var(--blue); font-size: 13px; font-weight: 700; }
.plan-stage { margin-top: 15px; padding-left: 14px; border-left: 3px solid var(--cyan); }
.plan-stage h4 { margin: 0 0 6px; font-size: 12px; }
.plan-stage ul { margin-bottom: 0; }

.mobile-filter-backdrop { position: fixed; inset: 0; z-index: 25; background: #11192399; }

@media (max-width: 1000px) {
  .intro { grid-template-columns: 1fr; gap: 32px; }
  .intro-note { max-width: 600px; }
  .workspace { grid-template-columns: 260px minmax(0, 1fr); }
  .filters { padding-left: 24px; padding-right: 24px; }
  .problem-card { grid-template-columns: 88px minmax(0, 1fr) 42px; }
  .card-facts { grid-column: 2; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: -6px; }
  .fact { display: block; }
  .fact span:first-child { display: block; margin-bottom: 3px; }
}

@media (max-width: 760px) {
  .masthead { height: 64px; padding: 0 18px; }
  .deadline span { display: none; }
  .intro { padding: 42px 20px 42px; }
  .intro::after { right: -30px; bottom: 5px; font-size: 170px; }
  h1 { font-size: clamp(42px, 13vw, 64px); }
  .intro-note > p { font-size: 16px; }
  .workspace { display: block; }
  .filters { width: min(350px, 88vw); height: 100dvh; position: fixed; left: 0; top: 0; z-index: 30; overflow: auto; padding: 24px 22px 50px; border-right: 0; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 18px 0 50px #10182444; }
  .filters.open { transform: translateX(0); }
  .filters.open .filter-heading { position: relative; }
  .filter-close { display: grid; width: 34px; height: 34px; }
  .results-panel { padding: 24px 18px 60px; }
  .group-bar { align-items: flex-start; padding: 12px 18px; }
  .group-bar > div { display: block; }
  .group-bar #group-status { display: block; margin-top: 4px; }
  .mobile-filter-button { display: inline-flex; align-items: center; gap: 7px; border-radius: var(--radius); }
  .mobile-filter-button span { min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 9px; color: white; background: var(--blue); font-size: 10px; }
  .problem-card { grid-template-columns: minmax(0, 1fr) 38px; gap: 12px; padding: 22px 0; }
  .problem-card > div:first-child { grid-column: 1; }
  .ps-category { display: inline; margin: 0 0 0 8px; }
  .card-main { grid-column: 1 / -1; grid-row: 2; }
  .card-main h2 { font-size: 21px; }
  .card-facts { grid-column: 1 / -1; grid-row: 3; }
  .problem-card > .icon-button { grid-column: 2; grid-row: 1; margin-top: -7px; }
  .detail-grid { grid-template-columns: 1fr; gap: 36px; }
  .detail-bar { top: 64px; padding: 14px 18px; }
  .detail-body { padding: 28px 18px 0; }
  .detail-view { padding-bottom: 64px; }
  .group-bar-actions { gap: 12px; }
  dialog { width: 100vw; max-width: none; max-height: 95dvh; margin: auto 0 0; border-radius: 10px 10px 0 0; }
  .group-form.compare-form { width: 100vw; }
  .compare-grid { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .dataset-summary { gap: 16px; }
  .dataset-summary strong { font-size: 22px; }
  .dataset-summary span { font-size: 9px; }
  .results-toolbar { align-items: flex-start; gap: 12px; }
  .toolbar-actions { gap: 6px; }
  .card-facts { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* Dark theme odds and ends the variables cannot reach. */
html.dark .intro::after { -webkit-text-stroke-color: #25303e; }
html.dark .empty-state span { color: #25303e; }
html.dark .icon-button svg { stroke: currentColor; }

/* Theme toggle in the masthead. */
.theme-toggle svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.theme-toggle .moon { display: none; }
html.dark .theme-toggle .moon { display: block; }
html.dark .theme-toggle .sun { display: none; }
#help-button { font: 700 15px Georgia, serif; }
