:root {
  color-scheme: dark;
  --canvas: #111510;
  --shell: #171c17;
  --toolbar: #1c211b;
  --panel: #20251f;
  --control: #252c22;
  --selected: #293522;
  --border: #353b33;
  --accent: #c4e58b;
  --ink: #e8ebe5;
  --muted: #afb9a8;
  --subtle: #9da895;
  --mono: Consolas, "Liberation Mono", monospace;
  --sans: "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 16px/1.55 var(--sans); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button, input { font: inherit; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.12; }
[id] { scroll-margin-top: 24px; }
.wrap { width: min(calc(100% - 80px), 1360px); margin-inline: auto; }
.skip { position: fixed; z-index: 5; top: 10px; left: 10px; transform: translateY(-150%); padding: 9px 14px; background: var(--accent); color: var(--canvas); }
.skip:focus { transform: translateY(0); }

.site-head { background: var(--shell); border-bottom: 1px solid var(--border); }
.head-inner, .foot-inner { display: flex; align-items: center; justify-content: space-between; }
.head-inner { min-height: 76px; gap: 22px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-size: 19px; font-weight: 680; letter-spacing: -.025em; }
.brand img { flex: none; }
.brand small { display: block; margin-top: 3px; color: var(--subtle); font-size: 10px; font-weight: 500; letter-spacing: .115em; text-transform: uppercase; }
.site-nav, .nav-tabs { display: flex; align-items: center; gap: 4px; }
.site-nav { gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.nav-tabs { padding: 4px; border: 1px solid var(--border); border-radius: 9px; background: var(--canvas); }
.site-nav a { padding: 7px 12px; border: 1px solid transparent; border-radius: 6px; text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 600; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); border-color: #45533a; background: var(--selected); }
.site-nav .nav-download { color: var(--accent); border-color: #45533a; background: var(--control); }
.language-picker { position: relative; }
.language-picker summary { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--control); color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
.language-picker summary::-webkit-details-marker { display: none; }
.language-picker summary::after { content: ""; width: 6px; height: 6px; border-right: 1px solid var(--accent); border-bottom: 1px solid var(--accent); transform: translateY(-2px) rotate(45deg); }
.language-picker[open] summary { border-color: #7e9761; }
.language-picker ul { position: absolute; z-index: 3; right: 0; min-width: 125px; margin: 5px 0 0; padding: 4px; list-style: none; border: 1px solid #485541; border-radius: 7px; background: var(--shell); box-shadow: 0 10px 24px #070a075c; }
.language-picker a { display: block; }

.hero { background: radial-gradient(ellipse at 76% 20%, #1d2819 0%, transparent 60%), var(--canvas); border-bottom: 1px solid var(--border); }
.hero-grid { display: grid; grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr); align-items: center; gap: clamp(34px, 4.5vw, 74px); padding-block: clamp(50px, 6vw, 96px); }
.kicker { color: var(--accent); font: 600 11px/1.5 var(--mono); letter-spacing: .13em; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--accent); }
.hero h1 { margin: 14px 0 4px; font-size: clamp(48px, 5.05vw, 77px); font-weight: 750; letter-spacing: -.065em; }
.hero h1 span { display: block; }
.hero-subtitle { color: var(--accent); font-size: clamp(21px, 2.4vw, 34px); line-height: 1.2; letter-spacing: -.025em; font-weight: 630; }
.hero-lead { max-width: 43ch; margin-top: 20px; color: var(--muted); font-size: clamp(16px, 1.34vw, 19px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 14px; min-height: 43px; border: 1px solid transparent; border-radius: 7px; text-decoration: none; font-weight: 650; font-size: 14px; }
.button-lime { background: var(--accent); color: #161d11; }
.button-lime:hover { background: #d6f4a3; }
.button-ghost { color: var(--ink); border-color: #485541; background: var(--control); }
.button-ghost:hover { color: var(--accent); border-color: #7e9761; background: var(--selected); }
.hero-meta { margin-top: 12px; color: var(--subtle); font-size: 13px; }
.hero-proof { overflow: hidden; border: 1px solid #485641; border-radius: 11px; background: var(--panel); box-shadow: 0 18px 48px #070a075c; }
.hero-proof img { width: 100%; aspect-ratio: 1440 / 920; }
.hero-proof figcaption { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 5px 14px; padding: 10px 13px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.hero-proof a { color: var(--accent); text-decoration: none; }
.hero-proof a:hover { text-decoration: underline; }

.tool-section, .gallery { padding-block: clamp(46px, 6vw, 82px); }
.tool-section { padding-bottom: 28px; background: var(--shell); }
.section-intro { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-intro h2 { font-size: clamp(31px, 4vw, 53px); font-weight: 740; letter-spacing: -.052em; }
.section-intro > p { max-width: 46ch; color: var(--muted); }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.tool-card { position: relative; padding: 18px 19px 20px; min-height: 158px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel); text-decoration: none; transition: background .16s ease, border-color .16s ease; }
.tool-card:hover, .tool-card:focus-visible { background: var(--selected); border-color: #526246; }
.tool-card h3 { margin: 10px 0 5px; font-size: clamp(18px, 1.7vw, 24px); letter-spacing: -.027em; }
.tool-card p { max-width: 39ch; color: var(--muted); font-size: 14px; }
.card-arrow { position: absolute; right: 17px; top: 15px; color: var(--accent); font-size: 18px; }
.tool-icon { display: grid; place-items: center; position: relative; width: 32px; height: 32px; border: 1px solid #4d5c41; border-radius: 6px; color: var(--accent); background: var(--selected); }
.dots::before { content: ""; width: 20px; height: 20px; background: radial-gradient(circle, var(--accent) 1.45px, transparent 1.85px) 0 0 / 6.7px 6.7px; clip-path: circle(50%); }
.inks::before, .inks::after { content: ""; position: absolute; width: 14px; height: 14px; top: 8px; left: 5px; border: 1px solid var(--accent); border-radius: 50%; }
.inks::after { left: 11px; background: #c4e58b2b; }
.letters { font-size: 16px; font-weight: 700; }
.terminal { font: 700 15px var(--mono); }
.layers::before, .layers::after { content: ""; position: absolute; width: 14px; height: 10px; top: 8px; left: 7px; border: 1px solid var(--accent); transform: skew(-13deg); }
.layers::after { top: 12px; left: 9px; background: var(--selected); }
.relief::before { content: ""; width: 17px; height: 17px; border-radius: 50%; background: radial-gradient(circle at 34% 29%, #e0f2ba, #8bb45c 51%, #425733 81%); }

.release-section { padding: 0 0 clamp(45px, 5.5vw, 76px); background: var(--shell); }
.release-note { display: flex; justify-content: space-between; align-items: center; gap: 16px 28px; padding: 20px; border: 1px solid #45543b; border-radius: 9px; background: #1b2418; }
.release-note h2 { font-size: 19px; letter-spacing: -.018em; }
.release-note p { max-width: 71ch; margin-top: 5px; color: var(--muted); font-size: 14px; }
.release-note .button { flex: 0 0 auto; }
.gallery { border-top: 1px solid var(--border); }
.gallery-switch { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 13px; }
.gallery-switch button, .code-head button { cursor: pointer; padding: 7px 12px; border: 1px solid var(--border); border-radius: 6px; color: var(--ink); background: var(--control); font-size: 14px; }
.gallery-switch button[aria-pressed="true"] { background: var(--selected); border-color: #5a6c49; color: var(--accent); font-weight: 650; }
.gallery-switch button:hover, .code-head button:hover { border-color: #7e9761; color: var(--accent); }
.gallery-proof { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); overflow: hidden; margin-bottom: 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel); }
.gallery-proof img { width: 100%; height: clamp(300px, 37vw, 470px); object-fit: contain; background: #0e110d; }
.gallery-proof figcaption { align-self: center; padding: clamp(20px, 4vw, 55px); }
.gallery-proof h3 { margin: 8px 0 10px; font-size: clamp(27px, 3.5vw, 48px); letter-spacing: -.05em; }
.gallery-proof figcaption > p:not(.kicker) { max-width: 42ch; color: var(--muted); }
.text-link { display: block; width: fit-content; margin-top: 13px; color: var(--accent); font-weight: 620; text-underline-offset: 4px; }
.text-link.quiet { margin-top: 9px; color: var(--muted); font-size: 14px; }
.site-foot { padding-block: 21px; border-top: 1px solid var(--border); background: var(--shell); color: var(--muted); font-size: 13px; }
.foot-inner { gap: 8px 20px; flex-wrap: wrap; }
.site-foot a { text-underline-offset: 4px; }
.site-foot a:hover { color: var(--accent); }

.docs-hero { padding-block: clamp(34px, 5.2vw, 68px); border-bottom: 1px solid var(--border); background: var(--toolbar); }
.docs-hero h1 { margin: 8px 0 9px; font-size: clamp(40px, 7vw, 75px); letter-spacing: -.06em; }
.docs-hero p:not(.kicker) { max-width: 64ch; color: var(--muted); font-size: 17px; }
.docs-layout { display: grid; grid-template-columns: minmax(212px, 252px) minmax(0, 930px); gap: clamp(24px, 4vw, 60px); align-items: start; padding-block: 28px 68px; }
.docs-aside { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; padding: 14px; border: 1px solid var(--border); border-radius: 9px; background: var(--shell); }
.docs-search { margin-bottom: 13px; }
.docs-search label { display: block; margin-bottom: 7px; color: var(--ink); font-size: 13px; font-weight: 650; }
.docs-search input { width: 100%; padding: 8px 9px; border: 1px solid #495744; border-radius: 6px; background: var(--canvas); color: var(--ink); font-size: 14px; }
.docs-search input::placeholder { color: var(--subtle); }
.search-status { margin-top: 5px; color: var(--muted); font-size: 12px; }
.search-status:empty { display: none; }
.docs-nav .kicker { margin: 4px 0 5px; color: var(--subtle); }
.docs-nav a { display: block; padding: 5px 7px; border: 1px solid transparent; border-radius: 5px; color: var(--muted); text-decoration: none; font-size: 14px; }
.docs-nav a:hover, .docs-nav a[aria-current="location"] { border-color: #45533a; background: var(--selected); color: var(--accent); }
.topic { margin-bottom: 13px; padding: clamp(17px, 3vw, 31px); border: 1px solid var(--border); border-radius: 9px; background: var(--panel); }
.topic h2 { margin-bottom: 13px; font-size: clamp(25px, 3.2vw, 39px); letter-spacing: -.043em; }
.topic h3 { margin: 20px 0 6px; font-size: 21px; letter-spacing: -.022em; }
.topic p, .topic li, .topic td { color: var(--muted); line-height: 1.62; }
.topic p + p { margin-top: 9px; }
.topic li + li { margin-top: 6px; }
.topic ul, .topic ol { padding-left: 24px; }
.topic strong { color: var(--ink); }
.topic a:not(.button) { color: var(--accent); text-underline-offset: 3px; }
.topic > .button { margin-top: 13px; }
.doc-figure { margin-top: 16px; }
.doc-figure img { border: 1px solid #4c5946; border-radius: 6px; }
.doc-figure figcaption { margin-top: 5px; color: var(--subtle); font-size: 13px; }
.callout, .no-results { margin-top: 14px; padding: 11px 13px; border: 1px solid #43543a; border-left: 3px solid #91b76a; border-radius: 5px; background: #192218; }
.callout p { margin-top: 4px; }
.table-wrap { overflow: auto; margin-block: 13px; }
.topic table { width: 100%; border-collapse: collapse; font-size: 14px; }
.topic th, .topic td { text-align: left; vertical-align: top; padding: 8px 9px; border-bottom: 1px solid var(--border); }
.topic thead { background: var(--selected); }
.topic th[scope="row"] { min-width: 85px; }
.topic code { font: .88em var(--mono); overflow-wrap: anywhere; }
.topic :not(pre) > code { padding: 2px 4px; border-radius: 3px; background: var(--canvas); color: var(--accent); }
.code-block { margin-block: 15px; border: 1px solid var(--border); border-radius: 6px; background: var(--canvas); }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.code-head button { padding: 4px 8px; font-size: 12px; }
.code-block pre { margin: 0; padding: 12px; overflow: auto; line-height: 1.5; }

@media (max-width: 1030px) {
  .wrap { width: calc(100% - 48px); }
  .hero-grid { gap: 28px; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 32px); }
  .head-inner { min-height: 68px; gap: 10px; flex-wrap: wrap; padding-block: 10px; }
  .site-nav { width: 100%; justify-content: flex-start; }
  .language-picker { margin-left: auto; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; padding-block: 37px 42px; }
  .hero h1 { font-size: clamp(44px, 9.1vw, 65px); }
  .section-intro { display: block; }
  .section-intro > p { margin-top: 6px; }
  .release-note { align-items: flex-start; flex-direction: column; }
  .gallery-proof { grid-template-columns: 1fr; }
  .gallery-proof img { height: auto; max-height: 380px; }
  .docs-layout { display: block; padding-block: 17px 40px; }
  .docs-aside { position: static; max-height: none; margin-bottom: 14px; }
  .docs-nav { display: grid; grid-template-columns: 1fr 1fr; column-gap: 4px; }
  .docs-nav .kicker { grid-column: 1 / -1; }
}
@media (max-width: 440px) {
  .wrap { width: calc(100% - 24px); }
  .brand img { width: 33px; height: 33px; }
  .brand small { font-size: 9px; }
  .site-nav { gap: 5px; }
  .site-nav a { padding: 5px 6px; font-size: 12px; }
  .language-picker summary { padding: 5px 8px; font-size: 12px; }
  .tool-grid { grid-template-columns: 1fr; gap: 8px; }
  .tool-card { min-height: 0; }
  .topic table { font-size: 13px; }
  .topic th, .topic td { padding: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tool-card { transition: none; }
}
