:root {
  color-scheme: dark;
  --bg: #0b0e14;
  --elev: #111622;
  --panel: #0e131e;
  --text: #f1f5f9;
  --muted: #a5b2c5;
  --border: #2a3445;
  --cyan: #38bdf8;
  --indigo: #818cf8;
  --emerald: #10b981;
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1rem/1.55 var(--font); }
button, input, select, textarea { font: inherit; color: inherit; }
button, .button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
a { color: var(--cyan); text-underline-offset: .2em; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
code, textarea { font-family: var(--mono); }
fieldset, dl, dd { margin: 0; }
fieldset { min-inline-size: 0; }
h1, h2, h3, p { margin: 0; }
h1, h2 { line-height: 1.12; letter-spacing: -.035em; }
.skip-link { position: absolute; top: .75rem; left: .75rem; z-index: 2; padding: .6rem .9rem; background: var(--elev); transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.shell { width: min(100% - 3rem, 71rem); margin-inline: auto; }
.site-header, .site-footer { background: #0d1119; }
.site-header { border-bottom: 1px solid var(--border); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.125rem; flex-wrap: wrap; }
.brand { display: inline-flex; gap: .55rem; align-items: center; color: var(--text); font-size: 1.05rem; font-weight: 750; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid #275467; border-radius: .5rem; background: #102735; color: var(--cyan); }
.header-inner nav { display: flex; flex-wrap: wrap; gap: clamp(.65rem, 3vw, 1.75rem); }
.header-inner nav a { color: var(--muted); font-size: .85rem; text-decoration: none; }
.header-inner nav a:hover, .brand:hover { color: var(--cyan); }
.header-cta { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.header-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2rem; padding: .34rem .68rem; border: 1px solid var(--border); border-radius: .45rem; font-size: .79rem; font-weight: 650; line-height: 1.2; text-decoration: none; white-space: nowrap; transition: border-color .15s ease, background-color .15s ease, color .15s ease; }
.header-btn.primary { color: #071822; background: var(--cyan); border-color: var(--cyan); }
.header-btn.primary:hover { background: #7dd3fc; border-color: #7dd3fc; color: #071822; }
.header-btn.secondary { color: var(--text); background: #192131; border-color: #34435a; }
.header-btn.secondary:hover { border-color: var(--cyan); color: #bae6fd; }
.hero { position: relative; isolation: isolate; padding: clamp(2rem, 5vw, 3.75rem) 0 clamp(1.6rem, 4vw, 2.6rem); }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(ellipse at 70% 5%, #142036 0, transparent 65%); pointer-events: none; }
.eyebrow { display: flex; align-items: center; gap: .55rem; color: var(--muted); font: 600 .72rem/1.45 var(--mono); letter-spacing: .075em; text-transform: uppercase; }
.dot { flex: none; width: .5rem; height: .5rem; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 12px #10b98160; }
.slash { color: var(--indigo); }
.index { color: #9cacf9; margin-bottom: .4rem; }
.hero h1 { margin-block: .65rem; font-size: clamp(2.12rem, 5.25vw, 4.05rem); }
.hero > p:last-child { color: var(--muted); max-width: 70ch; }
.hero strong { color: var(--text); font-weight: 600; }
.builder-grid { display: grid; grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr); align-items: start; gap: .9rem; margin-bottom: 1.4rem; }
.result-stack { display: grid; gap: .9rem; min-width: 0; }
.workbench, .cta { min-width: 0; border: 1px solid var(--border); border-radius: 1rem; background: var(--elev); }
.section-heading { padding: clamp(.9rem, 2vw, 1.3rem); border-bottom: 1px solid var(--border); }
.section-heading h2, .cta h2, .faq h2 { font-size: clamp(1.33rem, 2.5vw, 1.84rem); }
.tool-body { padding: clamp(.8rem, 2vw, 1.3rem); }
button, .button { border: 1px solid var(--border); border-radius: .45rem; padding: .45rem .7rem; background: #192131; font-size: .84rem; font-weight: 650; line-height: 1.25; }
button:hover:not(:disabled), .button:hover { border-color: var(--cyan); }
.presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; margin-bottom: 1.05rem; }
.presets > p { grid-column: 1 / -1; }
.presets button { display: flex; align-items: center; gap: .42rem; text-align: left; min-height: 2.4rem; }
.preset-mark { flex: 0 0 .58rem; height: .58rem; border-radius: 50%; background: var(--cyan); }
[data-preset="fintech"] .preset-mark { background: #2563eb; }
[data-preset="editorial"] .preset-mark { background: #c98445; }
[data-preset="terminal"] .preset-mark { background: var(--emerald); }
.presets button[aria-pressed="true"] { background: #142c3c; border-color: #34647c; color: #addef2; }
.token-fields { display: grid; gap: .95rem; }
.token-fields fieldset { border: 0; border-top: 1px solid var(--border); padding: .15rem 0 0; }
.token-fields legend { padding-right: .55rem; color: var(--text); font-size: .86rem; font-weight: 700; }
.field-label, .token-fields label { color: #cbd5e1; font-size: .78rem; font-weight: 600; }
.optional { color: var(--muted); font-weight: 400; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem .68rem; }
.field-grid.colors { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-grid label, .color-field { min-width: 0; }
.field-grid input, .field-grid select { display: block; width: 100%; min-width: 0; min-height: 2.3rem; padding: .38rem .55rem; border: 1px solid var(--border); border-radius: .4rem; background: #0d1119; font: .82rem/1.35 var(--mono); }
.field-grid label > input, .field-grid label > select, .paint-input { margin-top: .2rem; }
.field-grid [aria-invalid="true"] { border-color: #fb7185; }
.paint-input { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: .27rem; }
.paint-input input { padding-inline: .36rem; }
.paint-input input[type="color"] { padding: .21rem; height: 2.3rem; cursor: pointer; }
.paint-input input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.paint-input input[type="color"]::-webkit-color-swatch { border: 1px solid #8896a375; border-radius: .18rem; }
.hint, .status, .notice { font-size: .8rem; overflow-wrap: anywhere; }
.hint { color: var(--muted); margin-top: .4rem; }
.status { color: #ace4fc; }
.notice { color: #f9ce88; margin-top: .45rem; }
.preview-stage {
  background: var(--live-canvas, #0b0e14);
  padding: clamp(.75rem, calc(var(--live-unit, 4px) * 3), 1.5rem);
  border: 1px solid var(--border);
  border-radius: .65rem;
}
.sample-card {
  display: grid;
  gap: calc(var(--live-unit, 4px) * 1.5);
  padding: clamp(.75rem, calc(var(--live-unit, 4px) * 4), 2rem);
  border: 1px solid var(--live-border, #334155);
  border-radius: var(--live-card-radius, 16px);
  background: var(--live-surface, #111827);
  color: var(--live-text, #f8fafc);
  font: var(--live-size-body, 16px)/1.55 var(--live-font-body, system-ui, sans-serif);
  overflow-wrap: anywhere;
}
.sample-top, .sample-actions { display: flex; align-items: center; justify-content: space-between; gap: calc(var(--live-unit, 4px) * 2); flex-wrap: wrap; }
.sample-brand { font-weight: 700; font-size: var(--live-size-small, 12.8px); }
.sample-badge { border-radius: 999px; padding: .18rem .55rem; color: var(--live-on-accent, #000); background: var(--live-accent, #818cf8); font-size: var(--live-size-small, 12.8px); font-weight: 700; }
.sample-card h3 { font: 700 var(--live-size-display, 25px)/1.15 var(--live-font-heading, system-ui, sans-serif); letter-spacing: -.03em; }
.sample-body { max-width: 46ch; }
.sample-actions { justify-content: flex-start; margin-top: calc(var(--live-unit, 4px) * 1.5); }
.sample-button { display: inline-flex; align-items: center; gap: .5rem; padding: calc(var(--live-unit, 4px) * 1.5) calc(var(--live-unit, 4px) * 3); border-radius: var(--live-button-radius, 8px); background: var(--live-primary, #38bdf8); color: var(--live-on-primary, #000); font-weight: 650; }
.sample-code { padding: .22rem .55rem; border: 1px solid var(--live-border, #334155); border-radius: .35rem; font: var(--live-size-code, 12.8px)/1.45 var(--live-font-mono, ui-monospace, monospace); }
.sample-studio { font-size: var(--live-size-small, 12.8px); }
.audit { margin-top: .8rem; }
.audit h3 { display: flex; justify-content: space-between; gap: .3rem .8rem; flex-wrap: wrap; font-size: .84rem; }
.audit h3 span { font-size: .75rem; font-weight: 400; color: var(--muted); }
.audit-list > div { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .3rem .5rem; padding: .45rem 0; border-bottom: 1px solid var(--border); }
.audit-list dt { color: #cbd5e1; font-size: .82rem; font-weight: 600; }
.audit-list dd { display: flex; align-items: center; flex-wrap: wrap; gap: .28rem; }
.audit-list strong { font: 700 .86rem/1.4 var(--mono); font-variant-numeric: tabular-nums; margin-right: .28rem; }
.badge { border-radius: .4rem; padding: .19rem .38rem; background: #1a2433; border: 1px solid #34435a; font-size: .72rem; color: #cbd5e1; white-space: nowrap; }
.badge.pass { background: #122c26; color: #8ce7be; border-color: #295446; }
.badge.fail { background: #321e2b; color: #ffb7c0; border-color: #633341; }
.output-bar { padding: .35rem .7rem; border-bottom: 1px solid var(--border); background: #141b29; }
.tabs { display: flex; flex-wrap: wrap; gap: .18rem; }
.tabs button { border-color: transparent; background: transparent; color: var(--muted); padding: .43rem .48rem; font-size: .77rem; }
.tabs button[aria-selected="true"] { background: #1c2d41; color: #b0e9ff; border-color: #304d63; }
.code-out { display: block; width: 100%; min-width: 0; min-height: 10rem; padding: .72rem .85rem; border: 0; border-radius: 0; background: var(--panel); color: #b5e7fb; font-size: .8rem; line-height: 1.6; resize: vertical; tab-size: 2; }
.code-out:focus-visible { outline-offset: -2px; }
.export-actions { min-height: 3.2rem; display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; padding: .55rem .7rem; border-top: 1px solid var(--border); }
.export-actions .notice { flex-basis: 100%; margin: 0; }
.micro-nudge { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem .75rem; padding: .55rem .78rem; border-top: 1px solid #24364a; border-radius: 0 0 1rem 1rem; background: #0d1624; font-size: .79rem; line-height: 1.45; color: #cbd5e1; transition: border-color .28s ease, background-color .28s ease, box-shadow .28s ease; }
.micro-nudge .nudge-link { font-weight: 650; color: var(--cyan); text-decoration: none; white-space: nowrap; }
.micro-nudge .nudge-link:hover { color: #7dd3fc; text-decoration: underline; }
.micro-nudge.is-highlighted { border-top-color: var(--cyan); background: #13283d; box-shadow: inset 0 0 0 1px rgba(56, 189, 248, .35), 0 0 18px rgba(56, 189, 248, .18); }
.copy { background: #101724; }
.cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; padding: clamp(1rem, 2.3vw, 1.6rem); border-color: #34405d; background: linear-gradient(115deg, #131b2a, #111622 62%); }
.cta p:not(.eyebrow) { margin-top: .5rem; color: var(--muted); max-width: 66ch; }
.cta-actions { display: flex; flex-direction: column; align-items: stretch; gap: .5rem; }
.cta-more { align-self: center; font-size: .8rem; }
.button { display: inline-flex; justify-content: center; align-items: center; text-align: center; text-decoration: none; color: var(--text); min-height: 2.35rem; }
.primary { color: #071822; background: var(--cyan); border-color: var(--cyan); }
.primary:hover { background: #7dd3fc; }
.related { margin: 1.5rem 0 1.8rem; }
.related h2 { margin-bottom: .75rem; font-size: clamp(1.33rem, 2.5vw, 1.84rem); }
.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.related-card { display: grid; gap: .25rem; padding: .95rem 1.05rem; border: 1px solid var(--border); border-radius: .85rem; background: var(--elev); text-decoration: none; color: var(--text); }
.related-card:hover { border-color: var(--cyan); }
.related-card strong { color: #e2e8f0; font-size: .95rem; }
.related-card span { color: var(--muted); font-size: .83rem; }
.faq { margin: 1.9rem 0 2.6rem; }
.faq h2 { margin-bottom: .65rem; }
.faq details { border-bottom: 1px solid var(--border); padding: .55rem 0; }
.faq summary { cursor: pointer; font-weight: 650; }
.faq p { color: var(--muted); margin: .4rem 0 .3rem 1.15rem; max-width: 78ch; }
.site-footer { border-top: 1px solid var(--border); }
.footer-inner { justify-content: space-between; color: var(--muted); font-size: .83rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: clamp(.65rem, 2.2vw, 1.35rem); }
.footer-links a { color: var(--muted); font-size: .83rem; text-decoration: none; }
.footer-links a:hover { color: var(--cyan); }
@media (max-width: 940px) {
  .field-grid.colors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .shell { width: calc(100% - 1.5rem); }
  .header-inner { padding-block: .6rem; gap: .5rem .85rem; }
  .builder-grid, .related-grid, .cta { grid-template-columns: minmax(0, 1fr); }
  .cta-actions { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 440px) {
  .header-cta { width: 100%; }
  .header-btn { font-size: .76rem; padding: .34rem .58rem; }
  .micro-nudge .nudge-link { white-space: normal; }
}
@media (max-width: 390px) {
  .header-inner, .footer-inner { padding-block: .55rem; gap: .45rem .75rem; }
  .field-grid input, .field-grid select { font-size: .77rem; }
  .tabs button { font-size: .72rem; padding-inline: .25rem; }
}
