:root {
  color-scheme: light;

  /* Palette */
  --parchment: #e8ddc6;
  --aged-paper: #d7c7a7;
  --ink: #1b1b1b;
  --ink-2: #2a2a2a;
  --near-black: #0b0d10;
  --steel: #2b3440;

  --brass: #b08d57;
  --rust: #8b3a2e;
  --olive: #556b2f;

  --teal: #22e6c7;
  --magenta: #ff3dae;
  --purple: #7c3aed;

  /* Typography */
  --font-sans: "Source Sans 3", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --font-heading: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;

  /* Layout */
  --max-width: 1400px;
  --gutter: clamp(16px, 6vw, 72px);
  --content: min(var(--max-width), calc(100% - (var(--gutter) * 2)));
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;

  /* Surfaces */
  --bg: var(--parchment);
  --bg-2: rgba(232, 221, 198, 0.65);
  --card: rgba(232, 221, 198, 0.78);
  --card-2: rgba(255, 255, 255, 0.55);
  --line: rgba(27, 27, 27, 0.14);
  --line-strong: rgba(27, 27, 27, 0.22);
  --muted: rgba(27, 27, 27, 0.72);

  /* Accents */
  --accent: var(--rust);
  --accent-2: var(--brass);

  /* Shadows */
  --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.08);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.14);

  /* Motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* Accessibility */
  --focus: 0 0 0 4px rgba(176, 141, 87, 0.22);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: radial-gradient(circle at top, rgba(176, 141, 87, 0.08), transparent 45%);
}

/* Selection */
::selection {
  background: rgba(176, 141, 87, 0.35);
}

/* Safe media defaults */
img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

p {
  margin: 0 0 1rem;
}

h1, h2, h3, h4 {
  margin: 0 0 0.75rem;
  line-height: 1.15;
}

h1, h2 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

h3, h4 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

small, .mini {
  font-size: 0.95rem;
  color: var(--muted);
}

/* Utility: screen-reader only */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Utility container (used by departments page) */
.container {
  width: var(--content);
  margin: 0 auto;
}

/* Main stacking context above grain */
main {
  position: relative;
  z-index: 2;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

@keyframes fade-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float-stamp {
  0%,
  100% {
    transform: rotate(-2deg) translateY(0);
  }
  50% {
    transform: rotate(-2deg) translateY(-4px);
  }
}

@keyframes pulse-outline {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.75;
  }
}

/* -----------------------------
   1) Mode system (Briefing / Dispatch)
------------------------------ */

body.mode-briefing {
  background: var(--parchment);
  color: var(--ink);
}

body.mode-dispatch {
  color-scheme: dark;
  background: linear-gradient(160deg, #0b0d10 0%, #1a1f2a 40%, #120c1f 100%);
  color: #f4efe4;

  --bg: #0b0d10;
  --bg-2: rgba(11, 13, 16, 0.72);
  --card: rgba(11, 13, 16, 0.80);
  --card-2: rgba(11, 13, 16, 0.64);

  --line: rgba(34, 230, 199, 0.22);
  --line-strong: rgba(34, 230, 199, 0.36);
  --muted: rgba(244, 239, 228, 0.78);

  --accent: var(--teal);
  --accent-2: var(--magenta);

  --shadow-soft: 0 14px 34px rgba(0, 0, 0, 0.35);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}

/* Links in dispatch should read as "signal" */
body.mode-dispatch a {
  color: var(--teal);
}

body.mode-dispatch a:hover {
  color: var(--magenta);
}

/* -----------------------------
   2) Grain overlay
------------------------------ */

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.28;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cg fill='%23000000' fill-opacity='0.08'%3E%3Ccircle cx='8' cy='8' r='1'/%3E%3Ccircle cx='44' cy='60' r='1'/%3E%3Ccircle cx='80' cy='20' r='1'/%3E%3Ccircle cx='100' cy='88' r='1'/%3E%3Ccircle cx='20' cy='120' r='1'/%3E%3Ccircle cx='120' cy='44' r='1'/%3E%3C/g%3E%3C/svg%3E");
}

body.mode-dispatch .grain {
  opacity: 0.14;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cg fill='%23FFFFFF' fill-opacity='0.08'%3E%3Ccircle cx='8' cy='8' r='1'/%3E%3Ccircle cx='44' cy='60' r='1'/%3E%3Ccircle cx='80' cy='20' r='1'/%3E%3Ccircle cx='100' cy='88' r='1'/%3E%3Ccircle cx='20' cy='120' r='1'/%3E%3Ccircle cx='120' cy='44' r='1'/%3E%3C/g%3E%3C/svg%3E");
}

