/* Shared styles for every page. Colours are tokens: light values on :root, dark values redefined below. */
:root {
  --bg: #ECEDE8; --surface: #F7F7F3; --ink: #1F2622; --muted: #59625B; --line: #CDD0C8;
  --moss: #3F6B2F; --moss-deep: #2C4D20; --moss-ink: #FFFFFF; --lantern: #E2A93B; --lantern-ink: #1F2622;
  --stone-1: #B9BDB3; --stone-2: #A3A89D; --stone-3: #8D9388; --stone-hi: #D4D7CF; --mortar: #6F756B; --hole: #4B5048;
  --cloud: #FBFBF8; --sun: #E2A93B;
  --console-bg: #1B211D; --console-fg: #D5DBD0; --console-dim: #8A9488; --console-green: #8FBF6A;
  --display: "Sora", system-ui, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --stone-radius: 10px 14px 11px 15px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161A17; --surface: #1E2420; --ink: #E6E9E2; --muted: #9BA39A; --line: #333A34;
    --moss: #8FBF6A; --moss-deep: #5E8A42; --moss-ink: #10140F;
    --stone-1: #4A5049; --stone-2: #3F453F; --stone-3: #353B35; --stone-hi: #5F665E; --mortar: #232823; --hole: #101310;
    --cloud: #222823; --sun: #D9DDD3;
    --console-bg: #0F1310; --console-dim: #7C867B;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #161A17; --surface: #1E2420; --ink: #E6E9E2; --muted: #9BA39A; --line: #333A34;
  --moss: #8FBF6A; --moss-deep: #5E8A42; --moss-ink: #10140F;
  --stone-1: #4A5049; --stone-2: #3F453F; --stone-3: #353B35; --stone-hi: #5F665E; --mortar: #232823; --hole: #101310;
  --cloud: #222823; --sun: #D9DDD3;
  --console-bg: #0F1310; --console-dim: #7C867B;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.55 var(--body); transition: background-color .5s, color .5s; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--moss); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; line-height: 1.05; }
h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); font-weight: 800; letter-spacing: -0.035em; }
h1 em { font-style: normal; color: var(--moss); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0; }
section { scroll-margin-top: 84px; }

.wrap { max-width: 1120px; margin-inline: auto; padding-inline: 20px; }
.section { padding-block: 72px; display: grid; gap: 36px; }
.head { display: grid; gap: 12px; }
.lede { color: var(--muted); max-width: 60ch; }
.label { font: 600 0.78rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

/* buttons press down like a block being pushed in */
.btn {
  display: inline-block; padding: 12px 20px; border-radius: var(--stone-radius); cursor: pointer;
  font: 600 1rem var(--body); text-decoration: none; text-align: center; border: 2px solid var(--moss);
  background: var(--moss); color: var(--moss-ink); box-shadow: 0 4px 0 var(--moss-deep);
  transition: transform .08s, box-shadow .08s, filter .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--moss-deep); }
.btn.quiet { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: 0 4px 0 var(--line); }
.btn.quiet:active { box-shadow: 0 1px 0 var(--line); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; transform: none; }

