:root {
  color-scheme: light;
  --paper: #f4f5f7;
  --paper-strong: #ffffff;
  --ink: #070f20;
  --body-ink: #0e1e3d;
  --muted: #8b95a8;
  --line: #e8eaf0;
  --line-strong: #c8922a;
  --navy: #0e1e3d;
  --navy-deep: #070f20;
  --navy-mid: #162845;
  --blue: #1a8a8a;
  --teal: #1a8a8a;
  --teal-light: #22aaaa;
  --red: #9f3a38;
  --red-dark: #7a1e1b;
  --gold: #c8922a;
  --gold-light: #e2aa42;
  --gold-pale: #f5d98a;
  --steel: #162845;
  --green: #1a8a8a;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --surface-cool: rgba(244, 245, 247, 0.92);
  --dark-glass: rgba(7, 15, 32, 0.72);
  --light-on-dark: #f4f5f7;
  --shadow: 0 22px 60px rgba(14, 30, 61, 0.16);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 6% -8%, rgba(34, 170, 170, 0.17), transparent 26rem),
    radial-gradient(circle at 94% 0%, rgba(200, 146, 42, 0.2), transparent 25rem),
    linear-gradient(135deg, rgba(14, 30, 61, 0.1), transparent 35%, rgba(26, 138, 138, 0.09)),
    repeating-linear-gradient(112deg, rgba(7, 15, 32, 0.045) 0 1px, transparent 1px 18px),
    var(--paper);
  color: var(--body-ink);
  font-family: "DM Sans", "Trebuchet MS", "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

.demo-banner {
  background: linear-gradient(90deg, var(--navy-deep), var(--navy), var(--teal), var(--gold), var(--red));
  color: var(--light-on-dark);
  font-size: 0.86rem;
  font-weight: 800;
  padding: 0.55rem 1rem;
  text-align: center;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 3vw, 2rem);
  background:
    linear-gradient(90deg, rgba(7, 15, 32, 0.97), rgba(14, 30, 61, 0.96) 48%, rgba(22, 40, 69, 0.96)),
    var(--navy-deep);
  border-bottom: 1px solid rgba(226, 170, 66, 0.32);
  box-shadow: 0 12px 34px rgba(7, 15, 32, 0.18);
  backdrop-filter: blur(14px);
}

.brand {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  min-width: 16rem;
}

.brand-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(226, 170, 66, 0.24), 0 12px 24px rgba(7, 15, 32, 0.28);
}

.brand-copy {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.brand-mark {
  color: var(--light-on-dark);
  font-size: 1.45rem;
  font-weight: 950;
  letter-spacing: 0;
}

.brand-subtitle {
  color: rgba(244, 245, 247, 0.72);
  font-size: 0.78rem;
  font-weight: 700;
}

.primary-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
  min-width: 0;
}

.primary-nav a,
.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.5rem 0.76rem;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
}

.primary-nav a:hover,
.button:hover {
  border-color: var(--teal);
  color: var(--navy);
  background: #ffffff;
}

.topbar .primary-nav a {
  border-color: rgba(244, 245, 247, 0.18);
  background: rgba(244, 245, 247, 0.08);
  color: var(--light-on-dark);
}

.topbar .primary-nav a:hover {
  border-color: rgba(226, 170, 66, 0.68);
  background: rgba(244, 245, 247, 0.15);
  color: #ffffff;
}

.button.primary {
  background: linear-gradient(135deg, var(--navy), var(--teal));
  border-color: var(--navy);
  color: white;
}

.button.compact {
  min-height: 2rem;
  padding: 0.32rem 0.52rem;
  font-size: 0.76rem;
}

.button.danger {
  border-color: rgba(159, 58, 56, 0.45);
  background: rgba(159, 58, 56, 0.1);
  color: var(--red);
}

form.panel {
  display: grid;
  gap: 0.72rem;
  align-content: start;
}

