:root {
  --paper: #f5f2ea;
  --paper-strong: #fffdf8;
  --ink: #111315;
  --muted: #686a6c;
  --line: rgba(17, 19, 21, 0.14);
  --line-strong: rgba(17, 19, 21, 0.26);
  --revenue: #0b806d;
  --revenue-light: #89d4c5;
  --expense: #a9163b;
  --expense-bright: #dc3659;
  --expense-wash: #f8dce3;
  --finance: #6c50c5;
  --finance-wash: #e7e0fb;
  --good: #177452;
  --warning: #9d5a0c;
  --danger: #ad1539;
  --shadow: 0 20px 60px rgba(32, 27, 20, 0.09);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 30px;
  --max: 1560px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.18)),
    repeating-linear-gradient(90deg, transparent 0, transparent 79px, rgba(17, 19, 21, 0.025) 80px),
    var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}

button,
select,
input {
  font: inherit;
}

button,
a,
select,
input {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(108, 80, 197, 0.38);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  z-index: 60;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 242, 234, 0.92);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(calc(100% - 40px), var(--max));
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
  letter-spacing: -0.04em;
  font-size: 1.12rem;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--ink);
  box-shadow: 0 8px 22px rgba(17, 19, 21, 0.18);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: #444648;
  font-size: 0.91rem;
  font-weight: 750;
}

.header-nav a:hover,
.header-nav a[aria-current="page"] {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px var(--line);
}

.page-shell {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 52px 0 90px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 0.4fr);
  align-items: end;
  gap: 50px;
  margin-bottom: 34px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--revenue);
  font-size: 0.77rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 13%, transparent);
}

.hero h1,
.debt-hero h1 {
  margin: 0;
  max-width: 1040px;
  font-size: clamp(3rem, 7vw, 7.6rem);
  line-height: 0.86;
  letter-spacing: -0.075em;
  text-transform: uppercase;
  font-weight: 950;
}

.hero h1 span,
.debt-hero h1 span {
  display: block;
  color: var(--expense);
}

.hero-copy {
  margin: 0;
  color: #555759;
  font-size: clamp(1rem, 1.3vw, 1.22rem);
  line-height: 1.65;
}

.control-panel {
  margin: 0 0 26px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.76);
  box-shadow: 0 10px 36px rgba(32, 27, 20, 0.045);
}

.control-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.control-label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  min-width: 116px;
  appearance: none;
  padding: 11px 38px 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--ink);
  background: white;
  font-weight: 850;
  cursor: pointer;
}

.select-wrap::after {
  content: "⌄";
  position: absolute;
  right: 13px;
  top: 8px;
  pointer-events: none;
  font-size: 1.1rem;
}

.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: #e9e5dc;
}

.segmented button {
  min-height: 40px;
  padding: 8px 13px;
  border: 0;
  border-radius: 10px;
  color: #5e6062;
  background: transparent;
  font-size: 0.84rem;
  font-weight: 850;
  cursor: pointer;
}

.segmented button:hover:not(:disabled) {
  color: var(--ink);
}

.segmented button.active {
  color: white;
  background: var(--ink);
  box-shadow: 0 6px 18px rgba(17, 19, 21, 0.16);
}

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

.as-of {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 5px rgba(23, 116, 82, 0.12);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.metric-card {
  min-height: 134px;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-strong);
  box-shadow: 0 12px 34px rgba(32, 27, 20, 0.045);
}

.metric-card.revenue {
  background: linear-gradient(145deg, #f8fffc, #e5f6f1);
}

.metric-card.expense {
  background: linear-gradient(145deg, #fffafb, #f9e2e7);
}

.metric-card.finance {
  background: linear-gradient(145deg, #fdfbff, #eee9ff);
}

.metric-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.metric-value {
  display: block;
  color: var(--ink);
  font-size: clamp(1.55rem, 2.4vw, 2.55rem);
  font-weight: 950;
  letter-spacing: -0.055em;
  white-space: nowrap;
}

.metric-note {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.context-bar {
  margin-bottom: 20px;
  padding: 14px 18px;
  border-left: 4px solid var(--finance);
  border-radius: 0 14px 14px 0;
  color: #4f4d56;
  background: rgba(108, 80, 197, 0.08);
  font-size: 0.88rem;
  line-height: 1.55;
}

.context-bar strong {
  color: var(--ink);
}

.visual-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.91);
  box-shadow: var(--shadow);
}

.visual-header {
  min-height: 78px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.visual-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.visual-title-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: var(--expense);
}

.visual-title strong {
  display: block;
  font-size: 1rem;
}

.visual-title small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.75rem;
}

.visual-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-button,
.back-button,
.text-button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: white;
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
}

.pill-button:hover,
.back-button:hover,
.text-button:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.flow-viewport {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.flow-canvas {
  position: relative;
  min-width: 1460px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.96), transparent 54%),
    repeating-linear-gradient(0deg, transparent 0, transparent 55px, rgba(17, 19, 21, 0.025) 56px),
    repeating-linear-gradient(90deg, transparent 0, transparent 79px, rgba(17, 19, 21, 0.025) 80px);
}

