/* Palette lifted from app/src/theme.rs so the site and the panel are one thing. */
:root {
  --bg: #09090A;
  --sidebar: #0A0A0B;
  --card: #131213;
  --card-hover: #1B1819;
  --divider: #221E1F;
  --rail: #2C2627;
  --accent: #E23A3A;
  --accent-deep: #A81818;
  --accent-soft: #3D181A;
  --warm: #FF9A5E;
  /* Schematica's own two colours, from MISSING and EXTRA in
     src/modules/schematica/mod.rs: what is left to place, and what is in the way. */
  --schem: #599AFF;
  --schem-wrong: #FF4040;
  --txt: #F2EFEF;
  --txt2: #8C8686;
  --muted: #4A4444;
  --ok: #4ADE80;
  --danger: #FF7675;
  --radius: 14px;
  --max: 1180px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}

/* Lets the rotating borders (panel window, best plan) turn smoothly. */
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes ang { to { --ang: 360deg; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font: 16px/1.6 Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #fff; }

/* ------------------------------------------------------------ page-wide layers */
#sky { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.cursor-glow {
  position: fixed; left: 0; top: 0; width: 680px; height: 680px; margin: -340px 0 0 -340px;
  border-radius: 50%; pointer-events: none; z-index: 0; opacity: 0; transition: opacity .5s;
  background: radial-gradient(circle, rgba(226,58,58,.10), rgba(226,58,58,.03) 40%, transparent 65%);
  will-change: transform;
}
.cursor-glow.on { opacity: 1; }
.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 70;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent-deep), var(--accent), var(--warm));
  box-shadow: 0 0 12px rgba(226,58,58,.7);
}
main, .nav, .footer { position: relative; z-index: 1; }

/* ------------------------------------------------------------ buttons */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; gap: .5em;
  padding: .62em 1.15em; border-radius: 10px;
  font-weight: 600; font-size: .95rem; border: 1px solid transparent;
  transition: transform .25s var(--ease), background .2s, border-color .2s, box-shadow .2s;
  cursor: pointer; white-space: nowrap;
}
.btn-lg { padding: .85em 1.5em; font-size: 1.02rem; }
.btn-primary {
  background: linear-gradient(180deg, #EE4646, var(--accent-deep));
  color: #fff;
  box-shadow: 0 8px 30px -8px rgba(226, 58, 58, .6), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -8px rgba(226, 58, 58, .75), inset 0 1px 0 rgba(255,255,255,.2); }
/* A light sweep across the red buttons: on hover, and on its own for the main ones. */
.btn-primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.32) 50%, transparent 70%);
  transform: translateX(-120%);
}
.btn-primary:hover::after { transform: translateX(120%); transition: transform .7s var(--ease); }
.btn-shine::after { animation: shine 5s 2.4s infinite; }
@keyframes shine { 0% { transform: translateX(-120%); } 18%, 100% { transform: translateX(120%); } }
.btn-ghost { border-color: var(--divider); background: rgba(19, 18, 19, .6); backdrop-filter: blur(6px); }
.btn-ghost:hover { border-color: var(--accent); background: var(--card-hover); }
.arrow { display: inline-block; transition: transform .2s; }
.btn:hover .arrow, .pill:hover .arrow { transform: translateX(4px); }

