:root {
  --bg: #f3efe4;
  --ink: #172126;
  --muted: #626b67;
  --line: #d6ccba;
  --panel: #fffaf0;
  --panel-strong: #eee6d4;
  --surface: #fffdf7;
  --surface-alt: #f7f2e8;
  --chip: #e8eadf;
  --red: #8f3e3f;
  --teal: #1e5b6e;
  --green: #526955;
  --yellow: #c7a052;
  --blue: #213f55;
  --black: #11191d;
  --shadow: 0 18px 44px rgba(35, 31, 24, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Spectral", Georgia, serif;
  font-size: 18px;
  line-height: 1.55;
  letter-spacing: 0;
  overflow-x: hidden;
}

html {
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
}

.topbar,
.topbar > *,
.shell,
.shell > *,
.filters,
.filters > *,
.content,
.content > *,
.overview,
.overview > *,
.service-dossier,
.service-dossier > *,
.intelligence-section,
.intelligence-section > *,
.matrix-section,
.matrix-section > *,
.guardrails-section,
.guardrails-section > *,
.visual-band,
.visual-band > *,
.contracts-section,
.contracts-section > *,
.split,
.split > *,
.detail-panel,
.detail-panel > *,
.colophon,
.colophon > * {
  min-width: 0;
}

h1,
h2,
h3,
h4,
p,
li,
dt,
dd,
button,
a,
small,
span,
strong,
em {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 32px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.topbar h1 {
  max-width: 980px;
  margin: 4px 0 0;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 800;
  font-size: clamp(28px, 4vw, 58px);
  line-height: 0.98;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.standfirst {
  max-width: 1060px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 23px);
  line-height: 1.38;
}

.eyebrow {
  margin: 0;
  color: var(--red);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 800;
  text-transform: none;
}

.source-note {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
  min-width: 210px;
}

.source-note a,
.source-link {
  color: var(--teal);
  font-weight: 750;
  text-decoration: none;
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 18px;
  padding: 18px;
}

.detail-panel {
  position: sticky;
  top: 18px;
  align-self: start;
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.filters,
.detail-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.filters {
  padding: 18px;
}

.search-label,
.filter-block p {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: none;
}

input,
select,
button {
  font: inherit;
}

button,
select,
input,
.source-note,
.contract-meta,
.metric span,
.metric small,
.tag-strip span,
.source-chip,
.source-link,
.filter-button,
.ghost-button,
.link-button,
dt {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(27, 127, 120, 0.14);
}

.filter-block {
  margin-top: 20px;
}

.button-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.filter-button,
.ghost-button,
.link-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-weight: 750;
}

.filter-button.active,
.ghost-button:hover,
.link-button:hover {
  border-color: var(--black);
  background: var(--black);
  color: white;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  text-decoration: none;
}

.method-note {
  border-left: 3px solid var(--red);
  padding-left: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.content {
  display: grid;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
}

.overview,
.executive-section,
.lead-section,
.service-dossier,
.intelligence-section,
.matrix-section,
.guardrails-section,
.visual-band,
.split > div,
.contracts-section,
.methodology-section {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.overview {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 18px;
  padding: 22px;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}

.overview .headline,
.overview .data-filters,
.overview .metric-grid {
  grid-column: 1 / -1;
}

.data-filters {
  margin: -2px 0 0;
  background: var(--surface-alt);
  box-shadow: none;
}

.executive-section,
.lead-section {
  padding: 22px;
}

.executive-summary ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: summary;
  border: 1px solid var(--line);
  background: var(--line);
}

.executive-summary li {
  counter-increment: summary;
  min-width: 0;
  background: var(--surface);
}

.executive-summary a,
.executive-summary .summary-cell {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  min-height: 100%;
  padding: 14px;
  color: inherit;
  text-decoration: none;
}

.executive-summary a::before,
.executive-summary .summary-cell::before {
  content: counter(summary);
  color: var(--red);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 850;
}

.service-multiples {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  border: 1px solid var(--line);
  background: var(--line);
}

.service-mini {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  background: var(--surface);
}

.service-mini-head strong {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-size: 22px;
  line-height: 1;
}

.service-mini-head span,
.service-mini dt,
.mini-value span,
.mini-chart-head span,
.mini-bars em {
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 750;
}

.mini-value {
  display: grid;
  gap: 3px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.mini-value strong {
  display: block;
  color: var(--ink);
  font-family: "Fraunces", Georgia, serif;
  font-size: 21px;
  line-height: 1.05;
}

.mini-chart-head {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

.mini-chart-head strong {
  color: var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.mini-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 4px;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
}

.mini-bars span {
  display: grid;
  grid-template-rows: 44px auto;
  gap: 4px;
  align-items: end;
  min-width: 0;
}

.mini-bars i {
  display: block;
  align-self: end;
  width: 100%;
  height: var(--h);
  min-height: 2px;
  background: var(--blue);
}

.mini-bars em {
  display: block;
  min-width: 0;
  font-size: 9px;
  font-style: normal;
  line-height: 1;
  text-align: center;
}

.service-mini dl {
  display: grid;
  gap: 7px;
  margin: 0;
}

.service-mini dl div {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px;
}

.service-mini dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.lead-read {
  max-width: 980px;
}

.lead-read-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.lead-read-head h2 {
  margin: 6px 0 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 0.98;
}

.lead-read-head > span {
  border: 1px solid var(--line);
  padding: 6px 9px;
  white-space: nowrap;
  color: var(--red);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 850;
}

.lead-read p {
  max-width: 900px;
  margin: 18px 0 0;
  color: var(--ink);
  font-size: clamp(20px, 2.1vw, 30px);
  line-height: 1.32;
}

.lead-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.lead-switcher button {
  min-height: 36px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
  cursor: pointer;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 800;
}

.lead-switcher button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.headline,
.metric-grid {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.headline h2,
.section-heading h2 {
  margin: 6px 0 0;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 800;
  font-size: clamp(22px, 3vw, 38px);
  line-height: 1.05;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

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

.metric {
  display: grid;
  gap: 8px;
  min-width: 0;
  min-height: 118px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.metric span,
.metric small,
.contract-meta,
.stack-head span,
.layer-row span {
  color: var(--muted);
}

.metric strong {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1;
  letter-spacing: 0;
}

.confidence-toggle {
  align-content: start;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  max-width: 360px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
  padding: 4px;
}

.segmented-control button {
  min-height: 34px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 850;
}

.segmented-control button.active {
  background: var(--black);
  color: white;
}

.tech-term {
  position: relative;
  display: inline;
  z-index: 1;
  color: var(--teal);
  border-bottom: 1px dotted currentColor;
  cursor: help;
  outline: none;
  overflow-wrap: normal;
  word-break: normal;
}

.tech-term:hover,
.tech-term:focus,
.tech-term:focus-within {
  z-index: 80;
}

.tech-term:focus-visible {
  box-shadow: 0 0 0 3px rgba(11, 112, 107, 0.18);
}

.term-label {
  display: inline;
  overflow-wrap: normal;
  word-break: normal;
}

.term-pop {
  position: fixed;
  display: none;
  left: var(--tooltip-left, 50vw);
  top: var(--tooltip-top, 0px);
  bottom: auto;
  z-index: 10000;
  width: min(340px, calc(100vw - 32px));
  max-width: min(340px, calc(100vw - 32px));
  padding: 11px 13px;
  border: 1px solid var(--teal);
  background: var(--black);
  color: white;
  box-shadow: 0 16px 36px rgba(12, 17, 16, 0.24);
  font-family: "Spectral", Georgia, serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  opacity: 0;
  overflow-wrap: break-word;
  pointer-events: none;
  transform: translate(-50%, -6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  visibility: hidden;
  white-space: normal;
  word-break: normal;
}

.term-pop.is-measuring {
  display: block;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: none;
}

.term-pop.is-above {
  top: var(--tooltip-top, 0px);
  bottom: auto;
  transform: translate(-50%, 6px);
}

.term-pop.align-left {
  left: 0;
  transform: translate(0, -6px);
}

.term-pop.align-right {
  left: 100%;
  transform: translate(-100%, -6px);
}

.term-pop.is-above.align-left {
  transform: translate(0, 6px);
}

.term-pop.is-above.align-right {
  transform: translate(-100%, 6px);
}

.term-pop::after {
  position: absolute;
  left: var(--tooltip-arrow-left, 50%);
  top: -6px;
  width: 10px;
  height: 10px;
  border-top: 1px solid var(--teal);
  border-left: 1px solid var(--teal);
  background: var(--black);
  content: "";
  transform: translateX(-50%) rotate(45deg);
}

.term-pop.is-above::after {
  top: auto;
  bottom: -6px;
  border-top: 0;
  border-right: 1px solid var(--teal);
  border-bottom: 1px solid var(--teal);
  border-left: 0;
}

.term-pop.align-left::after {
  left: var(--tooltip-arrow-left, 18px);
  transform: rotate(45deg);
}

.term-pop.align-right::after {
  right: 18px;
  left: auto;
  transform: rotate(45deg);
}

.tech-term:hover .term-pop,
.tech-term:focus .term-pop,
.tech-term:focus-within .term-pop {
  display: block;
  opacity: 1;
  transform: translate(-50%, 0);
  visibility: visible;
}

.tech-term:hover .term-pop.align-left,
.tech-term:focus .term-pop.align-left,
.tech-term:focus-within .term-pop.align-left {
  transform: translate(0, 0);
}

.tech-term:hover .term-pop.align-right,
.tech-term:focus .term-pop.align-right,
.tech-term:focus-within .term-pop.align-right {
  transform: translate(-100%, 0);
}

.metric small {
  font-size: 12px;
  line-height: 1.35;
}

.service-dossier {
  display: grid;
  gap: 16px;
}

.dossier-heading {
  margin-bottom: 0;
}

.service-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.service-tab {
  display: grid;
  gap: 4px;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.service-tab span {
  font-size: 15px;
  font-weight: 900;
}

.service-tab small {
  color: var(--muted);
  font-size: 12px;
}

.service-tab.active,
.service-tab:hover {
  border-color: var(--black);
  background: var(--black);
  color: white;
}

.service-tab.active small,
.service-tab:hover small {
  color: rgba(255, 255, 255, 0.74);
}

.dossier-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 14px;
  min-width: 0;
}

.dossier-brief {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(11, 112, 107, 0.09), rgba(164, 54, 61, 0.04)),
    var(--surface);
}

.dossier-brief h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 800;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
  letter-spacing: 0;
}

.dossier-brief p {
  margin: 0;
  max-width: 920px;
  color: var(--muted);
  line-height: 1.55;
}

.dossier-brief .subtitle {
  color: var(--ink);
  font-size: 18px;
  font-weight: 780;
  line-height: 1.28;
}

.known-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.known-stack span {
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--ink);
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 800;
}

.dossier-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.dossier-metrics div {
  display: grid;
  gap: 4px;
  min-height: 78px;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.dossier-metrics strong {
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1;
  overflow-wrap: anywhere;
}

.dossier-metrics span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.dossier-side {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.side-block {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
}

.side-block p,
.side-block li {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.side-block p {
  margin: 8px 0 0;
}

.side-block .eyebrow {
  margin: 0;
  color: var(--red);
}

.side-block ul {
  display: grid;
  gap: 8px;
  margin: 8px 0 0;
  padding-left: 18px;
}

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

.capability-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.capability-card:hover {
  border-color: var(--teal);
}

.return-target-flash {
  animation: returnTargetFlash 1.35s ease-out;
  outline: 3px solid rgba(30, 91, 110, 0.55);
  outline-offset: 4px;
}

@keyframes returnTargetFlash {
  0% {
    background: #eef7f4;
    outline-color: rgba(30, 91, 110, 0.95);
  }
  100% {
    background: var(--surface);
    outline-color: rgba(30, 91, 110, 0);
  }
}

.capability-meta,
.inference-meta,
.contract-flags,
.detail-flags,
.readout-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.meta-chip,
.confidence-badge,
.scale-badge,
.value-status {
  display: inline-grid;
  gap: 2px;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  background: var(--chip);
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.15;
}

.meta-chip b,
.confidence-badge b,
.scale-badge b {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.meta-chip em,
.confidence-badge em,
.scale-badge em {
  font-style: normal;
}

.confidence-badge {
  border-color: rgba(11, 112, 107, 0.32);
  background: #eef7f4;
}

.confidence-badge em {
  color: var(--teal);
}

.confidence-mediu em,
.confidence-scazut em,
.confidence-scăzut em {
  color: var(--yellow);
}

.scale-badge {
  border-color: rgba(164, 54, 61, 0.25);
  background: #f7efef;
}

.confidence-badge,
.inference-card,
.matrix-cell,
.timeline-event {
  --evidence-bg: rgba(30, 91, 110, 0.1);
  --evidence-border: rgba(30, 91, 110, 0.42);
  --read-border: rgba(30, 91, 110, 0.68);
}

.evidence-ridicat {
  --evidence-bg: rgba(30, 91, 110, 0.18);
  --evidence-border: rgba(30, 91, 110, 0.58);
}

.evidence-mediu {
  --evidence-bg: rgba(30, 91, 110, 0.1);
  --evidence-border: rgba(30, 91, 110, 0.42);
}

.evidence-scazut,
.evidence-neprecizat {
  --evidence-bg: rgba(30, 91, 110, 0.045);
  --evidence-border: rgba(30, 91, 110, 0.26);
}

.read-ridicat {
  --read-border: rgba(30, 91, 110, 0.78);
  border-style: solid;
}

.read-mediu {
  --read-border: rgba(30, 91, 110, 0.68);
  border-style: dashed;
}

.read-scazut,
.read-neprecizat {
  --read-border: rgba(30, 91, 110, 0.52);
  border-style: dotted;
}

.confidence-badge.evidence-ridicat,
.confidence-badge.evidence-mediu,
.confidence-badge.evidence-scazut,
.confidence-badge.evidence-neprecizat {
  border-color: var(--read-border);
  background: var(--evidence-bg);
}

.value-status {
  align-content: center;
  color: var(--muted);
}

.capability-card h3 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 800;
  font-size: 20px;
  line-height: 1.15;
}

.readout-list {
  gap: 10px;
}

.readout-list div {
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 10px;
  border-bottom-color: rgba(204, 215, 209, 0.75);
}

.readout-list dd {
  color: var(--muted);
  line-height: 1.45;
}

.source-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  align-self: end;
}

.source-label {
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 800;
}

.source-chip {
  min-height: 24px;
  padding: 0 7px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
  color: var(--teal);
  cursor: pointer;
  font-size: 10px;
  font-weight: 850;
}

.source-chip.compact {
  min-height: 22px;
  padding: 0 7px;
}

.source-chip.missing {
  display: inline-flex;
  align-items: center;
  cursor: help;
  color: var(--muted);
}

.source-chip:hover {
  border-color: var(--teal);
  background: var(--teal);
  color: white;
}

.service-dossier,
.intelligence-section,
.matrix-section,
.guardrails-section,
.visual-band,
.contracts-section,
.split > div,
.methodology-section {
  padding: 20px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  min-width: 0;
  margin-bottom: 18px;
}

.section-heading > * {
  min-width: 0;
}

.section-heading.compact {
  margin-bottom: 14px;
}

.section-heading.compact h2 {
  font-size: 24px;
}

.context-copy {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  text-align: right;
}

.confidence-budget {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.confidence-budget div {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
}

.confidence-budget strong {
  font-family: "Fraunces", Georgia, serif;
  font-size: 30px;
  line-height: 1;
}

.confidence-budget span {
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 800;
}

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

.inference-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.inference-card.evidence-ridicat,
.inference-card.evidence-mediu,
.inference-card.evidence-scazut,
.inference-card.evidence-neprecizat {
  border-color: var(--read-border);
  background:
    linear-gradient(0deg, var(--evidence-bg), var(--evidence-bg)),
    var(--surface);
}

.inference-card h3 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 21px;
  line-height: 1.13;
}

.inference-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.46;
}

.inference-card .population {
  color: var(--ink);
  font-weight: 650;
}

.scale-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.counter {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border-left: 3px solid var(--yellow);
  background: #fbf7ee;
}

.counter strong {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--red);
}

.counter span,
.related-evidence span {
  color: var(--muted);
  line-height: 1.42;
}

.related-evidence {
  display: grid;
  gap: 5px;
  padding: 9px 10px;
  border: 1px dashed var(--line);
  background: var(--surface-alt);
  font-size: 14px;
}

.supplier-network,
.renewal-strip {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
}

.supplier-network > strong {
  color: var(--red);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
}

.supplier-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.2fr);
  gap: 8px;
  align-items: start;
  padding-top: 8px;
  border-top: 1px solid rgba(204, 215, 209, 0.75);
}

.supplier-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.supplier-row > div:first-child {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.supplier-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.supplier-chips span,
.renewal-strip span {
  border: 1px solid var(--line);
  background: var(--chip);
  color: var(--ink);
  padding: 4px 7px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 750;
}

.renewal-strip {
  display: flex;
  flex-wrap: wrap;
}

.renewal-strip span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.renewal-strip b {
  color: var(--red);
}

.matrix-legend {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--muted);
}

.matrix-legend p {
  max-width: 1040px;
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.legend-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 800;
}

.legend-samples span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-samples i {
  width: 12px;
  height: 12px;
  border: 1px solid var(--line);
}

.legend-samples .confirmed {
  background: var(--teal);
}

.legend-samples .inferred {
  border-style: dashed;
  background: repeating-linear-gradient(135deg, rgba(30, 91, 110, 0.24), rgba(30, 91, 110, 0.24) 4px, transparent 4px, transparent 8px);
}

.legend-samples .absent {
  background: var(--surface-alt);
}

.matrix-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--surface);
}

.matrix-row {
  display: grid;
  grid-template-columns: 150px repeat(var(--matrix-cols), minmax(132px, 1fr));
  min-width: var(--matrix-min);
  border-bottom: 1px solid var(--line);
}

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

.matrix-row > div {
  min-height: 70px;
  padding: 8px;
  border-right: 1px solid var(--line);
}

.matrix-row > div:last-child {
  border-right: 0;
}

.matrix-header {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--panel-strong);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 850;
}

.matrix-header > div {
  min-height: 48px;
}

.matrix-institution {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 850;
}

.matrix-cell {
  display: grid;
  align-content: start;
  gap: 7px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 850;
  box-shadow: inset 0 0 0 1px transparent;
}

.matrix-cell.confirmed {
  background: var(--evidence-bg);
  color: var(--teal);
  box-shadow: inset 0 0 0 1px var(--read-border);
}

.matrix-cell.inferred {
  background: repeating-linear-gradient(135deg, rgba(11, 112, 107, 0.1), rgba(11, 112, 107, 0.1) 5px, rgba(255, 255, 255, 0.7) 5px, rgba(255, 255, 255, 0.7) 10px);
  color: var(--teal);
  box-shadow: inset 0 0 0 1px var(--read-border);
}

.matrix-cell.inferred.read-ridicat {
  background: repeating-linear-gradient(135deg, rgba(11, 112, 107, 0.18), rgba(11, 112, 107, 0.18) 4px, rgba(255, 255, 255, 0.82) 4px, rgba(255, 255, 255, 0.82) 8px);
}

.matrix-cell.inferred.read-mediu {
  background: repeating-linear-gradient(135deg, rgba(185, 133, 45, 0.16), rgba(185, 133, 45, 0.16) 4px, rgba(255, 255, 255, 0.82) 4px, rgba(255, 255, 255, 0.82) 12px);
}

.matrix-cell.inferred.read-scazut,
.matrix-cell.inferred.read-neprecizat {
  background: repeating-linear-gradient(135deg, rgba(95, 107, 104, 0.12), rgba(95, 107, 104, 0.12) 3px, rgba(255, 255, 255, 0.86) 3px, rgba(255, 255, 255, 0.86) 14px);
}

.matrix-cell.absent {
  background: var(--surface-alt);
  color: #9aa5a1;
}

.matrix-cell small {
  color: var(--muted);
  font-family: "Spectral", Georgia, serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.18;
}

.matrix-scale {
  width: fit-content;
  max-width: 100%;
  border-left: 3px solid var(--yellow);
  background: rgba(185, 133, 45, 0.1);
  color: var(--ink);
  padding: 2px 5px;
  font-size: 10px;
  line-height: 1.15;
}

.matrix-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.guardrails-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}

