/* ============================================================
   WIREFRAME — the Derby component system source of truth
   Theme: "blueprint" — deep slate + cyan accent
   Demonstrates the multi-page scaffold + full component registry
   ============================================================ */

:root {
  --ink: #0f172a;
  --muted: #5b6472;
  --paper: #f6f7f9;
  --surface: #ffffff;
  --soft: #eef1f5;
  --brand: #0e7490;        /* cyan-700 */
  --brand-dark: #0f172a;   /* slate-900 */
  --accent: #06b6d4;       /* cyan-500 */
  --line: #e2e6ec;
  --hero-overlay: rgba(15, 23, 42, .84);
  --hero-image: url('assets/images/hero-blueprint-v1.webp');
  --display: 'Lora', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
  --shadow: 0 12px 32px rgba(15, 23, 42, .12);
  --radius: 6px;
  --max: 1240px;
  --header-h: 82px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
html, body { overflow-x: clip; }
body { font-family: var(--sans); color: var(--ink); background: var(--paper); line-height: 1.65; -webkit-font-smoothing: antialiased; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; letter-spacing: -.02em; line-height: 1.1; }
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { color: var(--muted); }
a { color: var(--brand); }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
img { max-width: 100%; display: block; }

.container { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }
.section { padding: 80px 0; }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.eyebrow { font-size: .72rem; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; color: var(--brand); margin-bottom: 14px; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head p { margin-top: 14px; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 13px 26px; border-radius: var(--radius); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; text-decoration: none; transition: transform .2s, box-shadow .2s, background .2s; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- Skip link ---------- */
.skip-link { position: absolute; left: -999px; top: 0; background: var(--brand); color: #fff; padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 80; background: rgba(15,23,42,.96); color: #fff; border-bottom: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(16px); }
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; flex: 0 0 auto; }
.brand-mark { width: 38px; height: 38px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 6px; border: 1px solid rgba(255,255,255,.24); border-radius: 10px; background: rgba(255,255,255,.06); }
.brand-mark i { display: block; border: 1px solid var(--accent); border-radius: 2px; }
.brand-mark i:first-child { grid-row: span 2; background: rgba(6,182,212,.24); }
.brand-name { font-family: var(--display); font-size: 1.24rem; font-weight: 600; white-space: nowrap; }
.brand-name small { display: block; font-family: var(--sans); font-size: .61rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--accent); margin-top: 2px; }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 4px; list-style: none; padding: 4px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; background: rgba(255,255,255,.04); }
.main-nav a { display: block; padding: 9px 13px; color: rgba(255,255,255,.72); text-decoration: none; font-size: .84rem; font-weight: 700; border-radius: 7px; transition: color .2s, background .2s; }
.main-nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.main-nav a[aria-current="page"] { color: #fff; background: var(--brand); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.header-action { flex: 0 0 auto; padding: 10px 14px; color: #fff; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; text-decoration: none; font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.header-action:hover { background: #fff; color: var(--brand-dark); }
.mobile-nav-head, .mobile-nav-foot { display: none; }
.nav-toggle { display: none; position: relative; width: 44px; height: 44px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18); border-radius: 10px; color: #fff; cursor: pointer; }
.toggle-lines, .toggle-lines::before, .toggle-lines::after { position: absolute; left: 50%; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transform: translateX(-50%); transition: transform .25s, top .25s, opacity .2s; }
.toggle-lines { top: 50%; }
.toggle-lines::before, .toggle-lines::after { content: ""; }
.toggle-lines::before { top: -6px; }
.toggle-lines::after { top: 6px; }
.nav-toggle.open .toggle-lines { background: transparent; }
.nav-toggle.open .toggle-lines::before { top: 0; transform: translateX(-50%) rotate(45deg); }
.nav-toggle.open .toggle-lines::after { top: 0; transform: translateX(-50%) rotate(-45deg); }
.nav-backdrop { display: none; position: fixed; inset: var(--header-h) 0 0; z-index: 60; border: 0; background: rgba(2,6,23,.66); backdrop-filter: blur(3px); }
body.nav-open { overflow: hidden; }

/* ---------- Page hero ---------- */
.page-hero { background-color: var(--brand-dark); background-image: linear-gradient(90deg, rgba(8,15,31,.96) 0%, var(--hero-overlay) 58%, rgba(8,15,31,.68) 100%), var(--hero-image); background-size: cover; background-position: center 52%; color: #fff; padding: 72px 0 64px; }
.page-hero .container { position: relative; }
.page-hero .eyebrow { color: var(--accent); }
.page-hero h1 { color: #fff; text-shadow: 0 2px 24px rgba(0,0,0,.28); }
.page-hero p.lede { color: rgba(255,255,255,.88); max-width: 640px; margin-top: 16px; font-size: 1.1rem; }
.page-hero .btn-ghost { border-color: rgba(255,255,255,.72); color: #fff; background: rgba(15,23,42,.34); }
.page-hero .btn-ghost:hover { border-color: #fff; color: var(--brand-dark); background: #fff; }
.hero-demo { background-color: var(--brand-dark); background-image: linear-gradient(90deg, rgba(8,15,31,.94), rgba(8,15,31,.65)), var(--hero-image); background-size: cover; background-position: center; color: #fff; border-radius: var(--radius); padding: 40px 32px; }
.breadcrumb { font-size: .82rem; color: rgba(255,255,255,.6); margin-bottom: 20px; }
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Component gallery ---------- */
.component-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 40px; overflow: hidden; }
.component-head { padding: 20px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.component-head h3 { font-size: 1.15rem; }
.component-head .hook { font-family: ui-monospace, monospace; font-size: .78rem; color: var(--brand); background: var(--soft); padding: 3px 8px; border-radius: 4px; }
.component-body { padding: 32px 24px; }
.component-desc { padding: 16px 24px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.component-desc code { font-family: ui-monospace, monospace; background: var(--soft); padding: 1px 5px; border-radius: 3px; font-size: .82rem; }

/* ---------- Cards (generic data-cards) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; }
.card .icon { font-size: 1.8rem; margin-bottom: 14px; display: block; }
.card .icon svg { width: 40px; height: 40px; color: var(--brand); }
.card h3 { margin-bottom: 8px; }
.card p { font-size: .92rem; }
.card .token-value { font-family: ui-monospace, monospace; font-size: .9rem; color: var(--brand); background: var(--soft); padding: 4px 8px; border-radius: 4px; display: inline-block; margin-bottom: 8px; }
.card .card-tag { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); background: var(--soft); padding: 3px 8px; border-radius: 4px; margin-bottom: 10px; }
.card .more { display: inline-block; margin-top: 10px; font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; text-decoration: none; color: var(--brand); }
.card .more:hover { color: var(--brand-dark); }

/* ---------- Stats band ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--brand-dark); color: #fff; border-radius: var(--radius); overflow: hidden; }
.stat { padding: 36px 24px; text-align: center; border-right: 1px solid rgba(255,255,255,.12); border-bottom: 1px solid rgba(255,255,255,.12); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-family: var(--display); font-size: 2.4rem; color: var(--accent); font-weight: 400; }
.stat span { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.7); }

/* ---------- Process (numbered) ---------- */
.process-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.process-step { position: relative; padding-top: 48px; }
.process-step::before { counter-increment: step; content: counter(step, decimal-leading-zero); position: absolute; top: 0; left: 0; font-family: var(--display); font-size: 2rem; color: var(--accent); }
.process-step h3 { margin-bottom: 8px; }
.process-step p { font-size: .92rem; }

/* ---------- Reviews ---------- */
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.review { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; }
.review .stars { color: var(--accent); margin-bottom: 12px; letter-spacing: 2px; }
.review p { font-size: .95rem; font-style: italic; margin-bottom: 16px; }
.review .author { font-weight: 700; font-size: .9rem; color: var(--ink); }

/* ---------- FAQ accordion ---------- */
.faq-list { max-width: 760px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; text-align: left; background: none; border: 0; padding: 20px 0; font-family: var(--display); font-size: 1.1rem; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-q::after { content: "+"; font-size: 1.4rem; color: var(--brand); transition: transform .2s; }
.faq-q[aria-expanded="true"]::after { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding: 0 0 20px; }

/* ---------- Tabs ---------- */
.tabs { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.tab-list { display: flex; border-bottom: 1px solid var(--line); background: var(--soft); }
.tab-btn { flex: 1; padding: 14px 16px; background: none; border: 0; font-weight: 700; font-size: .9rem; cursor: pointer; color: var(--muted); border-bottom: 3px solid transparent; }
.tab-btn[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); background: var(--surface); }
.tab-panel { padding: 28px 24px; }
.tab-panel[hidden] { display: none; }

/* ---------- Carousel ---------- */
.carousel { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--brand-dark); }
.carousel-track { display: flex; transition: transform .5s ease; }
.carousel-slide { flex: 0 0 100%; min-width: 0; padding: 48px 56px; color: #fff; }
.carousel-slide h3 { color: #fff; margin-bottom: 10px; }
.carousel-slide p { color: rgba(255,255,255,.82); }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.15); border: 0; color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; z-index: 2; }
.carousel-btn:hover { background: var(--brand); }
.carousel-btn.prev { left: 16px; }
.carousel-btn.next { right: 16px; }
.carousel-pause { position: absolute; top: 12px; right: 12px; z-index: 3; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.36); border-radius: 50%; background: rgba(15,23,42,.7); color: #fff; cursor: pointer; }
.carousel-pause:hover { background: var(--brand); }
.carousel-dots { position: absolute; bottom: 4px; left: 0; right: 0; display: flex; justify-content: center; gap: 0; z-index: 2; }
.carousel-dot { position: relative; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; }
.carousel-dot::before { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; transform: translate(-50%,-50%); border-radius: 50%; background: rgba(255,255,255,.45); }
.carousel-dot[aria-current="true"]::before { background: var(--accent); }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; background: var(--brand-dark); padding: 20px 0; }
.marquee-track { display: flex; gap: 48px; white-space: nowrap; animation: marquee 22s linear infinite; }
.marquee-track span { color: rgba(255,255,255,.85); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .9rem; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Bento grid ---------- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 180px; gap: 16px; }
.bento-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; justify-content: flex-end; }
.bento-item.wide { grid-column: span 2; }
.bento-item.tall { grid-row: span 2; }
.bento-item.dark { background: var(--brand-dark); }
.bento-item.dark h3, .bento-item.dark p { color: #fff; }
.bento-item h3 { margin-bottom: 6px; }
.bento-item p { font-size: .88rem; }

/* ---------- Timeline ---------- */
.timeline { position: relative; max-width: 720px; margin-inline: auto; padding-left: 32px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.timeline-item { position: relative; padding-bottom: 32px; }
.timeline-item::before { content: ""; position: absolute; left: -28px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 3px solid var(--paper); }
.timeline-item .year { font-family: var(--display); font-size: 1.3rem; color: var(--brand); }
.timeline-item h3 { margin: 4px 0 6px; }
.timeline-item p { font-size: .92rem; }

/* ---------- Before/after ---------- */
.ba { position: relative; border-radius: var(--radius); overflow: hidden; user-select: none; }
.ba img { width: 100%; height: 320px; object-fit: cover; }
.ba .ba-after { position: absolute; inset: 0; clip-path: inset(0 0 0 50%); }
.ba .ba-handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #fff; cursor: ew-resize; }
.ba .ba-handle::after { content: "◂▸"; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); background: var(--brand); color: #fff; border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: .8rem; }

/* Query-driven detail page */
.detail-points { list-style: none; padding: 0; margin: 0 0 28px; }
.detail-points li { position: relative; padding-left: 28px; margin-bottom: 12px; color: var(--ink); }
.detail-points li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }

/* ---------- Count-up ---------- */
.count-up { font-variant-numeric: tabular-nums; }

/* ---------- Scroll reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
[data-reveal].revealed { opacity: 1; transform: none; }

/* ---------- Elementor-inspired additions ---------- */
.progress-stack { display: grid; gap: 24px; max-width: 780px; }
.progress-meta { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 8px; font-size: .88rem; }
.progress-meta span { font-weight: 700; }
.progress-meta strong { color: var(--brand); }
.progress-track { height: 10px; overflow: hidden; border-radius: 999px; background: var(--soft); }
.progress-fill { display: block; width: var(--progress); height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--brand),var(--accent)); }
.pricing-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; align-items: stretch; }
.pricing-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 30px 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.pricing-card.featured { border-color: var(--brand); box-shadow: 0 18px 45px rgba(14,116,144,.15); transform: translateY(-8px); }
.pricing-badge { position: absolute; top: 0; right: 18px; transform: translateY(-50%); padding: 4px 10px; border-radius: 99px; background: var(--brand); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.pricing-name { color: var(--brand); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.pricing-value { display: block; margin: 12px 0; font-family: var(--display); font-size: 3rem; line-height: 1; }
.pricing-features { list-style: none; margin: 22px 0 26px; }
.pricing-features li { padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.pricing-card .btn { margin-top: auto; text-align: center; }
.flip-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.flip-card { height: 220px; padding: 0; border: 0; border-radius: 12px; background: transparent; perspective: 900px; cursor: pointer; text-align: left; color: inherit; }
.flip-card-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .55s ease; }
.flip-card:hover .flip-card-inner, .flip-card:focus-visible .flip-card-inner, .flip-card.active .flip-card-inner { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 26px; border: 1px solid var(--line); border-radius: 12px; backface-visibility: hidden; }
.flip-front { background: linear-gradient(145deg,#fff,#eef7f9); }
.flip-front strong { font-family: var(--display); font-size: 1.35rem; }
.flip-front small { margin-top: 8px; color: var(--brand); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.flip-back { transform: rotateY(180deg); background: var(--brand-dark); color: #fff; }
.notice { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid #a5e4ee; border-left: 4px solid var(--brand); border-radius: 9px; background: #ecfeff; }
.notice-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; }
.notice strong { display: block; margin-bottom: 2px; }
.notice button { width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 1.25rem; cursor: pointer; }
.countdown { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; max-width: 720px; }
.countdown-unit { padding: 24px 14px; text-align: center; border-radius: 10px; background: var(--brand-dark); color: #fff; }
.countdown-unit strong { display: block; font-family: var(--display); font-size: clamp(2rem,5vw,3.25rem); color: var(--accent); font-variant-numeric: tabular-nums; }
.countdown-unit span { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.62); }
.toc-demo { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: start; }
.toc { position: sticky; top: calc(var(--header-h) + 20px); padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.toc strong { display: block; margin-bottom: 10px; }
.toc a { display: block; padding: 7px 9px; border-left: 2px solid transparent; text-decoration: none; color: var(--muted); font-size: .84rem; }
.toc a[aria-current] { border-left-color: var(--brand); color: var(--brand); background: #fff; }
.toc-content section { min-height: 140px; padding: 12px 0 28px; scroll-margin-top: calc(var(--header-h) + 20px); }
.toc-content h4 { margin-bottom: 8px; }
.code-block { overflow: hidden; border: 1px solid #25334b; border-radius: 10px; background: #0b1220; }
.code-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid #25334b; color: #8fa3bf; font: 700 .72rem ui-monospace,monospace; }
.code-toolbar button { padding: 6px 10px; border: 1px solid #34445f; border-radius: 6px; background: #151f31; color: #dce8f5; cursor: pointer; }
.code-block pre { overflow: auto; padding: 24px; color: #dce8f5; font: .86rem/1.7 ui-monospace,SFMono-Regular,Consolas,monospace; }
.code-block .token-key { color: #67e8f9; }
.cta-band { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 28px; padding: 42px; border-radius: 14px; background: linear-gradient(135deg,var(--brand-dark),#164e63); color: #fff; }
.cta-band h3 { color: #fff; font-size: clamp(1.5rem,3vw,2.1rem); margin-bottom: 8px; }
.cta-band p { color: rgba(255,255,255,.72); }
.cta-band .btn { background: #fff; color: var(--brand-dark); white-space: nowrap; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-dark); color: rgba(255,255,255,.7); padding: 56px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-grid h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: rgba(255,255,255,.7); text-decoration: none; }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 24px; font-size: .85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .card-grid, .reviews-grid { grid-template-columns: repeat(2, 1fr); }
  .process-list { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-item.wide { grid-column: span 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .header-action { display: none; }
}

@media (max-width: 900px) {
  :root { --header-h: 72px; }
  .header-inner { justify-content: space-between; gap: 14px; }
  .nav-toggle { display: block; z-index: 82; }
  .main-nav { position: fixed; top: var(--header-h); right: 0; bottom: auto; height: calc(100dvh - var(--header-h)); z-index: 70; width: min(390px, 88vw); max-width: 100vw; margin: 0; padding: 28px 24px 24px; overflow-y: auto; background: #111c30; box-shadow: -24px 0 60px rgba(2,6,23,.35); clip-path: inset(0 0 0 100%); opacity: 0; pointer-events: none; visibility: hidden; transition: clip-path .3s ease, opacity .3s ease, visibility .3s; }
  .main-nav.open { clip-path: inset(0); opacity: 1; pointer-events: auto; visibility: visible; }
  .main-nav ul { flex-direction: column; gap: 8px; padding: 0; border: 0; background: transparent; }
  .main-nav a { position: relative; padding: 15px 16px; border: 1px solid rgba(255,255,255,.08); border-radius: 9px; background: rgba(255,255,255,.035); color: rgba(255,255,255,.78); font-size: .98rem; }
  .main-nav a::after { content: '→'; position: absolute; right: 16px; color: var(--accent); }
  .main-nav a[aria-current="page"] { border-color: rgba(6,182,212,.42); background: rgba(14,116,144,.3); }
  .mobile-nav-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
  .mobile-nav-label { color: var(--accent); font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
  .mobile-nav-foot { display: flex; justify-content: space-between; margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.5); font-size: .76rem; }
  .mobile-nav-foot strong { color: #fff; }
  .nav-backdrop.open { display: block; }
  .card-grid, .reviews-grid, .process-list, .stats-grid, .bento { grid-template-columns: 1fr; }
  .bento-item.wide, .bento-item.tall { grid-column: span 1; grid-row: span 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .carousel-slide { padding: 40px 24px; }
  .carousel-btn { width: 44px; height: 44px; }
  .pricing-grid, .flip-grid { grid-template-columns: 1fr; }
  .pricing-card.featured { transform: none; }
  .toc-demo { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; }
}

@media (max-width: 560px) {
  .container { width: min(var(--max), calc(100% - 32px)); }
  .section { padding: 56px 0; }
  .brand { gap: 9px; }
  .brand-mark { width: 34px; height: 34px; padding: 5px; }
  .brand-name { font-size: 1.05rem; }
  .brand-name small { font-size: .53rem; letter-spacing: .11em; }
  .main-nav { width: 100%; }
  .carousel-slide { padding: 32px 20px; }
  .component-body { padding: 24px 16px; }
  .countdown { grid-template-columns: repeat(2,1fr); }
  .cta-band { grid-template-columns: 1fr; padding: 30px 24px; }
  .notice { grid-template-columns: auto 1fr; }
  .notice button { grid-column: 2; justify-self: end; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .carousel-track { transition: none; }
  .flip-card-inner { transition: none; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* Progressive no-JavaScript fallback chrome and legal content. */
.nojs-header { padding: 18px 0; background: var(--brand-dark); color: #fff; }
.nojs-header .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.nojs-header a { color: #fff; }
.nojs-nav { display: flex; gap: 14px; flex-wrap: wrap; }
.nojs-content { padding: 32px 0; background: var(--surface); }
.nojs-footer { padding: 28px 0; background: var(--brand-dark); color: rgba(255,255,255,.75); }
.legal-copy { max-width: 820px; }
.legal-copy h2 { margin-top: 34px; }

/* Baseline navigation remains usable before JavaScript enhancement. */
@media (max-width: 900px) {
  html:not(.js-ready) .site-header { position: relative; }
  html:not(.js-ready) .header-inner { height: auto; min-height: var(--header-h); flex-wrap: wrap; padding-block: 14px; }
  html:not(.js-ready) .main-nav { position: static; flex: 1 0 100%; order: 4; width: 100%; max-width: none; height: auto; padding: 0; overflow: visible; clip-path: none; opacity: 1; pointer-events: auto; visibility: visible; box-shadow: none; background: transparent; }
  html:not(.js-ready) .main-nav ul { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  html:not(.js-ready) .main-nav a { padding: 9px 11px; }
  html:not(.js-ready) .mobile-nav-head,
  html:not(.js-ready) .mobile-nav-foot,
  html:not(.js-ready) .nav-toggle,
  html:not(.js-ready) .nav-backdrop { display: none; }
}

/* Reveal demos are content-first when JavaScript is unavailable. */
html:not(.js-ready) [data-reveal] { opacity: 1; transform: none; transition: none; }