input,
select,
textarea {
  width: 100%;
  min-height: 2.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.62rem 0.72rem;
  background: var(--surface-strong);
  color: var(--ink);
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(26, 138, 138, 0.16);
}

.intake-form label {
  display: grid;
  gap: 0.3rem;
}

.review-action-form {
  display: grid;
  gap: 0.42rem;
  min-width: 12rem;
}

.entity-resolution-form {
  margin-top: 0.65rem;
}

.candidate-draft-form,
.candidate-preview-form,
.publication-readiness-form,
.final-publication-form,
.publish-disabled-form {
  margin-top: 0.8rem;
}

.review-action-form textarea {
  min-height: 4.2rem;
  font-size: 0.82rem;
}

.review-action-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.compact-list {
  gap: 0.35rem;
}

.mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
}

.mini-row:last-child {
  border-bottom: 0;
}

.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.pipeline-grid > div {
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.private-preview-layout .table th {
  width: 11rem;
}

.compact-table {
  table-layout: fixed;
}

.compact-table th,
.compact-table td {
  overflow-wrap: anywhere;
}

.app-shell {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
}

.loading-card,
.page-head,
.panel,
.card,
.claim-card,
.source-card,
.edge-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.loading-card {
  padding: clamp(1.3rem, 4vw, 2rem);
}

.loading-logo {
  width: 4.5rem;
  height: 4.5rem;
  margin-bottom: 1rem;
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(7, 15, 32, 0.2);
}

.page-head {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
  padding: clamp(1rem, 3vw, 1.45rem);
}

.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(14, 30, 61, 0.1), transparent 34%, rgba(26, 138, 138, 0.08)),
    repeating-linear-gradient(90deg, transparent 0 26px, rgba(200, 146, 42, 0.1) 26px 28px);
  pointer-events: none;
}

.page-head::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--red));
}

.page-head > * {
  position: relative;
}

.page-head h1,
.loading-card h1 {
  margin: 0;
  max-width: 920px;
  font-family: "DM Sans", "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 950;
  line-height: 0.98;
  letter-spacing: 0;
}

.page-head p,
.loading-card p {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.35rem 0 0.7rem;
}

.section-title h2 {
  margin: 0;
  font-size: 1.1rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

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

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

.grid.sidebar {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
}

.panel {
  padding: 1rem;
}

.panel.flush {
  padding: 0;
  overflow: hidden;
}

.card,
.claim-card,
.source-card,
.edge-card {
  padding: 1rem;
}

.card h3,
.claim-card h3,
.source-card h3,
.edge-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
}

.reveal,
.card,
.claim-card,
.source-card,
.edge-card,
.panel {
  animation: riseIn 520ms ease both;
}

.profile-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.48fr);
  gap: 1rem;
  min-height: 360px;
  margin-bottom: 1rem;
  overflow: hidden;
  border: 1px solid rgba(14, 30, 61, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(115deg, rgba(7, 15, 32, 0.96), rgba(14, 30, 61, 0.92) 45%, rgba(26, 138, 138, 0.72)),
    repeating-linear-gradient(90deg, rgba(244, 245, 247, 0.08) 0 1px, transparent 1px 22px);
  color: var(--light-on-dark);
  box-shadow: var(--shadow);
}

.profile-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 0.42rem;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--teal));
}

.profile-copy {
  position: relative;
  z-index: 2;
  padding: clamp(1.2rem, 4vw, 2rem);
  align-self: end;
}

.profile-copy h1 {
  margin: 0;
  max-width: 680px;
  font-family: "DM Sans", "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: clamp(3rem, 8vw, 6.8rem);
  font-weight: 950;
  line-height: 0.88;
  letter-spacing: 0;
}

.profile-copy p {
  max-width: 720px;
}

.profile-copy .eyebrow,
.profile-copy .muted {
  color: var(--light-on-dark);
}

