:root {
  --clinical-white: #F8F7F4;
  --paper: #FFFEF9;
  --ink: #1A1612;
  --ink-soft: #4A4540;
  --ink-muted: #8A847A;
  --rule: #D4CFC5;
  --stamp-red: #C0392B;
  --stamp-red-light: rgba(192,57,43,0.08);
  --clinical-blue: #2C5F7C;
  --clinical-blue-light: rgba(44,95,124,0.07);
  --clinical-green: #3D7C4A;
  --clinical-green-light: rgba(61,124,74,0.07);
  --manila: #F0E6C8;
  --manila-dark: #D6C8A0;
  --gnome-purple: #6C4A8B;
  --warning-amber: #D4890C;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Public Sans', system-ui, -apple-system, sans-serif;
  background: var(--clinical-white);
  color: var(--ink);
  overflow-x: hidden;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
}

body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 9999;
}

/* STATUS BAR (above top nav) */
.status-bar { display: flex; align-items: center; gap: 0.75rem; padding: 0.35rem 2rem; background: var(--ink); color: var(--manila); font-family: 'IBM Plex Mono', monospace; font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.12em; border-bottom: 1px solid rgba(240,230,200,0.12); position: sticky; top: 0; z-index: 101; }
.status-bar .status-text { flex: 1; color: var(--manila-dark); }
.status-bar .status-text strong { color: var(--manila); font-weight: 700; letter-spacing: 0.15em; }
.status-bar .status-clock { color: var(--manila-dark); font-variant-numeric: tabular-nums; }
.status-bar .visitor-counter { color: var(--manila-dark); font-size: 0.6rem; letter-spacing: 0.1em; white-space: nowrap; }
.status-bar .status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-muted); flex-shrink: 0; display: inline-block; box-shadow: 0 0 0 2px rgba(240,230,200,0.12); animation: pulseDot 2.4s ease-in-out infinite; }
.status-dot[data-state="in-session"] { background: #3D7C4A; }
.status-dot[data-state="lunch"] { background: #D4890C; }
.status-dot[data-state="by-appointment"] { background: #D4890C; }
.status-dot[data-state="after-hours"] { background: #C0392B; }
.status-dot[data-state="closed"] { background: #8A847A; }
@keyframes pulseDot { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.25); opacity: 0.7; } }
.logo-text span { transition: opacity 0.25s ease; }
@media (max-width: 900px) { .status-bar .visitor-counter { display: none; } }

/* ── TOP BAR ──────────────────────────────────────────────────────── */
.top-bar { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 2rem; border-bottom: 2px solid var(--ink); background: var(--paper); position: sticky; top: 28px; z-index: 100; }
.logo-mark { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: inherit; }
.logo-icon { width: 32px; height: 32px; border: 2px solid var(--ink); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 700; font-family: 'IBM Plex Mono', monospace; }
.logo-text { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; line-height: 1.3; }
.logo-text span { display: block; font-weight: 400; font-size: 0.6rem; color: var(--ink-muted); letter-spacing: 0.08em; }
.top-nav { display: flex; gap: 1.5rem; list-style: none; font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; }
.top-nav a { color: var(--ink-soft); text-decoration: none; transition: color 0.2s; }
.top-nav a:hover { color: var(--stamp-red); }
.file-btn { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; background: var(--ink); color: var(--paper); border: none; padding: 0.5rem 1rem; cursor: pointer; transition: background 0.2s; text-decoration: none; display: inline-block; }
.file-btn:hover { background: var(--stamp-red); }

/* Mobile drawer trigger — hidden on desktop */
.drawer-btn { display: none; font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; background: var(--manila); color: var(--ink); border: 2px solid var(--ink); padding: 0.4rem 0.75rem; cursor: pointer; gap: 0.35rem; align-items: center; }
.drawer-btn::before { content: ''; width: 14px; height: 2px; background: var(--ink); box-shadow: 0 4px 0 var(--ink), 0 8px 0 var(--ink); display: inline-block; margin-right: 0.35rem; }

.drawer { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: var(--manila); z-index: 200; transform: translateY(-100%); transition: transform 0.32s cubic-bezier(0.2, 0, 0.1, 1); padding: 5rem 2rem 2rem; overflow-y: auto; }
.drawer[data-open="true"] { transform: translateY(0); }
.drawer-header { position: absolute; top: 0; left: 0; right: 0; padding: 0.75rem 2rem; border-bottom: 2px solid var(--ink); display: flex; justify-content: space-between; align-items: center; background: var(--manila); }
.drawer-header strong { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.drawer-close { font-family: 'IBM Plex Mono', monospace; font-size: 0.9rem; background: none; border: none; cursor: pointer; padding: 0.25rem 0.5rem; }
.drawer ol { list-style: none; counter-reset: form; }
.drawer ol li { counter-increment: form; border-bottom: 1px solid var(--manila-dark); }
.drawer ol li a { display: flex; align-items: baseline; gap: 1rem; padding: 1.25rem 0; text-decoration: none; color: var(--ink); font-family: 'Libre Baskerville', serif; font-size: 1.4rem; }
.drawer ol li a::before { content: counter(form, decimal-leading-zero); font-family: 'IBM Plex Mono', monospace; font-size: 0.75rem; font-weight: 600; color: var(--stamp-red); letter-spacing: 0.1em; flex-shrink: 0; }
.drawer ol li a:hover { color: var(--stamp-red); }

/* ── HERO ────────────────────────────────────────────────────────── */
.hero { padding: 4.5rem 2rem 5.5rem; text-align: center; position: relative; background: var(--paper); border-bottom: 2px solid var(--ink); }
.hero::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 1px; height: 100%; background: repeating-linear-gradient(to bottom, var(--rule) 0px, var(--rule) 4px, transparent 4px, transparent 12px); opacity: 0.4; }
.case-number { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; font-weight: 500; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 2rem; animation: fadeIn 0.6s ease-out; }
.case-number em { font-style: normal; color: var(--stamp-red); }
.hero h1 { font-family: 'Libre Baskerville', Georgia, serif; font-size: clamp(2.8rem, 7vw, 5.5rem); font-weight: 700; line-height: 1.08; margin-bottom: 0.15em; position: relative; animation: fadeUp 0.7s ease-out 0.1s both; }
.stamp { display: inline-block; position: relative; }
.stamp::after { content: 'URGENT'; position: absolute; top: -0.5em; right: -2.5em; font-family: 'IBM Plex Mono', monospace; font-size: 0.55rem; font-weight: 700; color: var(--stamp-red); border: 2px solid var(--stamp-red); padding: 0.15em 0.4em; transform: rotate(12deg); letter-spacing: 0.1em; opacity: 0.82; animation: stampIn 0.4s ease-out 0.35s both; }
.hero-sub { font-family: 'Libre Baskerville', Georgia, serif; font-style: italic; font-size: clamp(1.1rem, 2.5vw, 1.5rem); color: var(--ink-soft); margin-bottom: 2.5rem; animation: fadeUp 0.7s ease-out 0.25s both; }
.hero-desc { max-width: 520px; margin: 0 auto 3rem; font-size: 1.02rem; line-height: 1.75; color: var(--ink-soft); animation: fadeUp 0.7s ease-out 0.4s both; }
.disclaimer { font-family: 'IBM Plex Mono', monospace; font-size: 0.65rem; color: var(--ink-muted); letter-spacing: 0.02em; margin-top: -1.5rem; margin-bottom: 2.5rem; }
.cta-row { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; animation: fadeUp 0.7s ease-out 0.55s both; }

.btn { font-family: 'IBM Plex Mono', monospace; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; padding: 0.95rem 1.85rem; border: 2px solid var(--ink); text-decoration: none; cursor: pointer; transition: all 0.2s ease; display: inline-flex; align-items: center; gap: 0.5rem; position: relative; }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--stamp-red); border-color: var(--stamp-red); }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
/* Rubber-stamp overprint — rotated red border doubles the primary CTA */
.btn-stamp { position: relative; }
.btn-stamp::after { content: ''; position: absolute; inset: -6px -10px; border: 2px solid var(--stamp-red); pointer-events: none; transform: rotate(-1.5deg); opacity: 0.6; animation: stampIn 0.45s ease-out 1.1s both; }
.btn-stamp:hover::after { opacity: 1; }

/* ── TICKER ──────────────────────────────────────────────────────── */
.ticker-wrap { overflow: hidden; border-bottom: 2px solid var(--ink); background: var(--manila); padding: 0.6rem 0; }
.ticker { display: flex; white-space: nowrap; animation: scroll 40s linear infinite; font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }
.ticker span { padding: 0 2rem; flex-shrink: 0; }
.ticker .dot { color: var(--stamp-red); padding: 0 0.5rem; }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ── SECTIONS — varied rhythm ─────────────────────────────────────── */
.section { padding: 5rem 2rem; border-bottom: 2px solid var(--ink); }
.section-tight { padding: 3.5rem 2rem; }
.section-loose { padding: 6.5rem 2rem; }
.section-header { max-width: 800px; margin: 0 auto 3rem; text-align: center; }
.section-header-left { max-width: 1000px; margin: 0 auto 3rem; text-align: left; padding-left: 1rem; }
.section-label { font-family: 'IBM Plex Mono', monospace; font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.18em; color: var(--ink-muted); margin-bottom: 0.6rem; display: flex; align-items: center; justify-content: center; gap: 0.75rem; }
.section-header-left .section-label { justify-content: flex-start; }
.section-label::before, .section-label::after { content: ''; width: 24px; height: 1px; background: var(--rule); }
.section-header-left .section-label::after { display: none; }
.section-title { font-family: 'Libre Baskerville', Georgia, serif; font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; line-height: 1.15; }

/* ── PROCESS ─────────────────────────────────────────────────────── */
.process-bg { background: var(--paper); }
.process-grid { max-width: 900px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 2px solid var(--ink); }
.process-step { padding: 2.5rem 2rem; position: relative; text-align: center; }
.process-step:not(:last-child) { border-right: 2px solid var(--ink); }
.step-num { font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.15em; color: var(--ink-muted); margin-bottom: 1rem; }
.step-emoji { font-size: 2.5rem; margin-bottom: 1rem; display: block; }
.process-step h3 { font-family: 'Libre Baskerville', Georgia, serif; font-size: 1.15rem; margin-bottom: 0.6rem; }
.process-step p { font-size: 0.9rem; color: var(--ink-soft); line-height: 1.65; }

/* ── SEVERITY ────────────────────────────────────────────────────── */
.severity-bg { background: var(--clinical-white); }
.severity-grid { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.file-card { background: var(--paper); border: 1.5px solid var(--rule); padding: 0; position: relative; transition: all 0.25s ease; cursor: default; text-decoration: none; color: inherit; display: block; }
.file-card:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: 4px 4px 0 var(--ink); }
.file-tab { display: inline-block; background: var(--manila); border-bottom: 1.5px solid var(--rule); padding: 0.35rem 1rem; font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-soft); }
.file-card:hover .file-tab { border-color: var(--ink); }
.file-card-thumb { width: 100%; aspect-ratio: 1.6; object-fit: cover; display: block; border-bottom: 1.5px solid var(--rule); background: var(--manila); filter: grayscale(1) contrast(1.1); }
.file-card:hover .file-card-thumb { border-color: var(--ink); }
.file-card-body { padding: 1.25rem 1.5rem 1.5rem; }
.file-card-body h3 { font-family: 'Libre Baskerville', Georgia, serif; font-size: 1.18rem; margin-bottom: 0.5rem; }
.file-card-body p { font-size: 0.9rem; color: var(--ink-soft); line-height: 1.6; }
.severity-indicator { display: flex; align-items: center; gap: 0.35rem; margin-top: 0.75rem; font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-muted); }
.severity-bar { display: flex; gap: 2px; }
.severity-bar span { width: 14px; height: 6px; background: var(--rule); }
.severity-bar span.filled { background: var(--stamp-red); }
.severity-bar span.amber { background: var(--warning-amber); }
.severity-bar span.green { background: var(--clinical-green); }