/* small shared pieces used by the panel, order and document pages */
.page-title { font-size: clamp(1.5rem, 4vw, 2.4rem); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.notice { padding: 10px 14px; border: 1px dashed var(--line); border-radius: var(--stone-radius); color: var(--muted); font-size: 0.92rem; }
.note { color: var(--muted); font-size: 0.92rem; }
.stack { display: grid; gap: 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-content: start; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.card h2 { font-size: 1.25rem; letter-spacing: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.card-head > div { display: grid; gap: 4px; min-width: 0; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.form-field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.control { width: 100%; padding: 10px 12px; background: var(--bg); border: 2px solid var(--line); border-radius: var(--stone-radius); color: var(--ink); font: 500 1rem var(--body); transition: border-color .15s; }
.control:focus { border-color: var(--moss); outline: none; }
.card .field { background: var(--bg); }
.card .field input { text-align: left; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--moss); }
.mini { font: 600 0.8rem var(--body); padding: 5px 11px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; }
.mini:hover { color: var(--ink); border-color: var(--muted); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot-links a { font-weight: 500; text-decoration: none; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 700px) { .fields { grid-template-columns: minmax(0, 1fr); } }

/* header */
header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); }
header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-block: 14px; }
.mark { font: 800 1.35rem var(--display); letter-spacing: -0.03em; text-decoration: none; }
.mark span { color: var(--moss); }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
nav a:not(.btn) { text-decoration: none; color: var(--muted); font-weight: 500; }
nav a:not(.btn):hover, nav a[aria-current] { color: var(--ink); }
nav .btn { padding: 8px 14px; }

/* sky */
.hero-zone { position: relative; overflow: hidden; }
.sky { position: absolute; inset: 0; pointer-events: none; }
.sun { position: absolute; right: 9%; top: 22px; width: 52px; height: 52px; background: var(--sun); transition: background-color .5s; animation: glow 5s ease-in-out infinite; }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--sun) 22%, transparent); } 50% { box-shadow: 0 0 0 16px color-mix(in srgb, var(--sun) 12%, transparent); } }
.cloud { position: absolute; left: 0; width: 140px; height: 26px; background: var(--cloud); transition: background-color .5s; animation: drift linear infinite; }
.cloud::before { content: ""; position: absolute; left: 28px; top: -22px; width: 70px; height: 22px; background: inherit; }
.cloud::after { content: ""; position: absolute; left: 56px; top: 26px; width: 56px; height: 14px; background: inherit; }
.c1 { top: 60px; animation-duration: 95s; animation-delay: -22s; }
.c2 { top: 190px; scale: .7; animation-duration: 140s; animation-delay: -95s; }
.c3 { top: 330px; scale: 1.25; animation-duration: 115s; animation-delay: -60s; }
@keyframes drift { from { transform: translateX(-220px); } to { transform: translateX(110vw); } }