.portrait-stage {
  position: relative;
  min-height: 340px;
  align-self: stretch;
}

.portrait-cutout {
  position: absolute;
  right: clamp(0.25rem, 3vw, 2rem);
  bottom: -1rem;
  width: min(26rem, 80%);
  aspect-ratio: 0.78;
  border: 2px solid rgba(244, 245, 247, 0.35);
  border-bottom: 0;
  border-radius: 45% 45% 0 0;
  background:
    linear-gradient(160deg, rgba(244, 245, 247, 0.16), rgba(244, 245, 247, 0.04)),
    linear-gradient(180deg, rgba(244, 245, 247, 0.2), rgba(7, 15, 32, 0.65));
  clip-path: polygon(20% 100%, 20% 54%, 29% 37%, 34% 20%, 50% 10%, 66% 20%, 71% 37%, 80% 54%, 80% 100%);
  transform: translateX(14px);
  animation: portraitSlide 780ms cubic-bezier(0.2, 0.85, 0.2, 1) both;
}

.portrait-cutout span {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(244, 245, 247, 0.62);
  font-family: "DM Sans", "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
}

.score-orbit {
  position: absolute;
  right: clamp(1rem, 5vw, 4rem);
  top: 2rem;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 7.2rem;
  aspect-ratio: 1;
  border: 2px solid rgba(244, 245, 247, 0.5);
  border-radius: 50%;
  background: rgba(7, 15, 32, 0.58);
  box-shadow: 0 0 0 8px rgba(244, 245, 247, 0.08);
}

.score-orbit strong {
  font-size: 2rem;
  line-height: 0.8;
}

.score-orbit span,
.person-score span {
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.person-card {
  display: grid;
  grid-template-columns: 5.4rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.person-score {
  display: grid;
  place-items: center;
  width: 5rem;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(14, 30, 61, 0.24);
  background: linear-gradient(135deg, rgba(26, 138, 138, 0.16), rgba(200, 146, 42, 0.14));
}

.person-score strong {
  font-size: 1.7rem;
  line-height: 0.9;
}

.sentinel-panel,
.security-panel {
  background:
    linear-gradient(135deg, rgba(26, 138, 138, 0.1), rgba(255, 255, 255, 0.9)),
    var(--paper-strong);
}

.values-manifesto {
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid rgba(14, 30, 61, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(7, 15, 32, 0.97), rgba(14, 30, 61, 0.92)),
    var(--navy);
  color: var(--light-on-dark);
  box-shadow: var(--shadow);
}

.values-manifesto h2 {
  margin: 0;
  font-family: "DM Sans", "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 950;
  line-height: 0.96;
}

.values-manifesto .eyebrow {
  color: var(--light-on-dark);
}

.case-desk {
  position: relative;
  min-height: 330px;
  margin-bottom: 1rem;
  overflow: hidden;
  border: 1px solid rgba(7, 15, 32, 0.62);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 83% 38%, rgba(34, 170, 170, 0.2), transparent 24rem),
    linear-gradient(115deg, rgba(7, 15, 32, 0.98), rgba(14, 30, 61, 0.94) 50%, rgba(22, 40, 69, 0.9)),
    repeating-linear-gradient(90deg, rgba(244, 245, 247, 0.05) 0 1px, transparent 1px 30px);
  color: var(--light-on-dark);
  box-shadow: var(--shadow);
}

.case-desk::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 0 44%, rgba(244, 245, 247, 0.08) 44% 45%, transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(200, 146, 42, 0.24), transparent 24%);
}

.case-desk-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.38fr);
  gap: 1rem;
  align-items: center;
  min-height: 330px;
}

.case-desk-copy {
  position: relative;
  z-index: 1;
  max-width: 820px;
  padding: clamp(1.3rem, 4vw, 2.2rem);
}

.case-desk h1 {
  margin: 0;
  font-family: "DM Sans", "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: clamp(2.45rem, 6vw, 5.4rem);
  font-weight: 950;
  line-height: 0.92;
}

