:root {
  color-scheme: dark;
  --hf-night: #090b10;
  --hf-panel: rgba(17, 21, 29, 0.94);
  --hf-panel-raise: rgba(25, 31, 43, 0.96);
  --hf-paper: #f2efdd;
  --hf-muted: #cbbda7;
  --hf-line: rgba(242, 239, 221, 0.12);
  --hf-shadow: 0 20px 48px rgba(0, 0, 0, 0.34);
  --hf-red: #d53600;
  --hf-red-deep: #910f3f;
  --hf-amber: #f2c14e;
  --hf-blue: #7b8fb2;
  --hf-green: #5c7f69;
  --ink: var(--hf-paper);
  --paper: var(--hf-panel);
  --paper-2: var(--hf-panel-raise);
  --accent: var(--hf-red);
  --accent-deep: var(--hf-amber);
  --olive: var(--hf-green);
  --rose: #f27d72;
  --line: var(--hf-line);
  --muted: var(--hf-muted);
  --shadow: var(--hf-shadow);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(213, 54, 0, 0.22), transparent 22rem),
    radial-gradient(circle at top right, rgba(123, 143, 178, 0.16), transparent 20rem),
    linear-gradient(180deg, #07090d 0%, #0d1017 52%, #131824 100%);
}

a { color: inherit; }

.incident-tape {
  height: 14px;
  background: repeating-linear-gradient(135deg, var(--hf-amber) 0 18px, #111 18px 36px);
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.32);
}

.site-header,
.page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}

.casefile-header {
  display: grid;
  gap: 18px;
  padding-top: 18px;
}

.brand-row,
.casefile-title-row,
.section-heading,
.suggestion-top,
.action-row,
.checkbox-row,
.inline-form {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.nav-brand {
  display: grid;
  gap: 3px;
}

.nav-brand strong,
.nav-link,
.button-link,
button {
  font-weight: 700;
}

.nav-kicker,
.eyebrow,
.section-label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--hf-amber);
  margin: 0;
}

.nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link,
.button-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}

.nav-link:hover,
.button-link:hover {
  border-color: rgba(242, 193, 78, 0.58);
  background: rgba(242, 193, 78, 0.12);
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 10px;
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.lede,
.muted,
label,
.reason-list,
.flag-history {
  color: var(--muted);
}

.brand-badges,
.chip-list,
.flag-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hot-fuzz-art {
  position: relative;
  flex: 0 1 320px;
  min-width: min(100%, 280px);
}

.art-stack {
  display: grid;
  gap: 12px;
  flex: 0 1 320px;
  min-width: min(100%, 280px);
}

.art-stack .hot-fuzz-art {
  flex: initial;
  min-width: 0;
}

.photo-evidence-card {
  position: relative;
  margin: 0;
  padding: 10px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid rgba(242, 239, 221, 0.14);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.photo-evidence-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(242, 193, 78, 0.08), transparent 28%, rgba(145, 15, 63, 0.16));
  pointer-events: none;
}

.photo-evidence-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  border-radius: 14px;
  filter: saturate(0.82) sepia(0.18) contrast(1.02);
}

.photo-evidence-card figcaption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 1;
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff0cb;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
}

.evidence-contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(140px, 0.85fr);
  gap: 12px;
  align-items: stretch;
}

.evidence-note-card {
  position: relative;
  padding: 14px 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015)), rgba(15,18,25,0.96);
  border: 1px solid rgba(242, 239, 221, 0.11);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.evidence-note-card::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--hf-red), var(--hf-amber), var(--hf-blue));
}

.case-contact-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.case-contact-kicker,
.case-contact-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-contact-kicker {
  background: rgba(242, 193, 78, 0.12);
  border: 1px solid rgba(242, 193, 78, 0.24);
  color: #ffe6aa;
}

.case-contact-badge {
  background: rgba(123, 143, 178, 0.16);
  border: 1px solid rgba(123, 143, 178, 0.24);
  color: #dbe5ff;
}

.contact-sheet-illustration {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 10px;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.24));
}

.contact-frame {
  fill: rgba(11, 14, 20, 0.92);
  stroke: rgba(242, 239, 221, 0.12);
  stroke-width: 2;
}

.contact-photo {
  fill: rgba(123, 143, 178, 0.22);
  stroke: rgba(242, 239, 221, 0.16);
  stroke-width: 1.5;
}

.contact-photo.alt {
  fill: rgba(213, 54, 0, 0.18);
}

.contact-lines,
.contact-thread {
  fill: none;
  stroke: rgba(242, 239, 221, 0.86);
  stroke-width: 4;
  stroke-linecap: round;
}

.contact-thread {
  stroke: rgba(213, 54, 0, 0.82);
  stroke-width: 3;
}

