/* The desk chrome: warm ivory newspaper desk, one green pen.
   Rebuilt from the old repo's design language (docs/frontend_port_map.md's
   walk + the extracted design spec): ivory canvas, warm near-black ink,
   hairlines on rgba(40,30,20), ONE accent (field green), edges over
   shadows, the 7x18 green tick before panel headings, and a dark floating
   nav slab as the single loud element. The printed paper keeps its own
   newsprint identity (NewspaperHtml) -- this file styles the desk around it. */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: ui-serif, "New York", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, Menlo, Consolas, monospace;

  --canvas: #faf7f1;
  --canvas-alt: #f1ece1;
  --surface: #fffdf8;
  --surface-glass: rgba(255, 253, 248, 0.78);
  --field: #fffefb;

  --ink: #1c1a17;
  --ink-soft: #3a352d;
  --muted: #6b655c;
  --faint: #8a8377;

  --hairline: rgba(40, 30, 20, 0.10);
  --line: rgba(40, 30, 20, 0.12);
  --line-strong: rgba(40, 30, 20, 0.22);

  --green: #1f5d3f;
  --green-hover: #246b49;
  --green-dark: #16412c;
  --green-soft: rgba(31, 93, 63, 0.10);
  --focus-ring: rgba(31, 93, 63, 0.25);
  --mint: #7cc6a0;
  --mint-hover: #9ad4b6;

  --red: #c0362c;
  --rose-tint: #fff5f7;
  --rose-border: #ecc6ce;
  --rose-ink: #7c1f2f;
  --amber-tint: #fff7d8;
  --amber-border: #e9d58b;
  --amber-ink: #5b4400;
  --mint-tint: #eef8f1;
  --mint-border: #b7dfc4;
  --mint-ink: #2e4a3b;

  --slab: rgba(28, 26, 23, 0.96);
  --slab-trough: rgba(255, 255, 255, 0.08);

  --radius: 8px;
  --radius-pill: 980px;
  --control-h: 44px;
  --rail: 1080px;

  --lift-hero: 0 18px 60px rgba(28, 26, 23, 0.08);
  --lift-slab: 0 16px 42px rgba(28, 26, 23, 0.18);
  --lift-menu: 0 4px 24px rgba(40, 30, 20, 0.10);
}

* { box-sizing: border-box; }

body.desk {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
}

.desk main {
  max-width: var(--rail);
  margin: 0 auto;
  padding: 18px 18px 80px;
  display: grid;
  gap: 18px;
  align-content: start;
}

.desk h1, .desk h2 { font-family: var(--font-display); letter-spacing: 0; }
.desk a { color: var(--green-dark); }
.desk a:hover { color: var(--green); }

/* Numbers line up everywhere on a stats product. */
.desk table, .desk .stat, .desk .kpi-value { font-variant-numeric: tabular-nums; }

