@font-face { font-family: "Inter"; src: url("../app/fonts/inter-latin-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #F5F3EF; --surface: #FFFFFF; --sunk: #ECE9E3; --ink: #17161A; --muted: #67636B; --line: #DDD9D2;
  --accent: #D9472F; --accent-soft: rgba(217, 71, 47, .10); --device: #18181B; --focus: #2B6CDF;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 24px 48px -28px rgba(0,0,0,.35);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F0F12; --surface: #18181D; --sunk: #141418; --ink: #EDEBEF; --muted: #9D99A3; --line: #29282F;
    --accent: #F2694F; --accent-soft: rgba(242, 105, 79, .14); --device: #050506; --focus: #7AA7FF;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 24px 48px -24px rgba(0,0,0,.8); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F0F12; --surface: #18181D; --sunk: #141418; --ink: #EDEBEF; --muted: #9D99A3; --line: #29282F;
  --accent: #F2694F; --accent-soft: rgba(242, 105, 79, .14); --device: #050506; --focus: #7AA7FF;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 24px 48px -24px rgba(0,0,0,.8); color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 Inter, system-ui, -apple-system, sans-serif; }
a { color: inherit; }
code { font: .88em ui-monospace, Menlo, monospace; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }

/* ---------- scrollbars: a thin floating pill, no track ----------
   Chrome/Safari use the ::-webkit-scrollbar rules (setting scrollbar-width/color there would switch them off),
   Firefox gets the standard properties. */
:root { --thumb: color-mix(in srgb, var(--ink) 22%, transparent); --thumb-hover: color-mix(in srgb, var(--ink) 40%, transparent); }
::-webkit-scrollbar { width: 12px; height: 12px; background: transparent; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--thumb); border-radius: 999px; border: 4px solid transparent; background-clip: padding-box; min-height: 40px; }
::-webkit-scrollbar-thumb:hover { background: var(--thumb-hover); background-clip: padding-box; border-width: 3px; }
::-webkit-scrollbar-button { display: none; }
@supports (-moz-appearance: none) {
  * { scrollbar-width: thin; scrollbar-color: var(--thumb) transparent; }
}
.code::-webkit-scrollbar-thumb { background: rgba(255,255,255,.22); background-clip: padding-box; }

/* ---------- top bar ---------- */
.bar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.bar-in { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.logo-for { color: var(--muted); font-weight: 500; }
.logo-mark { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); position: relative; flex: none; }
.logo-mark::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--bg); }
.bar-nav { display: flex; align-items: center; gap: 4px; }
.bar-nav a { padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 550; font-size: 15px; }
.bar-nav a:hover { color: var(--ink); background: var(--sunk); }
.bar-nav .gh { color: var(--ink); border: 1px solid var(--line); }

/* ---------- studio: preview card + design list ---------- */
.studio { max-width: 1200px; margin: 0 auto; padding: 28px 24px 56px; }
.intro { margin-bottom: 22px; }
.intro h1 { margin: 0; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.08; letter-spacing: -.03em; font-weight: 800; }
.intro p { margin: 8px 0 0; color: var(--muted); font-size: 17px; max-width: 620px; }

/* the list sizes itself to the preview card (contain: size), so both columns are the same height */
.stage { display: grid; grid-template-columns: minmax(0, 1fr) 356px; gap: 20px; align-items: stretch; }