/* Special card — tilt + CLASSIFIED stamp */
.file-card.file-card-special { transform: rotate(-1.2deg); border: 2px solid var(--ink); background: var(--manila); box-shadow: 5px 5px 0 var(--ink); position: relative; overflow: visible; }
.file-card.file-card-special:hover { transform: rotate(-1.2deg) translateY(-3px); box-shadow: 8px 8px 0 var(--ink); }
.file-card.file-card-special .file-tab { background: var(--ink); color: var(--manila); border-color: var(--ink); }
.file-card.file-card-special .file-card-body { padding: 1.4rem 1.5rem 1.75rem; }
.file-card.file-card-special::before { content: 'CLASSIFIED'; position: absolute; top: 1rem; right: -1.4rem; font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; font-weight: 700; color: var(--stamp-red); border: 2.5px solid var(--stamp-red); padding: 0.35em 0.75em; transform: rotate(8deg); letter-spacing: 0.2em; background: rgba(255, 254, 249, 0.92); animation: stampIn 0.5s ease-out 0.6s both; }
.redacted { background: var(--ink); color: transparent; padding: 0 0.15em; user-select: none; border-radius: 1px; }

/* ── DIAGNOSES ──────────────────────────────────────────────────── */
.diag-bg { background: var(--paper); }
.diag-list { max-width: 720px; margin: 0 auto; }
.diag-entry { display: grid; grid-template-columns: 60px 1fr auto; align-items: start; gap: 1.25rem; padding: 1.5rem 0; border-bottom: 1px solid var(--rule); }
.diag-entry:last-child { border-bottom: none; }
.diag-code { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; font-weight: 600; color: var(--stamp-red); padding-top: 0.2rem; }
.diag-name { font-family: 'Libre Baskerville', Georgia, serif; font-size: 1.05rem; margin-bottom: 0.25rem; }
.diag-desc { font-size: 0.9rem; color: var(--ink-soft); line-height: 1.6; }
.diag-badge { font-family: 'IBM Plex Mono', monospace; font-size: 0.55rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; padding: 0.3em 0.6em; border: 1.5px solid; white-space: nowrap; margin-top: 0.15rem; }
.diag-badge.common { color: var(--clinical-green); border-color: var(--clinical-green); }
.diag-badge.rising { color: var(--warning-amber); border-color: var(--warning-amber); }
.diag-badge.epidemic { color: var(--stamp-red); border-color: var(--stamp-red); }