/* -----------------------------
   3) Header / Nav (site-wide)
------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;

  background: rgba(232, 221, 198, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);

  padding: 18px var(--gutter);
  display: grid;
  gap: 16px 24px;
  grid-template-columns: minmax(240px, 1.1fr) minmax(0, 1.6fr) auto;
  align-items: center;
}

body.mode-dispatch .site-header {
  background: rgba(11, 13, 16, 0.84);
  border-bottom-color: rgba(34, 230, 199, 0.22);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

.site-header .container {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  max-width: 520px;
}

.seal {
  width: 62px;
  height: 62px;
  border-radius: 999px;
  border: 2px solid currentColor;
  display: grid;
  place-items: center;

  font-family: var(--font-mono);
  letter-spacing: 0.15em;
  text-transform: uppercase;

  background: radial-gradient(circle, rgba(176, 141, 87, 0.20), transparent 70%);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.16);
}

body.mode-dispatch .seal {
  border-color: rgba(34, 230, 199, 0.65);
  background: radial-gradient(circle, rgba(124, 58, 237, 0.34), transparent 70%);
  box-shadow: 0 0 20px rgba(34, 230, 199, 0.22);
}

.brand h1,
.brand-mark {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: clamp(1.5rem, 2.4vw, 2.25rem);
  margin: 0;
}

.brand-sub {
  display: block;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
}

.brand-eyebrow,
.tagline {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.74rem;
  color: var(--muted);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  justify-content: center;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  justify-self: center;
}

.site-nav a {
  text-decoration: none;
  padding: 6px 2px;
  position: relative;
  color: inherit;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms var(--ease);
}

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  justify-self: end;
}

/* Mode toggle buttons (header) */
.mode-toggle {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: inherit;

  padding: 8px 10px;
  border-radius: 999px;

  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;

  cursor: pointer;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms var(--ease), border-color 180ms var(--ease);
}

.mode-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(176, 141, 87, 0.55);
  box-shadow: var(--shadow-soft);
}

.mode-toggle.active {
  background: rgba(27, 27, 27, 0.08);
}

body.mode-dispatch .mode-toggle {
  border-color: rgba(34, 230, 199, 0.40);
}

body.mode-dispatch .mode-toggle.active {
  background: rgba(34, 230, 199, 0.16);
  box-shadow: 0 0 20px rgba(34, 230, 199, 0.18);
}

/* Header mobile layout */
@media (max-width: 900px) {
  .site-header {
    position: relative;
    grid-template-columns: 1fr;
    text-align: center;
  }

  .site-header .container {
    flex-wrap: wrap;
    justify-content: center;
  }

  .header-actions {
    justify-content: center;
    width: 100%;
  }

  .site-nav {
    justify-self: stretch;
  }
}

@media (max-width: 640px) {
  .site-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
}

/* -----------------------------
   4) Buttons / CTAs (unified)
------------------------------ */

/* Support all variants used across pages:
   a.btn.primary / a.btn.secondary
   a.primary / a.secondary
   button.btn.primary / button.primary etc.
*/
.btn,
a.primary,
a.secondary,
button.btn,
button.primary,
button.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: 0.9rem 1.2rem;
  border-radius: 999px;

  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.45);
  color: inherit;

  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  line-height: 1;

  cursor: pointer;
  text-decoration: none;

  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms var(--ease), border-color 180ms var(--ease);
}

.btn:hover,
a.primary:hover,
a.secondary:hover,
button.btn:hover,
button.primary:hover,
button.secondary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
  border-color: rgba(176, 141, 87, 0.55);
}

.btn:active,
a.primary:active,
a.secondary:active,
button.btn:active,
button.primary:active,
button.secondary:active {
  transform: translateY(0);
}

.btn.primary,
a.primary,
button.primary {
  background: linear-gradient(180deg, rgba(176, 141, 87, 0.26), rgba(176, 141, 87, 0.14));
  border-color: rgba(176, 141, 87, 0.55);
}

.btn.secondary,
a.secondary,
button.secondary {
  background: rgba(255, 255, 255, 0.35);
}

body.mode-dispatch .btn,
body.mode-dispatch a.primary,
body.mode-dispatch a.secondary,
body.mode-dispatch button.btn,
body.mode-dispatch button.primary,
body.mode-dispatch button.secondary {
  background: rgba(11, 13, 16, 0.65);
  border-color: rgba(34, 230, 199, 0.30);
}

body.mode-dispatch .btn.primary,
body.mode-dispatch a.primary,
body.mode-dispatch button.primary {
  background: linear-gradient(120deg, rgba(34, 230, 199, 0.18), rgba(124, 58, 237, 0.22));
  border-color: rgba(34, 230, 199, 0.55);
}

body.mode-dispatch .btn:hover,
body.mode-dispatch a.primary:hover,
body.mode-dispatch a.secondary:hover,
body.mode-dispatch button.primary:hover,
body.mode-dispatch button.secondary:hover {
  border-color: rgba(255, 61, 174, 0.55);
}

.arrow {
  display: inline-block;
  transform: translateY(-0.5px);
}

/* Focus states */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-color: rgba(176, 141, 87, 0.75) !important;
}

body.mode-dispatch a:focus-visible,
body.mode-dispatch button:focus-visible,
body.mode-dispatch input:focus-visible,
body.mode-dispatch select:focus-visible,
body.mode-dispatch textarea:focus-visible {
  box-shadow: 0 0 0 4px rgba(34, 230, 199, 0.22);
  border-color: rgba(34, 230, 199, 0.8) !important;
}

/* -----------------------------
   5) Hero (site-wide pattern)
------------------------------ */

.hero {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow-x: hidden;

  padding: clamp(48px, 7vw, 88px) var(--gutter) clamp(44px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(215, 199, 167, 0.58), rgba(232, 221, 198, 0.40));

  display: grid;
  gap: 32px;
  grid-template-columns: repeat(12, 1fr);
  align-items: start;
}

