:root {
  --bg: #f1eadc;
  --bg-soft: rgba(255, 252, 246, 0.72);
  --paper: rgba(255, 248, 239, 0.9);
  --ink: #1d221b;
  --muted: #5f655a;
  --line: rgba(48, 56, 40, 0.12);
  --gold: #c7953a;
  --forest: #2f5a45;
  --moss: #557a56;
  --terracotta: #b85a36;
  --sea: #2c6f86;
  --shadow: 0 22px 60px rgba(64, 53, 28, 0.14);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(198, 149, 58, 0.2), transparent 26%),
    radial-gradient(circle at top right, rgba(44, 111, 134, 0.16), transparent 28%),
    linear-gradient(180deg, #f4ecdf 0%, #e9e3d6 48%, #ece7dc 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(47, 90, 69, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 90, 69, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 92%);
}

code {
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: 0.92em;
  padding: 0.16em 0.44em;
  border-radius: 999px;
  background: rgba(47, 90, 69, 0.08);
}

.page-shell {
  width: min(1260px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.hero,
.section {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 700ms ease,
    transform 700ms ease;
  transition-delay: var(--stagger, 0ms);
}

.hero.is-visible,
.section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 34px;
}

.hero-copy,
.hero-panel,
.framework-card,
.score-item,
.place-card,
.note-card,
.source-card {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.hero-copy {
  padding: 36px;
  border-radius: 38px;
  position: relative;
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  inset: auto -40px -40px auto;
  width: 220px;
  height: 220px;
  background:
    radial-gradient(circle at 30% 30%, rgba(199, 149, 58, 0.36), transparent 56%),
    radial-gradient(circle at 70% 65%, rgba(47, 90, 69, 0.28), transparent 52%);
  border-radius: 50%;
}

.hero-panel {
  padding: 28px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(33, 53, 42, 0.96), rgba(24, 34, 28, 0.96)),
    var(--paper);
  color: #f7efe2;
}

.eyebrow,
.panel-kicker,
.score-group,
.card-group,
.winner-rank,
.strip-label,
.detail-label,
.source-head span {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
}

.eyebrow {
  color: var(--moss);
  margin: 0 0 10px;
}

.panel-kicker {
  color: rgba(247, 239, 226, 0.75);
  margin: 0 0 12px;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-weight: 700;
  line-height: 1.04;
}

h1 {
  font-size: clamp(2.5rem, 4.8vw, 5rem);
  max-width: 10ch;
}

h2 {
  font-size: clamp(1.75rem, 2.8vw, 2.6rem);
  margin-bottom: 10px;
}

h3 {
  font-size: 1.35rem;
}

.hero-lead,
.section-head p,
.framework-summary,
.framework-reason,
.score-summary,
.card-verdict,
.card-trend,
.note-card p,
.source-card p,
.winner-why,
.hero-footnote {
  line-height: 1.65;
}

.hero-lead {
  max-width: 64ch;
  font-size: 1.06rem;
  color: var(--muted);
  margin: 18px 0 24px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-meta span,
.winner-score,
.card-score,
.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(47, 90, 69, 0.08);
  color: var(--forest);
  font-weight: 700;
}

.hero-panel h2 {
  margin-bottom: 18px;
}

.winner-stack {
  display: grid;
  gap: 14px;
}

.winner-card {
  border-radius: 22px;
  padding: 18px;
  background: rgba(247, 239, 226, 0.08);
  border: 1px solid rgba(247, 239, 226, 0.14);
}

.winner-card h3 {
  margin-top: 6px;
}

.winner-rank,
.score-group,
.card-group {
  color: rgba(247, 239, 226, 0.72);
}

.winner-score {
  margin: 14px 0 12px;
  background: rgba(247, 239, 226, 0.12);
  color: #fff3dc;
}

.hero-footnote {
  margin: 18px 0 0;
  color: rgba(247, 239, 226, 0.76);
  font-size: 0.95rem;
}

.section {
  margin-bottom: 24px;
  padding: 30px;
  border-radius: 34px;
  background: rgba(255, 251, 245, 0.56);
  border: 1px solid rgba(48, 56, 40, 0.08);
  box-shadow: 0 18px 44px rgba(88, 72, 39, 0.08);
}

.section-head {
  max-width: 74ch;
  margin-bottom: 22px;
}

.section-head p:last-child {
  color: var(--muted);
  margin: 10px 0 0;
}

.framework-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.framework-card {
  border-radius: var(--radius-lg);
  padding: 20px;
}

.framework-top,
.score-head,
.card-top,
.source-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.weight {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(199, 149, 58, 0.12);
  color: #895f17;
  font-weight: 800;
}

.framework-summary {
  margin: 16px 0 12px;
}

.framework-reason {
  margin: 0;
  color: var(--muted);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.segmented {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  background: rgba(47, 90, 69, 0.08);
  border-radius: 999px;
}

.segmented-btn {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 10px 16px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

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

.segmented-btn.is-active {
  background: var(--forest);
  color: #f8f0e4;
}

.legend-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

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

.score-item,
.place-card,
.note-card,
.source-card {
  border-radius: var(--radius-lg);
}

.score-item {
  padding: 20px;
}

.score-group,
.card-group {
  color: var(--moss);
}

.score-pill,
.card-score {
  background: rgba(44, 111, 134, 0.12);
  color: var(--sea);
}

.score-summary {
  margin: 14px 0 18px;
  color: var(--muted);
}

.bar-stack {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
}

.bar-label,
.bar-value {
  font-size: 0.87rem;
  font-weight: 700;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(47, 90, 69, 0.12);
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
}

.bar-fill.is-calm {
  background: linear-gradient(90deg, #4b8d63, #84be7b);
}

.bar-fill.is-good {
  background: linear-gradient(90deg, #65955b, #adc35a);
}

.bar-fill.is-mid {
  background: linear-gradient(90deg, #c19a2f, #d8bc53);
}

.bar-fill.is-risky {
  background: linear-gradient(90deg, #c56638, #d98954);
}

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

.place-card {
  padding: 22px;
}

.card-verdict {
  margin: 14px 0 16px;
  font-size: 1rem;
  color: var(--forest);
}

.weather-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(44, 111, 134, 0.11), rgba(199, 149, 58, 0.08));
  margin-bottom: 18px;
}

.strip-label {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
}

.weather-strip strong {
  display: block;
  line-height: 1.4;
}

.card-trend {
  margin: 0 0 16px;
  color: var(--muted);
}

.fact-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  line-height: 1.55;
}

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

.detail-grid > .bar-stack {
  grid-column: 1 / -1;
}

.detail-block,
.bar-stack {
  padding: 14px;
  border-radius: 16px;
  background: rgba(47, 90, 69, 0.05);
  border: 1px solid rgba(47, 90, 69, 0.08);
}

.detail-label {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.detail-value {
  line-height: 1.5;
}

.note-grid,
.source-list {
  display: grid;
  gap: 16px;
}

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

.note-card,
.source-card {
  padding: 20px;
}

.note-card p,
.source-card p {
  margin: 12px 0 0;
  color: var(--muted);
}

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

.source-card a {
  display: inline-flex;
  margin-top: 16px;
  color: var(--forest);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid rgba(47, 90, 69, 0.3);
}

.source-card a:hover {
  border-color: var(--forest);
}

@media (max-width: 1080px) {
  .hero,
  .framework-grid,
  .scoreboard,
  .card-grid,
  .note-grid,
  .source-list {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 100%);
    padding-top: 14px;
  }

  .hero-copy,
  .hero-panel,
  .section,
  .place-card,
  .score-item,
  .note-card,
  .source-card,
  .framework-card {
    padding: 18px;
  }

  h1 {
    max-width: 12ch;
  }

  .weather-strip,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .bar-row {
    grid-template-columns: 74px minmax(0, 1fr) 30px;
  }
}