/* ── MANUAL / DSM-Y ──────────────────────────────────────────────── */
.manual-byline { max-width: 520px; margin: 1.25rem auto 0; color: var(--ink-soft); font-family: 'Libre Baskerville', Georgia, serif; font-style: italic; line-height: 1.7; font-size: 0.95rem; }
.manual-body { max-width: 720px; margin: 0 auto; padding: 3rem 1.5rem 5rem; column-count: 1; }
.manual-chapter { margin-bottom: 3.5rem; }
.manual-chapter-num { font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem; font-weight: 700; color: var(--stamp-red); text-transform: uppercase; letter-spacing: 0.18em; margin-bottom: 0.5rem; padding-bottom: 0.4rem; border-bottom: 1.5px solid var(--ink); display: inline-block; padding-right: 1.5rem; }
.manual-chapter h2 { font-family: 'Libre Baskerville', Georgia, serif; font-size: clamp(1.5rem, 2.8vw, 2rem); line-height: 1.2; margin: 1rem 0 1.25rem; font-weight: 700; }
.manual-chapter p { font-family: 'Libre Baskerville', Georgia, serif; font-size: 1.05rem; line-height: 1.8; color: var(--ink); margin-bottom: 1.25rem; text-align: justify; hyphens: auto; }
.manual-chapter p:first-of-type::first-letter { font-family: 'Libre Baskerville', Georgia, serif; font-size: 3.2rem; font-weight: 700; float: left; line-height: 0.9; margin: 0.2rem 0.5rem 0 0; color: var(--stamp-red); }
.manual-chapter p strong { font-weight: 700; color: var(--ink); }
.manual-chapter p em { font-style: italic; color: var(--ink); }
.manual-aside { margin: 1.75rem 0; padding: 1.25rem 1.5rem; background: var(--manila); border: 1.5px solid var(--ink); font-family: 'Libre Baskerville', Georgia, serif; font-size: 0.97rem; line-height: 1.7; color: var(--ink-soft); }
.manual-aside strong { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; display: block; color: var(--stamp-red); margin-bottom: 0.35rem; font-weight: 700; }
.manual-aside em { font-style: italic; }
.manual-pullquote { margin: 2.25rem 0; padding: 1.75rem 2rem; background: var(--clinical-white); border-top: 3px double var(--ink); border-bottom: 3px double var(--ink); position: relative; }
.manual-pullquote p { font-family: 'Libre Baskerville', Georgia, serif; font-style: italic; font-size: 1.2rem; line-height: 1.55; color: var(--ink); margin-bottom: 0.75rem; text-align: left; }
.manual-pullquote cite { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-muted); font-style: normal; }
.manual-list { padding-left: 0; list-style: none; counter-reset: ml; }
.manual-list li { counter-increment: ml; padding-left: 2.25rem; position: relative; margin-bottom: 0.85rem; font-family: 'Libre Baskerville', Georgia, serif; line-height: 1.7; font-size: 1rem; }
.manual-list li::before { content: counter(ml, decimal-leading-zero) "."; position: absolute; left: 0; top: 0.1rem; font-family: 'IBM Plex Mono', monospace; font-size: 0.78rem; color: var(--stamp-red); font-weight: 700; letter-spacing: 0.08em; }
.manual-excluded, .manual-biblio { padding-left: 0; list-style: none; }
.manual-excluded li, .manual-biblio li { padding: 0.75rem 0; border-bottom: 1px dashed var(--rule); font-family: 'Libre Baskerville', Georgia, serif; line-height: 1.65; font-size: 0.98rem; color: var(--ink-soft); }
.manual-excluded li:last-child, .manual-biblio li:last-child { border-bottom: none; }
.manual-excluded li strong, .manual-biblio li em { color: var(--ink); }
.manual-signature { font-family: 'Libre Baskerville', Georgia, serif; font-style: italic; color: var(--ink-soft); font-size: 0.97rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--rule); line-height: 1.55; }
.manual-closing { padding: 2rem 2rem; border: 2px solid var(--ink); background: var(--manila); box-shadow: 4px 4px 0 var(--ink); }
.manual-closing p { text-align: left; }
.manual-closing p:first-of-type::first-letter { color: var(--ink); }

/* ── HOLIDAYS ──────────────────────────────────────────────────── */
.holidays-list { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 0; }
.holiday-entry { display: grid; grid-template-columns: 200px 1fr 140px; gap: 1.5rem; align-items: start; padding: 1.75rem 1.5rem; border-bottom: 1.5px solid var(--rule); }
.holiday-entry:first-child { border-top: 2px solid var(--ink); }
.holiday-entry:last-child { border-bottom: 2px solid var(--ink); }
.holiday-entry--unobserved { opacity: 0.55; }
.holiday-date .holiday-code { font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem; color: var(--stamp-red); letter-spacing: 0.1em; font-weight: 700; margin-bottom: 0.3rem; }
.holiday-date .holiday-day { font-family: 'Libre Baskerville', Georgia, serif; font-size: 1.05rem; color: var(--ink); font-weight: 700; }
.holiday-body h3 { font-family: 'Libre Baskerville', Georgia, serif; font-size: 1.3rem; line-height: 1.25; margin-bottom: 0.5rem; font-weight: 700; }
.holiday-body .holiday-observance { color: var(--ink-soft); line-height: 1.65; font-size: 0.95rem; margin-bottom: 0.5rem; font-family: 'Libre Baskerville', Georgia, serif; }
.holiday-body .holiday-note { font-family: 'IBM Plex Mono', monospace; font-size: 0.65rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.08em; padding-top: 0.5rem; border-top: 1px dashed var(--rule); }
.holiday-status { text-align: right; }
.holiday-status-tag { display: inline-block; font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; padding: 0.35em 0.7em; border: 1.5px solid; }
.holiday-status-tag--observed { color: var(--clinical-green); border-color: var(--clinical-green); }
.holiday-status-tag--acknowledged { color: var(--warning-amber); border-color: var(--warning-amber); }
.holiday-status-tag--bank { color: var(--stamp-red); border-color: var(--stamp-red); }
.holiday-status-tag--unobserved { color: var(--ink-muted); border-color: var(--ink-muted); }
.holidays-note { max-width: 720px; margin: 3rem auto 0; padding: 1.5rem 1.75rem; border: 3px double var(--ink); background: var(--manila); font-family: 'Libre Baskerville', Georgia, serif; line-height: 1.75; color: var(--ink); font-size: 0.97rem; }
.holidays-note p { margin-bottom: 1rem; }
.holidays-note p:last-child { margin-bottom: 0; }
.holidays-note strong { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--stamp-red); margin-right: 0.35em; }

@media (max-width: 768px) {
  .holiday-entry { grid-template-columns: 1fr; gap: 0.75rem; }
  .holiday-status { text-align: left; }
}

