:root {
  color-scheme: dark;
  --bg: #071017;
  --bg-2: #0a141d;
  --panel: rgba(14, 25, 35, .82);
  --panel-2: rgba(17, 29, 40, .92);
  --line: rgba(170, 196, 220, .16);
  --line-strong: rgba(170, 196, 220, .26);
  --text: #edf4fb;
  --muted: #9aabbb;
  --muted-2: #718497;
  --blue: #4ea1ff;
  --blue-2: #7ebdff;
  --green: #55d39a;
  --shadow: 0 24px 80px rgba(0,0,0,.34);
  --radius: 14px;
  --max: 1180px;
  --gutter: clamp(16px, 3.5vw, 32px);
  --section-space: clamp(54px, 6.2vw, 78px);
  --header-h: 78px;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 76% 4%, rgba(65,121,171,.17), transparent 25%),
    radial-gradient(circle at 14% 34%, rgba(26,75,111,.12), transparent 31%),
    linear-gradient(180deg,#071017 0%,#09131b 42%,#061017 100%);
  color: var(--text);
  line-height: 1.5;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}
body.menu-open { overflow: hidden; }

main { min-width: 0; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img, svg { max-width: 100%; }
img { display: block; }
svg { overflow: visible; }

::selection { background: rgba(78,161,255,.28); color: #fff; }
:focus-visible {
  outline: 2px solid var(--blue-2);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  transform: translateY(-140%);
  padding: 9px 12px;
  background: #eef4f9;
  color: #071017;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  transition: transform .18s ease;
}
.skip-link:focus { transform: translateY(0); }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.container {
  width: min(calc(100% - (var(--gutter) * 2)), var(--max));
  margin-inline: auto;
  min-width: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7,16,23,.91);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
@supports ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
  .site-header {
    background: rgba(7,16,23,.76);
    -webkit-backdrop-filter: blur(14px) saturate(1.08);
    backdrop-filter: blur(14px) saturate(1.08);
  }
}
.nav {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(14px, 2.6vw, 32px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  letter-spacing: .03em;
  line-height: 1.15;
  white-space: nowrap;
}
.brand-mark {
  flex: 0 0 auto;
  width: 2px;
  height: 34px;
  background: linear-gradient(var(--blue-2),rgba(126,189,255,.15));
  box-shadow: 12px 16px 0 -0.5px var(--blue-2);
  transform: skewY(35deg);
  margin-right: 8px;
}
.brand small {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .18em;
  display: block;
  margin-top: 2px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.2vw, 28px);
  font-size: 13px;
  color: #c4d0dc;
}
.nav-links a {
  position: relative;
  padding-block: 8px;
  transition: color .2s ease;
}
.nav-links a:hover, .nav-links a.active, .nav-links a[aria-current="page"] { color: #fff; }
.nav-links a.active::after, .nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -11px;
  height: 1px;
  background: var(--blue-2);
}
.nav-actions { display: flex; align-items: center; gap: 10px; }
.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  color: #fff;
  border-radius: 9px;
  font-size: 19px;
  line-height: 1;
}
.mobile-toggle .close-icon { display: none; }
.mobile-toggle[aria-expanded="true"] .menu-icon { display: none; }
.mobile-toggle[aria-expanded="true"] .close-icon { display: inline; }
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 14px var(--gutter) calc(16px + env(safe-area-inset-bottom));
  background: rgba(7,16,23,.985);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 50px rgba(0,0,0,.34);
}
.mobile-menu.open { display: grid; gap: 4px; }
.mobile-menu a {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: #c6d3de;
  border-radius: 8px;
}
.mobile-menu a:hover, .mobile-menu a[aria-current="page"] { background: rgba(126,189,255,.07); color: #fff; }

/* Buttons and type */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgba(255,255,255,.025);
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(126,189,255,.5);
  background: rgba(126,189,255,.06);
}
.btn-primary {
  background: linear-gradient(180deg,#338ff0,#2573c4);
  border-color: #5baaff;
  box-shadow: 0 8px 28px rgba(42,130,221,.2);
}
.btn-primary:hover {
  background: linear-gradient(180deg,#43a0ff,#2d80d4);
  box-shadow: 0 10px 34px rgba(42,130,221,.3);
}
.btn-light { background: #eef4f9; color: #0b1218; border-color: #fff; }
.icon { width: 18px; height: 18px; display: inline-block; vertical-align: middle; fill: currentColor; flex: 0 0 auto; }
.kicker {
  margin-bottom: 16px;
  font: 600 10px/1.25 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: #88a8c3;
}
h1,h2,h3,p { margin-top: 0; }
h1,h2 { text-wrap: balance; }
h1 {
  margin-bottom: 24px;
  max-width: 13ch;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 620;
  letter-spacing: -.045em;
  font-size: clamp(2.65rem, 5.1vw, 4.875rem);
  line-height: 1.03;
}
h2 {
  margin-bottom: 16px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  letter-spacing: -.035em;
  font-size: clamp(2rem, 3.3vw, 3.125rem);
  line-height: 1.08;
}
h3 { margin-bottom: 8px; font-size: 18px; line-height: 1.3; }
.lead {
  max-width: 62ch;
  color: #afbfcc;
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 30px 0 20px; }
.meta-line { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; color: #8ea0b0; font-size: 12px; }
.meta-line span:not(:last-child)::after { content: "•"; margin-left: 12px; color: #506476; }

/* Home hero */
.hero {
  position: relative;
  padding: clamp(48px, 6vw, 72px) 0 clamp(60px, 7vw, 82px);
  border-bottom: 1px solid var(--line);
  overflow: clip;
}
.hero::after, .page-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 280px;
  z-index: -1;
  opacity: .52;
  background:
    linear-gradient(to top,#071017 8%,transparent 72%),
    radial-gradient(ellipse at 28% 100%,#122331 0 20%,transparent 21%),
    radial-gradient(ellipse at 62% 100%,#0d1d29 0 29%,transparent 30%),
    radial-gradient(ellipse at 92% 100%,#10212e 0 25%,transparent 26%);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0,.94fr) minmax(0,1.06fr);
  gap: clamp(36px, 4.7vw, 54px);
  align-items: center;
}
.hero-grid > *, .section-grid > *, .build-grid > * { min-width: 0; }

/* App preview */
.app-window {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: linear-gradient(180deg,rgba(14,25,35,.98),rgba(8,16,23,.98));
  box-shadow: var(--shadow);
  contain: paint;
}
.window-bar {
  min-height: 40px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 13px;
  gap: 7px;
  color: #b8c7d4;
  font-size: 11px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #d96564; flex: 0 0 auto; }
.dot:nth-child(2) { background: #d6b55c; }
.dot:nth-child(3) { background: #63b27c; }
.window-title { margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-layout { display: grid; grid-template-columns: 132px minmax(0,1fr) 150px; min-height: 330px; }
.app-sidebar {
  border-right: 1px solid var(--line);
  padding: 16px 11px;
  color: #7f94a7;
  font-size: 10px;
}
.app-logo { color: #dbe8f2; font-family: Georgia,serif; margin: 0 0 18px; padding: 4px 8px; border-left: 1px solid #94c8f4; }
.app-nav-item { padding: 8px 9px; border-radius: 6px; margin: 4px 0; }
.app-nav-item.active { background: #172a3a; color: #e8f2fa; }
.story-pane { padding: 16px; min-width: 0; }
.tabs {
  display: flex;
  justify-content: center;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  font: 600 10px ui-monospace,monospace;
  color: #91a4b5;
}
.tabs .active { color: #dceeff; position: relative; }
.tabs .active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -11px; height: 1px; background: #74b9fa; }
.scene {
  margin: 17px 0 13px;
  color: #c2cdd7;
  font: 12px/1.65 ui-monospace,SFMono-Regular,Menlo,monospace;
  overflow-wrap: anywhere;
}
.choice {
  margin-top: 6px;
  padding: 9px 10px;
  border: 1px solid #203646;
  border-radius: 5px;
  color: #9fb2c2;
  font-size: 10px;
  overflow-wrap: anywhere;
}
.choice.active { border-color: #64a9e9; color: #e2f0fb; background: #0d1b27; }
.story-input {
  min-height: 37px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #8093a4;
  font-size: 10px;
  display: flex;
  align-items: center;
  padding: 8px 11px;
  gap: 10px;
  justify-content: space-between;
}
.story-input span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.state-pane { border-left: 1px solid var(--line); padding: 17px 13px; background: rgba(255,255,255,.012); }
.state-pane h4 { margin: 0 0 17px; font-size: 12px; }
.state { margin: 13px 0; font-size: 10px; color: #8297a9; }
.state b { display: block; color: #c6d6e2; font-weight: 500; margin-top: 2px; overflow-wrap: anywhere; }
.state.good b { color: #84d4ad; }

/* Shared sections */
.section { padding: var(--section-space) 0; border-bottom: 1px solid var(--line); }
.section-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(38px, 6vw, 70px); align-items: center; }
.soft-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg,rgba(18,33,44,.72),rgba(8,16,23,.72));
  padding: clamp(22px, 2.4vw, 28px);
  box-shadow: inset 0 1px rgba(255,255,255,.015);
}
.scene-art {
  min-height: clamp(190px, 24vw, 240px);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 40%,rgba(155,191,218,.12),transparent 18%),
    linear-gradient(180deg,rgba(8,14,20,.08),rgba(5,12,17,.85)),
    linear-gradient(145deg,#142838,#0e1820 58%,#091117);
}
.scene-art::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: -10%;
  width: 70%;
  height: 65%;
  background: #0b171f;
  clip-path: polygon(0 100%,8% 58%,18% 72%,31% 32%,43% 61%,60% 18%,78% 67%,100% 44%,100% 100%);
}
.scene-art::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: -10%;
  width: 75%;
  height: 60%;
  background: #0a141b;
  clip-path: polygon(0 69%,10% 43%,23% 57%,41% 23%,58% 61%,74% 31%,88% 67%,100% 51%,100% 100%,0 100%);
}
.scene-caption { position: absolute; right: 24px; bottom: 20px; z-index: 2; font-family: Georgia,serif; font-size: 18px; font-style: italic; color: #b5c0ca; text-align: right; }

.steps { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(20px, 2.4vw, 28px); margin-top: 34px; }
.step { position: relative; min-width: 0; }
.step:not(:last-child)::after { content: "→"; position: absolute; right: -17px; top: 25px; color: #647b8d; }
.step-num { width: 24px; height: 24px; border-radius: 50%; background: #142431; border: 1px solid var(--line); display: grid; place-items: center; font: 10px ui-monospace,monospace; color: #c5d7e6; margin-bottom: 16px; }
.step-icon { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; margin-bottom: 14px; color: #b7cee2; background: rgba(255,255,255,.02); }
.step p { margin-bottom: 0; font-size: 13px; color: #93a6b7; }
.memory-box { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(175px,.65fr); padding: 0; overflow: hidden; }
.memory-copy { padding: 25px; color: #c0ced9; font: 12px/1.75 ui-monospace,monospace; overflow-wrap: anywhere; }
.memory-state { border-left: 1px solid var(--line); padding: 24px 18px; font-size: 11px; }
.memory-state .row { display: flex; gap: 8px; align-items: center; margin: 12px 0; color: #b2c2ce; }
.green-dot { width: 7px; height: 7px; border-radius: 50%; background: #4cc58c; box-shadow: 0 0 10px rgba(76,197,140,.4); flex: 0 0 auto; }
.cards-3 { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; margin-top: 26px; }
.feature-card { min-height: 150px; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 22px; background: linear-gradient(150deg,rgba(18,31,42,.82),rgba(8,15,21,.84)); display: grid; grid-template-columns: 54px minmax(0,1fr); gap: 17px; align-items: start; }
.feature-card p { margin: 5px 0 0; font-size: 13px; color: #91a5b5; }
.feature-icon { width: 50px; height: 50px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: #c2d7e8; }
.build-grid { display: grid; grid-template-columns: minmax(0,.95fr) minmax(0,1.05fr); gap: clamp(40px, 5.5vw, 64px); align-items: center; }
.build-panel { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px; }
.build-panel h4 { font-size: 12px; margin: 0 0 15px; }
.checklist { list-style: none; padding: 0; margin: 0; color: #a2b3c2; font-size: 12px; }
.checklist li { margin: 9px 0; }
.checklist .yes::before { content: "✓"; color: #55d39a; margin-right: 9px; }
.checklist .next::before { content: "○"; color: #8ba0b2; margin-right: 9px; }
.version { font-family: ui-monospace,monospace; color: #d9e7f2; font-size: 14px; }
.version small { font-size: 9px; color: #7f96a9; letter-spacing: .2em; margin-left: 10px; }
.center-cta { text-align: center; }
.center-cta .lead { margin-inline: auto; }
.center-cta .hero-actions { justify-content: center; }

/* Secondary pages */
.page-hero { position: relative; padding: clamp(48px,5.5vw,66px) 0 clamp(44px,4.8vw,54px); border-bottom: 1px solid var(--line); overflow: clip; }
.page-hero h1 { max-width: 11.5ch; font-size: clamp(2.7rem,4.7vw,4.25rem); }
.page-hero .lead { max-width: 720px; }
.download-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; margin-top: 34px; }
.download-card { text-align: center; padding: clamp(28px,3vw,34px) 24px; }
.platform-icon { width: 42px; height: 42px; margin: 0 auto 17px; color: #dbe9f4; fill: currentColor; }
.download-card h3 { font-size: 21px; }
.download-card .btn { width: 100%; margin-top: 15px; }
.download-note { font-size: 11px; color: #8297a8; margin-top: 12px; }
.inline-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.015); font-size: 13px; color: #a4b5c3; }
.requirements { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.req { border-top: 1px solid var(--line-strong); padding-top: 18px; }
.req strong { display: block; margin-bottom: 5px; }
.req span { font-size: 13px; color: #96a9b9; }
.note-filter { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0; }
.chip { min-height: 38px; border: 1px solid var(--line); background: rgba(255,255,255,.02); color: #9fb1c0; border-radius: 999px; padding: 7px 13px; font-size: 11px; }
.chip:hover { border-color: var(--line-strong); color: #fff; }
.chip.active, .chip[aria-pressed="true"] { background: #ecf3f8; color: #0d161d; }
.notes-list { display: grid; gap: 14px; }
.note-card { border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.018); padding: 0; overflow: hidden; }
.note-card[hidden] { display: none !important; }
.note-card summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 150px minmax(0,1fr) auto; gap: 18px; align-items: center; padding: 16px; }
.note-card summary::-webkit-details-marker { display: none; }
.note-card summary::after { content: "＋"; color: #8398aa; font-size: 18px; margin-left: 4px; }
.note-card[open] summary::after { content: "−"; }
.note-thumb { height: 80px; border-radius: 7px; background: linear-gradient(145deg,#183148,#0b1721); position: relative; overflow: hidden; }
.note-thumb::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 65%; background: #0b1821; clip-path: polygon(0 100%,0 64%,15% 50%,30% 67%,42% 22%,55% 51%,70% 27%,89% 55%,100% 42%,100% 100%); }
.note-card h3 { font-size: 16px; margin: 4px 0; }
.note-card .date { font-size: 10px; color: #7a8ea0; }
.note-card .desc { font-size: 12px; color: #90a3b3; }
.tag { font-size: 9px; padding: 5px 8px; border-radius: 999px; background: #152532; color: #a0bdd4; }
.note-body { border-top: 1px solid var(--line); padding: 18px 22px 22px; color: #a2b4c3; font-size: 13px; max-width: 900px; }
.note-body a { color: #87c4ff; text-decoration: underline; text-decoration-color: rgba(135,196,255,.35); text-underline-offset: 3px; }
.world-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; margin-top: 28px; }
.world-card { min-width: 0; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: #0b151d; transition: transform .2s ease, border-color .2s ease; }
.world-card:hover { transform: translateY(-3px); border-color: #496278; }
.world-art { height: clamp(150px,15vw,180px); position: relative; overflow: hidden; background: linear-gradient(145deg,#193148,#0a151e); }
.world-art::before { content: ""; position: absolute; inset: auto -10% 0; height: 70%; background: #0a171f; clip-path: polygon(0 100%,0 65%,15% 48%,28% 72%,43% 22%,54% 58%,69% 31%,83% 65%,100% 46%,100% 100%); }
.world-art.noir { background: radial-gradient(circle at 55% 30%,rgba(203,82,120,.22),transparent 25%),linear-gradient(145deg,#1c2740,#11111b); }
.world-art.ruins { background: linear-gradient(145deg,#24303a,#0d171c); }
.world-art.space { background: radial-gradient(circle at 80% 20%,#516780 0 8%,transparent 9%),linear-gradient(145deg,#101f31,#080f18); }
.world-art.woods { background: linear-gradient(145deg,#17302d,#081715); }
.world-copy { padding: 16px; }
.world-copy h3 { font-size: 15px; margin-bottom: 5px; }
.world-copy p { font-size: 12px; color: #8ca1b1; margin: 0; }
.about-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.about-card { padding: clamp(22px,2.5vw,28px); }
.about-card p { color: #9dafbd; font-size: 14px; line-height: 1.75; }
.about-card h2 { font-size: clamp(1.75rem,2.7vw,2rem); }

/* Footer */
.footer { padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); background: #061018; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-copy { font-size: 11px; color: #71879a; }
.footer-links { display: flex; gap: 20px; color: #8da1b2; font-size: 11px; flex-wrap: wrap; }
.footer-links a:hover { color: #fff; }

/* Tablet */
@media (max-width: 980px) {
  .hero-grid, .section-grid, .build-grid, .about-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 42px; }
  .hero-grid > div:last-child { width: min(100%, 700px); margin-inline: auto; }
  .section-grid { gap: 38px; }
  .app-layout { grid-template-columns: 108px minmax(0,1fr); }
  .state-pane { display: none; }
  .cards-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .world-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 840px) {
  :root { --header-h: 70px; }
  .nav-links { display: none; }
  .mobile-toggle { display: inline-flex; }
  .steps { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .step::after { display: none; }
  .cards-3 { grid-template-columns: 1fr; }
  .feature-card { min-height: auto; }
  .requirements { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-row { align-items: flex-start; }
  .memory-box { grid-template-columns: 1fr; }
  .memory-state { border-left: 0; border-top: 1px solid var(--line); }
  .note-card summary { grid-template-columns: 118px minmax(0,1fr) auto; }
}

@media (max-width: 680px) {
  :root { --section-space: 54px; }
  .download-top { display: none; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; white-space: normal; }
  .download-grid { grid-template-columns: 1fr; }
  .inline-banner { align-items: stretch; flex-direction: column; }
  .inline-banner .btn { width: 100%; }
  .world-grid { grid-template-columns: 1fr; }
  .build-panel { grid-template-columns: 1fr; }
  .note-card summary { grid-template-columns: 1fr auto; }
  .note-thumb { grid-column: 1 / -1; height: 130px; }
  .tag { display: none; }
}

@media (max-width: 560px) {
  .brand { font-size: 16px; gap: 10px; }
  .brand-mark { height: 30px; margin-right: 6px; }
  .brand small { font-size: 8px; }
  .hero { padding-top: 38px; }
  h1 { font-size: clamp(2.55rem, 12.2vw, 3.15rem); }
  .page-hero h1 { font-size: clamp(2.5rem, 12vw, 3.05rem); }
  .app-layout { grid-template-columns: 1fr; }
  .app-sidebar { display: none; }
  .app-window { border-radius: 9px; }
  .story-pane { padding: 14px; }
  .scene { font-size: 11px; }
  .choice, .story-input { font-size: 10px; }
  .steps { grid-template-columns: 1fr; }
  .feature-card { grid-template-columns: 44px minmax(0,1fr); gap: 14px; padding: 18px; }
  .feature-icon { width: 44px; height: 44px; }
  .scene-caption { font-size: 15px; right: 18px; bottom: 16px; }
  .soft-panel { padding: 20px; }
  .memory-box { padding: 0; }
  .footer .brand small { display: none; }
}

@media (max-width: 390px) {
  :root { --gutter: 14px; }
  .brand { font-size: 15px; }
  .brand small { display: none; }
  .window-title { font-size: 10px; }
  .tabs { gap: 19px; }
  .hero-actions { margin-top: 24px; }
  .meta-line { gap: 9px; }
  .meta-line span:not(:last-child)::after { margin-left: 9px; }
  .note-filter { gap: 6px; }
  .chip { padding-inline: 11px; }
}

@media (max-height: 520px) and (orientation: landscape) {
  :root { --header-h: 60px; }
  .hero { padding-top: 32px; }
  .site-header { position: relative; }
}

@media (hover: none) {
  .btn:hover, .world-card:hover { transform: none; }
}

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

@media (prefers-contrast: more) {
  :root {
    --line: rgba(210,228,242,.28);
    --line-strong: rgba(226,239,249,.42);
    --muted: #b9c7d3;
  }
  .lead, .feature-card p, .step p, .world-copy p, .about-card p { color: #c1ced8; }
}


/* =========================================================
   V2.2 — atmospheric world backdrop + responsive refinement
   ========================================================= */

:root {
  --bg: #061019;
  --bg-2: #091521;
  --panel: rgba(10, 20, 29, .76);
  --panel-2: rgba(11, 22, 32, .90);
  --line: rgba(174, 205, 231, .18);
  --line-strong: rgba(180, 215, 244, .32);
  --text: #f2f7fb;
  --muted: #a5b7c7;
  --muted-2: #748a9c;
  --blue: #5baeff;
  --blue-2: #9dceff;
  --shadow: 0 26px 90px rgba(0,0,0,.46);
  --max: 1160px;
}

/* Background stays separate from content, so it never causes layout shift. */
body {
  position: relative;
  isolation: isolate;
  background: #061019;
}

body::before {
  content: "";
  position: fixed;
  z-index: -3;
  inset: 0;
  pointer-events: none;
  background:
    url("bg-desktop.webp") center top / cover no-repeat;
  transform: translateZ(0);
}

body::after {
  content: "";
  position: fixed;
  z-index: -2;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 70% 10%, rgba(83, 139, 185, .08), transparent 26%),
    linear-gradient(90deg, rgba(4,10,16,.62) 0%, rgba(4,10,16,.40) 48%, rgba(4,10,16,.54) 100%),
    linear-gradient(180deg, rgba(4,10,16,.18) 0%, rgba(4,10,16,.38) 34%, rgba(4,10,16,.72) 72%, rgba(4,10,16,.90) 100%);
}

/* Keep the atmospheric art visible while retaining readable content. */
.site-header {
  background: rgba(5, 13, 20, .58);
  border-bottom-color: rgba(182, 213, 237, .18);
}
@supports ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
  .site-header {
    background: rgba(5, 13, 20, .46);
    -webkit-backdrop-filter: blur(18px) saturate(1.06);
    backdrop-filter: blur(18px) saturate(1.06);
  }
}
.mobile-menu {
  background: rgba(5, 13, 20, .96);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

main {
  background: linear-gradient(180deg, rgba(6,16,25,.02), rgba(6,16,25,.26) 58%, rgba(6,16,25,.52));
}

/* Reference direction: editorial serif headings over modern app UI. */
h1, h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -.032em;
}
h1 {
  max-width: 12.5ch;
  font-size: clamp(3rem, 5.6vw, 5.15rem);
  line-height: .99;
}
h2 {
  font-size: clamp(2.15rem, 3.55vw, 3.35rem);
  line-height: 1.04;
}
.page-hero h1 {
  font-size: clamp(3rem, 5vw, 4.5rem);
  max-width: 12ch;
}
.lead {
  color: #b8c7d4;
}

/* Hero reads as one scene rather than a flat block. */
.hero {
  min-height: min(790px, calc(100svh - var(--header-h)));
  display: grid;
  align-items: center;
  padding-top: clamp(56px, 7vw, 88px);
  padding-bottom: clamp(72px, 8vw, 104px);
  background:
    linear-gradient(90deg, rgba(4,10,16,.28), rgba(4,10,16,.02) 58%, rgba(4,10,16,.18)),
    linear-gradient(180deg, rgba(4,10,16,.04), rgba(4,10,16,.25));
}
.hero::after {
  height: 360px;
  opacity: .24;
  background:
    linear-gradient(to top, rgba(6,16,25,.72) 5%, transparent 82%),
    radial-gradient(ellipse at 15% 100%, rgba(11,31,44,.88) 0 20%, transparent 21%),
    radial-gradient(ellipse at 62% 100%, rgba(8,25,37,.82) 0 29%, transparent 30%);
}

.app-window {
  background: linear-gradient(180deg,rgba(7,17,25,.94),rgba(5,12,18,.94));
  border-color: rgba(174, 205, 231, .27);
  box-shadow:
    0 36px 110px rgba(0,0,0,.55),
    0 0 0 1px rgba(153,199,237,.03) inset;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.section {
  position: relative;
  border-bottom-color: rgba(180, 211, 236, .18);
  background:
    linear-gradient(180deg, rgba(6,16,25,.16), rgba(6,16,25,.28));
}
.section:nth-of-type(even) {
  background:
    linear-gradient(180deg, rgba(6,16,25,.24), rgba(5,14,22,.34));
}

.soft-panel,
.feature-card,
.note-card,
.world-card {
  background:
    linear-gradient(145deg, rgba(13,27,39,.78), rgba(5,13,20,.76));
  border-color: rgba(176,207,232,.21);
  box-shadow:
    inset 0 1px rgba(255,255,255,.018),
    0 18px 50px rgba(0,0,0,.10);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.feature-card:hover,
.world-card:hover {
  border-color: rgba(126,189,255,.48);
}

/* Give the synthetic scene panel a visual language matching the new background. */
.scene-art {
  background:
    radial-gradient(circle at 72% 31%, rgba(149,190,224,.14), transparent 19%),
    linear-gradient(180deg, rgba(8,15,22,.02), rgba(4,11,17,.72)),
    linear-gradient(145deg, rgba(18,44,62,.84), rgba(7,19,28,.90) 58%, rgba(5,12,18,.96));
}
.scene-art::before,
.scene-art::after { opacity: .72; }

.center-cta {
  background:
    linear-gradient(180deg, rgba(5,14,22,.32), rgba(4,11,17,.66));
}
.footer {
  background: rgba(4, 11, 17, .78);
  border-top: 1px solid rgba(180,211,236,.14);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.btn {
  background: rgba(10, 23, 34, .66);
  border-color: rgba(176, 207, 232, .30);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.btn:hover {
  border-color: rgba(139,198,250,.64);
  background: rgba(19, 43, 61, .70);
}
.btn-primary {
  background: linear-gradient(180deg, rgba(57,145,231,.92), rgba(36,105,169,.94));
  box-shadow: 0 10px 34px rgba(42,130,221,.28);
}

.kicker { color: #8fb9dc; }

/* Secondary pages keep the same world without turning the page into a wallpaper. */
.page-hero {
  background:
    linear-gradient(90deg, rgba(4,10,16,.34), rgba(4,10,16,.08) 58%, rgba(4,10,16,.24)),
    linear-gradient(180deg, rgba(4,10,16,.02), rgba(6,16,25,.32));
}
.page-hero::after { opacity: .20; }

/* Better large-screen balance. */
@media (min-width: 1440px) {
  :root { --max: 1240px; }
  .hero-grid { gap: 66px; }
  .app-layout { min-height: 356px; }
}
@media (min-width: 1900px) {
  :root { --max: 1320px; --gutter: 36px; }
  h1 { font-size: 5.45rem; }
  .hero-grid { grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); }
}

/* Tablet: keep the story preview wide, but make it a second focal block. */
@media (max-width: 980px) {
  .hero {
    min-height: auto;
    padding-top: 58px;
  }
  .hero-grid {
    gap: 48px;
  }
  .hero-grid > div:first-child {
    max-width: 720px;
  }
  .hero-grid > div:last-child {
    width: min(100%, 760px);
  }
  h1 { max-width: 13ch; }
}

/* Mobile uses a portrait-composed landscape and stronger contrast overlay. */
@media (max-width: 700px) {
  body::before {
    background-image: url("bg-mobile.webp");
    background-position: center top;
  }
  body::after {
    background:
      linear-gradient(180deg, rgba(3,9,15,.38) 0%, rgba(3,9,15,.58) 34%, rgba(3,9,15,.82) 68%, rgba(3,9,15,.94) 100%);
  }
  main { background: rgba(4,11,17,.06); }
  .hero {
    padding-top: 42px;
    padding-bottom: 62px;
    background:
      linear-gradient(180deg, rgba(3,9,15,.10), rgba(3,9,15,.44));
  }
  .section,
  .section:nth-of-type(even) {
    background: linear-gradient(180deg, rgba(5,14,22,.34), rgba(4,11,17,.48));
  }
  h1 {
    font-size: clamp(2.65rem, 12.7vw, 3.55rem);
    line-height: 1.01;
  }
  h2 {
    font-size: clamp(2rem, 9.5vw, 2.7rem);
  }
  .page-hero h1 {
    font-size: clamp(2.65rem, 12vw, 3.4rem);
  }
}

/* Small phones: optimize tap targets and avoid cramped copy. */
@media (max-width: 430px) {
  :root {
    --gutter: 16px;
    --section-space: 50px;
  }
  .nav { gap: 10px; }
  .hero { padding-top: 34px; }
  .kicker { margin-bottom: 13px; letter-spacing: .22em; }
  .lead { line-height: 1.64; }
  .app-window { box-shadow: 0 24px 66px rgba(0,0,0,.44); }
  .window-bar { min-height: 38px; }
  .section-grid { gap: 30px; }
  .feature-card { border-radius: 10px; }
  .center-cta .hero-actions { gap: 9px; }
}

/* Landscape phones: keep artwork calm and prioritize usable vertical space. */
@media (max-height: 560px) and (orientation: landscape) {
  body::before {
    background-position: center 18%;
  }
  .hero {
    min-height: auto;
    padding-block: 34px 46px;
  }
}

/* Avoid expensive blur on weak/older environments while preserving appearance. */
@supports not ((backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px))) {
  .site-header { background: rgba(5,13,20,.93); }
  .soft-panel,
  .feature-card,
  .app-window,
  .btn { background-color: rgba(7,17,25,.95); }
}

@media (prefers-reduced-transparency: reduce) {
  body::after { background: rgba(4,11,17,.90); }
  .site-header,
  .soft-panel,
  .feature-card,
  .app-window,
  .btn,
  .footer { -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* =========================================================
   V2.3 — mockup-aligned background pack integration
   ========================================================= */

:root {
  --max: 1160px;
}

body::before {
  background-image: url("bg-desktop.webp");
  background-position: center top;
  background-size: cover;
  filter: saturate(1.02) contrast(1.02) brightness(.98);
}

/* Let the artwork breathe more, but keep copy readable. */
body::after {
  background:
    radial-gradient(circle at 72% 12%, rgba(91, 156, 218, .10), transparent 18%),
    linear-gradient(90deg, rgba(2,8,14,.42) 0%, rgba(2,8,14,.24) 42%, rgba(2,8,14,.30) 100%),
    linear-gradient(180deg, rgba(2,8,14,.12) 0%, rgba(2,8,14,.24) 28%, rgba(2,8,14,.52) 66%, rgba(2,8,14,.78) 100%);
}

main {
  background: linear-gradient(180deg, rgba(4,11,17,.04), rgba(4,11,17,.12) 34%, rgba(4,11,17,.24) 62%, rgba(4,11,17,.42) 100%);
}

.site-header {
  background: rgba(4, 12, 19, .42);
}
@supports ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
  .site-header {
    background: rgba(4, 12, 19, .28);
  }
}
.mobile-menu {
  background: rgba(4, 12, 19, .94);
}
.footer {
  background: rgba(4, 11, 17, .58);
}

.hero {
  background:
    linear-gradient(90deg, rgba(2,8,14,.18), rgba(2,8,14,.00) 58%, rgba(2,8,14,.10)),
    linear-gradient(180deg, rgba(2,8,14,.04), rgba(2,8,14,.14));
}
.hero::after {
  opacity: .18;
}

.section,
.section:nth-of-type(even),
.center-cta {
  background: linear-gradient(180deg, rgba(4,11,17,.10), rgba(4,11,17,.18));
}

.soft-panel,
.feature-card,
.note-card,
.world-card,
.app-window {
  background:
    linear-gradient(145deg, rgba(9,20,30,.72), rgba(5,12,18,.78));
}

/* Use a dedicated inset visual instead of synthetic mountain shapes. */
.scene-art {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(5,12,18,.12), rgba(5,12,18,.42)),
    url("bg-inset.webp") center center / cover no-repeat;
}
.scene-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6,14,22,.02), rgba(6,14,22,.28) 60%, rgba(6,14,22,.46));
  opacity: 1;
}
.scene-art::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(180deg, rgba(5,12,18,0), rgba(5,12,18,.52));
  opacity: 1;
}
.scene-caption {
  position: absolute;
  right: 22px;
  bottom: 20px;
  z-index: 1;
  text-align: right;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1.14;
  color: rgba(245,249,253,.94);
  text-shadow: 0 6px 24px rgba(0,0,0,.45);
}

/* Match the cleaner mockup spacing. */
.hero-grid { gap: clamp(36px, 5vw, 62px); }
.section-grid { gap: clamp(32px, 5vw, 56px); }
.build-grid { gap: clamp(32px, 5vw, 54px); }
.lead { max-width: 34rem; }

@media (min-width: 1200px) {
  .hero { min-height: 760px; }
}

@media (max-width: 980px) {
  .scene-art {
    min-height: 290px;
    background-position: center 42%;
  }
}

@media (max-width: 700px) {
  body::before {
    background-image: url("bg-mobile.webp");
    background-position: center top;
  }
  body::after {
    background:
      linear-gradient(180deg, rgba(2,8,14,.22) 0%, rgba(2,8,14,.42) 26%, rgba(2,8,14,.72) 62%, rgba(2,8,14,.90) 100%);
  }
  .site-header {
    background: rgba(4,12,19,.64);
  }
  main {
    background: linear-gradient(180deg, rgba(4,11,17,.02), rgba(4,11,17,.16) 30%, rgba(4,11,17,.34) 100%);
  }
  .hero {
    background: linear-gradient(180deg, rgba(2,8,14,.04), rgba(2,8,14,.36));
  }
  .section,
  .section:nth-of-type(even),
  .center-cta {
    background: linear-gradient(180deg, rgba(4,11,17,.18), rgba(4,11,17,.32));
  }
  .scene-art {
    min-height: 250px;
    background-position: center 50%;
  }
  .scene-caption {
    right: 18px;
    bottom: 16px;
    font-size: clamp(1.1rem, 6vw, 1.35rem);
  }
}

@media (max-width: 430px) {
  .scene-art { min-height: 220px; }
}

/* =========================================================
   V2.4 — UI completeness, icon system, polish and QA fixes
   ========================================================= */

:root {
  --panel-solid: #0a151f;
  --panel-glass: rgba(9, 20, 30, .72);
  --panel-glass-strong: rgba(7, 17, 26, .88);
  --focus: #a9d5ff;
}

/* Inline icons: no external SVG sprite dependency. */
.icon,
.platform-icon,
.footer-link-icon {
  fill: currentColor;
  overflow: visible;
}
.icon { width: 18px; height: 18px; }
.platform-icon { width: 44px; height: 44px; }
.footer-link-icon { width: 14px; height: 14px; flex: 0 0 auto; }
.line-icon {
  width: 26px;
  height: 26px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Stronger and more consistent interactive affordances. */
.btn {
  gap: 9px;
  min-height: 48px;
  padding-inline: 18px;
  border-color: rgba(181, 214, 240, .32);
  background: linear-gradient(180deg, rgba(13,31,45,.76), rgba(8,19,28,.76));
  box-shadow: inset 0 1px rgba(255,255,255,.025);
}
.btn .icon { opacity: .96; }
.btn:hover {
  border-color: rgba(137, 199, 252, .72);
  background: linear-gradient(180deg, rgba(20,47,67,.78), rgba(10,27,39,.80));
  box-shadow: 0 8px 26px rgba(0,0,0,.16), inset 0 1px rgba(255,255,255,.03);
}
.btn-primary {
  color: #fff;
  border-color: rgba(113,183,248,.90);
  background: linear-gradient(180deg, #3d9af0, #267bc9);
  box-shadow: 0 10px 32px rgba(42,130,221,.26), inset 0 1px rgba(255,255,255,.12);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #4aa8fb, #2c86d8);
  box-shadow: 0 13px 38px rgba(42,130,221,.34), inset 0 1px rgba(255,255,255,.14);
}
.btn-light {
  background: linear-gradient(180deg,#f6f9fc,#eaf1f6);
  border-color: #fff;
  color: #0a1117;
  box-shadow: inset 0 1px #fff;
}
.btn-light:hover {
  background: #fff;
  border-color: #fff;
}

/* Header: slightly clearer branding and active state. */
.site-header {
  box-shadow: 0 1px rgba(255,255,255,.015);
}
.brand { letter-spacing: .018em; }
.brand-mark {
  background: linear-gradient(var(--blue-2), rgba(126,189,255,.12));
  box-shadow: 11px 16px 0 -0.5px rgba(126,189,255,.92);
}
.nav-links a[aria-current="page"]::after {
  box-shadow: 0 0 12px rgba(126,189,255,.28);
}

/* App preview: lift it from the scenery without making it glow unnaturally. */
.app-window {
  border-color: rgba(185,218,244,.31);
  box-shadow:
    0 38px 110px rgba(0,0,0,.48),
    0 0 0 1px rgba(180,220,250,.025) inset,
    0 1px rgba(255,255,255,.018) inset;
}
.window-bar { background: rgba(255,255,255,.012); }
.choice { transition: border-color .18s ease, background .18s ease, color .18s ease; }
.choice.active {
  border-color: rgba(112,188,250,.86);
  box-shadow: inset 0 0 0 1px rgba(75,163,235,.08), 0 0 18px rgba(45,137,214,.06);
}
.story-input { background: rgba(255,255,255,.012); }

/* What is it: visual + concrete explanation rows. */
.what-side { min-width: 0; }
.what-points {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.what-point {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr);
  gap: 13px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid rgba(178,209,235,.18);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(11,25,36,.68), rgba(6,15,22,.68));
  box-shadow: inset 0 1px rgba(255,255,255,.018);
}
.what-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #a9d3f5;
  border: 1px solid rgba(160,203,238,.22);
  background: rgba(110,175,225,.045);
}
.what-icon .line-icon { width: 21px; height: 21px; }
.what-point strong {
  display: block;
  margin-bottom: 2px;
  color: #edf5fb;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 400;
}
.what-point small {
  display: block;
  color: #95a9ba;
  font-size: 12px;
  line-height: 1.5;
}

/* How it works: replace placeholder glyphs with a complete icon + connector system. */
.how-section { overflow: clip; }
.steps {
  position: relative;
  gap: clamp(30px, 4vw, 52px);
  margin-top: 38px;
}
.step {
  position: relative;
  padding-top: 2px;
}
.step-num {
  width: 26px;
  height: 26px;
  margin-bottom: 18px;
  border-color: rgba(173,210,239,.26);
  background: rgba(18,39,55,.82);
  color: #d8e8f5;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
}
.step-icon {
  width: 62px;
  height: 62px;
  margin-bottom: 18px;
  color: #b7daf6;
  border-color: rgba(170,211,243,.26);
  background:
    radial-gradient(circle at 50% 40%, rgba(86,164,225,.10), transparent 65%),
    rgba(10,23,34,.66);
  box-shadow: inset 0 1px rgba(255,255,255,.025), 0 12px 30px rgba(0,0,0,.10);
}
.step-icon .line-icon { width: 27px; height: 27px; }
.step h3 {
  margin-bottom: 8px;
  color: #eef5fb;
  font-size: clamp(17px, 1.4vw, 19px);
}
.step p {
  max-width: 27ch;
  color: #9eb1c1;
  font-size: 13px;
  line-height: 1.65;
}
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 73px;
  right: calc(clamp(30px, 4vw, 52px) * -0.74);
  width: clamp(23px, 3vw, 40px);
  height: 1px;
  background: linear-gradient(90deg, rgba(128,169,200,.25), rgba(148,196,232,.72));
}
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 69.5px;
  right: calc(clamp(30px, 4vw, 52px) * -0.74);
  width: 7px;
  height: 7px;
  border-top: 1px solid rgba(148,196,232,.78);
  border-right: 1px solid rgba(148,196,232,.78);
  transform: rotate(45deg);
}

/* Feature cards: icon hierarchy should match the step system. */
.feature-card {
  border-color: rgba(178,210,236,.20);
  box-shadow: inset 0 1px rgba(255,255,255,.018), 0 16px 46px rgba(0,0,0,.08);
}
.feature-icon {
  color: #b6daf6;
  border-color: rgba(168,207,239,.24);
  background: rgba(88,159,213,.04);
}
.feature-icon .icon { width: 22px; height: 22px; }

/* Build status is easier to scan with real visual state cues. */
.checklist .yes,
.checklist .next { position: relative; padding-left: 22px; }
.checklist .yes::before,
.checklist .next::before {
  position: absolute;
  left: 0;
  top: 0;
  margin: 0;
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 10px;
  line-height: 1;
}
.checklist .yes::before {
  content: "✓";
  color: #baf1d3;
  background: rgba(71,190,133,.11);
  border: 1px solid rgba(80,201,145,.30);
}
.checklist .next::before {
  content: "";
  background: rgba(126,151,172,.06);
  border: 1px solid rgba(147,174,196,.31);
}

/* Footer completeness. */
.footer-links a,
.footer-icon-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-icon-link { color: #9eb3c4; }
.footer-icon-link:hover { color: #fff; }

/* Secondary page cards and download platform icons. */
.download-card .platform-icon {
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.15));
}
.download-card:first-child .platform-icon { color: #76bdff; }
.download-card:nth-child(2) .platform-icon { color: #f3f6f8; }
.note-card,
.world-card,
.download-card,
.about-card {
  border-color: rgba(178,210,236,.20);
}

/* Improve text contrast without flattening the background art. */
.lead { color: #b9c8d4; }
.step p,
.feature-card p,
.what-point small,
.world-copy p,
.note-card .desc,
.about-card p { color: #9fb1c0; }

/* Tablet: preserve visual rhythm and remove desktop connector arrows. */
@media (max-width: 840px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 24px 34px;
  }
  .step {
    padding: 20px;
    border: 1px solid rgba(178,210,236,.17);
    border-radius: 12px;
    background: rgba(7,17,26,.42);
  }
  .step::before,
  .step::after { display: none !important; }
  .step p { max-width: none; }
  .what-points { grid-template-columns: 1fr; }
}

/* Phones: turn each process step into a compact readable card. */
@media (max-width: 560px) {
  .steps {
    grid-template-columns: 1fr;
    gap: 13px;
    margin-top: 28px;
  }
  .step {
    display: grid;
    grid-template-columns: 52px minmax(0,1fr);
    grid-template-areas:
      "number title"
      "icon copy";
    column-gap: 15px;
    row-gap: 7px;
    align-items: start;
    padding: 16px;
  }
  .step-num {
    grid-area: number;
    width: 24px;
    height: 24px;
    margin: 0;
    align-self: center;
  }
  .step-icon {
    grid-area: icon;
    width: 48px;
    height: 48px;
    margin: 0;
  }
  .step-icon .line-icon { width: 22px; height: 22px; }
  .step h3 {
    grid-area: title;
    margin: 1px 0 0;
    align-self: center;
  }
  .step p {
    grid-area: copy;
    margin: 0;
    font-size: 12.5px;
    line-height: 1.58;
  }
  .what-point {
    grid-template-columns: 40px minmax(0,1fr);
    gap: 11px;
    padding: 12px;
  }
  .what-icon { width: 38px; height: 38px; }
  .what-icon .line-icon { width: 19px; height: 19px; }
  .what-point strong { font-size: 15px; }
  .what-point small { font-size: 11.5px; }
  .footer-links { gap: 14px; }
}

@media (max-width: 390px) {
  .btn { min-height: 47px; padding-inline: 15px; }
  .icon { width: 17px; height: 17px; }
}

/* Secondary-page artwork uses the same real background pack, not placeholder polygons. */
.world-art {
  background-image:
    linear-gradient(180deg, rgba(4,10,16,.06), rgba(4,10,16,.34)),
    url("bg-inset.webp");
  background-size: cover;
  background-position: center 48%;
}
.world-art::before {
  inset: 0;
  width: auto;
  height: auto;
  clip-path: none;
  background: linear-gradient(180deg, transparent 48%, rgba(4,11,17,.30));
}
.world-art.noir {
  background-image:
    linear-gradient(145deg, rgba(52,26,72,.26), rgba(5,12,18,.22)),
    url("bg-inset.webp");
  background-position: 70% 54%;
}
.world-art.ruins {
  background-image:
    linear-gradient(145deg, rgba(42,48,54,.24), rgba(4,12,18,.28)),
    url("bg-desktop.webp");
  background-position: 38% 52%;
}
.world-art.space {
  background-image:
    radial-gradient(circle at 76% 20%, rgba(137,180,220,.16), transparent 18%),
    linear-gradient(180deg, rgba(7,16,31,.08), rgba(3,8,16,.34)),
    url("bg-mobile.webp");
  background-position: 58% 17%;
}
.world-art.woods {
  background-image:
    linear-gradient(145deg, rgba(19,55,45,.22), rgba(3,12,15,.30)),
    url("bg-desktop.webp");
  background-position: 12% 73%;
}
.world-card:nth-child(5) .world-art { background-position: 23% 44%; }
.world-card:nth-child(8) .world-art { background-position: 85% 52%; }

.note-thumb {
  background-image:
    linear-gradient(180deg, rgba(6,14,21,.04), rgba(6,14,21,.38)),
    url("bg-inset.webp");
  background-size: cover;
  background-position: center 48%;
}
.note-thumb::after { display: none; }
.note-card:nth-child(2) .note-thumb { background-image: linear-gradient(180deg, rgba(6,14,21,.06), rgba(6,14,21,.38)), url("bg-desktop.webp"); background-position: 35% 58%; }
.note-card:nth-child(3) .note-thumb { background-position: 70% 45%; }
.note-card:nth-child(4) .note-thumb { background-image: linear-gradient(180deg, rgba(6,14,21,.06), rgba(6,14,21,.42)), url("bg-mobile.webp"); background-position: 55% 24%; }
.note-card:nth-child(5) .note-thumb { background-position: 22% 55%; }

/* =========================================================
   V2.5 — motion / transitions / microinteractions
   ========================================================= */
:root {
  --parallax-shift: 0px;
  --reveal-distance: 22px;
  --reveal-duration: .72s;
  --ease-premium: cubic-bezier(.22, 1, .36, 1);
}

body::before {
  transform: translate3d(0, calc(var(--parallax-shift) * -1), 0) scale(1.035);
  will-change: transform;
  transition: transform .12s linear;
}

/* Smoother mobile menu open / close */
@media (max-width: 840px) {
  .motion-enabled .mobile-menu {
    display: grid;
    gap: 4px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    padding-top: 0;
    padding-bottom: 0;
    transition:
      max-height .34s var(--ease-premium),
      opacity .22s ease,
      transform .22s ease,
      padding-top .22s ease,
      padding-bottom .22s ease,
      visibility 0s linear .34s;
  }
  .motion-enabled .mobile-menu.open {
    max-height: 360px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    padding-top: 14px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    transition:
      max-height .34s var(--ease-premium),
      opacity .22s ease,
      transform .22s ease,
      padding-top .22s ease,
      padding-bottom .22s ease,
      visibility 0s linear 0s;
  }
}

/* Reveal system */
.motion-enabled .reveal-init {
  opacity: 0;
  transform: translate3d(0, var(--reveal-distance), 0);
  filter: blur(3px);
  transition:
    opacity var(--reveal-duration) ease,
    transform calc(var(--reveal-duration) + .1s) var(--ease-premium),
    filter .58s ease;
  transition-delay: var(--reveal-delay, 0ms);
  will-change: transform, opacity, filter;
}
.motion-enabled .reveal-init.reveal-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
}
.motion-enabled .reveal-left { transform: translate3d(calc(var(--reveal-distance) * -1), 0, 0); }
.motion-enabled .reveal-right { transform: translate3d(var(--reveal-distance), 0, 0); }
.motion-enabled .reveal-scale { transform: translate3d(0, 18px, 0) scale(.985); }
.motion-enabled .reveal-scale.reveal-visible { transform: translate3d(0, 0, 0) scale(1); }

/* Make hover interactions feel more polished */
.feature-card,
.world-card,
.note-card,
.download-card,
.about-card,
.what-point,
.step,
.app-window {
  transition:
    transform .28s var(--ease-premium),
    border-color .28s ease,
    box-shadow .28s ease,
    background-color .28s ease;
}
.feature-card:hover,
.world-card:hover,
.note-card:hover,
.download-card:hover,
.about-card:hover,
.what-point:hover,
.step:hover {
  transform: translateY(-4px);
  border-color: rgba(145, 198, 244, .38);
  box-shadow:
    inset 0 1px rgba(255,255,255,.022),
    0 20px 44px rgba(0,0,0,.18);
}
.app-window:hover {
  transform: translateY(-3px);
  box-shadow:
    0 40px 120px rgba(0,0,0,.56),
    0 0 0 1px rgba(153,199,237,.04) inset;
}

.btn {
  overflow: hidden;
  position: relative;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -120%;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
  transform: skewX(-18deg);
  transition: transform .6s ease;
  pointer-events: none;
}
.btn:hover::after {
  transform: translateX(340%) skewX(-18deg);
}

.nav-links a,
.footer-links a,
.mobile-menu a {
  transition: color .2s ease, opacity .2s ease, transform .2s ease, background-color .2s ease;
}
.nav-links a:hover,
.footer-links a:hover { transform: translateY(-1px); }

/* Hero specific animation polish */
.motion-enabled .hero .app-window.reveal-init {
  transform: translate3d(0, 28px, 0) scale(.984);
}
.motion-enabled .hero .app-window.reveal-visible {
  transform: translate3d(0, 0, 0) scale(1);
}
.motion-enabled .hero .hero-actions.reveal-init { transform: translate3d(0, 18px, 0); }
.motion-enabled .hero .meta-line.reveal-init { transform: translate3d(0, 12px, 0); }

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  body::before,
  .feature-card,
  .world-card,
  .note-card,
  .download-card,
  .about-card,
  .what-point,
  .step,
  .app-window,
  .btn,
  .nav-links a,
  .footer-links a,
  .mobile-menu,
  .mobile-menu a {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
  .btn::after { display: none; }
}

/* =========================================================
   V2.6 — MDX content, blog and legal pages
   ========================================================= */

@media (max-width: 1080px) and (min-width: 841px) {
  .nav-links { gap: 14px; font-size: 12px; }
  .download-top { padding-inline: 14px; }
}

.article-hero {
  position: relative;
  padding: clamp(96px, 11vw, 150px) 0 clamp(62px, 7vw, 88px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background:
    radial-gradient(circle at 76% 20%, rgba(82,145,201,.10), transparent 24%),
    linear-gradient(180deg, rgba(4,11,17,.02), rgba(4,11,17,.28));
}
.article-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(4,11,17,.22));
}
.article-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
}
.article-hero h1 {
  max-width: 14ch;
  margin-bottom: 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.25rem, 6vw, 5.4rem);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.038em;
}
.compact-hero {
  padding-top: clamp(84px, 9vw, 122px);
  padding-bottom: clamp(52px, 6vw, 72px);
}
.compact-hero h1 { font-size: clamp(3rem, 5.2vw, 4.7rem); }
.article-hero .lead { max-width: 650px; font-size: clamp(1.05rem, 1.6vw, 1.22rem); }
.article-back {
  display: inline-flex;
  margin-bottom: 34px;
  color: #91aac0;
  font-size: 13px;
  transition: color .2s ease, transform .2s ease;
}
.article-back:hover { color: #fff; transform: translateX(-2px); }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  margin-top: 26px;
  color: #8fa4b6;
  font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.article-meta > * + * { position: relative; }
.article-meta > * + *::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #6f8ca5;
}

.article-section { padding-block: clamp(48px, 6vw, 80px); }
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 780px) minmax(190px, 240px);
  justify-content: space-between;
  align-items: start;
  gap: clamp(42px, 6vw, 84px);
}
.article-prose {
  min-width: 0;
  padding: clamp(26px, 4vw, 46px);
  border: 1px solid rgba(178,210,236,.18);
  border-radius: 15px;
  background:
    linear-gradient(145deg, rgba(8,19,28,.72), rgba(4,11,17,.72));
  box-shadow: inset 0 1px rgba(255,255,255,.016), 0 24px 70px rgba(0,0,0,.12);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.article-prose > :first-child { margin-top: 0; }
.article-prose > :last-child { margin-bottom: 0; }
.article-prose p,
.article-prose li {
  color: #b4c3cf;
  font-size: clamp(15.5px, 1.3vw, 17px);
  line-height: 1.78;
}
.article-prose p { margin: 0 0 1.45em; }
.article-prose h2,
.article-prose h3,
.article-prose h4 {
  scroll-margin-top: calc(var(--header-h) + 30px);
  color: #f1f6fa;
}
.article-prose h2 {
  margin: 2.15em 0 .65em;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.95rem, 3vw, 2.55rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.026em;
}
.article-prose h3 {
  margin: 1.9em 0 .6em;
  font-size: clamp(1.2rem, 1.7vw, 1.45rem);
  line-height: 1.25;
}
.article-prose ul,
.article-prose ol {
  margin: 0 0 1.65em;
  padding-left: 1.35em;
}
.article-prose li + li { margin-top: .55em; }
.article-prose a {
  color: #8ac8ff;
  text-decoration: underline;
  text-decoration-color: rgba(138,200,255,.34);
  text-underline-offset: 3px;
}
.article-prose a:hover { color: #c6e5ff; text-decoration-color: currentColor; }
.article-prose strong { color: #e7f0f7; font-weight: 700; }
.article-prose em { color: #cbd8e2; }
.article-prose blockquote {
  margin: 2em 0;
  padding: 6px 0 6px 22px;
  border-left: 2px solid rgba(126,189,255,.54);
  color: #b9cada;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12em;
  font-style: italic;
}
.article-prose code {
  padding: .16em .38em;
  border: 1px solid rgba(172,207,235,.15);
  border-radius: 5px;
  background: rgba(2,9,15,.62);
  color: #c7e4fb;
  font: .88em/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.article-prose pre {
  overflow-x: auto;
  margin: 1.8em 0;
  padding: 18px 20px;
  border: 1px solid rgba(172,207,235,.16);
  border-radius: 10px;
  background: rgba(2,8,14,.78);
}
.article-prose pre code { padding: 0; border: 0; background: transparent; }
.article-prose hr,
.mdx-divider {
  height: 1px;
  margin: 2.5em 0;
  border: 0;
  background: rgba(174,205,231,.16);
}

.mdx-callout {
  margin: 0 0 2em;
  padding: 20px 22px;
  border: 1px solid rgba(120,184,237,.24);
  border-radius: 11px;
  background:
    radial-gradient(circle at 100% 0%, rgba(69,145,210,.11), transparent 34%),
    rgba(10,25,37,.58);
}
.mdx-callout-title {
  margin-bottom: 8px;
  color: #d6ebfc;
  font: 700 11px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.mdx-callout-body p { margin-bottom: 0; color: #b6c8d6; }

.article-toc {
  position: sticky;
  top: calc(var(--header-h) + 28px);
  padding: 18px 0 18px 20px;
  border-left: 1px solid rgba(174,205,231,.18);
}
.article-toc-title {
  margin-bottom: 13px;
  color: #d7e7f3;
  font: 700 10px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.article-toc a {
  display: block;
  padding: 6px 0;
  color: #8399ab;
  font-size: 12px;
  line-height: 1.45;
  transition: color .2s ease, transform .2s ease;
}
.article-toc a:hover { color: #dcebf6; transform: translateX(2px); }
.article-toc .toc-level-3 { padding-left: 12px; font-size: 11.5px; }

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}
.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 4px 9px;
  border: 1px solid rgba(166,203,233,.18);
  border-radius: 999px;
  background: rgba(8,20,30,.46);
  color: #9eb9ce;
  font: 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .04em;
}

.blog-hero h1 { max-width: 15ch; }
.blog-section { padding-block: clamp(54px, 7vw, 88px); }
.blog-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 26px;
  margin-bottom: 34px;
}
.blog-toolbar h2 { margin-bottom: 0; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 18px;
}
.blog-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(178,210,236,.18);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(10,23,34,.74), rgba(5,13,20,.80));
  box-shadow: inset 0 1px rgba(255,255,255,.018), 0 18px 50px rgba(0,0,0,.10);
  transition: transform .28s var(--ease-premium), border-color .28s ease, box-shadow .28s ease;
}
.blog-card:hover {
  transform: translateY(-5px);
  border-color: rgba(142,197,241,.38);
  box-shadow: 0 24px 60px rgba(0,0,0,.20);
}
.blog-card-link { position: absolute; inset: 0; z-index: 3; }
.blog-card-art {
  height: clamp(150px, 16vw, 205px);
  background:
    linear-gradient(180deg, rgba(3,9,15,.02), rgba(3,9,15,.35)),
    url("bg-inset.webp") center 48% / cover no-repeat;
  transition: transform .6s var(--ease-premium), filter .4s ease;
}
.blog-card:hover .blog-card-art { transform: scale(1.025); filter: brightness(1.06); }
.blog-card:nth-child(2) .blog-card-art { background-image: linear-gradient(180deg, rgba(3,9,15,.02), rgba(3,9,15,.35)), url("bg-desktop.webp"); background-position: 34% 56%; }
.blog-card:nth-child(3) .blog-card-art { background-image: linear-gradient(180deg, rgba(3,9,15,.02), rgba(3,9,15,.40)), url("bg-mobile.webp"); background-position: center 18%; }
.blog-card-body { position: relative; z-index: 2; padding: 21px 22px 23px; }
.blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
  margin-bottom: 12px;
  color: #7f95a8;
  font: 9.5px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.blog-card h2 {
  margin-bottom: 11px;
  font-size: clamp(1.55rem, 2.3vw, 2rem);
  line-height: 1.05;
}
.blog-card p { min-height: 4.8em; margin-bottom: 0; color: #9fb1c0; font-size: 13px; line-height: 1.6; }
.blog-card .tag-row { margin-top: 18px; }
.blog-read-more {
  display: inline-flex;
  gap: 7px;
  margin-top: 20px;
  color: #bdd8ec;
  font-size: 12px;
  font-weight: 650;
}
.article-next { padding-block: clamp(42px, 5vw, 64px); }
.article-next-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(25px, 4vw, 38px);
}
.article-next-panel h2 { margin-bottom: 0; }

@media (max-width: 980px) {
  .article-layout { grid-template-columns: 1fr; gap: 26px; }
  .article-toc {
    position: static;
    order: -1;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 16px;
    padding: 14px 16px;
    border: 1px solid rgba(174,205,231,.16);
    border-radius: 10px;
    background: rgba(7,17,26,.34);
  }
  .article-toc-title { width: 100%; margin-bottom: 7px; }
  .article-toc a { padding-block: 4px; }
  .article-toc .toc-level-3 { padding-left: 0; }
  .blog-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 700px) {
  .article-hero { padding-top: 68px; padding-bottom: 48px; }
  .compact-hero { padding-top: 58px; }
  .article-hero h1 { font-size: clamp(2.7rem, 12vw, 3.65rem); }
  .article-hero .lead { font-size: 1rem; }
  .article-meta { margin-top: 20px; }
  .article-prose { padding: 22px 18px; border-radius: 11px; }
  .article-prose p, .article-prose li { font-size: 15px; }
  .blog-toolbar { align-items: stretch; flex-direction: column; }
  .blog-toolbar .btn { align-self: flex-start; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-card p { min-height: 0; }
  .article-next-panel { align-items: stretch; flex-direction: column; }
  .article-next-panel .btn { align-self: flex-start; }
}

@media (max-width: 430px) {
  .article-prose { padding: 20px 16px; }
  .mdx-callout { padding: 17px 16px; }
  .article-toc { padding: 13px 14px; }
  .blog-card-body { padding: 19px 18px 21px; }
}

/* =========================================================
   V2.7 — UI/UX polish pass
   ========================================================= */

:root {
  --ui-glow: rgba(132, 196, 255, 0.16);
  --ui-border-strong: rgba(142, 194, 236, 0.28);
  --ui-bg-soft: rgba(8, 17, 27, 0.48);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 100;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,.03), transparent 30%);
}
.scroll-progress-bar {
  display: block;
  width: var(--scroll-progress, 0%);
  height: 100%;
  background: linear-gradient(90deg, rgba(126,193,255,.92), rgba(103,160,255,.78));
  box-shadow: 0 0 18px rgba(126,193,255,.38);
  transition: width .08s linear;
}

/* Better CTA clarity */
.btn[data-os-target] {
  position: relative;
}
.btn-recommended {
  border-color: rgba(146, 206, 255, .46) !important;
  box-shadow: 0 0 0 1px rgba(130,185,255,.12) inset, 0 10px 36px rgba(48,103,162,.16);
}
.btn .os-badge {
  display: inline-flex;
  align-items: center;
  margin-left: .55rem;
  padding: .18rem .42rem;
  border-radius: 999px;
  background: rgba(132, 196, 255, .15);
  border: 1px solid rgba(132, 196, 255, .24);
  color: rgba(232, 243, 252, .94);
  font-size: .72rem;
  letter-spacing: .04em;
}

/* What is it carousel */
.what-grid { align-items: start; }
.what-side {
  display: grid;
  gap: 20px;
}
.media-carousel {
  overflow: hidden;
  position: relative;
  padding: 0;
}
.carousel-viewport {
  position: relative;
  overflow: hidden;
  border-radius: inherit;
}
.carousel-track {
  position: relative;
  min-height: 360px;
}
.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity .5s ease, transform .7s cubic-bezier(.22,1,.36,1);
  pointer-events: none;
}
.carousel-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  display: block;
}
.carousel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4,11,17,.06), rgba(4,11,17,.20) 45%, rgba(4,11,17,.72) 100%);
}
.carousel-content {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 1;
  max-width: 30rem;
}
.carousel-content h3 {
  margin: 0 0 .4rem;
  font-size: clamp(1.35rem, 2.1vw, 1.9rem);
}
.carousel-content p {
  margin: 0;
  color: rgba(228, 237, 244, .86);
  max-width: 28rem;
}
.carousel-tag {
  display: inline-block;
  margin-bottom: .75rem;
  padding: .32rem .62rem;
  border-radius: 999px;
  background: rgba(9, 18, 29, .46);
  border: 1px solid rgba(155, 205, 240, .18);
  color: rgba(241, 246, 250, .92);
  font-size: .74rem;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.carousel-ui {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(153, 199, 237, .10);
  background: linear-gradient(180deg, rgba(9,20,30,.34), rgba(5,12,18,.50));
}
.carousel-nav {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(145, 198, 244, .18);
  background: rgba(8, 17, 27, .58);
  color: rgba(237, 244, 250, .94);
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background-color .2s ease;
}
.carousel-nav:hover,
.carousel-nav:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(145, 198, 244, .38);
  background: rgba(11, 22, 34, .84);
}
.carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex: 1;
}
.carousel-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(224, 234, 241, .28);
  cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.carousel-dots button.is-active,
.carousel-dots button[aria-selected="true"] {
  background: rgba(144, 205, 255, .95);
  transform: scale(1.1);
  box-shadow: 0 0 0 4px rgba(144,205,255,.10);
}

/* Hero app preview receives a little more structure */
.tabs span,
.app-nav-item,
.choice,
.story-input,
.state-pane .state {
  transition: border-color .25s ease, background-color .25s ease, color .25s ease, transform .25s ease;
}
.tabs span.is-live,
.tabs span.active {
  color: #eaf2f8;
  border-bottom-color: rgba(139, 196, 255, .92);
  box-shadow: inset 0 -1px 0 rgba(139, 196, 255, .45);
}
.choice.is-live {
  border-color: rgba(145, 198, 244, .42);
  background: rgba(87, 138, 204, .12);
  transform: translateX(2px);
}
.state.flash b,
.state.good.flash b {
  color: #bbf0c6;
}

/* How it works gets a stronger process feeling */
.steps {
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  top: 54px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, rgba(148, 199, 237, .18), rgba(148, 199, 237, .05));
  z-index: 0;
}
.step {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, rgba(7, 17, 27, .30), rgba(7,17,27,.18));
}
.step-icon {
  box-shadow: inset 0 0 0 1px rgba(140, 200, 255, .08), 0 8px 30px rgba(0,0,0,.16);
}
.step:hover .step-icon {
  border-color: rgba(145, 198, 244, .34);
  box-shadow: inset 0 0 0 1px rgba(140, 200, 255, .12), 0 10px 36px rgba(41,83,126,.18);
}
@media (max-width: 980px) {
  .steps::before { display: none; }
}

/* Stronger card polish */
.feature-card,
.blog-card,
.note-card,
.world-card,
.about-card,
.download-card {
  overflow: hidden;
}
.feature-card::before,
.blog-card::before,
.note-card::before,
.world-card::before,
.about-card::before,
.download-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(132,196,255,.10), transparent 34%);
  opacity: .8;
  pointer-events: none;
}
.world-card .world-art,
.blog-card .blog-thumb {
  transition: transform .5s cubic-bezier(.22,1,.36,1), filter .35s ease;
}
.world-card:hover .world-art,
.blog-card:hover .blog-thumb {
  transform: scale(1.03);
  filter: saturate(1.04) brightness(1.03);
}

/* Small inline hint badge */
.ui-detail-badge {
  display: inline-flex;
  gap: .45rem;
  align-items: center;
  margin-top: .9rem;
  padding: .48rem .78rem;
  border-radius: 999px;
  background: rgba(9, 18, 29, .34);
  border: 1px solid rgba(149, 198, 237, .14);
  color: rgba(229, 237, 244, .82);
  font-size: .82rem;
}

@media (max-width: 700px) {
  .carousel-track,
  .carousel-slide img { min-height: 280px; }
  .carousel-content {
    left: 18px;
    right: 18px;
    bottom: 18px;
  }
  .carousel-content h3 {
    font-size: 1.42rem;
  }
  .carousel-ui {
    padding: 12px 14px 14px;
  }
  .carousel-nav {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 520px) {
  .carousel-track,
  .carousel-slide img { min-height: 240px; }
  .carousel-content p { font-size: .95rem; }
  .carousel-tag { font-size: .68rem; }
}

@media (prefers-reduced-motion: reduce) {
  .carousel-slide,
  .carousel-nav,
  .carousel-dots button,
  .scroll-progress-bar,
  .choice,
  .tabs span,
  .world-card .world-art,
  .blog-card .blog-thumb {
    transition: none !important;
  }
}

/* =========================================================
   V2.9 / Step 1 — interactive hero demo
   ========================================================= */
.window-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}
.demo-pill {
  margin-left: auto;
  padding: 4px 7px;
  border: 1px solid rgba(119, 185, 238, .20);
  border-radius: 999px;
  background: rgba(69, 133, 187, .08);
  color: #9dc9ec;
  font: 600 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .055em;
  text-transform: uppercase;
  white-space: nowrap;
}

.app-demo .tabs button {
  position: relative;
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: #91a4b5;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  transition: color .2s ease, transform .2s ease;
}
.app-demo .tabs button:hover { color: #c9dceb; }
.app-demo .tabs button.active,
.app-demo .tabs button.is-live {
  color: #eaf2f8;
}
.app-demo .tabs button.active::after,
.app-demo .tabs button[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -11px;
  height: 1px;
  background: #74b9fa;
  box-shadow: 0 0 10px rgba(116,185,250,.28);
}
.app-demo .tabs button:focus-visible,
.app-demo .choice:focus-visible {
  outline: 2px solid rgba(122, 190, 246, .78);
  outline-offset: 3px;
}

.app-demo .choices {
  display: grid;
  gap: 6px;
}
.app-demo .choice {
  width: 100%;
  margin-top: 0;
  appearance: none;
  text-align: left;
  font-family: inherit;
  background: rgba(7, 15, 22, .20);
  cursor: pointer;
  transition:
    border-color .2s ease,
    background-color .2s ease,
    color .2s ease,
    transform .2s ease,
    box-shadow .2s ease;
}
.app-demo .choice:hover {
  color: #d5e6f2;
  border-color: rgba(100, 169, 233, .42);
  background: rgba(13, 27, 39, .64);
  transform: translateX(2px);
}
.app-demo .choice.active,
.app-demo .choice.is-live,
.app-demo .choice[aria-pressed="true"] {
  border-color: rgba(100, 169, 233, .78);
  color: #e2f0fb;
  background: rgba(13, 27, 39, .88);
  box-shadow: inset 2px 0 0 rgba(116,185,250,.52);
}
.app-demo .choice:disabled {
  opacity: .45;
  cursor: default;
}

.app-demo .scene {
  min-height: 118px;
}
.demo-scene-updated {
  animation: demo-scene-in .36s cubic-bezier(.22,1,.36,1);
}
@keyframes demo-scene-in {
  from { opacity: .42; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.demo-feedback {
  min-height: 22px;
  margin-top: 8px;
  padding-left: 14px;
  position: relative;
  color: #83a3bb;
  font: 9px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  opacity: 0;
  transition: opacity .2s ease, color .2s ease;
}
.demo-feedback::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #70c797;
  box-shadow: 0 0 10px rgba(112,199,151,.22);
}
.demo-feedback.has-message {
  opacity: 1;
  color: #9fc4dc;
}

.app-demo .state.flash {
  animation: demo-state-flash .48s ease;
}
@keyframes demo-state-flash {
  0% { background: rgba(103, 177, 231, .12); transform: translateX(2px); }
  100% { background: transparent; transform: translateX(0); }
}

.demo-hint {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
  padding-right: 3px;
  color: #7890a3;
  font-size: 10px;
}
.demo-hint-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #73baf5;
  box-shadow: 0 0 0 0 rgba(115,186,245,.26);
  animation: demo-hint-pulse 2.2s ease-out infinite;
}
@keyframes demo-hint-pulse {
  0% { box-shadow: 0 0 0 0 rgba(115,186,245,.30); }
  68%, 100% { box-shadow: 0 0 0 8px rgba(115,186,245,0); }
}
.app-demo.has-interacted + .demo-hint .demo-hint-dot {
  animation: none;
  background: #70c797;
}
.app-demo.has-interacted + .demo-hint {
  color: #8ba3b5;
}

@media (max-width: 700px) {
  .demo-pill { display: none; }
  .demo-hint {
    justify-content: flex-start;
    margin-top: 9px;
    padding-left: 2px;
  }
  .app-demo .scene { min-height: 104px; }
}

@media (max-width: 430px) {
  .demo-feedback { font-size: 8.5px; }
  .demo-hint { font-size: 9.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .demo-scene-updated,
  .app-demo .state.flash,
  .demo-hint-dot { animation: none !important; }
}

/* =========================================================
   V2.9 / Step 2 — Choice → Consequence memory showcase
   ========================================================= */
.memory-story-grid {
  display: grid;
  grid-template-columns: minmax(0,.86fr) minmax(0,1.14fr);
  gap: clamp(34px, 5vw, 68px);
  align-items: center;
}
.memory-story-intro .lead { max-width: 35rem; }
.memory-proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 22px;
  color: #90a9bc;
  font: 600 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.memory-proof span {
  padding: 7px 9px;
  border: 1px solid rgba(153, 199, 237, .13);
  border-radius: 999px;
  background: rgba(8, 18, 27, .32);
}
.memory-proof i {
  color: rgba(125, 181, 224, .62);
  font-style: normal;
}

.consequence-demo {
  position: relative;
  overflow: hidden;
  padding: 0;
  border-color: rgba(160, 204, 238, .22);
  background:
    radial-gradient(circle at 82% 8%, rgba(103,169,221,.10), transparent 28%),
    linear-gradient(145deg, rgba(9,20,30,.82), rgba(5,12,18,.90));
}
.consequence-demo::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 0 48%, rgba(123,181,226,.035) 48% 52%, transparent 52%);
}
.consequence-head {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(151, 198, 235, .12);
}
.consequence-head h3 {
  margin: 3px 0 0;
  font-size: 18px;
}
.consequence-status {
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(112,199,151,.23);
  background: rgba(65,140,100,.09);
  color: #9adbb8;
  font: 600 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.decision-stage,
.consequence-stage {
  position: relative;
  z-index: 1;
  padding: 22px;
}
.stage-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.stage-label span {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(111,171,219,.08);
  border: 1px solid rgba(136,190,232,.14);
  color: #8fb4cf;
  font: 600 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.stage-label strong {
  color: #d9e5ee;
  font-size: 12px;
  font-weight: 600;
}
.decision-context {
  margin: 0 0 14px;
  color: #a9bac7;
  font-size: 13px;
  line-height: 1.65;
}
.memory-choice-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 9px;
}
.memory-choice {
  min-width: 0;
  min-height: 72px;
  padding: 12px;
  border: 1px solid rgba(149,195,232,.14);
  border-radius: 10px;
  background: rgba(5,13,20,.46);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform .2s ease,
    border-color .2s ease,
    background-color .2s ease,
    box-shadow .2s ease;
}
.memory-choice:hover {
  transform: translateY(-2px);
  border-color: rgba(129,190,240,.35);
  background: rgba(10,24,35,.72);
}
.memory-choice.is-active,
.memory-choice[aria-pressed="true"] {
  border-color: rgba(112,184,243,.58);
  background: linear-gradient(180deg, rgba(38,82,118,.23), rgba(10,24,35,.72));
  box-shadow: inset 0 0 0 1px rgba(112,184,243,.07), 0 10px 28px rgba(0,0,0,.12);
}
.memory-choice:focus-visible {
  outline: 2px solid rgba(122,190,246,.76);
  outline-offset: 3px;
}
.memory-choice span,
.memory-choice small { display: block; }
.memory-choice span {
  color: #e1ebf2;
  font-weight: 650;
  font-size: 12px;
}
.memory-choice small {
  margin-top: 5px;
  color: #7f95a6;
  font-size: 10px;
  line-height: 1.4;
}

.consequence-bridge {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 0 22px;
  color: #7991a3;
}
.consequence-bridge span {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(132,184,224,.23));
}
.consequence-bridge span:last-child {
  background: linear-gradient(90deg, rgba(132,184,224,.23), transparent);
}
.consequence-bridge b {
  font: 600 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.consequence-stage {
  padding-top: 18px;
}
.consequence-scene {
  min-height: 55px;
  margin-bottom: 16px;
  padding-left: 13px;
  border-left: 2px solid rgba(116,185,250,.34);
  color: #becbd5;
  font: 12px/1.72 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.consequence-state-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px;
}
.consequence-state {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(149,195,232,.11);
  border-radius: 9px;
  background: rgba(5,13,20,.34);
}
.consequence-state span,
.consequence-state strong { display: block; }
.consequence-state span {
  margin-bottom: 4px;
  color: #6f889b;
  font: 600 8px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.consequence-state strong {
  overflow-wrap: anywhere;
  color: #cfe0ec;
  font-size: 11px;
  line-height: 1.45;
  font-weight: 600;
}
.consequence-note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 13px;
  padding: 10px 11px;
  border-radius: 8px;
  background: rgba(52,110,78,.08);
  border: 1px solid rgba(83,166,117,.12);
  color: #8aa897;
  font-size: 10px;
  line-height: 1.5;
}
.consequence-note i {
  width: 7px;
  height: 7px;
  margin-top: 4px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #70c797;
  box-shadow: 0 0 11px rgba(112,199,151,.25);
}
.memory-demo-updated .consequence-scene,
.memory-demo-updated .consequence-state {
  animation: memory-update-in .34s cubic-bezier(.22,1,.36,1);
}
@keyframes memory-update-in {
  from { opacity: .48; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  .memory-story-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .memory-story-intro { max-width: 48rem; }
}

@media (max-width: 700px) {
  .memory-choice-list { grid-template-columns: 1fr; }
  .memory-choice {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    gap: 10px;
  }
  .memory-choice small {
    margin-top: 0;
    text-align: right;
    max-width: 13rem;
  }
  .consequence-state-grid { grid-template-columns: 1fr; }
  .memory-proof i { display: none; }
}

@media (max-width: 520px) {
  .consequence-head,
  .decision-stage,
  .consequence-stage { padding-left: 16px; padding-right: 16px; }
  .consequence-bridge { padding-inline: 16px; }
  .consequence-head { align-items: flex-start; }
  .consequence-status { margin-top: 2px; }
  .memory-choice {
    display: block;
  }
  .memory-choice small {
    margin-top: 4px;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .memory-choice,
  .memory-demo-updated .consequence-scene,
  .memory-demo-updated .consequence-state {
    transition: none !important;
    animation: none !important;
  }
}

/* =========================================================
   V2.9 Step 3 — Worlds upgrade
   ========================================================= */
.worlds-upgrade .container {
  display: grid;
  gap: 24px;
}
.world-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}
.worlds-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
  gap: 24px;
  align-items: start;
}
.enhanced-world-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 0;
}
.world-select {
  appearance: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  padding: 0;
  position: relative;
}
.world-select.is-active {
  border-color: rgba(142,194,236,.42);
  box-shadow: 0 0 0 1px rgba(132,196,255,.12) inset, 0 18px 40px rgba(0,0,0,.20);
}
.world-select .world-art {
  height: 190px;
  background: #0d161e;
}
.world-select .world-art img,
.world-preview-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.world-tag-row,
.world-preview-tags,
.world-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.world-tag-row span,
.world-preview-tags span,
.world-preview-actions span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: .32rem .66rem;
  border-radius: 999px;
  background: rgba(9, 18, 29, .42);
  border: 1px solid rgba(149, 198, 237, .16);
  color: rgba(230, 238, 244, .88);
  font-size: .73rem;
  letter-spacing: .04em;
}
.world-copy {
  padding: 16px;
  display: grid;
  gap: 10px;
}
.world-copy h3 {
  margin: 0;
}
.world-copy p {
  margin: 0;
  color: var(--muted);
}
.world-preview {
  position: sticky;
  top: 104px;
  overflow: hidden;
  padding: 0;
}
.world-preview-art {
  height: 250px;
  border-bottom: 1px solid rgba(153, 199, 237, .10);
  background: #0c151d;
}
.world-preview-copy {
  padding: 20px;
  display: grid;
  gap: 16px;
}
.world-preview-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.world-preview-status {
  display: inline-flex;
  padding: .38rem .68rem;
  border-radius: 999px;
  background: rgba(132, 196, 255, .12);
  border: 1px solid rgba(132, 196, 255, .20);
  color: rgba(236, 244, 250, .90);
  font-size: .76rem;
}
.world-preview-copy h3,
.world-preview-subtitle {
  margin: 0;
}
.world-preview-subtitle {
  color: var(--muted);
}
.world-preview-grid {
  display: grid;
  gap: 12px;
}
.world-preview-block {
  padding: 16px;
  background: rgba(8, 17, 27, .28);
}
.world-preview-block h4 {
  margin: 0 0 .45rem;
  font-size: .86rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(232, 240, 247, .84);
}
.world-preview-block p,
.world-preview-actions-head {
  margin: 0;
}
.world-preview-actions-wrap {
  display: grid;
  gap: 10px;
}
.world-preview-actions-head {
  font-size: .88rem;
  color: rgba(232, 240, 247, .88);
}
.world-preview-actions span {
  background: rgba(57, 98, 144, .10);
  border-color: rgba(132, 196, 255, .18);
}

@media (max-width: 1100px) {
  .worlds-shell {
    grid-template-columns: 1fr;
  }
  .world-preview {
    position: relative;
    top: auto;
  }
}

@media (max-width: 760px) {
  .world-section-head {
    align-items: start;
    flex-direction: column;
  }
  .enhanced-world-grid {
    grid-template-columns: 1fr;
  }
  .world-select .world-art {
    height: 210px;
  }
  .world-preview-art {
    height: 220px;
  }
}

/* =========================================================
   V2.9 Step 4 — Download page overhaul
   ========================================================= */
.download-hero-grid {
  display: grid;
  grid-template-columns: minmax(0,1.05fr) minmax(320px,.95fr);
  gap: clamp(32px,6vw,72px);
  align-items: end;
}
.release-strip {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  border: 1px solid rgba(176,207,232,.18);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(7,17,26,.42);
  backdrop-filter: blur(10px);
}
.release-strip > div {
  min-width: 0;
  padding: 18px;
  display: grid;
  gap: 6px;
}
.release-strip > div + div { border-left: 1px solid rgba(176,207,232,.13); }
.release-strip span,
.release-facts small,
.platform-status span {
  color: #8399aa;
  font-size: 11px;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.release-strip strong { font-size: 14px; color: #edf5fb; }

.detected-platform {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding: 13px 15px;
  border: 1px solid rgba(118,189,255,.24);
  border-radius: 11px;
  background: rgba(57,132,198,.08);
  color: #cfe5f7;
  font-size: 13px;
}
.detected-platform[hidden] { display: none; }
.detected-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #72bdff;
  box-shadow: 0 0 14px rgba(114,189,255,.55);
}
.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.section-heading-row h2 { margin-bottom: 0; }
.text-link {
  white-space: nowrap;
  color: #a9cbe7;
  font-size: 13px;
}
.text-link:hover { color: #fff; }

.download-grid-upgraded { margin-top: 0; }
.download-card-upgraded {
  padding: 24px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}
.download-card-upgraded.is-recommended {
  border-color: rgba(126,189,255,.48);
  box-shadow: 0 0 0 1px rgba(126,189,255,.08) inset, 0 24px 70px rgba(0,0,0,.18);
}
.download-card-upgraded.is-recommended::after {
  content: "Recommended for this device";
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid rgba(126,189,255,.22);
  background: rgba(79,151,218,.11);
  color: #cfe6f9;
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.platform-card-top {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-right: 142px;
}
.platform-badge-icon {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(176,207,232,.18);
  background: rgba(71,136,195,.06);
}
.platform-badge-icon .platform-icon { margin: 0; width: 29px; height: 29px; }
.platform-status { display: grid; gap: 3px; }
.platform-status strong { font-size: 15px; color: #edf5fb; }
.download-card-upgraded h3 { margin: 2px 0 0; font-size: clamp(22px,2vw,26px); }
.download-card-upgraded > p { margin: 0; color: #9fb1c0; }
.release-facts {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  border-top: 1px solid rgba(176,207,232,.12);
  border-bottom: 1px solid rgba(176,207,232,.12);
  padding-block: 13px;
}
.release-facts span { display: grid; gap: 4px; }
.release-facts strong { font-size: 13px; color: #e8f2fa; }
.platform-download { margin-top: 0 !important; }
.platform-warning {
  display: grid;
  grid-template-columns: 24px minmax(0,1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(226,178,100,.16);
  border-radius: 10px;
  background: rgba(162,105,44,.06);
}
.platform-warning > span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(229,184,109,.25);
  color: #e9c58b;
  font-size: 11px;
}
.platform-warning p { margin: 0; color: #aa9c87; font-size: 12px; line-height: 1.55; }
.platform-warning strong { color: #d8c6a9; }
.verify-box {
  border-top: 1px solid rgba(176,207,232,.12);
  padding-top: 13px;
}
.verify-box summary {
  cursor: pointer;
  color: #aac4d8;
  font-size: 12px;
}
.checksum-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}
.checksum-row code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(0,0,0,.18);
  color: #91a8ba;
  font-size: 10px;
}
.copy-checksum {
  min-height: 36px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid rgba(176,207,232,.20);
  background: rgba(255,255,255,.02);
  color: #c8d7e3;
  cursor: pointer;
}
.copy-checksum:hover { border-color: rgba(126,189,255,.45); color: #fff; }
.release-trust { margin-top: 20px; }

.setup-tabs {
  display: inline-flex;
  gap: 5px;
  padding: 5px;
  margin: 26px 0 20px;
  border: 1px solid rgba(176,207,232,.16);
  border-radius: 999px;
  background: rgba(6,15,23,.44);
}
.setup-tab {
  min-height: 38px;
  padding: 0 17px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #8fa4b5;
  cursor: pointer;
}
.setup-tab.is-active {
  background: #eaf2f8;
  color: #0a141b;
}
.setup-panel {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 16px;
}
.setup-panel[hidden] { display: none; }
.setup-step {
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(176,207,232,.16);
  border-radius: 12px;
  background: linear-gradient(145deg,rgba(13,27,39,.56),rgba(5,13,20,.54));
}
.setup-step > span {
  width: 28px;
  height: 28px;
  margin-bottom: 15px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(126,189,255,.24);
  background: rgba(70,132,188,.08);
  color: #bfe0fa;
  font: 11px ui-monospace, monospace;
}
.setup-step h3 { margin: 0 0 7px; font-size: 17px; }
.setup-step p { margin: 0; color: #99adbd; font-size: 12.5px; line-height: 1.63; }
.setup-step code { color: #cfe3f3; }

.requirements-upgraded { grid-template-columns: repeat(4,minmax(0,1fr)); }
.download-help-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 18px;
  margin-top: 22px;
}
.help-card { padding: 20px; }
.help-card h3 { margin: 0 0 8px; font-size: 17px; }
.help-card p { margin: 0; color: #98adbd; font-size: 13px; line-height: 1.65; }

@media (max-width: 1020px) {
  .download-hero-grid { grid-template-columns: 1fr; }
  .release-strip { max-width: 720px; }
  .setup-panel { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .requirements-upgraded { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 700px) {
  .release-strip { grid-template-columns: 1fr; }
  .release-strip > div + div { border-left: 0; border-top: 1px solid rgba(176,207,232,.13); }
  .section-heading-row { align-items: flex-start; flex-direction: column; }
  .platform-card-top { padding-right: 0; }
  .download-card-upgraded.is-recommended::after {
    position: static;
    order: -1;
    align-self: flex-start;
  }
  .setup-panel { grid-template-columns: 1fr; }
  .requirements-upgraded { grid-template-columns: 1fr; }
  .download-help-grid { grid-template-columns: 1fr; }
}
.download-card-upgraded .os-badge { display: none; }

/* =========================================================
   V2.9 Step 5 — Blog + Dev Notes separation
   ========================================================= */

/* Shared purpose rows */
.blog-purpose-row,
.dev-notes-purpose {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 24px;
  color: rgba(206, 219, 229, .78);
  font-size: .86rem;
}
.blog-purpose-row a,
.dev-notes-purpose a {
  color: rgba(183, 218, 246, .92);
  text-decoration: none;
}
.blog-purpose-row a:hover,
.dev-notes-purpose a:hover {
  color: #fff;
}
.blog-purpose-row span,
.dev-notes-purpose span {
  display: inline-flex;
  padding: .42rem .7rem;
  border-radius: 999px;
  border: 1px solid rgba(145, 198, 244, .15);
  background: rgba(8, 17, 27, .32);
}

/* Blog index */
.blog-toolbar {
  gap: 22px;
  align-items: end;
}
.blog-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.blog-featured {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(330px, .9fr);
  min-height: 390px;
  margin: 26px 0 22px;
  overflow: hidden;
  border: 1px solid rgba(145, 198, 244, .18);
  border-radius: 16px;
  background: rgba(7, 15, 23, .72);
  box-shadow: 0 26px 80px rgba(0,0,0,.18);
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.blog-featured[hidden],
.blog-card[hidden] {
  display: none !important;
}
.blog-featured:hover {
  transform: translateY(-3px);
  border-color: rgba(145, 198, 244, .34);
  box-shadow: 0 32px 88px rgba(0,0,0,.26);
}
.blog-featured-art {
  position: relative;
  min-height: 390px;
  overflow: hidden;
}
.blog-featured-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5,12,18,.02), rgba(5,12,18,.28));
  pointer-events: none;
}
.blog-featured-art img,
.blog-card-art img,
.article-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-featured-art img {
  transition: transform .65s cubic-bezier(.22,1,.36,1), filter .4s ease;
}
.blog-featured:hover .blog-featured-art img {
  transform: scale(1.025);
  filter: brightness(1.04);
}
.blog-featured-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 48px);
}
.blog-featured-copy h2 {
  margin: 10px 0 14px;
  font-size: clamp(2rem, 3vw, 3.15rem);
  line-height: 1.03;
}
.blog-featured-copy > p {
  color: #a8bac8;
  line-height: 1.7;
  max-width: 46ch;
}
.blog-category {
  display: inline-flex;
  align-items: center;
  color: rgba(177, 216, 247, .95);
  font-weight: 650;
}
.blog-grid-secondary {
  margin-top: 0;
}
.blog-card-art {
  position: relative;
  overflow: hidden;
  background: #0a141d;
}
.blog-card-art img {
  min-height: 190px;
  transition: transform .5s cubic-bezier(.22,1,.36,1), filter .35s ease;
}
.blog-card:hover .blog-card-art img {
  transform: scale(1.035);
  filter: brightness(1.05) saturate(1.03);
}
.blog-card-meta {
  flex-wrap: wrap;
}
.blog-dev-callout,
.dev-blog-callout {
  margin-top: 28px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.blog-dev-callout h3,
.dev-blog-callout h3 {
  margin: .35rem 0 0;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}

/* Blog article */
.article-category {
  display: inline-flex;
  width: fit-content;
  padding: .4rem .7rem;
  border-radius: 999px;
  background: rgba(132, 196, 255, .11);
  border: 1px solid rgba(132, 196, 255, .18);
  color: rgba(189, 220, 246, .95);
  font-size: .78rem;
  letter-spacing: .04em;
}
.article-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.article-actions .tag-row {
  margin: 0;
}
.article-copy-link {
  min-height: 40px;
  padding-block: .55rem;
}
.article-copy-link.is-copied {
  border-color: rgba(124, 214, 151, .34);
  color: #c9f3d4;
}
.article-cover {
  position: relative;
  margin: 26px 0 0;
  aspect-ratio: 1200 / 630;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(145, 198, 244, .16);
  background: #071019;
  box-shadow: 0 24px 70px rgba(0,0,0,.22);
}
.article-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.018);
  pointer-events: none;
}
.related-section {
  padding-block: clamp(42px, 5vw, 68px);
}
.related-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.related-head h2 {
  margin-bottom: 0;
}
.related-head > a {
  color: rgba(181, 215, 242, .92);
  text-decoration: none;
}
.related-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.blog-card-compact p {
  min-height: 0;
}
.article-next-panel p {
  margin: .55rem 0 0;
  color: var(--muted);
}

/* Dev Notes now behaves like a short changelog */
.dev-notes-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}
.dev-notes-toolbar .note-filter {
  justify-content: flex-end;
  margin: 0;
}
.compact-notes .note-card {
  background: linear-gradient(180deg, rgba(9, 18, 27, .40), rgba(7, 14, 22, .26));
}
.compact-notes .note-card summary {
  grid-template-columns: 120px minmax(0,1fr) auto auto;
}
.compact-notes .note-thumb {
  min-height: 78px;
  border-radius: 9px;
  background-position: center;
  background-size: cover;
}
.compact-notes .release-thumb {
  background-image: linear-gradient(180deg, rgba(6,14,21,.05), rgba(6,14,21,.36)), url("world-01.webp");
}
.compact-notes .engine-thumb {
  background-image: linear-gradient(180deg, rgba(6,14,21,.05), rgba(6,14,21,.36)), url("world-07.webp");
}
.compact-notes .compatibility-thumb {
  background-image: linear-gradient(180deg, rgba(6,14,21,.05), rgba(6,14,21,.36)), url("world-06.webp");
}
.compact-notes .project-thumb {
  background-image: linear-gradient(180deg, rgba(6,14,21,.05), rgba(6,14,21,.36)), url("world-08.webp");
}
.compact-notes .note-body {
  padding-top: 0;
}
.compact-notes .note-body p {
  margin: 0;
}
.note-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 14px;
}
.note-actions a {
  color: rgba(181, 215, 242, .94);
  text-decoration: none;
  font-size: .86rem;
}
.note-actions a:hover {
  color: #fff;
}

@media (max-width: 980px) {
  .blog-featured {
    grid-template-columns: 1fr;
  }
  .blog-featured-art {
    min-height: 300px;
  }
  .compact-notes .note-card summary {
    grid-template-columns: 100px minmax(0,1fr) auto auto;
  }
}

@media (max-width: 760px) {
  .blog-toolbar,
  .dev-notes-toolbar,
  .blog-dev-callout,
  .dev-blog-callout,
  .related-head {
    align-items: stretch;
    flex-direction: column;
  }
  .blog-filter,
  .dev-notes-toolbar .note-filter {
    justify-content: flex-start;
  }
  .blog-featured {
    min-height: 0;
  }
  .blog-featured-art {
    min-height: 230px;
  }
  .blog-featured-copy {
    padding: 24px 20px 26px;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
  .article-actions {
    align-items: flex-start;
    flex-direction: column;
  }
  .compact-notes .note-card summary {
    grid-template-columns: 82px minmax(0,1fr) auto;
  }
  .compact-notes .note-card summary > .tag {
    display: none;
  }
  .compact-notes .note-thumb {
    min-height: 70px;
  }
  .blog-dev-callout .btn,
  .dev-blog-callout .btn {
    align-self: flex-start;
  }
}

@media (max-width: 520px) {
  .compact-notes .note-card summary {
    grid-template-columns: 1fr auto;
  }
  .compact-notes .note-thumb {
    display: none;
  }
  .article-cover {
    border-radius: 12px;
  }
}

/* =========================================================
   V2.9 Step 7 — final UI / accessibility / performance polish
   ========================================================= */

/* Navigation depth only appears after the page starts moving. */
.site-header {
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.site-header.is-scrolled {
  border-bottom-color: rgba(170,196,220,.22);
  box-shadow: 0 12px 32px rgba(0,0,0,.16);
}

/* More consistent keyboard and touch affordances. */
:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid #9fd0ff;
  outline-offset: 3px;
}
:where(button, .btn, .world-select, .memory-choice, .setup-tab, .chip, summary) {
  touch-action: manipulation;
}
.btn:active,
.carousel-nav:active,
.carousel-pause:active,
.memory-choice:active,
.world-select:active,
.setup-tab:active {
  transform: translateY(0) scale(.985);
}
.blog-card:focus-within,
.blog-featured:focus-within {
  border-color: rgba(150,205,250,.5);
  box-shadow: 0 0 0 2px rgba(126,189,255,.10), 0 18px 42px rgba(0,0,0,.18);
}
details > summary { cursor: pointer; }

/* Prevent deep sections from costing layout/paint before they approach viewport. */
@supports (content-visibility: auto) {
  .cv-auto {
    content-visibility: auto;
    contain-intrinsic-size: auto 680px;
  }
}

/* Anchored headings should clear the sticky header. */
:where(h2[id], h3[id], section[id]) {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

/* Carousel controls: full-size targets, small visual dots. */
.carousel-ui {
  gap: 6px;
}
.carousel-dots {
  gap: 0;
  min-width: 0;
}
.carousel-dots button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 44px;
  padding: 0;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}
.carousel-dots button span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(224,234,241,.28);
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.carousel-dots button.is-active span,
.carousel-dots button[aria-pressed="true"] span {
  background: rgba(144,205,255,.95);
  transform: scale(1.12);
  box-shadow: 0 0 0 4px rgba(144,205,255,.10);
}
.carousel-dots button:hover span {
  background: rgba(205,228,247,.7);
}
.carousel-pause {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(145,198,244,.18);
  background: rgba(8,17,27,.58);
  color: rgba(237,244,250,.82);
  font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  transition: transform .2s ease, border-color .2s ease, background-color .2s ease, color .2s ease;
}
.carousel-pause:hover,
.carousel-pause:focus-visible {
  border-color: rgba(145,198,244,.38);
  background: rgba(11,22,34,.84);
  color: #fff;
}
.carousel-pause .play-icon { display: none; font-size: 10px; transform: translateX(1px); }
.carousel-pause.is-paused .pause-icon { display: none; }
.carousel-pause.is-paused .play-icon { display: inline; }
.carousel-slide[aria-hidden="true"] { visibility: hidden; }
.carousel-slide.is-active { visibility: visible; }
.carousel-slide img,
.world-art img,
.world-preview-art img,
.blog-card-art img,
.blog-featured-art img,
.article-cover img {
  height: auto;
  aspect-ratio: 16 / 9;
}
.carousel-slide img,
.world-art img,
.world-preview-art img {
  height: 100%;
}

/* Back-to-top is deliberately quiet until useful. */
.back-to-top {
  position: fixed;
  z-index: 45;
  right: max(18px, calc(env(safe-area-inset-right) + 14px));
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 14px));
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(150,199,238,.22);
  border-radius: 50%;
  background: rgba(7,16,23,.82);
  color: #dcecf8;
  box-shadow: 0 12px 34px rgba(0,0,0,.24);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease, border-color .2s ease;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.back-to-top svg { width: 22px; height: 22px; fill: currentColor; }
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover { border-color: rgba(150,205,250,.48); }

/* Download tabs behave as actual tabs for keyboard users. */
.setup-tab[aria-selected="true"] {
  border-color: rgba(133,195,245,.48);
}
.setup-panel:focus-visible {
  outline-offset: 6px;
}

/* Small screens: preserve comfortable controls without overflowing the carousel. */
@media (max-width: 520px) {
  .carousel-ui { padding-inline: 10px; gap: 2px; }
  .carousel-nav,
  .carousel-pause { width: 38px; height: 38px; }
  .carousel-dots button { width: 27px; height: 42px; }
  .carousel-dots button span { width: 8px; height: 8px; }
  .back-to-top { width: 42px; height: 42px; }
}

/* Avoid hover-only theatrics on touch devices. */
@media (hover: none) {
  .btn:hover,
  .world-card:hover,
  .blog-card:hover,
  .blog-featured:hover,
  .feature-card:hover,
  .note-card:hover,
  .download-card:hover,
  .about-card:hover {
    transform: none;
  }
}

/* Higher-contrast system preference gets stronger boundaries and copy. */
@media (prefers-contrast: more) {
  :root {
    --line: rgba(210,226,239,.28);
    --line-strong: rgba(220,235,246,.48);
    --muted: #b7c6d3;
    --muted-2: #9eb0bf;
  }
  .soft-panel,
  .world-card,
  .blog-card,
  .note-card,
  .download-card,
  .article-prose {
    border-color: var(--line-strong);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site-header,
  .back-to-top,
  .carousel-dots button span,
  .carousel-pause {
    transition: none !important;
  }
}


/* Repaired footer: full site navigation without crowding. */
.footer-links { max-width: 760px; justify-content: flex-end; row-gap: 11px; }
@media (max-width: 840px) {
  .footer-links { max-width: 100%; justify-content: flex-start; }
}

/* =========================================================
   Footer visibility + structure fix
   Footer is intentionally excluded from scroll-reveal.
   ========================================================= */
.footer {
  position: relative;
  z-index: 2;
  min-height: 220px;
  padding: 42px 0 calc(24px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(4,11,17,.72), rgba(3,9,14,.96));
  border-top: 1px solid rgba(180,211,236,.16);
}
.footer-main {
  display: grid;
  grid-template-columns: minmax(260px, .82fr) minmax(520px, 1.18fr);
  gap: clamp(42px, 7vw, 96px);
  align-items: start;
}
.footer-brand-block {
  display: grid;
  gap: 16px;
  max-width: 360px;
}
.footer-brand-block p {
  margin: 0;
  color: #8499aa;
  font-size: 13px;
  line-height: 1.65;
}
.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
}
.footer-socials a {
  color: #a8bac8;
  font-size: 11px;
}
.footer-socials a:hover { color: #fff; }
.footer-nav-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 28px;
  max-width: none;
  justify-content: initial;
}
.footer-link-group {
  display: grid;
  align-content: start;
  gap: 11px;
}
.footer-group-title {
  margin-bottom: 3px;
  color: #6f8ea5;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.footer-link-group a {
  width: max-content;
  max-width: 100%;
  color: #a8bac8;
  font-size: 12px;
  line-height: 1.45;
}
.footer-link-group a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid rgba(176,207,232,.10);
}
.footer-copy,
.footer-note {
  color: #71879a;
  font-size: 11px;
}

/* Safety override for old/generated classes: footer must never be invisible. */
.motion-enabled .footer .reveal-init,
.motion-enabled .footer .reveal-init.reveal-visible,
.footer .brand,
.footer-copy,
.footer-links,
.footer-socials,
.footer-note {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  filter: none !important;
}

@media (max-width: 900px) {
  .footer-main { grid-template-columns: 1fr; gap: 34px; }
  .footer-brand-block { max-width: 520px; }
  .footer-nav-groups { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .footer { padding-top: 34px; }
  .footer-nav-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 20px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: 8px; }
}
@media (max-width: 390px) {
  .footer-nav-groups { grid-template-columns: 1fr 1fr; }
}
