:root {
  --background: #0b0e12;
  --panel: #141a20;
  --panel-deep: #10151a;
  --panel-soft: #182028;
  --border: #27313a;
  --border-bright: #384653;
  --text: #e8ecef;
  --muted: #a6b0b8;
  --dim: #74808a;
  --accent: #c89b3c;
  --warning: #c45a4f;
  --success: #6f9d6f;
  --amber-soft: rgba(200, 155, 60, 0.12);
  --ink-soft: rgba(232, 236, 239, 0.045);
  --shadow: rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  color: var(--text);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent 34%),
    linear-gradient(rgba(232, 236, 239, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 236, 239, 0.014) 1px, transparent 1px),
    var(--background);
  background-size: 48px 48px;
  color: var(--text);
  font-family: Inter, "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 340px;
  min-height: 100vh;
}

.side-rail,
.context-column {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  border-color: var(--border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 28%),
    rgba(16, 21, 26, 0.94);
}

.side-rail {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 24px 18px;
  border-right: 1px solid var(--border);
}

.context-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border-left: 1px solid var(--border);
}

.main-column {
  min-width: 0;
  padding: 18px 22px;
}

.brand-lockup {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.brand-lockup strong {
  display: block;
  font-size: 16px;
  letter-spacing: 0.18em;
}

.brand-lockup small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.mark {
  position: relative;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-bright);
  background:
    linear-gradient(135deg, rgba(200, 155, 60, 0.14), transparent 48%),
    var(--panel);
  box-shadow: inset 0 0 0 1px rgba(232, 236, 239, 0.04);
}

.mark span {
  position: absolute;
  left: 10px;
  width: 20px;
  height: 2px;
  background: var(--accent);
  transform-origin: left center;
}

.mark span:nth-child(1) {
  top: 10px;
  transform: rotate(90deg);
}

.mark span:nth-child(2) {
  top: 19px;
  transform: rotate(32deg);
}

.mark span:nth-child(3) {
  top: 22px;
  transform: rotate(-38deg);
}

.nav-list {
  display: grid;
  gap: 4px;
}