/* ── FORM LC-77 + COMPLAINT ─────────────────────────────────────── */
.lc77-form { max-width: 640px; margin: 0 auto; }
.lc77-form textarea.form-input { resize: vertical; font-family: 'Public Sans', sans-serif; line-height: 1.5; }
.lc77-form select.form-input { cursor: pointer; }
.lc77-confirm { max-width: 640px; margin: 4rem auto; padding: 3rem 2rem; border: 3px double var(--ink); background: var(--paper); box-shadow: 8px 8px 0 var(--ink); text-align: center; position: relative; }
.lc77-confirm::before { content: 'RECEIVED'; position: absolute; top: -0.8rem; left: 2rem; font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; font-weight: 700; background: var(--clinical-green); color: var(--paper); padding: 0.35em 0.75em; letter-spacing: 0.18em; }

/* ── OFFICES ────────────────────────────────────────────────────── */
.office-figure { max-width: 1100px; margin: 0 auto 3.5rem; padding: 0 2rem; }
.office-figure img { width: 100%; display: block; border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); background: var(--manila); }
.office-figure figcaption { padding-top: 1rem; }
.office-caption-label { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.12em; text-align: center; }
.office-details { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; padding: 0 2rem; }
.office-panel { padding: 1.5rem 1.5rem; border: 1.5px solid var(--ink); background: var(--paper); }
.office-panel h3 { font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--stamp-red); margin-bottom: 1rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--rule); }
.office-panel p { color: var(--ink-soft); line-height: 1.7; font-size: 0.95rem; margin-bottom: 0.85rem; }
.office-panel p:last-child { margin-bottom: 0; }
.office-panel em { font-family: 'IBM Plex Mono', monospace; font-style: normal; color: var(--ink); font-weight: 600; letter-spacing: 0.08em; }
.office-dl { display: flex; flex-direction: column; gap: 0.6rem; }
.office-dl > div { display: flex; gap: 1rem; align-items: baseline; border-bottom: 1px dashed var(--rule); padding-bottom: 0.4rem; }
.office-dl > div:last-child { border-bottom: none; }
.office-dl dt { font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; font-weight: 600; color: var(--ink); text-transform: uppercase; letter-spacing: 0.08em; min-width: 120px; }
.office-dl dd { font-size: 0.9rem; color: var(--ink-soft); line-height: 1.45; flex: 1; }
.office-list { list-style: none; counter-reset: ol; font-size: 0.92rem; color: var(--ink-soft); line-height: 1.65; }
.office-list li { counter-increment: ol; padding-left: 2rem; position: relative; margin-bottom: 0.5rem; }
.office-list li::before { content: counter(ol, decimal-leading-zero) "."; position: absolute; left: 0; top: 0; font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; color: var(--stamp-red); font-weight: 600; letter-spacing: 0.08em; }
.office-notice { max-width: 800px; margin: 3rem auto 0; padding: 1.5rem 1.75rem; border: 3px double var(--ink); background: var(--manila); font-family: 'Libre Baskerville', Georgia, serif; font-style: italic; font-size: 0.98rem; line-height: 1.75; color: var(--ink); position: relative; }
.office-notice::before { content: 'NOTICE'; position: absolute; top: -0.6rem; left: 1.5rem; font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; font-weight: 700; color: var(--paper); background: var(--ink); padding: 0.3em 0.7em; letter-spacing: 0.15em; font-style: normal; }

/* ── TODAY'S WORST ─────────────────────────────────────────────── */
.worst-section { border-bottom: 2px solid var(--ink); background: var(--paper); padding: 3.5rem 2rem; }
.worst-header { max-width: 1200px; margin: 0 auto 1.5rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.worst-header h2 { font-family: 'Libre Baskerville', Georgia, serif; font-size: clamp(1.3rem, 2.4vw, 1.8rem); line-height: 1.2; }
.worst-header .worst-label { font-family: 'IBM Plex Mono', monospace; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--stamp-red); border: 1.5px solid var(--stamp-red); padding: 0.3em 0.7em; }
.worst-strip { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.worst-card { display: block; text-decoration: none; color: inherit; background: var(--paper); border: 1.5px solid var(--rule); transition: all 0.2s; position: relative; }
.worst-card:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: 4px 4px 0 var(--ink); }
.worst-card img { width: 100%; aspect-ratio: 1.3; object-fit: cover; display: block; border-bottom: 1.5px solid var(--rule); filter: grayscale(0.9) contrast(1.2); }
.worst-card-body { padding: 0.75rem 1rem 1rem; }
.worst-card-meta { font-family: 'IBM Plex Mono', monospace; font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--stamp-red); margin-bottom: 0.25rem; }
.worst-card-title { font-family: 'Libre Baskerville', Georgia, serif; font-size: 0.95rem; line-height: 1.3; }
.worst-empty { grid-column: 1 / -1; font-family: 'IBM Plex Mono', monospace; font-size: 0.75rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.1em; text-align: center; padding: 2rem 0; }

/* ── CASE-PHOTO ARCHIVAL FILTER ─────────────────────────────────── */
/* Grayscale + subtle sepia warmth + overlaid dot pattern so user photos
   visually match the halftone archive. Applied to .case-photo. */
.case-photo-frame { position: relative; display: block; }
.case-photo-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at center, rgba(26,22,18,0.45) 0.6px, transparent 1.2px);
  background-size: 3.5px 3.5px;
  mix-blend-mode: multiply;
  pointer-events: none;
  opacity: 0.55;
}
.case-photo-frame .case-photo { filter: grayscale(0.95) contrast(1.18) sepia(0.07) brightness(0.96); display: block; }

/* ── NEWSLETTER ─────────────────────────────────────────────────── */
.newsletter-strip { background: var(--ink); color: var(--manila); padding: 2.5rem 2rem; border-bottom: 2px solid var(--ink); }
.newsletter-inner { max-width: 900px; margin: 0 auto; display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: center; }
.newsletter-inner h3 { font-family: 'Libre Baskerville', Georgia, serif; font-size: clamp(1.4rem, 2.3vw, 1.9rem); color: var(--manila); margin-bottom: 0.5rem; line-height: 1.2; }
.newsletter-inner p { color: var(--manila-dark); font-size: 0.92rem; line-height: 1.65; }
.newsletter-inner p em { font-style: normal; color: var(--stamp-red); font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; }
.newsletter-form { display: flex; gap: 0.5rem; }
.newsletter-form input[type="email"] { flex: 1; padding: 0.85rem 1rem; border: 1.5px solid var(--manila); background: var(--ink); color: var(--manila); font-family: 'IBM Plex Mono', monospace; font-size: 0.85rem; }
.newsletter-form input[type="email"]::placeholder { color: var(--manila-dark); opacity: 0.6; }
.newsletter-form input[type="email"]:focus { outline: none; border-color: var(--stamp-red); }
.newsletter-form button { font-family: 'IBM Plex Mono', monospace; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; padding: 0.8rem 1.2rem; background: var(--stamp-red); color: var(--manila); border: 1.5px solid var(--stamp-red); cursor: pointer; transition: background 0.2s; }
.newsletter-form button:hover { background: var(--manila); color: var(--ink); border-color: var(--manila); }
.newsletter-status { font-family: 'IBM Plex Mono', monospace; font-size: 0.65rem; color: var(--manila-dark); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 0.75rem; }
@media (max-width: 768px) {
  .newsletter-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .office-details { gap: 1.25rem; }
}