.guardrails-layout h3 {
  margin: 0 0 10px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 20px;
}

.caveat-grid,
.absence-grid,
.watchlist-grid {
  display: grid;
  gap: 10px;
}

.caveat-grid article,
.absence-grid article,
.watchlist-grid article {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.caveat-grid h4,
.absence-grid h4,
.watchlist-grid h4 {
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  color: var(--red);
}

.absence-grid article > span {
  color: var(--teal);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 850;
}

.caveat-grid p,
.absence-grid p,
.watchlist-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

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

.contracts-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin: -4px 0 14px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
}

.contracts-search {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.contracts-toolbar .ghost-button {
  min-height: 42px;
  padding: 0 16px;
}

html {
  scroll-behavior: smooth;
}

.section-index {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  padding: 10px 14px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
}

.section-index .index-label {
  color: var(--red);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
}

.section-index a {
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px dotted transparent;
  padding: 2px 0;
}

.section-index a:hover,
.section-index a:focus-visible {
  border-bottom-color: currentColor;
}

.content section[id],
.content h2[id],
.content section[aria-labelledby] {
  scroll-margin-top: 64px;
}

.lead-read-link {
  display: inline-block;
  margin: 4px 0 14px;
  color: var(--teal);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12.5px;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}

.lead-read-link::before {
  content: "→ ";
}

.entity-network {
  border: 1px solid var(--line);
  background: var(--surface);
  overflow-x: auto;
  overflow-y: hidden;
}

.entity-network svg {
  display: block;
  width: 100%;
  min-width: 720px;
  min-height: 280px;
}

.entity-edge path {
  fill: none;
  stroke-width: 2;
}

.edge-doc path {
  stroke: var(--teal);
}

.edge-proc path {
  stroke: var(--red);
  stroke-width: 3;
}

.edge-domain path {
  stroke: rgba(27, 127, 120, 0.35);
  stroke-dasharray: 4 4;
  stroke-width: 1.5;
}

.edge-label {
  fill: var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
}

.entity-node circle {
  stroke-width: 2;
}

.entity-node.kind-institution circle {
  fill: var(--red);
  stroke: var(--black);
}

.entity-node.kind-unit circle {
  fill: var(--teal);
  stroke: var(--black);
}

.entity-node.kind-domain circle {
  fill: var(--surface-alt);
  stroke: var(--teal);
  stroke-dasharray: 3 2;
}

.entity-node.kind-lead circle {
  fill: var(--surface);
  stroke: var(--red);
  stroke-dasharray: 3 2;
}

.entity-node .node-label {
  fill: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.entity-node .node-sub {
  fill: var(--ink);
  opacity: 0.72;
  font-size: 11px;
}

.entity-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11.5px;
}

.legend-item::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 0;
  margin-right: 6px;
  vertical-align: middle;
  border-top: 3px solid var(--teal);
}

