/* Keylist — stiluri comune */
:root {
  --paper: #F5F7FA;
  --paper-deep: #EAEFF5;
  --ink: #0E1621;
  --ink-soft: #354253;
  --muted: #5A6778;
  --line: #D6DDE6;
  --brass: #C9973A;
  --brass-deep: #9C7020;
  --brass-tint: #F5EBD7;
  --teal: #2E6A64;
  --teal-tint: #E4EFED;
  --red: #A3321E;
  --red-tint: #F6E3DF;
  --white: #FFFFFF;
  --radius-lg: 18px;
  --radius-sm: 8px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1160px;
  --night: #0A111A;
  --night-2: #0F1823;
  --night-line: rgba(255,255,255,.09);
  --on-night: #E8EDF3;
  --on-night-soft: #9AA7B6;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--white); padding: 8px 14px; border-radius: 8px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 780px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(243, 245, 242, .92); backdrop-filter: blur(8px); border-bottom: 1px solid transparent; }
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 22px; letter-spacing: -0.02em; flex: none; }
.brand svg { width: 34px; height: 34px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 8px; color: var(--ink-soft); }
.nav a:hover { color: var(--ink); background: var(--paper-deep); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--paper-deep); }
.nav .btn { margin-left: 10px; padding: 10px 18px; font-size: 15px; color: var(--ink); }
.nav .btn:hover { background: #D6A447; color: var(--ink); }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1.5px solid var(--ink); border-radius: 999px; font: inherit; font-weight: 600; font-size: 15px; padding: 8px 14px; cursor: pointer; color: var(--ink); }

@media (max-width: 960px) {
  .menu-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 72px; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 8px; font-size: 17px; }
  .nav .btn { margin: 12px 0 0; justify-content: center; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 17px;
  padding: 15px 26px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--brass); color: var(--ink); text-decoration: none;
  box-shadow: inset 0 -3px 0 var(--brass-deep);
  transition: transform .12s, background .15s;
}
.btn:hover { background: #D6A447; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.dark { background: var(--ink); color: var(--white); box-shadow: none; }
.btn.dark:hover { background: #24313F; }
.btn:disabled { opacity: .55; cursor: default; }

/* ---------- Type ---------- */
h1 { font-size: clamp(38px, 5.8vw, 72px); line-height: 1.03; letter-spacing: -0.035em; font-weight: 800; margin: 0 0 22px; }
h2 { font-size: clamp(30px, 3.8vw, 46px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; margin: 0 0 14px; }
h3 { line-height: 1.3; letter-spacing: -0.01em; }
.lede { font-size: clamp(18px, 1.6vw, 20px); color: var(--ink-soft); max-width: 52ch; margin: 0 0 30px; }
.crumbs { font-size: 14px; color: var(--muted); margin: 0 0 18px; }
.crumbs a { text-decoration: none; font-weight: 600; color: var(--ink-soft); }
.crumbs a:hover { text-decoration: underline; }

section { padding: clamp(56px, 8vw, 104px) 0; }
.section-head { max-width: 680px; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head p { color: var(--ink-soft); margin: 0; font-size: 18px; }
.page-hero { padding: clamp(40px, 6vw, 80px) 0 clamp(40px, 5vw, 64px); }
.page-hero h1 { max-width: 18ch; }
.band-deep { background: var(--paper-deep); }
.band-dark { background: var(--ink); color: var(--paper); }
.band-dark h2, .band-dark h3 { color: var(--white); }
.band-dark .section-head p, .band-dark p { color: #C5CDD6; }

/* ---------- Hero (home) ---------- */
.hero { padding: clamp(32px, 6vw, 80px) 0 clamp(56px, 8vw, 104px); }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 { max-width: 13ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.hero-note { font-size: 15px; color: var(--muted); margin-top: 18px; }

/* ---------- Demo console ---------- */
.demo { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 24px 50px -30px rgba(24, 34, 46, .45); overflow: hidden; }
.demo-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px; background: var(--paper-deep); border-bottom: 1px solid var(--line); }
.demo-tabs::-webkit-scrollbar { display: none; }
.demo-tab { flex: none; font: inherit; font-size: 14px; font-weight: 600; padding: 8px 12px; border-radius: 8px; border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; }
.demo-tab:hover { background: rgba(255,255,255,.6); }
.demo-tab[aria-selected="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 2px rgba(24,34,46,.12); }
.demo-body { padding: 20px 22px 22px; min-height: 380px; }
.msg-user { margin: 0 0 16px auto; max-width: 88%; background: var(--ink); color: var(--white); padding: 11px 15px; border-radius: 14px 14px 4px 14px; font-size: 15px; width: fit-content; }
.msg-bot { font-size: 15px; color: var(--ink-soft); margin: 0 0 12px; }
.tool-line { font-family: var(--mono); font-size: 12.5px; color: var(--teal); background: var(--teal-tint); display: inline-block; padding: 3px 9px; border-radius: 6px; margin: 0 0 12px; }
.proposal { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.proposal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; background: var(--paper); border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 700; }
.badge { font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--brass-tint); color: var(--brass-deep); white-space: nowrap; }
.badge.ok { background: var(--teal-tint); color: var(--teal); }
.badge.warn { background: var(--red-tint); color: var(--red); }
.diff { width: 100%; border-collapse: collapse; font-size: 14px; }
.diff th { text-align: left; font-weight: 600; color: var(--muted); padding: 8px 14px; font-size: 13px; border-bottom: 1px solid var(--line); }
.diff td { padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.diff tr:last-child td { border-bottom: 0; }
.diff .old { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(163,50,30,.5); }
.diff .new { font-weight: 600; color: var(--ink); }
.diff .blocked { color: var(--red); font-weight: 600; }
.proposal-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--paper); }
.proposal-actions .btn { padding: 9px 16px; font-size: 14px; box-shadow: none; }
.approved-note { display: none; padding: 12px 14px; font-size: 14px; font-weight: 600; color: var(--teal); border-top: 1px solid var(--line); background: var(--teal-tint); }
.proposal.is-approved .proposal-actions { display: none; }
.proposal.is-approved .approved-note { display: block; }
.proposal.is-rejected .proposal-actions { display: none; }
.proposal.is-rejected .rejected-note { display: block; }
.rejected-note { display: none; padding: 12px 14px; font-size: 14px; font-weight: 600; color: var(--ink-soft); border-top: 1px solid var(--line); background: var(--paper); }
.demo-foot { font-size: 13px; color: var(--muted); margin: 12px 0 0; }

@media (prefers-reduced-motion: no-preference) {
  .demo-panel.entering .msg-user { animation: pop .35s ease-out both; }
  .demo-panel.entering .msg-bot, .demo-panel.entering .tool-line { animation: fade .35s ease-out .25s both; }
  .demo-panel.entering .proposal { animation: rise .45s cubic-bezier(.2,.8,.2,1) .45s both; }
}
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Strip of channels ---------- */
.strip { padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.strip .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.strip p { margin: 0; font-size: 15px; color: var(--muted); }
.strip ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; }
.strip li { font-weight: 700; font-size: 18px; color: var(--ink-soft); letter-spacing: -0.01em; }

/* ---------- Ruled list ---------- */
.jobs { border-top: 1.5px solid var(--ink); }
.job { display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: 12px 40px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.job h3 { font-size: 21px; margin: 0; }
.job p { margin: 0; color: var(--ink-soft); max-width: 62ch; }
.job .more { display: inline-block; margin-top: 10px; font-weight: 700; font-size: 15px; text-decoration: none; color: var(--brass-deep); }
.job .more:hover { text-decoration: underline; }

/* ---------- Tool catalogue ---------- */
.toolgroup { display: grid; grid-template-columns: minmax(220px, 1fr) 2.4fr; gap: 20px 48px; padding: 40px 0; border-top: 1.5px solid var(--ink); }
.toolgroup:last-child { border-bottom: 1px solid var(--line); }
.toolgroup-head h2 { font-size: clamp(24px, 2.6vw, 32px); margin: 0 0 10px; }
.toolgroup-head p { margin: 0; color: var(--ink-soft); font-size: 16px; }
.tools { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.tools li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.tools code { font-family: var(--mono); font-size: 13px; color: var(--teal); }
.tools strong { display: block; font-size: 17px; margin: 2px 0 4px; }
.tools span { display: block; color: var(--ink-soft); font-size: 15px; }
.tools .write { display: inline-block; font-size: 12px; font-weight: 700; color: var(--brass-deep); background: var(--brass-tint); padding: 1px 8px; border-radius: 999px; margin-left: 6px; vertical-align: 2px; }

/* ---------- Before / after ---------- */
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ba-col { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; }
.ba-col.before { background: var(--paper-deep); border-style: dashed; border-color: #BCC6D2; }
.ba-label { font-size: 14px; font-weight: 700; color: var(--muted); margin: 0 0 14px; }
.ba-col pre { margin: 0; font-family: var(--mono); font-size: 13px; line-height: 1.7; color: var(--ink-soft); white-space: pre-wrap; word-break: break-word; }
.ba-col h3 { font-size: 20px; margin: 0 0 10px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 15px; margin: 0 0 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--teal-tint); color: var(--teal); }
.chip svg { width: 14px; height: 14px; }
.chip.soft { background: var(--paper-deep); color: var(--ink-soft); }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 40px); counter-reset: step; }
.steps.four { grid-template-columns: repeat(4, 1fr); }
.steps li { counter-increment: step; border-top: 2px solid var(--brass); padding-top: 20px; }
.steps li::before { content: counter(step); display: block; font-size: 44px; font-weight: 800; line-height: 1; color: var(--brass); margin-bottom: 14px; }
.steps h3 { font-size: 20px; margin: 0 0 8px; }
.steps p { margin: 0; }
.band-dark .steps p { color: #C5CDD6; }

/* ---------- Two column feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.split.flip { grid-template-columns: 1.1fr 1fr; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist svg { flex: none; width: 20px; height: 20px; margin-top: 4px; color: var(--teal); }
.band-dark .checklist li { border-bottom-color: #2D3A48; }
.band-dark .checklist svg { color: var(--brass); }
.checklist b { display: block; color: inherit; }
.band-dark .checklist b { color: var(--white); }

/* ---------- Log table ---------- */
.log { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; font-size: 14px; }
.log th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 12px 16px; background: var(--paper); border-bottom: 1px solid var(--line); }
.log td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.log tr:last-child td { border-bottom: 0; }
.log code { font-family: var(--mono); font-size: 12.5px; color: var(--teal); }
.table-scroll { overflow-x: auto; border-radius: var(--radius-lg); }

/* ---------- Integrations ---------- */
.integrations { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 32px; border-top: 1.5px solid var(--ink); }
.integ { padding: 22px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.integ-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.integ h3 { font-size: 20px; margin: 0; }
.integ p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.integ a.more { font-weight: 700; font-size: 15px; text-decoration: none; color: var(--brass-deep); margin-top: 4px; }
.integ a.more:hover { text-decoration: underline; }
.integ-group { margin: 48px 0 16px; font-size: 22px; }
.integ-group:first-child { margin-top: 0; }

/* ---------- Scenario (marketplace pages) ---------- */
.scenario { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(28px, 4vw, 56px); padding: clamp(40px, 5vw, 64px) 0; border-top: 1px solid var(--line); align-items: start; }
.scenario:first-of-type { border-top: 1.5px solid var(--ink); }
.scenario h3 { font-size: clamp(22px, 2.3vw, 28px); margin: 0 0 12px; }
.scenario p { color: var(--ink-soft); margin: 0 0 14px; }
.scenario .tools-used { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.scenario .tools-used code { font-family: var(--mono); font-size: 12.5px; color: var(--teal); background: var(--teal-tint); padding: 3px 9px; border-radius: 6px; }

/* ---------- FAQ ---------- */
.faq { border-top: 1.5px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; font-weight: 700; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(45deg) translate(-3px, -3px); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq .answer { padding: 0 0 22px; color: var(--ink-soft); max-width: 70ch; }
.faq .answer p { margin: 0 0 10px; }

/* ---------- Founder ---------- */
.founder-quote { font-size: clamp(22px, 2.3vw, 28px); line-height: 1.4; letter-spacing: -0.01em; font-weight: 500; margin: 0 0 22px; max-width: 34ch; }
.founder-sign { font-weight: 700; margin: 0; }
.founder-sign small { display: block; font-weight: 400; color: var(--muted); font-size: 15px; }
.pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pills li { font-size: 15px; font-weight: 600; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: var(--white); }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band h2 { color: var(--white); margin: 0 0 6px; max-width: 20ch; }
.cta-band p { margin: 0; color: #C5CDD6; }

/* ---------- Form ---------- */
.signup-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.signup-copy p { color: var(--ink-soft); margin: 0 0 16px; max-width: 44ch; }
form.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 34px); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
label, legend { display: block; font-weight: 600; font-size: 15px; margin-bottom: 7px; }
.opt { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper); transition: border-color .15s, background .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); background: var(--white); }
textarea { min-height: 96px; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.checks { display: flex; flex-wrap: wrap; gap: 10px; }
.check { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; font-size: 15px; padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; background: var(--paper); }
.check:has(input:checked) { border-color: var(--ink); background: var(--white); }
.check input { accent-color: var(--ink); width: 16px; height: 16px; margin: 0; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; color: var(--ink-soft); margin: 4px 0 22px; }
.consent input { accent-color: var(--ink); width: 18px; height: 18px; margin: 2px 0 0; flex: none; }
.consent a { font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
form.card .btn { width: 100%; }
.form-status { margin: 14px 0 0; font-size: 15px; min-height: 1.6em; }
.form-status.error { color: var(--red); }
.done h3 { font-size: 24px; margin: 0 0 8px; }
.done p { margin: 0; color: var(--ink-soft); }

/* ---------- Legal ---------- */
.legal h2 { font-size: clamp(22px, 2.4vw, 28px); margin: 44px 0 12px; }
.legal h3 { font-size: 19px; margin: 26px 0 8px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal .meta { color: var(--muted); font-size: 15px; }
.legal .fill { background: var(--brass-tint); color: var(--brass-deep); padding: 0 6px; border-radius: 4px; font-weight: 600; }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { color: var(--muted); font-weight: 600; font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--paper-deep); padding: 56px 0 32px; font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.foot-grid h4 { font-size: 14px; color: var(--muted); font-weight: 600; margin: 0 0 12px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 8px; }
.foot-grid a { text-decoration: none; font-weight: 600; color: var(--ink-soft); }
.foot-grid a:hover { color: var(--ink); text-decoration: underline; }
.foot-grid .about { color: var(--muted); max-width: 32ch; margin: 12px 0 0; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero .wrap, .split, .split.flip, .signup-grid, .scenario { grid-template-columns: 1fr; }
  .steps, .steps.four { grid-template-columns: 1fr 1fr; }
  .job, .toolgroup { grid-template-columns: 1fr; }
  .integrations { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .steps, .steps.four, .ba, .tools, .integrations { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; gap: 0; }
  .demo-body { padding: 16px; min-height: 0; }
  .diff { font-size: 13px; }
  .diff th, .diff td { padding: 8px 10px; }
  .foot-grid { grid-template-columns: 1fr; }
}

/* ================= Tech theme ================= */
body {
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(14,22,33,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14,22,33,.035) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* Dark header */
.site-header { background: rgba(10,17,26,.86); border-bottom: 1px solid var(--night-line); }
.site-header.scrolled { border-bottom-color: rgba(255,255,255,.14); }
.site-header .brand { color: #fff; }
.site-header .brand svg rect, .site-footer .brand svg rect { fill: #1B2838; }
.nav a { color: #B8C3D0; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.08); }
.menu-toggle { color: #fff; border-color: rgba(255,255,255,.5); }
@media (max-width: 960px) {
  .nav { background: var(--night); border-bottom-color: var(--night-line); }
}

/* Dark heroes with grid and glow */
.hero, .page-hero, .band-dark, .cta-band {
  position: relative; isolation: isolate; overflow: hidden;
  background-color: var(--night); color: var(--on-night);
  background-image:
    radial-gradient(ellipse 60% 55% at 85% 10%, rgba(201,151,58,.22), transparent 70%),
    radial-gradient(ellipse 50% 60% at 5% 100%, rgba(42,165,150,.18), transparent 70%),
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: auto, auto, 56px 56px, 56px 56px;
}
.band-dark, .cta-band {
  background-image:
    radial-gradient(ellipse 50% 70% at 100% 0%, rgba(201,151,58,.16), transparent 70%),
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: auto, 56px 56px, 56px 56px;
}
.hero h1, .page-hero h1, .page-hero h2 { color: #fff; }
.hero .lede, .page-hero .lede { color: #B8C3D0; }
.hero-note { color: #8494A6; }
.page-hero .crumbs { color: #8494A6; }
.page-hero .crumbs a { color: #C9D2DD; }
.page-hero .meta { color: #8494A6; }
.hero-actions .btn.ghost, .page-hero .btn.ghost, .band-dark .btn.ghost { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.45); }
.hero-actions .btn.ghost:hover, .page-hero .btn.ghost:hover { background: #fff; color: var(--ink); }
.grad {
  background: linear-gradient(92deg, #E7B95A 0%, #C9973A 45%, #4FC1B2 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .demo { border-color: rgba(255,255,255,.12); box-shadow: 0 0 0 1px rgba(255,255,255,.04), 0 40px 80px -30px rgba(0,0,0,.7), 0 0 80px -20px rgba(201,151,58,.25); }
.demo { color: var(--ink); }
.legal { padding-top: clamp(40px, 6vw, 72px); }

/* Sections */
.band-deep { background-color: var(--paper-deep); background-image: linear-gradient(rgba(14,22,33,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(14,22,33,.05) 1px, transparent 1px); background-size: 56px 56px; }
.band-grid { background: linear-gradient(180deg, var(--paper) 0%, #E6ECF4 100%); }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--brass-deep); margin: 0 0 12px !important; }
.strip { background: rgba(255,255,255,.6); }
.site-footer { background: var(--paper-deep); }

/* ================= Dashboard & charts ================= */
.dash {
  background: var(--night-2); color: var(--on-night); border-radius: 22px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 40px 80px -40px rgba(10,17,26,.65);
  padding: clamp(14px, 2vw, 22px);
}
.dash.solo { padding: 0; background: none; border: 0; box-shadow: none; }
.dash.solo .chart-card { box-shadow: 0 30px 60px -36px rgba(10,17,26,.6); }
.dash-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px; padding: 4px 6px 16px; }
.dash-title { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; color: #fff; }
.dash-title .dot { width: 8px; height: 8px; border-radius: 50%; background: #3FC6B4; box-shadow: 0 0 0 4px rgba(63,198,180,.18); }
.dash-meta { font-family: var(--mono); font-size: 12px; color: var(--on-night-soft); }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 10px; }
.kpi { background: #142130; border: 1px solid var(--night-line); border-radius: 14px; padding: 14px 16px 10px; display: flex; flex-direction: column; }
.kpi p { margin: 0; }
.kpi-label { font-size: 13px; color: var(--on-night-soft); font-weight: 600; }
.kpi-val { font-size: clamp(22px, 2.2vw, 28px); font-weight: 800; letter-spacing: -0.02em; color: #fff; margin: 4px 0 2px !important; font-variant-numeric: tabular-nums; }
.kpi-delta { font-size: 13px; font-weight: 700; color: #5CC9BB; }
.kpi-delta.flat { color: #C9D2DD; }
.kpi-delta span { font-weight: 400; color: var(--on-night-soft); }
.spark { width: 100%; height: 32px; margin-top: 8px; }

.dash-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 10px; }
.dash-grid .chart-card.wide { grid-row: span 2; }
.chart-card { background: #142130; border: 1px solid var(--night-line); border-radius: 14px; padding: 18px; color: var(--on-night); min-width: 0; }
.chart-head h3 { margin: 0 0 4px; font-size: 16px; color: #fff; }
.chart-head p { margin: 0 0 14px; font-size: 13.5px; color: var(--on-night-soft); line-height: 1.5; }
.legend { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--on-night); }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 14px; height: 4px; border-radius: 2px; }

.chart { position: relative; }
.line-chart { padding: 6px 70px 26px 36px; }
.plot { position: relative; height: 240px; }
.plot-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.plot-svg .gl { stroke: rgba(255,255,255,.08); stroke-width: 1; vector-effect: non-scaling-stroke; }
.plot-svg .base { stroke: rgba(255,255,255,.22); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ytick { position: absolute; left: -36px; transform: translateY(50%); font-size: 11.5px; color: var(--on-night-soft); font-variant-numeric: tabular-nums; }
.xtick { position: absolute; top: calc(100% + 8px); font-size: 11.5px; color: var(--on-night-soft); white-space: nowrap; transform: translateX(-50%); }
.xtick.start { transform: none; }
.xtick.end { transform: translateX(-100%); }
.endlab { position: absolute; left: calc(100% + 8px); transform: translateY(50%); font-size: 12px; font-weight: 600; color: var(--on-night); white-space: nowrap; }
.hits { position: absolute; inset: 0; display: flex; }
.hit { flex: 1; cursor: crosshair; }
.xhair { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.45); opacity: 0; pointer-events: none; }
.line-chart.hovering .xhair { opacity: 1; }

.hbars { display: grid; grid-template-columns: minmax(0, max-content) 1fr auto; gap: 10px 12px; align-items: center; }
.hbar, .wf { display: contents; }
.hbar-label { font-size: 13px; color: var(--on-night); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { position: relative; height: 14px; }
.hbar-track[style*="--be"]::after { content: ""; position: absolute; z-index: 1; left: var(--be); top: -6px; bottom: -6px; border-left: 1.5px dashed rgba(255,255,255,.6); }
.hbar-fill { position: absolute; top: 0; bottom: 0; left: 0; background: #2AA596; border-radius: 0 4px 4px 0; }
.hbar.low .hbar-fill { background: #E0644E; }
.hbar-val { font-size: 13px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbar-val em { font-style: normal; font-weight: 600; color: #F08B78; font-size: 12px; margin-left: 4px; }
.hbar[data-tip] > *, .wf[data-tip] > * { cursor: default; }
.waterfall .hbar-fill { border-radius: 3px; }
.wf.total .hbar-fill { background: #6F8EF0; }
.wf.cost .hbar-fill { background: rgba(224,100,78,.75); }
.wf.net .hbar-fill { background: #2AA596; }
.wf.net .hbar-label, .wf.total .hbar-label { font-weight: 700; }

.chart-tip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 150px;
  background: #fff; color: var(--ink); border-radius: 10px; padding: 9px 12px;
  font-size: 12.5px; line-height: 1.5; box-shadow: 0 12px 30px -8px rgba(0,0,0,.55);
  opacity: 0; transition: opacity .12s;
}
.chart-tip.show { opacity: 1; }
.chart-tip b { display: block; font-size: 13px; margin-bottom: 2px; }
.chart-tip span { display: flex; align-items: center; gap: 7px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chart-tip i { width: 10px; height: 3px; border-radius: 2px; flex: none; }

.chart-table { margin-top: 16px; font-size: 13px; }
.chart-table summary { cursor: pointer; color: var(--on-night-soft); font-weight: 600; width: fit-content; }
.chart-table summary:hover { color: #fff; }
.chart-table table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.chart-table caption { text-align: left; color: var(--on-night-soft); padding-bottom: 6px; }
.chart-table th, .chart-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--night-line); }
.chart-table th { color: var(--on-night-soft); font-weight: 600; }

.insight .proposal { border-color: rgba(255,255,255,.12); background: #fff; color: var(--ink); }

.defs { margin: 0; display: grid; gap: 14px; }
.defs dt { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--teal); }
.defs dd { margin: 2px 0 0; color: var(--ink-soft); }

/* Reveal on scroll */
@media (prefers-reduced-motion: no-preference) {
  .js .chart .plot-svg { clip-path: inset(0 100% 0 0); transition: clip-path 1.4s cubic-bezier(.3,.7,.2,1); }
  .js .chart .hbar-fill { transform: scaleX(0); transform-origin: left; transition: transform .9s cubic-bezier(.3,.7,.2,1); }
  .js .chart .spark { opacity: 0; transition: opacity .8s .3s; }
  .js .in-view .chart .plot-svg { clip-path: inset(0 0 0 0); }
  .js .in-view .chart .hbar-fill { transform: none; }
  .js .in-view .spark { opacity: 1; }
}

@media (max-width: 960px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-grid .chart-card.wide { grid-row: auto; }
  .kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .line-chart { padding: 6px 62px 26px 30px; }
  .plot { height: 200px; }
  .ytick { left: -30px; }
  .chart-card { padding: 14px; }
  .hbar-label { white-space: normal; max-width: 120px; }
  .kpi { padding: 12px 12px 8px; }
}

.chart-card.wide { display: flex; flex-direction: column; }
.chart-card.wide .line-chart { flex: 1; display: flex; flex-direction: column; }
.chart-card.wide .plot { flex: 1; min-height: 240px; height: auto; }
.hbars.stacked { grid-template-columns: 1fr; gap: 14px; }
.stacked .hbar { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: baseline; }
.stacked .hbar-track { grid-row: 2; grid-column: 1 / -1; height: 12px; background: rgba(255,255,255,.05); border-radius: 0 4px 4px 0; }
@media (max-width: 640px) {
  .stacked .hbar-label { max-width: none; }
  .chart-card.wide .plot { min-height: 200px; }
}
@media (max-width: 640px) {
  .xtick.minor { display: none; }
  .kpi-val { font-size: 20px; }
  .hbars.waterfall { grid-template-columns: 1fr; gap: 12px; }
  .waterfall .wf { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: baseline; }
  .waterfall .hbar-track { grid-row: 2; grid-column: 1 / -1; height: 12px; background: rgba(255,255,255,.05); }
}
