:root {
  --night: #07161d;
  --deep: #0b232c;
  --teal: #0f3a45;
  --ivory: #f6f0dc;
  --mute: #a9bfb6;
  --glow: #d6f23a;
  --glow-d: #b9d52c;
  --jade: #2f9a78;
  --ink: #10261a;
  --line: rgba(246, 240, 220, 0.16);
  --r: 14px;
  --sh1: 0 1px 2px rgba(0, 0, 0, 0.3);
  --sh2: 0 8px 24px rgba(0, 0, 0, 0.35);
  --font-h: "Lilita One", "Trebuchet MS", sans-serif;
  --font-b: "Nunito", system-ui, sans-serif;
  --rail: 20px;
  --pad: 56px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ivory);
  font: 400 16px/1.6 var(--font-b);
  -webkit-text-size-adjust: 100%;
  background-image:
    radial-gradient(circle at 88% 120px, rgba(246, 240, 220, 0.16) 0, rgba(246, 240, 220, 0.16) 44px, rgba(246, 240, 220, 0) 160px);
  background-repeat: no-repeat;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--glow); text-underline-offset: 3px; }
a:hover { color: #e6ff55; }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 2px; }
.skip { position: absolute; left: 8px; top: -48px; background: var(--glow); color: var(--ink); padding: 8px 16px; border-radius: var(--r); z-index: 50; }
.skip:focus { top: 8px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-family: var(--font-h); font-weight: 400; line-height: 1.2; margin: 0; letter-spacing: 0.01em; }
h1 { font-size: 36px; }
h2 { font-size: 28px; margin-bottom: 16px; }
h3 { font-size: 18px; margin-bottom: 8px; }
p { margin: 0 0 16px; max-width: 70ch; }
.muted { color: var(--mute); }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: var(--night); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.top-in { max-width: 1120px; margin: 0 auto; padding: 8px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ivory); text-decoration: none; font: 400 22px/1 var(--font-h); }
.nav { display: flex; gap: 4px; }
.nav a { white-space: nowrap; color: var(--ivory); text-decoration: none; font-weight: 700; font-size: 14px; padding: 8px 12px; border-radius: var(--r); min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { background: var(--teal); }

/* hero */
.hero { padding: 24px 24px 32px; }
.hero-grid { max-width: 1120px; margin: 0 auto; display: grid; gap: 16px; grid-template-columns: 1fr; grid-template-areas: "text" "stage" "act" "facts"; }
.hero-text { grid-area: text; }
.stage-col { grid-area: stage; min-width: 0; }
.actions { grid-area: act; }
.facts { grid-area: facts; }
.eyebrow { color: var(--glow); font-weight: 800; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 8px; }
.lede { font-size: 16px; color: var(--ivory); margin: 16px 0 0; }

.stage { position: relative; width: 100%; height: clamp(520px, 76vh, 700px); background: var(--deep); border: 2px solid var(--jade); border-radius: var(--r); overflow: hidden; box-shadow: var(--sh2); }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: var(--night); }
.cover { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--night); }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; opacity: 0.7; }
.play-btn { position: relative; display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 32px; border: 0; border-radius: var(--r); background: var(--glow); color: var(--ink); font: 400 22px/1 var(--font-h); cursor: pointer; box-shadow: var(--sh2); }
.play-btn:hover { background: #e6ff55; }
.play-btn:active { transform: translateY(1px); }
.loader { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: radial-gradient(circle at 50% 45%, #0f3a45 0, #07161d 70%); }
.loader p { margin: 0; color: var(--mute); font-weight: 700; text-align: center; padding: 0 24px; }
[data-gf-state="loading"] .loader { display: flex; }
.pond { position: relative; width: 160px; height: 120px; }
.ring { position: absolute; left: 50%; top: 55%; width: 40px; height: 16px; margin: -8px 0 0 -20px; border: 2px solid rgba(214, 242, 58, 0.55); border-radius: 50%; opacity: 0; animation: ring 2.4s ease-out infinite; }
.ring.r2 { animation-delay: 0.8s; }
.ring.r3 { animation-delay: 1.6s; }
.lily { position: absolute; left: 50%; top: 55%; width: 56px; height: 24px; margin: -12px 0 0 -28px; border-radius: 50%; background: #1f6b5a; }
.lily::after { content: ""; position: absolute; right: -2px; top: 2px; width: 26px; height: 10px; background: #0b232c; transform: rotate(-18deg); border-radius: 0 12px 12px 0; }
.fly { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: var(--glow); animation: orbit 3.6s linear infinite; }
.fly::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; background: radial-gradient(circle, rgba(214, 242, 58, 0.55), rgba(214, 242, 58, 0) 70%); }
.fly.f2 { animation-duration: 4.4s; animation-delay: -1.2s; }
.fly.f3 { animation-duration: 5.2s; animation-delay: -2.4s; }
@keyframes ring { 0% { transform: scale(0.6); opacity: 0.8; } 100% { transform: scale(3.6); opacity: 0; } }
@keyframes orbit { 0% { transform: translate(60px, 0); } 25% { transform: translate(0, -34px); } 50% { transform: translate(-60px, 0); } 75% { transform: translate(0, 34px); } 100% { transform: translate(60px, 0); } }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.act { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--deep); color: var(--ivory); font: 700 14px/1 var(--font-b); cursor: pointer; }
.act:hover { border-color: var(--glow); }
.act b { color: var(--mute); font-weight: 800; }
.act .ico-fill { fill: none; stroke: currentColor; stroke-width: 2; }
.act[aria-pressed="true"], .act[data-gf-liked] { background: var(--glow); color: var(--ink); border-color: var(--glow); }
.act[aria-pressed="true"] b, .act[data-gf-liked] b { color: var(--ink); }
.act[aria-pressed="true"] .ico-fill, .act[data-gf-liked] .ico-fill { fill: var(--ink); }
.act-msg { font-size: 14px; color: var(--glow); }
.facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--mute); font-size: 14px; }
.facts b { color: var(--glow); font-family: var(--font-h); font-weight: 400; font-size: 18px; margin-right: 4px; }

/* notes (comments) */
.notes { padding: 32px 0 48px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--deep); }
.notes-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
.notes h2 { font-size: 22px; }
.cform { display: grid; gap: 8px; max-width: 480px; }
.cform label { font-size: 14px; font-weight: 700; color: var(--mute); }
.cform input, .cform textarea { width: 100%; padding: 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--night); color: var(--ivory); font: 400 16px/1.4 var(--font-b); }
.cform textarea { resize: vertical; min-height: 88px; }
.cform-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cform-row span { font-size: 14px; color: var(--mute); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 24px; border: 0; border-radius: var(--r); background: var(--glow); color: var(--ink); font: 400 18px/1 var(--font-h); text-decoration: none; cursor: pointer; }
.btn:hover { background: #e6ff55; color: var(--ink); }
.count-line { color: var(--mute); font-size: 14px; margin: 0 0 8px; }
.count-line b { color: var(--glow); }
.clist { max-height: 320px; overflow: auto; display: grid; gap: 12px; align-content: start; }
.clist[data-gf-empty]::before { content: "The pond is quiet. Be the first to leave a note."; color: var(--mute); }
.cm { padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--night); }
.cm[data-gf-owner] { border-color: var(--glow); }
.cm header { font-size: 14px; color: var(--mute); }
.cm header strong { color: var(--ivory); }
.cm p { margin: 4px 0 8px; }
.linkbtn { background: none; border: 0; padding: 4px 0; color: var(--glow); font: 700 14px/1 var(--font-b); cursor: pointer; }
.replies { margin-left: 16px; display: grid; gap: 8px; }

