:root {
  color-scheme: dark;
  --ink: #07111f;
  --ink-raised: #0d1d2d;
  --deep-teal: #10313a;
  --mist: #f4f7f2;
  --paper: #e7ece8;
  --slate: #4f6068;
  --cyan: #40e0d0;
  --coral: #ff6b57;
  --sun: #f6c85f;
  --line-dark: rgba(244, 247, 242, 0.16);
  --line-light: rgba(7, 17, 31, 0.14);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --display: ui-rounded, "Avenir Next", "Trebuchet MS", sans-serif;
  --body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --utility: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  background: var(--ink);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--ink);
  color: var(--mist);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

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

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: 8px;
  background: var(--mist);
  color: var(--ink);
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--line-dark);
  background: rgba(7, 17, 31, 0.92);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1180px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  position: relative;
  width: 28px;
  height: 28px;
  transform: rotate(45deg);
  border: 2px solid var(--cyan);
  border-radius: 7px 12px 7px 12px;
  background: linear-gradient(135deg, var(--cyan) 0 48%, var(--coral) 49% 100%);
  box-shadow: 0 0 22px rgba(64, 224, 208, 0.28);
}

.brand-mark::after {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 7px;
  height: 7px;
  content: "";
  border-radius: 50%;
  background: var(--sun);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  min-height: 42px;
  padding: 9px 13px;
  border-radius: 999px;
  color: rgba(244, 247, 242, 0.76);
  font-size: 0.91rem;
  font-weight: 720;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: rgba(64, 224, 208, 0.1);
  color: var(--mist);
}

.nav-cta {
  border: 1px solid rgba(64, 224, 208, 0.45);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-dark);
  border-radius: 12px;
  background: transparent;
  color: var(--mist);
  cursor: pointer;
}

.nav-toggle svg {
  width: 22px;
}

.game-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(36px, 6vw, 76px) 0 70px;
  isolation: isolate;
}

.game-hero::before {
  position: absolute;
  z-index: -2;
  inset: -30% -10% auto;
  height: 620px;
  content: "";
  transform: rotate(-7deg);
  background:
    linear-gradient(115deg, transparent 5%, rgba(64, 224, 208, 0.15) 45%, transparent 46%),
    linear-gradient(115deg, transparent 38%, rgba(255, 107, 87, 0.13) 38.5%, transparent 62%);
}

.game-hero::after {
  position: absolute;
  z-index: -1;
  top: 210px;
  right: -8vw;
  width: min(560px, 60vw);
  height: 1px;
  content: "";
  transform: rotate(-17deg);
  background: linear-gradient(90deg, transparent, var(--cyan), var(--coral), transparent);
  box-shadow: 0 0 28px 4px rgba(64, 224, 208, 0.2);
}

.hero-inner,
.section-inner,
.article-shell,
.footer-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
  align-items: end;
  gap: 40px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--cyan);
  font-family: var(--utility);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin-top: 0;
  font-family: var(--display);
  line-height: 1.05;
  text-wrap: balance;
}

.game-hero h1 {
  max-width: 790px;
  margin-bottom: 0;
  font-size: clamp(2.65rem, 6.2vw, 5.7rem);
  font-weight: 900;
  letter-spacing: -0.07em;
}

.accent-word {
  color: var(--cyan);
}

.hero-lede {
  margin: 0 0 5px;
  color: rgba(244, 247, 242, 0.7);
  font-size: clamp(1rem, 1.45vw, 1.16rem);
  line-height: 1.55;
}

.play-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(230px, 0.8fr);
  align-items: stretch;
  gap: 18px;
}

.game-shell {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(64, 224, 208, 0.3);
  border-radius: var(--radius-lg);
  background: #06101c;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  touch-action: none;
  user-select: none;
}

.game-canvas-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 320px;
}

[data-game-canvas] {
  width: 100%;
  height: 100%;
  background: #07111f;
}