.case-desk p {
  max-width: 680px;
}

.case-desk .eyebrow {
  color: var(--light-on-dark);
}

.case-desk-brand {
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2rem);
}

.trace-motion-logo {
  width: min(18rem, 64vw);
  max-width: 100%;
  overflow: visible;
  filter: drop-shadow(0 24px 44px rgba(0, 0, 0, 0.28));
  animation: logoStageIn 720ms cubic-bezier(0.2, 0.85, 0.2, 1) both;
}

.logo-halo,
.logo-ring {
  fill: none;
}

.logo-halo {
  stroke: rgba(244, 245, 247, 0.16);
  stroke-width: 1.3;
}

.logo-ring {
  stroke: rgba(244, 245, 247, 0.92);
  stroke-width: 2.4;
}

.logo-scan {
  transform-origin: 60px 60px;
  animation: traceScan 10s linear infinite;
}

.logo-scan path {
  fill: none;
  stroke-linecap: round;
  stroke-width: 3;
}

.logo-scan path:first-child {
  stroke: var(--teal-light);
}

.logo-scan path:last-child {
  stroke: var(--gold-light);
  opacity: 0.82;
}

.logo-line {
  stroke-linecap: round;
  stroke-width: 2;
  stroke-dasharray: 32;
  stroke-dashoffset: 32;
  animation: traceDraw 3.8s ease-in-out infinite;
}

.line-a,
.line-b {
  stroke: var(--teal-light);
}

.line-b {
  animation-delay: 0.35s;
}

.line-c {
  stroke: var(--gold-light);
  animation-delay: 0.7s;
}

.logo-node {
  transform-box: fill-box;
  transform-origin: center;
  animation: tracePulse 2.8s ease-in-out infinite;
}

.node-a,
.node-b {
  fill: var(--teal-light);
}

.node-b {
  animation-delay: 0.4s;
}

.node-c {
  fill: var(--gold-light);
  animation-delay: 0.8s;
}

.logo-center {
  fill: var(--gold);
}

.logo-handle {
  stroke: rgba(244, 245, 247, 0.28);
  stroke-width: 4;
  stroke-linecap: round;
}

.trace-motion-logo text {
  fill: rgba(244, 245, 247, 0.58);
  font-family: "DM Sans", "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 6px;
  font-weight: 900;
  letter-spacing: 1.6px;
}

.filter-bar,
.graph-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) repeat(4, minmax(120px, 0.8fr)) auto;
  gap: 0.7rem;
  align-items: end;
  margin: 0 0 1rem;
  padding: 0.85rem;
  border: 1px solid rgba(244, 245, 247, 0.14);
  border-radius: 8px;
  background: rgba(244, 245, 247, 0.06);
}

.filter-panel label {
  display: grid;
  gap: 0.32rem;
  min-width: 0;
}

.filter-panel label span {
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 2.35rem;
  border: 1px solid rgba(244, 245, 247, 0.22);
  border-radius: 6px;
  padding: 0.42rem 0.55rem;
  background: rgba(8, 28, 36, 0.72);
  color: var(--light-on-dark);
  font: inherit;
  font-size: 0.88rem;
}

.filter-actions {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-end;
}

