:root {
  --bg: #f6f3ea;
  --surface: #fffdf8;
  --ink: #171813;
  --muted: #65675f;
  --line: #d9d7ce;
  --accent: #b8ff5c;
  --accent-ink: #183000;
  --dark: #1d2119;
  --radius: 24px;
  --shadow: 0 18px 60px rgba(28, 30, 23, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

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

button, input { font: inherit; }

.shell {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto 0;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 14px 10px 10px;
  background: rgba(255,253,248,.78);
  border: 1px solid rgba(217,215,206,.9);
  border-radius: 20px;
  backdrop-filter: blur(14px);
  position: sticky;
  top: 12px;
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--dark);
  color: var(--accent);
  font-size: 13px;
  letter-spacing: .06em;
}

.nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
  color: var(--muted);
}

.nav a:hover { color: var(--ink); }

.hero {
  padding: 110px 0 72px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .15em;
  color: #556b23;
}

.hero h1,
.tool-intro h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(48px, 8vw, 96px);
  line-height: .94;
  letter-spacing: -.065em;
}

.hero-copy {
  max-width: 700px;
  margin: 28px 0 0;
  font-size: clamp(18px, 2.2vw, 25px);
  color: var(--muted);
  line-height: 1.4;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  border: 1px solid var(--line);
  border-radius: 14px;
  min-height: 50px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 800;
  transition: transform .15s ease, box-shadow .15s ease;
}

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

.button.primary {
  border-color: var(--dark);
  background: var(--dark);
  color: white;
  box-shadow: 0 10px 24px rgba(29,33,25,.14);
}

.button.primary:hover { box-shadow: 0 14px 30px rgba(29,33,25,.18); }

.button.ghost {
  background: var(--surface);
  color: var(--ink);
}

.button.full { width: 100%; }

.hero-metrics {
  margin-top: 72px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-metrics div {
  padding: 22px 18px 22px 0;
  display: flex;
  flex-direction: column;
}

.hero-metrics div + div {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}

.hero-metrics strong {
  font-size: 24px;
  letter-spacing: -.03em;
}

.hero-metrics span { color: var(--muted); }

.section { padding: 68px 0; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
}

.section-heading h2,
.info-band h2,
.article-card h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  letter-spacing: -.045em;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.tool-card {
  min-height: 360px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow);
}

.tool-card.featured {
  background: var(--dark);
  color: white;
}

.tool-card.muted { box-shadow: none; }

.tool-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 900;
  font-size: 20px;
}

.tool-card h3 {
  margin: 16px 0 8px;
  font-size: 27px;
  line-height: 1.05;
  letter-spacing: -.035em;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
}