.game-hud {
  position: absolute;
  z-index: 4;
  top: 14px;
  right: 14px;
  left: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.hud-cluster {
  display: flex;
  gap: 7px;
}

.hud-chip {
  min-width: 74px;
  padding: 7px 10px;
  border: 1px solid rgba(244, 247, 242, 0.13);
  border-radius: 10px;
  background: rgba(5, 14, 26, 0.72);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
}

.hud-chip small,
.hud-chip strong {
  display: block;
  line-height: 1.2;
}

.hud-chip small {
  margin-bottom: 2px;
  color: rgba(244, 247, 242, 0.58);
  font-family: var(--utility);
  font-size: 0.63rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.hud-chip strong {
  font-family: var(--utility);
  font-size: 0.98rem;
}

.game-overlay {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(180deg, rgba(7, 17, 31, 0.24), rgba(7, 17, 31, 0.82));
  text-align: center;
  transition: opacity 180ms ease;
}

.game-overlay[hidden] {
  display: none;
}

.overlay-card {
  width: min(440px, 100%);
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid rgba(244, 247, 242, 0.15);
  border-radius: 22px;
  background: rgba(7, 17, 31, 0.82);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(16px);
}

.overlay-kite {
  width: 42px;
  height: 42px;
  margin: 0 auto 18px;
  transform: rotate(45deg);
  border-radius: 8px 16px 8px 16px;
  background: linear-gradient(135deg, var(--cyan) 0 49%, var(--coral) 50% 100%);
  box-shadow: 0 0 35px rgba(64, 224, 208, 0.32);
}

.overlay-card h2 {
  margin-bottom: 9px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.045em;
}

.overlay-card p {
  margin: 0 auto 20px;
  color: rgba(244, 247, 242, 0.7);
}

.game-toolbar {
  position: absolute;
  z-index: 6;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 7px;
}

.icon-button {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(244, 247, 242, 0.16);
  border-radius: 12px;
  background: rgba(7, 17, 31, 0.76);
  color: var(--mist);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.icon-button:hover {
  border-color: var(--cyan);
  background: rgba(16, 49, 58, 0.9);
}

.icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  background: var(--cyan);
  color: var(--ink);
  box-shadow: 0 12px 30px rgba(64, 224, 208, 0.22);
}

.button-primary:hover {
  background: #70eadf;
  transform: translateY(-1px);
}

.button-secondary {
  border-color: rgba(7, 17, 31, 0.2);
  background: transparent;
  color: var(--ink);
}

.button-dark {
  border-color: var(--line-dark);
  background: rgba(244, 247, 242, 0.06);
  color: var(--mist);
}

.mission-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 22px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, rgba(16, 49, 58, 0.72), rgba(13, 29, 45, 0.46));
}

.mission-panel h2 {
  margin-bottom: 8px;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

.mission-panel p {
  margin: 0;
  color: rgba(244, 247, 242, 0.67);
  font-size: 0.91rem;
}

.control-key {
  min-width: 58px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  margin: 14px 0 8px;
  border: 1px solid rgba(244, 247, 242, 0.2);
  border-bottom-width: 3px;
  border-radius: 8px;
  background: rgba(7, 17, 31, 0.55);
  font-family: var(--utility);
  font-size: 0.76rem;
  font-weight: 800;
}

.mode-list {
  display: grid;
  gap: 8px;
}

.mode-link {
  display: block;
  padding: 13px;
  border: 1px solid var(--line-dark);
  border-radius: 13px;
  text-decoration: none;
}

.mode-link:hover,
.mode-link[aria-current="page"] {
  border-color: rgba(64, 224, 208, 0.5);
  background: rgba(64, 224, 208, 0.08);
}

.mode-link strong,
.mode-link span {
  display: block;
}

.mode-link strong {
  font-size: 0.9rem;
}

.mode-link span {
  color: rgba(244, 247, 242, 0.55);
  font-size: 0.75rem;
}

.game-note {
  margin-top: 12px;
  color: rgba(244, 247, 242, 0.54);
  font-size: 0.78rem;
}

.editorial {
  background: var(--mist);
  color: var(--ink);
}

.section {
  padding: clamp(68px, 9vw, 118px) 0;
}

.section + .section {
  border-top: 1px solid var(--line-light);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(280px, 1fr);
  gap: clamp(30px, 8vw, 110px);
  align-items: start;
  margin-bottom: 46px;
}

.section-heading h2,
.content-hero h1 {
  margin-bottom: 0;
  font-size: clamp(2.35rem, 5vw, 4.5rem);
  letter-spacing: -0.06em;
}

.section-heading p {
  max-width: 650px;
  margin: 2px 0 0;
  color: var(--slate);
  font-size: 1.05rem;
}

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

.principle {
  min-width: 0;
  padding: 28px;
}

.principle + .principle {
  border-left: 1px solid var(--line-light);
}

.principle-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-bottom: 42px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cyan);
  font-family: var(--utility);
  font-size: 0.76rem;
}

.principle h3 {
  margin-bottom: 8px;
  font-size: 1.27rem;
}

.principle p {
  margin: 0;
  color: var(--slate);
  font-size: 0.94rem;
}

.route-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}

.route-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(28px, 5vw, 50px);
  border-radius: var(--radius-lg);
  text-decoration: none;
}

.route-card-primary {
  background: var(--deep-teal);
  color: var(--mist);
}

.route-card-secondary {
  border: 1px solid var(--line-light);
  background: var(--paper);
  color: var(--ink);
}

.route-card-secondary .eyebrow {
  color: #075f62;
  opacity: 1;
}

.route-card h3 {
  max-width: 500px;
  margin-bottom: 12px;
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  letter-spacing: -0.05em;
}

.route-card p {
  max-width: 520px;
  margin: 0;
  opacity: 0.72;
}

.route-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 40px;
  font-weight: 850;
}

.route-arrow {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 1.4rem;
}

.content-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(68px, 11vw, 130px) 0 clamp(54px, 8vw, 94px);
}

.content-hero::after {
  position: absolute;
  right: -12%;
  bottom: 24%;
  width: 55%;
  height: 2px;
  content: "";
  transform: rotate(-12deg);
  background: linear-gradient(90deg, transparent, var(--cyan), var(--coral), transparent);
  box-shadow: 0 0 30px rgba(64, 224, 208, 0.3);
}