.filter-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  align-items: center;
  margin: -0.35rem 0 0.85rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(26, 138, 138, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.filter-summary strong {
  color: var(--navy);
}

.filter-summary span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.filter-chip {
  min-height: 2.25rem;
  border: 1px solid rgba(244, 245, 247, 0.24);
  border-radius: 999px;
  padding: 0.42rem 0.72rem;
  background: rgba(244, 245, 247, 0.08);
  color: inherit;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
  background: var(--light-on-dark);
  color: var(--navy-deep);
}

.graph-toolbar .filter-chip {
  border-color: rgba(26, 138, 138, 0.28);
  background: rgba(26, 138, 138, 0.08);
  color: var(--ink);
}

.graph-toolbar .filter-chip.active,
.graph-toolbar .filter-chip:hover {
  background: var(--navy);
  color: var(--light-on-dark);
}

@media (max-width: 980px) {
  .filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .filter-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .filter-panel,
  .graph-filter-panel {
    grid-template-columns: 1fr;
  }

  .relationship-lane,
  .relationship-path {
    grid-template-columns: 1fr;
  }

  .walkthrough-grid {
    grid-template-columns: 1fr;
  }

  .lane-line {
    text-align: left;
  }
}

.folder-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.folder-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 0.55rem;
  min-height: 205px;
  padding: 1.2rem 0.95rem 0.95rem;
  overflow: hidden;
  border: 1px solid rgba(7, 15, 32, 0.22);
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(232, 234, 240, 0.8)),
    var(--paper-strong);
  box-shadow: 0 18px 40px rgba(7, 15, 32, 0.14);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.folder-card:hover {
  transform: translateY(-5px) rotate(-0.5deg);
  box-shadow: 0 24px 52px rgba(7, 15, 32, 0.22);
}

.folder-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg, rgba(7, 15, 32, 0.035) 0 1px, transparent 1px 12px);
  pointer-events: none;
}

.folder-tab {
  position: absolute;
  top: 0;
  left: 0.7rem;
  width: 4.8rem;
  height: 1rem;
  border-radius: 0 0 4px 4px;
  background: var(--gold);
}

.folder-card.person .folder-tab {
  background: var(--red);
}

.folder-card.committee .folder-tab {
  background: var(--blue);
}

.folder-card.source .folder-tab {
  background: var(--steel);
}

.folder-badge {
  justify-self: start;
  border: 1px solid rgba(7, 15, 32, 0.16);
  border-radius: 999px;
  padding: 0.18rem 0.48rem;
  background: rgba(244, 245, 247, 0.74);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.folder-stamp {
  position: absolute;
  right: 0.75rem;
  bottom: 0.65rem;
  color: rgba(7, 15, 32, 0.08);
  font-family: "DM Sans", "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 3.2rem;
  font-weight: 900;
}

.folder-card strong {
  position: relative;
  z-index: 1;
  font-family: "DM Sans", "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 1.08rem;
  line-height: 1.05;
}

.folder-card span,
.folder-card small {
  position: relative;
  z-index: 1;
}

.folder-card > span:not(.folder-tab):not(.folder-badge):not(.folder-stamp) {
  color: var(--muted);
  font-size: 0.85rem;
}

.folder-card small {
  align-self: end;
  color: var(--navy);
  font-weight: 850;
}

.case-card-grid,
.member-card-grid,
.relationship-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.race-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.browse-results {
  display: grid;
  gap: 1.35rem;
}

.browse-group {
  min-width: 0;
}

.browse-group .section-title {
  margin-top: 0;
}

.case-card,
.member-card,
.relationship-card,
.empty-state,
.search-hint {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(7, 15, 32, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 245, 247, 0.88)),
    repeating-linear-gradient(135deg, rgba(7, 15, 32, 0.035) 0 1px, transparent 1px 12px);
  box-shadow: 0 16px 36px rgba(7, 15, 32, 0.12);
}

.case-card {
  display: grid;
  min-height: 250px;
  overflow: hidden;
}

.case-card > a,
a.case-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.55rem;
  min-height: 250px;
  padding: 1.05rem;
}

.case-card:hover,
.member-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(7, 15, 32, 0.18);
}

.case-card-stripe {
  position: absolute;
  top: 0;
  left: 1rem;
  width: 5.1rem;
  height: 1rem;
  border-radius: 0 0 4px 4px;
  background: var(--gold);
}

.case-card.person .case-card-stripe,
.member-card .case-card-stripe {
  background: var(--red);
}

.case-card.committee .case-card-stripe {
  background: var(--blue);
}