.contact-marker {
  fill: rgba(242, 193, 78, 0.18);
  stroke: rgba(242, 193, 78, 0.84);
  stroke-width: 2;
}

.contact-label {
  fill: rgba(242, 239, 221, 0.9);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-anchor: middle;
}

.case-contact-list {
  margin: 0;
  padding-left: 18px;
  color: #d5dded;
  display: grid;
  gap: 8px;
  line-height: 1.4;
}

.supporting-photo-card {
  min-height: 100%;
}

.village-lane,
.map-thread {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.village-lane {
  stroke: rgba(242, 193, 78, 0.88);
  stroke-width: 7;
}

.map-thread {
  stroke: rgba(213, 54, 0, 0.86);
  stroke-width: 3;
}

.evidence-card,
.radio-body {
  fill: rgba(242, 239, 221, 0.92);
}

.evidence-lines {
  fill: none;
  stroke: rgba(10, 12, 18, 0.82);
  stroke-width: 4;
  stroke-linecap: round;
}

.marker-dot {
  fill: rgba(242, 193, 78, 0.94);
}

.marker-dot-alt {
  fill: rgba(123, 143, 178, 0.9);
}

.radio-antenna {
  fill: rgba(242, 193, 78, 0.9);
}

.poster-illustration {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.35));
}

.poster-frame {
  fill: rgba(10, 12, 18, 0.88);
  stroke: rgba(242, 239, 221, 0.2);
  stroke-width: 2;
}

.poster-halo {
  fill: url(#kitchen-sunset);
  opacity: 0.9;
}

.poster-tape {
  fill: rgba(242, 193, 78, 0.88);
  stroke: rgba(17, 17, 17, 0.8);
  stroke-width: 2;
}

.constable-silhouette {
  fill: rgba(8, 10, 15, 0.92);
  stroke: rgba(242, 239, 221, 0.12);
  stroke-width: 1.5;
}

.constable-silhouette.partner {
  fill: rgba(24, 30, 42, 0.94);
}

.swan-stamp {
  fill: rgba(123, 143, 178, 0.2);
  stroke: rgba(242, 239, 221, 0.42);
  stroke-width: 2;
}

.swan-mark {
  fill: rgba(242, 239, 221, 0.94);
}

.poster-callout {
  fill: rgba(242, 239, 221, 0.82);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-anchor: middle;
}

.recipe-card,
.folder-body,
.folder-tab,
.barbell-bar,
.plate-outer,
.plate-inner {
  fill: rgba(242, 239, 221, 0.9);
}

.plate-inner {
  fill: rgba(10, 12, 18, 0.72);
}

.film-grain,
.cinematic-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 28px;
}

.film-grain {
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.025) 0 2px, transparent 2px 5px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 4px);
  mix-blend-mode: soft-light;
  opacity: 0.35;
}

.cinematic-glow {
  background:
    radial-gradient(circle at 16% 18%, rgba(123, 143, 178, 0.22), transparent 24%),
    radial-gradient(circle at 84% 24%, rgba(213, 54, 0, 0.24), transparent 26%),
    linear-gradient(115deg, rgba(242, 193, 78, 0.05), transparent 40%, rgba(145, 15, 63, 0.1) 78%, transparent 100%);
  animation: emergencyPulse 8s ease-in-out infinite alternate;
}

.app-casefile {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.casefile-stamp {
  display: inline-flex;
  align-items: center;
  margin: 0 0 0.85rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(242, 193, 78, 0.45);
  border-radius: 999px;
  color: #ffe5b0;
  background: rgba(242, 193, 78, 0.1);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
}

.app-casefile-kitchen .casefile-stamp {
  box-shadow: 0 0 0 1px rgba(213, 54, 0, 0.12), 0 0 28px rgba(213, 54, 0, 0.16);
}

@keyframes emergencyPulse {
  0% { opacity: 0.72; transform: scale(1); }
  50% { opacity: 0.92; transform: scale(1.015); }
  100% { opacity: 0.78; transform: scale(1.03); }
}

.pill,
.chip-list span,
.chip-toggle,
.score-pill,
.status-pill,
.pill-good,
.pill-warn {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.82rem;
  border: 1px solid var(--line);
}

.pill,
.chip-list span,
.chip-toggle {
  background: rgba(255, 255, 255, 0.05);
}

.badge-hotfuzz,
.score-pill,
.chip-toggle.active,
button,
.button-link {
  background: linear-gradient(135deg, var(--hf-red) 0%, var(--hf-red-deep) 100%);
  color: #fff4ea;
  border-color: transparent;
}

.status-pill,
.pill-good {
  background: rgba(92, 127, 105, 0.18);
  color: #cfe8d8;
}

.pill-warn {
  background: rgba(242, 193, 78, 0.16);
  color: var(--hf-amber);
}

.page-shell {
  display: grid;
  gap: 22px;
  padding-bottom: 44px;
}

.hero-grid,
.split-grid,
.suggestion-grid,
.plan-grid,
.failure-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.card,
.suggestion-card,
.plan-card,
.plan-summary,
.failure-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.card,
.suggestion-card,
.plan-card,
.failure-card {
  position: relative;
  overflow: hidden;
}

.card::before,
.suggestion-card::before,
.plan-card::before,
.failure-card::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--hf-red), var(--hf-amber), var(--hf-blue));
}