/* -- The slab: the one loud element. Dark, floating, self-centering. ---- */
.desk-nav {
  position: sticky;
  top: 10px;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  min-height: 60px;
  margin: 10px auto 2px;
  padding: 8px 14px;
  max-width: calc(var(--rail) - 36px);
  color: #fffdf8;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 34%), var(--slab);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--lift-slab);
}
.desk .desk-nav__brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: #fffdf8;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}
.desk .desk-nav__brand:hover { color: #fffdf8; }
.desk-nav__brand small {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.58;
}
.desk-nav__links {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  background: var(--slab-trough);
  border-radius: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.desk-nav__links::-webkit-scrollbar { display: none; }
.desk .desk-nav__links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  color: #fffdf8;
  opacity: 0.76;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.desk .desk-nav__links a:hover { color: #fffdf8; background: rgba(255, 255, 255, 0.08); opacity: 1; }
.desk .desk-nav__links a.is-active { color: var(--ink); background: #fffdf8; opacity: 1; }
.desk-nav__spacer { flex: 1; }
.desk-nav__who { font-size: 0.78rem; font-weight: 600; opacity: 0.65; white-space: nowrap; }
.desk-nav form { margin: 0; }
.desk-nav__quiet {
  padding: 0;
  color: #fffdf8;
  opacity: 0.76;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.desk-nav__quiet:hover { opacity: 1; }

/* -- Flash: a quiet full-width strip under the slab. -------------------- */
.flash { padding: 11px 16px; border-radius: var(--radius); font-weight: 600; font-size: 0.92rem; }
.flash--notice { color: var(--green-dark); background: var(--green-soft); border: 1px solid rgba(31, 93, 63, 0.2); }
.flash--alert { color: var(--rose-ink); background: var(--rose-tint); border: 1px solid var(--rose-border); }

/* -- Panels: translucent ivory, hairline, no shadow, the green tick. ---- */
.tool-panel {
  padding: clamp(16px, 1.8vw, 24px);
  background: var(--surface-glass);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}
.tool-panel > h1, .tool-panel > h2, .tool-panel .section-heading-row h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}
.tool-panel .section-heading-row h2 { margin-bottom: 0; }
.tool-panel > h1::before, .tool-panel > h2::before, .tool-panel .section-heading-row h2::before {
  content: "";
  flex: none;
  width: 7px;
  height: 18px;
  background: var(--green);
  border-radius: 3px;
}
.tool-panel--plain > h1, .tool-panel--plain > h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: none;
}
.tool-panel--plain > h1::before, .tool-panel--plain > h2::before { content: none; }

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}
.muted-note { color: var(--muted); font-size: 0.85rem; }

/* -- The hero: near-white gradient over warm paper, green top rule. ----- */
.desk-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 14px 24px;
  align-items: end;
  padding: clamp(22px, 3vw, 36px);
  color: #101c15;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.76)), #f5f3ea;
  border: 1px solid rgba(28, 26, 23, 0.12);
  border-top: 3px solid var(--green);
  border-radius: var(--radius);
  box-shadow: var(--lift-hero);
}
.desk-hero h1 {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(2.05rem, 3.2vw, 3.35rem);
  font-weight: 700;
  line-height: 1;
}
.desk-hero .eyebrow { color: var(--green-dark); }
.desk-hero__copy { min-width: 0; display: grid; gap: 8px; justify-items: start; }
.desk-hero__lede { margin: 0; max-width: 60ch; color: #4d5a52; font-size: 1.02rem; font-weight: 500; line-height: 1.55; }
.desk-hero__actions { display: grid; gap: 8px; align-content: end; justify-items: stretch; }

.team-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.team-strip span {
  padding: 6px 11px;
  color: var(--green-dark);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

/* -- Buttons: primary pill, ghost, tinted danger, mint CTA. ------------- */
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--control-h);
  padding: 10px 22px;
  color: #fffdf8;
  background: var(--green);
  border: 1px solid var(--green);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.05s ease;
}
.button-link:hover { color: #fffdf8; background: var(--green-hover); border-color: var(--green-hover); }
.button-link:active { transform: scale(0.985); }
.button-link:disabled { opacity: 0.45; cursor: default; }
.button-link.button-link--ghost {
  color: var(--green-dark);
  background: #fffdf8;
  border-color: var(--line);
}
.button-link.button-link--ghost:hover { color: var(--green-dark); background: var(--canvas-alt); border-color: var(--line-strong); }
.button-link.button-link--danger {
  color: var(--rose-ink);
  background: var(--rose-tint);
  border-color: var(--rose-border);
}
.button-link.button-link--danger:hover { color: #fffdf8; background: var(--red); border-color: var(--red); }
.button-link.button-link--mint { color: var(--ink); background: var(--mint); border-color: var(--mint); }
.button-link.button-link--mint:hover { color: var(--ink); background: var(--mint-hover); border-color: var(--mint-hover); }
.button-link.button-link--compact { min-height: 36px; padding: 6px 14px; font-size: 0.8rem; }

/* -- Forms: inset white fields, green focus ring. ----------------------- */
.form-grid { display: grid; gap: 12px; }
.form-grid label {
  display: grid;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.form-grid input[type="email"],
.form-grid input[type="password"],
.form-grid input[type="text"] {
  min-height: 42px;
  padding: 10px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(28, 26, 23, 0.18);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(28, 26, 23, 0.02);
  font: inherit;
  font-size: 0.95rem;
}
.form-grid input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.form-grid input[type="number"],
.form-grid select {
  min-height: 42px;
  padding: 10px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(28, 26, 23, 0.18);
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.95rem;
}
.form-grid select:focus, .form-grid input[type="number"]:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.form-grid input[type="file"] { font: inherit; font-size: 0.88rem; }
.form-grid textarea {
  padding: 10px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(28, 26, 23, 0.18);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(28, 26, 23, 0.02);
  font: inherit;
  font-size: 0.95rem;
  resize: vertical;
}
.form-grid textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.inline-form-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.inline-form-row label { flex: 1; min-width: 200px; }
.auth-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 0.84rem; font-weight: 600; }

/* -- Rows, chips, status triads. ---------------------------------------- */
.member-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--hairline);
}
.member-row:last-child { border-bottom: none; }
.member-row strong { font-size: 0.96rem; }
.member-row small { display: block; color: var(--muted); font-weight: 600; }
.member-row .member-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.role-chip, .status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0;
}
.role-chip { color: var(--green-dark); background: var(--green-soft); border: 1px solid rgba(31, 93, 63, 0.25); }
.status-pill--live { color: var(--amber-ink); background: var(--amber-tint); border: 1px solid var(--amber-border); }
.status-pill--done { color: var(--mint-ink); background: var(--mint-tint); border: 1px solid var(--mint-border); }
.status-pill--failed { color: var(--rose-ink); background: var(--rose-tint); border: 1px solid var(--rose-border); }