/* trail: the firefly path that threads the page */
.trail { position: relative; padding: 32px 0 48px; --p: 0; }
.trail .wrap { position: relative; padding-left: calc(24px + var(--pad)); }
.trail-line { position: absolute; top: 0; bottom: 0; left: calc(24px + var(--rail)); width: 2px; background: rgba(246, 240, 220, 0.16); }
.trail-fill { position: absolute; left: 0; top: 0; width: 2px; height: calc(var(--p) * 100%); background: var(--glow); }
.trail-fly { position: absolute; left: -7px; top: calc(var(--p) * 100% - 8px); width: 16px; height: 16px; border-radius: 50%; background: var(--glow); }
.trail-fly::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; background: radial-gradient(circle, rgba(214, 242, 58, 0.55), rgba(214, 242, 58, 0) 68%); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(0.8); opacity: 0.7; } 50% { transform: scale(1.15); opacity: 1; } }
.stop { position: relative; padding: 32px 0 48px; }
.stop + .stop { border-top: 1px dashed var(--line); }
.node { position: absolute; left: calc(var(--rail) - 12px - var(--pad)); top: 38px; width: 24px; height: 32px; border-radius: 6px; background: var(--ivory); color: var(--ink); font: 400 16px/32px var(--font-h); text-align: center; border-bottom: 3px solid #a9bfb6; }
.narrow { max-width: 62ch; }
.two { display: grid; gap: 32px; grid-template-columns: 1fr; align-items: start; }

/* rule diagrams */
.rules { margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); padding: 16px; background: var(--deep); border: 1px solid var(--line); border-radius: var(--r); }
.dia { margin: 0; min-width: 0; }
.dia svg { width: 100%; height: auto; display: block; background: var(--night); border-radius: 8px; }
.dia figcaption { font-size: 12px; line-height: 1.4; color: var(--mute); margin-top: 8px; }
.dia figcaption b { display: block; color: var(--ivory); font-size: 14px; }
.tl { fill: var(--ivory); }
.tl.blk { fill: #a9bfb6; }
.dot { fill: var(--jade); }
.pth { fill: none; stroke: var(--glow); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 7; }

/* steps */
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 16px; max-width: 760px; }
.steps li { counter-increment: s; position: relative; padding: 0 0 0 64px; min-height: 48px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 48px; height: 36px; border-radius: 50%; background: #1f6b5a; color: var(--ivory); font: 400 22px/36px var(--font-h); text-align: center; }
.steps b { color: var(--glow); }

/* screenshots */
.shots { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin: 0 -24px; padding: 0 24px 8px; }
.shots figure { margin: 0; flex: 0 0 72%; max-width: 300px; scroll-snap-align: start; }
.shots img { border-radius: var(--r); border: 1px solid var(--line); width: 100%; }
.shots figcaption, .resfig figcaption { font-size: 14px; color: var(--mute); margin-top: 8px; line-height: 1.5; }
.shots figcaption b { color: var(--glow); }

/* tiers: unequal columns */
.tiers { display: grid; gap: 16px; grid-template-columns: 1fr; margin: 24px 0; }
.tier { padding: 24px; border-radius: var(--r); background: var(--deep); border: 1px solid var(--line); border-top: 4px solid var(--jade); }
.tier.t-med { border-top-color: var(--glow-d); }
.tier.t-hard { border-top-color: var(--ivory); }
.tier h3 { font-size: 22px; }
.tier .dim { font-size: 14px; color: var(--glow); font-weight: 800; margin-bottom: 8px; }
.tier p:last-child { margin-bottom: 0; color: var(--ivory); }

/* campaign ladder */
.ladder { list-style: none; margin: 24px 0; padding: 0; display: grid; gap: 8px; }
.ladder li { display: grid; grid-template-columns: 88px 1fr; gap: 16px; align-items: center; padding: 12px 16px; border-radius: var(--r); background: var(--deep); border-left: 6px solid var(--jade); }
.ladder b { font: 400 22px/1 var(--font-h); color: var(--glow); }
.ladder li.l2 { border-left-color: var(--glow-d); margin-left: 16px; }
.ladder li.l3 { border-left-color: var(--glow); margin-left: 32px; }
.ladder li.l4 { border-left-color: var(--ivory); margin-left: 48px; }
.ladder span { font-size: 16px; }

/* scoring */
.two-r .resfig { margin: 0; max-width: 280px; }
.resfig img { border-radius: var(--r); border: 1px solid var(--line); }
.ledger { margin: 0 0 24px; display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; max-width: 560px; }
.ledger div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 16px; background: var(--deep); }
.ledger div:nth-child(even) { background: #0f3a45; }
.ledger dt { font-weight: 700; }
.ledger dd { margin: 0; color: var(--glow); font-weight: 800; text-align: right; }

/* strategy */
.tips { list-style: none; counter-reset: t; margin: 0; padding: 0; display: grid; gap: 24px; grid-template-columns: 1fr; }
.tips li { counter-increment: t; padding: 24px; background: var(--deep); border: 1px solid var(--line); border-radius: var(--r); }
.tips h3 { color: var(--glow); }
.tips h3::before { content: counter(t) ". "; color: var(--mute); }
.tips p { margin: 0; }

/* faq */
.faq { display: grid; gap: 24px; max-width: 820px; }
.qa { padding-left: 16px; border-left: 3px solid var(--jade); }
.qa h3 { font-size: 18px; color: var(--ivory); }
.qa p { margin: 0; color: var(--mute); }

/* docs */
.doc { padding: 32px 0 64px; }
.doc-wrap { max-width: 800px; }
.crumbs { font-size: 14px; color: var(--mute); margin-bottom: 24px; }
.prose h1 { font-size: 36px; margin-bottom: 16px; }
.prose h2 { font-size: 22px; margin: 32px 0 8px; }
.prose p, .prose li { max-width: 70ch; }
.prose ul { padding-left: 24px; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; }
.back { margin-top: 32px; }

/* footer */
.foot { border-top: 1px solid var(--line); background: var(--deep); padding: 32px 24px 48px; }
.foot-in { max-width: 1120px; margin: 0 auto; display: grid; gap: 12px; justify-items: start; }
.foot-line, .foot-copy { margin: 0; font-size: 14px; color: var(--mute); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot-nav a { color: var(--ivory); font-weight: 700; font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; }

@media (min-width: 760px) {
  .tiers { grid-template-columns: 1fr 1.1fr 1.4fr; }
  .tips { grid-template-columns: 1fr 1fr; }
  .notes-grid { grid-template-columns: 1fr 1fr; }
  .shots { overflow: visible; margin: 24px 0 0; padding: 0; }
  .shots figure { flex: 1 1 0; max-width: none; }
}
@media (min-width: 960px) {
  .two { grid-template-columns: 1.3fr 1fr; }
  .two-r { grid-template-columns: 1.5fr 1fr; }
}
@media (min-width: 1000px) {
  .hero { padding-top: 32px; }
  .hero-grid { grid-template-columns: 340px 1fr; grid-template-areas: "text stage" "act stage" "facts stage"; align-content: start; column-gap: 32px; }
  .hero-text { align-self: start; }
  .actions { align-self: start; }
  .facts { align-self: start; flex-direction: column; gap: 8px; }
  .stage { height: 560px; }
}
@media (max-width: 640px) {
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  :root { --rail: 16px; --pad: 48px; }
  .wrap { padding: 0 16px; }
  .trail .wrap { padding-left: calc(16px + var(--pad)); }
  .trail-line { left: calc(16px + var(--rail)); }
  .top-in { padding: 8px 16px; }
  .nav a { padding: 8px; font-size: 14px; }
  .nav a:first-child { display: none; }
  .hero { padding: 16px 16px 24px; }
  .shots { margin: 0 -16px; padding: 0 16px 8px; }
  .rules { grid-template-columns: 1fr; }
  .dia { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; }
  .dia figcaption { margin-top: 0; }
  .ladder li { grid-template-columns: 64px 1fr; gap: 12px; }
  .ladder li.l2, .ladder li.l3, .ladder li.l4 { margin-left: 0; }
  .cover { padding: 16px; }
  .play-btn { font-size: 18px; padding: 12px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fly, .ring, .trail-fly::after { animation: none; }
  .ring { opacity: 0.4; }
}