/* Stamp pulse — every 25s briefly pulse the URGENT stamp */
@keyframes stampBeat { 0%, 100% { transform: rotate(12deg) scale(1); opacity: 0.82; } 2% { transform: rotate(12deg) scale(1.12); opacity: 1; } 4% { transform: rotate(12deg) scale(1); opacity: 0.82; } }
.stamp::after { animation: stampIn 0.4s ease-out 0.35s both, stampBeat 25s ease-in-out 6s infinite; }

/* ── COUNSELOR GRID ─────────────────────────────────────────────── */
.counselor-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2.5rem 2rem; padding: 0 1rem; }
.counselor-card { background: transparent; padding: 0; margin: 0; }
.counselor-card img { width: 100%; display: block; background: var(--manila); border: 1.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); transition: transform 0.25s ease; }
.counselor-card:nth-child(3n+1) img { transform: rotate(-0.8deg); }
.counselor-card:nth-child(3n+2) img { transform: rotate(0.4deg); }
.counselor-card:nth-child(3n) img { transform: rotate(-0.2deg); }
.counselor-card:hover img { transform: rotate(0) translateY(-3px); box-shadow: 6px 6px 0 var(--ink); }
.counselor-card figcaption { padding: 1rem 0 0; }
.counselor-title { font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem; font-weight: 600; color: var(--stamp-red); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 0.6rem; }
.counselor-bio { font-family: 'Libre Baskerville', Georgia, serif; font-style: italic; font-size: 0.95rem; line-height: 1.65; color: var(--ink-soft); }
@media (max-width: 768px) {
  .counselor-grid { gap: 2.5rem 1rem; }
  .counselor-card img, .counselor-card:nth-child(3n+1) img, .counselor-card:nth-child(3n+2) img, .counselor-card:nth-child(3n) img { transform: none; }
}

/* ── 404 / REDACTED ─────────────────────────────────────────────── */
.redacted-wrap { max-width: 640px; margin: 6rem auto; padding: 2.5rem 2rem; border: 3px double var(--ink); background: var(--paper); box-shadow: 8px 8px 0 var(--ink); text-align: left; position: relative; }
.redacted-wrap::before { content: 'REDACTED'; position: absolute; top: -0.8rem; left: 2rem; font-family: 'IBM Plex Mono', monospace; font-size: 0.75rem; font-weight: 700; background: var(--stamp-red); color: var(--paper); padding: 0.35em 0.75em; letter-spacing: 0.18em; }
.redacted-wrap h1 { font-family: 'Libre Baskerville', Georgia, serif; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.2; margin-bottom: 1rem; }
.redacted-wrap p { color: var(--ink-soft); line-height: 1.75; margin-bottom: 1rem; }
.redacted-bar { display: inline-block; background: var(--ink); color: transparent; padding: 0 0.6em; user-select: none; border-radius: 1px; margin: 0 0.1em; }

/* Hero collage — faint wall of evidence behind the text */
.hero { position: relative; isolation: isolate; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background-image: var(--hero-collage, none); background-repeat: repeat; background-size: 220px; opacity: 0.045; mix-blend-mode: multiply; pointer-events: none; filter: grayscale(1) contrast(1.1); }

/* Ticker thumbnails — tiny icons between headlines */
.ticker img.tick-thumb { height: 18px; width: 26px; object-fit: cover; vertical-align: middle; margin: 0 0.5rem; border: 1px solid var(--ink); filter: grayscale(1) contrast(1.15); }

/* ── CONDITION PLATES — DSM-Y catalog ──────────────────────────── */
.plate-list { max-width: 1100px; margin: 0 auto; display: grid; gap: 3.5rem; padding: 0 1rem; }
.plate-entry { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: start; }
.plate-entry:nth-child(even) { grid-template-columns: 1fr 1.2fr; }
.plate-entry:nth-child(even) .plate-image { order: 2; }
.plate-entry:nth-child(even) .plate-meta { order: 1; }
.plate-image { position: relative; }
.plate-image img { width: 100%; display: block; background: var(--manila); border: 1.5px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); }
.plate-entry:nth-child(3n+1) .plate-image { transform: rotate(-0.6deg); }
.plate-entry:nth-child(3n+2) .plate-image { transform: rotate(0.4deg); }
.plate-entry:nth-child(3n) .plate-image { transform: rotate(-0.2deg); }
.plate-image.plate-empty { aspect-ratio: 1.27; background: var(--manila); border: 2px dashed var(--ink-muted); box-shadow: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; padding: 2rem; }
.plate-image.plate-empty span { font-size: 3rem; }
.plate-image.plate-empty em { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.12em; font-style: normal; text-align: center; }
.plate-meta { padding-top: 0.5rem; }
.plate-meta-head { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 1rem; }
.plate-code { font-family: 'IBM Plex Mono', monospace; font-size: 0.85rem; font-weight: 700; color: var(--stamp-red); letter-spacing: 0.1em; padding: 0.35em 0.75em; border: 1.5px solid var(--stamp-red); }
.plate-name { font-family: 'Libre Baskerville', Georgia, serif; font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.2; margin-bottom: 0.75rem; }
.plate-desc { font-size: 1rem; line-height: 1.7; color: var(--ink-soft); margin-bottom: 1.25rem; }
.plate-footer { font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.1em; padding-top: 0.75rem; border-top: 1px solid var(--rule); }

@media (max-width: 768px) {
  .plate-entry, .plate-entry:nth-child(even) { grid-template-columns: 1fr; gap: 1rem; }
  .plate-entry:nth-child(even) .plate-image { order: initial; }
  .plate-entry:nth-child(even) .plate-meta { order: initial; }
  .plate-image, .plate-entry:nth-child(3n+1) .plate-image, .plate-entry:nth-child(3n+2) .plate-image, .plate-entry:nth-child(3n) .plate-image { transform: none; }
  .plate-image img { box-shadow: 3px 3px 0 var(--ink); }
}