.legend-proc::before {
  border-top-color: var(--red);
}

.legend-domain::before {
  border-top-style: dashed;
  border-top-width: 2px;
  border-top-color: rgba(27, 127, 120, 0.55);
}

.legend-sources {
  margin-left: auto;
  display: inline-flex;
  gap: 6px;
}

.entity-network-note {
  margin-top: 10px;
}

.network-map {
  border: 1px solid var(--line);
  background: var(--surface);
  overflow-x: auto;
  overflow-y: hidden;
  margin-bottom: 16px;
}

.network-map svg {
  display: block;
  width: 100%;
  min-height: 260px;
}

.network-map rect {
  fill: var(--surface);
}

.map-lines path {
  fill: none;
  stroke: rgba(27, 127, 120, 0.22);
}

.map-node circle {
  fill: var(--red);
  stroke: var(--read-border);
  stroke-width: 2;
}

.map-node.layer circle {
  fill: var(--teal);
}

.map-node.read-mediu circle {
  stroke-dasharray: 3 2;
}

.map-node.read-scazut circle,
.map-node.read-neprecizat circle {
  stroke-dasharray: 1 2;
}

.map-node text {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 750;
}

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

.stack-column {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 14px;
}

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

.stack-head h3,
.contract-card h3,
.insight h3,
.detail-inner h2,
.detail-inner h3 {
  margin: 0;
  letter-spacing: 0;
}