body.mode-dispatch .hero {
  background: radial-gradient(circle at top, rgba(255, 61, 174, 0.16), transparent 55%);
  border-bottom-color: rgba(34, 230, 199, 0.16);
}

.hero-content {
  grid-column: span 12;
  max-width: 100%;
  position: relative;
  padding: clamp(20px, 3vw, 32px);
  background: var(--card-2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  animation: fade-rise 600ms var(--ease) both;
}

.hero-content::after {
  content: "";
  position: absolute;
  inset: -12px;
  border: 1px dashed rgba(27, 27, 27, 0.12);
  border-radius: var(--radius);
  pointer-events: none;
  animation: pulse-outline 5s ease-in-out infinite;
}

body.mode-dispatch .hero-content::after {
  border-color: rgba(34, 230, 199, 0.20);
}

.hero-content h2 {
  font-size: clamp(2rem, 3.2vw, 3.15rem);
  margin-top: 14px;
}

.hero-content p {
  font-size: 1.06rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.hero-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0.42rem 0.85rem;
  border: 2px solid var(--accent);
  border-radius: 999px;

  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.30em;
  font-size: 0.66rem;

  color: var(--accent);
  background: rgba(232, 221, 198, 0.60);
  transform: rotate(-2deg);
  animation: float-stamp 6s ease-in-out infinite;
}

body.mode-dispatch .stamp {
  background: rgba(11, 13, 16, 0.80);
  border-color: rgba(34, 230, 199, 0.62);
  color: var(--teal);
}

.mini {
  margin-top: 10px;
  font-family: var(--font-sans);
  color: var(--muted);
}

/* Hero responsive */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-content {
    grid-column: 1 / -1;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* -----------------------------
   6) Signal grid (hero feature cards)
------------------------------ */

.signal-grid {
  margin-top: 22px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  position: relative;
}

.signal-grid::before,
.signal-grid::after {
  content: "";
  position: absolute;
  inset: -14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  pointer-events: none;
}

.signal-grid::after {
  inset: -20px;
  border-style: dashed;
  opacity: 0.45;
}

.signal-card {
  position: relative;
  padding: 18px 18px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.05);
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
  animation: fade-rise 600ms var(--ease) both;
}

.signal-card::before {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(176, 141, 87, 0.55), transparent 70%);
}

.signal-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.signal-card p {
  margin: 0;
  color: var(--muted);
}

.signal-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(176, 141, 87, 0.45);
}

body.mode-dispatch .signal-grid::before,
body.mode-dispatch .signal-grid::after {
  border-color: rgba(34, 230, 199, 0.18);
}

body.mode-dispatch .signal-card {
  background: rgba(11, 13, 16, 0.82);
  border-color: rgba(34, 230, 199, 0.22);
}

body.mode-dispatch .signal-card::before {
  background: radial-gradient(circle, rgba(255, 61, 174, 0.24), transparent 70%);
}

body.mode-dispatch .signal-card:hover {
  border-color: rgba(34, 230, 199, 0.48);
  box-shadow: 0 0 30px rgba(34, 230, 199, 0.16);
}

body.mode-dispatch .signal-card h3 {
  color: var(--teal);
}

/* -----------------------------
   7) Section headings + page sections
------------------------------ */

.section-head {
  width: min(720px, 100%);
  margin-bottom: 24px;
  position: relative;
}

.section-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -12px;
  width: 140px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.55;
}

.section-head .eyebrow,
.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.36em;
  font-size: 0.74rem;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-head h2 {
  font-size: clamp(2rem, 3vw, 2.8rem);
}

.section-head p {
  margin-top: 10px;
  color: var(--muted);
}

/* Generic section padding used across index */
.mission,
.casefiles,
.methods,
.dispatch {
  padding: clamp(56px, 6vw, 80px) var(--gutter);
}

/* Generic .section used by evidence-intake page */
.section {
  padding: clamp(56px, 6vw, 80px) var(--gutter);
}

/* .section-header used by evidence-intake page */
.section-header {
  width: min(820px, 100%);
  margin: 0 auto 22px;
}

.section-header h2 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: clamp(1.7rem, 2.4vw, 2.25rem);
  margin: 0 0 10px;
}

.section-header .subhead {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.section-header::after {
  content: "";
  display: block;
  width: 140px;
  height: 2px;
  margin-top: 14px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.55;
}

/* -----------------------------
   7.5) Department + shared grid patterns
------------------------------ */

.section-head.compact {
  margin-bottom: 16px;
}

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.card {
  grid-column: span 6;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
  animation: fade-rise 640ms var(--ease) both;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, rgba(176, 141, 87, 0.12), transparent);
  opacity: 0.7;
  pointer-events: none;
}

.card > * {
  position: relative;
  z-index: 1;
}

.dept-hero {
  padding: clamp(70px, 10vw, 110px) 0 32px;
}

.dept-hero h1 {
  font-size: clamp(2.4rem, 4vw, 3.4rem);
}

.dept-hero .lead {
  max-width: 820px;
  font-size: 1.05rem;
  color: var(--muted);
}

.dept-hero-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.dept-operating-model {
  padding: 32px 0 12px;
}

.dept-flow {
  display: grid;
  gap: 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: var(--bg-2);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.03);
}