.spotlight {
  background:
    radial-gradient(circle at top right, rgba(242, 193, 78, 0.16), transparent 15rem),
    linear-gradient(145deg, rgba(145, 15, 63, 0.2), rgba(17, 21, 29, 0.96));
}

.evidence-board,
.evidence-card,
.evidence-slab,
.intake-docket {
  position: relative;
}

.dossier-grid {
  align-items: stretch;
}

.case-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.case-legend::after {
  content: 'FOR THE GREATER GOOD';
  font-size: 0.67rem;
  letter-spacing: 0.16em;
  color: rgba(242, 193, 78, 0.7);
}

.evidence-board::after,
.evidence-card::after {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px dashed rgba(242, 193, 78, 0.09);
  border-radius: 16px;
  pointer-events: none;
}

.dossier-note {
  padding-left: 12px;
  border-left: 3px solid rgba(242, 193, 78, 0.4);
}

.case-list li {
  padding-left: 18px;
  position: relative;
}

.case-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--hf-amber);
}

.intake-docket {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
  border: 1px solid rgba(242, 239, 221, 0.06);
  border-radius: 18px;
  padding: 14px;
}

.chain-of-custody {
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(242, 193, 78, 0.2);
}

.evidence-slab {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

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

.stats-grid div,
.suggestion-card,
.plan-summary,
.failure-results,
.suggestion-grid .muted,
.list-item {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.stats-grid div {
  padding: 14px;
  display: grid;
  gap: 8px;
}

.stats-grid span { font-size: 0.85rem; }
.stats-grid strong { font-size: 1.6rem; }

.stack-form,
.search-examples,
.flag-meta { display: grid; gap: 12px; }

label { display: grid; gap: 8px; }

input,
textarea,
select,
button {
  font: inherit;
  border-radius: 14px;
  padding: 12px 14px;
}

input,
textarea,
select {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
}

button {
  border: none;
  cursor: pointer;
}

button.ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--hf-amber);
  border: 1px solid var(--line);
}

button.danger { color: #ffd7d1; }

.reason-list,
.flag-history { margin: 12px 0 0; padding-left: 18px; }
.failure-results { margin-top: 14px; padding: 14px; }
.failure-results .suggestion-grid,
.failure-results.suggestion-grid { margin-top: 8px; }

.status-open {
  background: rgba(210, 55, 0, 0.16);
  color: #ffbeb0;
}

.status-resolved {
  background: rgba(92, 127, 105, 0.16);
  color: #d7efdf;
}

.suggestion-card a,
.plan-card a,
.flag-meta a {
  color: var(--hf-amber);
}

@media (max-width: 640px) {
  .site-header,
  .page-shell {
    padding: 18px;
  }

  .evidence-contact-grid {
    grid-template-columns: 1fr;
  }

  .hot-fuzz-art {
    flex-basis: 100%;
    min-width: 0;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.doris-family-shell .case-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.doris-family-shell .case-nav-link,
.doris-family-shell .family-app-card {
  text-decoration: none;
}

.doris-family-shell .case-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.58rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(242, 193, 78, 0.18);
  background: rgba(13, 19, 33, 0.72);
  color: var(--muted);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.doris-family-shell .case-nav-link:hover,
.doris-family-shell .case-nav-link.active {
  color: var(--ink);
  border-color: rgba(242, 193, 78, 0.48);
  background: linear-gradient(135deg, rgba(213, 54, 0, 0.24), rgba(145, 15, 63, 0.24));
}

.doris-family-shell .nav-link.active {
  color: var(--ink);
  border-color: rgba(242, 193, 78, 0.58);
  background: linear-gradient(135deg, rgba(213, 54, 0, 0.24), rgba(145, 15, 63, 0.24));
}

.family-portal {
  display: grid;
  gap: 14px;
}

.family-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.family-app-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.92), rgba(8, 12, 22, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 14px 28px rgba(0, 0, 0, 0.22);
  color: var(--ink);
}

.family-app-card:hover,
.family-app-card.current-desk {
  border-color: rgba(242, 193, 78, 0.4);
  transform: translateY(-1px);
}

.family-app-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hf-amber);
}

.family-app-card strong {
  font-size: 1rem;
}

.family-app-card small {
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 768px) {
  .doris-family-shell .case-nav {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .family-directory-grid {
    grid-template-columns: 1fr;
  }
}
