:root {
  --bg: #f5efe7;
  --bg-deep: #dfe8e4;
  --paper: rgba(255, 250, 244, 0.82);
  --ink: #213039;
  --ink-soft: #60717b;
  --line: rgba(33, 48, 57, 0.12);
  --accent: #0e6f65;
  --accent-strong: #084a43;
  --accent-warm: #b86f45;
  --danger: #a43d32;
  --shadow: 0 26px 68px rgba(24, 39, 46, 0.12);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 14px;
  --graph-edge: rgba(96, 113, 123, 0.35);
  --graph-active-edge: #0e6f65;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  font-size: clamp(16px, 0.22vw + 15px, 19px);
}

body {
  font-family: "Avenir Next", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(184, 111, 69, 0.12), transparent 28%),
    radial-gradient(circle at right 20%, rgba(14, 111, 101, 0.12), transparent 30%),
    linear-gradient(135deg, var(--bg), var(--bg-deep));
}

.background-orbit {
  position: fixed;
  border-radius: 999px;
  filter: blur(12px);
  pointer-events: none;
  z-index: 0;
}

.background-orbit-left {
  width: 15rem;
  height: 15rem;
  left: -3rem;
  top: 12rem;
  background: rgba(184, 111, 69, 0.14);
}

.background-orbit-right {
  width: 18rem;
  height: 18rem;
  right: -4rem;
  top: 3rem;
  background: rgba(14, 111, 101, 0.14);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1880px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 2.8rem 0 4.25rem;
}

.site-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.1rem;
}

.site-nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.4rem;
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.84);
  border: 1px solid rgba(33, 48, 57, 0.08);
  box-shadow: 0 14px 30px rgba(24, 39, 46, 0.1);
}

.site-nav-link {
  padding: 0.72rem 1rem;
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 600;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.site-nav-link:hover {
  transform: translateY(-1px);
  color: var(--accent-strong);
}

.site-nav-link.active {
  background: linear-gradient(125deg, var(--accent), var(--accent-strong));
  color: #f6f7f3;
  box-shadow: 0 12px 22px rgba(14, 111, 101, 0.18);
}

.hero {
  max-width: 72rem;
  margin-bottom: 1.85rem;
}

.hero-table {
  max-width: 82rem;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.hero h1,
.panel h2,
.section-head h3,
.narrative h3 {
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
  font-weight: 600;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3.3rem, 6.4vw, 6.4rem);
  line-height: 0.94;
}

.hero-copy {
  max-width: 54rem;
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 1.16rem;
  line-height: 1.78;
}

.summary-strip {
  position: sticky;
  top: 0.85rem;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-xl);
  background: rgba(255, 250, 244, 0.92);
  backdrop-filter: blur(22px);
  border: 1px solid rgba(33, 48, 57, 0.08);
  box-shadow: 0 18px 38px rgba(24, 39, 46, 0.12);
}

.summary-block {
  display: grid;
  gap: 0.2rem;
  align-content: start;
}

