/* Copyright (c) 2026 Meenox. All rights reserved. Owner: Raj Meena, Meenox. */
/* Schema Forge. Light theme only: soft lavender white, deep indigo ink, violet for action and lemon for emphasis. Soft SVG waves behind the page. */
:root {
  --bg: #f7f6fd; --surface: #ffffff; --ink: #231f4a; --muted: #625e8c; --line: #e5e3f6;
  --accent: #5f4fe0; --accent-ink: #ffffff; --accent-soft: #e9e6fd; --accent-deep: #4638b8; --pop: #ffe14d;
  --ok: #0e7a4b; --warn: #8a5200; --bad: #b3261e;
  --code-bg: #231f4a; --code-ink: #ecebfb; --code-key: #b8b0ff; --code-str: #ffe14d; --code-mute: #a29fcc;
  --shadow: 0 1px 2px rgba(35, 31, 74, .06), 0 8px 24px -12px rgba(35, 31, 74, .12);
  --display: "Syne", "Segoe UI", system-ui, sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 50; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 8px; }
.shell { max-width: 1180px; margin: 0 auto; padding-inline: 20px; }
main.shell { padding-bottom: 24px; }

/* ---------- header ---------- */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 10px 24px; padding-block: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; font: 800 1.2rem/1 var(--display); letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.mark { width: 38px; height: 38px; border-radius: 10px; background: var(--accent); display: grid; place-items: center; flex: none; }
.mark svg { width: 26px; height: auto; display: block; }
.mark path { fill: var(--pop); }
.bar nav { flex: 1; min-width: 0; }
.links { display: flex; gap: 2px 6px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; font-weight: 600; font-size: .94rem; color: var(--ink); text-decoration: none; }
.links a:hover { background: var(--accent-soft); color: var(--accent-deep); }
.links a[aria-current] { background: var(--accent-soft); color: var(--accent-deep); }
.bar .row { margin-left: auto; }
@media (max-width: 860px) { .bar nav { order: 3; flex-basis: 100%; overflow-x: auto; } .links { flex-wrap: nowrap; } .links a { white-space: nowrap; } }