/* ── SHARE ──────────────────────────────────────────────────────── */
.share-section { background: var(--clinical-white); }
.share-layout { max-width: 900px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.share-text h3 { font-family: 'Libre Baskerville', Georgia, serif; font-size: 1.5rem; margin-bottom: 1rem; line-height: 1.3; }
.share-text p { font-size: 0.98rem; color: var(--ink-soft); line-height: 1.7; margin-bottom: 1.5rem; }
.social-btns { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.social-btn { font-family: 'IBM Plex Mono', monospace; font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; padding: 0.6rem 1rem; border: 1.5px solid var(--rule); background: var(--paper); color: var(--ink); cursor: pointer; transition: all 0.2s; text-decoration: none; }
.social-btn:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }

.share-card-preview { background: var(--paper); border: 2px solid var(--ink); padding: 0; box-shadow: 6px 6px 0 var(--ink); position: relative; }
.share-card-header { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1.25rem; border-bottom: 2px solid var(--ink); background: var(--manila); }
.share-card-header .logo-sm { font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; }
.share-card-header .diag-label { font-family: 'IBM Plex Mono', monospace; font-size: 0.55rem; font-weight: 600; color: var(--stamp-red); text-transform: uppercase; letter-spacing: 0.1em; border: 1.5px solid var(--stamp-red); padding: 0.2em 0.5em; }
.share-card-img { width: 100%; height: 200px; background: linear-gradient(135deg, var(--clinical-green-light) 0%, var(--clinical-blue-light) 100%); display: flex; align-items: center; justify-content: center; font-size: 3rem; border-bottom: 2px solid var(--ink); position: relative; overflow: hidden; }
.share-card-img.has-photo { padding: 0; background: var(--ink); }
.share-card-img.has-photo img { width: 100%; height: 100%; object-fit: cover; }
.share-card-img.placeholder::after { content: '📸 YOUR LAWN HERE'; position: absolute; font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; color: var(--ink-muted); bottom: 0.75rem; }
.share-card-body { padding: 1.25rem; }
.share-card-body h4 { font-family: 'Libre Baskerville', Georgia, serif; font-size: 1.1rem; margin-bottom: 0.3rem; }
.share-card-body .card-diagnosis { font-family: 'IBM Plex Mono', monospace; font-size: 0.65rem; color: var(--stamp-red); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.6rem; }
.share-card-body .card-desc { font-size: 0.88rem; color: var(--ink-soft); line-height: 1.55; }
.share-card-footer { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 1.25rem; border-top: 1px solid var(--rule); font-family: 'IBM Plex Mono', monospace; font-size: 0.55rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* ── INTAKE ─────────────────────────────────────────────────────── */
.intake-bg { background: var(--manila); }
.intake-wrapper { max-width: 640px; margin: 0 auto; }
.intake-aux { font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem; color: var(--ink-soft); margin-bottom: 1.5rem; padding: 1rem 1.25rem; background: rgba(255, 254, 249, 0.5); border: 1px dashed var(--ink-soft); text-transform: uppercase; letter-spacing: 0.06em; line-height: 1.6; }
.intake-aux strong { color: var(--stamp-red); letter-spacing: 0.12em; }
.intake-aux ul { margin-top: 0.75rem; padding-left: 1.2rem; letter-spacing: 0.02em; text-transform: none; font-size: 0.75rem; color: var(--ink-soft); }
.intake-aux li { line-height: 1.7; }

.intake-form { background: var(--paper); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.intake-header { padding: 1.25rem 1.5rem; border-bottom: 2px solid var(--ink); display: flex; justify-content: space-between; align-items: center; }
.intake-header h3 { font-family: 'IBM Plex Mono', monospace; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; }
.intake-header .form-num { font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; color: var(--ink-muted); }
.intake-body { padding: 2rem 1.5rem; }
.form-field { margin-bottom: 1.5rem; }
.form-field label { display: block; font-family: 'IBM Plex Mono', monospace; font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); margin-bottom: 0.5rem; }
.upload-zone { border: 2px dashed var(--rule); padding: 2.5rem 1.5rem; text-align: center; cursor: pointer; transition: all 0.25s ease; background: var(--clinical-white); position: relative; }
.upload-zone:hover { border-color: var(--ink); background: var(--stamp-red-light); }
.upload-zone.has-file { border-color: var(--clinical-green); background: var(--clinical-green-light); border-style: solid; }
.upload-zone.has-file .uz-icon { display: none; }
.upload-zone .uz-icon { font-size: 2rem; margin-bottom: 0.75rem; display: block; }
.upload-zone .uz-text { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.25rem; }
.upload-zone .uz-hint { font-family: 'IBM Plex Mono', monospace; font-size: 0.65rem; color: var(--ink-muted); letter-spacing: 0.02em; }
.upload-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-zone .uz-preview { display: block; width: 100%; max-height: 260px; object-fit: cover; margin-bottom: 0.9rem; border: 1.5px solid var(--ink); }
.upload-zone .uz-preview + .uz-text { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--clinical-green); }
.uz-change { display: inline-block; margin-top: 0.35rem; font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; color: var(--stamp-red); text-transform: uppercase; letter-spacing: 0.1em; cursor: pointer; text-decoration: underline; pointer-events: none; }
.form-input { width: 100%; padding: 0.75rem 1rem; border: 1.5px solid var(--rule); font-family: 'Public Sans', sans-serif; font-size: 0.92rem; color: var(--ink); background: var(--clinical-white); transition: border-color 0.2s; }
.form-input:focus { outline: none; border-color: var(--ink); }
.form-input::placeholder { color: var(--ink-muted); }
.checkbox-row { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.88rem; color: var(--ink-soft); line-height: 1.5; cursor: pointer; }
.checkbox-row input { margin-top: 0.25rem; accent-color: var(--stamp-red); }
.intake-footer { padding: 1.25rem 1.5rem; border-top: 2px solid var(--ink); display: flex; justify-content: space-between; align-items: center; }
.intake-footer .fine-print { font-family: 'IBM Plex Mono', monospace; font-size: 0.55rem; color: var(--ink-muted); max-width: 240px; line-height: 1.5; }
.submit-btn { font-family: 'IBM Plex Mono', monospace; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; padding: 0.8rem 1.5rem; background: var(--stamp-red); color: var(--paper); border: 2px solid var(--stamp-red); cursor: pointer; transition: all 0.2s; }
.submit-btn:hover { background: var(--ink); border-color: var(--ink); }
.submit-btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ── STATS — dominant + three smaller ───────────────────────────── */
.stats-bar { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; border-bottom: 2px solid var(--ink); }
.stat { padding: 1.25rem 1rem; text-align: center; border-right: 2px solid var(--ink); }
.stat:last-child { border-right: none; }
.stat-dominant { padding: 2rem 1.25rem; background: var(--manila); }
.stat-num { font-family: 'Libre Baskerville', Georgia, serif; font-size: clamp(1.6rem, 2.5vw, 2rem); font-weight: 700; color: var(--stamp-red); line-height: 1; margin-bottom: 0.3rem; }
.stat-dominant .stat-num { font-size: clamp(2.4rem, 4vw, 3.6rem); }
.stat-label { font-family: 'IBM Plex Mono', monospace; font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-muted); }
.stat-dominant .stat-label { font-size: 0.68rem; font-weight: 600; color: var(--ink-soft); }

/* ── FOOTER ─────────────────────────────────────────────────────── */
footer { padding: 2.5rem 2rem; background: var(--ink); color: var(--manila); text-align: center; position: relative; }
footer .f-seal { display: block; margin: 0 auto 1.25rem; filter: invert(0.94) hue-rotate(-10deg); opacity: 0.92; }
footer .f-logo { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 1rem; }
footer p { font-size: 0.82rem; color: var(--manila-dark); line-height: 1.6; max-width: 500px; margin: 0 auto; }
footer .foot-disclaimer { font-family: 'IBM Plex Mono', monospace; font-size: 0.55rem; color: rgba(240,230,200,0.4); margin-top: 1.5rem; letter-spacing: 0.03em; }