.case-card.source .case-card-stripe {
  background: var(--steel);
}

.case-card-type {
  justify-self: start;
  margin-top: 1.15rem;
  border: 1px solid rgba(7, 15, 32, 0.16);
  border-radius: 999px;
  padding: 0.18rem 0.48rem;
  background: rgba(255, 255, 255, 0.82);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.case-card-initials {
  position: absolute;
  right: 0.7rem;
  top: 2.7rem;
  max-width: 80%;
  overflow: hidden;
  color: rgba(7, 15, 32, 0.07);
  font-size: clamp(3rem, 8vw, 4.5rem);
  font-weight: 950;
  line-height: 0.8;
  white-space: nowrap;
}

.case-card strong,
.case-card h3,
.member-card h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  align-self: end;
  font-size: 1.15rem;
  line-height: 1.05;
}

.case-card span:not(.case-card-stripe):not(.case-card-type):not(.case-card-initials) {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 0.9rem;
}

.case-card small {
  position: relative;
  z-index: 1;
  color: var(--navy);
  font-weight: 850;
}

.case-card-meta {
  display: grid;
  gap: 0.35rem;
  padding: 0 1.05rem 1.05rem;
}

.case-card-meta span {
  display: inline-flex;
  min-height: 1.5rem;
  align-items: center;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.14rem 0.48rem;
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 850;
}

.member-card {
  display: grid;
  grid-template-rows: minmax(240px, auto) 1fr;
  overflow: hidden;
}

.member-card-main {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.55rem;
  min-height: 240px;
  padding: 1.05rem;
  overflow: hidden;
}

.member-card-body {
  display: grid;
  gap: 0.55rem;
  padding: 0 1.05rem 1.05rem;
}

.member-card-body p {
  margin: 0;
}

.empty-state,
.search-hint {
  padding: 1rem;
}

.empty-state {
  min-height: 9rem;
  align-content: center;
}

.search-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 1rem;
  background: rgba(26, 138, 138, 0.08);
}

.graph-filter-panel {
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.55fr) auto;
  background: var(--surface);
}

.relationship-panel {
  background: var(--navy-deep);
}

.relationship-map {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  background:
    linear-gradient(rgba(244, 245, 247, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 245, 247, 0.055) 1px, transparent 1px),
    var(--navy-deep);
  background-size: 28px 28px;
}

.relationship-lane {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, auto) minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
}

.lane-node,
.lane-line {
  min-width: 0;
  border-radius: 8px;
  padding: 0.7rem;
  font-weight: 850;
}

.lane-node {
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  overflow-wrap: anywhere;
}

.lane-node.target {
  border-left: 4px solid var(--teal);
}

.lane-node.source {
  border-left: 4px solid var(--gold);
}

.lane-line {
  position: relative;
  border: 1px solid rgba(226, 170, 66, 0.44);
  background: rgba(200, 146, 42, 0.16);
  color: var(--gold-pale);
  text-align: center;
  text-transform: capitalize;
}

.relationship-card {
  display: grid;
  gap: 0.7rem;
  padding: 1rem;
}

.relationship-card p {
  margin: 0;
}

.relationship-path {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.6rem;
  align-items: center;
}

.relationship-path a {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem;
  background: rgba(255, 255, 255, 0.78);
}