.dept-flow-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.dept-flow-row.subtle {
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card-2);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.arrow,
.dot,
.plus {
  font-family: var(--font-mono);
  color: var(--accent);
  opacity: 0.75;
}

.dept-notes {
  margin-top: 24px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.dept-notes .note {
  grid-column: span 4;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-2);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.03);
}

.dept-directory {
  padding: clamp(48px, 6vw, 70px) 0 clamp(56px, 7vw, 90px);
}

.dept-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  margin-top: 24px;
}

.dept-card {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--card);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 240ms var(--ease), box-shadow 240ms var(--ease), border-color 240ms var(--ease);
  animation: fade-rise 640ms var(--ease) both;
}

.dept-card:hover {
  transform: translateY(-4px);
  border-color: rgba(176, 141, 87, 0.55);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
}

.dept-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.dept-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms var(--ease);
}

.dept-card:hover .dept-media img {
  transform: scale(1.04);
}

.dept-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(11, 13, 16, 0.1), rgba(11, 13, 16, 0.55));
  opacity: 0.9;
}

.dept-tag {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-2);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.03);
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.dept-status {
  color: rgba(244, 239, 228, 0.78);
  font-size: 0.65rem;
}

.dept-body {
  padding: 18px 18px 20px;
  display: grid;
  gap: 10px;
}

.dept-body p {
  color: var(--muted);
}

.dept-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-chip {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.03);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dept-footnote {
  margin-top: 26px;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  background: rgba(255, 255, 255, 0.5);
  border-radius: var(--radius);
  color: var(--muted);
}

/* Departments hub should align with other home sections */
.departments-hub{
  padding: clamp(56px, 6vw, 80px) var(--gutter);
}
.departments-hub{
  background: rgba(215, 199, 167, 0.22);
}
body.mode-dispatch .departments-hub{
  background: rgba(11, 13, 16, 0.55);
}

@media (max-width: 1080px) {
  .dept-card {
    grid-column: span 6;
  }

  .dept-notes .note {
    grid-column: span 6;
  }
}

@media (max-width: 780px) {
  .dept-card,
  .dept-notes .note,
  .card {
    grid-column: span 12;
  }
}

/* -----------------------------
   8) Card grids used across site
------------------------------ */

/* Architecture / generic articles */
.architecture-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(12, 1fr);
}

.architecture-grid article {
  grid-column: span 4;

  position: relative;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  animation: fade-rise 640ms var(--ease) both;
}

.architecture-grid article::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(27, 27, 27, 0.10);
  transform: rotate(-0.35deg);
  pointer-events: none;
}

.architecture-grid article::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, rgba(176, 141, 87, 0.16), transparent);
  opacity: 0.75;
  pointer-events: none;
}

.architecture-grid article h3 {
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.architecture-grid article p,
.architecture-grid article span,
.architecture-grid article li {
  position: relative;
  z-index: 1;
  color: var(--muted);
}

/* Case files grid */
.casefile-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(12, 1fr);
}

.casefile-card {
  grid-column: span 4;

  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--card);

  position: relative;
  overflow: hidden;
  transition: transform 220ms var(--ease), border-color 220ms var(--ease), box-shadow 220ms var(--ease);
  animation: fade-rise 640ms var(--ease) both;
}

.casefile-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(176, 141, 87, 0.14), transparent);
  opacity: 0.65;
  pointer-events: none;
}

.casefile-card h3 {
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.casefile-card .meta {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.casefile-card ul {
  margin: 14px 0 18px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.casefile-card ul li {
  position: relative;
  padding-left: 1.35rem;
  color: var(--muted);
}

.casefile-card ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.casefile-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(176, 141, 87, 0.45);
}

/* Dispatch grid */
.dispatch-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(12, 1fr);
}

.dispatch-grid article {
  grid-column: span 4;

  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--card);

  position: relative;
  overflow: hidden;
  transition: transform 220ms var(--ease), border-color 220ms var(--ease), box-shadow 220ms var(--ease);
  animation: fade-rise 640ms var(--ease) both;
}

.dispatch-grid article::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(27, 27, 27, 0.10);
  transform: rotate(0.25deg);
  pointer-events: none;
}

.dispatch-grid article::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, rgba(139, 58, 46, 0.14), transparent);
  opacity: 0.75;
  pointer-events: none;
}

.dispatch-grid h3 {
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.dispatch-grid p,
.dispatch-grid span {
  position: relative;
  z-index: 1;
  color: var(--muted);
}

.dispatch-grid article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(176, 141, 87, 0.45);
}

/* Label chips */
.label {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  margin-top: 12px;
  padding: 0.34rem 0.64rem;
  border-radius: 999px;

  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;

  border: 1px solid rgba(27, 27, 27, 0.50);
  background: rgba(232, 221, 198, 0.55);
}

/* Responsive grids */
@media (max-width: 980px) {
  .architecture-grid article,
  .casefile-card,
  .dispatch-grid article {
    grid-column: span 6;
  }
}

@media (max-width: 640px) {
  .architecture-grid,
  .casefile-grid,
  .dispatch-grid {
    gap: 12px;
  }

  .architecture-grid article,
  .casefile-card,
  .dispatch-grid article {
    grid-column: span 12;
  }
}

