:root {
  --bg: #070b15;
  --bg-soft: #0f1728;
  --panel: rgba(15, 23, 40, 0.76);
  --panel-strong: rgba(16, 25, 44, 0.94);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f7f8ff;
  --muted: #a8b4d2;
  --yellow: #ffe100;
  --green: #30d178;
  --red: #ff5c7c;
  --blue: #56a4ff;
  --purple: #8c72ff;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.35);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(86, 164, 255, 0.12), transparent 24%),
    radial-gradient(circle at top right, rgba(255, 225, 0, 0.12), transparent 18%),
    linear-gradient(180deg, #050813 0%, #08111f 44%, #050813 100%);
  overflow-x: hidden;
  scroll-snap-type: y proximity;
}

button {
  font: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(3.4rem, 7vw, 6.9rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
  margin-bottom: 22px;
}

h2 {
  font-size: clamp(2.2rem, 4.6vw, 4.1rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  margin-bottom: 18px;
}

h3 {
  font-size: 1.1rem;
  margin-bottom: 14px;
}

.ey-kicker,
.chapter-kicker,
.detail-eyebrow,
.mini-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  font-weight: 700;
}

.ambient {
  position: fixed;
  inset: auto;
  pointer-events: none;
  filter: blur(24px);
  opacity: 0.8;
}

.ambient-a {
  top: 12%;
  right: 10%;
  width: 240px;
  height: 240px;
  background: rgba(255, 225, 0, 0.18);
  border-radius: 999px;
}

.ambient-b {
  top: 48%;
  left: -60px;
  width: 220px;
  height: 220px;
  background: rgba(140, 114, 255, 0.14);
  border-radius: 999px;
}

.ambient-c {
  bottom: 10%;
  right: 16%;
  width: 180px;
  height: 180px;
  background: rgba(48, 209, 120, 0.11);
  border-radius: 999px;
}

.floating-header {
  position: fixed;
  top: 22px;
  left: max(24px, calc((100vw - 1280px) / 2));
  right: max(24px, calc((100vw - 1280px) / 2));
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(7, 11, 21, 0.55);
  backdrop-filter: blur(18px);
}

.header-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.header-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-meta span,
.spotlight-pill,
.moment-pill,
.prompt-pill,
.binary-pill {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.header-meta span {
  padding: 9px 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.progress-rail {
  position: fixed;
  right: max(24px, calc((100vw - 1460px) / 2));
  top: 50%;
  transform: translateY(-50%);
  z-index: 35;
  display: grid;
  gap: 10px;
}

.rail-dot {
  width: 86px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(9, 14, 25, 0.76);
  color: var(--muted);
  padding: 10px 12px;
  display: grid;
  gap: 3px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.rail-dot span {
  font-weight: 700;
  color: var(--text);
}

.rail-dot small {
  font-size: 0.7rem;
}

.rail-dot:hover,
.rail-dot.active {
  transform: translateX(-6px);
  border-color: rgba(255, 225, 0, 0.45);
  background: rgba(255, 225, 0, 0.12);
}

.story-app {
  scroll-snap-type: y proximity;
}

.story-chapter {
  min-height: 100svh;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  padding: 118px 0 72px;
  position: relative;
}

.story-chapter::before {
  content: "";
  position: absolute;
  inset: 12% auto auto 10%;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(86, 164, 255, 0.12), transparent 70%);
  pointer-events: none;
}

.story-chapter:nth-child(2n)::before {
  inset: auto 8% 14% auto;
  background: radial-gradient(circle, rgba(255, 225, 0, 0.1), transparent 72%);
}

.chapter-inner {
  width: min(1280px, calc(100% - 88px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-layout,
.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: 38px;
  align-items: center;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.story-chapter.is-visible .reveal {
  opacity: 1;
  transform: translateY(0);
}

.story-chapter:focus-visible {
  outline: 2px solid rgba(255, 225, 0, 0.9);
  outline-offset: -18px;
}

.hero-lead,
.section-lead,
.detail-copy,
.console-footer,
.flow-caption,
.ownership-response {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero-copy-block {
  max-width: 680px;
}

.hero-quickstats,
.detail-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0 24px;
}

.hero-quickstats div,
.detail-stats article,
.metric-card,
.signal-banner,
.dashboard-panel,
.opportunity-board,
.entity-ring,
.basket-card,
.donut-card,
.country-stack,
.flow-panel,
.callout-card,
.idea-rank-card,
.idea-detail-panel,
.toggle-panel,
.wrap-card,
.country-ladder,
.console-card,
.stat-tile {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 28, 48, 0.92), rgba(7, 11, 21, 0.96));
  box-shadow: var(--shadow);
}

.hero-quickstats div,
.detail-stats article {
  border-radius: 22px;
  padding: 18px 20px;
}

.hero-quickstats span,
.detail-stats span,
.metric-label,
.stat-label,
.signal-label,
.flow-caption,
.donut-legend span,
.country-index {
  color: var(--muted);
}

.hero-quickstats strong,
.detail-stats strong,
.metric-value,
.stat-value,
.flow-amount,
.wrap-total strong {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.hero-actions,
.spotlight-list,
.prompt-row,
.toggle-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-cta,
.ghost-cta,
.prompt-pill,
.binary-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.primary-cta {
  border: 0;
  background: linear-gradient(135deg, var(--yellow), #ffbd00);
  color: #111521;
  font-weight: 800;
}

.ghost-cta,
.prompt-pill,
.binary-pill {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.primary-cta:hover,
.ghost-cta:hover,
.prompt-pill:hover,
.binary-pill:hover,
.idea-rank-card:hover,
.prompt-pill.active,
.binary-pill.active {
  transform: translateY(-2px);
  border-color: rgba(255, 225, 0, 0.38);
  background: rgba(255, 225, 0, 0.12);
}

.rail-dot:focus-visible,
.primary-cta:focus-visible,
.ghost-cta:focus-visible,
.prompt-pill:focus-visible,
.binary-pill:focus-visible,
.idea-rank-card:focus-visible {
  outline: 2px solid rgba(255, 225, 0, 0.9);
  outline-offset: 3px;
  border-color: rgba(255, 225, 0, 0.48);
}

.hero-visual {
  min-height: 560px;
  position: relative;
}

.hero-orbit {
  position: absolute;
  inset: 42px 60px 48px 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow:
    0 0 0 48px rgba(86, 164, 255, 0.05),
    0 0 0 96px rgba(255, 225, 0, 0.04);
}

.hero-card {
  position: absolute;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(14, 25, 46, 0.94), rgba(7, 11, 21, 0.98));
  padding: 24px;
  box-shadow: var(--shadow);
}

.hero-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
}

.hero-card strong {
  display: block;
  font-size: 2rem;
  margin-bottom: 10px;
}

.hero-card.large {
  inset: 30% auto auto 12%;
  width: min(480px, 74%);
}

.hero-card.small {
  width: 220px;
}

.hero-card-top {
  top: 8%;
  right: 8%;
}

.hero-card-bottom {
  bottom: 10%;
  right: 4%;
}

.section-copy {
  max-width: 620px;
}

.dashboard-panel,
.wrap-card,
.country-ladder,
.console-card,
.idea-detail-panel {
  border-radius: var(--radius-xl);
  padding: 28px;
}

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

.metric-card,
.stat-tile {
  border-radius: 22px;
  padding: 22px;
}

.metric-card {
  min-height: 150px;
  display: grid;
  align-content: space-between;
}

.tone-red .metric-value { color: #ff8a9e; }
.tone-yellow .metric-value { color: #ffe76f; }
.tone-green .metric-value { color: #78f3b0; }
.tone-blue .metric-value { color: #8ec6ff; }

.signal-banner {
  margin-top: 18px;
  border-radius: 24px;
  padding: 20px 22px;
}

.opportunity-board {
  border-radius: 32px;
  padding: 28px;
  display: grid;
  gap: 18px;
}

.board-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.board-category {
  border-radius: 999px;
  padding: 18px 20px;
  text-align: center;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
}

.board-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.idea-chip {
  padding: 14px 16px;
  border-radius: 16px;
  min-width: 170px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-viable {
  background: rgba(48, 209, 120, 0.16);
  color: #bcf8d5;
}

.status-feasible {
  background: rgba(255, 225, 0, 0.16);
  color: #fff3a3;
}

.status-not-viable {
  background: rgba(255, 92, 124, 0.17);
  color: #ffbbc8;
}

.idea-chip-featured {
  box-shadow: 0 0 0 1px rgba(255, 225, 0, 0.34), 0 0 26px rgba(255, 225, 0, 0.1);
}

.compliance-visual {
  display: grid;
  place-items: center;
}

.entity-ring {
  width: min(520px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(7, 11, 21, 0.94) 0 35%, transparent 36%),
    conic-gradient(from -30deg, var(--yellow) 0 61%, var(--blue) 61% 87%, var(--green) 87% 100%);
}

.entity-ring-core {
  width: 50%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  background: rgba(5, 8, 19, 0.92);
}

.entity-ring-core span,
.entity-ring-core small {
  color: var(--muted);
}

.entity-ring-core strong {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
}

.basket-card {
  border-radius: var(--radius-lg);
  padding: 24px;
  display: grid;
  gap: 16px;
}

.basket-row {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.basket-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

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

.basket-green { background: linear-gradient(90deg, var(--green), #7deab0); }
.basket-yellow { background: linear-gradient(90deg, var(--yellow), #ffd166); }
.basket-red { background: linear-gradient(90deg, var(--red), #ff9cb1); }

.tax-visual {
  display: grid;
  gap: 18px;
}

.donut-card,
.country-stack {
  border-radius: var(--radius-xl);
  padding: 28px;
}

.donut-card {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.donut-chart {
  --donut: 0;
  width: min(280px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--yellow) 0 calc(var(--donut) * 1%), rgba(255, 255, 255, 0.08) 0 100%);
}

.donut-center {
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  background: rgba(7, 11, 21, 0.94);
}

.donut-center strong {
  font-size: 2.8rem;
  line-height: 1;
}

.donut-center span {
  color: var(--muted);
}

.donut-legend {
  display: grid;
  gap: 16px;
}

.donut-legend div,
.country-rank,
.callout-card,
.wrap-idea {
  border-radius: 18px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.04);
}

.donut-legend strong {
  font-size: 1.3rem;
}

.country-stack {
  display: grid;
  gap: 12px;
}

.country-rank {
  display: flex;
  align-items: center;
  gap: 14px;
}

.country-index {
  min-width: 28px;
  font-weight: 700;
}

.country-name {
  font-weight: 700;
}

.flow-panel {
  border-radius: var(--radius-xl);
  padding: 30px;
}

.flow-path {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px minmax(0, 1fr) 80px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.flow-node {
  min-height: 120px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
  font-size: 1.2rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.flow-node-accent {
  background: rgba(255, 225, 0, 0.15);
  color: #fff7b8;
}

.flow-arrow {
  position: relative;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.15), rgba(255, 225, 0, 0.85));
}

.flow-arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-top: 2px solid var(--yellow);
  border-right: 2px solid var(--yellow);
  transform: translateY(-50%) rotate(45deg);
}

.flow-amount {
  margin: 26px 0 10px;
}

.callout-list {
  display: grid;
  gap: 14px;
}

.idea-rankings {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.idea-rank-card {
  width: 100%;
  text-align: left;
  border-radius: 24px;
  padding: 20px 22px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  cursor: pointer;
}

.idea-rank-card.active {
  border-color: rgba(255, 225, 0, 0.45);
  background: rgba(255, 225, 0, 0.12);
}

.idea-rank {
  font-size: 2rem;
  font-weight: 800;
  color: var(--yellow);
}

.idea-rank-card strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.idea-rank-card small {
  color: var(--muted);
}

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

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

.detail-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.detail-list-accent li {
  color: #fff0a7;
}

.toggle-panel {
  border-radius: 24px;
  margin-top: 20px;
  padding: 18px 20px;
}

.toggle-panel span {
  display: block;
  font-weight: 700;
  margin-bottom: 12px;
}

.moment-list,
.wrap-idea-stack {
  display: grid;
  gap: 12px;
}

.moment-pill {
  padding: 16px 18px;
}

.wrap-total {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.wrap-total span {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
}

.country-ladder {
  display: grid;
  gap: 16px;
}

.ladder-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.ladder-row span {
  color: var(--muted);
  font-weight: 700;
}

.ladder-bar {
  min-height: 52px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  font-weight: 700;
  background: linear-gradient(90deg, rgba(86, 164, 255, 0.4), rgba(140, 114, 255, 0.22));
}

.wrap-idea {
  font-weight: 700;
}

.console-card {
  display: grid;
  gap: 14px;
}

.console-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.console-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 18px rgba(48, 209, 120, 0.7);
}

.chat-bubble {
  max-width: 92%;
  border-radius: 22px;
  padding: 16px 18px;
  line-height: 1.65;
}

.chat-bubble-assistant {
  background: rgba(255, 255, 255, 0.05);
}

.chat-bubble-user {
  margin-left: auto;
  background: rgba(86, 164, 255, 0.18);
}

.prompt-row {
  margin-top: 24px;
}

.prompt-pill.active {
  color: #fff3a3;
}

.redirect-shell {
  min-height: 100svh;
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  place-items: center;
  text-align: center;
}

@media (max-width: 1280px) {
  .progress-rail {
    right: 18px;
  }

  .chapter-inner {
    width: min(100% - 64px, 1280px);
  }
}

@media (max-width: 1080px) {
  .floating-header {
    left: 18px;
    right: 18px;
  }

  .progress-rail {
    display: none;
  }

  .hero-layout,
  .two-column,
  .detail-columns,
  .donut-card {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 480px;
  }

  .board-row {
    grid-template-columns: 1fr;
  }

  .flow-path {
    grid-template-columns: 1fr;
  }

  .flow-arrow {
    width: 2px;
    height: 52px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 225, 0, 0.85));
  }

  .flow-arrow::after {
    top: auto;
    left: 50%;
    bottom: -1px;
    transform: translateX(-50%) rotate(135deg);
  }

  .detail-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body {
    background-size: cover;
  }

  h1 {
    font-size: clamp(2.8rem, 15vw, 4.6rem);
  }

  h2 {
    font-size: clamp(1.9rem, 9vw, 3rem);
  }

  .story-chapter {
    min-height: auto;
    padding: 116px 0 54px;
  }

  .chapter-inner {
    width: min(100% - 28px, 1280px);
  }

  .floating-header {
    padding: 14px 16px;
    border-radius: 18px;
  }

  .header-meta {
    display: none;
  }

  .hero-visual {
    min-height: 380px;
  }

  .hero-card.large {
    inset: 26% auto auto 3%;
    width: 88%;
  }

  .hero-card-top {
    right: 2%;
  }

  .hero-card-bottom {
    right: 0;
  }

  .hero-quickstats,
  .metric-grid,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .board-cards {
    display: grid;
  }

  .basket-row,
  .idea-rank-card,
  .ladder-row {
    grid-template-columns: 1fr;
  }

  .chat-bubble {
    max-width: 100%;
  }
}