.path-label {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.path-verb {
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
  background: rgba(200, 146, 42, 0.16);
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
  text-transform: capitalize;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stat {
  min-height: 6.2rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(244, 245, 247, 0.86)),
    var(--paper-strong);
  animation: riseIn 520ms ease both;
}

.stat strong {
  display: block;
  font-size: 1.8rem;
  line-height: 1;
}

.stat span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.tag-list,
.action-row,
.source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.pill,
.status,
.tier,
.verdict {
  display: inline-flex;
  align-items: center;
  min-height: 1.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0.22rem 0.58rem;
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 850;
}

.status.approved,
.status.published,
.status.completed,
.status.parsed,
.status.resolved,
.status.confirmed_new_entity,
.status.preview_approved,
.status.preview_language_approved,
.status.readiness_ready,
.status.readiness_ready_for_final_review,
.status.final_ready_for_publication_queue,
.status.passed,
.status.draft_ready_for_public_review,
.status.implemented {
  border-color: rgba(50, 114, 74, 0.35);
  background: rgba(26, 138, 138, 0.1);
  color: var(--green);
}

.status.editorial_review,
.status.analyst_review,
.status.needs_analyst_review,
.status.needs_research,
.status.draft_needs_editorial_review,
.status.draft_needs_edits,
.status.preview_needs_review,
.status.preview_needs_edits,
.status.preview_legal_review,
.status.readiness_needs_review,
.status.readiness_needs_work,
.status.final_needs_review,
.status.final_needs_work,
.status.pending,
.status.publish_disabled {
  border-color: rgba(185, 121, 22, 0.35);
  background: rgba(200, 146, 42, 0.12);
  color: var(--gold);
}

.status.legal_review,
.status.needs_source,
.status.needs_source_review,
.status.rejected,
.status.draft_rejected,
.status.preview_rejected,
.status.preview_stale,
.status.readiness_blocked,
.status.readiness_legal_hold,
.status.final_blocked,
.status.final_legal_hold {
  border-color: rgba(159, 58, 56, 0.35);
  background: rgba(159, 58, 56, 0.12);
  color: var(--red);
}

.status.planned {
  border-color: rgba(200, 146, 42, 0.38);
  background: rgba(200, 146, 42, 0.12);
  color: var(--gold);
}

.verdict {
  border-color: rgba(26, 138, 138, 0.3);
  background: rgba(26, 138, 138, 0.12);
  color: var(--steel);
}

.tier {
  border-color: rgba(26, 138, 138, 0.32);
  background: rgba(26, 138, 138, 0.1);
  color: var(--navy);
}

.money {
  color: var(--navy);
  font-weight: 900;
}

.record-list {
  display: grid;
  gap: 0.75rem;
}

.record-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(0, 1.2fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.78rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
}

.record-row strong,
.edge-card strong {
  font-weight: 900;
}

.claim-card {
  border-left: 6px solid var(--steel);
}

.source-card {
  border-left: 6px solid var(--blue);
}

.edge-card {
  border-left: 6px solid var(--gold);
}

.callout {
  margin-top: 0.85rem;
  padding: 0.8rem;
  border: 1px solid rgba(159, 58, 56, 0.28);
  border-radius: var(--radius);
  background: rgba(159, 58, 56, 0.08);
}

.trust-boundary {
  display: grid;
  gap: 0.55rem;
  margin: 0.9rem 0 1rem;
  padding: 0.95rem 1rem;
  border-left: 4px solid var(--teal);
  background: linear-gradient(135deg, rgba(26, 138, 138, 0.08), rgba(255, 255, 255, 0.94));
}

.boundary-summary {
  margin: 0;
  color: var(--navy);
  font-weight: 800;
}

.start-here {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.walkthrough-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.walkthrough-step {
  display: grid;
  gap: 0.3rem;
  min-height: 7rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: 0 12px 28px rgba(14, 30, 61, 0.09);
}

.walkthrough-step:hover {
  border-color: rgba(26, 138, 138, 0.4);
  transform: translateY(-2px);
}

.walkthrough-step.current {
  border-color: rgba(26, 138, 138, 0.3);
  background: linear-gradient(135deg, rgba(26, 138, 138, 0.08), rgba(255, 255, 255, 0.98));
}

.walkthrough-step-number {
  width: fit-content;
  min-height: 1.5rem;
  border-radius: 999px;
  padding: 0.12rem 0.48rem;
  background: rgba(200, 146, 42, 0.12);
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 900;
}

.walkthrough-step strong {
  font-size: 1rem;
  line-height: 1.08;
}

.walkthrough-step span:last-child {
  color: var(--muted);
  font-size: 0.88rem;
}

.source-link {
  border-bottom: 2px solid rgba(26, 138, 138, 0.35);
  color: var(--navy);
  font-weight: 850;
}

.graph-panel {
  min-height: 320px;
  overflow: hidden;
}

.graph-canvas {
  width: 100%;
  min-height: 320px;
  display: block;
  background:
    radial-gradient(circle at 50% 50%, rgba(200, 146, 42, 0.12), transparent 34%),
    linear-gradient(rgba(244, 245, 247, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 245, 247, 0.055) 1px, transparent 1px),
    var(--navy-deep);
  background-size: 100% 100%, 28px 28px, 28px 28px;
}

.graph-canvas-large {
  min-height: 520px;
}

.graph-node text {
  font-size: 2.8px;
  font-weight: 800;
  fill: var(--light-on-dark);
}

.graph-node circle {
  stroke: var(--light-on-dark);
  stroke-width: 3;
}

.graph-edge {
  stroke: rgba(200, 146, 42, 0.64);
  stroke-width: 2;
}

.graph-edge.network {
  stroke-width: 1.6;
}

.timeline {
  display: grid;
  gap: 0.65rem;
  border-left: 3px solid var(--line-strong);
  padding-left: 1rem;
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.42rem;
  top: 0.35rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--red);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

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

.table th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.footer-space {
  height: 2rem;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes portraitSlide {
  from {
    opacity: 0;
    transform: translateX(54px);
  }

  to {
    opacity: 1;
    transform: translateX(14px);
  }
}

@keyframes traceScan {
  to {
    transform: rotate(360deg);
  }
}

@keyframes tracePulse {
  0%,
  100% {
    opacity: 0.76;
    transform: scale(1);
    transform-origin: center;
  }

  50% {
    opacity: 1;
    transform: scale(1.18);
    transform-origin: center;
  }
}

@keyframes traceDraw {
  0% {
    opacity: 0.32;
    stroke-dashoffset: 32;
  }

  42%,
  72% {
    opacity: 1;
    stroke-dashoffset: 0;
  }

  100% {
    opacity: 0.36;
    stroke-dashoffset: -32;
  }
}

@keyframes logoStageIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 860px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand {
    min-width: 0;
  }

  .primary-nav {
    justify-content: flex-start;
  }

  .page-head,
  .profile-hero,
  .case-desk-grid,
  .grid.two,
  .grid.three,
  .grid.sidebar,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .record-row {
    grid-template-columns: 1fr;
  }

  .portrait-stage {
    min-height: 220px;
    order: -1;
  }

  .case-desk-brand {
    order: -1;
    justify-content: start;
    padding: 1.15rem 1.3rem 0;
  }

  .case-desk-copy {
    padding-top: 0.75rem;
  }

  .trace-motion-logo {
    width: 7.75rem;
  }

  .profile-copy {
    align-self: start;
  }

  .portrait-cutout {
    width: min(16rem, 72%);
  }

  .folder-wall {
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-scan,
  .logo-line,
  .logo-node,
  .trace-motion-logo,
  .reveal,
  .card,
  .claim-card,
  .source-card,
  .edge-card,
  .panel,
  .portrait-cutout {
    animation: none;
  }
}

@media (max-width: 520px) {
  .app-shell {
    width: min(100% - 1rem, var(--max));
  }

  .page-head h1,
  .loading-card h1 {
    font-size: 2.15rem;
  }

  .primary-nav a,
  .button,
  button.button {
    width: auto;
    min-height: 2.6rem;
  }

  .person-card {
    grid-template-columns: 1fr;
  }

  .profile-copy h1 {
    font-size: 3rem;
  }

  .score-orbit {
    width: 5.9rem;
  }
}