.flow-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.flow-ribbon {
  stroke: none;
  opacity: 0.52;
  transition: opacity 160ms ease, filter 160ms ease;
  pointer-events: auto;
  cursor: help;
}

.flow-ribbon.revenue {
  fill: var(--revenue-light);
}

.flow-ribbon.finance {
  fill: #afa0e8;
}

.flow-ribbon.expense {
  fill: var(--ribbon-color, #c7284c);
}

.flow-canvas.has-hover .flow-ribbon,
.flow-canvas.has-hover .flow-card {
  opacity: 0.19;
}

.flow-canvas.has-hover .flow-ribbon.is-hovered,
.flow-canvas.has-hover .flow-card.is-hovered {
  opacity: 1;
  filter: saturate(1.12);
}

.flow-card {
  position: absolute;
  z-index: 3;
  width: 252px;
  min-height: 62px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(32, 27, 20, 0.08);
  text-align: left;
  transition: transform 150ms ease, opacity 150ms ease, border-color 150ms ease;
}

button.flow-card {
  cursor: pointer;
}

button.flow-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.flow-card.source {
  left: 24px;
  border-left: 5px solid var(--revenue);
}

.flow-card.source.finance-source {
  border-left-color: var(--finance);
}

.flow-card.center {
  left: 606px;
  width: 250px;
  min-height: 112px;
  padding: 16px;
  color: white;
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 18px 42px rgba(17, 19, 21, 0.22);
}

.flow-card.target {
  left: 1184px;
  border-left: 5px solid var(--card-color, var(--expense));
  background: color-mix(in srgb, var(--card-color, var(--expense)) 8%, white);
}

.flow-card.group-card {
  border-style: dashed;
}

.flow-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.flow-card.center .flow-kicker {
  color: rgba(255, 255, 255, 0.64);
}

.flow-name {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-card.center .flow-name {
  color: white;
  font-size: 0.88rem;
  white-space: normal;
}

.flow-amount {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.flow-card.center .flow-amount {
  margin-top: 8px;
  color: white;
  font-size: 1.48rem;
}

.flow-share {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.67rem;
}

.flow-card.center .flow-share {
  color: rgba(255, 255, 255, 0.68);
}

.flow-node-bar {
  position: absolute;
  z-index: 2;
  width: 18px;
  min-height: 6px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(17, 19, 21, 0.08);
  pointer-events: none;
}

.flow-node-bar.source {
  left: 292px;
  background: var(--revenue);
}

.flow-node-bar.finance {
  background: var(--finance);
}

.flow-node-bar.center {
  left: 895px;
  width: 22px;
  background: var(--ink);
}

.flow-node-bar.target {
  left: 1158px;
  background: var(--card-color, var(--expense));
}

.flow-empty {
  position: absolute;
  left: 1050px;
  top: 50%;
  width: 340px;
  transform: translateY(-50%);
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
}

.legend {
  padding: 13px 20px 17px;
  display: flex;
  gap: 17px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.73rem;
}

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

.legend i {
  width: 24px;
  height: 7px;
  border-radius: 99px;
}

.legend .rev {
  background: var(--revenue-light);
}

.legend .fin {
  background: #afa0e8;
}

.legend .exp {
  background: #c7284c;
}

.section-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 20px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.86);
  box-shadow: 0 12px 38px rgba(32, 27, 20, 0.045);
}

.panel-header {
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.panel-header h2,
.panel-header h3 {
  margin: 0;
  font-size: 1.04rem;
  letter-spacing: -0.025em;
}

.panel-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.table-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-tools input {
  width: 220px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.data-table-wrap {
  overflow: auto;
  max-height: 560px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.data-table th,
.data-table td {
  padding: 12px 15px;
  border-bottom: 1px solid rgba(17, 19, 21, 0.08);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  position: sticky;
  z-index: 2;
  top: 0;
  color: var(--muted);
  background: #fbf9f3;
  font-size: 0.67rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.data-table tr[data-id] {
  cursor: pointer;
}

.data-table tr[data-id]:hover td {
  background: rgba(169, 22, 59, 0.045);
}

.data-table .num {
  text-align: right;
  white-space: nowrap;
  font-weight: 850;
}

.detail-body {
  padding: 20px;
}

.detail-amount {
  display: block;
  margin-bottom: 12px;
  font-size: 2rem;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.detail-body p {
  color: #555759;
  line-height: 1.58;
  font-size: 0.87rem;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.detail-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}

.detail-row span:first-child {
  color: var(--muted);
}

.source-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  color: var(--revenue);
  font-size: 0.78rem;
  font-weight: 850;
}

.history-panel {
  margin-top: 24px;
}

.history-chart {
  position: relative;
  min-height: 260px;
  padding: 24px 22px 18px;
}

.history-bars {
  height: 190px;
  display: flex;
  align-items: end;
  gap: 10px;
}

.history-item {
  min-width: 44px;
  flex: 1;
  display: grid;
  gap: 8px;
  justify-items: center;
}

.history-bar {
  width: min(48px, 100%);
  min-height: 3px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, var(--expense-bright), var(--expense));
  transition: height 220ms ease, opacity 150ms ease;
}

.history-item.active .history-bar {
  box-shadow: 0 0 0 4px rgba(169, 22, 59, 0.12);
}

.history-year {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.pension-panel {
  margin-top: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, #fffdf8, #f1ece0);
}

.pension-intro {
  padding: 20px;
  color: #555759;
  font-size: 0.88rem;
  line-height: 1.58;
}

.pension-warning {
  margin: 0 20px 18px;
  padding: 12px 14px;
  border-radius: 12px;
  color: #5b421d;
  background: #fff1d7;
  font-size: 0.78rem;
  line-height: 1.5;
}

.pension-grid {
  padding: 0 20px 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pension-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}

.pension-card span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.pension-card strong {
  display: block;
  margin-top: 7px;
  font-size: 1.12rem;
  letter-spacing: -0.035em;
}

.tooltip {
  position: fixed;
  z-index: 1000;
  width: min(340px, calc(100vw - 28px));
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: white;
  background: rgba(17, 19, 21, 0.96);
  box-shadow: 0 18px 48px rgba(17, 19, 21, 0.24);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 110ms ease, transform 110ms ease;
}

.tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.tooltip strong {
  display: block;
  margin-bottom: 4px;
  color: #fff;
  font-size: 0.82rem;
}

.tooltip small {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.66);
}

.loading,
.error-state {
  min-height: 480px;
  display: grid;
  place-items: center;
  text-align: center;
}

.loading strong,
.error-state strong {
  display: block;
  font-size: 1.4rem;
}

.loading p,
.error-state p {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.6;
}

.spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 18px;
  border: 4px solid rgba(17, 19, 21, 0.12);
  border-top-color: var(--expense);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.debt-page {
  --expense: #8c1738;
}

.debt-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.55fr);
  align-items: end;
  gap: 52px;
  margin-bottom: 32px;
}

.debt-hero h1 span {
  color: var(--finance);
}

.debt-counter-card {
  padding: 26px;
  border: 1px solid rgba(108, 80, 197, 0.22);
  border-radius: var(--radius-lg);
  color: white;
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 255, 255, 0.16), transparent 32%),
    linear-gradient(145deg, #191522, #312452 68%, #4d358b);
  box-shadow: 0 26px 70px rgba(49, 36, 82, 0.22);
}

.counter-label {
  display: block;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.debt-counter {
  display: block;
  margin: 12px 0 8px;
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: 0.95;
  font-weight: 950;
  letter-spacing: -0.065em;
  white-space: nowrap;
}

.counter-note {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.77rem;
  line-height: 1.5;
}

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

.debt-metric {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-strong);
}

.debt-metric span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.debt-metric strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(1.45rem, 2.5vw, 2.5rem);
  letter-spacing: -0.05em;
}