.viewer { min-width: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; padding: 12px; box-shadow: var(--shadow); }
.device { position: relative; background: var(--device); border-radius: 12px; padding: 12px; }
.screen { position: relative; width: 100%; aspect-ratio: 5 / 3; overflow: hidden; border-radius: 4px; background: #000; }
.screen iframe { position: absolute; top: 0; left: 0; width: 800px; height: 480px; border: 0; transform-origin: 0 0; }

.nav-btn.expand { width: auto; gap: 8px; padding: 0 14px 0 12px; display: inline-flex; align-items: center; font: 600 14px Inter, system-ui, sans-serif; margin-right: 4px; }
.close { position: absolute; top: -56px; right: 0; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  color: #fff; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); }
.close:hover { background: rgba(255,255,255,.24); }
.close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.device.is-open { position: fixed; z-index: 50; border-radius: 16px; padding: 14px; box-shadow: 0 40px 120px -20px rgba(0,0,0,.7); }
/* bleeds past the viewport: a backdrop blur fades out at its own edges, which showed as light bands */
.scrim { position: fixed; inset: -80px; z-index: 40; background: rgba(8, 8, 12, .6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .25s; }
.scrim.show { opacity: 1; }
.no-scroll, .no-scroll body { overflow: hidden; }

.meta { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 18px 12px 8px; }
.viewer-bar { display: flex; align-items: center; gap: 14px; }
.now { flex: 1; min-width: 0; }
.now-name { font-weight: 750; font-size: 20px; letter-spacing: -.01em; line-height: 1.25; }
.now-desc { color: var(--muted); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.count { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nav { display: flex; gap: 8px; }
.nav-btn { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.nav-btn:hover { border-color: var(--muted); background: var(--sunk); }
.nav-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.try { margin: 0; color: var(--muted); font-size: 14px; }
.try b { color: var(--ink); font-weight: 650; }
.try a { color: var(--accent); font-weight: 600; text-decoration: none; margin-left: 4px; white-space: nowrap; }
.try a:hover { text-decoration: underline; }

.picker { contain: size; display: flex; flex-direction: column; min-height: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 12px; border-bottom: 1px solid var(--line); }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 10px; border-radius: 999px; cursor: pointer;
  font: 600 13.5px Inter, system-ui, sans-serif; color: var(--ink); background: var(--sunk); border: 1px solid transparent; }
.chip:hover { border-color: var(--line); }
.chip .n { font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.chip[aria-pressed="true"] .n { color: inherit; opacity: .7; }
.list { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 8px 10px; overscroll-behavior: contain; }
.list:focus-visible { outline-offset: -2px; }
.group { padding: 12px 8px 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.item { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border-radius: 10px; cursor: pointer; }
.item:hover { background: var(--sunk); }
.item:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.item[aria-selected="true"] { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.item img { flex: none; width: 104px; height: auto; aspect-ratio: 5 / 3; border-radius: 6px; background: #000; display: block; }
.item .txt { display: flex; flex-direction: column; min-width: 0; }
.item .name { font-weight: 650; font-size: 15px; line-height: 1.3; }
.item .desc { color: var(--muted); font-size: 13px; line-height: 1.35; }

/* ---------- content bands ---------- */
.band { padding: 64px 0; border-top: 1px solid var(--line); }
.band.alt { background: var(--sunk); }
.band h2 { margin: 0 0 20px; font-size: 28px; letter-spacing: -.02em; line-height: 1.15; }
.band h3 { margin: 18px 0 6px; font-size: 15px; }
.two { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; }
.feats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feats li { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.feats b { font-size: 16px; }
.feats span { color: var(--muted); font-size: 15px; }
.plain { margin: 0; padding-left: 18px; }
.plain li { margin: 3px 0; }

.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.steps li { counter-increment: s; position: relative; padding: 14px 16px 14px 56px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 13px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; }
.steps span { display: block; font-weight: 550; }
.steps code, .steps em { display: block; margin-top: 8px; color: var(--muted); }
.steps em { font-style: normal; font-size: 14px; }
.steps code { padding: 10px 12px; border-radius: 8px; background: var(--sunk); color: var(--ink); overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.band.alt .steps code { background: var(--bg); }
.code { margin: 0; padding: 20px; border-radius: 14px; background: var(--device); color: #E9E7EC; overflow-x: auto; font-size: 14px; line-height: 1.6; }
.code code { font-size: inherit; }
p code, li code { padding: 1px 5px; border-radius: 5px; background: var(--sunk); }

.fresh { margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.fresh summary { cursor: pointer; padding: 12px 14px; font-weight: 650; list-style: none; display: flex; align-items: center; gap: 8px; }
.fresh summary::-webkit-details-marker { display: none; }
.fresh summary::before { content: "+"; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--sunk); font-weight: 700; }
.fresh[open] summary::before { content: "−"; }
.fresh-steps { margin: 0; padding: 0 16px 6px 36px; }
.fresh-steps li { margin: 6px 0; font-size: 14.5px; }
.fresh > p { padding: 0 14px 14px; }
.band.alt .fresh { background: var(--bg); }

/* ---------- build section ---------- */
.build-head { max-width: 720px; margin-bottom: 24px; }
.build-head h2 { margin-bottom: 8px; }
.build { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; align-items: start; }
.model-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 12px; box-shadow: var(--shadow); }
.model { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; cursor: grab;
  background: radial-gradient(120% 90% at 50% 30%, var(--surface) 0%, var(--sunk) 70%); }
.model:active { cursor: grabbing; }
.model canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.model-msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 15px; padding: 24px; text-align: center; }
.model-tools { position: absolute; left: 12px; right: 12px; top: 12px; display: flex; gap: 8px; align-items: center; justify-content: flex-end; pointer-events: none; }
.model-tools > * { pointer-events: auto; }
.badge { margin-right: auto; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 650; color: #8A4B00; background: #FFE7C2; }
.badge.ok { color: #1E5B2E; background: #D3F2DB; }
.tool { height: 34px; padding: 0 12px; border-radius: 10px; cursor: pointer; font: 600 13px Inter, system-ui, sans-serif; color: var(--ink);
  background: color-mix(in srgb, var(--surface) 85%, transparent); border: 1px solid var(--line); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tool:hover { border-color: var(--muted); }
.tool[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.model-foot { padding: 12px 6px 4px; display: flex; flex-direction: column; gap: 10px; }
.small { font-size: 13px; margin: 0; }
.downloads { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.dl { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; text-decoration: none; background: var(--sunk); border: 1px solid transparent; }
.dl:hover { border-color: var(--line); }
.dl svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dl span { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.dl small { color: var(--muted); font-size: 12px; }

.parts { display: flex; flex-direction: column; gap: 14px; }
.part-group { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.part-group h3 { margin: 0 0 8px; font-size: 15px; }
.part-list { list-style: none; margin: 0; padding: 0; }
.part-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.part-list li:first-child { border-top: 0; padding-top: 2px; }
.pn { font-weight: 650; font-size: 15px; grid-column: 1; }
.pd { grid-column: 1; color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.buy { grid-column: 2; grid-row: 1 / span 2; align-self: center; white-space: nowrap; font-size: 13.5px; font-weight: 650; color: var(--accent); text-decoration: none;
  padding: 7px 10px; border-radius: 9px; background: var(--accent-soft); }
.buy:hover { text-decoration: underline; }
.pins { width: 100%; margin: 10px 0 8px; border-collapse: collapse; font-size: 14px; }
.pins caption { text-align: left; font-size: 13px; color: var(--muted); padding-bottom: 6px; }
.pins th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 4px 0; border-bottom: 1px solid var(--line); }
.pins td { padding: 5px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.pins td:first-child { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }

.foot { padding: 32px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.foot p { margin: 4px 0; }

/* ---------- smaller screens ---------- */
@media (max-width: 1080px) {
  .stage { grid-template-columns: minmax(0, 1fr) 290px; gap: 16px; }
  .item img { width: 84px; }
  .feats { grid-template-columns: repeat(2, 1fr); }
}
/* tablet & phone: card on top, chips + a swipeable strip of designs under it */
@media (max-width: 820px) {
  .wrap, .bar-in, .studio { padding-left: 16px; padding-right: 16px; }
  .bar-nav a:not(.gh) { display: none; }
  .bar-nav a[href="#build"] { display: inline-block; }
  .bar-nav a[href="#install"] { display: inline-block; color: var(--ink); border: 1px solid var(--line); }
  .studio { padding-top: 20px; padding-bottom: 40px; }
  .intro p { font-size: 16px; }
  .stage { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .viewer { padding: 8px; border-radius: 16px; }
  .device { padding: 6px; border-radius: 10px; }
  .nav-btn.expand span { display: none; }
  .nav-btn.expand { padding: 0; width: 44px; justify-content: center; margin-right: 0; }
  .meta { padding: 12px 6px 6px; }
  /* expanded on a phone: edge to edge, square corners */
  .device.is-open { border-radius: 0; padding: 0; box-shadow: none; }
  .device.is-open .screen { border-radius: 0; }
  .device.is-open .close { right: 12px; }
  .keys { display: none; }
  .picker { contain: none; background: none; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
  .chips { padding: 0 0 10px; border: 0; flex-wrap: nowrap; overflow-x: auto; }
  .chip { flex: none; }
  .group { display: none; }
  .list { display: flex; gap: 10px; overflow-x: auto; overflow-y: hidden; padding: 2px 2px 10px; scroll-snap-type: x proximity; }
  .item { flex: none; flex-direction: column; align-items: stretch; gap: 6px; width: 132px; padding: 6px; scroll-snap-align: start;
    background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
  .item[hidden] { display: none; }
  .item img { width: 100%; }
  .item .name { font-size: 13px; }
  .item .desc { display: none; }
  .band { padding: 44px 0; }
  .two { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .feats { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .build { grid-template-columns: minmax(0, 1fr); }
  .model-card { padding: 8px; border-radius: 16px; }
}
@media (max-width: 420px) { .logo-for { display: none; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