/* Dark-mode overrides for card sections */
body.mode-dispatch .architecture-grid article,
body.mode-dispatch .casefile-card,
body.mode-dispatch .dispatch-grid article {
  background: rgba(11, 13, 16, 0.82);
  border-color: rgba(34, 230, 199, 0.22);
}

body.mode-dispatch .architecture-grid article::after {
  background: linear-gradient(120deg, rgba(34, 230, 199, 0.16), transparent);
}

body.mode-dispatch .casefile-card::after {
  background: linear-gradient(120deg, rgba(34, 230, 199, 0.16), transparent);
}

body.mode-dispatch .dispatch-grid article::after {
  background: linear-gradient(120deg, rgba(255, 61, 174, 0.12), transparent);
}

body.mode-dispatch .architecture-grid article::before,
body.mode-dispatch .dispatch-grid article::before {
  border-color: rgba(34, 230, 199, 0.14);
}

/* -----------------------------
   9) Methods columns + timeline
------------------------------ */

.methods {
  background: rgba(215, 199, 167, 0.30);
}

body.mode-dispatch .methods {
  background: rgba(11, 13, 16, 0.70);
}

.method-columns {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(12, 1fr);
  margin-bottom: 36px;
}

.method-columns div {
  grid-column: span 4;
  position: relative;
  padding: 18px 18px 16px;
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.20);
  animation: fade-rise 640ms var(--ease) both;
}

.method-columns div::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: linear-gradient(120deg, rgba(176, 141, 87, 0.14), transparent);
  z-index: -1;
}

.method-columns p {
  color: var(--muted);
  margin: 0;
}

@media (max-width: 980px) {
  .method-columns div { grid-column: span 6; }
}
@media (max-width: 640px) {
  .method-columns div { grid-column: span 12; }
}

/* Timeline */
.timeline {
  position: relative;
  padding: 10px 0 0;
  display: grid;
  gap: 22px;
}

.timeline-track {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, rgba(27, 27, 27, 0.35), transparent);
}

body.mode-dispatch .timeline-track {
  background: linear-gradient(180deg, transparent, rgba(34, 230, 199, 0.45), transparent);
}

/* Timeline nodes */
.timeline-node{
  position: relative;
  width: min(520px, 100%);
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: inset 0 0 18px rgba(0,0,0,0.05);
  overflow: hidden;
  animation: fade-rise 640ms var(--ease) both;
}

.timeline-node::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius: var(--radius);
  border: 1px dashed rgba(27,27,27,0.10);
  pointer-events:none;
}

.timeline-node::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(176,141,87,0.12), transparent);
  opacity: .75;
  pointer-events:none;
}

.timeline-node h3{
  position: relative;
  z-index: 1;
  margin-bottom: 8px;
  font-size: 1rem;
}

.timeline-node p,
.timeline-node span{
  position: relative;
  z-index: 1;
  color: var(--muted);
  margin: 0;
}

.timeline-node .meta{
  position: relative;
  z-index: 1;
  margin-top: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: .72rem;
  color: var(--muted);
}

/* Alternate left/right alignment */
.timeline-node.left{
  margin-right: auto;
  margin-left: 0;
}

.timeline-node.right{
  margin-left: auto;
  margin-right: 0;
}

/* Center dot marker */
.timeline-node .dot{
  position:absolute;
  top: 22px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: rgba(232,221,198,0.9);
  box-shadow: 0 0 0 4px rgba(176,141,87,0.18);
  z-index: 2;
}

.timeline-node.left .dot{
  right: -7px;
}

.timeline-node.right .dot{
  left: -7px;
}

/* Dark mode timeline nodes */
body.mode-dispatch .timeline-node{
  background: rgba(11,13,16,0.82);
  border-color: rgba(34,230,199,0.22);
  box-shadow: inset 0 0 22px rgba(0,0,0,0.35);
}

body.mode-dispatch .timeline-node::before{
  border-color: rgba(34,230,199,0.14);
}

body.mode-dispatch .timeline-node::after{
  background: linear-gradient(120deg, rgba(34,230,199,0.14), transparent);
}

body.mode-dispatch .timeline-node .dot{
  border-color: rgba(34,230,199,0.75);
  background: rgba(11,13,16,0.95);
  box-shadow: 0 0 0 4px rgba(34,230,199,0.18);
}

/* Timeline responsive: stack + kill midline */
@media (max-width: 780px){
  .timeline-track{ display:none; }

  .timeline-node{
    width: 100%;
  }

  .timeline-node.left,
  .timeline-node.right{
    margin-left: 0;
    margin-right: 0;
  }

  .timeline-node .dot{
    display:none;
  }
}

/* -----------------------------
   10) Evidence Intake (forms + panels)
------------------------------ */

.form-wrap{
  width: min(980px, 100%);
  margin: 0 auto;
}

.panel{
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  padding: 22px;
  position: relative;
  overflow: hidden;
  animation: fade-rise 640ms var(--ease) both;
}

.panel::before{
  content:"";
  position:absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(27,27,27,0.10);
  pointer-events:none;
}

.panel::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, rgba(176,141,87,0.12), transparent);
  opacity:.75;
  pointer-events:none;
}

.panel > *{
  position: relative;
  z-index: 1;
}