.code-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  word-break: break-all;
}
.copy-button {
  padding: 2px 8px;
  color: var(--green-dark);
  background: var(--green-soft);
  border: 1px solid rgba(31, 93, 63, 0.25);
  border-radius: 5px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.copy-button:hover { background: rgba(31, 93, 63, 0.18); }

/* -- The season ledger: issues as a worked list. ------------------------ */
.season-panel .section-heading-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  margin-bottom: 8px;
}
.season-panel .section-heading-row p { margin: 0; color: var(--muted); font-size: 0.72rem; font-weight: 850; text-transform: uppercase; }
.home__seasons { display: grid; gap: 16px; }
.home__issues { margin: 0; padding: 0; list-style: none; display: grid; }
.home__issues li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--hairline);
}
.home__issues li:last-child { border-bottom: none; }
.home__issues a { color: var(--ink); text-decoration: none; font-weight: 700; }
.home__issues a:hover { color: var(--green-dark); }
.issue-week {
  color: var(--green-dark);
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
  white-space: nowrap;
}
.issue-share { color: var(--faint); font-size: 0.72rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.issue-share:hover { color: var(--green-dark); }

/* -- Tables (admin invites; increment D's rooms use the same look under
   the generic .data-table name): sticky uppercase headers, zebra. ------- */
.table-scroll { overflow-x: auto; overflow-y: hidden; border: 1px solid var(--line); border-radius: var(--radius); }
.invite-table, .data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.invite-table th, .data-table th {
  position: sticky;
  top: 0;
  padding: 9px 12px;
  color: var(--muted);
  background: var(--canvas-alt);
  border-bottom: 1px solid var(--line-strong);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}
.invite-table td, .data-table td { padding: 9px 12px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
.invite-table tbody tr:nth-child(even), .data-table tbody tr:nth-child(even) { background: var(--canvas); }
.invite-table tbody tr:hover, .data-table tbody tr:hover { background: var(--canvas-alt); }
.invite-table td form { display: inline-block; margin-right: 6px; }
.data-table td.numeric, .data-table th.numeric { text-align: right; font-variant-numeric: tabular-nums; }

/* -- Increment D: the rooms. --------------------------------------------- */
.room-nav-teams { display: grid; gap: 4px; margin-top: 10px; }
.room-nav-team-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--hairline);
}
.room-nav-team-row:last-child { border-bottom: none; }
.room-nav-team-row strong { min-width: 11ch; font-size: 0.9rem; }
.room-nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.stack-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.stack-list li { padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.stack-list li:last-child { border-bottom: none; }

/* -- KPI tiles for the hero rail. --------------------------------------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 10px; }
.kpi {
  min-height: 84px;
  padding: 14px;
  display: grid;
  align-content: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.kpi-label { color: var(--muted); font-size: 0.7rem; font-weight: 950; text-transform: uppercase; }
.kpi-value { color: #101c15; font-family: var(--font-display); font-size: clamp(1.18rem, 1.8vw, 1.8rem); font-weight: 700; line-height: 1.05; }

/* -- Guide + FAQ. -------------------------------------------------------- */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.guide-card { display: grid; gap: 8px; align-content: start; }
.guide-card img { width: 100%; height: auto; border: 1px solid var(--line-strong); border-radius: 6px; }
.guide-card strong { font-size: 0.9rem; }
.guide-card p { margin: 0; color: var(--muted); font-size: 0.83rem; }
.faq-item { padding: 13px 0; border-bottom: 1px solid var(--hairline); }
.faq-item:last-child { border-bottom: none; }
.faq-item summary { cursor: pointer; font-weight: 800; }
.faq-item summary::marker { color: var(--green); }
.faq-item p { margin: 8px 0 0; color: var(--ink-soft); }

/* -- Increment C: upload panel + review page. ---------------------------- */
.upload-panel > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  cursor: pointer;
  list-style: none;
  margin-bottom: 12px;
}
.upload-panel > summary::-webkit-details-marker { display: none; }
.upload-panel > summary span { color: var(--ink-soft); font-weight: 950; text-transform: uppercase; font-size: 0.84rem; }
.upload-panel > summary small { color: var(--muted); font-weight: 600; }
.upload-week-field input, .upload-file-field input { width: 100%; }
.upload-type-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 8px; margin: 8px 0; font-size: 0.85rem; }
.upload-type-grid span { display: block; }
.upload-type-grid b { color: var(--ink-soft); }
.preference-toggle { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; font-weight: 600; color: var(--ink-soft); flex: none; }
.upload-auto-approve-form { align-items: center; margin-top: 12px; }
.upload-status-list { margin-top: 14px; }
.upload-status-list .eyebrow { display: block; margin-bottom: 4px; }