/* ── CASE PAGE ──────────────────────────────────────────────────── */
.case-wrap { max-width: 1120px; margin: 0 auto; padding: 3.5rem 2rem 5rem; }
.case-header { display: flex; justify-content: space-between; align-items: flex-end; padding-bottom: 1.5rem; border-bottom: 2px solid var(--ink); margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.case-header-left { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-muted); }
.case-header-left .case-id { display: block; font-size: 1.4rem; color: var(--stamp-red); font-weight: 600; margin-top: 0.3rem; letter-spacing: 0.08em; }
.case-status-badge { font-family: 'IBM Plex Mono', monospace; font-size: 0.65rem; font-weight: 600; padding: 0.4em 0.8em; border: 1.5px solid var(--ink); text-transform: uppercase; letter-spacing: 0.1em; }
.case-status-badge.diagnosed { background: var(--ink); color: var(--paper); }
.case-status-badge.pending { background: var(--manila); color: var(--ink-soft); }

.case-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.5rem; align-items: start; }
.case-media { display: flex; flex-direction: column; gap: 1.5rem; }
.case-photo { width: 100%; max-height: 540px; object-fit: cover; border: 2px solid var(--ink); background: var(--ink); display: block; }

.diag-card { border: 2px solid var(--ink); background: var(--paper); box-shadow: 6px 6px 0 var(--ink); }
.diag-card-header { padding: 1rem 1.5rem; border-bottom: 2px solid var(--ink); background: var(--manila); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.diag-card-header h2 { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-soft); }
.severity-tag { font-family: 'IBM Plex Mono', monospace; font-size: 0.65rem; font-weight: 700; padding: 0.4em 0.8em; border: 2px solid var(--stamp-red); color: var(--stamp-red); text-transform: uppercase; letter-spacing: 0.1em; }
.diag-card-body { padding: 1.75rem 1.5rem; }
.severity-name { font-family: 'Libre Baskerville', Georgia, serif; font-size: clamp(1.5rem, 2.8vw, 2rem); margin-bottom: 1rem; line-height: 1.15; }
.condition-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0; }
.condition-pill { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; padding: 0.45em 0.8em; border: 1.5px solid var(--ink); background: var(--paper); text-decoration: none; color: var(--ink); }
.condition-pill .code { color: var(--stamp-red); font-weight: 600; margin-right: 0.4em; }

/* Narrative — rewritten. No left-stripe. Top+bottom double rule, pull-quote. */
.narrative { position: relative; margin: 1.5rem 0; padding: 2rem 1.5rem 2rem 3rem; background: var(--clinical-white); border-top: 3px double var(--ink); border-bottom: 3px double var(--ink); font-family: 'Libre Baskerville', Georgia, serif; font-size: 1.08rem; line-height: 1.75; color: var(--ink); font-style: italic; }
.narrative::before { content: 'Dx.'; position: absolute; top: 1.55rem; left: 1.25rem; font-family: 'IBM Plex Mono', monospace; font-style: normal; font-size: 0.78rem; font-weight: 700; color: var(--stamp-red); letter-spacing: 0.08em; }

.prognosis-line { font-family: 'IBM Plex Mono', monospace; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-soft); }
.prognosis-line strong { color: var(--stamp-red); margin-left: 0.5em; }

.intervention-card { background: var(--manila); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); position: relative; }
.intervention-card::before { content: 'FORM LC-02'; position: absolute; top: -0.6rem; right: 1rem; font-family: 'IBM Plex Mono', monospace; font-size: 0.55rem; font-weight: 700; background: var(--ink); color: var(--manila); padding: 0.25em 0.6em; letter-spacing: 0.12em; }
.intervention-card-header { padding: 1rem 1.5rem; border-bottom: 2px solid var(--ink); display: flex; justify-content: space-between; align-items: center; }
.intervention-card-header h3 { font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-soft); }
.intervention-card-header .confidential { font-family: 'IBM Plex Mono', monospace; font-size: 0.58rem; color: var(--stamp-red); text-transform: uppercase; letter-spacing: 0.12em; border: 1.5px solid var(--stamp-red); padding: 0.2em 0.5em; }
.intervention-body { padding: 1.75rem; font-family: 'Libre Baskerville', Georgia, serif; font-size: 1rem; line-height: 1.8; white-space: pre-wrap; color: var(--ink); }
.intervention-body em.sig { display: block; margin-top: 1.5rem; font-size: 0.85rem; color: var(--ink-soft); }

.vote-widget { margin-top: 2rem; padding: 1.5rem; border: 1.5px solid var(--rule); background: var(--clinical-white); }
.vote-widget h3 { font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 0.5rem; color: var(--ink-soft); }
.vote-prompt { font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 1rem; }
.vote-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.vote-btn { flex: 1; min-width: 60px; padding: 0.85rem 0.5rem; font-family: 'IBM Plex Mono', monospace; font-weight: 600; font-size: 0.95rem; border: 1.5px solid var(--ink); background: var(--paper); cursor: pointer; transition: all 0.2s; text-align: center; }
.vote-btn:hover { background: var(--ink); color: var(--paper); }
.vote-btn.voted { background: var(--stamp-red); color: var(--paper); border-color: var(--stamp-red); }
.vote-status { margin-top: 0.85rem; font-family: 'IBM Plex Mono', monospace; font-size: 0.65rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.08em; }

.share-row { margin-top: 1.5rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }

.cta-banner { margin-top: 3rem; padding: 2rem; border: 2px solid var(--ink); text-align: center; background: var(--manila); }
.cta-banner h3 { font-family: 'Libre Baskerville', Georgia, serif; font-size: 1.4rem; margin-bottom: 0.5rem; }
.cta-banner p { color: var(--ink-soft); margin-bottom: 1.5rem; }