/* ------------------------------------------------------------ nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px max(16px, calc((100vw - var(--max)) / 2));
  transition: background .3s, border-color .3s, backdrop-filter .3s, padding .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(9, 9, 10, .72); backdrop-filter: blur(16px) saturate(140%); border-color: var(--divider); padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .02em; }
.brand img { border-radius: 7px; transition: transform .5s var(--ease); }
.brand:hover img { transform: rotate(-8deg) scale(1.08); }
.nav-links { position: relative; isolation: isolate; display: flex; gap: 2px; margin-left: 20px; }
.nav-links a { padding: 6px 13px; border-radius: 99px; color: var(--txt2); font-size: .93rem; font-weight: 500; transition: color .25s; }
.nav-links a:hover, .nav-links a.active { color: var(--txt); }
/* The pill that slides under the section currently on screen. */
.nav-ind {
  position: absolute; left: 0; top: 0; height: 100%; width: 0; z-index: -1; pointer-events: none;
  border-radius: 99px; background: rgba(226,58,58,.12); border: 1px solid rgba(226,58,58,.3);
  opacity: 0; transition: transform .5s var(--ease), width .5s var(--ease), opacity .3s;
}
.nav-cta { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.burger { display: none; background: none; border: 0; width: 38px; height: 38px; cursor: pointer; position: relative; }
.burger span { position: absolute; left: 9px; right: 9px; height: 2px; background: var(--txt); border-radius: 2px; transition: transform .25s, top .25s; }
.burger span:first-child { top: 14px; }
.burger span:last-child { top: 22px; }
.nav.open .burger span:first-child { top: 18px; transform: rotate(45deg); }
.nav.open .burger span:last-child { top: 18px; transform: rotate(-45deg); }

/* ------------------------------------------------------------ hero: sunrise over a planet
   JS drives four variables: --rise (0 → 1 as the sun comes up on load),
   --scroll (0 → 1 across the hero) and --mx / --my (smoothed mouse, -1 → 1). */
.hero {
  --horizon: clamp(150px, 24vh, 240px);   /* how much planet shows under the limb */
  --pw: max(2600px, 180vw);               /* planet diameter */
  --rise: 1; --scroll: 0; --mx: 0; --my: 0;
  position: relative; overflow: hidden;
  min-height: 100vh; min-height: max(100svh, 720px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 104px 16px calc(var(--horizon) + 96px);
  text-align: center;
}
.space { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.space::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px; z-index: 4; background: linear-gradient(transparent, var(--bg)); }
.space-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 30% 26% at 50% calc(100% - var(--horizon)), rgba(255,150,100,.28), transparent 70%),
    radial-gradient(ellipse 85% 66% at 50% calc(100% - var(--horizon)), rgba(226,58,58,.30), rgba(130,24,36,.12) 45%, transparent 75%);
  opacity: calc(.12 + var(--rise) * .88);
}
.dawn-sun, .dawn-front {
  position: absolute; left: 50%; top: calc(100% - var(--horizon)); width: 0; height: 0;
  transform: translate(calc(var(--mx) * -14px), calc((1 - var(--rise)) * 90px + 8px - var(--scroll) * 170px + var(--my) * -8px));
}
.dawn-sun { z-index: 1; }
.planet { z-index: 2; }
.dawn-front { z-index: 3; }
/* Solid to the edge so it melts into its own glow instead of showing a rim. */
.dawn-core {
  position: absolute; width: 56px; height: 56px; left: -28px; top: -28px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0 45%, #fff1e2 75%, #ffd8b8);
  box-shadow: 0 0 24px 10px #ffd8b8, 0 0 70px 30px rgba(255,170,120,.75), 0 0 160px 70px rgba(255,110,70,.45), 0 0 360px 160px rgba(226,58,58,.26);
}
.dawn-rays {
  position: absolute; width: 1300px; height: 1300px; left: -650px; top: -650px; border-radius: 50%;
  background:
    repeating-conic-gradient(rgba(255,170,120,.16) 0 .7deg, transparent .7deg 7deg),
    repeating-conic-gradient(from 3deg, rgba(255,110,80,.12) 0 1.5deg, transparent 1.5deg 11deg);
  -webkit-mask-image: radial-gradient(circle, #000 4%, transparent 60%);
          mask-image: radial-gradient(circle, #000 4%, transparent 60%);
  opacity: calc(var(--rise) * .9);
  animation: spin 160s linear infinite;
}
.planet {
  position: absolute; left: 50%; top: calc(100% - var(--horizon));
  width: var(--pw); height: var(--pw); border-radius: 50%;
  transform: translate(calc(-50% + var(--mx) * -6px), calc(var(--scroll) * 110px + var(--my) * -3px));
  background:
    radial-gradient(ellipse 20% 6% at 50% 0%, rgba(255,150,110,.30), transparent),
    radial-gradient(ellipse 55% 16% at 50% 0%, rgba(226,58,58,.16), transparent),
    linear-gradient(180deg, #120b0c 0, var(--bg) 16%);
  box-shadow: 0 -2px 22px -6px rgba(255,120,90,.4), 0 -10px 80px -12px rgba(226,58,58,.35);
}
/* The lit edge of the planet: bright where the sun is, fading along the curve. */
.planet::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(ellipse 45% 20% at 50% 0%, #fff6ea, #ffc49a 8%, #ff6a4a 25%, rgba(226,58,58,.6) 55%, rgba(226,58,58,.14));
  -webkit-mask-image: radial-gradient(circle closest-side, transparent calc(100% - 3px), #000 100%);
          mask-image: radial-gradient(circle closest-side, transparent calc(100% - 3px), #000 100%);
  opacity: calc(.35 + var(--rise) * .65);
}
/* Atmosphere: a haze just above the limb. */
.planet::after {
  content: ""; position: absolute; inset: -60px; border-radius: 50%;
  background: radial-gradient(ellipse 32% 15% at 50% 0%, rgba(255,170,120,.85), rgba(255,90,60,.5) 30%, rgba(226,58,58,.22) 65%, rgba(226,58,58,.05));
  -webkit-mask-image: radial-gradient(circle closest-side, transparent calc(100% - 61px), #000 calc(100% - 60px), rgba(0,0,0,.3) calc(100% - 40px), transparent 100%);
          mask-image: radial-gradient(circle closest-side, transparent calc(100% - 61px), #000 calc(100% - 60px), rgba(0,0,0,.3) calc(100% - 40px), transparent 100%);
  opacity: calc(.3 + var(--rise) * .7);
}
.dawn-bloom {
  position: absolute; width: 1100px; height: 230px; left: -550px; top: -115px;
  background: radial-gradient(ellipse closest-side, rgba(255,225,195,.5), rgba(255,140,90,.2) 35%, rgba(226,58,58,.05) 65%, transparent);
  mix-blend-mode: screen; opacity: var(--rise);
}
.dawn-flare {
  position: absolute; width: 1700px; height: 2px; left: -850px; top: -1px;
  background: linear-gradient(90deg, transparent, rgba(255,140,110,.22) 28%, rgba(255,215,190,.8) 47%, #fff 50%, rgba(255,215,190,.8) 53%, rgba(255,140,110,.22) 72%, transparent);
  mix-blend-mode: screen; opacity: calc(var(--rise) * 1.4 - .4);
}
.dawn-flare.soft { height: 16px; top: -8px; filter: blur(7px); opacity: calc(var(--rise) * .55 - .1); }

.hero-copy {
  position: relative; z-index: 2; max-width: 880px;
  transform: translateY(calc(var(--scroll) * -70px)); opacity: calc(1 - var(--scroll) * 1.6);
}
.intro, .hw { animation: rise-in 1.1s var(--ease) both; animation-delay: calc(var(--d, 0) * 1ms); }
.hw { display: inline-block; }
@keyframes rise-in { from { opacity: 0; transform: translateY(32px); filter: blur(10px); } }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 8px 6px 14px; border-radius: 999px; font-size: .85rem; color: var(--txt2);
  background: rgba(19,18,19,.7); border: 1px solid var(--divider); backdrop-filter: blur(8px);
  transition: border-color .25s, background .25s;
}
.pill:hover { border-color: rgba(226,58,58,.5); background: rgba(27,24,25,.8); }
.pill-sep { width: 1px; height: 14px; background: var(--divider); }
.pill-link { color: var(--txt); font-weight: 600; padding: 2px 8px; border-radius: 99px; background: rgba(226,58,58,.14); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(74,222,128,.6); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,.55); } 80%,100% { box-shadow: 0 0 0 9px rgba(74,222,128,0); } }
h1 {
  font-size: clamp(2.8rem, 6.6vw, 5.4rem); line-height: 1.02; letter-spacing: -.04em;
  margin: 22px 0 18px; font-weight: 800;
}
.accent-text {
  background: linear-gradient(100deg, #FF6B5E, var(--accent) 40%, var(--warm) 70%, var(--accent));
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 6s linear infinite;
}
@keyframes sheen { to { background-position: -250% 0; } }
/* The word that changes in the title. */
.rotator { position: relative; white-space: nowrap; text-align: left; transition: width .65s var(--ease); }
.rw { display: inline-block; padding-bottom: .08em; }
.rw.enter { animation: rw-in .75s var(--ease) both; }
.rw.leave { position: absolute; left: 0; top: 0; animation: rw-out .55s var(--ease) both; }
@keyframes rw-in { from { opacity: 0; transform: perspective(500px) translateY(.5em) rotateX(-70deg); filter: blur(8px); } }
@keyframes rw-out { to { opacity: 0; transform: perspective(500px) translateY(-.5em) rotateX(70deg); filter: blur(8px); } }
.lead { font-size: 1.15rem; color: var(--txt2); max-width: 600px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero-stats { list-style: none; padding: 0; margin: 38px 0 0; display: flex; justify-content: center; flex-wrap: wrap; }
.hero-stats li { display: flex; flex-direction: column; padding: 0 34px; }
.hero-stats li + li { border-left: 1px solid var(--divider); }
.hero-stats b { font-size: 1.8rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero-stats span { color: var(--txt2); font-size: .85rem; }
.scroll-hint { position: absolute; left: 50%; bottom: calc(var(--horizon) * .36); z-index: 3; transform: translateX(-50%); opacity: calc(.75 - var(--scroll) * 4); transition: opacity .3s; }
.mouse { display: block; position: relative; width: 22px; height: 34px; border: 2px solid rgba(242,239,239,.35); border-radius: 12px; }
.mouse i { position: absolute; left: 50%; top: 6px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--txt); animation: wheel 1.8s var(--ease) infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(-3px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }
@keyframes float { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-10px) rotate(.6deg); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ module marquee */
.marquee {
  position: relative; padding: 22px 0; overflow: hidden;
  border-block: 1px solid var(--divider); background: rgba(10,10,11,.55);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.mq-row + .mq-row { margin-top: 12px; }
.mq-track { display: flex; gap: 12px; width: max-content; animation: marquee 70s linear infinite; }
.mq-rev .mq-track { animation-direction: reverse; animation-duration: 80s; }
.marquee:hover .mq-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - 6px)); } }
.mq-item {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 99px;
  background: var(--card); border: 1px solid var(--divider); font-weight: 600; font-size: .9rem; white-space: nowrap;
  transition: border-color .25s, background .25s;
}
.mq-item small { font-family: var(--mono); font-size: .66rem; letter-spacing: .08em; color: var(--accent); font-weight: 600; }
.mq-item.farm small { color: var(--warm); }
.mq-item.utils small { color: var(--txt2); }
.mq-item.schem small { color: var(--schem); }
.mq-item:hover { border-color: rgba(226,58,58,.6); background: var(--card-hover); }

/* ------------------------------------------------------------ sections */
.section { max-width: var(--max); margin: 0 auto; padding: 110px 16px 40px; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 52px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font-size: .78rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent);
}
.section-head .eyebrow::before, .section-head .eyebrow::after { content: ""; width: 22px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent)); }
.section-head .eyebrow::after { transform: scaleX(-1); }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); letter-spacing: -.03em; line-height: 1.1; margin: 10px 0 14px; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.section-head p { color: var(--txt2); margin: 0; }

/* ------------------------------------------------------------ reveal */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
/* Headings come in word by word (JS wraps each word). */
.word { display: inline-block; }
.js .reveal .word { opacity: 0; transform: translateY(.55em); filter: blur(8px); transition: opacity .7s var(--ease), transform .7s var(--ease), filter .7s var(--ease); transition-delay: calc(var(--i) * 55ms + 120ms); }
.js .reveal.in .word { opacity: 1; transform: none; filter: none; }

/* ------------------------------------------------------------ app window replica
   Mirrors app/src/panel.rs: sizes, colours and layout are the egui ones.
   The frame around it tilts back and straightens as it scrolls in (--tilt). */
.stage { perspective: 1600px; max-width: 962px; margin: 0 auto; }
.window-frame {
  position: relative; padding: 1px; border-radius: 17px;
  background: conic-gradient(from var(--ang), var(--divider) 0 52%, rgba(226,58,58,.95) 68%, rgba(255,170,120,.95) 74%, rgba(226,58,58,.95) 80%, var(--divider) 94%);
  animation: ang 7s linear infinite;
  box-shadow: 0 50px 120px -40px rgba(0,0,0,.9), 0 30px 100px -50px rgba(226,58,58,.6);
  transform-origin: 50% 100%;
  transform: rotateX(calc(var(--tilt, 0) * 22deg)) scale(calc(1 - var(--tilt, 0) * .06));
}
.window {
  background: var(--bg); border-radius: 16px; overflow: hidden;
  font-size: 12px; user-select: none;
}
.win-title { display: flex; align-items: center; justify-content: space-between; height: 34px; padding: 0 12px; background: var(--sidebar); border-bottom: 1px solid var(--divider); }
.win-brand { display: flex; gap: 8px; align-items: center; font-weight: 600; color: var(--txt2); font-size: 12px; }
.win-brand img { border-radius: 3px; }
.win-buttons { display: flex; gap: 8px; }
.win-buttons span { width: 11px; height: 11px; border-radius: 50%; background: var(--rail); }
.win-buttons .close { background: var(--accent); }
.win-tabs { display: flex; align-items: flex-end; height: 48px; padding: 9px 14px 0; background: var(--sidebar); overflow-x: auto; scrollbar-width: none; }
.win-tabs::-webkit-scrollbar { display: none; }
.win-tabs img { width: 20px; height: 20px; align-self: center; margin: -9px 10px 0 0; border-radius: 4px; }
.win-tab { position: relative; background: none; border: 0; padding: 6px 10px 8px; cursor: pointer; font-weight: 700; font-size: 13px; color: var(--txt2); white-space: nowrap; transition: color .2s; }
.win-tab:hover { color: var(--txt); }
.win-tab.on { color: var(--txt); }
.win-tab.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 2px; background: var(--accent); animation: tabIn .3s var(--ease); }
@keyframes tabIn { from { transform: scaleX(0); } }
.win-body { display: grid; grid-template-columns: 198px 1fr; height: 500px; }
.win-body.wide { grid-template-columns: 1fr; }
.win-side { background: var(--sidebar); padding: 12px 10px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--accent) transparent; }
.mod-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 8px; margin-bottom: 2px; cursor: pointer; color: var(--txt2); font-size: 12.5px; transition: background .15s, color .15s; }
.mod-row:hover { background: rgba(27,24,25,.6); color: var(--txt); }
.mod-row.open { background: var(--card-hover); color: var(--txt); }
.sw { flex: none; position: relative; width: 28px; height: 16px; border-radius: 8px; background: rgba(255,255,255,.1); border: 0; padding: 0; cursor: pointer; transition: background .15s; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform .15s ease; }
.sw.on { background: var(--accent); }
.sw.on::after { transform: translateX(12px); }
/* Until the visitor touches the panel, one switch pulses to show it is live. */
.sw.hint { animation: hint 1.8s ease-out infinite; }
@keyframes hint { 0% { box-shadow: 0 0 0 0 rgba(226,58,58,.75); } 70%, 100% { box-shadow: 0 0 0 9px rgba(226,58,58,0); } }
.tg { flex: none; position: relative; width: 36px; height: 20px; border-radius: 10px; background: rgba(255,255,255,.12); border: 0; padding: 0; cursor: pointer; transition: background .15s; }
.tg::after { content: ""; position: absolute; top: 2.5px; left: 2.5px; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: transform .15s ease; }
.tg.on { background: var(--accent); }
.tg.on::after { transform: translateX(16px); }