.review-items { display: grid; gap: 14px; }
.review-item { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 16px; }
.review-item__preview img { width: 100%; height: auto; border: 1px solid var(--line-strong); border-radius: 6px; display: block; }
.review-item__header { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.review-item__body .inline-form-row { margin: 8px 0; }
.review-item__decline { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--hairline); font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
.review-actions { display: flex; gap: 10px; }
.review-error-list { margin: 0; padding-left: 18px; }
@media (max-width: 640px) {
  .review-item { grid-template-columns: 1fr; }
  .review-item__preview img { max-width: 260px; }
}

/* -- Drawers (details) with the green top rule. ------------------------- */
.desk-drawer {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-top: 2px solid var(--green);
  border-radius: var(--radius);
  overflow: hidden;
}
.desk-drawer > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 850;
  list-style: none;
}
.desk-drawer > summary::-webkit-details-marker { display: none; }
.desk-drawer > div { padding: 4px 14px 14px; }

/* -- Increment C2: the creation wizard. ----------------------------------- */
.wizard-form { gap: 22px; }
.wizard-section { padding-top: 14px; border-top: 1px solid var(--hairline); display: grid; gap: 10px; }
.wizard-section:first-child { padding-top: 0; border-top: none; }
.wizard-section-heading { display: flex; align-items: baseline; gap: 10px; }
.wizard-section-heading span {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--green-dark);
  font-size: 0.82rem;
  opacity: 0.7;
}
.wizard-section-heading h3 { margin: 0; font-size: 1.02rem; }
.team-search-field input { width: 100%; }
.team-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--field);
}
.team-pick-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}
.team-pick-option:hover { background: var(--canvas-alt); }
.team-pick-option-name { display: flex; flex-direction: column; line-height: 1.25; }
.team-pick-option-name strong { font-size: 0.88rem; }
.team-pick-option-name small { color: var(--muted); font-weight: 600; font-size: 0.74rem; }
.owner-team-field { max-width: 360px; }
.wizard-submit-bar { display: flex; justify-content: flex-end; }
.my-team-current { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }

/* -- Layout helpers. ----------------------------------------------------- */
.auth-page { max-width: 560px; margin: 0 auto; width: 100%; display: grid; gap: 16px; }
.auth-page--wide { max-width: var(--rail); }
.split-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 0.48fr); gap: 16px; align-items: start; }

