@font-face { font-family: "Rajdhani"; src: url("fonts/rajdhani-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Rajdhani"; src: url("fonts/rajdhani-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
/* Rajdhani has no Cyrillic, so Russian headings use Oswald (OFL, variable weight), only downloaded on /ru/. */
@font-face { font-family: "Oswald"; src: url("fonts/oswald-cyrillic.woff2") format("woff2"); font-weight: 200 700; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Oswald"; src: url("fonts/oswald-latin.woff2") format("woff2"); font-weight: 200 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: dark;
  --bg: #15171b;
  --bg-2: #1a1d22;
  --panel: #1d2026;
  --panel-2: #262a31;
  --field: #0f1114;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .15);
  --text: #e6e8ea;
  --muted: #8b929a;
  --dim: #5d636b;
  --orange: #de9b35;
  --orange-2: #eaa947;
  --blue: #3d6fa8;
  --blue-2: #4b80bd;
  --good: #59bf40;
  --warn: #e3a64c;
  --err: #ff7a6b;
  --light: #d6d7d8;
  --ink: #121417;
  --display: "Rajdhani", system-ui, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, "Helvetica Neue", Arial, sans-serif;
  --head: "Rajdhani", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, Menlo, monospace;
}
:root:lang(ru) { --head: "Oswald", "Arial Narrow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 var(--sans); }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
[hidden] { display: none !important; }
code, kbd { font-family: var(--mono); font-size: .9em; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }
.skip { position: absolute; left: -999px; top: 8px; background: var(--orange); color: #111; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------ top bar */
.top { position: sticky; top: 0; z-index: 50; background: rgba(21, 23, 27, .92); backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; flex: none; }
.brand svg { width: 30px; height: 30px; }
.brand span { font: 700 21px/1 var(--display); letter-spacing: .02em; transform: skewX(-10deg); white-space: nowrap; }
.brand b { color: var(--orange); font-weight: 700; margin-left: 4px; }
.nav { display: flex; gap: 24px; }
.nav a { font: 700 15px/1 var(--head); text-transform: uppercase; letter-spacing: .06em; text-decoration: none; color: #cfd3d8; padding: 6px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; border-color: var(--orange); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 6px; border-radius: 3px; font: 700 14px/1 var(--head); letter-spacing: .06em; color: #cfd3d8; cursor: pointer; user-select: none; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after { content: ""; margin-top: 3px; border: 4px solid transparent; border-top-color: currentColor; }
.lang-menu summary:hover, .lang-menu[open] summary { color: #fff; }
.lang-menu summary svg { width: 16px; height: 16px; }
.lang-menu ul { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 210px; margin: 0; padding: 6px; list-style: none; background: var(--panel); border: 1px solid var(--line-2); border-radius: 4px; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .75); }
.lang-menu a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 10px; border-radius: 3px; text-decoration: none; font-size: 14.5px; color: #cfd3d8; }
.lang-menu a:hover { background: var(--panel-2); color: #fff; }
.lang-menu a[aria-current="page"] { color: #fff; background: rgba(222, 155, 53, .1); box-shadow: inset 2px 0 0 var(--orange); }
.lang-menu a small { font: 700 11px/1 var(--head); letter-spacing: .1em; color: var(--dim); }
.btn-coffee { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 3px; border: 1px solid rgba(222, 155, 53, .5); background: transparent; color: var(--orange-2); font: 700 14px/1 var(--head); cursor: pointer; letter-spacing: .03em; white-space: nowrap; text-decoration: none; }
.btn-coffee:hover { background: rgba(222, 155, 53, .12); }
@media (max-width: 1180px) { .top .wrap { gap: 20px; } .nav { gap: 16px; } .nav a { font-size: 14px; letter-spacing: .04em; } }
@media (max-width: 960px) { .nav { display: none; } }
@media (max-width: 480px) { .btn-coffee .txt { display: none; } .brand span { font-size: 18px; } }

/* ------------------------------------------------------------------ hero (counter-strike.net style) */
.hero { position: relative; overflow: hidden; background: var(--light); color: var(--ink); padding: 56px 0 64px; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2;
  background: repeating-linear-gradient(115deg, transparent 0 26px, rgba(18, 20, 23, .085) 26px 27.5px);
  -webkit-mask-image: linear-gradient(90deg, #000 0 40%, transparent 72%); mask-image: linear-gradient(90deg, #000 0 40%, transparent 72%); }
.hero-band { position: absolute; z-index: -1; top: 0; bottom: 0; right: 0; width: 50%; background: linear-gradient(170deg, #e8a645, #d08524 70%, #c9791b); clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%); }
.hero-band::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 26px, rgba(255, 255, 255, .09) 26px 27.5px); }
.hero-mark { position: absolute; z-index: -1; right: 4%; top: 50%; width: min(420px, 38vw); transform: translateY(-50%); opacity: .9; }
.hero-word { position: absolute; z-index: -1; left: -1%; bottom: -14px; margin: 0; font: 700 clamp(64px, 12vw, 168px)/.82 var(--display); text-transform: uppercase; letter-spacing: -.01em; color: transparent; -webkit-text-stroke: 2px rgba(18, 20, 23, .13); transform: skewX(-12deg); white-space: nowrap; pointer-events: none; user-select: none; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; font: 700 14px/1 var(--head); letter-spacing: .12em; text-transform: uppercase; color: #8a5a12; }
.eyebrow::before { content: ""; width: 26px; height: 3px; background: var(--orange); }
.hero h1 { margin: 0; font: 700 clamp(36px, 4.6vw, 62px)/1.02 var(--head); letter-spacing: -.005em; text-transform: uppercase; color: var(--ink); }
.hero h1 em { font-style: normal; color: #b46a0e; }
.lede { margin: 18px 0 0; font-size: 17px; line-height: 1.65; color: #2c3036; max-width: 54ch; }
.lede code { background: rgba(18, 20, 23, .08); padding: 1px 5px; border-radius: 3px; }
.points { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 10px 18px; font: 700 15px/1.2 var(--head); text-transform: uppercase; letter-spacing: .03em; color: #24272c; }
.points li { display: inline-flex; align-items: center; gap: 8px; }
.points li::before { content: ""; width: 16px; height: 16px; flex: none; background: var(--ink); clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 8%, 38% 72%); }

.input-card { position: relative; background: var(--bg); color: var(--text); padding: 22px 22px 18px; border-radius: 6px; border-top: 3px solid var(--orange); box-shadow: 0 34px 70px -28px rgba(0, 0, 0, .65), 0 2px 0 rgba(0, 0, 0, .2); }
.card-label { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 10px; font: 700 15px/1.2 var(--head); text-transform: uppercase; letter-spacing: .05em; color: #fff; }
.card-label small { font: 13px var(--sans); text-transform: none; letter-spacing: 0; color: var(--muted); }
.src-wrap { position: relative; }
textarea#src { display: block; width: 100%; min-height: 96px; resize: vertical; padding: 12px 40px 12px 12px; border-radius: 3px; border: 1px solid var(--line-2); background: var(--field); font: 14px/1.5 var(--mono); color: #fff; }
textarea#src::placeholder { color: var(--dim); }
textarea#src[aria-invalid="true"] { border-color: var(--err); }
.clear { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 3px; border: 0; background: var(--panel-2); color: var(--muted); cursor: pointer; line-height: 1; }
.clear:hover { color: #fff; }
.input-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px; }
.field-label { display: inline-flex; align-items: center; gap: 8px; font: 700 13px/1 var(--head); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
select, input[type="number"], input[type="text"] { height: 36px; padding: 0 10px; border-radius: 3px; border: 1px solid var(--line-2); background: var(--field); color: #fff; }
select { padding-right: 28px; appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8b929a 50%), linear-gradient(135deg, #8b929a 50%, transparent 50%); background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px; background-size: 5px 5px; background-repeat: no-repeat; }
#customRes { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
#customRes input { width: 76px; }
.status { min-height: 22px; margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.status.ok { color: #b9d9ad; }
.status.err { color: var(--err); }
.samples { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.samples > span { margin-right: 2px; }

/* segmented / chips / keys */
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 3px; background: var(--field); overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 0 12px; height: 34px; font: 700 13px/1 var(--head); letter-spacing: .04em; color: var(--muted); cursor: pointer; text-transform: uppercase; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button:hover { color: #fff; }
.seg button[aria-pressed="true"], .seg button[aria-checked="true"], .seg button.on { background: var(--panel-2); color: #fff; box-shadow: inset 0 -2px 0 var(--orange); }
.seg.small button { height: 30px; min-width: 56px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 15px; border: 1px solid var(--line-2); background: var(--panel); color: #cfd3d8; font: 700 13px/1 var(--head); letter-spacing: .03em; cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: rgba(222, 155, 53, .6); color: #fff; }
.chip[aria-pressed="true"] { border-color: var(--orange); color: #fff; background: rgba(222, 155, 53, .12); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 3px; border: 1px solid var(--line-2); background: var(--panel-2); color: #fff; font: 700 15px/1 var(--head); letter-spacing: .05em; text-transform: uppercase; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: rgba(255, 255, 255, .3); background: #2e333b; }
.btn.primary { height: 48px; padding: 0 22px; font-size: 18px; border-color: #5d91cb; background: linear-gradient(180deg, #4b80bd, #36649a); box-shadow: 0 2px 0 #1f3c5e; }
.btn.primary:hover { background: linear-gradient(180deg, #5690d1, #3d70ab); }
.btn.orange { border-color: #f2b45a; background: linear-gradient(180deg, #eaa947, #d48a26); color: #16181b; box-shadow: 0 2px 0 #8a5510; }
.btn.orange:hover { background: linear-gradient(180deg, #f4b553, #df952f); }
.btn.ghost { background: transparent; }
.btn.small { height: 30px; padding: 0 10px; font-size: 13px; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ------------------------------------------------------------------ section heads */
.sec { padding: 72px 0; }
.sec-label { margin: 0 0 8px; font: 700 14px/1 var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--orange); }
.sec-title { margin: 0; font: 700 clamp(30px, 3.6vw, 46px)/1.05 var(--head); text-transform: uppercase; color: #fff; letter-spacing: -.005em; }
.sec-lede { margin: 14px 0 0; max-width: 68ch; color: var(--muted); font-size: 16px; }
.sec-head { margin-bottom: 32px; }

/* ------------------------------------------------------------------ workbench */
.bench { padding: 36px 0 64px; background: radial-gradient(1200px 400px at 70% -10%, rgba(222, 155, 53, .07), transparent 60%), var(--bg); }
.bench.stale .output-body, .bench.stale .ed-grid { opacity: .4; pointer-events: none; transition: opacity .2s; }
.bench-grid { display: grid; grid-template-columns: minmax(0, 1fr) 392px; gap: 20px; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2, .panel h2.ph { margin: 0; display: flex; align-items: center; gap: 10px; font: 700 19px/1.1 var(--head); text-transform: uppercase; letter-spacing: .04em; color: #fff; }
.panel-head h2::before, .panel h2.ph::before { content: ""; width: 4px; height: 18px; background: var(--orange); }
.preview { grid-column: 1; grid-row: 1; }
.output { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 76px; }
.editor { grid-column: 1; grid-row: 2; }
@media (max-width: 1100px) {
  .bench-grid { grid-template-columns: minmax(0, 1fr); }
  .output { grid-column: 1; grid-row: 1; position: static; }
  .preview { grid-row: 2; }
  .editor { grid-row: 3; }
}
@media (min-width: 720px) and (max-width: 1100px) {
  .output-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .output-body > div:nth-child(3) { grid-column: 2; grid-row: 1 / span 3; }
  .output-body > :not(:nth-child(3)) { grid-column: 1; }
}
@media (max-width: 719px) { .cmp { max-width: 520px; } }
/* Generator: settings on the left, a sticky column with the live preview and the code on the right. */
.gen-grid { grid-template-columns: minmax(0, 1fr) 430px; }
.gen-grid .editor { grid-column: 1; grid-row: 1; }
.gen-side { grid-column: 2; grid-row: 1; position: sticky; top: 76px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; min-width: 0; }
.gen-side .preview, .gen-side .output { grid-column: auto; grid-row: auto; position: static; }
@media (max-width: 1100px) {
  .gen-grid { grid-template-columns: minmax(0, 1fr); }
  .gen-side { grid-column: 1; grid-row: 1; position: static; }
  .gen-grid .editor { grid-row: 2; }
}

.ph-tag { font: 700 12px/1 var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.stage { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; user-select: none; -webkit-user-select: none; }
.stage canvas { width: 100%; height: 100%; cursor: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.stage canvas:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
.stage-auto, .stage-hint { position: absolute; display: inline-flex; align-items: center; gap: 8px; border-radius: 3px; background: rgba(12, 13, 15, .62); color: #f2f2f2; font: 700 13px/1 var(--head); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; pointer-events: none; transition: opacity .2s, transform .2s; }
.stage-auto { top: 12px; left: 12px; padding: 7px 10px 6px; }
.stage-auto i { width: 8px; height: 8px; border-radius: 50%; background: #ff4d3d; animation: rec 1.6s ease-out infinite; }
@keyframes rec { 0% { box-shadow: 0 0 0 0 rgba(255, 77, 61, .6); } 70%, 100% { box-shadow: 0 0 0 7px rgba(255, 77, 61, 0); } }
.stage-hint { left: 50%; bottom: 16px; padding: 9px 14px 8px; border: 1px solid rgba(222, 155, 53, .55); opacity: 0; transform: translate(-50%, 6px); }
.stage-hint svg { width: 15px; height: 15px; flex: none; color: var(--orange-2); }
.stage .h-touch { display: none; }
.stage.is-hover .stage-hint, .stage.no-auto .stage-hint { opacity: 1; transform: translate(-50%, 0); }
.stage.is-hover .stage-auto, .stage.is-user .stage-auto, .stage.no-auto .stage-auto { opacity: 0; }
@media (hover: none) {
  .stage .h-mouse, .stage-hint svg { display: none; }
  .stage .h-touch { display: inline; }
  .stage-hint { opacity: 1; transform: translate(-50%, 0); }
}
@media (prefers-reduced-motion: reduce) { .stage-auto i { animation: none; } }
@media (max-width: 640px) { .stage { aspect-ratio: 4 / 3; } }
.fine { margin: 0; padding: 12px 18px 16px; font-size: 12.5px; color: var(--dim); }

.output-body { padding: 16px 18px 18px; display: grid; gap: 18px; }
.out-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font: 700 13px/1 var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.badge { padding: 4px 7px; border-radius: 2px; background: rgba(89, 191, 64, .14); color: #8fd679; font: 700 11px/1 var(--head); letter-spacing: .08em; }
.code { display: block; padding: 12px 12px; border-radius: 3px; border: 1px dashed rgba(222, 155, 53, .55); background: var(--field); font: 600 15px/1.45 var(--mono); color: #fff; word-break: break-all; user-select: all; -webkit-user-select: all; }
.output .btn.primary { width: 100%; margin-top: 10px; }
.cmd { margin: 0; max-height: 108px; overflow: auto; padding: 10px 12px; border-radius: 3px; border: 1px solid var(--line-2); background: var(--field); font: 12.5px/1.55 var(--mono); color: #cfd3d8; white-space: pre-wrap; word-break: break-word; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.btn-row .btn { padding: 0 10px; font-size: 14px; }
.btn-row .wide { grid-column: 1 / -1; }

.cmp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.cmp figure { margin: 0; min-width: 0; }
.cmp-view { position: relative; }
.cmp-view canvas { width: 100%; aspect-ratio: 1; border-radius: 3px; background: #c29a62; }
.cmp-tag { position: absolute; top: 8px; left: 8px; padding: 5px 8px 4px; border-radius: 2px; background: rgba(18, 20, 23, .84); color: #fff; font: 700 12px/1 var(--head); letter-spacing: .1em; text-transform: uppercase; pointer-events: none; }
.cmp-tag.new { background: var(--orange); color: #15171b; }
.cmp figcaption { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12.5px; line-height: 1.35; color: var(--muted); font-variant-numeric: tabular-nums; }
.cmp figcaption b { display: block; font: 700 14px/1.2 var(--head); letter-spacing: .02em; color: #e6e8ea; }
.cmp canvas.real { width: 44px; height: 44px; flex: none; border-radius: 2px; background: #c29a62; box-shadow: 0 0 0 1px var(--line-2); }
.cmp-note { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--dim); }
.cmp-key { display: block; margin-top: 6px; color: #f3b3ea; }
.cmp-key::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border: 2px solid #ff2bd6; border-radius: 1px; vertical-align: -1px; }
.match { font: 700 12px/1.2 var(--head); letter-spacing: .05em; text-transform: uppercase; text-align: right; }
.match.ok { color: #8fd679; } .match.warn { color: var(--warn); }
.notes { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.notes:empty { display: none; }
.notes li { position: relative; padding: 9px 10px 9px 30px; border-radius: 3px; background: rgba(227, 166, 76, .08); border: 1px solid rgba(227, 166, 76, .22); font-size: 13px; line-height: 1.5; color: #e9cfa5; }
.notes li::before { content: "!"; position: absolute; left: 10px; top: 9px; width: 14px; height: 14px; border-radius: 50%; background: var(--warn); color: #15171b; font: 700 11px/14px var(--sans); text-align: center; }
details.sum summary { cursor: pointer; font: 700 13px/1 var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 4px 0; }
details.sum summary:hover { color: #fff; }
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th { font: 700 12px/1.2 var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
tbody th { font-weight: 600; color: var(--muted); white-space: nowrap; }
.sw { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }

/* editor — modelled on the in-game settings rows */
/* Wide column: shape + dynamic. Narrow column: colour, outline, scope, with labels stacked over controls. */
.ed-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; gap: 4px 28px; padding: 8px 18px 18px; }
.ed-col { min-width: 0; }
.ed-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.ed-group legend { padding: 14px 0 8px; font: 700 13px/1 var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--orange); }
.ed-row { position: relative; display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 12px; padding: 7px 10px; border-radius: 2px; }
.ed-col.side .ed-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.ed-row .ctl { min-width: 0; }
.ed-row select { width: 100%; max-width: 280px; text-overflow: ellipsis; }
.ed-row .seg { max-width: 100%; }
.ed-row .seg button { padding: 0 9px; letter-spacing: .02em; }
.ed-row:nth-child(even) { background: rgba(255, 255, 255, .025); }
.ed-row.changed::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; background: var(--orange); }
.ed-row label { display: grid; gap: 2px; font-weight: 600; font-size: 14px; color: #e6e8ea; }
.ed-row label code { font-size: 10.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.range { display: grid; grid-template-columns: 28px minmax(40px, 1fr) 28px 64px; align-items: center; gap: 6px; }
.step { width: 28px; height: 28px; border-radius: 3px; border: 1px solid var(--line-2); background: var(--panel-2); color: #fff; cursor: pointer; font-size: 16px; line-height: 1; }
.step:hover { border-color: rgba(255, 255, 255, .3); }
.num { width: 64px; height: 30px; text-align: center; font-family: var(--mono); font-size: 13px; padding: 0 4px; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: #3a3f47; }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: #3a3f47; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 20px; margin-top: -8px; border-radius: 2px; background: #e6e8ea; border: 0; box-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
input[type="range"]::-moz-range-thumb { width: 12px; height: 20px; border-radius: 2px; background: #e6e8ea; border: 0; }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { background: var(--orange); }
.color { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.presets { display: flex; gap: 5px; }
.preset { width: 22px; height: 22px; border-radius: 3px; border: 2px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .3); }
.preset[aria-pressed="true"] { border-color: #fff; }
input[type="color"] { width: 36px; height: 30px; padding: 2px; border-radius: 3px; border: 1px solid var(--line-2); background: var(--field); cursor: pointer; }
.hex { width: 84px; height: 30px; font-family: var(--mono); font-size: 13px; text-transform: uppercase; }
@media (max-width: 760px) {
  .ed-grid { grid-template-columns: minmax(0, 1fr); }
  .ed-col.side .ed-row { grid-template-columns: 120px minmax(0, 1fr); gap: 12px; }
}
@media (max-width: 520px) {
  .ed-row, .ed-col.side .ed-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}

/* ------------------------------------------------------------------ guide */
.guide { background: var(--bg-2); border-top: 1px solid var(--line); }
.method { margin-top: 40px; }
.method-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 18px; }
.method-head h3 { margin: 0; font: 700 24px/1.1 var(--head); text-transform: uppercase; color: #fff; }
.method-head .tag { padding: 4px 8px; border-radius: 2px; background: var(--orange); color: #15171b; font: 700 12px/1 var(--head); letter-spacing: .08em; text-transform: uppercase; }
.method-head p { margin: 0; color: var(--muted); flex-basis: 100%; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li { counter-increment: step; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
.steps figure { margin: 0; aspect-ratio: 16 / 9; background: #0f1114; border-bottom: 1px solid var(--line); }
.steps figure svg { width: 100%; height: 100%; }
.steps .cap { padding: 14px 16px 16px; font-size: 14.5px; color: #cfd3d8; }
.steps .cap strong { display: block; margin-bottom: 4px; font: 700 17px/1.2 var(--head); text-transform: uppercase; color: #fff; }
.steps .cap strong::before { content: counter(step, decimal-leading-zero) " "; color: var(--orange); }
.steps .cap code { background: var(--field); padding: 1px 5px; border-radius: 3px; color: #fff; word-break: break-all; }
.callout { margin-top: 40px; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 18px; padding: 22px; border-radius: 6px; border: 1px solid rgba(222, 155, 53, .3); background: linear-gradient(135deg, rgba(222, 155, 53, .09), rgba(222, 155, 53, .02)); }
.callout .ico { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: rgba(222, 155, 53, .15); color: var(--orange); font: 700 28px/1 var(--display); }
.callout h3 { margin: 0 0 8px; font: 700 22px/1.15 var(--head); text-transform: uppercase; color: #fff; }
.callout ul { margin: 0; padding-left: 18px; color: #cfd3d8; }
.callout li + li { margin-top: 6px; }
.callout code { background: var(--field); padding: 1px 5px; border-radius: 3px; word-break: break-all; }
@media (max-width: 560px) { .callout { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------------ changes */
.changes-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1100px) { .changes-grid { grid-template-columns: minmax(0, 1fr); } }
.card td code { word-break: break-all; }
.card td:last-child { min-width: 8em; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 18px; }
.card h3 { margin: 0 0 12px; font: 700 18px/1.2 var(--head); text-transform: uppercase; letter-spacing: .04em; color: #fff; }
.card td code { color: #fff; }
.card td.old code { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(255, 122, 107, .6); }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 18px 26px; color: #cfd3d8; font-size: 14.5px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); }
.timeline li::after { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 2px; background: var(--line-2); }
.timeline li:last-child::after { display: none; }
.timeline b { display: block; font: 700 16px/1.2 var(--head); text-transform: uppercase; color: #fff; }

/* ------------------------------------------------------------------ faq */
.faq { background: var(--bg-2); border-top: 1px solid var(--line); }
.faq-list { display: grid; gap: 10px; max-width: 920px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; font: 700 18px/1.3 var(--head); color: #fff; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 26px; height: 26px; border-radius: 3px; display: grid; place-items: center; background: var(--panel-2); color: var(--orange); font: 700 18px/1 var(--display); }
.faq details[open] summary::after { content: "−"; }
.faq .a { padding: 0 18px 18px; color: #cfd3d8; }
.faq .a p { margin: 0 0 10px; }
.faq .a p:last-child { margin-bottom: 0; }
.faq .a code { background: var(--field); padding: 1px 5px; border-radius: 3px; color: #fff; }

/* ------------------------------------------------------------------ support band */
.support { position: relative; overflow: hidden; background: linear-gradient(170deg, #e8a645, #d08524 70%, #c9791b); color: var(--ink); isolation: isolate; }
.support::before { content: ""; position: absolute; inset: 0; z-index: -1; background: repeating-linear-gradient(115deg, transparent 0 26px, rgba(255, 255, 255, .1) 26px 27.5px); }
.support .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.support h2 { margin: 0; font: 700 clamp(28px, 3.4vw, 42px)/1.08 var(--head); text-transform: uppercase; color: var(--ink); }
.support p { margin: 10px 0 0; max-width: 60ch; color: #2a2116; font-size: 16px; }
.support .coffee-box { background: var(--bg); color: var(--text); border-radius: 6px; padding: 18px; min-width: 300px; box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .6); }
@media (max-width: 820px) { .support .wrap { grid-template-columns: minmax(0, 1fr); } .support .coffee-box { min-width: 0; } }
.btn.kofi { height: 48px; padding: 0 20px; font-size: 18px; }
.btn.kofi small { padding: 3px 6px 2px; border-radius: 2px; background: rgba(22, 24, 27, .16); font-size: 12px; letter-spacing: .06em; }
.support .btn.kofi { width: 100%; }
.coffee-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.support .coffee-note { color: var(--muted); }

/* ------------------------------------------------------------------ footer */
.foot { padding: 36px 0 44px; border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; }
.foot .wrap { display: grid; gap: 10px; }
.foot a { color: var(--muted); }
.foot-links, .foot-langs { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot-langs { padding-bottom: 6px; }
.foot-langs a { text-decoration: none; }
.foot-langs a:hover { color: #fff; }
.foot-langs a[aria-current="page"] { color: #e6e8ea; }

/* ------------------------------------------------------------------ dialog */
dialog.done { width: min(460px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); color: var(--text); box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .8); }
dialog.done::backdrop { background: rgba(6, 7, 9, .72); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
dialog.done[open] { animation: pop .18s ease-out; }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { dialog.done[open] { animation: none; } }
.dlg { position: relative; padding: 24px 24px 20px; }
.dlg-x { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border: 0; border-radius: 3px; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.dlg-x:hover { color: #fff; background: var(--panel-2); }
.dlg-ok { display: flex; align-items: center; gap: 12px; }
.dlg-ok .tick { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: rgba(89, 191, 64, .16); color: #8fd679; }
.dlg-ok .tick svg { width: 22px; height: 22px; }
.dlg h3 { margin: 0; font: 700 22px/1.15 var(--head); text-transform: uppercase; color: #fff; padding-right: 28px; }
.dlg-congrats { margin: 14px 0 0; font: 700 18px/1.3 var(--head); color: #8fd679; }
.dlg-next { margin: 12px 0 0; padding: 10px 12px; border-left: 3px solid var(--blue-2); background: rgba(75, 128, 189, .1); font-size: 14px; color: #cfdced; }
.dlg-guide { display: inline-flex; align-items: center; min-height: 36px; margin: 8px 0 0 -8px; padding: 6px 8px; border-radius: 3px; font-size: 14px; color: #9cc3ec; text-decoration: underline; text-decoration-color: rgba(156, 195, 236, .4); text-underline-offset: 3px; }
.dlg-guide:hover { color: #cfe2f7; background: rgba(75, 128, 189, .12); text-decoration-color: currentColor; }
.dlg-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.dlg-actions .btn.kofi { flex: 1 1 auto; }
.dlg-actions .btn.ghost { height: 48px; }
dialog.failed .tick { background: rgba(227, 166, 76, .16); color: var(--warn); }
.dlg-coffee .coffee-sub { margin: 0 0 14px; font-size: 15px; line-height: 1.55; color: #f0d3a6; }
.dlg hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0 18px; }
.coffee-sub { margin: 6px 0 14px; font-size: 14px; color: var(--muted); }

/* ------------------------------------------------------------------ hero responsive */
@media (max-width: 980px) {
  .hero { padding: 36px 0 44px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero-band { width: 70%; opacity: .9; clip-path: polygon(55% 0, 100% 0, 100% 100%, 30% 100%); }
  .hero-mark { display: none; }
}
@media (max-width: 560px) {
  .hero h1 { font-size: 34px; }
  .lede { font-size: 15.5px; }
  .input-card { padding: 16px; }
  .points { font-size: 13px; }
}