body.mode-dispatch .panel{
  background: rgba(11,13,16,0.82);
  border-color: rgba(34,230,199,0.22);
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);
}

body.mode-dispatch .panel::before{
  border-color: rgba(34,230,199,0.14);
}

body.mode-dispatch .panel::after{
  background: linear-gradient(120deg, rgba(34,230,199,0.14), transparent);
}

.intake-form{
  display:grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px 16px;
  align-items: start;
}

.form-step{
  grid-column: 1 / -1;
  margin-top: 6px;
}

.form-step .eyebrow{
  margin-bottom: 6px;
}

.form-step h3{
  margin-bottom: 6px;
}

.form-note{
  margin: 0;
  color: var(--muted);
}

.field{
  grid-column: span 6;
}

.field.full{
  grid-column: 1 / -1;
}

.field label{
  display:block;
  margin: 0 0 8px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: .72rem;
  color: var(--ink-2);
}

body.mode-dispatch .field label{
  color: rgba(244,239,228,0.82);
}

.field .hint{
  margin-top: 8px;
  font-size: .95rem;
  color: var(--muted);
}

.input,
.select,
.textarea{
  width:100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.55);
  color: inherit;
  padding: 12px 12px;
  min-height: 46px;
  outline: none;
}

.textarea{
  min-height: 150px;
  resize: vertical;
  padding-top: 12px;
}

body.mode-dispatch .input,
body.mode-dispatch .select,
body.mode-dispatch .textarea{
  background: rgba(11,13,16,0.65);
  border-color: rgba(34,230,199,0.28);
  color: rgba(244,239,228,0.92);
}

.input:focus,
.select:focus,
.textarea:focus{
  border-color: rgba(176,141,87,0.75);
  box-shadow: var(--focus);
}

body.mode-dispatch .input:focus,
body.mode-dispatch .select:focus,
body.mode-dispatch .textarea:focus{
  border-color: rgba(34,230,199,0.78);
  box-shadow: 0 0 0 4px rgba(34,230,199,0.20);
}

.actions{
  grid-column: 1 / -1;
  display:flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

@media (max-width: 860px){
  .field{ grid-column: span 12; }
}

/* -----------------------------
   11) “Work With Us” + Procurement patterns
------------------------------ */

.split{
  display:grid;
  gap: 18px;
  grid-template-columns: repeat(12, 1fr);
  align-items: start;
}

.split .left{
  grid-column: span 7;
}

.split .right{
  grid-column: span 5;
}

@media (max-width: 980px){
  .split{ grid-template-columns: 1fr; }
  .split .left, .split .right{ grid-column: 1 / -1; }
}

.callout{
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: 18px;
  position: relative;
  overflow:hidden;
  animation: fade-rise 640ms var(--ease) both;
}

.callout::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(120deg, rgba(139,58,46,0.10), transparent);
  opacity:.8;
  pointer-events:none;
}

body.mode-dispatch .callout{
  background: rgba(11,13,16,0.75);
  border-color: rgba(34,230,199,0.22);
}

body.mode-dispatch .callout::after{
  background: linear-gradient(120deg, rgba(255,61,174,0.10), transparent);
}

/* List styling: keep “no bullets” aesthetic but readable */
.clean-list{
  list-style:none;
  padding: 0;
  margin: 14px 0 0;
  display:grid;
  gap: 10px;
}

.clean-list li{
  position: relative;
  padding-left: 1.35rem;
  color: var(--muted);
}

.clean-list li::before{
  content: "›";
  position:absolute;
  left: 0;
  color: var(--accent);
  font-weight: 900;
}

/* =========================
   FOOTER — density + wrap fixes (MUW)
   Paste directly under the existing .site-footer / .footer-title / .footer-meta rules.
========================= */

.site-footer {
  width: 100%;
  max-width: none;              /* key: stop left-bunching */
  margin: 0;                    /* full-bleed */
  padding-left: clamp(1.25rem, 4vw, 4rem);
  padding-right: clamp(1.25rem, 4vw, 4rem);

  /* Keep it compact vertically */
  padding-top: 2.25rem;
  padding-bottom: 2.25rem;

  /* Spread content across desktop */
  display: grid;
  grid-template-columns: 1.2fr 1.5fr 1.35fr 1.15fr; /* wide, balanced */
  column-gap: clamp(1.5rem, 3vw, 3rem);
  row-gap: 1.5rem;
  align-items: start;
}

/* 2) Reduce vertical bloat on desktop */
.site-footer p { margin: 0 0 0.55rem 0; }
.site-footer .mini { margin-top: 0.6rem; line-height: 1.45; }

/* Titles a touch tighter so blocks don’t grow downward */
.footer-title {
  margin-bottom: 0.55rem;
  font-size: 1.2rem;
}

/* 3) Make long lines wrap intelligently without pushing height */
.site-footer a {
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.55;
}

/* 4) Keep “stamp” pills compact; never full-width */
.site-footer .stamp {
  display: inline-flex;
  width: auto;
  max-width: 100%;
  padding: 0.3rem 0.55rem;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  white-space: nowrap;
}

/* 5) Stop the sitemap links from becoming a single long “sentence”.
      Force them to wrap into multiple lines gracefully */
.site-footer .footer-title + p,
.site-footer p {
  max-width: 100%;
}