.stack-column > p {
  min-height: 58px;
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.layer-row {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.layer-row strong {
  display: block;
}

.tag-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-strip span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 18px;
  min-width: 0;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-row {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(204, 215, 209, 0.65);
}

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

.timeline-main {
  display: grid;
  grid-template-columns: 48px minmax(80px, 1fr) 112px 74px;
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 32px;
  font-size: 13px;
}

.timeline-main span {
  font-weight: 800;
}

.timeline-main strong,
.timeline-main em {
  color: var(--muted);
  font-style: normal;
  text-align: right;
}

.timeline-events {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: 58px;
}

.timeline-event {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 7px;
  border: 1px solid var(--read-border);
  background: var(--evidence-bg);
  color: var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
}

.timeline-event b {
  color: var(--red);
}

.bar-shell {
  height: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.bar {
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--yellow), var(--teal));
}

.insights {
  display: grid;
  gap: 10px;
}

.insight {
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.insight:first-child {
  border-top: 0;
  padding-top: 0;
}

.insight h3 {
  font-size: 17px;
}

.insight p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

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

.contract-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  min-height: 242px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  scroll-margin-top: 18px;
}

.contract-card.selected {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 2px var(--teal);
}

.contract-card:focus-visible {
  outline: 3px solid rgba(11, 112, 107, 0.28);
  outline-offset: 3px;
}

.contract-card:hover {
  border-color: var(--teal);
}

.contract-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-width: 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 850;
}