/* ---------- buttons, chips, forms ---------- */
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn { font: 600 .94rem var(--body); min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.btn:hover { border-color: var(--accent); color: var(--accent-deep); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--accent-ink); }
.btn.pop { background: var(--pop); border-color: var(--pop); color: var(--ink); }
.btn.pop:hover { background: #f2cf1c; border-color: #f2cf1c; color: var(--ink); }
.btn.small { min-height: 44px; }
.btn:disabled { opacity: .65; cursor: progress; }
.chip { font: 500 .78rem var(--mono); padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: var(--surface); }
.chip.ok { color: var(--ok); border-color: currentColor; } .chip.warn { color: var(--warn); border-color: currentColor; } .chip.bad { color: var(--bad); border-color: currentColor; }
.eyebrow { display: inline-block; font: 500 .76rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-deep); background: var(--accent-soft); padding: 5px 12px; border-radius: 999px; margin: 0 0 16px; }
label, .lab { font: 500 .74rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
input[type=text], input[type=date], select, textarea { font: 15px/1.5 var(--body); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%; min-height: 48px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { min-height: 84px; resize: vertical; }
.field { display: grid; gap: 8px; margin-bottom: 16px; }
.hint { color: var(--muted); font-size: .88rem; margin: 0; }
.err { color: var(--bad); font-size: .92rem; margin: 12px 0 0; font-weight: 600; }
.status { color: var(--muted); font-size: .92rem; margin: 12px 0 0; min-height: 1.4em; }
kbd { font: 500 .74rem var(--mono); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; background: var(--surface); }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font: 500 .92rem var(--body); letter-spacing: 0; text-transform: none; color: var(--ink); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.mark-hl { background: linear-gradient(transparent 64%, var(--pop) 64% 92%, transparent 92%); padding: 0 .08em; }

/* ---------- type ---------- */
h1 { font: 800 clamp(2.1rem, 4.6vw, 3.6rem)/1.04 var(--display); letter-spacing: -.03em; margin: 0 0 16px; text-wrap: balance; }
h2 { font: 700 clamp(1.5rem, 2.6vw, 2.05rem)/1.15 var(--display); letter-spacing: -.02em; margin: 0 0 12px; text-wrap: balance; }
h3 { font: 700 1.12rem/1.3 var(--display); margin: 0 0 6px; }
.lede { color: var(--muted); font-size: 1.1rem; max-width: 62ch; margin: 0 0 24px; }
.meta { color: var(--muted); font-size: .86rem; margin: 6px 0 0; }

/* ---------- page head, sections ---------- */
.crumbs ol { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: .86rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line); }
.crumbs a { color: var(--muted); }
.page-head { padding: 28px 0 8px; }
.page-head h1 { max-width: 22ch; }
.section { margin-top: 80px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head p { margin: 0; color: var(--muted); max-width: 58ch; }
.panel, .box { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); }
.box { display: grid; gap: 8px; align-content: start; }
.box p { margin: 0; color: var(--muted); font-size: .95rem; }
.ico { width: 28px; height: 28px; color: var(--accent); }
.icon-tile { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; margin-bottom: 8px; }
.icon-tile .ico { width: 24px; height: 24px; }

/* ---------- home: hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 48px 0 8px; }
@media (max-width: 960px) { .hero { grid-template-columns: minmax(0, 1fr); padding-top: 28px; } }
.hero h1 { max-width: 15ch; }
.preview { background: var(--code-bg); border-radius: 20px; box-shadow: 0 24px 48px -24px rgba(35, 31, 74, .45); overflow: hidden; min-width: 0; }
.preview-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid rgba(255, 255, 255, .1); flex-wrap: wrap; }
.preview-bar .file { font: 500 .8rem var(--mono); color: var(--code-mute); }
.preview pre { margin: 0; padding: 18px 20px; color: var(--code-ink); overflow: auto; font: 12.5px/1.65 var(--mono); max-height: 360px; }
.pillbar { display: inline-flex; gap: 4px; }
.pillbar button { background: none; border: 1px solid rgba(255, 255, 255, .18); color: var(--code-mute); font: 500 .78rem var(--mono); min-height: 32px; padding: 0 12px; border-radius: 999px; cursor: pointer; }
.pillbar button[aria-selected=true] { background: var(--pop); border-color: var(--pop); color: var(--ink); }
.k { color: var(--code-key); } .s { color: var(--code-str); }

/* ---------- home: facts, bento, steps, pills, principles ---------- */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 40px; }
@media (max-width: 860px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.fact strong { display: block; font: 800 1.6rem/1.1 var(--display); letter-spacing: -.02em; }
.fact span { color: var(--muted); font-size: .88rem; }
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.b { grid-column: span 2; position: relative; display: grid; gap: 8px; align-content: start; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; color: var(--ink); text-decoration: none; box-shadow: var(--shadow); min-width: 0; }
.b p { margin: 0; color: var(--muted); font-size: .95rem; }
.b .go { margin-top: 6px; font-weight: 700; font-size: .92rem; color: var(--accent); }
.b:hover { border-color: var(--accent); color: var(--ink); }
.b-lg { grid-column: span 3; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.b-lg:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--accent-ink); }
.b-lg p { color: #f1efff; } .b-lg .go { color: #fff; } .b-lg .icon-tile { background: rgba(255, 255, 255, .14); } .b-lg .ico { color: var(--pop); }
.b-md { grid-column: span 3; }
@media (max-width: 900px) { .bento { grid-template-columns: minmax(0, 1fr); } .b, .b-lg, .b-md { grid-column: auto; } }
.flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: s; position: relative; }
@media (max-width: 820px) { .flow { grid-template-columns: minmax(0, 1fr); } }
.flow .step { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; position: relative; box-shadow: var(--shadow); }
.flow .step::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--pop); color: var(--ink); font: 800 1rem var(--display); margin-bottom: 14px; }
.flow .step p { margin: 0; color: var(--muted); font-size: .95rem; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: .94rem; color: var(--ink); text-decoration: none; }
a.pill:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep); }
.pill .ico { width: 20px; height: 20px; }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 820px) { .principles { grid-template-columns: minmax(0, 1fr); } }
.cta-band { display: flex; justify-content: space-between; align-items: center; gap: 16px 28px; flex-wrap: wrap; padding: 32px; border-radius: 24px; background: var(--ink); color: #fff; }
.cta-band h2 { margin: 0 0 6px; } .cta-band p { margin: 0; color: #c4c0ea; max-width: 52ch; }
.meenox-band { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.meenox-band p { color: var(--muted); max-width: 62ch; }
.meenox-band .btn { flex: none; }
.legal a { color: inherit; font-weight: 600; }

/* ---------- accordion, tabs ---------- */
.acc { display: grid; gap: 10px; }
.acc details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 20px; }
.acc details[open] { border-color: var(--accent); box-shadow: var(--shadow); }
.acc summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; cursor: pointer; list-style: none; font: 700 1.02rem/1.35 var(--display); padding-block: 8px; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-deep); display: grid; place-items: center; font: 500 1.2rem/1 var(--mono); }
.acc details[open] summary::after { content: "\2212"; background: var(--accent); color: var(--accent-ink); }
.acc .acc-body { padding: 0 0 18px; color: var(--muted); }
.acc .acc-body > :first-child { margin-top: 0; } .acc .acc-body > :last-child { margin-bottom: 0; }
.acc .acc-body p { margin: 0 0 10px; }
.acc-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0 0 18px; }
.acc-tools input { max-width: 340px; }
.filter { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; min-height: 40px; padding: 0 16px; font: 600 .88rem var(--body); cursor: pointer; color: var(--ink); }
.filter[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: #fff; }
.tabs.js [role=tablist] { display: inline-flex; gap: 4px; padding: 4px; background: var(--accent-soft); border-radius: 999px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs [role=tablist] { display: none; }
.tabs.js [role=tablist] { display: inline-flex; }
.tabs [role=tab] { border: 0; background: none; min-height: 40px; padding: 0 16px; border-radius: 999px; font: 600 .9rem var(--body); color: var(--accent-deep); cursor: pointer; }
.tabs [role=tab][aria-selected=true] { background: var(--accent); color: var(--accent-ink); }
.tabs .panel-item + .panel-item { margin-top: 16px; }
.tabs.js .panel-item[hidden] { display: none !important; }

/* ---------- document pages: content with a side contents list ---------- */
.doc { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 48px; align-items: start; margin-top: 28px; }
@media (max-width: 960px) { .doc { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
.toc { position: sticky; top: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; order: 2; }
.toc .lab { display: block; margin-bottom: 8px; }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.toc a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--muted); font-size: .9rem; font-weight: 600; text-decoration: none; }
.toc a:hover { background: var(--accent-soft); color: var(--accent-deep); }
.toc a.on { background: var(--accent-soft); color: var(--accent-deep); }
@media (max-width: 960px) { .toc { position: static; order: 0; } .toc ol { display: flex; flex-wrap: wrap; gap: 6px; } .toc a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; } }
.doc-main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px; }
.doc-main > section { min-width: 0; }
.doc-main section { scroll-margin-top: 20px; }
.doc-main h2 { margin-bottom: 14px; }
.prose { max-width: 72ch; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }
.prose code, .acc code, .box code, .glance code, .note code, td code { font: .88em var(--mono); background: var(--accent-soft); color: var(--accent-deep); border-radius: 5px; padding: 1px 6px; }
.glance { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; background: var(--accent-soft); border: 1px solid #d5d0f8; border-radius: 20px; padding: 22px 24px; }
.glance .icon-tile { background: var(--surface); grid-row: span 2; margin: 0; }
.glance .lab { color: var(--accent-deep); }
.glance p { margin: 0; font-size: 1.08rem; }
.note { background: #fff8e6; border: 1px solid #ffe2a0; border-radius: 16px; padding: 16px 20px; color: #5a3b00; }
.note strong { color: #3d2800; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .split { grid-template-columns: minmax(0, 1fr); } }
.split .box h3 { display: flex; align-items: center; gap: 8px; }
.split ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: .95rem; }
.mistakes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mistakes li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.mistakes svg { width: 24px; height: 24px; color: var(--bad); margin-top: 1px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: t; }
.timeline li { counter-increment: t; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; position: relative; padding-bottom: 28px; }
.timeline li::before { content: counter(t); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 800 1.05rem var(--display); z-index: 1; }
.timeline li::after { content: ""; position: absolute; left: 21px; top: 44px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child { padding-bottom: 0; } .timeline li:last-child::after { display: none; }
.timeline h3 { margin-top: 8px; }
.timeline p { margin: 0 0 8px; color: var(--muted); }

/* ---------- tables, code, endpoints ---------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; min-width: 520px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 500 .74rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--bg); }
tr:last-child td { border-bottom: 0; }
.code { border-radius: 16px; overflow: hidden; background: var(--code-bg); margin: 0; }
.code pre { margin: 0; padding: 16px 18px; color: var(--code-ink); overflow: auto; font: 13px/1.65 var(--mono); max-height: 460px; }
.code figcaption { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 16px; font: 500 .78rem var(--mono); color: var(--code-mute); border-bottom: 1px solid rgba(255, 255, 255, .1); }
.code figcaption button { display: none; background: none; border: 1px solid rgba(255, 255, 255, .22); color: var(--code-ink); font: 500 .76rem var(--mono); border-radius: 8px; min-height: 30px; padding: 0 10px; cursor: pointer; }
.ep { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; display: grid; gap: 10px; }
.ep-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.method { font: 700 .76rem var(--mono); background: var(--ok); color: #fff; border-radius: 8px; padding: 4px 10px; letter-spacing: .04em; }
.method.post { background: var(--accent); }
.ep code.path { font: 600 .98rem var(--mono); background: none; color: var(--ink); padding: 0; word-break: break-all; }
.ep p { margin: 0; color: var(--muted); }
.ep-grid { display: grid; gap: 14px; }

/* ---------- footer ---------- */
.foot { margin-top: 96px; padding: 48px 0 40px; background: var(--surface); border-top: 1px solid var(--line); }
.foot .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 860px) { .foot .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .foot .cols { grid-template-columns: minmax(0, 1fr); } }
.foot h2 { font: 500 .74rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.foot a { display: inline-flex; min-height: 36px; align-items: center; color: var(--ink); text-decoration: none; font-weight: 500; }
.foot a:hover { color: var(--accent); }
.foot .brand { margin-bottom: 12px; }
.foot p { margin: 0; color: var(--muted); font-size: .92rem; max-width: 44ch; }
.legal { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .84rem; }

/* ---------- the tool: results, cards, code panel, fill-in form ---------- */
.formgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.tool-panel { padding: 28px; }
.results { margin-top: 32px; }
.sechead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cover { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.coverline { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin: 0 0 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.card { position: relative; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; color: var(--ink); font: inherit; cursor: pointer; display: grid; gap: 10px; align-content: start; min-height: 132px; box-shadow: var(--shadow); }
.card:hover { border-color: var(--accent); }
.card[aria-selected=true] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; background: var(--accent-soft); }
.card .name { font: 700 1.05rem/1.2 var(--display); }
.card .state { font-size: .84rem; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.state.ok { color: var(--ok); } .state.ready { color: var(--accent-deep); } .state.none { color: var(--muted); }
.meter { display: flex; gap: 4px; }
.meter i { width: 22px; height: 5px; border-radius: 3px; background: var(--line); }
.meter i.on { background: var(--pop); }
.out { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.codewrap { border-radius: 18px; overflow: hidden; background: var(--code-bg); min-width: 0; }
.codebar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.codebar .file { font: 500 .82rem var(--mono); color: var(--code-mute); }
.seg { display: inline-flex; border: 1px solid rgba(255, 255, 255, .2); border-radius: 10px; overflow: hidden; }
.seg button { background: none; border: 0; color: var(--code-mute); font: 500 .8rem var(--mono); min-height: 36px; padding: 0 12px; cursor: pointer; }
.seg button[aria-pressed=true] { background: rgba(255, 225, 77, .22); color: var(--code-str); }
.codebar .btn { min-height: 38px; background: transparent; color: var(--code-ink); border-color: rgba(255, 255, 255, .24); font-size: .84rem; }
.codebar .btn.copy { background: var(--pop); color: var(--ink); border-color: var(--pop); }
.codewrap pre { margin: 0; padding: 18px; color: var(--code-ink); overflow: auto; max-height: 540px; font: 13px/1.65 var(--mono); tab-size: 2; }
.todo { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; }
.todo h3 { margin: 0 0 12px; }
.todo ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.todo li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; color: var(--muted); font-size: .92rem; }
.todo li svg { width: 18px; height: 18px; margin-top: 3px; color: var(--warn); }
.empty { padding: 26px; border: 1.5px dashed var(--line); border-radius: 18px; color: var(--muted); background: var(--surface); }
.fill .fillgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 4px 16px; margin-top: 14px; }
.fill .field { margin-bottom: 8px; }
.validation { margin: 0 0 22px; display: grid; gap: 8px; }
.validation h3 { margin: 0; }
.vrow { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 16px; }
.vrow summary { display: flex; align-items: center; gap: 12px; min-height: 48px; cursor: pointer; list-style: none; }
.vrow summary::-webkit-details-marker { display: none; }
.vrow summary::after { content: "+"; margin-left: auto; font: 500 1.1rem var(--mono); color: var(--muted); }
.vrow[open] summary::after { content: "\2212"; }
.vtype { font: 700 1rem var(--display); }
.vrow ul { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.vrow li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; color: var(--muted); font-size: .92rem; }
.vrow li svg { width: 18px; height: 18px; margin-top: 3px; color: var(--warn); }
.vrow li.verr { color: var(--ink); } .vrow li.verr svg { color: var(--bad); }
.watchbox { margin-top: 18px; }
.watchbox h3 { margin-bottom: 4px; }
.panel > .status:first-child { margin: 0 0 14px; }
.scan-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.scan-actions .field { margin-bottom: 0; }
progress { width: 100%; height: 10px; border-radius: 6px; accent-color: var(--accent); }
.scan-summary { margin: 16px 0; font-size: 1.02rem; }
.scan-table { min-width: 720px; }
.scan-table .path { font: 500 .86rem var(--mono); overflow-wrap: anywhere; }
.scan-table .hint { margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.drop { outline: 2px dashed var(--accent); outline-offset: 4px; }
.filebtn { position: relative; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.filebtn:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.example { color: var(--warn); font-size: .82rem; margin: 0; }
.js .code figcaption button { display: inline-flex; align-items: center; }
.preview-note { margin: 12px 0 0; }

@media (prefers-reduced-motion: no-preference) {
  .cards.enter .card { animation: rise .45s ease-out backwards; animation-delay: calc(var(--i) * 60ms); }
  .codewrap.enter { animation: rise .45s ease-out backwards; }
  .codewrap.swap { animation: rise .2s ease-out backwards; }
  .todo.enter { animation: rise .45s ease-out .2s backwards; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  .btn, .b, .card, a.pill, .toc a { transition: border-color .15s, background-color .15s, color .15s; }
  .go-busy { opacity: .85; }
}

/* Waves: four soft layers drifting at different speeds behind everything. Calm by design, and still when motion is reduced. */
.waves { position: fixed; inset: auto 0 0 0; height: min(42vh, 380px); z-index: -1; pointer-events: none; overflow: hidden;
  -webkit-mask-image: linear-gradient(to top, #000 55%, transparent); mask-image: linear-gradient(to top, #000 55%, transparent); }
.wave { position: absolute; left: 0; bottom: 0; width: 200%; height: 100%; will-change: transform; }
.wave path { fill: var(--accent); }
.wave.w1 { height: 100%; } .wave.w1 path { fill: var(--pop); opacity: .22; }
.wave.w2 { height: 86%; } .wave.w2 path { fill: var(--accent-soft); opacity: .6; }
.wave.w3 { height: 68%; } .wave.w3 path { opacity: .055; }
.wave.w4 { height: 48%; } .wave.w4 path { opacity: .075; }
@media (max-width: 700px) { .waves { height: 30vh; } }
@media (prefers-reduced-motion: no-preference) {
  .wave { animation: drift 60s linear infinite; }
  .wave.w2 { animation-duration: 90s; animation-direction: reverse; }
  .wave.w3 { animation-duration: 48s; }
  .wave.w4 { animation-duration: 36s; animation-direction: reverse; }
  @keyframes drift { to { transform: translateX(-50%); } }
}

/* ---- generator extras: recent addresses, pasted HTML, score, editor, where to paste ---- */
.recent { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.recent .lab, .coverline .lab { color: var(--muted); font: 600 .72rem var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.recent .chips { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; }
button.chip.pick { cursor: pointer; color: var(--accent-deep); border-color: var(--line); font-family: var(--mono); }
button.chip.pick:hover { border-color: var(--accent); background: var(--accent-soft); }
.linkbtn { background: none; border: 0; padding: 4px 6px; color: var(--muted); font: inherit; font-size: .85rem; text-decoration: underline; cursor: pointer; border-radius: 6px; }
.linkbtn:hover { color: var(--ink); }
.pastebox { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.pastebox summary { cursor: pointer; font-weight: 600; color: var(--accent-deep); }
.pastebox[open] summary { margin-bottom: 12px; }
.pastebox textarea { font: 13px/1.5 var(--mono); min-height: 130px; }

.scorebox { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 18px; }
.scorebox > *, .where, .elig { min-width: 0; }
.scorebox:empty { display: none; }
.score { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px 22px; }
.score-num { display: flex; align-items: baseline; gap: 2px; font-family: var(--display); }
.score-num strong { font-size: 2.6rem; line-height: 1; letter-spacing: -.02em; }
.score-num span { color: var(--muted); font-size: .9rem; }
.score.ok .score-num strong { color: var(--ok); } .score.warn .score-num strong { color: var(--warn); } .score.bad .score-num strong { color: var(--bad); } .score.none .score-num strong { color: var(--muted); }
.score h3 { margin: 0 0 6px; font-size: 1.05rem; }
.score ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: .92rem; }
.notice { margin: 0; background: #fff8e6; border: 1px solid #ffe2a0; border-radius: 14px; padding: 12px 16px; color: #5a3b00; font-size: .93rem; }
.badgebox { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.badgebox summary { cursor: pointer; font-weight: 600; color: var(--accent-deep); }
.badgebox[open] summary { margin-bottom: 10px; }
.badgebox > * + * { margin-top: 10px; }
.badgeimg { display: block; height: 22px; width: auto; }
.snip { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; min-width: 0; }
.snip-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 8px 6px 14px; background: var(--accent-soft); font-size: .88rem; }
.snip pre { margin: 0; padding: 12px 14px; background: var(--code-bg); color: var(--code-ink); font: 12.5px/1.55 var(--mono); overflow-x: auto; }

.elig, .where { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; margin-top: 16px; }
.elig h3, .where h3 { margin: 0 0 12px; }
.elig dl { display: grid; gap: 4px 0; margin: 0; }
.elig dt { font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.elig dt:first-child { margin-top: 0; }
.elig dd { margin: 0; color: var(--muted); font-size: .95rem; max-width: 70ch; }
.where ol { margin: 0 0 14px; padding-left: 20px; color: var(--muted); display: grid; gap: 8px; max-width: 74ch; }
.where .tabs { margin: 0; }
.where .tabs.js [role=tablist] { border-radius: 14px; }

.editor { width: 100%; display: block; font: 13px/1.55 var(--mono); background: var(--code-bg); color: var(--code-ink); border: 0; border-radius: 0 0 16px 16px; padding: 16px 18px; min-height: 280px; resize: vertical; tab-size: 2; }
.editor:focus { outline: 3px solid var(--accent); outline-offset: -3px; }
.livecheck { padding: 12px 16px; background: var(--surface); border-radius: 0 0 16px 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.livecheck p { margin: 0; justify-self: start; }
.livecheck ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: .9rem; display: grid; gap: 4px; }
.livecheck li.verr { color: var(--bad); }

.history { margin-top: 6px; font-size: .88rem; }
.history summary { cursor: pointer; color: var(--accent-deep); }
.history ol { margin: 8px 0 0; padding-left: 18px; color: var(--muted); display: grid; gap: 4px; }
.history time { font-family: var(--mono); font-size: .78rem; margin-right: 4px; }
.llmsout { background: var(--code-bg); color: var(--code-ink); font: 13px/1.6 var(--mono); border-radius: 16px; padding: 18px 20px; overflow: auto; max-height: 520px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 12px; }
.scan-table td:nth-child(2) { white-space: nowrap; }
@media (max-width: 560px) { .score { grid-template-columns: minmax(0, 1fr); } }

.page-head > .icon-tile { margin-bottom: 14px; }
