/* picoBytes — "from silicon to screen". Brand: blue → mint gradient from the P mark.
   Multi-page site: shared header/footer, a serial-console home hero, data-driven service pages. */
/* ---------- Fonts (self-hosted, latin subset, SIL Open Font License) ----------
   Served from our own domain so text isn't blocked on Google's servers. The "Fallback" faces resize a local
   system font to match each web font's metrics, so text doesn't jump when the real font arrives. */
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans.woff2") format("woff2"); font-weight: 100 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Poppins Fallback"; src: local("Arial"), local("Roboto"); size-adjust: 114.2%; ascent-override: 92%; descent-override: 30.6%; line-gap-override: 8.7%; }
@font-face { font-family: "Plex Fallback"; src: local("Arial"), local("Roboto"); size-adjust: 101.8%; ascent-override: 100.6%; descent-override: 27%; line-gap-override: 0%; }
@font-face { font-family: "Mono Fallback"; src: local("Courier New"), local("Roboto Mono"); size-adjust: 100%; ascent-override: 102%; descent-override: 30%; line-gap-override: 0%; }

:root {
  --bg: #F4F7FB;
  --surface: #FFFFFF;
  --ink: #13222B;
  --muted: #4D5E6E;
  --line: #D6E0EC;
  --accent: #0B5CE6;
  --accent-deep: #0842B0;
  --accent-soft: #E3EDFD;
  --mint: #12B994;
  --amber: #C7811A;
  --console-bg: #0A1220;
  --console-ink: #D3E3F5;
  --console-dim: #7A8BA4;
  --danger: #C62828;

  --f-display: "Poppins", "Poppins Fallback", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", "Plex Fallback", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", "Mono Fallback", ui-monospace, monospace;

  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --step-3: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  --step-4: clamp(2.6rem, 1.6rem + 4.4vw, 4.9rem);
  --radius: 14px;
  --max: 1160px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A111C; --surface: #111B2A; --ink: #E8EEF6; --muted: #9AA9BC;
    --line: #22304A; --accent: #4C9BFF; --accent-deep: #8DC0FF; --accent-soft: #14264A; --mint: #2EE3B2;
    --amber: #E6A443; --console-bg: #060B14; --console-ink: #D3E3F5; --console-dim: #7A8BA4; --danger: #FF8A80;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A111C; --surface: #111B2A; --ink: #E8EEF6; --muted: #9AA9BC;
  --line: #22304A; --accent: #4C9BFF; --accent-deep: #8DC0FF; --accent-soft: #14264A; --mint: #2EE3B2;
  --amber: #E6A443; --console-bg: #060B14; --console-ink: #D3E3F5; --console-dim: #7A8BA4; --danger: #FF8A80;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 60; background: var(--bg);
}
img, svg { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
p { margin: 0; }

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.eyebrow {
  font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent-deep);
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100; padding: 10px 16px; border-radius: 8px;
  background: var(--accent); color: var(--bg); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }
.icon { width: 24px; height: 24px; flex: none; }
.i-16 { width: 16px; height: 16px; flex: none; }
.i-18 { width: 18px; height: 18px; flex: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; cursor: pointer;
  font: 600 0.95rem/1 var(--f-body); padding: 13px 20px; border-radius: 999px;
  border: 1px solid transparent; transition: transform .2s, background .2s, border-color .2s;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-outline { border-color: rgba(211, 227, 245, .28); color: var(--console-ink); background: transparent; }
.btn-outline:hover { border-color: #2EE3B2; color: #2EE3B2; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { position: relative; display: flex; align-items: center; gap: 16px; padding-block: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 40px; height: 40px; flex: none; }
.brand-name { font-family: var(--f-display); font-weight: 600; font-size: 1.35rem; letter-spacing: -0.01em; }
.brand-name b { color: var(--accent); font-weight: 600; }
.site-nav { margin-left: auto; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links > li > a { text-decoration: none; font-size: 0.95rem; color: var(--muted); transition: color .2s; }
.nav-links > li > a:hover, .nav-links > li > a[aria-current="page"] { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-actions .btn { padding: 10px 16px; }
.nav-toggle {
  display: none; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
}
.nav-toggle .i-close, .nav-open .nav-toggle .i-open { display: none; }
.nav-open .nav-toggle .i-close { display: block; }

/* Services mega menu */
.has-menu { display: flex; align-items: center; gap: 2px; }
.menu-toggle {
  display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px;
  background: none; color: var(--muted); cursor: pointer;
}
.menu-toggle svg { transition: transform .2s; }
.has-menu.open .menu-toggle svg { transform: rotate(180deg); }
.mega {
  position: absolute; top: 100%; left: 20px; right: 20px; display: none;
  grid-template-columns: repeat(3, 1fr); gap: 4px 28px; padding: 24px 24px 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 30px 60px -30px rgba(10, 30, 80, .4);
}
.mega::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; } /* hover bridge */
.has-menu.open .mega { display: grid; }
@media (hover: hover) and (min-width: 961px) {
  .has-menu:hover .mega { display: grid; }
}
.mega-title { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-deep); margin-bottom: 8px; }
.mega ul { list-style: none; margin: 0; padding: 0; display: grid; }
.mega li a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-inline: -10px; border-radius: 8px;
  text-decoration: none; font-size: 0.93rem; color: var(--ink);
}
.mega li a .icon { width: 20px; height: 20px; color: var(--accent); }
.mega li a:hover { background: var(--accent-soft); }
.mega-foot {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  margin: 16px -24px 0; padding: 14px 24px; border-top: 1px solid var(--line); font-size: 0.88rem; color: var(--muted);
}
.mega-foot a { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; text-decoration: none; }

/* Breadcrumbs */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 22px; padding: 0; font-size: 0.85rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current] { color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(48px, 8vw, 96px) clamp(48px, 7vw, 88px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero-copy { min-width: 0; display: grid; gap: 24px; }
.hero h1 { font-size: var(--step-4); font-weight: 700; letter-spacing: -0.035em; }
.hero h1 em { font-style: normal; color: var(--accent); background: linear-gradient(100deg, var(--accent) 20%, var(--mint)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero .lede { font-size: var(--step-1); color: var(--muted); max-width: 34ch; line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 4px 0 0; }
.hero-tags li {
  font-family: var(--f-mono); font-size: 0.78rem; padding: 6px 10px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent-deep);
}

/* Serial console */
.console {
  min-width: 0; background: var(--console-bg); color: var(--console-ink);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(10, 50, 140, .5);
  font-family: var(--f-mono); font-size: 0.8rem; line-height: 1.75;
}
.console-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; border-bottom: 1px solid rgba(211, 227, 245, .12); color: var(--console-dim);
  font-size: 0.72rem; letter-spacing: 0.06em;
}
.console-bar .led { display: inline-flex; align-items: center; gap: 8px; }
.console-bar .led::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: #2EE3B2;
  box-shadow: 0 0 8px #2EE3B2; animation: blink 2.4s infinite;
}
.console pre { margin: 0; padding: 18px 18px 22px; overflow-x: auto; white-space: pre; }
.console .t { color: var(--console-dim); }
.console .ok { color: #2EE3B2; }
.console .hl { color: #E6A443; }
.console .cursor { display: inline-block; width: .6em; height: 1.1em; vertical-align: -0.2em; background: var(--console-ink); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- Sections ---------- */
section { scroll-margin-top: 80px; }
.section { padding-block: clamp(64px, 9vw, 112px); border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 14px; max-width: 640px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: var(--step-3); font-weight: 700; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

.section.alt { background: var(--surface); }
.alt .svc-card, .alt .offer, .alt .why, .alt .aside-card { background: var(--bg); }
.alt .process li::before { background: var(--surface); }

/* Inner page hero */
.page-hero { padding-block: clamp(32px, 5vw, 56px) clamp(48px, 7vw, 88px); }
.page-hero .wrap > .eyebrow, .page-hero-grid .eyebrow { display: block; margin-bottom: 14px; }
.page-hero h1 { font-size: clamp(2.2rem, 1.4rem + 3.2vw, 3.9rem); font-weight: 700; letter-spacing: -0.03em; max-width: 18ch; }
.page-hero .lede { margin-top: 20px; font-size: var(--step-1); color: var(--muted); max-width: 52ch; line-height: 1.5; }
.page-hero .hero-actions { margin-top: 28px; }
.page-hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: end; }
.page-hero-grid > * { min-width: 0; }
.page-hero-art {
  width: clamp(180px, 20vw, 240px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 32px;
  border: 1px solid var(--line); color: var(--accent);
  background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--mint) 22%, transparent), transparent 60%), var(--accent-soft);
}
.hero-glyph { width: 46%; height: 46%; stroke-width: 1.3; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.jump a {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-size: 0.9rem; text-decoration: none; transition: border-color .2s;
}
.jump a:hover { border-color: var(--accent); }

/* Home: service groups */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.cat-panel {
  min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 2.6vw, 30px); display: grid; gap: 14px;
}
.cat-panel h3 { font-size: 1.4rem; font-weight: 700; }
.cat-panel > p { color: var(--muted); font-size: 0.95rem; }
.link-list { list-style: none; margin: 4px 0 0; padding: 0; }
.link-list a {
  display: flex; align-items: center; gap: 12px; padding-block: 11px; border-top: 1px dashed var(--line);
  text-decoration: none; font-weight: 500;
}
.link-list .icon { width: 20px; height: 20px; color: var(--accent); }
.link-list .go { margin-left: auto; color: var(--muted); opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .2s; }
.link-list a:hover { color: var(--accent); }
.link-list a:hover .go { opacity: 1; transform: none; color: var(--accent); }

/* Service cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.svc-card {
  min-width: 0; display: grid; gap: 10px; align-content: start; padding: 24px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s, transform .2s;
}
.svc-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.svc-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
.svc-card h3 { font-size: 1.15rem; font-weight: 600; }
.svc-card p { color: var(--muted); font-size: 0.93rem; }
.svc-card .more { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }

/* Why / values */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.why { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: grid; gap: 10px; align-content: start; }
.why-icon { color: var(--accent); }
.why h3 { font-size: 1.12rem; font-weight: 600; }
.why p { color: var(--muted); font-size: 0.93rem; }

/* Service page: intro + aside */
.svc-intro { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.svc-intro > * { min-width: 0; }
.prose h2 { font-size: var(--step-2); font-weight: 700; margin-bottom: 18px; }
.prose p { font-size: 1.08rem; line-height: 1.7; }
.prose p + p { margin-top: 1em; }
.prose-narrow { max-width: 760px; }
.prose-narrow h2 { font-size: 1.4rem; margin: 2em 0 .6em; }
.prose ul { padding-left: 1.2em; line-height: 1.7; }
.prose a { color: var(--accent); }
.aside-card { display: grid; gap: 14px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.aside-card h3 { font-family: var(--f-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-deep); }
.aside-card h3:not(:first-child) { margin-top: 10px; }
.aside-card .btn { justify-self: start; margin-top: 6px; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.check-list svg { color: var(--mint); margin-top: 4px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.tags li { font-family: var(--f-mono); font-size: 0.75rem; padding: 6px 10px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-deep); }

/* Offerings */
.offer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: offer; }
.offer {
  min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  display: grid; gap: 8px; align-content: start; counter-increment: offer;
}
.offer::before { content: counter(offer, decimal-leading-zero); font-family: var(--f-mono); font-size: 0.75rem; color: var(--accent); }
.offer h3 { font-size: 1.12rem; font-weight: 600; }
.offer p { color: var(--muted); font-size: 0.95rem; }

/* FAQ */
.faq-wrap { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(24px, 5vw, 72px); align-items: start; }
.faq-wrap .section-head { margin-bottom: 0; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; cursor: pointer;
  list-style: none; font-family: var(--f-display); font-weight: 600; font-size: 1.08rem; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { color: var(--accent); transition: transform .2s; }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details p { padding: 0 40px 22px 0; color: var(--muted); line-height: 1.7; }

/* Call-to-action band */
.cta-band { background: var(--console-bg); color: var(--console-ink); padding-block: clamp(56px, 8vw, 96px); }
.cta-band .eyebrow { color: #2EE3B2; }
.cta-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; }
.cta-grid h2 { font-size: var(--step-3); font-weight: 700; margin: 12px 0 14px; }
.cta-grid p { color: var(--console-dim); font-size: 1.08rem; max-width: 52ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.contact-card {
  min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 24px; display: grid; gap: 8px; align-content: start;
}
.contact-icon { color: var(--accent); margin-bottom: 6px; }
.contact-card .label { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.contact-card a, .contact-card address {
  font-family: var(--f-display); font-style: normal; font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem);
  font-weight: 600; text-decoration: none; overflow-wrap: anywhere;
}
.contact-card a:hover { color: var(--accent); }
.contact-card p { font-size: 0.92rem; color: var(--muted); }

/* Stack strip */
.stack { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.stack div { padding: 22px 20px; border-right: 1px solid var(--line); min-width: 0; }
.stack div:last-child { border-right: 0; }
.stack dt { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-deep); margin-bottom: 8px; }
.stack dd { margin: 0; font-size: 0.95rem; line-height: 1.55; }

/* Process */
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; }
.process li { position: relative; padding: 28px 24px 0 0; border-top: 2px solid var(--line); counter-increment: step; display: grid; gap: 8px; align-content: start; }
.process li::before {
  content: counter(step, decimal-leading-zero); position: absolute; top: -13px; left: 0;
  font-family: var(--f-mono); font-size: 0.75rem; background: var(--bg); padding-right: 10px; color: var(--accent);
}
.process li:first-child { border-top-color: var(--accent); }
.process h3 { font-size: 1.25rem; font-weight: 600; }
.process p { color: var(--muted); font-size: 0.95rem; }

/* ---------- Project wizard ---------- */
html:has(.wizard[open]) { overflow: hidden; }
.wizard [hidden] { display: none !important; }
.wizard {
  width: min(640px, calc(100% - 32px)); max-height: min(780px, calc(100dvh - 32px));
  padding: 0; border: 1px solid var(--line); border-radius: 20px;
  background: var(--surface); color: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(6, 20, 60, .55);
}
.wizard[open] { display: flex; flex-direction: column; }
.wizard::backdrop { background: rgba(6, 11, 20, .62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.wz-form { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.wz-head { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px 12px; padding: 18px 24px 0; }
.wz-close {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer;
}
.wz-close:hover { color: var(--ink); border-color: var(--accent); }
.wz-progress { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.wz-progress span {
  display: block; height: 100%; width: calc(var(--p, .2) * 100%);
  background: linear-gradient(90deg, var(--accent), var(--mint)); transition: width .35s cubic-bezier(.2,.7,.2,1);
}
.wz-body { flex: 1; min-height: 0; overflow-y: auto; padding: 26px 24px 24px; }
.wz-step { display: grid; gap: 14px; align-content: start; }
.wz-step h2 { font-size: var(--step-2); font-weight: 700; }
.wz-step h2:focus { outline: none; }
.wz-hint { color: var(--muted); margin-top: -6px; }
.wz-sub { font-family: var(--f-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-deep); margin-top: 8px; }

.wz-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.wz-opts.compact { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.wz-opt {
  position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface);
  transition: border-color .15s, background .15s;
}
.wz-opt::before {
  content: ""; flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 5px;
  border: 1.5px solid var(--line); background: var(--surface); transition: background .15s, border-color .15s;
}
.wz-opt:has(input[type=radio])::before { border-radius: 50%; }
.wz-opt:hover { border-color: var(--accent); }
.wz-opt:has(:checked) { border-color: var(--accent); background: var(--accent-soft); }
.wz-opt:has(:checked)::before { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px var(--surface); }
.wz-opt:has(:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.wz-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wz-opt b { display: block; font-weight: 600; line-height: 1.35; }
.wz-opt small { display: block; color: var(--muted); font-size: 0.85rem; line-height: 1.4; margin-top: 2px; }

.wz-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wz-field { display: grid; gap: 6px; font-size: 0.9rem; font-weight: 500; }
.wz-field small { color: var(--muted); font-weight: 400; }
.wz-field.full { grid-column: 1 / -1; }
.wz-field input, .wz-field textarea {
  font: 400 1rem/1.4 var(--f-body); color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; width: 100%;
}
.wz-field textarea { resize: vertical; min-height: 110px; }
.wz-field input:focus, .wz-field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.wz-summary { margin: 4px 0 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.wz-summary div { display: grid; grid-template-columns: 96px 1fr auto; gap: 12px; align-items: baseline; padding: 11px 14px; border-top: 1px solid var(--line); }
.wz-summary div:first-child { border-top: 0; }
.wz-summary dt { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.wz-summary dd { margin: 0; min-width: 0; overflow-wrap: anywhere; white-space: pre-line; font-size: 0.95rem; }
.wz-alt { color: var(--muted); font-size: 0.92rem; }
.wz-alt a { color: var(--accent); font-weight: 500; text-underline-offset: 3px; cursor: pointer; }
.wz-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wz-link { background: none; border: 0; padding: 4px; font: 500 0.88rem var(--f-body); color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.wz-done { justify-items: center; text-align: center; padding-block: 24px 8px; }
.wz-done svg { color: var(--mint); }

.wz-foot { border-top: 1px solid var(--line); padding: 14px 24px 18px; display: grid; gap: 10px; }
.wz-error { color: var(--danger); font-size: 0.9rem; font-weight: 500; }
.wz-nav { display: flex; justify-content: space-between; gap: 12px; }
.wz-nav .btn { min-width: 110px; justify-content: center; }
.wz-nav .btn:disabled { opacity: .6; cursor: progress; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .wizard[open] { animation: wz-pop .28s cubic-bezier(.2,.7,.2,1); }
  .wz-step:not([hidden]) { animation: wz-in .3s cubic-bezier(.2,.7,.2,1); }
  @keyframes wz-pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
  @keyframes wz-in { from { opacity: 0; transform: translateX(14px); } }
}
@media (max-width: 560px) {
  .wizard { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .wz-head { padding-top: max(16px, env(safe-area-inset-top, 0px)); }
  .wz-foot { padding-bottom: max(18px, env(safe-area-inset-bottom, 0px)); }
  .wz-head, .wz-body, .wz-foot { padding-inline: 16px; }
  .wz-fields { grid-template-columns: 1fr; }
  .wz-summary div { grid-template-columns: 1fr auto; }
  .wz-summary dd { grid-column: 1; }
  .wz-summary .wz-link { grid-row: 1; grid-column: 2; }
}

/* ---------- Blog: listings ---------- */
.jump .count { margin-left: 4px; font-family: var(--f-mono); font-size: 0.75rem; color: var(--muted); }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.post-feature { margin-bottom: 24px; }
.post-card {
  min-width: 0; display: grid; grid-template-rows: auto 1fr; overflow: hidden; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s, transform .2s;
}
.post-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.post-cover {
  display: grid; place-items: center; aspect-ratio: 16 / 7; padding: 20px; color: #fff;
  background: radial-gradient(circle at 80% 20%, rgba(46, 227, 178, .35), transparent 55%), linear-gradient(135deg, #0A47DF, #0A1220 75%);
  font: 700 clamp(1.6rem, 1.1rem + 2vw, 2.6rem)/1.1 var(--f-mono); letter-spacing: -0.02em; text-align: center;
}
.post-card-body { display: grid; gap: 10px; align-content: start; padding: 22px 24px 24px; }
.post-card h3 { font-size: 1.25rem; font-weight: 700; }
.post-card p { color: var(--muted); font-size: 0.95rem; }
.post-meta { font-family: var(--f-mono); font-size: 0.75rem; color: var(--muted); }
.post-feature .post-card { grid-template-columns: 1.1fr 1fr; grid-template-rows: none; }
.post-feature .post-cover { aspect-ratio: auto; min-height: 240px; }
.post-feature .post-card-body { align-content: center; padding: clamp(24px, 4vw, 48px); }
.post-feature .post-card h3 { font-size: var(--step-2); }

/* ---------- Blog: article ---------- */
.post-hero h1 { max-width: 22ch; }
.post-hero a.eyebrow { text-decoration: none; }
.post-byline { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 22px; font-family: var(--f-mono); font-size: 0.78rem; color: var(--muted); }
.post-byline span + span::before { content: "·"; margin-right: 18px; color: var(--line); }
.article-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; padding-bottom: clamp(64px, 9vw, 112px); }
.toc { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow-y: auto; font-size: 0.88rem; }
.toc summary { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-deep); cursor: pointer; margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0 0 0 12px; border-left: 1px solid var(--line); display: grid; gap: 8px; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--accent); }

.article-body { max-width: 760px; font-size: 1.06rem; line-height: 1.75; }
.article-body > * + * { margin-top: 1.1em; }
.article-body h2 { font-size: var(--step-2); font-weight: 700; margin-top: 2.4em; scroll-margin-top: 90px; }
.article-body h3 { font-size: 1.25rem; font-weight: 600; margin-top: 2em; scroll-margin-top: 90px; }
.article-body a { color: var(--accent); text-underline-offset: 3px; }
.article-body ul, .article-body ol { padding-left: 1.3em; }
.article-body li + li { margin-top: .4em; }
.article-body strong, .article-body b { font-weight: 600; }
.article-body cite { font-style: italic; }
.steps {
  font-family: var(--f-mono); font-size: 0.9rem; line-height: 1.6; padding: 12px 16px; border-radius: 10px;
  background: var(--accent-soft); color: var(--ink); overflow-x: auto;
}
.steps b { color: var(--accent-deep); }

/* Equations (MathML) */
math { font-family: "STIX Two Math", "Cambria Math", "Latin Modern Math", math; }
.eq { display: grid; justify-items: center; gap: 6px; padding: 18px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow-x: auto; }
.eq math { font-size: 1.5rem; }
.eq-label { font-family: var(--f-mono); font-size: 0.78rem; color: var(--muted); text-align: center; } /* no uppercase: it would turn ρ into Ρ */
.eq-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.eq-row .eq { margin: 0; }
.eq-big { font-size: 2.6rem; margin: 6px 0 12px; }

/* Callouts and examples */
.callout { padding: 20px 22px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); border-left: 4px solid var(--accent); }
.callout p + p, .example p + p { margin-top: .6em; }
.callout-title, .example-title { font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-deep); }
.callout.key { border-left-color: var(--mint); text-align: center; background: linear-gradient(135deg, var(--accent-soft), var(--surface)); }
.callout.tip { border-left-color: var(--amber); }
.callout.tip .callout-title { color: var(--amber); }
.example { padding: 20px 22px; border: 1px dashed var(--line); border-radius: 12px; }
.example .steps { margin-top: .8em; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.article-body table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.article-body th, .article-body td { padding: 10px 14px; text-align: left; border-top: 1px solid var(--line); vertical-align: top; }
.article-body thead th { border-top: 0; font-family: var(--f-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface); }
.formula-table td, .formula-table tbody th { font-family: var(--f-mono); font-size: 0.9rem; }
.formula-table tbody th { color: var(--accent-deep); white-space: nowrap; }

/* Diagrams: theme-aware SVG schematics */
.figure, .widget { margin-inline: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.figure.narrow svg { max-width: 380px; margin-inline: auto; }
.figure svg, .widget svg { display: block; width: 100%; height: auto; }
.figure figcaption, .widget figcaption { margin-top: 14px; font-size: 0.88rem; line-height: 1.6; color: var(--muted); text-align: center; }
.sch { overflow: visible; }
.sch .wire { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sch .wire.thick { stroke-width: 3; }
.sch .wire.thicker { stroke-width: 6; stroke-linecap: butt; }
.sch .dim { fill: none; stroke: var(--muted); stroke-width: 1.4; }
.sch .acc { fill: none; stroke: var(--accent); stroke-width: 2; }
.sch .fill-ink { fill: var(--muted); }
.sch .fill-acc { fill: var(--accent); }
.sch .dot { fill: var(--ink); }
.sch .node { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.sch .lbl { fill: var(--ink); font: 500 14px var(--f-body); }
.sch .lbl.sm { font-size: 12px; fill: var(--muted); }
.sch .lbl.mid { text-anchor: middle; }
.sch .lbl.val, .sch .em, .sch .lbl.em { fill: var(--accent); font-weight: 600; }
.sch .water { fill: color-mix(in srgb, var(--accent) 30%, transparent); }
.sch .flow { fill: none; stroke: var(--accent); stroke-width: 3; stroke-dasharray: 8 12; animation: flow 1.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -20; } }
.sch .board { fill: color-mix(in srgb, #1F7A4D 25%, var(--surface)); stroke: var(--line); }
.sch .copper { fill: #D08A3C; }
.sch .copper.side { fill: #9C6326; }

/* Widgets */
.widget-controls { display: grid; gap: 14px; margin-top: 18px; }
.slider { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; font-weight: 500; font-size: 0.95rem; }
.slider output { font-family: var(--f-mono); color: var(--accent); }
.slider input { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); }
.readout { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.readout div { display: grid; gap: 2px; padding: 12px 14px; border-radius: 10px; background: var(--bg); }
.readout span { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.readout b { font: 700 1.4rem/1.2 var(--f-display); color: var(--ink); }
.widget-eq { font-family: var(--f-mono); font-size: 0.95rem; text-align: center; color: var(--accent-deep); }
.widget-eq.big { font-size: 1.6rem; font-weight: 500; }
.widget-note { font-size: 0.92rem; color: var(--muted); text-align: center; }
.widget-warn { padding: 10px 14px; border-radius: 10px; font-size: 0.92rem; color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.btn-sm { padding: 9px 14px; font-size: 0.85rem; justify-self: center; }
.sim-path { fill: none; stroke: none; }
.sch .mask, .sch .wire.mask { fill: var(--surface); }
.sim-dot { fill: var(--accent); }
.electrons .sim-dot { fill: var(--mint); }
.sim-heat { fill: #FF6A2B; opacity: 0; filter: blur(6px); transition: opacity .3s; }
.overheat .sim-svg .wire { transition: stroke .3s; }
.seg { display: flex; justify-content: center; gap: 0; }
.seg button {
  padding: 9px 16px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer;
  font: 600 0.9rem var(--f-body);
}
.seg button:first-child { border-radius: 999px 0 0 999px; }
.seg button:last-child { border-radius: 0 999px 999px 0; }
.seg button + button { border-left: 0; }
.seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.tri-svg { max-width: 260px; margin-inline: auto; }
.tri-cell { fill: transparent; cursor: pointer; transition: fill .2s; }
.tri-cell.covered { fill: var(--accent-soft); }
.tri-letter { fill: var(--ink); font: 700 34px var(--f-display); text-anchor: middle; pointer-events: none; }
.vi-svg .gridline { stroke: var(--line); stroke-width: 1; }
.vi-svg .axis { stroke: var(--muted); stroke-width: 1.5; }
.vi-line { fill: none; stroke-width: 3; stroke-linecap: round; }
.vi-line.res, .key.res { stroke: var(--accent); background: var(--accent); }
.vi-line.lamp, .key.lamp { stroke: var(--amber); background: var(--amber); }
.vi-line.diode, .key.diode { stroke: var(--mint); background: var(--mint); }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; font-size: 0.9rem; }
.legend label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.legend .key { display: inline-block; width: 18px; height: 4px; border-radius: 2px; }

/* Practice and summary */
.practice { display: grid; gap: 10px; }
.practice details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.practice summary { display: flex; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; font-weight: 500; }
.practice summary::-webkit-details-marker { display: none; }
.practice summary > span:first-child {
  flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-deep); font: 600 0.8rem var(--f-mono);
}
.practice details[open] summary > span:first-child { background: var(--accent); color: var(--bg); }
.practice details p { padding: 0 18px 16px 56px; color: var(--muted); }
.practice details p b { color: var(--ink); }
.cheats { list-style: none; padding: 0 !important; display: grid; gap: 8px; font-family: var(--f-mono); font-size: 0.92rem; }
.cheats li { padding: 10px 14px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.article-body .faq { margin-top: 1em; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 3em !important; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.92rem; color: var(--muted); }
.share a { font-weight: 600; }

/* Clap button (blog posts) */
.clap { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: var(--muted); font: 600 0.9rem var(--f-mono); cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.post-hero .clap { margin-top: 18px; }
.clap-icon { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); transition: border-color .2s, color .2s; }
.clap:hover .clap-icon, .clap:focus-visible .clap-icon { border-color: var(--accent); color: var(--accent); }
.clap.is-clapped { color: var(--accent); }
.clap.is-clapped .clap-icon { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.clap.is-clapped .clap-icon svg { fill: color-mix(in srgb, var(--accent) 18%, transparent); }
.i-22 { width: 22px; height: 22px; flex: none; }
.clap-count:empty { display: none; }
.clap-bubble { position: absolute; left: 22px; bottom: 100%; translate: -50% 0; padding: 4px 8px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 0.75rem; pointer-events: none; opacity: 0; }
.clap-bubble.is-on { animation: clap-bubble .8s ease-out; }
@media (prefers-reduced-motion: no-preference) {
  .clap.is-pop .clap-icon { animation: clap-pop .25s ease-out; }
}
@keyframes clap-pop { 50% { transform: scale(1.15); } }
@keyframes clap-bubble { 0% { opacity: 0; transform: translateY(6px); } 20%, 70% { opacity: 1; transform: translateY(-6px); } 100% { opacity: 0; transform: translateY(-14px); } }

/* Comments */
.comments { margin-top: 3em !important; }
.comments h2 { margin-top: 0; }
.comment-list { list-style: none; padding: 0 !important; display: grid; gap: 14px; margin-top: 1em; }
.comment { padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.comment-head { font-size: 0.9rem; color: var(--muted); }
.comment-head b { color: var(--ink); margin-right: 8px; }
.comment-text { margin-top: 6px; font-size: 0.98rem; line-height: 1.65; }
.comment-text p + p { margin-top: .6em; }
.comment-reply { margin-top: 14px; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 10px 10px 0; }
.comments-empty { color: var(--muted); }
.comment-form { display: grid; gap: 14px; margin-top: 2em; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.comment-form h3 { margin: 0; font-size: 1.2rem; }
.comment-note { font-size: 0.9rem; color: var(--muted); margin-top: -6px !important; }
.comment-form .btn { justify-self: start; }
.comment-form .wz-field input, .comment-form .wz-field textarea { background: var(--bg); }
.comment-status { padding: 10px 14px; border-radius: 10px; font-size: 0.92rem; background: color-mix(in srgb, var(--mint) 14%, transparent); }
.comment-status.is-error { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }

/* Comment admin page */
.admin-wrap { max-width: 860px; padding-block: 48px; display: grid; gap: 18px; }
.admin-wrap h1 { font-size: var(--step-3); }
.admin-wrap h2 { font-size: 1.3rem; margin-top: 24px; }
.admin-wrap h2 a { text-decoration: none; }
.admin-wrap pre { padding: 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); overflow-x: auto; }
.admin-notice { padding: 12px 16px; border-radius: 10px; background: var(--accent-soft); }
.admin-login { display: grid; gap: 14px; max-width: 340px; }
.admin-login .btn, .admin-logout { justify-self: start; }
.admin-comment { display: grid; gap: 10px; padding: 18px; margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.admin-comment.pending { border-left: 4px solid var(--amber); }
.admin-comment form { display: grid; gap: 10px; }
.admin-comment textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-actions .btn { padding: 9px 14px; }
.badge { margin-left: 8px; padding: 2px 8px; border-radius: 999px; font: 500 0.7rem var(--f-mono); text-transform: uppercase; background: var(--accent-soft); color: var(--accent-deep); }
.pending .badge { background: color-mix(in srgb, var(--amber) 20%, transparent); color: var(--amber); }

/* ---------- Footer ---------- */
.site-footer { padding-top: clamp(48px, 6vw, 72px); border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
.footer-grid > * { min-width: 0; }
.footer-brand { display: grid; gap: 14px; align-content: start; }
.footer-brand .brand svg { width: 34px; height: 34px; }
.footer-brand .brand-name { font-size: 1.15rem; color: var(--ink); }
.footer-brand p { max-width: 32ch; }
.footer-brand a:not(.brand) { display: inline-block; padding-block: 4px; text-decoration: none; color: var(--ink); }
.footer-title { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-deep); margin-bottom: 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-col a, .footer-brand a { text-decoration: none; }
.footer-col a:hover, .footer-brand a:not(.brand):hover { color: var(--accent); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px;
  margin-top: 48px; padding-block: 22px; border-top: 1px solid var(--line); font-size: 0.82rem;
}

/* Load-in (from a visible state) */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *, .console { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
  .hero-copy > *:nth-child(2) { animation-delay: .06s; }
  .hero-copy > *:nth-child(3) { animation-delay: .12s; }
  .hero-copy > *:nth-child(4) { animation-delay: .18s; }
  .console { animation-delay: .2s; }
  @keyframes rise { from { transform: translateY(14px); opacity: .001; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .article-grid { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
  .toc summary { margin-bottom: 0; }
  .toc details[open] summary { margin-bottom: 10px; }
  .post-feature .post-card { grid-template-columns: 1fr; }
  .post-feature .post-cover { min-height: 0; aspect-ratio: 16 / 7; }
  .hero-grid, .svc-intro, .faq-wrap, .cta-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .why-grid, .offer-grid { grid-template-columns: repeat(2, 1fr); }
  .stack { grid-template-columns: repeat(2, 1fr); }
  .stack div:nth-child(2) { border-right: 0; }
  .stack div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .process { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .cta-actions { justify-content: flex-start; }
  .page-hero-grid { grid-template-columns: 1fr; }
  .page-hero-art { display: none; }

  /* Mobile navigation panel: [menu][logo] ... [Start a project] */
  .nav { gap: 12px; }
  .nav-toggle { display: grid; }
  .nav-actions { margin-left: auto; }
  .site-nav {
    display: none; position: fixed; inset: var(--header-h, 69px) 0 0; z-index: 49; margin: 0;
    padding: 8px max(20px, env(safe-area-inset-right, 0px)) 40px max(20px, env(safe-area-inset-left, 0px));
    background: var(--bg); overflow-y: auto; overscroll-behavior: contain;
  }
  .nav-open, .nav-open body { overflow: hidden; }
  .nav-open .site-nav { display: block; }
  /* Fixed, not sticky, while open: with the page scroll-locked, a sticky header can stay where the page was scrolled from. */
  .nav-open .site-header { position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-links > li { border-bottom: 1px solid var(--line); }
  .nav-links > li > a { display: block; padding: 16px 0; font-size: 1.1rem; color: var(--ink); }
  .has-menu { flex-wrap: wrap; justify-content: space-between; }
  .menu-toggle { width: 44px; height: 44px; }
  .mega {
    position: static; width: 100%; grid-template-columns: 1fr; gap: 18px; padding: 0 0 18px;
    border: 0; border-radius: 0; box-shadow: none; background: none;
  }
  .mega::before { display: none; }
  .mega-foot { margin: 0; padding: 14px 0 0; }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .eq-row { grid-template-columns: 1fr; }
  .figure, .widget { padding: 14px; margin-inline: -4px; }
  .readout b { font-size: 1.15rem; }
  .practice details p { padding-left: 18px; }
  .eq-big { font-size: 2rem; }
  .why-grid, .offer-grid, .stack, .process { grid-template-columns: 1fr; }
  .stack div { border-right: 0; border-bottom: 1px solid var(--line); }
  .stack div:last-child { border-bottom: 0; }
  .console { font-size: 0.72rem; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .brand-name { font-size: 1.15rem; }
  .brand svg { width: 34px; height: 34px; }
  .nav-actions .btn { padding: 9px 12px; font-size: 0.88rem; }
  .faq details p { padding-right: 0; }
}
@media (max-width: 380px) {
  .nav .brand-name { display: none; }
}