.debt-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 20px;
}

.line-chart {
  width: 100%;
  height: 330px;
  display: block;
}

.line-grid {
  stroke: rgba(17, 19, 21, 0.09);
  stroke-width: 1;
}

.line-path {
  fill: none;
  stroke: var(--finance);
  stroke-width: 5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.line-area {
  fill: url(#debt-area);
}

.line-point {
  fill: white;
  stroke: var(--finance);
  stroke-width: 3;
  cursor: help;
}

.equivalent-controls {
  padding: 18px 20px 8px;
  display: grid;
  gap: 12px;
}

.price-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 145px;
  align-items: center;
  gap: 12px;
}

.price-field label {
  color: #555759;
  font-size: 0.79rem;
  font-weight: 800;
}

.price-field input {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  text-align: right;
  font-weight: 850;
}

.equivalent-list {
  padding: 12px 20px 20px;
  display: grid;
  gap: 9px;
}

.equivalent-row {
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.equivalent-row span {
  color: var(--muted);
  font-size: 0.76rem;
}

.equivalent-row strong {
  font-size: 0.9rem;
  text-align: right;
}

.method-box {
  margin-top: 20px;
  padding: 18px 20px;
  border: 1px solid rgba(108, 80, 197, 0.2);
  border-radius: var(--radius);
  color: #504962;
  background: var(--finance-wash);
  font-size: 0.82rem;
  line-height: 1.6;
}

.footer {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 28px 0 48px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .hero,
  .debt-hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 760px;
  }

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

  .section-grid,
  .debt-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .header-inner,
  .page-shell,
  .footer {
    width: min(calc(100% - 24px), var(--max));
  }

  .header-inner {
    min-height: 62px;
  }

  .brand {
    font-size: 1rem;
  }

  .header-nav a {
    padding: 8px 10px;
    font-size: 0.79rem;
  }

  .page-shell {
    padding-top: 34px;
  }

  .hero,
  .debt-hero {
    gap: 24px;
  }

  .hero h1,
  .debt-hero h1 {
    font-size: clamp(2.75rem, 16vw, 5.2rem);
  }

  .control-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented {
    width: 100%;
    overflow-x: auto;
  }

  .segmented button {
    flex: 1 0 auto;
  }

  .metrics,
  .debt-metrics {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 110px;
  }

  .visual-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .table-tools,
  .table-tools input {
    width: 100%;
  }

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

  .price-field {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