.win-main { padding: 14px 18px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--rail) transparent; }
.page-anim { animation: pageIn .3s cubic-bezier(.2,.7,.2,1); }
@keyframes pageIn { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
.mod-title { display: flex; align-items: center; gap: 12px; }
.mod-title h4 { margin: 0; font-size: 19px; font-weight: 700; color: var(--txt); }
.mod-desc { margin: 2px 0 10px; color: var(--txt2); font-size: 12px; }
/* Schematica has no switch (ALWAYS_ON in src/state.rs): it says so instead. */
.always { font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: .06em; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 3px 7px; }
.empty-page { text-align: center; padding-top: 90px; }
.empty-page p { margin: 0 0 6px; color: var(--txt2); font-size: 13px; }
.empty-page small { color: var(--muted); font-size: 11.5px; }
.set-card { background: var(--card); border-radius: 12px; padding: 12px 16px 16px; max-width: 520px; }
.srow { margin-top: 5px; }
.sline { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 22px; }
.slabel { color: var(--txt2); font-size: 12px; }
.sval { color: var(--txt); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.dead .slabel, .dead .sval { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.chip { border: 1px solid var(--divider); background: transparent; border-radius: 8px; padding: 3px 8px; font-size: 10.5px; font-weight: 700; cursor: pointer; color: var(--txt2); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.blk { color: var(--txt); background: var(--card); font-weight: 400; }
.keybtn { min-width: 78px; height: 24px; border: 1px solid var(--divider); background: transparent; border-radius: 9px; font-size: 11px; font-weight: 700; color: var(--txt); cursor: pointer; padding: 0 10px; }
.keybtn.armed { background: var(--accent); border-color: var(--accent); color: #fff; }
.field { width: 100%; margin-top: 3px; background: #060607; border: 1px solid var(--divider); border-radius: 9px; padding: 5px 8px; color: var(--txt); font: inherit; font-size: 11.5px; outline: none; user-select: text; }
.field:focus { border-color: var(--accent); }
.field::placeholder { color: var(--muted); }
.word-row { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.word-row .n { color: var(--muted); font-size: 11px; }
.word-row .w { color: var(--txt); font-size: 12px; flex: 1; }
.word-row .x { background: none; border: 0; color: var(--danger); cursor: pointer; font-size: 11px; padding: 2px 6px; border-radius: 6px; }
.match { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--txt2); font-size: 11px; padding: 3px 6px; border-radius: 6px; cursor: pointer; }
.match:hover { background: var(--card-hover); }
.note { color: var(--muted); font-size: 11px; margin-top: 3px; }
.wbtn { display: block; width: 100%; min-height: 26px; margin-top: 2px; background: var(--card); border: 1px solid var(--divider); border-radius: 8px; color: var(--txt2); font-size: 11.5px; font-weight: 700; cursor: pointer; }
.wbtn.flash { background: var(--accent); border-color: var(--accent); color: #fff; }

/* egui sliders: 18px tall, 6px rail, 7px knob that never leaves the rail */
.rail { position: relative; height: 18px; margin: 2px 7px 0; cursor: ew-resize; touch-action: none; }
.rail .groove { position: absolute; left: -7px; right: -7px; top: 6px; height: 6px; border-radius: 3px; background: var(--rail); }
.rail .fill { position: absolute; top: 6px; height: 6px; border-radius: 3px; background: var(--accent); }
.rail .knob { position: absolute; top: 2px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--accent); }
.rail.dead { cursor: default; }
.rail.dead .fill { background: var(--muted); }
.rail.dead .knob { background: var(--card); box-shadow: inset 0 0 0 2px var(--muted); }

.win-status { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 14px; font-size: 11px; color: var(--txt2); background: var(--sidebar); border-top: 1px solid var(--divider); }
.win-status .sep { width: 1px; height: 12px; background: var(--divider); margin: 0 4px; }
.win-status .grow { flex: 1; }
.ok-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.page-text h4 { margin: 0 0 4px; font-size: 16px; letter-spacing: .04em; }
.page-text > p { color: var(--txt2); margin: 0 0 14px; font-size: 12px; }
.release { background: var(--card); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.release b { color: var(--accent); font-size: 12px; }
.release ul { margin: 6px 0 0; padding-left: 16px; color: var(--txt2); font-size: 12px; }
.cfg { display: flex; align-items: center; justify-content: space-between; background: var(--card); border-radius: 9px; padding: 10px 12px; margin-bottom: 8px; }
.cfg span { color: var(--txt2); font-size: 11px; }

/* config_page() in app/src/panel.rs: a small heading, then a card per group. */
.cfg-page { max-width: 560px; }
.cfg-head { margin: 18px 0 9px; }
.cfg-page > .cfg-head:first-child { margin-top: 0; }
.cfg-head h5 { margin: 0 0 3px; font-size: 10px; letter-spacing: .06em; color: var(--muted); }
.cfg-head p { margin: 0; font-size: 11.5px; color: var(--txt2); }
.cfg-card { background: var(--card); border: 1px solid var(--divider); border-radius: 10px; padding: 11px 14px; margin-bottom: 8px; }
.cfg-row { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.cfg-what b { display: block; font-size: 13px; color: var(--txt); }
.cfg-what small { display: block; font-size: 11px; color: var(--txt2); line-height: 1.45; }
.cfg-right { display: flex; align-items: center; gap: 8px; flex: none; }
.pill-btn { background: transparent; border: 1px solid var(--divider); border-radius: 7px; padding: 3px 8px; font-size: 9.5px; font-weight: 700; letter-spacing: .05em; color: var(--txt2); cursor: pointer; }
.pill-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.onlaunch { font-size: 9.5px; font-weight: 700; letter-spacing: .05em; color: var(--muted); }
.onlaunch.on { color: var(--txt); }
/* The swatch is the browser's colour picker, dressed as the panel's. */
.swatch { width: 30px; height: 22px; padding: 0; border: 1px solid var(--divider); border-radius: 7px; background: transparent; cursor: pointer; }
.swatch::-webkit-color-swatch-wrapper { padding: 2px; }
.swatch::-webkit-color-swatch { border: 0; border-radius: 5px; }
.swatch::-moz-color-swatch { border: 0; border-radius: 5px; }
.cfg-card .srow { margin-top: 11px; }
.cfg-card .wbtn { margin-top: 7px; }

/* ------------------------------------------------------------ in-game preview
   Layers drift with the mouse (--gx / --gy) through `translate`, which leaves
   their own `transform` animations alone. */
.game {
  --gx: 0; --gy: 0;
  position: relative; max-width: 960px; margin: 34px auto 0; aspect-ratio: 16/8.2;
  border-radius: 16px; overflow: hidden; border: 1px solid var(--divider);
  font-family: var(--mono); font-size: 12px; image-rendering: pixelated;
  box-shadow: 0 40px 100px -40px rgba(0,0,0,.9);
}
.sky, .game .sun, .clouds, .hills, .ground { transition: translate .6s var(--ease); }
.sky { position: absolute; inset: -20px; background: linear-gradient(180deg, #1b2440 0%, #5a3a58 42%, #d0644a 66%, #f39a5a 76%); translate: calc(var(--gx) * -3px) calc(var(--gy) * -2px); }
.game .sun { position: absolute; left: 62%; top: 52%; width: 70px; height: 70px; background: #ffd27a; box-shadow: 0 0 80px 30px rgba(255,170,90,.6); animation: sunrise 18s ease-in-out infinite alternate; translate: calc(var(--gx) * -6px) calc(var(--gy) * -4px); }
@keyframes sunrise { from { transform: translateY(30px); } to { transform: translateY(-20px); } }
.clouds {
  position: absolute; left: -40px; top: 5%; width: calc(100% + 720px); height: 26%; opacity: .55;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='110' fill='%23ffd9cc'%3E%3Crect x='20' y='34' width='150' height='16'/%3E%3Crect x='52' y='22' width='84' height='14'/%3E%3Crect x='250' y='72' width='112' height='13'/%3E%3Crect x='278' y='62' width='58' height='11'/%3E%3Crect x='440' y='18' width='176' height='18'/%3E%3Crect x='470' y='6' width='96' height='13'/%3E%3Crect x='556' y='36' width='44' height='8'/%3E%3C/svg%3E") repeat-x 0 0 / 640px 100%;
  animation: clouds 70s linear infinite; translate: calc(var(--gx) * -10px) calc(var(--gy) * -6px);
}
@keyframes clouds { to { transform: translateX(-640px); } }
.hills { position: absolute; left: -30px; right: -30px; bottom: 26%; height: 22%; translate: calc(var(--gx) * -14px) calc(var(--gy) * -5px); background:
  linear-gradient(90deg, transparent 0 8%, #2c1d2b 8% 22%, transparent 22% 30%, #2c1d2b 30% 34%, transparent 34% 52%, #2c1d2b 52% 70%, transparent 70% 78%, #2c1d2b 78% 100%) bottom/100% 60% no-repeat,
  linear-gradient(90deg, #3a2638 0 15%, transparent 15% 40%, #3a2638 40% 60%, transparent 60% 85%, #3a2638 85%) bottom/100% 100% no-repeat; }
.ground { position: absolute; left: -40px; right: -40px; bottom: -10px; height: calc(27% + 10px); translate: calc(var(--gx) * -20px) calc(var(--gy) * -6px); background:
  repeating-linear-gradient(90deg, rgba(0,0,0,.08) 0 24px, transparent 24px 48px),
  linear-gradient(180deg, #4f7a2c 0 14%, #6b4a2b 14% 100%); }
.crosshair { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; transform: translate(-50%,-50%); }
.crosshair::before, .crosshair::after { content: ""; position: absolute; background: rgba(255,255,255,.85); }
.crosshair::before { left: 6px; top: 0; width: 2px; height: 14px; }
.crosshair::after { top: 6px; left: 0; height: 2px; width: 14px; }
/* --hud-s / --list-s come from the panel's APPEARANCE card, like the real
   client's HUD size and ArrayList size. 1em is the frame's own 12px. */
.mc-hud { position: absolute; background: rgba(0,0,0,.45); padding: 8px 10px; color: #fff; text-shadow: 1px 1px 0 #3f3f3f; line-height: 1.55; border-left: 2px solid var(--accent); font-size: calc(1em * var(--hud-s, 1)); }
.mc-hud-title { color: var(--accent); font-weight: 600; margin-bottom: 2px; }
.mc-hud.farm { left: 12px; top: 12px; }
.mc-hud.staff { left: 12px; top: calc(128px * var(--hud-s, 1)); }
.mc-gold { color: #ffaa00; } .mc-green { color: #55ff55; } .mc-red { color: #ff5555; }
.arraylist { position: absolute; right: 0; top: 10px; list-style: none; margin: 0; padding: 0; text-align: right; }
.arraylist li {
  background: rgba(0,0,0,.45); padding: 1px 8px 1px 10px; color: #fff; text-shadow: 1px 1px 0 #3f3f3f;
  border-right: 2px solid var(--accent); margin-left: auto; width: max-content;
  font-size: calc(1em * var(--list-s, 1));
  animation: slideIn .35s cubic-bezier(.2,.8,.2,1);
}
.arraylist li.out { animation: slideOut .3s forwards; }
@keyframes slideIn { from { transform: translateX(110%); } to { transform: none; } }
@keyframes slideOut { to { transform: translateX(110%); opacity: 0; } }
.chat { position: absolute; left: 10px; bottom: 58px; width: 46%; display: flex; flex-direction: column; gap: 2px; }
.chat div { background: rgba(0,0,0,.4); color: #fff; padding: 1px 6px; text-shadow: 1px 1px 0 #3f3f3f; animation: chatIn .3s; }
@keyframes chatIn { from { opacity: 0; transform: translateY(6px); } }
.hotbar { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; border: 2px solid #111; background: rgba(0,0,0,.35); }
.hotbar span { width: 30px; height: 30px; border: 2px solid #8b8b8b; border-color: #555 #aaa #aaa #555; }
.hotbar .sel { outline: 2px solid #fff; outline-offset: -1px; }
.game-label { position: absolute; right: 12px; bottom: 12px; font-family: Inter, sans-serif; font-size: 11px; color: rgba(255,255,255,.7); background: rgba(0,0,0,.35); padding: 3px 9px; border-radius: 99px; }

/* ------------------------------------------------------------ cards that tilt + light up under the cursor */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
/* Four cards: two rows of two before they go one per row. */
@media (max-width: 1060px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
.feature {
  position: relative; background: linear-gradient(180deg, var(--card), rgba(19,18,19,.5));
  border: 1px solid var(--divider); border-radius: var(--radius); padding: 28px;
  transition: opacity .8s var(--ease), transform .4s var(--ease), border-color .3s, box-shadow .3s;
}
.feature::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: 0; transition: opacity .3s; pointer-events: none;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(226,58,58,.14), transparent 60%);
}
.feature::after, .price::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; opacity: 0; transition: opacity .3s; pointer-events: none;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(255,140,100,.95), transparent 65%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.feature:hover { transform: translateY(-6px); border-color: rgba(226,58,58,.35); box-shadow: 0 30px 60px -30px rgba(226,58,58,.4); }
.feature:hover::before, .feature:hover::after, .price:hover::after { opacity: 1; }
.feature-hl { border-color: rgba(226,58,58,.35); }
.feature-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent); margin-bottom: 16px; box-shadow: inset 0 0 0 1px rgba(226,58,58,.25); }
.feature-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--ease); }
.feature:hover .ico-sword svg { transform: rotate(-24deg) scale(1.1); }
.feature:hover .ico-pick svg { animation: chop .55s var(--ease) 2; transform-origin: 15% 85%; }
.feature:hover .ico-eye svg { animation: blink 2.4s ease infinite; }
.feature:hover .ico-layers svg { animation: stack .7s var(--ease); }
@keyframes chop { 50% { transform: rotate(-28deg); } }
@keyframes blink { 0%, 44%, 52%, 100% { transform: none; } 48% { transform: scaleY(.1); } }
@keyframes stack { 40% { transform: translateY(-3px) scale(1.06); } }
.feature h3 { margin: 0 0 8px; font-size: 1.3rem; }
.feature p { color: var(--txt2); margin: 0 0 14px; font-size: .95rem; }
.ticks { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.ticks li { padding-left: 22px; position: relative; margin: 6px 0; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 9px; height: 5px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.feature-in { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--divider); font-size: .8rem; font-weight: 600; color: var(--txt2); }
.feature-in::before { content: "◆ "; color: var(--accent); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; margin-top: 80px; }
.split h3 { font-size: 2rem; margin: 8px 0 12px; letter-spacing: -.02em; }
.split p { color: var(--txt2); }
.split b { color: var(--txt); }
.finder { background: var(--card); border: 1px solid var(--divider); border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px -30px rgba(0,0,0,.8); font-size: .9rem; }
.finder-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--sidebar); border-bottom: 1px solid var(--divider); color: var(--txt2); font-size: .8rem; font-weight: 600; }
.finder-dots { display: flex; gap: 6px; }
.finder-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--rail); }
.finder-search { display: flex; align-items: center; gap: 8px; margin: 12px 14px; padding: 8px 12px; background: var(--bg); border: 1px solid var(--divider); border-radius: 9px; font-family: var(--mono); color: var(--txt); min-height: 38px; }
.finder-search .mag { color: var(--txt2); }
.caret { width: 2px; height: 1em; background: var(--accent); animation: blink-caret 1s steps(1) infinite; }
@keyframes blink-caret { 50% { opacity: 0; } }
.finder-list { list-style: none; margin: 0; padding: 0 6px 6px; }
.finder-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px; transition: opacity .35s, transform .35s, max-height .35s, padding .35s; max-height: 40px; overflow: hidden; }
.finder-list li b { font-weight: 600; font-family: var(--mono); font-size: .82rem; }
.finder-list li span { color: var(--txt2); font-size: .82rem; }
.finder-list li.gone { opacity: 0; transform: translateX(-10px); max-height: 0; padding-top: 0; padding-bottom: 0; }
.finder-empty { text-align: center; color: var(--txt2); max-height: 0; opacity: 0; overflow: hidden; transition: all .35s; }
.finder-empty.show { max-height: 60px; opacity: 1; padding: 14px 0 22px; }

/* ------------------------------------------------------------ install steps */
.steps { position: relative; max-width: 1040px; margin: 0 auto; }
.steps-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps-line { position: absolute; top: 27px; left: calc(100% / 6); right: calc(100% / 6); height: 2px; background: var(--divider); border-radius: 2px; }
.steps-line i { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--warm)); box-shadow: 0 0 12px rgba(226,58,58,.6); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.6s var(--ease) .3s; }
.steps.in .steps-line i { transform: none; }
.step { position: relative; text-align: center; padding: 0 8px; }
.step-n {
  position: relative; display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 18px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--rail);
  font-family: var(--mono); font-weight: 600; color: var(--txt2);
  transition: border-color .5s, color .5s, box-shadow .5s;
}
.steps.in .step-n { border-color: var(--accent); color: var(--txt); box-shadow: 0 0 0 6px rgba(226,58,58,.08), 0 0 30px rgba(226,58,58,.45); }
.steps.in .step:nth-child(1) .step-n { transition-delay: .3s; }
.steps.in .step:nth-child(2) .step-n { transition-delay: 1s; }
.steps.in .step:nth-child(3) .step-n { transition-delay: 1.7s; }
.step h3 { margin: 0 0 6px; font-size: 1.15rem; }
.step p { margin: 0 auto 18px; color: var(--txt2); font-size: .93rem; max-width: 290px; }
.step-mock {
  display: flex; align-items: center; justify-content: center; gap: 9px; max-width: 270px; min-height: 52px; margin: 0 auto;
  padding: 10px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--divider); font-size: .85rem;
}
.step-mock b { font-family: var(--mono); font-weight: 600; font-size: .8rem; }
.step-mock > span:last-child:not(.inj) { color: var(--txt2); font-size: .8rem; }
.step-mock img { border-radius: 4px; }
.step-mock.inject { padding: 8px; }
.inj {
  position: relative; overflow: hidden; display: grid; place-items: center; width: 100%; height: 34px;
  border-radius: 9px; background: var(--accent); color: #fff; font-weight: 700; font-size: .85rem; transition: background .4s, color .4s;
}
.inj::before { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.22); transform: scaleX(0); transform-origin: 0 50%; }
.inj > span { grid-area: 1 / 1; position: relative; transition: opacity .25s; }
.inj .t-ing, .inj .t-done { opacity: 0; }
.inject.loading .inj::before { transform: scaleX(1); transition: transform 1.4s cubic-bezier(.5,0,.3,1); }
.inject.loading .t-go { opacity: 0; }
.inject.loading .t-ing { opacity: 1; }
.inject.done .inj { background: rgba(74,222,128,.14); color: var(--ok); }
.inject.done .inj::before { opacity: 0; }
.inject.done .t-ing { opacity: 0; }
.inject.done .t-done { opacity: 1; }

/* ------------------------------------------------------------ timeline (the line fills as you scroll: --p) */
.timeline { --p: 1; max-width: 760px; margin: 0 auto; position: relative; padding-left: 30px; }
.timeline::before, .timeline::after { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; }
.timeline::before { background: var(--divider); }
.timeline::after { background: linear-gradient(var(--warm), var(--accent)); box-shadow: 0 0 10px rgba(226,58,58,.6); transform-origin: 50% 0; transform: scaleY(var(--p)); }
.tl-item { position: relative; margin-bottom: 26px; }
.tl-item::before { content: ""; position: absolute; left: -29px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); box-shadow: 0 0 14px rgba(226,58,58,.6); z-index: 1; transition: border-color .4s, box-shadow .4s; }
.tl-item.dim::before { border-color: var(--rail); box-shadow: none; }
.tl-item .date { font-family: var(--mono); color: var(--accent); font-weight: 600; font-size: .9rem; }
.tl-item .tag { margin-left: 10px; padding: 2px 8px; border-radius: 99px; font-size: .7rem; font-weight: 700; letter-spacing: .06em; color: #fff; background: var(--accent); vertical-align: 2px; }
.tl-card { background: var(--card); border: 1px solid var(--divider); border-radius: 12px; padding: 16px 20px; margin-top: 8px; transition: border-color .3s; }
.tl-card:hover { border-color: rgba(226,58,58,.35); }
.tl-card ul { margin: 0; padding-left: 18px; color: var(--txt2); font-size: .93rem; }
.tl-card li { margin: 5px 0; }
.tl-card li b { color: var(--txt); }

/* ------------------------------------------------------------ pricing */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 980px; margin: 0 auto; align-items: stretch; }
/* Single offer: just the month and lifetime cards. */
.price-grid.duo { max-width: 760px; }
@media (min-width: 961px) { .price-grid.duo { grid-template-columns: repeat(2, 1fr); } }
.price {
  position: relative; background: var(--card); border: 1px solid var(--divider); border-radius: 18px; padding: 30px 26px;
  display: flex; flex-direction: column;
  transition: opacity .8s var(--ease), transform .4s var(--ease), border-color .3s, box-shadow .3s;
}
.price:hover { transform: translateY(-6px); border-color: rgba(226,58,58,.35); }
.price.best { border-color: transparent; background: linear-gradient(180deg, rgba(226,58,58,.13), var(--card) 45%); box-shadow: 0 30px 80px -30px rgba(226,58,58,.55); }
/* The best plan gets a border of light that runs around it. */
.price.best::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--ang), var(--accent), var(--warm) 12%, rgba(226,58,58,.25) 30%, rgba(226,58,58,.25) 50%, var(--accent) 62%, var(--warm) 74%, rgba(226,58,58,.25) 90%, var(--accent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: ang 5s linear infinite;
}
.price .badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); z-index: 1; background: linear-gradient(90deg, var(--accent), #F0584A); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .08em; padding: 4px 12px; border-radius: 99px; white-space: nowrap; box-shadow: 0 6px 20px -4px rgba(226,58,58,.7); }
/* "AUBE" small and quiet, the version (PVP / FARM / COMPLET) big and red. */
.price h3 { display: flex; align-items: baseline; gap: .5em; margin: 0; font-size: 1rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--txt2); }
.price h3 em {
  font-style: normal; font-size: 1.85rem; letter-spacing: .02em; line-height: 1.1;
  background: linear-gradient(100deg, #FF6B5E, var(--accent) 50%, var(--warm));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(226,58,58,.35));
}
.price .amount { font-size: 2.8rem; font-weight: 800; letter-spacing: -.03em; margin: 10px 0 2px; font-variant-numeric: tabular-nums; }
.price .amount small { font-size: 1rem; color: var(--txt2); font-weight: 500; letter-spacing: 0; }
.price .note { color: var(--txt2); font-size: .88rem; margin-bottom: 20px; }
.price .save { margin: -14px 0 20px; font-size: .85rem; font-weight: 600; color: var(--ok); }
.price .save s { color: var(--txt2); font-weight: 500; }
.price ul { list-style: none; padding: 0; margin: 0 0 26px; flex: 1; }
.price li { padding: 7px 0 7px 24px; position: relative; font-size: .93rem; border-top: 1px solid var(--divider); animation: perkIn .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes perkIn { from { opacity: 0; transform: translateX(-8px); } }

/* Au mois / À vie: the red pill slides under the chosen one. */
.period { position: relative; isolation: isolate; display: flex; width: max-content; max-width: 100%; margin: -18px auto 40px; padding: 4px; border-radius: 99px; background: var(--card); border: 1px solid var(--divider); }
.period-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 20px; border: 0; border-radius: 99px; background: none; font-weight: 600; font-size: .92rem; color: var(--txt2); cursor: pointer; transition: color .3s; }
.period-btn:hover { color: var(--txt); }
.period-btn.on { color: #fff; }
.period-ind {
  position: absolute; left: 0; top: 4px; bottom: 4px; width: 0; z-index: -1; border-radius: 99px;
  background: linear-gradient(180deg, #EE4646, var(--accent-deep)); box-shadow: 0 6px 20px -6px rgba(226,58,58,.7);
  transition: transform .45s var(--ease), width .45s var(--ease);
}
.period-tag { font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: rgba(74,222,128,.14); color: var(--ok); transition: background .3s, color .3s; }
.period-btn.on .period-tag { background: rgba(255,255,255,.18); color: #fff; }
.price li::before { content: ""; position: absolute; left: 3px; top: 1.05em; width: 9px; height: 5px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.price .btn { justify-content: center; }
.price li b { color: var(--accent); }

/* ------------------------------------------------------------ faq */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: var(--card); border: 1px solid var(--divider); border-radius: 12px; margin-bottom: 10px; transition: border-color .25s, background .25s; }
.faq details:hover { border-color: rgba(226,58,58,.25); }
.faq details[open] { border-color: rgba(226,58,58,.45); background: linear-gradient(180deg, rgba(226,58,58,.05), var(--card)); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 50px 16px 20px; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 1.4rem; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details.closing summary::after { transform: translateY(-50%); }
.faq-a { overflow: hidden; }
.faq-a p { margin: 0; padding: 0 20px 18px; color: var(--txt2); }

/* ------------------------------------------------------------ cta: a second, smaller sunrise */
.cta {
  max-width: 860px; margin: 110px auto 0; padding: 60px 24px 150px; text-align: center;
  border-radius: 24px; position: relative; overflow: hidden; isolation: isolate;
  background: var(--card); border: 1px solid var(--divider);
}
.cta > :not(.cta-scene) { position: relative; z-index: 1; }
.cta-scene { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.cta-glow { position: absolute; inset: 0; background: radial-gradient(ellipse 70% 60% at 50% calc(100% - 64px), rgba(226,58,58,.38), rgba(130,24,36,.12) 50%, transparent 75%); opacity: .3; transition: opacity 2s var(--ease) .3s; }
.cta-sun {
  position: absolute; left: 50%; top: calc(100% - 64px); width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0 45%, #fff1e2 75%, #ffd8b8);
  box-shadow: 0 0 18px 8px #ffd8b8, 0 0 54px 24px rgba(255,170,120,.7), 0 0 130px 56px rgba(255,110,70,.42), 0 0 280px 120px rgba(226,58,58,.26);
  transform: translateY(70px); transition: transform 2.6s var(--ease) .3s;
}
.cta-planet {
  position: absolute; left: 50%; top: calc(100% - 64px); width: 1800px; height: 1800px; margin-left: -900px; border-radius: 50%;
  background: radial-gradient(ellipse 20% 6% at 50% 0%, rgba(255,150,110,.25), transparent), linear-gradient(180deg, #160d0e, var(--card) 8%);
  box-shadow: 0 -2px 18px -4px rgba(255,120,90,.5), 0 -10px 60px -10px rgba(226,58,58,.45);
}
.cta-planet::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(ellipse 40% 18% at 50% 0%, #fff6ea, #ffc49a 8%, #ff6a4a 25%, rgba(226,58,58,.55) 55%, rgba(226,58,58,.15));
  -webkit-mask-image: radial-gradient(circle closest-side, transparent calc(100% - 2.5px), #000 100%);
          mask-image: radial-gradient(circle closest-side, transparent calc(100% - 2.5px), #000 100%);
}
.cta.in .cta-sun { transform: translateY(6px); }
.cta.in .cta-glow { opacity: 1; }
.cta img { margin: 0 auto 10px; border-radius: 14px; animation: float 6s ease-in-out infinite; box-shadow: 0 20px 50px -14px rgba(226,58,58,.6); }
.cta p { color: var(--txt2); margin: 0 0 26px; }
.footer { max-width: var(--max); margin: 80px auto 0; padding: 30px 16px 40px; border-top: 1px solid var(--divider); display: flex; flex-wrap: wrap; gap: 10px 30px; align-items: center; justify-content: space-between; font-size: .85rem; color: var(--txt2); }
.footer p { margin: 0; }
.muted { color: var(--muted); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 960px) {
  .price-grid { grid-template-columns: 1fr; }
  .price.best { order: -1; }
  .split { grid-template-columns: 1fr; }
  .steps-list { grid-template-columns: 1fr; gap: 34px; }
  .steps-line { display: none; }
}
@media (max-width: 820px) {
  .nav-links { position: fixed; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; margin: 0; padding: 8px 16px 16px; background: rgba(9,9,10,.97); border-bottom: 1px solid var(--divider); transform: translateY(-120%); transition: transform .3s; z-index: -1; }
  .nav.open .nav-links { transform: none; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--divider); border-radius: 0; }
  .nav-ind { display: none; }
  .nav-cta .btn-ghost { display: none; }
  .burger { display: block; }
}
@media (max-width: 680px) {
  body { font-size: 15px; }

  /* hero: a smaller planet so the curve still reads on a phone */
  .hero { --pw: 1150px; --horizon: 130px; padding: 92px 16px calc(var(--horizon) + 40px); min-height: 100vh; min-height: 100svh; }
  .dawn-rays { width: 800px; height: 800px; left: -400px; top: -400px; }
  .dawn-core { width: 50px; height: 50px; left: -25px; top: -25px; }
  .dawn-bloom { width: 600px; left: -300px; }
  .pill { font-size: .78rem; }
  h1 { font-size: clamp(2.3rem, 11.5vw, 3rem); margin: 18px 0 14px; }
  .lead { font-size: 1rem; margin-bottom: 24px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
  .hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 28px; }
  .hero-stats li, .hero-stats li + li { background: rgba(19,18,19,.75); border: 1px solid var(--divider); border-radius: 12px; padding: 10px 6px; align-items: center; backdrop-filter: blur(6px); }
  .hero-stats b { font-size: 1.35rem; }
  .hero-stats span { font-size: .72rem; text-align: center; line-height: 1.3; }
  .scroll-hint { display: none; }

  .marquee { padding: 16px 0; }
  .mq-item { font-size: .82rem; padding: 7px 13px; }

  .section { padding: 72px 16px 16px; }
  .section-head { margin-bottom: 30px; }
  h2 { font-size: clamp(1.75rem, 8vw, 2.2rem); }

  /* panel replica: tabs and modules become swipeable strips with a fade
     on the edge, so it is obvious there is more to the side */
  .window-frame { border-radius: 13px; transform: rotateX(calc(var(--tilt, 0) * 12deg)); }
  .window { border-radius: 12px; }
  .win-title { height: 30px; }
  .win-tabs { height: 44px; padding: 8px 10px 0; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .win-tabs img { display: none; }
  .win-tab { font-size: 12px; padding: 6px 9px 8px; }
  .win-body { grid-template-columns: 1fr; height: auto; }
  .win-side { display: flex; gap: 6px; overflow-x: auto; padding: 10px; scroll-snap-type: x proximity; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .win-side::-webkit-scrollbar { display: none; }
  .mod-row { flex: none; margin: 0; background: var(--card); scroll-snap-align: start; padding: 8px 10px; }
  .mod-row:last-child { margin-right: 40px; }
  .win-main { height: 430px; padding: 12px 12px 16px; }
  .mod-title h4 { font-size: 17px; }
  .set-card { padding: 10px 12px 14px; }
  .sline { min-height: 26px; }
  .tg { width: 40px; height: 22px; }
  .tg::after { width: 17px; height: 17px; }
  .tg.on::after { transform: translateX(18px); }
  .rail { height: 24px; }
  .rail .groove, .rail .fill { top: 9px; }
  .rail .knob { top: 4px; width: 16px; height: 16px; margin-left: -8px; }
  .win-status { font-size: 10px; }

  /* in-game preview: taller frame, smaller HUD text, nothing on top of the hotbar */
  .game { aspect-ratio: 4/5; font-size: 10px; margin-top: 20px; border-radius: 12px; }
  .mc-hud { padding: 5px 7px; line-height: 1.45; }
  .mc-hud.staff { top: calc(96px * var(--hud-s, 1)); left: 8px; }
  .mc-hud.farm { top: 8px; left: 8px; }
  .arraylist { top: 8px; }
  .arraylist li { padding: 0 6px 0 7px; }
  .chat { width: 82%; left: 8px; bottom: 46px; }
  .hotbar span { width: 22px; height: 22px; }
  .game-label { display: none; }

  .feature-grid { grid-template-columns: 1fr; }
  .feature { padding: 22px; }
  .split { margin-top: 56px; gap: 26px; }
  .split h3 { font-size: 1.6rem; }

  .timeline { padding-left: 24px; }
  .timeline::before, .timeline::after { left: 5px; }
  .tl-item::before { left: -25px; }
  .tl-card { padding: 14px 16px; }

  .period { margin: 0 auto 30px; }
  .period-btn { padding: 9px 16px; }
  .price { padding: 26px 20px; }
  .price .amount { font-size: 2.4rem; }

  .faq summary { padding: 14px 44px 14px 16px; font-size: .95rem; }
  .faq-a p { padding: 0 16px 16px; }

  .cta { margin: 72px 16px 0; padding: 44px 20px 130px; }
  .footer { flex-direction: column; text-align: center; gap: 12px; padding-bottom: 96px; }
  .footer-links { justify-content: center; }
}

/* ------------------------------------------------------------ phone buy bar */
.mbar { display: none; }
@media (max-width: 820px) {
  .mbar {
    display: flex; align-items: center; gap: 12px;
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 60; padding: 10px 10px 10px 14px; border-radius: 14px;
    background: rgba(19, 18, 19, .92); backdrop-filter: blur(14px); border: 1px solid var(--divider);
    box-shadow: 0 20px 50px -10px rgba(0,0,0,.8);
    transform: translateY(140%); transition: transform .35s cubic-bezier(.2,.8,.2,1);
  }
  .mbar.show { transform: none; }
  .mbar img { width: 30px; height: 30px; border-radius: 8px; }
  .mbar div { flex: 1; line-height: 1.25; }
  .mbar b { display: block; font-size: .9rem; }
  .mbar span { font-size: .75rem; color: var(--txt2); }
  .mbar .btn { padding: .6em 1em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .reveal .word { opacity: 1; transform: none; filter: none; }
  .cursor-glow { display: none; }
  html { scroll-behavior: auto; }
}

/* Grid children default to min-width:auto, which lets one long unbreakable row
   (the tab strip, the module chips) push the whole page wider than the phone. */
.win-body > *, .split > *, .feature-grid > *, .price-grid > *, .steps-list > * { min-width: 0; }

/* ------------------------------------------------------------ footer links */
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: var(--txt2); transition: color .2s; }
.footer-links a:hover { color: var(--txt); }

/* ------------------------------------------------------------ tabs
   One page at a time, the one the address names (js/main.js, route()). Without
   the script every page shows, one under the other, as the site used to. */
.js .page:not(.on) { display: none; }
.page.on { animation: page-in .6s var(--ease); }
@keyframes page-in { from { opacity: 0; transform: translateY(16px); } }
/* Six tabs and two buttons: between the phone menu and a wide screen, the
   Discord button (in the CTA and the footer anyway) makes room for them. */
@media (max-width: 1100px) and (min-width: 821px) {
  .nav-links { margin-left: 4px; }
  .nav-links a { padding: 6px 10px; font-size: .88rem; }
  .nav-cta .btn-ghost { display: none; }
}

/* ------------------------------------------------------------ patch notes: search */
.pn-tools { max-width: 760px; margin: 0 auto 30px; display: flex; align-items: center; gap: 14px; }
.pn-search {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px;
  background: var(--card); border: 1px solid var(--divider); border-radius: 12px; cursor: text;
  transition: border-color .25s, box-shadow .25s;
}
.pn-search:focus-within { border-color: rgba(226,58,58,.55); box-shadow: 0 0 0 4px rgba(226,58,58,.12); }
.pn-search .mag { color: var(--txt2); font-size: 1.1rem; }
.pn-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--txt); font: inherit; font-size: .95rem; }
.pn-search input::placeholder { color: var(--muted); }
.pn-count { font-family: var(--mono); font-size: .8rem; color: var(--txt2); white-space: nowrap; }
.pn-empty { display: none; max-width: 760px; margin: 0 auto; text-align: center; color: var(--txt2); }
.pn-empty.show { display: block; }

@media (max-width: 680px) {
  .pn-tools { flex-direction: column; align-items: stretch; gap: 8px; }
  .pn-count { text-align: right; }
}

/* ------------------------------------------------------------ schematica showcase
   A wall being built: the blocks still to place are the hologram's blue, and
   they turn solid as the Printer gets to them. */
.holo {
  position: relative; aspect-ratio: 16/11; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--divider); font-family: var(--mono); font-size: 11px;
  background: linear-gradient(180deg, #121a2e 0%, #2a2440 54%, #4a3042 78%, #5d3a34 100%);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.8);
}
.holo-wall {
  position: absolute; left: 50%; bottom: 11%; transform: translateX(-50%);
  display: grid; grid-template-columns: repeat(16, 1fr); gap: 2px;
  width: 72%; aspect-ratio: 16/9;
}
.holo-wall i {
  border-radius: 1px; background: rgba(89,154,255,.16); box-shadow: inset 0 0 0 1px rgba(89,154,255,.75);
  transition: background .25s, box-shadow .25s;
}
.holo-wall i.void { background: none; box-shadow: none; }
/* In the way: a block that is there but is not the one the schematic wants. */
.holo-wall i.wrong { background: rgba(255,64,64,.2); box-shadow: inset 0 0 0 1px rgba(255,64,64,.8); }
/* Placed: the block itself, lit from above like the game's own shading. */
.holo-wall i.set { background: linear-gradient(180deg, #9a9a93, #6f6f69); box-shadow: inset 0 -2px 0 rgba(0,0,0,.25); }
.holo-hud {
  position: absolute; left: 10px; top: 10px; z-index: 2; padding: 7px 9px; line-height: 1.5;
  background: rgba(0,0,0,.45); color: #fff; text-shadow: 1px 1px 0 #3f3f3f; border-left: 2px solid var(--accent);
}
.holo-label { position: absolute; right: 10px; bottom: 9px; font-family: Inter, sans-serif; font-size: 11px; color: rgba(255,255,255,.7); background: rgba(0,0,0,.3); padding: 3px 9px; border-radius: 99px; }

/* ------------------------------------------------------------ locked module preview */
.locked { position: relative; max-width: 520px; border-radius: 12px; overflow: hidden; }
.locked-blur { filter: blur(6px); opacity: .7; min-height: 230px; pointer-events: none; user-select: none; transform: scale(1.02); }
.locked-over {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 20px; text-align: center;
  background: radial-gradient(ellipse at center, rgba(9,9,10,.78) 0%, rgba(9,9,10,.45) 70%);
}
.locked-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); font-size: 18px; margin-bottom: 4px; }
.locked-over b { font-size: 15px; color: var(--txt); }
.locked-over p { margin: 0 0 8px; color: var(--txt2); font-size: 12px; max-width: 300px; }
.locked-over .btn { font-size: 12.5px; padding: .55em 1.1em; }
.sk-row { padding: 7px 0; }
.sk-line { display: flex; align-items: center; justify-content: space-between; }
.sk-label { height: 9px; border-radius: 5px; background: var(--rail); }
.sk-val { width: 44px; height: 9px; border-radius: 5px; background: var(--rail); }
.sk-toggle { width: 36px; height: 20px; border-radius: 10px; background: var(--accent); opacity: .7; }
.sk-rail { height: 6px; margin-top: 10px; border-radius: 3px; background: var(--rail); }
.sk-rail span { display: block; height: 100%; border-radius: 3px; background: var(--accent); }

/* ------------------------------------------------------------ film */
.film { max-width: 1040px; margin: 0 auto; display: grid; gap: 18px; justify-items: center; }
.film-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  background: #000; border: 1px solid var(--divider);
  box-shadow: 0 30px 90px rgba(0,0,0,.6), 0 0 80px rgba(226,58,58,.12);
}
.film-frame video { display: block; width: 100%; height: 100%; object-fit: cover; background: #000; }