.content-hero .article-shell {
  position: relative;
  z-index: 1;
}

.content-hero h1 {
  max-width: 850px;
}

.content-hero .lede {
  max-width: 720px;
  margin: 20px 0 0;
  color: rgba(244, 247, 242, 0.7);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.article {
  padding: clamp(60px, 9vw, 110px) 0;
  background: var(--mist);
  color: var(--ink);
}

.article-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 720px);
  justify-content: center;
  gap: clamp(36px, 8vw, 100px);
}

.article-nav {
  position: sticky;
  top: 28px;
  align-self: start;
  padding-top: 5px;
}

.article-nav strong {
  display: block;
  margin-bottom: 12px;
  font-family: var(--utility);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.article-nav a {
  display: block;
  padding: 7px 0;
  color: var(--slate);
  font-size: 0.88rem;
  text-decoration: none;
}

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

.prose {
  min-width: 0;
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2 {
  margin: 3.3rem 0 1rem;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  letter-spacing: -0.045em;
}

.prose h3 {
  margin: 2rem 0 0.7rem;
  font-size: 1.3rem;
}

.prose p,
.prose li {
  color: #32434b;
}

.prose a {
  color: #075f62;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose ul,
.prose ol {
  padding-left: 1.3rem;
}

.prose li + li {
  margin-top: 0.6rem;
}

.callout {
  margin: 28px 0;
  padding: 22px 24px;
  border-left: 4px solid var(--coral);
  background: var(--paper);
}

.callout strong {
  display: block;
  margin-bottom: 5px;
}

.comparison-table {
  width: 100%;
  margin: 28px 0;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.comparison-table th,
.comparison-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line-light);
  text-align: left;
  vertical-align: top;
}

.comparison-table th {
  font-family: var(--utility);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mini-game-wrap {
  margin: 0 auto;
  padding: 48px 0 20px;
  background: var(--ink);
}

.mini-game-wrap .game-shell {
  width: min(960px, calc(100% - 40px));
  margin: 0 auto;
}

.faq-list {
  max-width: 820px;
  margin: 0 auto;
}

.faq-item {
  padding: 24px 0;
  border-top: 1px solid var(--line-light);
}

.faq-item:last-child {
  border-bottom: 1px solid var(--line-light);
}

.faq-item h3 {
  margin-bottom: 8px;
  font-size: 1.18rem;
}

.faq-item p {
  margin: 0;
  color: var(--slate);
}

.site-footer {
  padding: 54px 0 36px;
  border-top: 1px solid var(--line-dark);
  background: var(--ink);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 52px;
}

.footer-note {
  max-width: 420px;
  margin: 15px 0 0;
  color: rgba(244, 247, 242, 0.56);
  font-size: 0.88rem;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 9px 40px;
}

.footer-links a {
  color: rgba(244, 247, 242, 0.68);
  font-size: 0.87rem;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--cyan);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line-dark);
  color: rgba(244, 247, 242, 0.68);
  font-size: 0.76rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .hero-heading,
  .play-layout,
  .section-heading,
  .route-grid,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .hero-heading {
    gap: 16px;
  }

  .hero-lede {
    max-width: 650px;
  }

  .mission-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .article-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line-light);
  }

  .article-nav strong {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .nav-wrap,
  .hero-inner,
  .section-inner,
  .article-shell,
  .footer-inner {
    width: min(100% - 28px, 1180px);
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 64px;
    right: 14px;
    left: 14px;
    display: none;
    padding: 10px;
    border: 1px solid var(--line-dark);
    border-radius: 16px;
    background: #0b1928;
    box-shadow: var(--shadow);
  }

  .site-nav[data-open] {
    display: grid;
  }

  .site-nav a {
    min-height: 46px;
  }

  .game-hero {
    padding-top: 28px;
  }

  .game-hero h1 {
    font-size: clamp(2.55rem, 14vw, 4.3rem);
  }

  .game-canvas-wrap {
    aspect-ratio: 4 / 3;
    min-height: 0;
  }

  .game-shell,
  .mission-panel,
  .route-card {
    border-radius: 20px;
  }

  .mission-panel {
    grid-template-columns: 1fr;
  }

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

  .principle + .principle {
    border-top: 1px solid var(--line-light);
    border-left: 0;
  }

  .principle-mark {
    margin-bottom: 24px;
  }

  .footer-top,
  .footer-bottom {
    flex-direction: column;
  }

  .footer-links {
    grid-template-columns: 1fr 1fr;
  }

  .comparison-table {
    display: block;
    overflow-x: auto;
  }
}

@media (max-width: 460px) {
  .game-hud {
    top: 9px;
    right: 9px;
    left: 9px;
  }

  .hud-chip {
    min-width: 62px;
    padding: 6px 8px;
  }

  .hud-chip small {
    font-size: 0.56rem;
  }

  .hud-chip strong {
    font-size: 0.85rem;
  }

  .overlay-card {
    padding: 18px;
  }

  .overlay-kite {
    display: none;
  }

  .game-toolbar {
    right: 8px;
    bottom: 8px;
  }

  .icon-button {
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