.contract-top strong {
  color: var(--ink);
  text-align: right;
}

.contract-card h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 800;
  font-size: 18px;
  line-height: 1.18;
}

.contract-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.contract-flags,
.detail-flags {
  margin-top: 2px;
}

.contract-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-self: end;
  font-size: 12px;
}

.contract-meta span {
  padding-right: 8px;
  border-right: 1px solid var(--line);
}

.contract-meta span:last-child {
  border-right: 0;
}

.open-cue {
  align-self: end;
  width: fit-content;
  margin-top: 4px;
  border-bottom: 1px solid var(--teal);
  color: var(--teal);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 750;
}

.contract-expanded {
  display: none;
  gap: 12px;
  min-width: 0;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  cursor: default;
}

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

.expanded-grid section,
.inline-readouts article {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
}

.expanded-grid h4,
.inline-readouts h4 {
  margin: 0;
  color: var(--red);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 850;
  text-transform: none;
}

.inline-readouts {
  display: grid;
  gap: 10px;
}

.inline-readouts article > span {
  color: var(--red);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 850;
  text-transform: none;
}

.inline-readouts p {
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.inline-readouts strong {
  color: var(--ink);
}

.expanded-footer {
  display: grid;
  gap: 10px;
}

.expanded-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.return-origin {
  min-height: 34px;
  max-width: min(100%, 720px);
  padding: 0 12px;
  border: 1px solid var(--teal);
  background: var(--panel-strong);
  color: var(--teal);
  cursor: pointer;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-align: left;
}

.return-origin:hover,
.return-origin:focus-visible {
  background: var(--teal);
  color: white;
}

.mini-source {
  width: fit-content;
  max-width: 100%;
  min-height: 34px;
  padding: 0 12px;
  background: var(--surface);
}

.detail-panel {
  padding: 18px;
}

.detail-inner {
  display: grid;
  gap: 14px;
}

.detail-inner h2 {
  font-size: 24px;
  line-height: 1.1;
}

.detail-value {
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
  color: var(--red);
}

dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

dl div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: none;
}

dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

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

.detail-readouts {
  display: grid;
  gap: 10px;
}

.detail-readouts article {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
}

.detail-readouts article > span {
  color: var(--red);
  font-size: 11px;
  font-weight: 850;
  text-transform: none;
}

.detail-readouts h4 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 800;
  font-size: 16px;
}

.detail-readouts strong {
  color: var(--ink);
}

.detail-tags {
  padding-top: 2px;
}

.source-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  max-width: 100%;
  min-height: 42px;
  border: 1px solid var(--teal);
  border-radius: 6px;
}

.coverage-table {
  display: grid;
  gap: 8px;
}

.coverage-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.75fr) 120px minmax(220px, 1.3fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.coverage-row div {
  display: grid;
  gap: 4px;
}

.coverage-row strong,
.coverage-row b {
  font-size: 16px;
}

.coverage-row span,
.coverage-row small,
.coverage-row p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.coverage-row p {
  overflow-wrap: anywhere;
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.inline-source {
  width: fit-content;
  max-width: 100%;
  padding: 0 14px;
  text-decoration: none;
}

.empty {
  border: 1px dashed var(--line);
  padding: 18px;
  color: var(--muted);
  background: var(--surface);
}

.colophon {
  padding: 0 18px 28px;
}

.colophon details {
  max-width: 1180px;
  margin: 0 auto;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--panel);
}

.colophon summary {
  min-height: 46px;
  padding: 13px 16px;
  color: var(--teal);
  cursor: pointer;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 850;
  text-transform: none;
}

.colophon-body {
  display: grid;
  gap: 14px;
  padding: 0 16px 16px;
}

.colophon-body > p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 2100px) {
  .shell {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
    padding: 16px;
    overflow-x: hidden;
  }

  .filters {
    position: static;
    max-height: none;
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.3fr) minmax(180px, 0.8fr);
    gap: 14px 18px;
    align-items: start;
  }

  .filters > .filter-block {
    margin-top: 0;
  }

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

  .overview,
  .split,
  .dossier-layout,
  .guardrails-layout {
    grid-template-columns: 1fr;
  }

  .service-multiples {
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    overflow-x: auto;
  }

  .detail-panel {
    display: none;
  }

  .contract-expanded {
    display: grid;
  }
}