.summary-label {
  color: var(--ink-soft);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.summary-block strong {
  font-size: 1.08rem;
  line-height: 1.35;
}

.summary-note {
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.45;
}

.summary-status-block strong {
  color: var(--accent-strong);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.graph-shell {
  margin-top: 1rem;
}

.panel {
  background: var(--paper);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 1.4rem;
}

.panel-head {
  margin-bottom: 1rem;
}

.panel-head-split {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.panel h2 {
  margin: 0;
  font-size: 1.85rem;
}

.input-mode-wrap {
  display: grid;
  gap: 0.45rem;
  justify-items: end;
}

.input-mode-label {
  color: var(--ink-soft);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.input-mode {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(33, 48, 57, 0.08);
}

.input-mode-button {
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  padding: 0.55rem 0.85rem;
  cursor: pointer;
}

.input-mode-button.active {
  background: linear-gradient(125deg, var(--accent), var(--accent-strong));
  color: #f6f7f3;
  box-shadow: 0 12px 22px rgba(14, 111, 101, 0.18);
}

.stack {
  display: grid;
  gap: 0.95rem;
}

.scenario-form {
  display: grid;
  gap: 1rem;
}

.scenario-topline {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(240px, 1fr) auto;
  gap: 0.85rem;
  align-items: end;
}

.scenario-submit {
  display: flex;
  align-items: end;
  min-width: 220px;
}

.scenario-submit .button {
  width: 100%;
  white-space: nowrap;
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.scenario-card {
  height: 100%;
}

.scenario-card.section-focus {
  border-color: rgba(14, 111, 101, 0.28);
  box-shadow: inset 0 0 0 1px rgba(14, 111, 101, 0.12);
}

.scenario-card-policy {
  grid-column: span 4;
}

.scenario-card-guidance {
  grid-column: span 5;
}

.scenario-card-rm {
  grid-column: span 3;
}

.scenario-card-foreign {
  grid-column: span 7;
}

.scenario-card-timing {
  grid-column: span 5;
}

.field {
  display: grid;
  gap: 0.42rem;
}

.field.field-focus {
  padding: 0.55rem;
  margin: -0.55rem;
  border-radius: var(--radius-md);
  background: rgba(14, 111, 101, 0.08);
}

.guided-hidden {
  display: none !important;
}

.field span {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  padding: 0.9rem 0.95rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(33, 48, 57, 0.14);
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(14, 111, 101, 0.5);
  box-shadow: 0 0 0 4px rgba(14, 111, 101, 0.1);
  transform: translateY(-1px);
}

.button {
  border: none;
  border-radius: 999px;
  padding: 0.95rem 1.2rem;
  cursor: pointer;
  font-weight: 600;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.button:hover,
.sample-pill:hover {
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.button-primary {
  background: linear-gradient(125deg, var(--accent), var(--accent-strong));
  color: #f6f7f3;
  box-shadow: 0 18px 32px rgba(14, 111, 101, 0.18);
}

.button-secondary {
  background: linear-gradient(125deg, #c28760, var(--accent-warm));
  color: #fff8f2;
  box-shadow: 0 18px 32px rgba(184, 111, 69, 0.18);
}

.form-section {
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(33, 48, 57, 0.08);
}

.section-head h3,
.narrative h3 {
  margin: 0;
  font-size: 1.15rem;
}

.section-head p {
  margin: 0.38rem 0 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.55;
}

.samples {
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(33, 48, 57, 0.08);
}

.samples-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 0.8rem;
}

.samples-head span {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.sample-list,
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.sample-pill,
.path-chip {
  border: 1px solid rgba(33, 48, 57, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.sample-pill {
  padding: 0.6rem 0.85rem;
  cursor: pointer;
}

.path-chip {
  padding: 0.48rem 0.72rem;
  font-size: 0.86rem;
  cursor: pointer;
  appearance: none;
}

.path-chip.active {
  border-color: rgba(14, 111, 101, 0.24);
  background: rgba(14, 111, 101, 0.12);
  color: var(--accent-strong);
}

.focus-bridge .path-chip,
#policy-assistance-fields .path-chip {
  cursor: default;
}

.policy-card {
  border-style: dashed;
}

.policy-empty,
.policy-summary {
  color: var(--ink-soft);
  line-height: 1.6;
}

.policy-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: baseline;
  margin-bottom: 0.9rem;
}

.policy-authority {
  font-weight: 700;
}

.policy-confidence {
  color: var(--accent-strong);
  font-size: 0.9rem;
}

.policy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.policy-metric {
  padding: 0.85rem;
}

.policy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.85rem;
}

.policy-link {
  color: var(--accent-strong);
  font-weight: 600;
  text-decoration: none;
}

.policy-link:hover {
  text-decoration: underline;
}

.policy-notes {
  margin: 0.9rem 0;
}

.policy-note {
  margin: 0.38rem 0 0;
  color: var(--ink-soft);
  font-size: 0.97rem;
  line-height: 1.55;
}

.guidance-card {
  border-style: solid;
}

.guidance-next {
  margin-top: 0.9rem;
}

.guidance-next p {
  margin: 0.5rem 0 0.9rem;
}

.wizard-card {
  margin-top: 0.9rem;
}

.wizard-card strong {
  display: block;
  line-height: 1.45;
}

.wizard-card p {
  margin: 0.5rem 0 0;
}

.focus-bridge {
  margin-top: 0.9rem;
  border: 1px solid rgba(33, 48, 57, 0.08);
}

.focus-bridge.active {
  border-color: rgba(14, 111, 101, 0.2);
  background: rgba(14, 111, 101, 0.08);
}

.wizard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.95rem;
}

.wizard-action {
  border: 1px solid rgba(33, 48, 57, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  padding: 0.72rem 0.95rem;
  cursor: pointer;
}

.wizard-action:hover {
  transform: translateY(-1px);
}

.wizard-action-primary {
  background: linear-gradient(125deg, var(--accent), var(--accent-strong));
  color: #f6f7f3;
  border-color: transparent;
  box-shadow: 0 14px 24px rgba(14, 111, 101, 0.18);
}

.guidance-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.guidance-item {
  display: grid;
  gap: 0.38rem;
  width: 100%;
  padding: 0.95rem 1rem;
  text-align: left;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(33, 48, 57, 0.1);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  cursor: pointer;
}

.guidance-item strong {
  font-size: 1rem;
}

.guidance-item span {
  color: var(--ink-soft);
  line-height: 1.55;
}

.result-empty {
  color: var(--ink-soft);
  line-height: 1.65;
}

.policies-overview-panel {
  display: grid;
  gap: 1.2rem;
}

.policies-overview-panel .panel-head {
  margin-bottom: 0;
}

.overview-head {
  align-items: center;
}

.reference-pill {
  display: grid;
  gap: 0.12rem;
  justify-items: end;
  padding: 0.95rem 1.1rem;
  min-width: 12rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(33, 48, 57, 0.08);
  box-shadow: 0 12px 24px rgba(24, 39, 46, 0.06);
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.95rem;
}

.overview-card {
  min-height: 100%;
}

.overview-card .policy-summary {
  margin: 0.5rem 0 0;
  font-size: 0.96rem;
}

.table-toolbar {
  display: grid;
  grid-template-columns: minmax(340px, 1.15fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  margin-top: 0;
}

.table-search {
  max-width: none;
}

.overview-toolbar {
  padding: 1.05rem 1.1rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(33, 48, 57, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.34));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.table-controls {
  display: grid;
  gap: 0.85rem;
  justify-items: stretch;
}

.overview-toolbar-side {
  display: grid;
  grid-template-columns: minmax(0, 32rem) auto;
  justify-content: flex-end;
  gap: 0.9rem 1rem;
  align-items: start;
}

.table-filter-wrap {
  display: grid;
  gap: 0.45rem;
  justify-items: end;
}

.table-actions {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  max-width: 32rem;
  justify-content: flex-end;
}

.filter-chip {
  border: 1px solid rgba(33, 48, 57, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-soft);
  padding: 0.62rem 0.9rem;
  cursor: pointer;
}

.filter-chip.active {
  background: linear-gradient(125deg, var(--accent), var(--accent-strong));
  color: #f6f7f3;
  box-shadow: 0 12px 22px rgba(14, 111, 101, 0.18);
}

.workspace-policies {
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.55fr);
}

.policy-detail-panel {
  position: sticky;
  top: 6.8rem;
}

.detail-grid {
  margin-bottom: 0.2rem;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.table-result-note {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.table-wrap {
  overflow: auto;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(33, 48, 57, 0.08);
  background: rgba(255, 255, 255, 0.5);
}

.policy-table {
  width: 100%;
  min-width: 1020px;
  border-collapse: collapse;
}

.policy-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.95rem 1rem;
  text-align: left;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: rgba(245, 239, 231, 0.94);
  border-bottom: 1px solid rgba(33, 48, 57, 0.08);
}

.policy-table tbody td {
  padding: 1rem;
  vertical-align: top;
  border-top: 1px solid rgba(33, 48, 57, 0.08);
}

.policy-row {
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.policy-row:hover {
  background: rgba(14, 111, 101, 0.05);
}

.policy-row.selected {
  background: rgba(14, 111, 101, 0.1);
}

.policy-row:focus-visible {
  outline: 2px solid rgba(14, 111, 101, 0.45);
  outline-offset: -2px;
}

.cell-country strong,
.cell-pending strong {
  display: block;
  line-height: 1.4;
}

.cell-secondary {
  display: block;
  margin-top: 0.28rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}

.cell-primary {
  font-weight: 700;
}

.cell-muted {
  color: var(--ink-soft);
}

.cell-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.table-link {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: none;
}

.table-link:hover {
  text-decoration: underline;
}

.table-cell-stack {
  display: grid;
  gap: 0.5rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.46rem 0.72rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  border: 1px solid rgba(33, 48, 57, 0.08);
  background: rgba(255, 255, 255, 0.7);
}

.status-chip-pending {
  color: #0d5b53;
  background: rgba(14, 111, 101, 0.12);
  border-color: rgba(14, 111, 101, 0.18);
}

.status-chip-confirmed {
  color: #1e4f76;
  background: rgba(36, 59, 91, 0.11);
  border-color: rgba(36, 59, 91, 0.16);
}

.status-chip-incomplete {
  color: #7b5034;
  background: rgba(184, 111, 69, 0.12);
  border-color: rgba(184, 111, 69, 0.18);
}

.status-chip-no_published {
  color: #8b6b0f;
  background: rgba(145, 105, 31, 0.12);
  border-color: rgba(145, 105, 31, 0.2);
}

.status-chip-neutral {
  color: var(--ink);
}

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

.result-content.hidden,
.hidden {
  display: none !important;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.metric-card {
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(33, 48, 57, 0.08);
}

.metric-label {
  display: block;
  color: var(--ink-soft);
  font-size: 0.94rem;
  margin-bottom: 0.32rem;
}

.metric-card strong {
  font-size: 1.08rem;
  line-height: 1.4;
}

.narrative {
  margin-top: 1rem;
}

.narrative p {
  margin: 0.45rem 0 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.raw-panel {
  margin-top: 1rem;
}

.raw-panel summary {
  cursor: pointer;
  font-weight: 600;
}

.raw-panel pre {
  margin: 0.9rem 0 0;
  padding: 1rem;
  overflow: auto;
  border-radius: var(--radius-md);
  background: #19252d;
  color: #edf4f1;
}

.error-banner {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(164, 61, 50, 0.08);
  color: var(--danger);
  border: 1px solid rgba(164, 61, 50, 0.14);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

.graph-controls {
  display: grid;
  gap: 0.75rem;
  justify-items: end;
}

.graph-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  align-items: center;
}

.graph-mode {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(33, 48, 57, 0.08);
}

.graph-mode-button {
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  padding: 0.55rem 0.8rem;
  cursor: pointer;
}

.graph-mode-button.active {
  background: linear-gradient(125deg, var(--accent), var(--accent-strong));
  color: #f6f7f3;
  box-shadow: 0 12px 22px rgba(14, 111, 101, 0.18);
}

.graph-zoom {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(33, 48, 57, 0.08);
}

.graph-zoom-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  padding: 0.55rem 0.8rem;
  min-width: 2.9rem;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.graph-zoom-button:hover:not(:disabled) {
  transform: translateY(-1px);
  color: var(--accent-strong);
}

.graph-zoom-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.graph-zoom-button.active {
  background: linear-gradient(125deg, rgba(14, 111, 101, 0.18), rgba(8, 74, 67, 0.22));
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px rgba(14, 111, 101, 0.14);
}

.graph-zoom-readout {
  min-width: 4.65rem;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.legend-dot {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
}

.legend-active {
  background: var(--accent);
}

.legend-muted {
  background: rgba(96, 113, 123, 0.35);
}

.graph-scroll-hint {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
  text-align: right;
}

.graph-stage {
  position: relative;
  overflow: auto;
  max-height: min(78vh, 980px);
  min-height: clamp(25rem, 58vh, 38rem);
  padding: 0.8rem;
  scrollbar-gutter: stable both-edges;
  overscroll-behavior: contain;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.48)),
    linear-gradient(90deg, rgba(96, 113, 123, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(96, 113, 123, 0.06) 1px, transparent 1px);
  background-size: auto, 24px 24px, 24px 24px;
  border: 1px solid rgba(33, 48, 57, 0.08);
}

.graph-stage[data-scroll-x="left"] {
  box-shadow: inset 18px 0 18px -18px rgba(33, 48, 57, 0.24);
}

.graph-stage[data-scroll-x="right"] {
  box-shadow: inset -18px 0 18px -18px rgba(33, 48, 57, 0.24);
}

.graph-stage[data-scroll-x="both"] {
  box-shadow:
    inset 18px 0 18px -18px rgba(33, 48, 57, 0.24),
    inset -18px 0 18px -18px rgba(33, 48, 57, 0.24);
}

.graph-stage::-webkit-scrollbar {
  width: 0.9rem;
  height: 0.9rem;
}

.graph-stage::-webkit-scrollbar-track {
  background: rgba(33, 48, 57, 0.08);
  border-radius: 999px;
}

.graph-stage::-webkit-scrollbar-thumb {
  background: rgba(14, 111, 101, 0.34);
  border-radius: 999px;
  border: 3px solid rgba(255, 250, 244, 0.85);
}

.graph-stage::-webkit-scrollbar-thumb:hover {
  background: rgba(14, 111, 101, 0.5);
}

.decision-graph {
  display: block;
  width: 860px;
  height: 980px;
  max-width: none;
}

.graph-scrollband {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  margin-top: 0.75rem;
}

.graph-scrollband-label {
  color: var(--ink-soft);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.graph-scroll-track {
  position: relative;
  height: 0.95rem;
  border-radius: 999px;
  background: rgba(33, 48, 57, 0.09);
  border: 1px solid rgba(33, 48, 57, 0.08);
  cursor: pointer;
  user-select: none;
  touch-action: none;
}

.graph-scroll-thumb {
  position: absolute;
  top: 0.1rem;
  left: 0;
  height: calc(100% - 0.2rem);
  min-width: 3.6rem;
  border-radius: 999px;
  background: linear-gradient(125deg, var(--accent), var(--accent-strong));
  box-shadow: 0 8px 18px rgba(14, 111, 101, 0.24);
  cursor: grab;
}

.graph-scroll-thumb:active {
  cursor: grabbing;
}

.graph-node rect {
  fill: rgba(255, 255, 255, 0.88);
  stroke: rgba(33, 48, 57, 0.12);
  stroke-width: 2;
}

.graph-node-location rect {
  fill: rgba(184, 111, 69, 0.08);
}

.graph-node-rate rect {
  fill: rgba(14, 111, 101, 0.08);
}

.graph-node-outcome rect {
  fill: rgba(36, 59, 91, 0.08);
}

.graph-node-timing rect {
  fill: rgba(145, 105, 31, 0.08);
}

.graph-node.active rect {
  fill: rgba(14, 111, 101, 0.12);
  stroke: var(--accent);
}

.graph-node.focused rect {
  stroke: var(--accent-warm);
  stroke-width: 3;
}

.node-id {
  font-size: 0.78rem;
  font-weight: 700;
  fill: var(--accent-strong);
}

.node-label {
  fill: var(--ink);
  font-size: 1rem;
}

.edge-label {
  font-size: 0.82rem;
  fill: var(--ink-soft);
  paint-order: stroke;
  stroke: rgba(245, 239, 231, 0.92);
  stroke-width: 6px;
  stroke-linejoin: round;
}

.edge-label-active {
  fill: var(--accent-strong);
  font-weight: 700;
}

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

  .table-toolbar,
  .workspace-policies {
    grid-template-columns: 1fr;
  }

  .table-filter-wrap {
    justify-items: start;
  }

  .table-controls,
  .table-actions {
    justify-items: start;
    justify-content: flex-start;
  }

  .overview-toolbar-side {
    grid-template-columns: 1fr;
    justify-content: flex-start;
  }

  .filter-chips {
    max-width: none;
    justify-content: flex-start;
  }

  .policy-detail-panel {
    position: static;
  }

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

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

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

  .scenario-submit {
    min-width: 0;
  }

  .scenario-card-policy,
  .scenario-card-guidance,
  .scenario-card-rm,
  .scenario-card-foreign,
  .scenario-card-timing {
    grid-column: span 6;
  }

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

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

  .graph-toolbar {
    justify-content: flex-start;
  }

  .graph-scroll-hint {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .site-header {
    justify-content: stretch;
  }

  .site-nav {
    width: 100%;
    justify-content: stretch;
  }

  .site-nav-link {
    flex: 1 1 0;
    text-align: center;
  }

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

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

  .overview-head {
    align-items: flex-start;
  }

  .reference-pill {
    width: 100%;
    justify-items: start;
  }

  .summary-strip {
    grid-template-columns: 1fr;
    top: 0.5rem;
  }

  .shell {
    width: min(100% - 1rem, 100%);
    padding-top: 1.25rem;
  }

  .panel {
    padding: 1rem;
  }

  .panel-head-split,
  .samples-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .input-mode-wrap {
    justify-items: start;
  }

  .scenario-topline,
  .scenario-grid {
    grid-template-columns: 1fr;
  }

  .scenario-card-policy,
  .scenario-card-guidance,
  .scenario-card-rm,
  .scenario-card-foreign,
  .scenario-card-timing {
    grid-column: auto;
  }

  .graph-controls {
    justify-items: stretch;
  }

  .graph-toolbar {
    width: 100%;
    justify-content: stretch;
  }

  .graph-mode,
  .graph-zoom {
    width: 100%;
    justify-content: flex-start;
  }

  .graph-scrollband {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }
}