/* hero */
.hero { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; padding-block: 84px 72px; }
.hero > * { min-width: 0; }
.hero-copy { display: grid; gap: 22px; justify-items: start; }
.hero-copy > * { animation: rise .7s both; }
.hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3) { animation-delay: .16s; }
.hero-copy > :nth-child(4) { animation-delay: .24s; }
@keyframes rise { from { opacity: .25; transform: translateY(16px); } }
.in { animation: rise .6s both; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.namer { display: grid; gap: 6px; max-width: 100%; }
.field { display: flex; align-items: center; max-width: 100%; background: var(--surface); border: 2px solid var(--line); border-radius: var(--stone-radius); padding-right: 14px; font-family: var(--mono); transition: border-color .15s; }
.field:focus-within { border-color: var(--moss); }
.field input { flex: 1; min-width: 0; width: 13ch; padding: 11px 2px 11px 14px; border: 0; background: transparent; color: var(--ink); font: 600 1rem var(--mono); text-align: right; outline: none; }
.field b { color: var(--moss); font-weight: 600; white-space: nowrap; }

/* console (used on the home page and the panel) */
.console { background: var(--console-bg); color: var(--console-fg); border-radius: 14px; overflow: hidden; font-family: var(--mono); font-size: 0.8rem; box-shadow: 0 18px 40px -22px #000a; }
.hero .console { animation: rise .8s .15s both; }
.console-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 10px 14px; color: var(--console-dim); border-bottom: 1px solid #ffffff1a; }
.console-bar b { color: var(--console-green); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.log { height: calc(9 * 1.7em + 20px); padding: 10px 14px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; line-height: 1.7; }
.log .l { overflow-wrap: anywhere; animation: line .25s both; }
@keyframes line { from { opacity: 0; transform: translateY(5px); } }
.console .t { color: var(--console-dim); }
.console .ok { color: var(--lantern); }
.console .join { color: var(--console-green); }
.prompt { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-top: 1px solid #ffffff1a; }
.prompt label { color: var(--console-green); font-weight: 600; }
.prompt input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--console-fg); font: inherit; padding: 4px 0; outline: none; }
.prompt input::placeholder { color: var(--console-dim); }
.prompt:focus-within { box-shadow: inset 3px 0 0 var(--lantern); }
.address { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-top: 1px solid #ffffff1a; }
.address code { font: 600 0.95rem var(--mono); overflow-wrap: anywhere; }
.address button { font: 600 0.8rem var(--body); padding: 6px 12px; border-radius: 8px; border: 1px solid #ffffff40; background: transparent; color: var(--console-fg); cursor: pointer; }
.address button:hover { background: #ffffff1a; }
.address button:focus-visible { outline-color: var(--lantern); }

/* wall */
#wall { display: block; width: 100%; height: 200px; background: var(--mortar); }
.wall-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 20px; padding-block: 10px; font: 400 0.82rem var(--mono); color: var(--muted); }
.wall-note b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* software strip */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: 16px; }
.track { display: flex; width: max-content; animation: slide 45s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.set { display: flex; gap: 14px; margin: 0; padding: 0 14px 0 0; list-style: none; }
.set li { font: 600 0.85rem var(--mono); padding: 7px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--stone-radius); white-space: nowrap; }
.set li:nth-child(3n) { border-radius: 14px 10px 15px 11px; }
@keyframes slide { to { transform: translateX(-50%); } }

/* features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 40px; }
.feature { display: grid; gap: 8px; align-content: start; min-width: 0; }
.feature::before { content: ""; width: 26px; height: 20px; background: var(--stone-2); border-radius: 7px 10px 8px 11px; margin-bottom: 4px; transition: transform .25s cubic-bezier(.3, 1.8, .5, 1), background-color .25s; }
.feature:nth-child(3n+2)::before { border-radius: 10px 7px 11px 8px; }
.feature:nth-child(3n)::before { background: var(--stone-3); border-radius: 8px 11px 7px 10px; }
.feature:hover::before { transform: translateY(-5px) rotate(-10deg); background: var(--moss); }
.feature p { color: var(--muted); }
.feature:nth-child(3n+2) { animation-delay: .06s; }
.feature:nth-child(3n) { animation-delay: .12s; }

/* plan finder */
.finder { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 20px 36px; align-items: end; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.finder > * { min-width: 0; }
.seg { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.seg legend { padding: 0; margin-bottom: 10px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 8px 14px; border: 2px solid var(--line); border-radius: var(--stone-radius); font-weight: 500; transition: background-color .15s, border-color .15s, color .15s; }
.seg input:checked + span { background: var(--moss); border-color: var(--moss); color: var(--moss-ink); }
.seg input:focus-visible + span { outline: 3px solid var(--moss); outline-offset: 3px; }
.range { display: grid; gap: 10px; }
.range output { color: var(--ink); font-variant-numeric: tabular-nums; }
.range input { width: 100%; accent-color: var(--moss); }
.need { display: grid; gap: 4px; }
.need b { font: 800 1.9rem var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1; }

.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.plan { position: relative; display: grid; gap: 12px; align-content: start; min-width: 0; padding: 22px; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; transition: transform .2s, border-color .2s, box-shadow .2s; }
.plan:hover { transform: translateY(-4px); }
.plan.pick { border-color: var(--moss); transform: translateY(-8px); box-shadow: 0 16px 30px -20px var(--moss-deep); }
.tag { display: none; position: absolute; top: -13px; left: 18px; padding: 3px 10px; background: var(--moss); color: var(--moss-ink); font: 600 0.72rem var(--mono); letter-spacing: 0.05em; text-transform: uppercase; border-radius: 7px 9px 7px 10px; }
.plan.pick .tag { display: block; }
.plan .price { font: 800 2.4rem var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.plan .price small { font: 500 0.95rem var(--body); letter-spacing: 0; color: var(--muted); }
.plan p { color: var(--muted); font-size: 0.95rem; }
.meter { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 50%; background: var(--moss); border-radius: 4px; transition: width .35s, background-color .35s; }
.plan.over .meter i { background: var(--lantern); }
.fit { font-size: 0.82rem; color: var(--muted); }
.plan .btn { margin-top: 4px; }
.plan.pick .btn { background: var(--moss); color: var(--moss-ink); border-color: var(--moss); box-shadow: 0 4px 0 var(--moss-deep); }
.includes { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; padding: 0; list-style: none; color: var(--muted); }
.includes li::before { content: "■ "; color: var(--moss); font-size: 0.7em; vertical-align: 0.15em; }

.plan.pick .tag { animation: pop .3s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes pop { from { transform: scale(.6); } }

/* add-ons */
.addons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.addon { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 14px 16px; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; cursor: pointer; transition: border-color .15s, transform .15s; }
.addon:hover { transform: translateY(-2px); }
.addon:has(input:checked) { border-color: var(--moss); }
.addon:has(input:focus-visible) { outline: 3px solid var(--moss); outline-offset: 3px; }
.addon input { position: absolute; opacity: 0; pointer-events: none; }
.addon i { flex: none; width: 22px; height: 22px; border: 2px solid var(--line); border-radius: 6px 8px 6px 9px; transition: background-color .15s, border-color .15s, transform .2s cubic-bezier(.3, 1.8, .5, 1); }
.addon input:checked + i { background: var(--moss); border-color: var(--moss); transform: rotate(-8deg) scale(1.1); }
.addon span { flex: 1; min-width: 0; display: grid; gap: 2px; }
.addon small { color: var(--muted); font-size: 0.88rem; }
.addon em { font: 600 0.95rem var(--mono); font-style: normal; color: var(--moss); font-variant-numeric: tabular-nums; }

/* comparison table */
.table-wrap { overflow-x: auto; }
.compare { width: 100%; min-width: 540px; border-collapse: collapse; text-align: left; }
.compare th, .compare td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font: 700 1.05rem var(--display); border-bottom-width: 2px; }
.compare tbody th { font-weight: 600; }
.compare td:nth-child(2) { color: var(--muted); }
.compare td:last-child, .compare thead th:last-child { background: var(--surface); font-weight: 500; }
.compare thead th:last-child { color: var(--moss); border-radius: 14px 14px 0 0; }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare tbody tr:last-child td:last-child { border-radius: 0 0 14px 14px; }

/* ticks and specs */
.ticks { display: grid; grid-template-columns: repeat(20, 1fr); gap: 6px; }
.ticks i { aspect-ratio: 1; background: var(--stone-1); border-radius: 4px 6px 4px 7px; transition: background-color .12s; }
.ticks i.on { background: var(--moss); }
.tick-note { margin-top: 12px; font: 400 0.82rem var(--mono); color: var(--muted); }
.specs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px 32px; margin: 0; }
.specs div { display: grid; gap: 6px; align-content: start; min-width: 0; padding-top: 14px; border-top: 2px solid var(--line); transition: border-color .2s; }
.specs div:hover { border-color: var(--moss); }
.specs dd { margin: 0; font-weight: 500; }

.summary .total { text-align: right; }
.summary .total b { font: 800 2rem var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; padding: 20px 22px; background: var(--console-bg); color: var(--console-fg); border-radius: 14px; }
.summary > div { display: grid; gap: 4px; min-width: 0; }
.summary .label, .summary .dim { color: var(--console-dim); }
.summary strong { font: 600 1.15rem var(--mono); overflow-wrap: anywhere; }
.summary .btn { background: var(--console-green); border-color: var(--console-green); color: #10140F; box-shadow: 0 4px 0 #5E8A42; }
.summary p { flex-basis: 100%; color: var(--console-dim); font-size: 0.9rem; }

/* steps, faq, closer, footer */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { display: grid; gap: 8px; align-content: start; min-width: 0; counter-increment: step; }
.steps li::before { content: counter(step); font: 800 3rem var(--display); color: var(--moss); line-height: 1; }
.steps p { color: var(--muted); }
.steps code { font: 600 0.9rem var(--mono); color: var(--ink); overflow-wrap: anywhere; }

.faq { display: grid; max-width: 760px; }
.faq details { border-top: 1px solid var(--line); padding-block: 16px; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 700 1.3rem var(--mono); color: var(--moss); line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--muted); margin-top: 10px; animation: line .25s both; }

.closer { background: var(--surface); border-block: 1px solid var(--line); }
.closer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-block: 44px; }

footer .wrap { display: grid; gap: 8px; padding-block: 32px 40px; color: var(--muted); font-size: 0.88rem; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 36px; }
  .features, .plans, .specs { grid-template-columns: repeat(2, 1fr); }
  .finder { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 560px) {
  .section { padding-block: 52px; }
  .features, .plans, .steps, .addons { grid-template-columns: 1fr; }
  .ticks { gap: 3px; }
  .summary .total { text-align: left; }
  nav a:not(.btn) { display: none; }
  .sun { width: 40px; height: 40px; top: 16px; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .track { flex-wrap: wrap; width: auto; }
  .set { flex-wrap: wrap; }
  .set[aria-hidden] { display: none; }
}
