/* Scatterplot Collection Studio, iteration 2.
   Built on the IDuh Genius design system. Base layout and components here; since 7 Nov 2026 night.css
   applies the Agent Big Head page's night-sky look on top (see the design system's Scatterplot section).
   Token names and values match the system's tokens.json; app-scale type sizes are noted where they differ. */

@font-face { font-family: "DM Sans Variable"; src: url('assets/fonts/dm-sans-latin-wght-normal.woff2') format('woff2'); font-weight: 100 1000; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans Variable"; src: url('assets/fonts/dm-sans-latin-wght-italic.woff2') format('woff2'); font-weight: 100 1000; font-style: italic; font-display: swap; }
@font-face { font-family: "Newsreader Variable"; src: url('assets/fonts/newsreader-latin-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader Variable"; src: url('assets/fonts/newsreader-latin-wght-italic.woff2') format('woff2'); font-weight: 200 800; font-style: italic; font-display: swap; }

:root {
  --card-text: var(--ink);
  --card-text-muted: var(--ink-soft);
  /* Brand colours */
  --ivory: #fffaf4;
  --paper: #fffefd;
  --ink: #17184b;
  --ink-soft: #48496c;
  --line: #dcdbdf;
  --coral: #ff806f;
  --coral-ink: #a4493d;
  --lavender: #b9a8ff;
  --green: #244d3f;
  --scatterplot-surface: #f4f4ed;
  --accent-scatterplot: #d8e3d3;
  --error: #9b1c31;
  /* Roles */
  --page: var(--scatterplot-surface);
  --page-band: #f6f1ec;
  --page-band-rule: #e8e0da;
  --text: var(--ink);
  --text-muted: var(--ink-soft);
  --heading: var(--ink);
  --card: var(--paper);
  --card-border: #17184b20;
  --header-bg: var(--ivory);
  --header-rule: #17184b18;
  --link-rule: var(--coral);
  --link-rule-hover: var(--ink);
  --focus-ring: var(--ink);
  --field: #ffffff;
  --field-border: #85829a; /* the contact page's value (3.71:1 on field); tokens.json still lists #a5a2b0 */
  --note: #f3eeff;
  --note-border: #c5b9df;
  /* Depth: hard ledges, no glows */
  --shadow-ledge: 0 7px 0 #ded9e4, 0 14px 30px #17184b0d;
  --shadow-card: 0 7px 0 #ddd5dc, 0 16px 25px #17184b08;
  --shadow-card-hover: 0 10px 0 #ddd5dc, 0 18px 30px #17184b0d;
  --shadow-step: 0 5px 0 #e0d8da;
  --shadow-panel: 0 6px 0 #ddd8db;
  --shadow-sheet: 0 8px 0 #17184b16, 0 14px 22px #17184b0d;
  --shadow-button-green: 0 5px 0 #17392f;
  /* Shape */
  --radius-tag: 5px;
  --radius-field: 8px;
  --radius-choice: 10px;
  --radius-control: 11px;
  --radius-panel: 16px;
  --radius-step: 17px;
  --radius-object: 18px;
  --radius-card: 19px;
  --radius-pill: 100px;
  --border-hairline: 1px;
  --border-link: 2px;
  --border-rule: 3px;
  --border-bar: 4px;
  /* Size and space */
  --size-control: 52px;
  --size-touch: 44px;
  --size-status-dot: 6px;
  --size-measure: 650px;
  --space-eyebrow: 26px;
  --space-grid: 25px;
  --space-grid-tight: 22px;
  --space-panel-y: 34px;
  --space-panel-x: 38px;
  --space-focus-offset: 3px;
  /* Type */
  --font-serif: "Newsreader Variable", Georgia, serif;
  --font-sans: "DM Sans Variable", sans-serif;

  font-family: var(--font-sans);
  color: var(--text);
  background: var(--page);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--page); font-size: 1rem; line-height: 1.6; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; }
:focus-visible { outline: var(--border-rule) solid var(--focus-ring); outline-offset: var(--space-focus-offset); }
.skip-link { position: absolute; z-index: 100; left: 12px; top: -80px; background: var(--paper); color: var(--ink); padding: 12px 16px; border-radius: var(--radius-field); font-weight: 800; }
.skip-link:focus { top: 12px; }

/* ---------- Labels (label-eyebrow, label-chip, label-tag, label-index) ---------- */
.eyebrow, .micro-label, .side-kicker, .side-label, .record-type, .field-label, .tile-number, .cue-label, .detail-cell span, .sample-label {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.16em; line-height: 1.4; text-transform: uppercase;
}
.eyebrow { color: var(--heading); display: flex; align-items: center; gap: 12px; }
.hero .eyebrow::before, .page-heading .eyebrow::before { content: ''; width: 24px; height: var(--border-rule); background: var(--coral); flex: none; }
.tile-number, .record-type, .cue-label { letter-spacing: 0.1em; color: var(--coral-ink); }
.sample-label { font-size: 0.62rem; letter-spacing: 0.08em; color: var(--text-muted); white-space: nowrap; }

/* ---------- Status chip (StatusChip) ---------- */
.status-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: var(--radius-pill); background: var(--accent-scatterplot); color: var(--ink); font-size: 0.67rem; font-weight: 800; letter-spacing: 0.035em; text-transform: uppercase; white-space: nowrap; line-height: 1; }
.status-dot { width: var(--size-status-dot); height: var(--size-status-dot); border-radius: 50%; background: var(--ink); flex: none; display: inline-block; }
.cue-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: var(--radius-pill); background: var(--accent-scatterplot); color: var(--ink); font-size: 0.67rem; font-weight: 800; letter-spacing: 0.035em; text-transform: uppercase; white-space: nowrap; line-height: 1; }
.cue-chip::before { content: ''; width: var(--size-status-dot); height: var(--size-status-dot); border-radius: 50%; background: var(--ink); }
.cue-chip.warm { background: #f9dfd6; }
.cue-chip.quiet { background: var(--page-band); color: var(--ink-soft); }
.cue-chip.quiet::before { background: transparent; border: 1px solid var(--ink-soft); }

/* ---------- Buttons (Button, TextLink) ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: var(--size-control); padding: 15px 20px; border-radius: var(--radius-control); border: var(--border-hairline) solid transparent; font-size: 0.85rem; font-weight: 750; line-height: 1.2; text-decoration: none; transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease; }
.button.primary { background: var(--green); border-color: var(--green); color: #ffffff; box-shadow: var(--shadow-button-green); }
.button.primary:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 8px 0 #17392f; }
.button.primary:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 #17392f; }
.button.secondary { background: var(--paper); border-color: #17184b40; color: var(--ink); box-shadow: 0 3px 0 #ddd5dc; }
.button.secondary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 5px 0 #ddd5dc; }
.button.secondary:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 0 0 #ddd5dc; }
.button.danger { background: var(--paper); border-color: #9b1c3166; color: var(--error); box-shadow: 0 3px 0 #ead3d6; }
.button.danger:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 5px 0 #ead3d6; }
.button.ghost, .text-link { background: none; border: 0; border-bottom: var(--border-link) solid var(--link-rule); border-radius: 0; min-height: 0; padding: 0 0 4px; gap: 10px; color: var(--heading); font-size: 0.82rem; font-weight: 800; box-shadow: none; }
.button.ghost:hover, .text-link:hover { border-color: var(--link-rule-hover); }
.button.small { min-height: var(--size-touch); padding: 10px 15px; font-size: 0.8rem; gap: 10px; }
.button.ghost.small { min-height: 0; padding: 0 0 4px; }
.button:disabled { opacity: 0.45; box-shadow: none; }
.text-button { background: none; border: 0; border-bottom: var(--border-link) solid var(--link-rule); padding: 0 0 3px; color: var(--heading); font-size: 0.78rem; font-weight: 800; white-space: nowrap; }
.text-button:hover { border-color: var(--link-rule-hover); }
.back-button { background: none; border: 0; padding: 0 0 18px; color: var(--heading); font-size: 0.82rem; font-weight: 800; }
.back-button:hover { text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* ---------- Shell ---------- */
.app-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--ivory); border-right: var(--border-hairline) solid var(--header-rule); padding: 30px 18px 24px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { margin: 0 12px 52px; }
.brand strong { display: block; font-family: var(--font-serif); font-size: 2rem; line-height: 0.96; font-weight: 550; letter-spacing: -0.045em; color: var(--heading); }
.brand small { display: block; margin-top: 9px; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.side-kicker { display: flex; justify-content: space-between; padding: 0 12px; margin-bottom: 12px; color: var(--text-muted); letter-spacing: 0.1em; }
.side-label { margin: 0 12px 10px; color: var(--text-muted); letter-spacing: 0.1em; }
.nav-button { width: 100%; display: flex; align-items: center; gap: 12px; min-height: var(--size-touch); margin: 2px 0; padding: 10px 12px; border: 0; border-radius: var(--radius-control); background: transparent; color: var(--ink-soft); text-align: left; font-size: 0.84rem; font-weight: 700; }
.nav-button:hover { background: var(--page-band); color: var(--ink); }
.nav-button.active { background: var(--accent-scatterplot); color: var(--ink); }
.nav-icon { width: 20px; text-align: center; font-size: 1.05rem; font-family: var(--font-serif); color: var(--green); }
.nav-count { margin-left: auto; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; color: var(--ink-soft); }
.side-divider { height: 1px; background: var(--page-band-rule); margin: 20px 12px; }
.side-bottom { margin-top: auto; padding: 22px 12px 0; border-top: var(--border-hairline) solid var(--page-band-rule); }
.side-bottom p { margin: 0 0 18px; font-family: var(--font-serif); font-size: 1.35rem; line-height: 1.12; font-weight: 550; letter-spacing: -0.03em; color: var(--heading); }
.side-bottom em { font-weight: 400; }
.connection-status { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: var(--border-hairline) solid var(--card-border); border-radius: var(--radius-field); background: var(--paper); font-size: 0.78rem; font-weight: 700; color: var(--ink); }
.side-bottom small { display: block; margin-top: 12px; font-size: 0.72rem; line-height: 1.6; color: var(--text-muted); }
.side-bottom small.maker { margin-top: 14px; font-weight: 800; color: var(--ink); }

.workspace { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 10; min-height: 70px; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 0 44px; background: var(--header-bg); border-bottom: var(--border-hairline) solid var(--header-rule); }
.breadcrumb { display: flex; align-items: center; gap: 10px; font-size: 0.84rem; color: var(--text-muted); min-width: 0; }
.breadcrumb strong { color: var(--ink); font-weight: 800; }
.top-actions { display: flex; align-items: center; gap: 18px; }
.page { max-width: 1440px; margin: 0 auto; padding: 44px 44px 110px; }

/* ---------- Headings ---------- */
.hero h1, .page-title, .dialog-title { font-family: var(--font-serif); font-weight: 550; letter-spacing: -0.045em; color: var(--heading); }
.hero h1 em, .page-title em, .dialog-title em { font-style: italic; font-weight: 400; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 6px 0 30px; }
/* App scale: display-lg (5.2rem desktop) capped at 4.2rem inside the studio. */
.page-title { font-size: clamp(2.6rem, 5vw, 4.2rem); line-height: 1; margin: 18px 0 12px; }
.page-subtitle { margin: 0; max-width: var(--size-measure); font-size: 1.08rem; line-height: 1.6; color: var(--text-muted); }
.section-head, .wall-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin: 64px 0 24px; }
.section-head h2, .wall-head h2 { margin: 12px 0 0; font-family: var(--font-serif); font-size: 2.35rem; line-height: 1.04; font-weight: 550; letter-spacing: -0.035em; color: var(--heading); }
.section-head p, .wall-head p { margin: 8px 0 0; max-width: 560px; font-size: 0.92rem; color: var(--text-muted); }
.hint { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); text-align: right; }