.nav-list button {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.nav-list button:hover,
.nav-list button[aria-current="page"] {
  border-color: var(--border);
  background:
    linear-gradient(90deg, rgba(200, 155, 60, 0.11), transparent 72%),
    var(--panel);
  color: var(--text);
}

.rail-panel,
.quick-facts,
.relationship-panel,
.source-ledger,
.quote-panel,
.folder-card,
.priority-brief,
.dossier,
.search-results,
.timeline-panel {
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent 34%),
    rgba(20, 26, 32, 0.9);
  box-shadow:
    0 18px 48px var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.rail-panel,
.quick-facts,
.relationship-panel,
.source-ledger,
.quote-panel,
.priority-brief,
.folder-card,
.dossier,
.search-results,
.timeline-panel {
  padding: 22px;
}

.eyebrow,
.network-stamp,
.folder-tab,
.result-type,
.timeline-event span,
.info-grid dt,
.reference-row > span,
.metric span,
.alert-line span,
.threat-cell span,
.relationship-list span {
  color: var(--dim);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.alert-line {
  position: relative;
  display: grid;
  gap: 3px;
  padding: 12px 0 12px 16px;
  border-bottom: 1px solid var(--border);
}

.alert-line::before {
  position: absolute;
  top: 18px;
  left: 0;
  width: 6px;
  height: 6px;
  border: 1px solid var(--accent);
  background: rgba(200, 155, 60, 0.24);
  content: "";
}

.alert-line:last-child {
  border-bottom: 0;
}

.alert-line strong {
  font-size: 13px;
  font-weight: 600;
}

.hero-band {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: end;
  min-height: 142px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  background:
    linear-gradient(116deg, transparent 0 62%, rgba(200, 155, 60, 0.08) 62% 63%, transparent 63%),
    linear-gradient(90deg, rgba(200, 155, 60, 0.09), transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    var(--panel-deep);
}

.hero-band::before {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(232, 236, 239, 0.035);
  pointer-events: none;
  content: "";
}

.hero-band::after {
  position: absolute;
  right: 32px;
  bottom: 18px;
  width: 28%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 155, 60, 0.5));
  content: "";
}

.hero-band h1 {
  max-width: 760px;
  margin: 10px 0 8px;
  font-size: 42px;
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-instrument {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.hero-sigil {
  display: none;
}

.hero-sigil span {
  position: absolute;
  height: 1px;
  background: rgba(200, 155, 60, 0.68);
  transform-origin: left center;
}

.hero-sigil span:nth-child(1) {
  top: 25px;
  left: 22px;
  width: 42%;
  transform: rotate(28deg);
}

.hero-sigil span:nth-child(2) {
  top: 76px;
  left: 26px;
  width: 62%;
  transform: rotate(-16deg);
}

.hero-sigil span:nth-child(3) {
  top: 34px;
  right: 24px;
  width: 34%;
  transform: rotate(91deg);
}

.hero-sigil span:nth-child(4) {
  bottom: 20px;
  right: 32px;
  width: 18%;
}

.access-card {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  border: 1px solid rgba(200, 155, 60, 0.34);
  background:
    linear-gradient(90deg, rgba(200, 155, 60, 0.1), transparent),
    rgba(11, 14, 18, 0.58);
}

.access-card span,
.access-card strong {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.access-card span {
  color: var(--accent);
}

.access-card strong {
  color: var(--text);
}

.hero-band p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.hero-ledger,
.brief-table {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  background: rgba(11, 14, 18, 0.52);
}

.brief-table {
  grid-template-columns: repeat(4, 1fr);
  margin-top: 24px;
}

.metric {
  min-width: 0;
  padding: 10px 12px;
  border-right: 1px solid var(--border);
}

.metric:last-child {
  border-right: 0;
}

.metric strong {
  display: block;
  margin-top: 5px;
  color: var(--accent);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 22px;
  font-weight: 600;
}

.metric em {
  display: block;
  margin-top: 4px;
  color: var(--dim);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-strip {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(0, 1.4fr);
  gap: 16px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--border);
  background:
    linear-gradient(90deg, rgba(200, 155, 60, 0.06), transparent 52%),
    var(--panel);
}

.search-field {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  border: 1px solid var(--border-bright);
  background: #0f1419;
}

.search-field span {
  display: grid;
  place-items: center;
  height: 100%;
  border-right: 1px solid var(--border);
  color: var(--accent);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.search-strip input {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--text);
}

.search-strip input::placeholder {
  color: var(--dim);
}

.filter-row,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filter-row button,
.link-chip {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  background: var(--panel-deep);
  color: var(--muted);
  cursor: pointer;
}

.filter-row button:hover,
.filter-row button.active,
.link-chip:hover {
  border-color: rgba(200, 155, 60, 0.58);
  background: rgba(200, 155, 60, 0.08);
  color: var(--text);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 10px 0 14px;
  color: var(--dim);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
}

.breadcrumbs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.breadcrumbs button:hover {
  color: var(--accent);
}

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

.section-index {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  background:
    linear-gradient(90deg, rgba(200, 155, 60, 0.045), transparent 64%),
    rgba(20, 26, 32, 0.86);
  box-shadow:
    0 14px 36px var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.section-index-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.section-index-header h2 {
  margin: 6px 0 6px;
  font-size: 24px;
  line-height: 1;
}

.section-index-header p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.section-index-header > strong {
  color: var(--accent);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 28px;
  font-weight: 600;
}

.index-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.index-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  min-height: 68px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  background: rgba(11, 14, 18, 0.26);
  text-align: left;
  cursor: pointer;
}

.index-item span {
  color: var(--dim);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.index-item strong {
  grid-column: 1 / -1;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.index-item small {
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.index-item:hover,
.index-item.active {
  border-color: rgba(200, 155, 60, 0.58);
  background:
    linear-gradient(90deg, rgba(200, 155, 60, 0.1), transparent 74%),
    rgba(11, 14, 18, 0.42);
}

.index-item.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.priority-brief,
.folder-card.wide {
  grid-column: 1 / -1;
}

.priority-brief h2,
.dossier-header h2 {
  margin: 10px 0 0;
  font-size: 42px;
  line-height: 1;
  letter-spacing: 0;
}

.brief-topline {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.brief-topline > span {
  padding: 5px 8px;
  border: 1px solid rgba(111, 157, 111, 0.45);
  color: var(--success);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.brief-copy {
  max-width: 820px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.folder-tab {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: -22px -22px 16px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--accent);
}

.folder-tab small {
  color: var(--dim);
  font-size: 11px;
}

.record-row,
.search-result,
.relationship-list button {
  display: grid;
  width: 100%;
  gap: 7px;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.record-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.record-row:last-child,
.relationship-list button:last-child {
  border-bottom: 0;
}

.record-row small,
.search-result small,
.threat-cell small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.record-row:hover strong,
.search-result:hover strong,
.relationship-list button:hover strong {
  color: var(--accent);
}

.record-row:hover,
.search-result:hover,
.relationship-list button:hover {
  transform: translateX(3px);
}

.intel-message,
.empty-state {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(200, 155, 60, 0.48);
  background: var(--amber-soft);
  color: var(--accent);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.search-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 14px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background:
    linear-gradient(90deg, rgba(111, 157, 111, 0.1), transparent 68%),
    rgba(11, 14, 18, 0.34);
}

.search-summary span,
.search-summary em,
.refined-empty span,
.suggestion-chip span {
  color: var(--dim);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-summary strong {
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-summary em {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--success);
}

.refined-empty {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  color: var(--text);
  font-family: inherit;
}

.refined-empty strong {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 6px;
  color: var(--accent);
  font-size: 28px;
  line-height: 1;
}

.refined-empty p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.empty-actions button,
.suggestion-chip {
  min-height: 36px;
  border: 1px solid var(--border);
  background: rgba(11, 14, 18, 0.42);
  color: var(--muted);
  cursor: pointer;
}

.empty-actions button {
  padding: 0 12px;
}

.empty-actions button:hover,
.suggestion-chip:hover {
  border-color: rgba(200, 155, 60, 0.58);
  background: rgba(200, 155, 60, 0.08);
  color: var(--text);
}

.suggestion-strip {
  display: grid;
  gap: 10px;
}

.suggestion-strip > div:last-child {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.suggestion-chip {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  text-align: left;
}

.suggestion-chip strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-group + .result-group {
  margin-top: 24px;
}

.group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-bright);
}

.group-heading h2 {
  margin: 0;
  font-size: 18px;
}

.group-heading span {
  color: var(--accent);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.search-result {
  position: relative;
  padding: 15px 14px;
}

.search-result.selected {
  border-left: 2px solid var(--accent);
  background: rgba(200, 155, 60, 0.08);
}

.dossier {
  position: relative;
  min-height: 560px;
}

.dossier::before {
  position: absolute;
  top: 0;
  left: 22px;
  width: 96px;
  height: 3px;
  background: var(--accent);
  content: "";
}

.dossier-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-bright);
}

.dossier-meta {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.status-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  min-width: 150px;
  color: var(--accent);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  text-transform: uppercase;
}

.status-stack small {
  color: var(--dim);
  font-size: 10px;
}

.dossier-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.dossier-actions button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  background:
    linear-gradient(90deg, rgba(200, 155, 60, 0.08), transparent 78%),
    rgba(11, 14, 18, 0.42);
  color: var(--muted);
  cursor: pointer;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dossier-actions button:hover {
  border-color: rgba(200, 155, 60, 0.58);
  color: var(--text);
}

blockquote {
  margin: 18px 0;
  padding: 16px 18px;
  border-left: 2px solid var(--accent);
  background:
    linear-gradient(90deg, rgba(200, 155, 60, 0.1), transparent),
    rgba(200, 155, 60, 0.04);
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.5;
}

.dossier-section,
.cross-ref {
  display: grid;
  gap: 18px;
}

.dossier-section {
  margin-top: 22px;
  gap: 8px;
}

.dossier-section h2,
.cross-ref h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
}

.dossier-section p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 22px 0 0;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.info-grid div {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(11, 14, 18, 0.14);
}

.info-grid dt {
  margin-bottom: 8px;
}

.info-grid dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.cross-ref {
  margin-top: 22px;
}

.reference-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

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

.quick-facts .info-grid {
  grid-template-columns: 1fr;
  margin-top: 14px;
}

.source-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.source-entry {
  padding: 12px;
  border: 1px solid var(--border);
  background: rgba(11, 14, 18, 0.24);
}

.source-entry div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.source-entry strong {
  color: var(--text);
  font-size: 13px;
}

.source-entry span,
.source-entry small,
.ledger-empty {
  color: var(--dim);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.source-entry p {
  margin: 8px 0 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.audit-trail {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-bright);
}

.audit-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.audit-header h2 {
  margin: 0;
  font-size: 18px;
}

.audit-header span {
  color: var(--dim);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.audit-entry {
  display: grid;
  gap: 8px;
  padding: 13px 0;
  border-top: 1px solid var(--border);
}

.audit-entry div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
}

.audit-entry span,
.audit-entry small {
  color: var(--dim);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.audit-entry strong {
  color: var(--accent);
  font-size: 14px;
}

.audit-entry p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.relationship-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.relationship-controls {
  display: inline-flex;
  border: 1px solid var(--border);
  background: rgba(11, 14, 18, 0.32);
}

.relationship-controls button {
  min-height: 28px;
  padding: 0 8px;
  border: 0;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.relationship-controls button:last-child {
  border-right: 0;
}

.relationship-controls button:hover,
.relationship-controls button.active {
  background: rgba(200, 155, 60, 0.1);
  color: var(--accent);
}

.graph-stage {
  position: relative;
  height: 280px;
  margin-top: 16px;
  border: 1px solid var(--border);
  background:
    linear-gradient(90deg, transparent 49%, rgba(200, 155, 60, 0.16) 50%, transparent 51%),
    linear-gradient(transparent 49%, rgba(200, 155, 60, 0.12) 50%, transparent 51%),
    var(--panel-deep);
}

.graph-node {
  position: absolute;
  display: grid;
  place-items: center;
  width: 86px;
  min-height: 72px;
  padding: 8px;
  border: 1px solid var(--border-bright);
  background: var(--panel);
  color: var(--muted);
  text-align: center;
  cursor: pointer;
}

.graph-node span {
  color: var(--accent);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
}

.graph-node strong {
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.15;
}

.graph-node em {
  color: var(--dim);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.graph-node.network {
  border-style: dashed;
}

.graph-node:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-2px);
}

.graph-node.primary {
  top: 104px;
  left: calc(50% - 43px);
  border-color: var(--accent);
}

.node-1 { top: 16px; left: 18px; }
.node-2 { top: 18px; right: 18px; }
.node-3 { top: 108px; left: 18px; }
.node-4 { top: 108px; right: 18px; }
.node-5 { bottom: 16px; left: 66px; }
.node-6 { right: 66px; bottom: 16px; }

.relationship-list {
  display: grid;
  gap: 0;
  margin-top: 16px;
}

.relationship-list button {
  grid-template-columns: minmax(0, 1fr);
  padding-left: 10px;
  border-left: 2px solid transparent;
}

.relationship-list button.direct {
  border-left-color: var(--accent);
}

.relationship-list button.inferred {
  border-left-color: var(--border-bright);
}

.relationship-list button.network {
  border-left-color: var(--dim);
}

.relationship-list small {
  color: var(--dim);
  font-size: 12px;
  line-height: 1.35;
}

.quote-panel p {
  margin: 12px 0 0;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.55;
}

.reliability {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  width: max-content;
  max-width: 100%;
  padding: 0 8px;
  border: 1px solid var(--border-bright);
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
}

.r-5 {
  border-color: rgba(111, 157, 111, 0.58);
  color: var(--success);
}

.r-4 {
  border-color: rgba(200, 155, 60, 0.58);
  color: var(--accent);
}

.r-3 {
  color: #d0c5a8;
}

.r-2,
.r-1 {
  border-color: rgba(196, 90, 79, 0.58);
  color: var(--warning);
}

.timeline-panel {
  position: relative;
  display: grid;
  gap: 18px;
  overflow-x: auto;
}

.timeline-axis {
  position: absolute;
  top: 40px;
  bottom: 40px;
  left: 112px;
  width: 1px;
  background: var(--border-bright);
}

.timeline-event {
  position: relative;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 28px;
  min-width: 0;
  padding: 18px 0;
}

.timeline-date {
  color: var(--accent);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
}

.timeline-event h2 {
  margin: 6px 0 8px;
  font-size: 22px;
}

.timeline-event p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .hero-band {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .hero-band h1 {
    font-size: 38px;
  }

  .context-column {
    position: static;
    grid-column: 1 / -1;
    height: auto;
    border-top: 1px solid var(--border);
    border-left: 0;
  }
}

@media (max-width: 860px) {
  .app-shell {
    display: block;
  }

  .side-rail,
  .context-column {
    height: auto;
  }

  .side-rail {
    position: sticky;
    top: 0;
    z-index: 20;
    gap: 12px;
    padding: 12px 14px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .brand-lockup {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 9px;
    padding-bottom: 10px;
  }

  .brand-lockup strong {
    font-size: 14px;
  }

  .brand-lockup small {
    font-size: 9px;
  }

  .mark {
    width: 30px;
    height: 30px;
  }

  .mark span {
    left: 8px;
    width: 16px;
  }

  .mark span:nth-child(1) {
    top: 8px;
  }

  .mark span:nth-child(2) {
    top: 15px;
  }

  .mark span:nth-child(3) {
    top: 18px;
  }

  .nav-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
  }

  .nav-list::-webkit-scrollbar,
  .filter-row::-webkit-scrollbar {
    display: none;
  }

  .nav-list button {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 12px;
    white-space: nowrap;
  }

  .rail-panel {
    display: none;
  }

  .main-column {
    padding: 12px;
  }

  .hero-band,
  .search-strip,
  .dashboard-grid,
  .section-index-header,
  .dossier-header,
  .reference-row {
    grid-template-columns: 1fr;
  }

  .hero-band {
    gap: 12px;
    min-height: 0;
    padding: 14px;
  }

  .hero-band::before {
    inset: 8px;
  }

  .hero-band::after {
    display: none;
  }

  .hero-band h1 {
    margin: 8px 0 6px;
    font-size: 30px;
  }

  .hero-band p {
    font-size: 14px;
  }

  .hero-instrument {
    max-width: none;
  }

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

  .brief-table,
  .info-grid,
  .index-list {
    grid-template-columns: 1fr;
  }

  .brief-table .metric,
  .info-grid .metric {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .hero-ledger .metric {
    padding: 8px;
    border-right: 1px solid var(--border);
    border-bottom: 0;
  }

  .hero-ledger .metric:last-child,
  .brief-table .metric:last-child,
  .info-grid .metric:last-child {
    border-bottom: 0;
  }

  .hero-ledger .metric:last-child {
    border-right: 0;
  }

  .metric strong {
    font-size: 18px;
  }

  .search-strip {
    gap: 10px;
    margin: 10px 0;
    padding: 10px;
  }

  .filter-row {
    flex-wrap: nowrap;
    align-items: stretch;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .filter-row button {
    flex: 0 0 auto;
    min-height: 36px;
    white-space: nowrap;
  }

  .rail-panel,
  .quick-facts,
  .relationship-panel,
  .source-ledger,
  .quote-panel,
  .priority-brief,
  .folder-card,
  .dossier,
  .search-results,
  .timeline-panel {
    padding: 16px;
  }

  .folder-tab {
    margin: -16px -16px 14px;
  }

  .dossier {
    min-height: 0;
  }

  .dossier-header {
    flex-direction: column;
  }

  .dossier-meta {
    justify-items: start;
  }

  .status-stack {
    align-items: flex-start;
  }

  .context-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 12px;
    border-left: 0;
  }

  .relationship-panel,
  .quote-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .hero-band h1 {
    font-size: 26px;
  }

  .access-card {
    display: none;
  }

  .search-field {
    grid-template-columns: 32px 1fr;
  }

  .search-strip input {
    min-height: 38px;
  }

  .context-column,
  .refined-empty,
  .search-summary {
    grid-template-columns: 1fr;
  }

  .search-summary em {
    grid-row: auto;
    grid-column: auto;
  }

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

  .priority-brief h2,
  .dossier-header h2 {
    font-size: 28px;
  }

  .section-index-header h2 {
    font-size: 21px;
  }

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

  .graph-stage {
    height: auto;
    min-height: 0;
    padding: 12px;
  }

  .graph-node,
  .graph-node.primary,
  .node-1,
  .node-2,
  .node-3,
  .node-4,
  .node-5,
  .node-6 {
    position: static;
    width: 100%;
    min-height: 48px;
    margin-bottom: 8px;
  }
}

@media print {
  @page {
    margin: 0.55in;
  }

  *,
  *::before,
  *::after {
    box-shadow: none !important;
    text-shadow: none !important;
  }

  html,
  body {
    background: #fff !important;
    color: #111 !important;
  }

  .side-rail,
  .context-column,
  .hero-band,
  .search-strip,
  .breadcrumbs,
  .section-index,
  .dossier-actions {
    display: none !important;
  }

  .app-shell,
  .main-column,
  #content {
    display: block !important;
    min-height: 0 !important;
    padding: 0 !important;
  }

  .dossier {
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: #fff !important;
    color: #111 !important;
  }

  .dossier::before {
    display: none !important;
  }

  .dossier-header {
    break-inside: avoid;
    padding-bottom: 12px;
    border-bottom: 2px solid #111 !important;
  }

  .dossier-header h2 {
    color: #111 !important;
    font-size: 28pt !important;
  }

  .eyebrow,
  .status-stack,
  .status-stack small,
  .info-grid dt,
  .reference-row > span,
  .audit-header span,
  .audit-entry span,
  .audit-entry small {
    color: #333 !important;
  }

  .reliability,
  .status-stack span {
    border-color: #111 !important;
    background: transparent !important;
    color: #111 !important;
  }

  blockquote,
  .info-grid,
  .info-grid div,
  .reference-row,
  .audit-entry,
  .link-chip {
    border-color: #999 !important;
    background: transparent !important;
  }

  blockquote,
  .dossier-section p,
  .info-grid dd,
  .audit-entry p,
  .link-chip {
    color: #111 !important;
  }

  .cross-ref,
  .audit-trail,
  .dossier-section,
  .info-grid {
    break-inside: avoid;
  }

  .link-chip {
    padding: 0 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
