/* ==========================================================
   CodeLogic Solutions
   ========================================================== */

:root {
  --paper: #FAF8F4;
  --tint: #F3EFE7;
  --surface: #FFFFFF;
  --ink: #15203A;
  --ink-2: #2E3852;
  --muted: #5B6478;
  --line: #E6E1D6;
  --line-strong: #D5CEC0;
  --brand: #1B2A4A;
  --accent: #C8441E;
  --accent-hover: #AE3915;
  --accent-soft: #FBE9E2;
  --ok: #17803D;
  --danger: #B42318;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Public Sans", "Segoe UI", system-ui, sans-serif;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(21, 32, 58, .06);
  --shadow: 0 1px 2px rgba(21, 32, 58, .05), 0 12px 32px -16px rgba(21, 32, 58, .22);
  --max: 1160px;
  --header-h: 72px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 .5em;
  font-weight: 700;
}
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #2F6FEB; outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: var(--r-sm);
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 8px; border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; line-height: 1.2; text-decoration: none;
  cursor: pointer; transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn-lg { padding: 14px 22px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-outline { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); }
.btn-product { background: var(--c-ink, var(--brand)); color: #fff; }
.btn-product:hover { filter: brightness(.9); }
.btn-text { padding-left: 4px; padding-right: 4px; color: var(--c-ink, var(--accent)); }
.btn-text:hover { text-decoration: underline; text-underline-offset: 3px; }
.btn[disabled] { opacity: .65; cursor: progress; }

/* ---------- Top bar & header ---------- */
.topbar { background: var(--brand); color: #C9D1E0; font-size: .82rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; height: 36px; }
.topbar-links { display: flex; gap: 22px; }
.topbar a { text-decoration: none; color: #fff; }
.topbar a:hover { text-decoration: underline; }

.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 244, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.header.is-scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { border-radius: 9px; }
.brand-word {
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; color: var(--ink);
  letter-spacing: -0.02em; line-height: 1;
}
.brand-word b { font-weight: 800; }
.brand-word small {
  display: block; margin-top: 3px; font-family: var(--font-body);
  font-size: .62rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
}
.brand-light .brand-word, .brand-light .brand-word small { color: #fff; }
.brand-light .brand-word small { color: #AEB8CB; }

.menu { display: flex; align-items: center; gap: 28px; }
.menu a:not(.btn) {
  text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--ink-2);
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.menu a:not(.btn):hover { color: var(--ink); border-bottom-color: var(--line-strong); }
.menu a.is-active { color: var(--ink); border-bottom-color: var(--accent); }

.menu-toggle { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; }
.menu-toggle span { position: absolute; left: 11px; width: 22px; height: 2px; background: var(--ink); transition: transform .2s, top .2s; }
.menu-toggle span:first-child { top: 17px; }
.menu-toggle span:last-child { top: 25px; }
.menu-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 48px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: 64px; align-items: start; }
.kicker {
  font-size: .85rem; font-weight: 600; color: var(--accent); margin-bottom: 18px;
  display: inline-flex; align-items: center; gap: 10px;
}
.kicker::before { content: ""; width: 24px; height: 2px; background: currentColor; }
.hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.35rem); font-weight: 700; letter-spacing: -0.025em; max-width: 16ch; }
.hero-lead { font-size: 1.14rem; color: var(--ink-2); max-width: 54ch; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 18px; font-size: .92rem; color: var(--muted); }
.hero-note a { color: var(--ink); font-weight: 600; }

.pindex {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 10px; box-shadow: var(--shadow);
}
.pindex-title {
  font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); padding: 10px 12px 6px; margin: 0;
}
.pindex ul { list-style: none; }
.pindex a {
  display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--r);
  text-decoration: none; transition: background-color .15s;
}
.pindex a:hover { background: var(--tint); }
.pindex img { border-radius: 9px; flex: none; }
.pindex span { flex: 1; min-width: 0; }
.pindex b { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.pindex small { color: var(--muted); font-size: .88rem; }
.arrow { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s, stroke .15s; }
.pindex a:hover .arrow { transform: translateX(3px); stroke: var(--c); }
.pindex li + li a { border-top: 1px solid var(--line); border-radius: 0; }
.pindex li + li a:hover { border-radius: var(--r); border-top-color: transparent; }

.facts {
  list-style: none; display: flex; flex-wrap: wrap; gap: 10px 0;
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line);
  font-size: .9rem; font-weight: 500; color: var(--muted);
}
.facts li { display: flex; align-items: center; }
.facts li:not(:last-child)::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); margin: 0 16px; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-tint { background: var(--tint); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2, .apex-intro h2, .faq-head h2, .demo-info h2 { font-size: clamp(1.75rem, 3vw, 2.35rem); }
.section-head p { font-size: 1.06rem; color: var(--muted); margin: 0; }

/* ---------- Product explorer ---------- */
.explorer {
  display: grid; grid-template-columns: 250px minmax(0, 1fr);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); overflow: hidden;
}
.tabs { display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #FCFBF8; padding: 10px; gap: 2px; }
.tabs [role="tab"] {
  display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
  padding: 12px; border: 0; border-radius: var(--r); background: none; cursor: pointer;
  position: relative; transition: background-color .15s;
}
.tabs [role="tab"]:hover { background: var(--tint); }
.tabs [role="tab"][aria-selected="true"] { background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.tabs [role="tab"][aria-selected="true"]::before {
  content: ""; position: absolute; left: -10px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c);
}
.tabs img { border-radius: 8px; flex: none; }
.tabs b { display: block; font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: 1rem; line-height: 1.2; }
.tabs small { color: var(--muted); font-size: .82rem; }

.panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding: 40px; align-items: start; }
.panel[hidden] { display: none; }
.lockup { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.lockup img { border-radius: 11px; }
.lockup h3 { font-size: 1.6rem; margin: 0; font-weight: 600; }
.lockup h3 span { font-weight: 800; color: var(--c-ink); }
.lockup p { margin: 0; font-size: .88rem; color: var(--muted); }
.panel-for { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink); margin-bottom: 8px; }
.panel-lead { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; line-height: 1.3; color: var(--ink); margin-bottom: 12px; }
.panel-copy > p:not([class]) { color: var(--muted); }