@media (max-width: 720px) {
  .desk-nav { top: 6px; }
  .desk-nav__who { display: none; }
  .desk-hero { grid-template-columns: 1fr; }
  .desk-hero__actions { grid-template-columns: 1fr; margin-top: 4px; }
  .desk-hero__actions .button-link { width: 100%; }
  .split-2 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* -- The hero paper: the product itself as the hero image (design pass
   2026-08-26). Real sample-issue content in the paper's own grammar --
   ivory stock, serif headline, brass double rule, the rail. Slightly
   rotated off the desk grid the way a paper lands on a desk. ------------ */
.desk-hero--with-paper {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  align-items: center;
}
.hero-paper {
  display: grid;
  gap: 7px;
  padding: 20px 22px 16px;
  color: #17130d;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), transparent 24%),
    repeating-linear-gradient(0deg, rgba(23, 19, 13, 0.022), rgba(23, 19, 13, 0.022) 1px, transparent 1px, transparent 5px),
    #fffaf0;
  border: 1px solid #d7c48c;
  border-top: 3px solid var(--green);
  border-radius: 6px;
  box-shadow: 0 14px 40px rgba(28, 26, 23, 0.14);
  rotate: 0.6deg;
  text-decoration: none;
  transition: rotate 0.18s ease, box-shadow 0.18s ease, translate 0.18s ease;
}
.hero-paper:hover {
  rotate: 0deg;
  translate: 0 -2px;
  box-shadow: 0 18px 48px rgba(28, 26, 23, 0.18);
  color: #17130d;
}
.hero-paper:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring), 0 14px 40px rgba(28, 26, 23, 0.14); }
.hero-paper__masthead {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1;
}
.hero-paper__meta {
  color: #5c5548;
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero-paper__rule {
  height: 5px;
  border-top: 2px solid #17130d;
  border-bottom: 1px solid #17130d;
}
.hero-paper__headline {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 900;
  line-height: 1.12;
}
.hero-paper__copy {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  color: #342e23;
  font-family: var(--font-display);
  font-size: 0.82rem;
  line-height: 1.5;
}
.hero-paper__copy:nth-of-type(2) { -webkit-line-clamp: 2; }
.hero-paper__rail {
  display: grid;
  gap: 4px;
  margin-top: 2px;
  padding-top: 8px;
  border-top: 3px double rgba(155, 131, 80, 0.6);
}
.hero-paper__rail-item {
  display: block;
  color: #342e23;
  font-family: var(--font-display);
  font-size: 0.74rem;
  line-height: 1.35;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.hero-paper__rail-item em {
  margin-right: 6px;
  color: #7b1d1a;
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}
.hero-paper__cta {
  margin-top: 4px;
  color: var(--green-dark);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
@media (max-width: 760px) {
  .desk-hero--with-paper { grid-template-columns: minmax(0, 1fr); }
  .hero-paper { rotate: 0deg; }
}

/* -- Missing interaction state (design pass): keyboard focus on every
   button-shaped control. ------------------------------------------------ */
.button-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

/* -- The paper's rule grammar on the desk's guide cards: a brass double
   rule where a bare hairline was, so the landing's cards read as columns
   from the same print shop. --------------------------------------------- */
.guide-card { border-top: 3px double rgba(155, 131, 80, 0.55); padding-top: 12px; }

/* -- The roster sheet (design pass): the 136-team wall becomes a worked
   sheet -- sticky search, a picked-teams tray, the grid below. ---------- */
.team-picker-toolbar {
  position: sticky;
  top: 84px;
  z-index: 5;
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.team-picker-toolbar .team-search-field { margin: 0; }
.team-picked-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 30px;
  align-items: center;
}
.team-picked-tray:empty::before {
  content: "No teams picked yet -- check them below.";
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 600;
}
.team-picked-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  color: var(--green-dark);
  background: var(--green-soft);
  border: 1px solid rgba(31, 93, 63, 0.25);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 850;
}
.team-picked-chip::after { content: "\00d7"; font-weight: 700; opacity: 0.7; }
.team-picked-chip:hover { background: rgba(31, 93, 63, 0.18); }
.team-picked-count { color: var(--muted); font-size: 0.72rem; font-weight: 850; text-transform: uppercase; }

/* -- The washed-CTA bug (design walk 2026-08-26): `.desk a` outranked
   `.button-link`, so every LINK-shaped button rendered green-on-green
   while real <button>s were fine. Pin the button palette at link
   specificity. -------------------------------------------------------- */
.desk a.button-link { color: #fffdf8; }
.desk a.button-link:hover { color: #fffdf8; }
.desk a.button-link.button-link--ghost { color: var(--green-dark); }
.desk a.button-link.button-link--ghost:hover { color: var(--green-dark); }
.desk a.button-link.button-link--danger { color: var(--rose-ink); }
.desk a.button-link.button-link--danger:hover { color: #fffdf8; }
.desk a.button-link.button-link--mint { color: var(--ink); }
.desk a.button-link.button-link--mint:hover { color: var(--ink); }
.desk a.desk-nav__quiet { color: #fffdf8; }