/* ---------- Home hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr); gap: 32px; align-items: stretch; }
.hero-copy { padding: 26px 0 10px; }
.hero h1 { font-size: clamp(3rem, 6vw, 5.6rem); line-height: 0.96; margin: 22px 0 22px; max-width: 700px; }
.hero-copy p { margin: 0; max-width: var(--size-measure); font-size: 1.2rem; line-height: 1.55; color: var(--text-muted); }
.hero-actions { display: flex; align-items: center; gap: 36px; margin-top: 36px; flex-wrap: wrap; }
.hero-art { position: relative; min-height: 340px; overflow: hidden; border-radius: var(--radius-card); border: var(--border-hairline) solid var(--card-border); box-shadow: var(--shadow-card);
  background: radial-gradient(circle at 76% 24%, #e8d199 0 8%, transparent 8.3%), linear-gradient(160deg, #cfe0d2 0%, #e6eee1 52%, #d3e2d1 100%); }
.hero-art::before { content: ''; position: absolute; width: 470px; height: 470px; left: -48px; top: 92px; border: 1px solid #244d3f45; border-radius: 50%; box-shadow: 0 0 0 44px #ffffff26, 0 0 0 94px #ffffff1a; }
.hero-art::after { content: ''; position: absolute; bottom: -48px; right: -24px; width: 390px; height: 180px; background: #3f6b58; border-radius: 100% 20% 0 0; transform: rotate(-5deg); box-shadow: -158px 26px 0 #8fbca2, -306px 32px 0 #244d3f; }
.art-caption { position: absolute; z-index: 2; top: 22px; left: 22px; display: flex; align-items: center; gap: 9px; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green); }
.art-caption::before { content: ''; width: 28px; height: 2px; background: currentColor; }
.art-star { position: absolute; z-index: 2; left: 24%; top: 24%; font-size: 46px; color: #fffaf4; }
.art-card { position: absolute; z-index: 3; right: 22px; bottom: 26px; width: 200px; padding: 16px 18px 18px; background: var(--paper); border: var(--border-hairline) solid var(--card-border); border-radius: var(--radius-control); box-shadow: var(--shadow-sheet); transform: rotate(-2deg); }
.art-card span { display: block; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.art-card strong { display: block; margin-top: 8px; font-family: var(--font-serif); font-size: 1.45rem; line-height: 1.05; font-weight: 550; letter-spacing: -0.03em; color: var(--ink); }
.art-card strong em { font-weight: 400; }

.template-home-link { margin-top: 30px; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--accent-scatterplot); border-radius: var(--radius-step); }
.template-home-link strong { font-family: var(--font-serif); font-size: 1.45rem; font-weight: 550; letter-spacing: -0.03em; }
.template-home-link span { font-size: 0.88rem; color: var(--ink); }

/* ---------- Cues: what changed, what's next (from Direction B) ---------- */
.cue-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-grid-tight); }
.cue-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-height: 196px; padding: 22px 22px 24px; text-align: left; background: var(--card); color: var(--ink); border: var(--border-hairline) solid var(--card-border); border-radius: var(--radius-step); box-shadow: var(--shadow-step); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.cue-card:hover { transform: translateY(-4px); box-shadow: 0 9px 0 #e0d8da; }
.cue-card strong { font-family: var(--font-serif); font-size: 1.5rem; line-height: 1.12; font-weight: 550; letter-spacing: -0.03em; }
.cue-card small { font-size: 0.84rem; line-height: 1.5; color: var(--text-muted); }
.cue-card b { margin-top: auto; padding-bottom: 3px; border-bottom: var(--border-link) solid var(--link-rule); font-size: 0.78rem; font-weight: 800; }
.cue-card.is-settled { background: var(--scatterplot-surface); box-shadow: none; }
.cue-card.is-settled .cue-label { color: var(--green); }

/* ---------- Collection wall ---------- */
.board-wall { display: grid; grid-template-columns: 1.06fr 1fr 1fr; gap: var(--space-grid); }
.board-tile { display: flex; flex-direction: column; min-height: 318px; overflow: hidden; background: var(--card); border: var(--border-hairline) solid var(--card-border); border-radius: var(--radius-card); box-shadow: var(--shadow-card); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.board-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.board-tile.featured { grid-row: span 2; min-height: 660px; }
.tile-top { width: 100%; display: flex; justify-content: space-between; gap: 10px; padding: 22px 22px 10px; border: 0; background: transparent; text-align: left; }
.tile-arrow { font-size: 1.1rem; font-weight: 700; color: var(--ink); }
.tile-title { padding: 0 22px; }
.tile-title-button { padding: 0; border: 0; background: none; text-align: left; }
.tile-title h3 { margin: 0; font-family: var(--font-serif); font-size: 1.8rem; line-height: 1.18; font-weight: 550; letter-spacing: -0.035em; color: var(--ink); }
.tile-title-button:hover h3, .tile-top:hover + .tile-title h3 { text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.tile-title p { margin: 6px 0 0; font-size: 0.84rem; line-height: 1.5; color: var(--text-muted); }
.tile-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 22px 22px; }
.tile-footer span { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.tile-pills { display: flex; gap: 5px; overflow: hidden; }
.tile-pills i { padding: 5px 9px; border-radius: var(--radius-pill); background: var(--scatterplot-surface); font-style: normal; font-size: 0.67rem; font-weight: 700; color: var(--ink); white-space: nowrap; }

/* Collection illustrations: literal scene colours, as in the design system's product scenes. */
.tile-art { position: relative; flex: 1; min-height: 96px; margin: 16px 18px 0; overflow: hidden; border-radius: var(--radius-control); }
.featured .tile-art { min-height: 280px; }
.tile-art::before, .tile-art::after { content: ''; position: absolute; }
.tile-art.horizon { background: linear-gradient(150deg, #cfe0d2 0 49%, #e8d199 49% 51%, #8fbca2 51%); }
.tile-art.horizon::before { width: 145px; height: 145px; top: 22%; left: 35%; border: 1px solid #fffaf4; border-radius: 50%; box-shadow: 0 0 0 25px #ffffff2b, 0 0 0 51px #ffffff1a; }
.tile-art.horizon::after { bottom: -120px; left: -20%; width: 140%; height: 245px; background: #3f6b58; border-radius: 50% 50% 0 0; }
.tile-art.studio { background: linear-gradient(130deg, #f3ddcf, #f6e6d4); }
.tile-art.studio::before { width: 125px; height: 140px; top: 33%; left: 23%; transform: rotate(-15deg); background: var(--paper); box-shadow: 22px 12px 0 #bdd2be, 45px 21px 0 var(--coral); }
.tile-art.studio::after { width: 60px; height: 60px; top: 6%; right: 17%; border: 2px solid var(--green); border-radius: 50%; }
.tile-art.signals { background: repeating-linear-gradient(0deg, #e6eee1 0 25px, #f5f6ef 25px 26px); }
.tile-art.signals::before { left: 22%; top: 24%; width: 58%; height: 65%; background: var(--paper); border-radius: var(--radius-tag); box-shadow: -17px 15px 0 #c4dbec, 15px -11px 0 #d3e2d1; }
.tile-art.signals::after { left: 34%; top: 40%; width: 40%; height: 3px; background: var(--coral); box-shadow: 0 13px 0 #c9d4c6, 0 26px 0 #c9d4c6; }
.tile-art.resources { background: linear-gradient(135deg, #cfdccf, #e6eee1); }
.tile-art.resources::before { left: 9%; top: 37%; width: 80%; height: 2px; background: #6c9876; box-shadow: 0 29px 0 #6c9876, 0 -29px 0 #6c9876; }
.tile-art.resources::after { left: 36%; top: 10%; width: 34%; height: 85%; background: var(--paper); border: 1px solid #bdd2be; transform: rotate(7deg); box-shadow: 7px 7px 0 #e8d199; }
.tile-art.reflection { background: radial-gradient(circle at 75% 36%, #e8d199 0 18%, transparent 18%), linear-gradient(150deg, #d6e2e0, #b5c9c1); }
.tile-art.reflection::before { width: 75%; height: 110%; left: 10%; top: 18%; border: 1px solid #fffaf4; border-radius: 50%; transform: rotate(20deg); }
.tile-art.reflection::after { left: 44%; top: 45%; width: 9px; height: 9px; background: var(--coral); border-radius: 50%; box-shadow: 28px -18px 0 #fffaf4, -43px 23px 0 #fffaf4; }

/* ---------- Editorial panels ---------- */
.lower-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: var(--space-grid); margin-top: var(--space-grid); }
.editorial-panel { min-height: 230px; padding: 28px 30px 30px; background: var(--card); border: var(--border-hairline) solid var(--card-border); border-radius: var(--radius-step); box-shadow: var(--shadow-step); }
.editorial-panel h3 { margin: 14px 0 8px; font-family: var(--font-serif); font-size: 2rem; line-height: 1.12; font-weight: 550; letter-spacing: -0.035em; }
.editorial-panel p { max-width: 570px; font-size: 0.92rem; line-height: 1.6; color: var(--text-muted); }
.panel-row { display: flex; justify-content: space-between; align-items: end; gap: 18px; flex-wrap: wrap; }
.panel-quote { margin-top: 14px; padding-left: 20px; border-left: var(--border-bar) solid #c9785f; font-family: var(--font-serif); font-size: 1.35rem; line-height: 1.28; color: var(--text); }
.panel-panel-art { font-family: var(--font-serif); font-size: 4.4rem; line-height: 1; color: #8fbca2; }

/* ---------- Collection board ---------- */
.board-feature { display: grid; grid-template-columns: minmax(250px, 0.9fr) minmax(0, 1.1fr); min-height: 190px; overflow: hidden; background: var(--card); border: var(--border-hairline) solid var(--card-border); border-radius: var(--radius-step); box-shadow: var(--shadow-step); }
.board-feature .tile-art { margin: 0; border-radius: 0; min-height: 190px; }
.board-feature-copy { display: flex; flex-direction: column; justify-content: center; padding: 26px 32px; }
.board-feature-copy .micro-label { color: var(--coral-ink); letter-spacing: 0.1em; }
.board-feature-copy h2 { margin: 10px 0 6px; font-family: var(--font-serif); font-size: 2rem; line-height: 1.1; font-weight: 550; letter-spacing: -0.035em; }
.board-feature-copy p { margin: 0; font-size: 0.92rem; line-height: 1.55; color: var(--text-muted); }
.board-feature.empty-custom-feature { display: none; }
.section-switcher { display: flex; gap: 8px; overflow-x: auto; margin: 32px 0 20px; padding: 2px 2px 8px; }
.section-tab { min-height: var(--size-touch); padding: 10px 16px; border: var(--border-hairline) solid var(--card-border); border-radius: var(--radius-pill); background: var(--paper); color: var(--ink); font-size: 0.82rem; font-weight: 800; white-space: nowrap; }
.section-tab.active { background: var(--green); border-color: var(--green); color: #ffffff; }
.section-tab .count { margin-left: 6px; opacity: 0.75; }
.record-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-grid-tight); }
.record-card { display: flex; flex-direction: column; justify-content: space-between; min-height: 186px; padding: 22px 24px 20px; background: var(--card); border: var(--border-hairline) solid var(--card-border); border-radius: var(--radius-step); box-shadow: var(--shadow-step); }
.record-card-top { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.record-symbol { width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--accent-scatterplot); color: var(--green); text-align: center; line-height: 36px; font-family: var(--font-serif); font-size: 1.15rem; }
.record-card h3 { margin: 12px 0 6px; font-family: var(--font-serif); font-size: 1.55rem; line-height: 1.12; font-weight: 550; letter-spacing: -0.03em; }
.record-card p { margin: 0; font-size: 0.88rem; line-height: 1.5; color: var(--text-muted); }
.record-card .cue-chip { margin-top: 12px; }
.record-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 14px; border-top: var(--border-hairline) solid var(--line); }
.record-card-footer span { font-size: 0.72rem; line-height: 1.5; color: var(--text-muted); }

/* ---------- Notices (DraftNotice) and info bands ---------- */
.banner { display: flex; align-items: center; gap: 14px; margin: 28px 0; padding: 16px 20px; border-radius: var(--radius-choice); background: var(--accent-scatterplot); font-size: 0.88rem; line-height: 1.5; color: var(--ink); }
.banner > span:first-child { font-family: var(--font-serif); font-size: 1.3rem; color: var(--green); }
.banner.warm, .notice { background: var(--paper); border: var(--border-hairline) solid var(--card-border); border-left: var(--border-bar) solid var(--coral); border-radius: var(--radius-field); color: var(--ink); }
.banner.warm > span:first-child { color: var(--coral-ink); }
.notice { margin: 12px 0; padding: 12px 16px; font-size: 0.84rem; line-height: 1.55; }
.empty { padding: 28px; border: 1px dashed #17184b40; border-radius: var(--radius-choice); text-align: center; font-size: 0.88rem; color: var(--text-muted); }

/* ---------- Email lens ---------- */
.email-layout { display: grid; grid-template-columns: 240px 1fr; gap: var(--space-grid-tight); }
.email-views { align-self: start; padding: 10px; background: var(--card); border: var(--border-hairline) solid var(--card-border); border-radius: var(--radius-step); box-shadow: var(--shadow-step); }
.email-view { width: 100%; display: flex; justify-content: space-between; gap: 10px; min-height: var(--size-touch); padding: 11px 12px; border: 0; border-radius: var(--radius-control); background: none; text-align: left; font-size: 0.86rem; font-weight: 700; color: var(--ink-soft); }
.email-view.active { background: var(--accent-scatterplot); color: var(--ink); font-weight: 800; }
.email-view span { font-weight: 800; color: var(--ink-soft); }
.email-main { min-width: 0; }
.email-card { display: flex; gap: 16px; align-items: start; margin-bottom: 14px; padding: 22px; background: var(--card); border: var(--border-hairline) solid var(--card-border); border-radius: var(--radius-step); box-shadow: var(--shadow-step); }
.email-icon { flex: none; padding: 10px 12px; border-radius: var(--radius-control); background: var(--accent-scatterplot); color: var(--green); font-size: 1.3rem; }
.email-card h3 { margin: 6px 0 4px; font-family: var(--font-serif); font-size: 1.5rem; line-height: 1.15; font-weight: 550; letter-spacing: -0.03em; }
.email-card p { margin: 0 0 10px; font-size: 0.88rem; line-height: 1.5; color: var(--text-muted); }
.email-card small { font-size: 0.72rem; color: var(--text-muted); }
.email-card .button { margin-left: auto; white-space: nowrap; }

/* ---------- Source desk ---------- */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-grid); }
.settings-card { padding: var(--space-panel-y) var(--space-panel-x); background: var(--card); border: var(--border-hairline) solid var(--card-border); border-radius: var(--radius-step); box-shadow: var(--shadow-panel); }
.settings-card h2 { margin: 14px 0 8px; font-family: var(--font-serif); font-size: 2rem; line-height: 1.1; font-weight: 550; letter-spacing: -0.035em; }
.settings-card p, .settings-card li { font-size: 0.9rem; line-height: 1.6; color: var(--text-muted); }
.settings-card ul { padding-left: 18px; }
.lineage { margin-top: var(--space-grid); padding: var(--space-panel-y) var(--space-panel-x); background: var(--card); border: var(--border-hairline) solid var(--card-border); border-radius: var(--radius-step); box-shadow: var(--shadow-panel); }
.lineage h2 { margin: 14px 0 8px; font-family: var(--font-serif); font-size: 2rem; line-height: 1.1; font-weight: 550; letter-spacing: -0.035em; }
.evidence-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.evidence-pair blockquote { margin: 0; padding: 18px 20px; border-left: var(--border-bar) solid #c9785f; background: var(--scatterplot-surface); border-radius: 0 var(--radius-field) var(--radius-field) 0; font-family: var(--font-serif); font-size: 1.35rem; line-height: 1.28; }
.evidence-pair small { display: block; margin-bottom: 10px; font: 800 0.62rem/1.4 var(--font-sans); letter-spacing: 0.08em; color: var(--coral-ink); }
.lineage-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- Forms ---------- */
.form-row { display: grid; gap: 8px; margin: 16px 0; }
.form-row label, .field-label { font-size: 0.8rem; font-weight: 800; letter-spacing: 0; text-transform: none; color: var(--ink); }
.field-label { letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.72rem; }
input[type=text], input[type=date], select, textarea { width: 100%; min-height: var(--size-touch); padding: 12px; border: var(--border-hairline) solid var(--field-border); border-radius: var(--radius-field); background: var(--field); color: var(--ink); font-size: 0.92rem; }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.checkrow { display: flex; align-items: start; gap: 10px; margin: 12px 0; font-size: 0.9rem; line-height: 1.5; color: var(--ink); }
.checkrow input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green); }
.form-help { font-size: 0.82rem; line-height: 1.55; color: var(--text-muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.scope-preview, .review-box { margin-top: 16px; padding: 16px 18px; background: var(--scatterplot-surface); border: var(--border-hairline) solid var(--card-border); border-radius: var(--radius-choice); font-size: 0.88rem; line-height: 1.55; color: var(--ink); }
.scope-preview ul { margin: 8px 0 0; padding-left: 18px; }
.review-box small { color: var(--text-muted); }

/* ---------- Record dialog ---------- */
.record-dialog { width: min(700px, calc(100vw - 24px)); max-height: 90vh; padding: 0; color: var(--ink); background: var(--paper); border: var(--border-hairline) solid var(--card-border); border-radius: var(--radius-panel); box-shadow: 0 9px 0 #ddd5dc, 0 30px 80px #17184b40; }
.record-dialog::backdrop { background: #17184b8c; }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 22px 28px 0; }
.dialog-header .eyebrow { color: var(--coral-ink); letter-spacing: 0.1em; }
.dialog-close { width: var(--size-touch); height: var(--size-touch); flex: none; border: var(--border-hairline) solid var(--card-border); border-radius: 50%; background: var(--paper); font-size: 1.4rem; line-height: 1; color: var(--ink); }
.dialog-body { padding: 0 28px 30px; }
.dialog-title { margin: 16px 0 8px; font-size: 2.6rem; line-height: 1.02; }
.dialog-deck { margin: 0 0 14px; font-size: 0.95rem; line-height: 1.6; color: var(--text-muted); }
.dialog-tabs { display: flex; gap: 2px; margin: 22px -28px 20px; padding: 0 28px; border-bottom: var(--border-hairline) solid var(--line); overflow-x: auto; }
.dialog-tab { min-height: var(--size-touch); padding: 12px 12px; border: 0; border-bottom: var(--border-rule) solid transparent; background: none; color: var(--ink-soft); font-size: 0.82rem; font-weight: 800; white-space: nowrap; }
.dialog-tab.active { color: var(--ink); border-color: var(--coral); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.detail-cell { padding: 12px 14px; background: var(--scatterplot-surface); border-radius: var(--radius-field); }
.detail-cell span { display: block; font-size: 0.62rem; letter-spacing: 0.08em; color: var(--text-muted); }
.detail-cell strong { display: block; margin-top: 5px; font-size: 0.88rem; line-height: 1.4; font-weight: 700; }
.detail-section { margin-top: 26px; }
.detail-section h3 { margin: 0 0 10px; font-family: var(--font-serif); font-size: 1.6rem; line-height: 1.12; font-weight: 550; letter-spacing: -0.03em; }
.detail-section p { font-size: 0.9rem; line-height: 1.6; color: var(--text-muted); }
.related-button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 6px 0; padding: 13px 15px; text-align: left; background: var(--paper); border: var(--border-hairline) solid var(--card-border); border-radius: var(--radius-control); font-size: 0.9rem; }
.related-button:hover { background: var(--scatterplot-surface); }
.related-button span { font-size: 0.8rem; color: var(--text-muted); }
.placement-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0; padding: 12px 14px; background: var(--paper); border: var(--border-hairline) solid var(--card-border); border-radius: var(--radius-control); }
.placement-row strong { font-size: 0.92rem; }
.placement-row span { display: block; margin-top: 3px; font-size: 0.8rem; color: var(--text-muted); }
.placement-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.placement-form { margin-top: 16px; padding: 18px; background: var(--scatterplot-surface); border: var(--border-hairline) solid var(--card-border); border-radius: var(--radius-choice); }

/* Change chain (from Direction B) */
.change-chain { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.change-chain li { display: grid; grid-template-columns: 128px 1fr; gap: 4px 14px; padding: 14px 16px; background: var(--paper); border: var(--border-hairline) solid var(--card-border); border-radius: var(--radius-control); }
.change-chain li > span { grid-row: span 2; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; color: var(--text-muted); }
.change-chain li strong { font-size: 0.95rem; }
.change-chain li small { font-size: 0.8rem; color: var(--text-muted); }
.change-chain li.is-old strong { text-decoration: line-through; text-decoration-color: var(--coral-ink); }
.change-chain li.is-new { background: var(--accent-scatterplot); border-color: transparent; }

/* Connections (from Direction C) */
.connection-row { display: flex; align-items: center; gap: 10px; }
.connection-row .related-button { flex: 1; min-width: 0; }
.connection-kind { display: inline-block; margin-right: 6px; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--coral-ink); }
.link-preview { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 8px 0 12px; }
.link-preview > div { padding: 12px 14px; background: var(--paper); border: var(--border-hairline) solid var(--card-border); border-radius: var(--radius-control); font-family: var(--font-serif); font-size: 1.15rem; line-height: 1.15; }
.link-preview > span { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; text-align: center; color: var(--coral-ink); }

/* ---------- Collection starters ---------- */
.template-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-grid); margin: 30px 0; }
.template-card, .template-editor, .template-storage { background: var(--card); border: var(--border-hairline) solid var(--card-border); border-radius: var(--radius-step); box-shadow: var(--shadow-step); }
.template-card { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 26px; }
.template-card .eyebrow { color: var(--coral-ink); letter-spacing: 0.1em; }
.template-card h2, .template-editor h2, .template-storage h2 { margin: 12px 0 8px; font-family: var(--font-serif); font-size: 2rem; line-height: 1.1; font-weight: 550; letter-spacing: -0.035em; }
.template-card p, .template-storage p { font-size: 0.9rem; line-height: 1.6; color: var(--text-muted); }
.template-card .button { margin-top: auto; }
.template-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 24px; }
.template-chips span { padding: 6px 10px; border-radius: var(--radius-pill); background: var(--accent-scatterplot); font-size: 0.75rem; font-weight: 700; }
.template-editor { margin: 20px 0; padding: var(--space-panel-y) var(--space-panel-x); box-shadow: var(--shadow-panel); }
.template-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.template-fields .form-row:last-child { grid-column: 1 / -1; }
.template-fields textarea { min-height: 110px; }
.template-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 20px; }
.template-review { padding: 18px 22px; background: var(--scatterplot-surface); border: var(--border-hairline) solid var(--card-border); border-radius: var(--radius-choice); }
.template-review p { margin: 8px 0 16px; font-size: 0.92rem; line-height: 1.5; overflow-wrap: anywhere; }
.template-storage { display: flex; align-items: flex-start; justify-content: space-between; gap: 26px; margin-top: 26px; padding: 28px 30px; }
.template-storage > div:first-child { max-width: 600px; }
.template-storage .template-actions { max-width: 420px; margin-top: 0; }
.template-board-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.template-save-banner { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 12px 0 22px; padding: 18px 22px; background: var(--accent-scatterplot); border-radius: var(--radius-step); }
.template-save-banner strong { font-size: 0.95rem; }
.template-save-banner p { margin: 5px 0 0; max-width: 550px; font-size: 0.84rem; line-height: 1.5; color: var(--ink); }
.template-save-banner .template-actions { margin: 0; flex-shrink: 0; }
.collection-empty { grid-column: 1 / -1; min-width: 0; padding: 30px; background: var(--card); border: 1px dashed #17184b40; border-radius: var(--radius-step); }
.collection-empty .eyebrow { color: var(--coral-ink); letter-spacing: 0.1em; }
.collection-empty h2 { margin: 12px 0; font: 550 2.2rem/1.08 var(--font-serif); letter-spacing: -0.035em; }
.collection-empty > p { max-width: 720px; font-size: 0.92rem; line-height: 1.6; color: var(--text-muted); }
.empty-samples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.empty-sample { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; min-height: 170px; padding: 18px; text-align: left; background: var(--paper); color: var(--ink); border: var(--border-hairline) solid var(--card-border); border-radius: var(--radius-control); box-shadow: var(--shadow-step); transition: transform 0.25s ease; }
.empty-sample:hover { transform: translateY(-3px); }
.empty-sample span { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--coral-ink); }
.empty-sample strong { margin: 10px 0; font: 550 1.35rem/1.15 var(--font-serif); letter-spacing: -0.03em; }
.empty-sample small { font-size: 0.75rem; line-height: 1.45; color: var(--text-muted); overflow-wrap: anywhere; }
.empty-sample b { margin-top: auto; padding-top: 14px; font-size: 0.78rem; font-weight: 800; }

/* ---------- Toast and mobile navigation ---------- */
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; max-width: 340px; padding: 14px 18px; background: var(--ink); color: #ffffff; border-radius: var(--radius-control); box-shadow: 0 6px 0 #0c0c2b; font-size: 0.88rem; line-height: 1.45; opacity: 0; transform: translateY(15px); pointer-events: none; transition: opacity 0.2s, transform 0.2s; }
.toast.show { opacity: 1; transform: translateY(0); }
.mobile-nav { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .topbar { padding: 0 26px; }
  .page { padding: 34px 26px 96px; }
  .board-wall { grid-template-columns: 1fr 1fr; }
  .cue-grid { grid-template-columns: 1fr 1fr; }
  .template-save-banner { flex-direction: column; align-items: flex-start; }
  .template-save-banner .template-actions { flex-shrink: 1; }
}
@media (max-width: 1000px) {
  .template-cards { grid-template-columns: 1fr 1fr; }
  .template-storage { display: block; }
  .hero { grid-template-columns: 1fr; }
  .hero-art { min-height: 260px; }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .topbar { min-height: 60px; padding: 0 18px; }
  .top-action, .sample-label { display: none; }
  .page { padding: 26px 18px 104px; }
  .hero-copy { padding-top: 4px; }
  .hero h1 { font-size: clamp(2.6rem, 12vw, 3.6rem); margin: 16px 0; }
  .hero-copy p { font-size: 1.05rem; }
  .hero-actions { gap: 26px; }
  .hero-art { min-height: 210px; }
  .art-card { width: 172px; right: 14px; bottom: 16px; }
  .section-head, .wall-head { margin-top: 48px; flex-direction: column; align-items: flex-start; gap: 6px; }
  .section-head h2, .wall-head h2 { font-size: 1.9rem; }
  .hint { text-align: left; }
  .board-wall { grid-template-columns: 1fr 1fr; gap: 14px; }
  .board-tile { min-height: 262px; }
  .board-tile.featured { min-height: 540px; }
  .tile-top { padding: 16px 16px 8px; }
  .tile-title { padding: 0 16px; }
  .tile-title h3 { font-size: 1.4rem; }
  .tile-footer { padding: 12px 16px 16px; }
  .tile-pills { display: none; }
  .lower-grid, .settings-grid { grid-template-columns: 1fr; }
  .settings-card, .lineage, .template-editor { padding: 24px 20px; }
  .record-list { grid-template-columns: 1fr; }
  .board-feature { grid-template-columns: 1fr; }
  .board-feature .tile-art { min-height: 120px; max-height: 120px; }
  .board-feature-copy { padding: 20px; }
  .email-layout { display: block; }
  .email-views { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; }
  .email-view { min-width: max-content; }
  .email-view span { display: none; }
  .email-card { flex-wrap: wrap; }
  .email-card .button { margin-left: 0; }
  .page-heading { align-items: start; }
  .detail-grid, .evidence-pair, .form-grid { grid-template-columns: 1fr; }
  .dialog-header { padding: 14px 18px 0; }
  .dialog-body { padding: 0 18px 24px; }
  .dialog-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-left: -18px; margin-right: -18px; padding: 0 18px; overflow: visible; }
  .dialog-tab { white-space: normal; text-align: center; padding: 10px 6px; }
  .dialog-title { font-size: 2.2rem; }
  .change-chain li { grid-template-columns: 1fr; }
  .change-chain li > span { grid-row: auto; }
  .link-preview { grid-template-columns: 1fr; }
  .template-cards, .template-fields, .empty-samples { grid-template-columns: 1fr; }
  .template-fields .form-row:last-child { grid-column: auto; }
  .template-storage { padding: 22px 20px; }
  .template-home-link { align-items: flex-start; }
  .template-save-banner .template-actions, .template-save-banner .button { width: 100%; }
  .empty-sample { min-height: 0; }
  .collection-empty { padding: 20px; }
  .toast { left: 16px; right: 16px; bottom: 88px; max-width: none; }
  .mobile-nav { display: flex; justify-content: space-around; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 8px 6px max(8px, env(safe-area-inset-bottom)); background: var(--ivory); border-top: var(--border-hairline) solid var(--header-rule); }
  .mobile-nav button { min-width: 58px; min-height: var(--size-touch); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 6px; border: 0; border-radius: var(--radius-control); background: none; color: var(--ink-soft); font-size: 0.68rem; font-weight: 800; }
  .mobile-nav button.active { background: var(--accent-scatterplot); color: var(--ink); }
  .mobile-nav span { font-family: var(--font-serif); font-size: 1.15rem; color: var(--green); }
}
@media (max-width: 430px) {
  .topbar { gap: 8px; padding: 0 12px; }
  .breadcrumb { font-size: 0.78rem; min-width: 0; overflow: hidden; white-space: nowrap; }
  .breadcrumb strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .top-actions { flex-shrink: 0; }
  .status-chip { padding: 6px 9px; font-size: 0.6rem; }
  .cue-grid { grid-template-columns: 1fr; }
  .cue-card { min-height: 0; }
  .board-wall { grid-template-columns: 1fr; }
  .board-tile, .board-tile.featured { min-height: 0; grid-row: auto; }
  .tile-art, .featured .tile-art { height: 118px; min-height: 118px; flex: none; }
  .record-card { min-height: 0; }
  .placement-row { flex-direction: column; align-items: flex-start; }
  .placement-actions { width: 100%; }
  .page-heading, .page-heading > div { min-width: 0; max-width: 100%; }
  .page-title { overflow-wrap: anywhere; font-size: clamp(2.3rem, 11vw, 2.8rem); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .board-tile:hover, .cue-card:hover, .empty-sample:hover, .button:hover, .button:active { transform: none !important; }
}
@media (forced-colors: active) {
  .status-dot, .cue-chip::before { background: currentColor; }
  .button, .cue-card, .board-tile, .record-card { border: 1px solid currentColor; }
}

/* Transcript inbox (inbox.js) */
.inbox-account { max-width: 62ch; margin: -14px 0 22px; font-size: 0.82rem; line-height: 1.5; color: var(--text-muted); }
.inbox-list { display: grid; gap: 16px; margin-top: 22px; }
.inbox-card { display: grid; gap: 12px; min-width: 0; padding: 22px 24px 20px; background: var(--card); border: var(--border-hairline) solid var(--card-border); border-radius: var(--radius-step); box-shadow: var(--shadow-step); }
.inbox-card h3 { margin: 0; font: 550 1.5rem/1.15 var(--font-serif); letter-spacing: -0.03em; overflow-wrap: anywhere; }
.inbox-meta { margin: 0; font-size: 0.84rem; color: var(--card-text-muted); }
.inbox-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.inbox-card .text-button { justify-self: start; }
.inbox-filing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; align-items: end; }
.inbox-filing .placement-actions { grid-column: 1 / -1; }
.transcript-lines { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.transcript-lines li { display: grid; grid-template-columns: 4.2em minmax(0, 1fr); gap: 12px; font-size: 0.9rem; line-height: 1.5; }
.transcript-lines time { font-variant-numeric: tabular-nums; font-size: 0.78rem; font-weight: 800; color: var(--coral-ink); padding-top: 2px; }
.transcript-lines span { overflow-wrap: anywhere; }
.inbox-page code { font-size: 0.85em; padding: 1px 5px; border-radius: 4px; background: var(--page-band); }
@media (max-width: 720px) {
  .inbox-card { padding: 18px; }
  .inbox-filing { grid-template-columns: 1fr; }
}

/* Inbox: compact forwarding strip, source views, groups, tags and details */
.inbox-strip { margin: 0 0 18px; padding: 14px 18px; background: var(--paper); border: var(--border-hairline) solid var(--card-border); border-radius: var(--radius-step); box-shadow: var(--shadow-step); }
.inbox-strip-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-bottom: 10px; border-bottom: var(--border-hairline) solid var(--card-border); }
.inbox-strip-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font: 550 1.1rem/1.2 var(--font-serif); letter-spacing: -0.02em; }
.inbox-strip-address { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.inbox-strip-address small { font-size: 0.72rem; font-weight: 800; color: var(--card-text-muted); }
.inbox-strip-address code { font-size: 0.78rem; padding: 2px 6px; border-radius: 4px; background: var(--page-band); overflow-wrap: anywhere; }
.inbox-rows { margin: 0; padding: 0; list-style: none; }
.inbox-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; gap: 14px; padding: 10px 0; border-bottom: var(--border-hairline) solid var(--card-border); }
.inbox-row:last-child { border-bottom: 0; padding-bottom: 0; }
.inbox-row > div { display: grid; gap: 2px; min-width: 0; }
.inbox-row strong { font-size: 0.86rem; }
.inbox-row small { font-size: 0.74rem; color: var(--card-text-muted); overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .inbox-strip { padding: 12px 14px; }
  .inbox-row { grid-template-columns: 1fr; gap: 4px; }
}

.inbox-strip-address code em { font-style: italic; color: var(--coral-ink); }
.inbox-strip-empty { margin: 10px 0 0; font-size: 0.82rem; color: var(--card-text-muted); }
.inbox-layout { display: grid; grid-template-columns: minmax(150px, 190px) minmax(0, 1fr); gap: 22px; align-items: start; }
.inbox-sources { position: sticky; top: 16px; }
.inbox-main { min-width: 0; }
.inbox-group { margin-top: 22px; }
.inbox-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 10px; }
.inbox-group-head h3.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0; }
.inbox-group-head h3.eyebrow::before { content: ''; width: 24px; height: var(--border-rule); background: var(--coral); flex: none; }
.inbox-group-head .group-count { font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.inbox-group-head small { font-size: 0.76rem; color: var(--text-muted); }
.inbox-group .inbox-list { margin-top: 0; }
.tag-chip { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: var(--radius-pill); border: var(--border-hairline) solid var(--card-border); background: var(--paper); font-size: 0.67rem; font-weight: 800; letter-spacing: 0.035em; text-transform: uppercase; line-height: 1; white-space: nowrap; color: var(--ink); }
.email-text { font-size: 0.9rem; line-height: 1.55; color: var(--ink); overflow-wrap: anywhere; }
.email-text.is-open { white-space: pre-wrap; padding: 12px 14px; background: var(--page-band); border-radius: var(--radius-field); max-height: 420px; overflow: auto; }
.inbox-attachments { margin: 0; font-size: 0.76rem; color: var(--card-text-muted); }
.inbox-details { display: grid; gap: 0; }
.inbox-original { margin: 0 0 4px; font-size: 0.8rem; color: var(--card-text-muted); }
.inbox-details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.inbox-details small, .inbox-filing-project small { font-size: 0.74rem; color: var(--card-text-muted); }
.inbox-filing-project { grid-column: 1 / -1; }
@media (max-width: 720px) {
  .inbox-layout { grid-template-columns: 1fr; gap: 14px; }
  .inbox-sources { position: static; display: flex; gap: 4px; overflow-x: auto; padding: 6px; }
  .inbox-sources .email-view { width: auto; flex: 1 0 auto; }
  .inbox-details-grid { grid-template-columns: 1fr; }
}

/* GeniusID account slot (sidebar) */
.account-slot { display: grid; gap: 8px; margin-top: 12px; }
.account-slot .account-button { width: 100%; justify-content: center; text-align: center; }
.account-slot .account-button[disabled] { opacity: 1; cursor: not-allowed; background: transparent; border: 1.2px dashed rgba(255, 255, 255, 0.34); color: var(--eyebrow); box-shadow: none; }
.account-row { display: flex; justify-content: space-between; gap: 8px; font-size: 0.78rem; color: var(--heading); }
.account-note { margin: 0; font-size: 0.75rem; line-height: 1.5; color: var(--text-muted); }
