:root {
  color-scheme: light;
  --bg: #f3f4f5;
  --surface: #ffffffd9;
  --control: #f9fafb;
  --text: #17191d;
  --muted: #535c68;
  --line: #cfd4da;
  --action: #252a31;
  --action-text: #fff;
  --glow: #e0e6eb;
  --shadow: 0 14px 40px #18223212;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.55 "Space Grotesk", system-ui, sans-serif;
}

[data-theme="mono"] {
  color-scheme: dark;
  --bg: #0a0a0a;
  --surface: #171717;
  --control: #222;
  --text: #f4f4f8;
  --muted: #c9c9c9;
  --line: #555;
  --action: #f2f2f2;
  --action-text: #0a0a0a;
  --glow: #222;
}

[data-theme="gold"] {
  color-scheme: dark;
  --bg: #0d0902;
  --surface: #1c160a;
  --control: #2b2211;
  --text: #fff2ce;
  --muted: #d6c59d;
  --line: #79632c;
  --action: #ffd447;
  --action-text: #0d0902;
  --glow: #2d2210;
}

[data-theme="high-contrast"] {
  color-scheme: dark;
  --bg: #000;
  --surface: #000;
  --control: #000;
  --text: #fff;
  --muted: #fff;
  --line: #fff;
  --action: #ff0;
  --action-text: #000;
  --glow: #000;
  --shadow: none;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 7rem; }
body { margin: 0; }
a { color: inherit; text-underline-offset: .2em; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--action); outline-offset: 4px; }
h1, h2, p, figure, dl, dd { margin: 0; }
.shell { width: min(1140px, calc(100% - 28px)); margin-inline: auto; }
.skip { position: fixed; top: .5rem; left: 1rem; z-index: 10; transform: translateY(-160%); background: var(--surface); padding: .6rem 1rem; }
.skip:focus { transform: none; }

.topbar, .footer {
  display: flex;
  align-items: center;
  gap: .75rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 5;
  margin-top: 14px;
  padding: 9px 11px 9px 19px;
  backdrop-filter: blur(18px);
}

.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font: .92rem "Rubik Mono One", system-ui, sans-serif; letter-spacing: -.06em; }
.brand img { object-fit: contain; }
.domain { color: var(--muted); font: .82rem "IBM Plex Mono", monospace; letter-spacing: 0; }
.topbar nav { display: flex; gap: .125rem; margin-left: auto; }
.topbar nav a { display: grid; place-items: center; min-height: 44px; padding: .4rem .8rem; border-radius: 999px; text-decoration: none; color: var(--muted); font-size: .9rem; }
.topbar nav a:hover { background: var(--control); color: var(--text); }
.config { position: relative; }
.config-toggle { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--control); }
.config-toggle svg { width: 22px; height: 22px; transition: transform .2s ease; }
.config-toggle:hover svg { transform: rotate(25deg); }
.config-toggle[aria-expanded="true"] { background: var(--action); color: var(--action-text); }
.config-panel { position: absolute; top: calc(100% + 13px); right: 0; width: min(285px, calc(100vw - 42px)); border: 1px solid var(--line); border-radius: 20px; padding: .9rem; background: var(--control); box-shadow: var(--shadow); }
.config-panel fieldset { display: flex; flex-wrap: wrap; gap: .4rem; min-width: 0; margin: 0; border: 0; padding: 0; }
.config-panel fieldset + fieldset { margin-top: .75rem; }
.config-panel legend { margin-bottom: .25rem; font-weight: 600; }
.config-panel button { min-height: 44px; border: 1px solid var(--line); border-radius: 999px; padding: .25rem .7rem; background: var(--surface); font-size: .875rem; }
.config-panel button[aria-pressed="true"] { background: var(--action); color: var(--action-text); }

.hero { padding: clamp(2rem, 5vw, 4.25rem) 0 1.5rem; background: radial-gradient(ellipse at 47% 24%, var(--glow), transparent 67%); }
.intro { display: grid; grid-template-columns: auto minmax(0, 1fr); justify-content: start; align-items: start; gap: clamp(1rem, 3vw, 2.25rem); padding-inline: clamp(0px, 3vw, 40px); animation: enter .45s ease-out both; }
.studio-mark { width: clamp(65px, 8vw, 104px); height: auto; }
h1, h2 { font: 400 clamp(1.8rem, 4.75vw, 3.75rem)/1.09 "Rubik Mono One", system-ui, sans-serif; letter-spacing: -.075em; }
h2 { font-size: clamp(1.35rem, 3vw, 2.2rem); }
.lead { max-width: 51ch; margin-top: .7rem; font-size: clamp(1.04rem, 2vw, 1.28rem); color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.15rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); padding: .55rem 1.15rem; text-decoration: none; font-weight: 600; transition: transform .16s ease, box-shadow .16s ease; }
.button:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.primary { border-color: var(--action); background: var(--action); color: var(--action-text); }
.file-meta, figcaption { color: var(--muted); font: .82rem/1.5 "IBM Plex Mono", monospace; }
.file-meta { margin-top: .65rem; }
.overview { margin-top: clamp(1.5rem, 4vw, 2.6rem); }
.overview a { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: clamp(12px, 2vw, 22px); box-shadow: var(--shadow); background: #101213; }
.overview img { display: block; width: 100%; height: auto; }
figcaption { margin-top: .65rem; }

.details, .start { margin-top: clamp(2.5rem, 5vw, 4.5rem); }
.feature-list { margin-top: 1.35rem; }
.feature-list > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: .4rem 1rem; padding: 1.2rem 0; border-top: 1px solid var(--line); }
.feature-list dt { font-size: 1.15rem; font-weight: 600; }
.feature-list dd, .start p { color: var(--muted); max-width: 63ch; }
.start { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; padding: clamp(1.15rem, 4vw, 2.4rem); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; }
.start p { margin-top: .7rem; }
.start .button { flex-shrink: 0; }
.footer { justify-content: space-between; flex-wrap: wrap; margin-block: clamp(2.5rem, 5vw, 4.5rem) 20px; padding: .85rem 1.25rem; color: var(--muted); font-size: .9rem; }
.footer a { color: var(--text); }

@keyframes enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  .intro { grid-template-columns: 1fr; gap: .7rem; padding-inline: 2px; }
  .studio-mark { width: 64px; }
  .feature-list > div { grid-template-columns: 1fr; }
  .start { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 460px) {
  .topbar { gap: .3rem; padding: 7px 9px 5px 12px; border-radius: 23px; }
  .brand { font-size: .78rem; gap: 5px; }
  .brand img { width: 32px; height: 32px; }
  .topbar nav { margin-left: auto; }
  .topbar nav a { font-size: .83rem; padding-inline: .4rem; }
  .topbar nav a[href="#features"] { display: none; }
  .config-panel { right: -2px; }
}

@media (max-width: 360px) {
  .topbar nav { display: none; }
  .config { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .intro { animation: none; }
  .button, .config-toggle svg { transition: none; }
}

[data-theme="high-contrast"] .intro { animation: none; }
[data-theme="high-contrast"] .topbar { backdrop-filter: none; }