@media (min-width: 1501px) and (max-width: 2100px) {
  .filters {
    grid-template-columns: minmax(380px, 1.2fr) minmax(320px, 1fr) minmax(260px, 0.8fr);
  }

  .filters > .filter-block:nth-of-type(1) {
    grid-column: 1;
    grid-row: 1;
  }

  .filters > .filter-block:nth-of-type(2) {
    grid-column: 2;
    grid-row: 1;
  }

  .filters > .filter-block:nth-of-type(3) {
    grid-column: 3;
    grid-row: 1;
  }

  .filters > .filter-block:nth-of-type(1) .button-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1500px) {
  .shell {
    grid-template-columns: 1fr;
    padding: 14px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .filters {
    position: static;
    max-height: none;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(320px, 1.15fr) minmax(260px, 1.35fr) minmax(180px, 0.7fr);
    gap: 14px 18px;
    align-items: start;
  }

  .filters > .filter-block {
    margin-top: 0;
  }

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

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

  .dossier-layout,
  .capability-board,
  .expanded-grid,
  .inference-grid,
  .guardrails-layout {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    display: none;
  }

  .contract-expanded {
    display: grid;
  }

  .overview,
  .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1350px) {
  .topbar {
    align-items: start;
  }

  .topbar h1 {
    max-width: 760px;
    font-size: clamp(34px, 5vw, 52px);
    line-height: 1.02;
  }

  .shell {
    grid-template-columns: 1fr;
    padding: 14px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .filters {
    position: static;
    max-height: none;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(300px, 1.1fr) minmax(240px, 1.25fr) minmax(170px, 0.7fr);
    gap: 14px 18px;
    align-items: start;
  }

  .filters > .filter-block {
    margin-top: 0;
  }

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

  .overview,
  .service-dossier,
  .executive-section,
  .lead-section,
  .intelligence-section,
  .matrix-section,
  .guardrails-section,
  .visual-band,
  .split > div,
  .contracts-section,
  .methodology-section,
  .detail-panel {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  .headline h2,
  .section-heading h2 {
    font-size: clamp(28px, 4.4vw, 42px);
    line-height: 1.08;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 820px) {
  .topbar {
    display: grid;
    padding: 22px 18px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .topbar h1 {
    font-size: 30px;
    line-height: 1.04;
  }

  .source-note {
    text-align: left;
  }

  .shell {
    grid-template-columns: 1fr;
    padding: 12px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .filters {
    position: static;
    max-height: none;
    min-width: 0;
    display: block;
    grid-template-columns: 1fr;
  }

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

  .metric-grid,
  .executive-summary ol,
  .stack-grid,
  .service-tabs,
  .dossier-metrics,
  .contracts-list,
  .confidence-budget,
  .inference-grid,
  .guardrails-layout {
    grid-template-columns: 1fr;
  }

  .service-multiples {
    grid-template-columns: 1fr;
  }

  .lead-read-head {
    display: grid;
  }

  .lead-read p {
    font-size: 20px;
  }

  .capability-board,
  .dossier-layout,
  .expanded-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: grid;
    align-items: start;
  }

  .contracts-toolbar {
    grid-template-columns: 1fr;
  }

  .context-copy {
    text-align: left;
  }

  .headline h2,
  .section-heading h2 {
    font-size: 28px;
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .overview,
  .service-dossier,
  .executive-section,
  .lead-section,
  .intelligence-section,
  .matrix-section,
  .guardrails-section,
  .visual-band,
  .split > div,
  .contracts-section,
  .methodology-section,
  .detail-panel {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  .timeline-main {
    grid-template-columns: 42px minmax(80px, 1fr);
  }

  .readout-list div {
    grid-template-columns: 1fr;
  }

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

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

  .timeline-main strong,
  .timeline-main em {
    text-align: left;
  }

  .timeline-events {
    padding-left: 0;
  }

  .network-map svg {
    width: 760px;
    max-width: none;
  }
}

@media (max-width: 820px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    inline-size: 100dvw;
  }

  .topbar,
  .shell,
  .content,
  .filters,
  .section-index,
  .colophon {
    width: 100%;
    max-width: 100%;
    inline-size: 100%;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr);
    inline-size: 100dvw;
  }

  .topbar > div,
  .topbar h1,
  .standfirst,
  .source-note {
    min-width: 0;
    width: 100%;
    max-width: calc(100dvw - 36px);
    inline-size: min(100%, calc(100dvw - 36px));
  }

  .topbar h1,
  .standfirst,
  .method-note,
  .context-copy {
    overflow-wrap: break-word;
    word-break: normal;
  }

  .shell {
    justify-items: stretch;
    inline-size: 100dvw;
  }

  .filters,
  .content,
  .overview,
  .executive-section,
  .lead-section,
  .service-dossier,
  .intelligence-section,
  .matrix-section,
  .guardrails-section,
  .entity-network-section,
  .visual-band,
  .split > div,
  .contracts-section {
    width: 100%;
    max-width: calc(100dvw - 24px);
    inline-size: min(100%, calc(100dvw - 24px));
  }

  input,
  select,
  button {
    min-width: 0;
    max-width: 100%;
  }

  .section-index {
    position: static;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .section-index .index-label,
  .section-index a {
    flex: 0 0 auto;
  }

  .matrix-scroll,
  .entity-network,
  .network-map {
    max-width: 100%;
    overflow-x: auto;
  }

  .entity-network svg,
  .network-map svg {
    max-width: none;
  }
}

@media (max-width: 430px) {
  .topbar h1 {
    font-size: 28px;
    line-height: 1.05;
  }

  .standfirst {
    font-size: 16.5px;
    line-height: 1.36;
  }

  .filters,
  .overview,
  .executive-section,
  .lead-section,
  .service-dossier,
  .intelligence-section,
  .matrix-section,
  .guardrails-section,
  .entity-network-section,
  .visual-band,
  .split > div,
  .contracts-section {
    max-width: calc(100dvw - 24px);
    inline-size: min(100%, calc(100dvw - 24px));
  }
}

@media print {
  :root {
    --bg: #ffffff;
    --panel: #ffffff;
    --surface: #ffffff;
    --surface-alt: #ffffff;
    --shadow: none;
  }

  body {
    background: #ffffff;
    color: #000000;
    font-size: 11pt;
  }

  .topbar,
  .shell,
  .content,
  .split {
    display: block;
  }

  .topbar {
    padding: 0 0 16pt;
    border-bottom: 1px solid #999999;
  }

  .topbar h1 {
    font-size: 28pt;
  }

  .filters,
  .detail-panel,
  .section-actions,
  .contracts-toolbar,
  .open-cue {
    display: none !important;
  }

  .shell {
    padding: 0;
  }

  .overview,
  .service-dossier,
  .intelligence-section,
  .matrix-section,
  .guardrails-section,
  .visual-band,
  .split > div,
  .contracts-section,
  .colophon {
    margin: 0 0 14pt;
    border: 1px solid #bbbbbb;
    box-shadow: none;
    break-inside: avoid;
  }

  .contract-card,
  .capability-card,
  .inference-card,
  .matrix-row,
  .caveat-grid article,
  .absence-grid article,
  .watchlist-grid article {
    break-inside: avoid;
    box-shadow: none;
  }

  .contract-card.selected {
    box-shadow: none;
  }

  .contracts-list,
  .inference-grid,
  .guardrails-layout,
  .capability-board,
  .dossier-layout,
  .overview,
  .split {
    grid-template-columns: 1fr;
  }

  .matrix-scroll,
  .network-map {
    overflow: visible;
  }

  a,
  .tech-term .term-label {
    color: #000000;
    text-decoration: underline;
  }
}