.ticks { list-style: none; margin: 20px 0 28px; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; font-weight: 500; color: var(--ink-2); }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 6px; width: 14px; height: 8px;
  border-left: 2.5px solid var(--c); border-bottom: 2.5px solid var(--c); transform: rotate(-45deg);
}
.panel-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }

/* sample screens */
.screen { margin: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; font-size: .84rem; }
.screen-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #F7F5F0; border-bottom: 1px solid var(--line); }
.screen-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.screen-bar em { font-style: normal; margin-left: 8px; font-weight: 600; font-size: .78rem; color: var(--muted); }
.screen-body { padding: 16px; border-top: 3px solid var(--c); margin-top: -1px; }
.screen-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.screen-kpis div { border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.screen-kpis small { display: block; font-size: .72rem; color: var(--muted); }
.screen-kpis b { font-family: var(--font-display); font-size: 1.35rem; color: var(--ink); }
.screen-kpis .warn b { color: #B45309; }
.screen-kpis .good b { color: var(--ok); }
.screen-table { width: 100%; border-collapse: collapse; }
.screen-table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.screen-table td { padding: 8px; border-bottom: 1px solid #F0ECE4; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.screen-table td:first-child { font-weight: 600; color: var(--ink); }
.screen-table .r { text-align: right; }
.screen-table .neg { color: var(--danger); }
.screen-sum { margin: 12px 0 0; display: grid; gap: 6px; }
.screen-sum div { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.screen-sum dt { color: var(--muted); }
.screen-sum dd { margin: 0; font-weight: 600; color: var(--ink); }
.screen-sum .total { border-top: 1px dashed var(--line-strong); padding-top: 8px; margin-top: 4px; }
.screen-sum .total dt { color: var(--ink); font-weight: 700; }
.screen-sum .total dd { font-family: var(--font-display); font-size: 1.1rem; color: var(--c-ink); }
.screen-sum.wide div { padding: 4px 0; }
.chip { display: inline-block; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #EEF0F4; color: var(--muted); }
.chip.ok { background: #E5F4EA; color: var(--ok); }
.chip.now { background: #E3F1F1; color: #0B6468; }
.chip.low { background: #FDECEC; color: var(--danger); }
.screen figcaption { padding: 8px 14px; font-size: .72rem; color: var(--muted); border-top: 1px solid var(--line); background: #FCFBF8; }

/* ---------- Why APEX ---------- */
.apex { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 72px; align-items: start; }
.apex-intro p { color: var(--ink-2); }
.apex-hosting { margin-top: 24px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); font-size: .95rem; }
.apex-hosting strong { color: var(--ink); }
.reasons { list-style: none; counter-reset: r; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.reasons li { counter-increment: r; background: var(--surface); padding: 28px; }
.reasons li::before {
  content: "0" counter(r); display: block; font-family: var(--font-display); font-weight: 700;
  font-size: .85rem; color: var(--accent); margin-bottom: 14px;
}
.reasons h3 { font-size: 1.12rem; margin-bottom: 8px; }
.reasons p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Desktop: intro stays pinned while the reasons scroll past as a list */
@media (min-width: 1041px) {
  .apex-intro { position: sticky; top: calc(var(--header-h) + 40px); }
  .reasons { grid-template-columns: 1fr; gap: 14px; background: none; border: 0; border-radius: 0; overflow: visible; }
  .reasons li {
    padding: 32px 36px; border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: var(--r-lg);
    transition: border-color .3s, box-shadow .3s;
  }
  .reasons li.is-current { border-left-color: var(--accent); box-shadow: var(--shadow); }
}

/* Hero product list entrance (class set in <head>, animated by animations.js) */
.motion .pindex li { opacity: 0; }

/* ---------- Process ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; position: relative; }
/* line runs from the centre of step 1 to the centre of step 4 */
.steps::before { content: ""; position: absolute; top: 19px; left: 20px; right: calc((100% - 84px) / 4 - 20px); height: 1px; background: var(--line-strong); }
.steps-fill { position: absolute; top: 19px; left: 20px; right: calc((100% - 84px) / 4 - 20px); height: 2px; margin-top: -.5px; background: var(--accent); transform-origin: left center; }
.steps li { position: relative; }
.step-no {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--paper); border: 1.5px solid var(--ink); font-family: var(--font-display); font-weight: 700; color: var(--ink);
  margin-bottom: 20px; position: relative;
}
.steps h3 { font-size: 1.1rem; margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; }
.faq-head p { color: var(--muted); }
.faq-head a { color: var(--ink); font-weight: 600; }
.faq-list details { border-bottom: 1px solid var(--line-strong); }
.faq-list details:first-child { border-top: 1px solid var(--line-strong); }
.faq-list summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--ink);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: transform .2s;
}
.faq-list details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq-list details p { padding-right: 40px; color: var(--muted); margin-bottom: 20px; }

/* ---------- Demo ---------- */
.demo { background: var(--brand); color: #C9D1E0; }
.demo-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 64px; align-items: start; }
.demo-info h2 { color: #fff; }
.demo-info > p { font-size: 1.06rem; }
.demo-expect { list-style: none; margin: 28px 0 32px; display: grid; gap: 14px; }
.demo-expect li { padding-left: 18px; border-left: 2px solid #FF7A4D; }
.demo-expect b { color: #fff; font-weight: 600; }
.contact-cards { display: grid; gap: 12px; }
.contact-card {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r);
  border: 1px solid rgba(255, 255, 255, .14); text-decoration: none; color: #fff; font-weight: 600;
  transition: background-color .15s, border-color .15s; word-break: break-word;
}
.contact-card:hover { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .3); }
.contact-card svg { width: 22px; height: 22px; flex: none; fill: none; stroke: #FF7A4D; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-card small { display: block; font-weight: 400; color: #AEB8CB; font-size: .8rem; }

.form-card { background: var(--surface); border-radius: var(--r-lg); padding: 32px; color: var(--ink-2); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .5); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .88rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field abbr { text-decoration: none; color: var(--accent); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 88px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27, 42, 74, .15); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-error { margin: 6px 0 0; font-size: .82rem; color: var(--danger); min-height: 0; }
.field-error:empty { display: none; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.form-privacy { margin: 12px 0 0; font-size: .82rem; color: var(--muted); text-align: center; }
.form-status { margin: 10px 0 0; font-size: .9rem; text-align: center; }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--danger); }
.form-status a { color: inherit; font-weight: 600; }

.form-done { text-align: center; padding: 24px 8px; }
.form-done:focus { outline: none; }
.form-done svg { width: 56px; height: 56px; margin: 0 auto 18px; fill: none; stroke: var(--ok); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.form-done h3 { font-size: 1.4rem; }
.form-done p { color: var(--muted); }
.form-done a { color: var(--ink); font-weight: 600; }

/* ---------- Footer ---------- */
.footer { background: #111B31; color: #AEB8CB; font-size: .93rem; padding-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 48px; }
.footer-brand p { margin-top: 16px; max-width: 32ch; }
.footer h2 { font-family: var(--font-body); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #fff; margin-bottom: 16px; }
.footer-grid a:not(.brand) { display: block; text-decoration: none; margin-bottom: 10px; word-break: break-word; }
.footer-grid a:not(.brand):hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; padding-top: 20px; padding-bottom: 28px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .8rem; }
.footer-bottom p { margin: 0; }

/* ---------- Feature sheet ---------- */
.sheet {
  padding: 0; border: 0; margin: 0 0 0 auto;
  width: min(720px, 100%); max-width: 100%; height: 100%; max-height: 100%;
  background: var(--paper); color: var(--ink-2); box-shadow: -20px 0 60px -20px rgba(0, 0, 0, .35);
}
.sheet::backdrop { background: rgba(17, 27, 49, .55); }
.sheet[open] { animation: sheet-in .28s cubic-bezier(.2, .8, .2, 1); }
.sheet[open]::backdrop { animation: fade-in .28s ease; }
@keyframes sheet-in { from { transform: translateX(40px); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }

.sheet-inner { display: flex; flex-direction: column; height: 100%; }
.sheet-head {
  display: flex; align-items: center; gap: 14px; padding: 22px 28px;
  background: var(--surface); border-bottom: 1px solid var(--line); border-top: 4px solid var(--c, var(--brand));
}
.sheet-head img { border-radius: 11px; flex: none; }
.sheet-head div { flex: 1; min-width: 0; }
.sheet-head h2 { font-size: 1.5rem; margin: 0; }
.sheet-head p { margin: 0; color: var(--muted); font-size: .9rem; }
.sheet-close { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; display: grid; place-items: center; flex: none; }
.sheet-close:hover { background: var(--tint); }
.sheet-close svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }

.sheet-nav { display: flex; gap: 8px; padding: 12px 28px; overflow-x: auto; background: var(--surface); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.sheet-nav::-webkit-scrollbar { display: none; }
.sheet-nav a {
  flex: none; font-size: .84rem; font-weight: 600; text-decoration: none; color: var(--ink-2);
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); white-space: nowrap;
}
.sheet-nav a:hover { border-color: var(--c-ink); color: var(--c-ink); }

.sheet-body { flex: 1; overflow-y: auto; padding: 28px; scroll-padding-top: 12px; }
.sheet-intro { font-size: 1.05rem; color: var(--ink-2); }
.sheet-audience { display: flex; gap: 10px; align-items: baseline; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); font-size: .93rem; margin-bottom: 32px; }
.sheet-audience b { color: var(--c-ink); white-space: nowrap; }
.fgroup + .fgroup { margin-top: 36px; }
.fgroup h3 { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; margin-bottom: 14px; }
.fgroup h3 small { font-family: var(--font-body); font-size: .75rem; font-weight: 600; color: var(--muted); background: var(--tint); padding: 2px 8px; border-radius: 999px; }
.flist { list-style: none; display: grid; gap: 10px; }
.feat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px 16px 58px; position: relative; }
.feat-no {
  position: absolute; left: 16px; top: 16px; width: 28px; height: 28px; border-radius: 7px;
  display: grid; place-items: center; font-size: .75rem; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--c-ink); background: color-mix(in srgb, var(--c) 12%, #fff);
}
.feat h4 { font-family: var(--font-body); font-size: 1rem; font-weight: 700; margin: 0 0 4px; letter-spacing: 0; }
.feat p { margin: 0; color: var(--muted); font-size: .94rem; }
.feat img { margin-top: 12px; border-radius: 8px; border: 1px solid var(--line); }

.sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 28px; background: var(--surface); border-top: 1px solid var(--line); }
.sheet-foot p { margin: 0; font-weight: 500; color: var(--ink); }
body.has-sheet { overflow: hidden; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero h1 { max-width: 20ch; }
  .explorer { grid-template-columns: 1fr; }
  .tabs { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs [role="tab"] { width: auto; flex: none; }
  .tabs [role="tab"][aria-selected="true"]::before { left: 12px; right: 12px; top: auto; bottom: -10px; width: auto; height: 3px; border-radius: 3px 3px 0 0; }
  .apex, .faq, .demo-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .topbar-inner > span { display: none; }
  .topbar-inner { justify-content: center; }
  .menu-toggle { display: block; }
  .menu {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 24px 20px;
    box-shadow: 0 16px 24px -16px rgba(21, 32, 58, .25);
    display: none;
  }
  .menu.is-open { display: flex; }
  .menu a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .menu a:not(.btn):hover, .menu a.is-active { border-bottom-color: var(--line); }
  .menu-cta { margin-top: 16px; }
  .panel { grid-template-columns: 1fr; padding: 28px 24px; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .steps::before, .steps-fill { display: none; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .section { padding: 72px 0; }
  .hero { padding: 48px 0 40px; }
  .topbar-links a[href^="mailto"] { display: none; }
  .hero-actions .btn { flex: 1 1 100%; }
  .facts { flex-direction: column; gap: 8px; }
  .facts li:not(:last-child)::after { display: none; }
  .facts li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); margin-right: 10px; }
  .panel { padding: 24px 16px; }
  .reasons { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .form-card { padding: 22px 18px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .sheet-head, .sheet-body { padding-left: 18px; padding-right: 18px; }
  .sheet-nav { padding-left: 18px; padding-right: 18px; }
  .sheet-foot { flex-direction: column; align-items: stretch; padding: 14px 18px; }
  .sheet-foot p { text-align: center; font-size: .9rem; }
  .feat { padding-left: 52px; }
  .feat-no { left: 12px; }
  .screen { font-size: .8rem; }
  .screen-table th, .screen-table td { padding: 6px 5px; }
}