.tool-card.featured p { color: #c8cbbf; }

.pill {
  display: inline-flex;
  margin-top: 34px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.pill.live {
  border-color: rgba(184,255,92,.35);
  color: var(--accent);
}

.card-link {
  display: inline-block;
  margin-top: 22px;
  font-weight: 800;
  color: var(--accent);
}

.info-band {
  margin-top: 28px;
  margin-bottom: 68px;
  padding: 34px;
  border-radius: 28px;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}

.info-band p:last-child {
  margin: 0;
  font-size: 20px;
}

.footer {
  padding: 36px 0 48px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 32px;
  color: var(--muted);
}

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

.footer p { margin: 6px 0 0; }

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.tool-page { padding: 76px 0; }

.tool-intro { max-width: 940px; }

.tool-intro h1 {
  font-size: clamp(48px, 7vw, 84px);
}

.tool-intro > p:last-child {
  max-width: 720px;
  font-size: 20px;
  color: var(--muted);
}

.calculator-layout {
  margin-top: 44px;
  display: grid;
  grid-template-columns: .78fr 1.22fr;
  gap: 18px;
  align-items: start;
}

.calculator-card,
.result-card,
.article-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.calculator-card { padding: 24px; }

.calculator-card label {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 800;
}

.money-input {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}

.money-input input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 15px 14px;
  background: transparent;
  font-size: 20px;
  font-weight: 800;
}

.money-input span {
  padding-right: 14px;
  color: var(--muted);
  font-weight: 800;
}

.date-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

input[type="month"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: white;
  color: var(--ink);
}

.form-note {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.result-card {
  min-height: 440px;
  padding: 28px;
}

.result-kicker {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #688632;
}

.result-card h2 {
  margin: 8px 0;
  font-size: 34px;
  letter-spacing: -.035em;
}

.result-card p { color: var(--muted); }

.big-result {
  margin-top: 10px;
  font-size: clamp(48px, 7vw, 82px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.055em;
}

.result-stats {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.result-stats div {
  padding: 16px 14px 16px 0;
  display: grid;
  gap: 4px;
}

.result-stats div + div {
  border-left: 1px solid var(--line);
  padding-left: 14px;
}

.result-stats span {
  color: var(--muted);
  font-size: 12px;
}

.result-stats strong { font-size: 18px; }

.chart-wrap { margin-top: 26px; }

.chart-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

#ipc-chart {
  width: 100%;
  height: auto;
  margin-top: 12px;
  overflow: visible;
}

.chart-grid { stroke: #e7e4db; stroke-width: 1; }
.chart-line { fill: none; stroke: #1d2119; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: rgba(184,255,92,.26); }
.chart-dot { fill: #1d2119; }
.chart-label { fill: #77796f; font-size: 12px; }

.share-row {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

#share-status {
  color: var(--muted);
  font-size: 13px;
}

.article-card {
  margin-top: 18px;
  padding: clamp(24px, 5vw, 54px);
}

.article-card > p,
.article-card li {
  max-width: 780px;
  color: var(--muted);
  font-size: 17px;
}

.article-card h3 {
  margin-top: 34px;
  font-size: 24px;
  letter-spacing: -.02em;
}

.formula {
  margin: 28px 0;
  padding: 18px;
  border-radius: 16px;
  background: #eefadf;
  font-weight: 800;
  overflow-x: auto;
}

.legal {
  max-width: 780px;
  padding: 76px 0;
}

.legal h1 {
  font-size: clamp(44px, 7vw, 72px);
  letter-spacing: -.05em;
  line-height: .98;
}

.legal h2 { margin-top: 36px; }

.legal p, .legal li { color: var(--muted); }

@media (max-width: 820px) {
  .nav { display: none; }

  .hero { padding-top: 72px; }

  .hero-metrics,
  .result-stats {
    grid-template-columns: 1fr;
  }

  .hero-metrics div + div,
  .result-stats div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
  }

  .tool-grid,
  .info-band,
  .calculator-layout {
    grid-template-columns: 1fr;
  }

  .tool-card { min-height: 300px; }

  .info-band { gap: 24px; }

  .footer { flex-direction: column; }
}

@media (max-width: 540px) {
  .shell,
  .site-header {
    width: min(100% - 20px, 1120px);
  }

  .hero h1,
  .tool-intro h1 {
    font-size: 48px;
  }

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

  .calculator-card,
  .result-card,
  .article-card {
    border-radius: 20px;
  }

  .result-card { padding: 20px; }
}


.availability-note {
  margin-bottom: 18px;
  padding: 13px 14px;
  border: 1px solid #d7c98a;
  border-radius: 14px;
  background: #fff8d9;
  color: #66571a;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}


.percent-input {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}

.percent-input input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 15px 14px;
  background: transparent;
  font-weight: 800;
}

.percent-input span {
  padding-right: 14px;
  color: var(--muted);
  font-weight: 800;
}

.compound-layout {
  grid-template-columns: .72fr 1.28fr;
}

.scenario-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.scenario {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  display: grid;
  gap: 5px;
}

.scenario-a {
  background: #f7f5ef;
}

.scenario-b {
  background: #eefadf;
  border-color: #d6e9bb;
}

.scenario span,
.scenario small {
  color: var(--muted);
  font-size: 12px;
}

.scenario strong {
  font-size: clamp(34px, 5vw, 54px);
  letter-spacing: -.045em;
  line-height: 1;
}

.difference-box {
  margin-top: 20px;
  padding: 18px;
  border-radius: 18px;
  background: var(--dark);
  color: white;
}

.difference-box span {
  color: #c7cabf;
  font-size: 12px;
}

.difference-box strong {
  display: block;
  margin-top: 4px;
  font-size: 30px;
  color: var(--accent);
}

.difference-box p {
  margin: 6px 0 0;
  color: #d7dacd;
}

.compound-line {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scenario-a-line {
  stroke: #1d2119;
}

.scenario-b-line {
  stroke: #7fa62e;
}

.compound-line.contributed {
  stroke: #9b9d95;
  stroke-width: 2.5;
  stroke-dasharray: 7 7;
}

.legend {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}

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

.legend-line {
  width: 22px;
  height: 3px;
  border-radius: 999px;
  display: inline-block;
}

.legend-line.a {
  background: #1d2119;
}

.legend-line.b {
  background: #7fa62e;
}

.legend-line.c {
  background: #9b9d95;
}

.secondary-live {
  color: #536b1e;
  border-color: #bfd886;
}

.dark-link {
  color: var(--ink);
}

@media (max-width: 820px) {
  .compound-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .scenario-grid {
    grid-template-columns: 1fr;
  }
}


.plain-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: white;
  color: var(--ink);
  font-weight: 800;
}

.ai-layout {
  grid-template-columns: .68fr 1.32fr;
}

.preset-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.preset {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: white;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.preset:hover {
  color: var(--ink);
  border-color: #bdbab0;
}

.ai-result-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.ai-result-head h2 {
  max-width: 580px;
  font-size: 20px;
  line-height: 1.25;
}

.updated-badge {
  padding: 7px 9px;
  border-radius: 999px;
  background: #eefadf;
  color: #536b1e;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.winner-card {
  margin-top: 18px;
  padding: 22px;
  border-radius: 20px;
  background: var(--dark);
  color: white;
}

.winner-card > span {
  color: #c7cabf;
  font-size: 12px;
}

.winner-card > strong {
  display: block;
  margin-top: 6px;
  font-size: 19px;
}

.winner-money {
  margin-top: 4px;
  color: var(--accent);
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.05em;
}

.winner-card p {
  margin: 10px 0 0;
  color: #d7dacd;
}

.ai-bars {
  margin-top: 26px;
  display: grid;
  gap: 15px;
}

.ai-bar-row {
  display: grid;
  gap: 7px;
}

.ai-bar-label {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
}

.ai-bar-label span {
  color: var(--muted);
}

.ai-bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #ebe8df;
}

.ai-bar-fill {
  height: 100%;
  min-width: 3px;
  border-radius: inherit;
  background: #3b3f36;
}

.ai-bar-row.is-cheapest .ai-bar-fill {
  background: #86b52a;
}

.ai-bar-row.is-cheapest .ai-bar-label span,
.ai-bar-row.is-cheapest .ai-bar-label strong {
  color: #536b1e;
}

.ai-table-wrap {
  margin-top: 28px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.ai-table {
  width: 100%;
  min-width: 670px;
  border-collapse: collapse;
  background: white;
}

.ai-table th,
.ai-table td {
  padding: 13px 14px;
  text-align: right;
  border-bottom: 1px solid #ece9e0;
  font-size: 13px;
}

.ai-table th:first-child,
.ai-table td:first-child {
  text-align: left;
}

.ai-table thead th {
  color: var(--muted);
  font-size: 11px;
}

.ai-table tbody tr:last-child td {
  border-bottom: 0;
}

.ai-table td:first-child strong {
  display: block;
}

.ai-table td:first-child small {
  color: var(--muted);
}

.cheapest-row {
  background: #f5fbe9;
}

.source-list {
  max-width: 780px;
  display: grid;
  gap: 8px;
}

.source-list a {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
}

.source-list a span {
  color: var(--muted);
}

@media (max-width: 820px) {
  .ai-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .ai-result-head {
    flex-direction: column;
  }

  .source-list a {
    flex-direction: column;
    gap: 3px;
  }
}


.data-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.status-card {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #faf8f2;
  display: grid;
  gap: 3px;
}

.status-card span,
.status-card small {
  color: var(--muted);
  font-size: 11px;
}

.status-card strong {
  font-size: 14px;
}

.winner-usd {
  margin-top: 7px;
  color: #c7cabf;
  font-size: 13px;
  font-weight: 800;
}

.ai-bar-label strong small,
.ai-table td small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.winner-card .winner-usd {
  color: #c7cabf;
}

@media (max-width: 560px) {
  .data-status-grid {
    grid-template-columns: 1fr;
  }
}