/* Pending state — bureaucratic loading narrative */
.pending-state { padding: 3rem 2rem; text-align: left; border: 2px solid var(--ink); background: var(--paper); margin-top: 0; box-shadow: 6px 6px 0 var(--ink); position: relative; }
.pending-state::before { content: 'UNDER REVIEW'; position: absolute; top: -0.6rem; left: 1.5rem; font-family: 'IBM Plex Mono', monospace; font-size: 0.58rem; font-weight: 700; background: var(--stamp-red); color: var(--paper); padding: 0.25em 0.6em; letter-spacing: 0.12em; }
.pending-state h2 { font-family: 'Libre Baskerville', Georgia, serif; font-size: 1.6rem; margin-bottom: 0.75rem; line-height: 1.2; }
.pending-state > p { color: var(--ink-soft); max-width: 480px; margin: 0 0 1.5rem; line-height: 1.7; font-size: 0.95rem; }
.process-log { margin-top: 1.5rem; padding: 1rem 1.25rem; border: 1px dashed var(--ink-soft); background: var(--clinical-white); font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; line-height: 1.9; color: var(--ink-soft); }
.process-log li { list-style: none; display: flex; align-items: baseline; gap: 0.6rem; opacity: 0.35; transition: opacity 0.4s; }
.process-log li.active { opacity: 1; color: var(--ink); }
.process-log li.done { opacity: 0.55; }
.process-log li::before { content: '○'; color: var(--ink-muted); font-size: 0.65em; }
.process-log li.active::before { content: '●'; color: var(--stamp-red); animation: pulse 1.4s ease-in-out infinite; }
.process-log li.done::before { content: '✓'; color: var(--clinical-green); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ── BROWSE ─────────────────────────────────────────────────────── */
.browse-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; padding: 0 2rem; }
.browse-card { background: var(--paper); border: 1.5px solid var(--rule); transition: all 0.2s; text-decoration: none; color: inherit; display: block; }
.browse-card:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: 4px 4px 0 var(--ink); }
.browse-card-img { width: 100%; aspect-ratio: 1.5; object-fit: cover; background: var(--ink); display: block; border-bottom: 1.5px solid var(--rule); }
.browse-card-body { padding: 1rem 1.25rem; }
.browse-card-meta { font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-muted); display: flex; justify-content: space-between; margin-bottom: 0.4rem; }
.browse-card-title { font-family: 'Libre Baskerville', Georgia, serif; font-size: 1rem; line-height: 1.3; margin-bottom: 0.3rem; }
.browse-card-snippet { font-size: 0.82rem; color: var(--ink-soft); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.filter-bar { max-width: 1200px; margin: 0 auto 2rem; padding: 0 2rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.filter-chip { font-family: 'IBM Plex Mono', monospace; font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; padding: 0.5rem 0.9rem; border: 1.5px solid var(--rule); background: var(--paper); color: var(--ink-soft); text-decoration: none; transition: all 0.2s; }
.filter-chip:hover, .filter-chip.active { border-color: var(--ink); background: var(--ink); color: var(--paper); }

/* ── ADMIN ──────────────────────────────────────────────────────── */
.admin-wrap { max-width: 1100px; margin: 0 auto; padding: 3rem 2rem; }
.admin-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 1rem; border-bottom: 2px solid var(--ink); margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.admin-header h1 { font-family: 'IBM Plex Mono', monospace; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.12em; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }
.admin-card { background: var(--paper); border: 1.5px solid var(--ink); display: flex; flex-direction: column; }
.admin-card img { width: 100%; aspect-ratio: 1.4; object-fit: cover; border-bottom: 1.5px solid var(--ink); background: var(--ink); }
.admin-card-body { padding: 1rem 1.25rem; flex: 1; }
.admin-card-meta { font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-muted); margin-bottom: 0.5rem; }
.admin-card-meta strong { color: var(--stamp-red); }
.admin-card-body p { font-size: 0.85rem; color: var(--ink-soft); line-height: 1.5; }
.admin-actions { display: flex; gap: 0.5rem; padding: 0.75rem; border-top: 1.5px solid var(--rule); }
.admin-actions form { flex: 1; }
.admin-actions button { width: 100%; font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; padding: 0.6rem 0.5rem; border: 1.5px solid var(--ink); cursor: pointer; transition: all 0.2s; }
.admin-actions .approve-btn { background: var(--clinical-green); color: var(--paper); border-color: var(--clinical-green); }
.admin-actions .approve-btn:hover { background: var(--ink); border-color: var(--ink); }
.admin-actions .reject-btn { background: var(--paper); color: var(--ink); }
.admin-actions .reject-btn:hover { background: var(--stamp-red); color: var(--paper); border-color: var(--stamp-red); }

.login-form { max-width: 360px; margin: 6rem auto; padding: 2rem; border: 2px solid var(--ink); background: var(--paper); box-shadow: 6px 6px 0 var(--ink); }
.login-form h1 { font-family: 'IBM Plex Mono', monospace; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 1.5rem; }

.flash { max-width: 720px; margin: 1rem auto; padding: 0.85rem 1.25rem; font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; border: 1.5px solid; }
.flash.success { color: var(--clinical-green); border-color: var(--clinical-green); background: var(--clinical-green-light); }
.flash.error { color: var(--stamp-red); border-color: var(--stamp-red); background: var(--stamp-red-light); }
.flash.warning { color: var(--warning-amber); border-color: var(--warning-amber); background: rgba(212,137,12,0.08); }

/* Install banner */
.install-banner { display: none; position: fixed; left: 1rem; right: 1rem; bottom: 1rem; max-width: 480px; margin: 0 auto; padding: 1rem 1.25rem; background: var(--ink); color: var(--manila); border: 2px solid var(--stamp-red); z-index: 150; align-items: center; gap: 1rem; box-shadow: 4px 4px 0 var(--stamp-red); }
.install-banner[data-visible="true"] { display: flex; }
.install-banner p { flex: 1; font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; line-height: 1.5; }
.install-banner button { font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem; padding: 0.45rem 0.75rem; cursor: pointer; text-transform: uppercase; letter-spacing: 0.1em; border: 1.5px solid var(--manila); background: var(--manila); color: var(--ink); font-weight: 600; }
.install-banner .install-dismiss { background: transparent; color: var(--manila); border-color: var(--manila-dark); }

/* ── ANIMATIONS ─────────────────────────────────────────────────── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes stampIn { from { opacity: 0; transform: rotate(8deg) scale(1.8); } to { opacity: 0.82; transform: rotate(8deg) scale(1); } }

/* Respect user preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── MOBILE ─────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .case-grid { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: 2fr 1fr 1fr; }
  .stats-bar .stat:nth-child(4) { display: none; }
}

@media (max-width: 640px) {
  .status-bar { font-size: 0.58rem; padding: 0.3rem 1rem; gap: 0.5rem; }
  .status-bar .status-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

@media (max-width: 768px) {
  .top-nav { display: none; }
  .drawer-btn { display: inline-flex; }
  .process-grid { grid-template-columns: 1fr; }
  .process-step:not(:last-child) { border-right: none; border-bottom: 2px solid var(--ink); }
  .share-layout { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .stats-bar .stat-dominant { grid-column: 1 / -1; border-right: none; border-bottom: 2px solid var(--ink); }
  .stats-bar .stat:nth-child(2) { border-right: 2px solid var(--ink); }
  .stats-bar .stat:nth-child(3) { border-right: none; }
  .stats-bar .stat:nth-child(4) { display: none; }
  .diag-entry { grid-template-columns: 50px 1fr; }
  .diag-badge { grid-column: 2; margin-top: 0.5rem; justify-self: start; }
  .section { padding: 3.5rem 1.25rem; }
  .section-loose { padding: 4.5rem 1.25rem; }
  .intake-footer { flex-direction: column; gap: 1rem; }
  .intake-footer .fine-print { max-width: 100%; text-align: center; }
  .cta-row { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 300px; justify-content: center; }
  .btn-stamp::after { display: none; }
  .case-wrap { padding: 2.5rem 1.25rem; }
  .file-card.file-card-special { transform: rotate(0); }
  .file-card.file-card-special:hover { transform: translateY(-3px); }
  .file-card.file-card-special::before { right: 0.75rem; top: 0.75rem; }
}

@media (max-width: 480px) {
  .stamp::after { display: none; }
  .btn-stamp::after { display: none; }
}
