@font-face {
  font-family: Inter;
  src: url('inter.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: Sora;
  src: url('sora.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --ink: #101423;
  --muted: #465368;
  --sky: #ecf7ff;
  --blue: #176fc9;
  --rule: #dce8f4;
  --paper: #fff;
  --radius: 24px;
  --gradient: linear-gradient(110deg, #256ed0, #2530c9);
  --page-gutter: clamp(1rem, 4vw, 3rem);
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.58;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6.5rem; }
body { margin: 0; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
a { color: #155bad; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #1655cd; outline-offset: 4px; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 650; }

h1, h2, h3, .stat-number, .chart-card figcaption, .data-table caption {
  margin: 0;
  font-family: Sora, Inter, sans-serif;
  line-height: 1.14;
  font-weight: 600;
  letter-spacing: -.045em;
}

h1 { font-size: clamp(2.22rem, 5vw, 4.25rem); }
h2 { font-size: clamp(2rem, 3.6vw, 3.35rem); margin-bottom: 1.15rem; }
h3 { font-size: clamp(1.12rem, 1.9vw, 1.48rem); line-height: 1.3; margin-bottom: .65rem; }
.accent, .hero h1 span { color: var(--blue); }

.sr-only, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip:focus {
  position: fixed;
  top: .75rem;
  left: .75rem;
  padding: .75rem 1rem;
  z-index: 4;
  border-radius: .5rem;
  background: var(--paper);
}

.brand { display: inline-block; flex: 0 0 auto; }
.brand img { width: 118px; height: auto; }

.wrap { width: min(1120px, calc(100% - var(--page-gutter) * 2)); margin-inline: auto; }
.section { padding-block: clamp(3.25rem, 7vw, 6.1rem); }
.actions { display: flex; flex-wrap: wrap; gap: .65rem; justify-content: center; }
.button {
  min-height: 3.2rem;
  padding: .72rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 500 .9rem/1.45 Sora, Inter, sans-serif;
  text-decoration: none;
  text-align: center;
  transition: background-color .18s, box-shadow .18s, filter .18s;
}

.button-primary { color: var(--paper); background: var(--gradient); }
.button-primary:hover { filter: brightness(.93); box-shadow: 0 4px 12px #2530c92b; }
.button-outline { color: var(--ink); border-color: #c4d3e2; background: #ffffffb8; }
.button-outline:hover { background: #e4f0ff; }

.hero { background: var(--sky); padding: clamp(1rem, 3.35vw, 3.2rem) clamp(.85rem, 2.5vw, 2.5rem) 0; }
.hero-panel {
  width: min(1440px, 100%);
  margin-inline: auto;
  padding: clamp(2.2rem, 4.6vw, 4rem) var(--page-gutter) clamp(1rem, 2.6vw, 2rem);
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(180deg, #d8e6fc, #ecf7ff 75%);
}

.hero-copy { max-width: 68rem; margin-inline: auto; text-align: center; }
.hero h1 span { display: block; }
.hero-copy p {
  max-width: 37rem;
  margin: 1.1rem auto 1.35rem;
  color: #253348;
  font-size: clamp(1.05rem, 2vw, 1.33rem);
  line-height: 1.47;
}

.hero-visual {
  position: relative;
  isolation: isolate;
  max-width: 1010px;
  margin: clamp(1.7rem, 3vw, 2.55rem) auto 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #c5dcf2;
}

.hero-photo {
  width: 100%;
  height: clamp(15rem, 30vw, 24rem);
  object-fit: cover;
  object-position: 50% 68%;
}

.hero-stat {
  position: absolute;
  bottom: clamp(.75rem, 2.2vw, 1.5rem);
  left: clamp(.75rem, 2.2vw, 1.5rem);
  width: min(295px, calc(100% - 1.5rem));
  padding: .95rem 1.2rem;
  border: 1px solid #ffffffd4;
  border-radius: 16px;
  background: #f9fcfff5;
  box-shadow: 0 10px 28px #0d224034;
}

.stat-context { margin: 0 0 .2rem; color: var(--muted); font-size: .875rem; font-weight: 550; }
.stat-context span { margin-inline: .16em; }
.stat-number { margin-bottom: .38rem; font-size: clamp(2rem, 4.5vw, 2.9rem); font-variant-numeric: tabular-nums; }
.stat-detail { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .25rem .7rem; font-size: .875rem; }
.stat-change { color: #1655a1; font-weight: 650; }

.page-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .8rem clamp(1rem, 4vw, 2.6rem);
  padding: 1.05rem var(--page-gutter);
  border-bottom: 1px solid var(--rule);
  background: #f8fcff;
}

.page-nav a { font-size: .9rem; font-weight: 600; text-decoration: none; }
.page-nav a:hover { text-decoration: underline; }
.method { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(1.5rem, 5vw, 4.5rem); align-items: center; }
.method p, .case-intro p, .planning p, .calculation-card p, .measure-grid p, .measure-note, .cta p { color: var(--muted); }
.method-card { padding: clamp(1.35rem, 3vw, 2.25rem); background: var(--sky); border-radius: var(--radius); }
.text-link { font-weight: 650; }

.case { background: var(--sky); }
.case-intro { max-width: 45rem; margin-bottom: 2rem; }
.case-intro p, .method > div > p { font-size: 1.07rem; }
.case-grid { display: grid; grid-template-columns: 1.1fr 1fr; align-items: stretch; gap: 1rem; }
.chart-card, .calculation-card, .data-card {
  margin: 0;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper);
}

.chart-card figcaption, .data-table caption { font-size: 1.35rem; }
.chart-subtitle { margin: .3rem 0 .9rem; color: var(--muted); font-size: .875rem; }
.segment-control {
  width: fit-content;
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: .2rem;
  margin: 0 0 1.1rem;
  padding: .24rem;
  border: 0;
  border-radius: .9rem;
  background: #edf4fe;
}

.segment-control label { position: relative; }
.segment-control input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segment-control span {
  display: block;
  padding: .35rem .65rem;
  border-radius: .63rem;
  color: #2c4668;
  font-size: .875rem;
  font-weight: 550;
  cursor: pointer;
}

.segment-control input:checked + span { color: #144c99; background: var(--paper); box-shadow: 0 1px 4px #26568722; }
.segment-control input:focus-visible + span { outline: 3px solid #1655cd; outline-offset: 2px; }
.chart-bars { display: grid; gap: .72rem; }
.bar-label { display: flex; justify-content: space-between; gap: .5rem; font-size: .91rem; font-variant-numeric: tabular-nums; }
.bar-track { height: .77rem; margin-top: .32rem; border-radius: 999px; background: #eff4fa; }
.bar { height: 100%; width: var(--bar-width); border-radius: 999px; transition: width .25s ease; }
.bar-earlier { background: #88b8f1; }
.bar-later { background: var(--gradient); }
.chart-note { margin-top: .9rem; color: var(--muted); font-size: .875rem; }

.calculation-card { display: flex; flex-direction: column; }
.equation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .3rem .9rem;
  margin: auto 0 .9rem;
  padding: .8rem 1rem;
  border-radius: 14px;
  background: #edf4ff;
  color: #203555;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}

.equation strong { color: #195bb6; font: 600 1.3rem/1.25 Sora, Inter, sans-serif; }
.calculation-card .calc-note { font-size: .875rem; }
.data-card { margin-top: 1rem; }
.data-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.data-table caption { text-align: left; margin-bottom: .8rem; }
.data-table th, .data-table td { padding: .65rem .6rem; text-align: right; border-bottom: 1px solid var(--rule); }
.data-table tr > :first-child { padding-left: 0; text-align: left; }
.data-table tr > :last-child { padding-right: 0; }
.data-table thead { color: var(--muted); font-size: .875rem; }
.data-table th { font-weight: 600; }
.data-table tbody tr:first-child { font-weight: 650; }
.data-table tbody td:last-child { color: #1655a1; }
.change-short { display: none; }
.source-note { margin-top: .85rem; color: var(--muted); font-size: .85rem; }
.planning { margin-top: 1.6rem; max-width: 48rem; }

.measure-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; margin-top: 1.7rem; }
.measure-grid article { padding: 1.3rem; border-radius: 18px; border: 1px solid var(--rule); background: #f8fcff; }
.measure-grid h3 { font-size: 1.07rem; letter-spacing: -.033em; }
.measure-note { max-width: 47rem; margin: 1.3rem 0 0; }
.cta { padding: clamp(2.3rem, 6vw, 4.6rem) var(--page-gutter); border-radius: var(--radius); background: linear-gradient(155deg, #d8e6fd, #edf7ff 80%); text-align: center; }
.cta h2 { max-width: 48rem; margin-inline: auto; }
.cta p { max-width: 41rem; margin: 0 auto 1.3rem; }
.site-footer { display: flex; align-items: center; flex-wrap: wrap; gap: .85rem 1.5rem; padding-block: 2rem; font-size: .84rem; }
.site-footer .brand img { width: 100px; }
.photo-credit { margin: 0 auto 0 0; color: var(--muted); }

@media (min-width: 1180px) {
  .hero h1 { font-size: clamp(3.1rem, 4.35vw, 4rem); }
  .hero h1 span { display: inline-block; }
}

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

@media (max-width: 680px) {
  html { scroll-padding-top: 4.9rem; }
  .hero-panel { padding-inline: 1rem; }
  .hero-photo { object-position: 57% 58%; }
  .page-nav { padding-inline: .75rem; gap: .5rem .9rem; }
  .page-nav a { font-size: .875rem; }
  .method, .case-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .hero .actions { gap: .55rem; }
  .hero .button { padding-inline: .8rem; font-size: .875rem; }
  .hero-visual { margin-inline: -.4rem; }
  .data-card { padding-inline: .8rem; }
  .data-table th, .data-table td { padding-inline: .3rem; font-size: .875rem; }
  .change-long { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .change-short { display: inline; }
  .measure-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