/* 6) If your existing styles make the last block too tall, tighten it */
.site-footer .footer-meta {
  gap: 0.65rem;
}

/* -------------------------
   Responsive: stack more deliberately
------------------------- */

/* At medium widths, 2 columns is way cleaner than 4 */
@media (max-width: 980px) {
  .site-footer {
    grid-template-columns: 1fr 1fr;
    max-width: 100%;
  }

  .site-footer p {
    max-width: 70ch;
  }
}

/* On mobile, one column with tighter padding */
@media (max-width: 640px) {
  .site-footer {
    grid-template-columns: 1fr;
    padding: 2.5rem 1.25rem;
  }

  .footer-title {
    font-size: 1.25rem;
  }

  /* Make stamps less “shouty” on small screens */
  .site-footer .stamp {
    font-size: 0.74rem;
    letter-spacing: 0.14em;
  }
}

/* -----------------------------
   13) Tables (if/when used)
------------------------------ */

.table{
  width:100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow:hidden;
  background: var(--card);
}

.table th,
.table td{
  padding: 12px 12px;
  border-bottom: 1px solid var(--line);
  text-align:left;
  vertical-align: top;
}

.table th{
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: .72rem;
  color: var(--ink-2);
  background: rgba(215,199,167,0.35);
}

body.mode-dispatch .table{
  background: rgba(11,13,16,0.82);
  border-color: rgba(34,230,199,0.18);
}

body.mode-dispatch .table th{
  background: rgba(34,230,199,0.10);
  color: rgba(244,239,228,0.85);
}

body.mode-dispatch .table td{
  border-bottom-color: rgba(34,230,199,0.12);
}

/* -----------------------------
   14) Small-device typography + spacing clamp
------------------------------ */

@media (max-width: 520px){
  body{
    line-height: 1.65;
  }

  .hero{
    padding-left: 18px;
    padding-right: 18px;
  }

  .mission,
  .casefiles,
  .methods,
  .dispatch,
  .section{
    padding-left: 18px;
    padding-right: 18px;
  }

  .site-header{
    padding-left: 18px;
    padding-right: 18px;
  }

  .site-footer{
    padding-left: 18px;
    padding-right: 18px;
  }

  .brand-sub,
  .brand-eyebrow,
  .tagline,
  .eyebrow,
  .section-head .eyebrow{
    letter-spacing: 0.22em;
  }

  .btn,
  a.primary,
  a.secondary,
  button.primary,
  button.secondary{
    width: 100%;
  }
}
/* ==========================================
   CASE FILE RECORD TEMPLATE — MOBILE POLISH
   Fixes: emails, metadata rows, CTA stacking
   ========================================== */

/* A) Make sure nothing can create sideways scroll */
.record-wrap,
.record-grid,
.record-card,
.record-main,
.record-side {
  max-width: 100%;
  overflow-x: hidden;
}

/* B) Base wrapping rule: wrap long content, but don't shred normal text */
.record-card,
.record-card * {
  overflow-wrap: break-word;
  word-break: normal;
}

/* C) Email links: wrap at sensible places (prefer @ and . boundaries)
   Use a soft-break strategy via CSS only (no HTML changes required).
*/
.record-card a[href^="mailto:"] {
  word-break: break-word;      /* safer than anywhere */
  overflow-wrap: break-word;
}

/* If the email still breaks too aggressively, constrain the container */
.record-card .contact-block,
.record-card .contact-block a {
  max-width: 100%;
}

/* D) Hashes / codes: these CAN break anywhere (they're meant to) */
.record-card code,
.record-card pre,
.record-card .hash {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  display: inline-block;
  max-width: 100%;
}

/* E) KV rows: two-col on desktop, stacked on mobile + tighter padding */
.record-kv .row {
  grid-template-columns: 170px 1fr;
}

@media (max-width: 680px) {
  .record-wrap {
    padding: 2.25rem 1rem;
  }

  .record-card {
    padding: 1.05rem;
    border-radius: 14px;
  }

  /* Stack label/value so nothing crushes */
  .record-kv .row {
    grid-template-columns: 1fr;
    gap: .35rem;
    padding: .6rem .7rem;
  }

  .record-kv .k {
    font-size: .78rem;
    letter-spacing: .06em;
    opacity: .75;
  }

  .record-kv .v {
    font-size: .95rem;
    line-height: 1.35;
    opacity: .92;
  }

  /* CTA buttons: stack and fill width */
  .hero-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: .65rem !important;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Reduce “big empty” between sections */
  .divider {
    margin: 1rem 0;
  }
}

/* F) Optional: make “stamp” tags not dominate on mobile */
@media (max-width: 680px) {
  .stamp {
    font-size: .78rem;
    letter-spacing: .08em;
  }
}
/* ==========================================================
   ADD TO: /styles.css
   PAGE: /departments/case-files/public-interest/
   Scope: Public Interest Register (PI)
   Mobile-first, no layout breakage elsewhere
   ========================================================== */

.hero--pi .hero-content {
  max-width: 72ch;
}

/* Container */
.pi-wrap {
  padding: clamp(28px, 4vw, 56px) var(--gutter);
}

.pi-head {
  max-width: 78ch;
}

.pi-sub {
  opacity: .9;
}

/* Tools row */
.pi-tools {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* Search */
.pi-label {
  display: block;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .75;
  margin-bottom: .5rem;
}

.pi-input {
  width: 100%;
  padding: .85rem .95rem;
  border-radius: 14px;
  border: 1px solid rgba(27,27,27,.18);
  background: rgba(255,255,255,.35);
  outline: none;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
}

.pi-input:focus {
  border-color: rgba(176,141,87,.55);
  box-shadow: 0 0 0 4px rgba(176,141,87,.18);
}

/* Chips */
.pi-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  align-items: center;
}

.pi-chip {
  border: 1px solid rgba(27,27,27,.18);
  background: rgba(255,255,255,.28);
  color: var(--ink);
  border-radius: 999px;
  padding: .55rem .8rem;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .84rem;
  letter-spacing: .02em;
  cursor: pointer;
}

.pi-chip:hover {
  border-color: rgba(176,141,87,.55);
}

.pi-chip.is-active {
  background: rgba(176,141,87,.18);
  border-color: rgba(176,141,87,.55);
}

/* Grid */
.pi-grid {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
  align-items: stretch;
}

/* Card */
.pi-card {
  grid-column: span 6;
  border-radius: 18px;
  border: 1px solid rgba(27,27,27,.18);
  background: rgba(232,221,198,.82);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 18px rgba(0,0,0,.045);
}

.pi-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(176,141,87,.12), transparent);
  opacity: .65;
  pointer-events: none;
}

.pi-card > * {
  position: relative;
  z-index: 1;
}

/* Header row inside card */
.pi-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}

.pi-badge {
  display: grid;
  gap: .15rem;
  padding: .6rem .75rem;
  border-radius: 14px;
  border: 1px solid rgba(27,27,27,.12);
  background: rgba(255,255,255,.32);
  max-width: 65%;
}

.pi-badge__k {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .7;
}

.pi-badge__v {
  font-family: var(--font-sans);
  font-size: .98rem;
  opacity: .92;
}

/* Status pill */
.pi-status {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .7rem;
  border-radius: 999px;
  border: 1px solid rgba(27,27,27,.12);
  background: rgba(255,255,255,.28);
  white-space: nowrap;
  max-width: 45%;
}

.pi-status__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,61,174,.65); /* uses your magenta tone, subdued */
  box-shadow: 0 0 0 3px rgba(255,61,174,.14);
}

.pi-status__text {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .78rem;
  opacity: .85;
}

.pi-status--neutral .pi-status__dot {
  background: rgba(34,230,199,.55);
  box-shadow: 0 0 0 3px rgba(34,230,199,.14);
}

/* Title + link */
.pi-title {
  margin-top: .9rem;
  margin-bottom: .55rem;
  font-family: "Barlow Condensed", var(--font-sans);
  text-transform: uppercase;
  letter-spacing: .02em;
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  line-height: 1.1;
}

.pi-link {
  color: var(--ink);
  text-decoration: none;
}

.pi-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Description */
.pi-desc {
  opacity: .9;
  margin-top: .25rem;
  margin-bottom: .95rem;
}

/* Meta rows */
.pi-meta {
  display: grid;
  gap: .5rem;
  margin-top: .25rem;
}

.pi-meta-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: .75rem;
  padding: .55rem .7rem;
  border-radius: 14px;
  border: 1px solid rgba(27,27,27,.12);
  background: rgba(255,255,255,.30);
}

.pi-meta-k {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .74rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .7;
}

.pi-meta-v {
  opacity: .92;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Tags */
.pi-tag {
  display: inline-block;
  margin-right: .4rem;
  margin-bottom: .25rem;
  padding: .35rem .55rem;
  border-radius: 999px;
  border: 1px solid rgba(27,27,27,.14);
  background: rgba(176,141,87,.14);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .75rem;
  opacity: .9;
}

/* Actions */
.pi-actions {
  margin-top: .95rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
}

.pi-foot {
  margin-top: .75rem;
  font-size: .95rem;
}

/* Placeholder card */
.pi-card--placeholder {
  grid-column: span 6;
  opacity: .92;
}

.mono {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .95em;
}

/* Empty state */
.pi-empty {
  margin-top: 1.25rem;
}

.pi-empty-card {
  border-radius: 18px;
  border: 1px solid rgba(27,27,27,.18);
  background: rgba(232,221,198,.82);
  padding: 1.25rem;
  max-width: 70ch;
}

/* ==========================
   RESPONSIVE BREAKPOINTS
   ========================== */

@media (max-width: 980px) {
  .pi-card { grid-column: span 12; }
  .pi-card--placeholder { grid-column: span 12; }

  .pi-card-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .pi-badge,
  .pi-status {
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 680px) {
  .pi-wrap { padding: 2.25rem 1rem; }

  .pi-card {
    padding: 1.05rem;
    border-radius: 14px;
  }

  .pi-meta-row {
    grid-template-columns: 1fr;
    gap: .35rem;
  }

  .pi-actions {
    grid-template-columns: 1fr;
  }
}

/* If anything tries to force sideways scroll, this kills it at the page level */
@media (max-width: 680px) {
  .pi-wrap,
  .pi-grid,
  .pi-card {
    max-width: 100%;
    overflow-x: hidden;
  }
}
