/* MNEMO marketing site — self-hosted fonts, zero third-party requests, no inline styles (strict CSP). */
@font-face { font-family: "Poppins"; font-weight: 700; font-style: normal; font-display: swap; src: url("/assets/fonts/poppins-bold.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-style: normal; font-display: swap; src: url("/assets/fonts/poppins-medium.woff") format("woff"); }

:root {
  --bg: #07080f; --surface: #0f1117; --surface-2: #151822; --elevated: rgba(30, 34, 48, .55);
  --text: #f0f2f5; --muted: #a0a8b8; --faint: #6b7280;
  --primary: #6366f1; --primary-light: #818cf8; --violet: #8b5cf6; --accent: #10b981; --warn: #f59e0b; --danger: #ef4444;
  --border: rgba(160, 168, 184, .14); --glass: rgba(15, 17, 28, .72); --glass-border: rgba(255, 255, 255, .06);
  --grad: linear-gradient(135deg, #6366f1, #8b5cf6);
  --font-head: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --r-sm: 8px; --r-md: 16px; --r-lg: 24px;
  --ease: .3s cubic-bezier(.4, 0, .2, 1);
  --glow: 0 0 44px rgba(99, 102, 241, .22);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body { font-family: var(--font-sans); background: var(--bg); color: var(--text); line-height: 1.65; overflow-x: hidden; -webkit-font-smoothing: antialiased; min-height: 100vh; }
img, svg { max-width: 100%; }
a { color: var(--primary-light); }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
button { font: inherit; cursor: pointer; }
::selection { background: rgba(99, 102, 241, .4); color: #fff; }
:focus-visible { outline: 2px solid var(--primary-light); outline-offset: 3px; border-radius: 4px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.icon.fill { fill: currentColor; stroke: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

.skip-link { position: absolute; top: -48px; left: 0; background: var(--primary); color: #fff; padding: 8px 16px; z-index: 10001; font-weight: 600; text-decoration: none; border-radius: 0 0 var(--r-sm) 0; transition: top .3s; }
.skip-link:focus { top: 0; }
#mesh-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .55; contain: paint; }
main, .site-footer { position: relative; z-index: 1; }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
@media (min-width: 768px) { .container { padding: 0 2rem; } }
@media (min-width: 1024px) { .container { padding: 0 4rem; } }

/* ---------- Header ---------- */
.site-header { background: rgba(7, 8, 15, .88); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; padding-top: env(safe-area-inset-top, 0px); }
.header-content { max-width: 1280px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: block; line-height: 0; }
.logo { height: 38px; width: auto; transition: transform .3s; }
.brand:hover .logo { transform: scale(1.04); }
.main-nav { display: flex; gap: 26px; flex: 1; justify-content: center; }
.main-nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: .95rem; position: relative; white-space: nowrap; transition: color var(--ease); }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--text); }
.main-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--grad); border-radius: 2px; }
.header-actions { display: flex; gap: 10px; align-items: center; }
@media (max-width: 820px) {
  .header-content { padding: 10px 16px; }
  .main-nav { order: 3; flex-basis: 100%; justify-content: flex-start; gap: 22px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .main-nav::-webkit-scrollbar { display: none; }
  .logo { height: 32px; }
}

.breadcrumb-nav { padding: .7rem 0; background: rgba(15, 17, 23, .7); border-bottom: 1px solid var(--border); }
.breadcrumb-list { display: flex; align-items: center; gap: .5rem; list-style: none; font-size: .85rem; color: var(--muted); flex-wrap: wrap; }
.breadcrumb-list li { display: flex; align-items: center; gap: .5rem; }
.breadcrumb-list a { color: var(--muted); text-decoration: none; }
.breadcrumb-list a:hover { color: var(--primary-light); }
.breadcrumb-list [aria-current="page"] { color: var(--text); font-weight: 500; }
.breadcrumb-separator { opacity: .4; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .95rem 1.8rem; font-family: var(--font-sans); font-weight: 600; font-size: 1rem; text-decoration: none; border-radius: var(--r-md); border: 1px solid transparent; cursor: pointer; transition: transform var(--ease), box-shadow var(--ease), background var(--ease), border-color var(--ease), color var(--ease); -webkit-tap-highlight-color: transparent; line-height: 1.2; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 24px rgba(99, 102, 241, .35); }
.btn-primary:hover, .btn-primary:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 34px rgba(99, 102, 241, .5); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--primary-light); color: var(--primary-light); transform: translateY(-2px); }
.btn-ghost { background: rgba(99, 102, 241, .1); color: var(--primary-light); border-color: rgba(99, 102, 241, .25); }
.btn-ghost:hover { background: rgba(99, 102, 241, .18); }
.btn-sm { padding: .55rem 1rem; font-size: .88rem; border-radius: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
@media (max-width: 768px) { .hero-actions .btn, .cta-actions .btn { width: 100%; max-width: 320px; } }

/* ---------- Reveal-on-scroll (only when JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.visible { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .1s; } .js .reveal.d2 { transition-delay: .2s; } .js .reveal.d3 { transition-delay: .3s; } .js .reveal.d4 { transition-delay: .4s; }

/* ---------- Hero ---------- */
.hero { min-height: calc(100vh - 70px); display: flex; align-items: center; padding: 3rem 0 4rem; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 4rem; } }
.hero-content { max-width: 640px; }
@media (max-width: 1023px) { .hero-content { text-align: center; margin: 0 auto; } }
.hero-badge { display: inline-flex; align-items: center; gap: .55rem; padding: .5rem 1rem; background: rgba(99, 102, 241, .1); border: 1px solid rgba(99, 102, 241, .28); border-radius: 50px; font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--primary-light); margin-bottom: 1.5rem; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: blink 2s infinite; }
@keyframes blink { 50% { opacity: .4; } }
.hero-title { font-size: clamp(2.2rem, 6vw, 4.1rem); line-height: 1.08; letter-spacing: -.035em; margin-bottom: 1.4rem; }
.highlight { background: linear-gradient(135deg, #818cf8 0%, #a78bfa 55%, #c4b5fd 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-subtitle { font-size: clamp(1rem, 2.4vw, 1.2rem); color: var(--muted); line-height: 1.8; margin-bottom: 1.8rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 2rem; }
@media (max-width: 1023px) { .chip-row, .tech-stack { justify-content: center; } }
.principle-tag { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .95rem; background: var(--elevated); border: 1px solid var(--border); border-radius: var(--r-sm); font-size: .86rem; color: var(--muted); transition: all .15s; }
.principle-tag .icon { color: var(--accent); }
.principle-tag:hover { border-color: var(--primary); color: var(--text); transform: translateY(-2px); }
.hero-actions, .cta-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.2rem; }
@media (max-width: 1023px) { .hero-actions, .cta-actions { justify-content: center; } }
.tech-stack { display: flex; flex-wrap: wrap; gap: .6rem; }
.tech-pill { padding: .4rem .9rem; background: rgba(139, 92, 246, .1); border: 1px solid rgba(139, 92, 246, .25); border-radius: 50px; font-family: var(--font-mono); font-size: .74rem; color: #c4b5fd; }

/* ---------- Phone mockup (pure HTML/CSS) ---------- */
.hero-visual { position: relative; display: flex; justify-content: center; }
.phone { position: relative; width: 100%; max-width: 310px; aspect-ratio: 9 / 18.5; background: linear-gradient(145deg, #1e2230, #0f1117); border-radius: 42px; padding: .7rem; border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 50px 100px -20px rgba(0, 0, 0, .75), 0 0 80px rgba(99, 102, 241, .18), inset 0 0 0 2px rgba(255, 255, 255, .04); }
.phone-notch { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: 110px; height: 26px; background: #000; border-radius: 0 0 18px 18px; z-index: 3; }
.phone-screen { height: 100%; background: #0f1117; border-radius: 34px; overflow: hidden; display: flex; flex-direction: column; border: 1px solid rgba(255, 255, 255, .05); }
.m-bar { display: flex; align-items: center; gap: .6rem; padding: 2.6rem 1rem .8rem; background: #1a1d23; border-bottom: 1px solid #2d3748; }
.m-bar img { width: 24px; height: 24px; }
.m-bar strong { font-family: var(--font-head); font-size: .95rem; flex: 1; }
.m-bar .icon { color: #a0a8b8; width: 16px; height: 16px; }
.m-body { flex: 1; padding: .8rem; display: flex; flex-direction: column; gap: .6rem; overflow: hidden; }
.m-search { display: flex; align-items: center; gap: .5rem; background: #252a33; border: 1px solid #2d3748; border-radius: 12px; padding: .5rem .7rem; font-size: .72rem; color: #8a929f; }
.m-search .icon { width: 14px; height: 14px; }
.m-card { background: #1a1d23; border: 1px solid #2d3748; border-radius: 12px; padding: .6rem .7rem; }
.m-card h4 { font-size: .74rem; margin-bottom: .2rem; letter-spacing: 0; }
.m-card p { font-size: .66rem; color: #a0a8b8; line-height: 1.45; }
.m-tags { display: flex; gap: .3rem; margin-top: .35rem; }
.m-tags span { font-size: .58rem; color: #818cf8; background: #252a33; border-radius: 99px; padding: 1px 7px; font-weight: 600; }
.m-chat { margin-top: auto; display: flex; flex-direction: column; gap: .4rem; }
.m-bubble { font-size: .66rem; padding: .5rem .65rem; border-radius: 12px; max-width: 90%; line-height: 1.45; }
.m-bubble.user { align-self: flex-end; background: #818cf8; color: #0f1117; font-weight: 600; border-bottom-right-radius: 3px; }
.m-bubble.ai { align-self: flex-start; background: #1a1d23; border: 1px solid #2d3748; border-bottom-left-radius: 3px; }
.m-cite { color: #818cf8; font-weight: 700; }
.m-nav { display: flex; justify-content: space-around; padding: .55rem .5rem .8rem; background: #1a1d23; border-top: 1px solid #2d3748; }
.m-nav .icon { width: 16px; height: 16px; color: #6b7280; } .m-nav .on { color: #818cf8; }
.float-badge { position: absolute; display: inline-flex; align-items: center; gap: .5rem; padding: .55rem .85rem; background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--glass-border); border-radius: 14px; font-size: .78rem; font-weight: 600; box-shadow: 0 14px 34px rgba(0, 0, 0, .45); animation: float 6s ease-in-out infinite; }
.float-badge .icon { color: var(--accent); }
.float-badge.b1 { top: 50%; left: -10%; } .float-badge.b2 { top: 9%; right: -8%; animation-delay: -3s; }
@keyframes float { 50% { transform: translateY(-10px); } }
@media (max-width: 520px) { .float-badge.b1 { left: 0; top: 49%; } .float-badge.b2 { right: 0; top: 7%; } .phone { max-width: 270px; } }

/* ---------- Stats strip ---------- */
.stats { padding: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); padding: 1.6rem 1rem; text-align: center; }
.stat b { display: block; font-family: var(--font-head); font-size: clamp(1.6rem, 4vw, 2.3rem); background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; line-height: 1.1; }
.stat span { font-size: .85rem; color: var(--muted); }

/* ---------- Sections ---------- */
section { padding: 4.5rem 0; position: relative; }
@media (min-width: 768px) { section { padding: 6.5rem 0; } }
.stats { padding: 0 0 2rem; }
.section-header { text-align: center; max-width: 820px; margin: 0 auto 3rem; padding: 0 .5rem; }
.section-tag { display: inline-block; padding: .25rem .8rem; background: rgba(99, 102, 241, .1); border: 1px solid rgba(99, 102, 241, .25); border-radius: 50px; font-family: var(--font-mono); font-size: .74rem; color: var(--primary-light); margin-bottom: 1rem; text-transform: uppercase; letter-spacing: .1em; }
.section-title { font-size: clamp(1.75rem, 4vw, 2.9rem); margin-bottom: 1rem; }
.section-subtitle { font-size: clamp(1rem, 2vw, 1.2rem); color: var(--muted); }

.grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid.c2 { grid-template-columns: repeat(2, 1fr); } .grid.c3 { grid-template-columns: repeat(3, 1fr); } .grid.c4 { grid-template-columns: repeat(2, 1fr); } .grid { gap: 2rem; } }
@media (min-width: 1024px) { .grid.c4 { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--glass-border); border-radius: var(--r-lg); padding: 2rem; position: relative; overflow: hidden; transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease); }
.card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--primary), transparent); opacity: 0; transition: opacity .3s; }
.card:hover { transform: translateY(-5px); border-color: rgba(99, 102, 241, .35); box-shadow: var(--glow); }
.card:hover::before { opacity: 1; }
.card-icon { width: 58px; height: 58px; display: flex; align-items: center; justify-content: center; background: rgba(99, 102, 241, .1); border: 1px solid rgba(99, 102, 241, .25); border-radius: var(--r-md); color: var(--primary-light); font-size: 1.6rem; margin-bottom: 1.2rem; }
.card h3 { font-size: 1.15rem; margin-bottom: .6rem; letter-spacing: -.01em; }
.card p { color: var(--muted); font-size: .94rem; line-height: 1.7; }
.card.center { text-align: center; } .card.center .card-icon { margin-left: auto; margin-right: auto; }
.step-num { position: absolute; top: 1rem; right: 1.2rem; font-family: var(--font-head); font-size: 2.6rem; color: rgba(99, 102, 241, .13); line-height: 1; }

.spec { display: flex; gap: 1rem; align-items: flex-start; padding: 1.4rem; border: 1px solid var(--border); border-radius: var(--r-md); background: rgba(15, 17, 23, .6); }
.spec .icon { font-size: 1.5rem; color: var(--violet); margin-top: .15rem; }
.spec h4 { font-size: 1rem; margin-bottom: .25rem; letter-spacing: 0; }
.spec p { font-size: .875rem; color: var(--muted); line-height: 1.6; }

/* key hierarchy diagram */
.keychain { display: flex; flex-direction: column; align-items: stretch; gap: .5rem; max-width: 760px; margin: 0 auto 3rem; }
@media (min-width: 820px) { .keychain { flex-direction: row; align-items: center; max-width: 1000px; } }
.kc-node { flex: 1; text-align: center; padding: 1.1rem .8rem; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface-2); }
.kc-node b { display: block; font-family: var(--font-head); font-size: .95rem; margin-bottom: .2rem; }
.kc-node span { font-size: .78rem; color: var(--muted); }
.kc-node.hot { background: linear-gradient(135deg, rgba(99, 102, 241, .18), rgba(139, 92, 246, .18)); border-color: rgba(139, 92, 246, .45); box-shadow: var(--glow); }
.kc-arrow { text-align: center; color: var(--primary-light); font-size: .72rem; font-family: var(--font-mono); padding: 0 .3rem; white-space: nowrap; }
.kc-arrow::before { content: "↓"; display: block; font-size: 1.2rem; }
@media (min-width: 820px) { .kc-arrow::before { content: "→"; } }

/* comparison table */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); max-width: 960px; margin: 0 auto; }
table.cmp { width: 100%; border-collapse: collapse; min-width: 560px; font-size: .94rem; }
.cmp th, .cmp td { padding: 1rem 1.2rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.cmp thead th { font-family: var(--font-head); font-size: .9rem; background: var(--surface-2); }
.cmp td:first-child { color: var(--muted); font-weight: 500; }
.cmp th.us, .cmp td.us { background: rgba(99, 102, 241, .08); }
.cmp tr:last-child td { border-bottom: 0; }
.yes { color: var(--accent); font-weight: 600; } .no { color: #f87171; font-weight: 600; }

/* philosophy */
.philosophy-grid { display: grid; gap: 1.5rem; max-width: 1000px; margin: 0 auto; grid-template-columns: 1fr; }
@media (min-width: 768px) { .philosophy-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
.philosophy-card { padding: 2rem; border-radius: var(--r-lg); border: 1px solid var(--border); }
@media (min-width: 768px) { .philosophy-card { padding: 2.4rem; } }
.philosophy-card.never { background: rgba(239, 68, 68, .05); border-color: rgba(239, 68, 68, .22); }
.philosophy-card.always { background: rgba(16, 185, 129, .05); border-color: rgba(16, 185, 129, .22); }
.philosophy-card h3 { font-size: 1.4rem; margin-bottom: 1.3rem; display: flex; align-items: center; gap: .7rem; }
.philosophy-card ul { list-style: none; display: flex; flex-direction: column; gap: .95rem; }
.philosophy-card li { display: flex; gap: .75rem; color: var(--muted); font-size: .94rem; }
.philosophy-card li::before { content: "→"; font-weight: 700; flex: none; }
.never li::before { color: #f87171; } .always li::before { color: var(--accent); }

/* honest limits */
.limits { max-width: 1000px; margin: 0 auto; border: 1px solid rgba(245, 158, 11, .3); background: rgba(245, 158, 11, .05); border-radius: var(--r-lg); padding: 2rem; }
.limits h3 { display: flex; gap: .7rem; align-items: center; font-size: 1.25rem; margin-bottom: 1rem; color: #fbbf24; }
.limits ul { list-style: none; display: grid; gap: .9rem; }
@media (min-width: 768px) { .limits ul { grid-template-columns: 1fr 1fr; gap: 1rem 2rem; } }
.limits li { color: var(--muted); font-size: .93rem; padding-left: 1.3rem; position: relative; }
.limits li::before { content: ""; position: absolute; left: 0; top: .65em; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.limits li strong { color: var(--text); }

/* FAQ */
.faq-container { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.faq-item { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--elevated); overflow: hidden; transition: border-color var(--ease); }
.faq-item[open] { border-color: rgba(99, 102, 241, .4); }
.faq-question { list-style: none; padding: 1.2rem 1.5rem; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after { content: "+"; font-size: 1.4rem; color: var(--primary-light); transition: transform .3s; flex: none; }
.faq-item[open] .faq-question::after { transform: rotate(45deg); }
.faq-question:hover { background: rgba(255, 255, 255, .02); }
.faq-answer { padding: 0 1.5rem 1.3rem; color: var(--muted); font-size: .95rem; line-height: 1.75; }

/* CTA + maintained-by */
.cta-box { max-width: 1000px; margin: 0 auto; text-align: center; padding: 3.5rem 1.5rem; border-radius: 32px; border: 1px solid rgba(99, 102, 241, .3); background: radial-gradient(ellipse at top, rgba(99, 102, 241, .22), rgba(7, 8, 15, 0) 70%), var(--surface); box-shadow: var(--glow); }
.cta-box .logo-mark { width: 76px; height: 76px; margin: 0 auto 1.4rem; display: block; }
.cta-box .cta-actions { justify-content: center; margin-bottom: 1rem; }
.cta-note { color: var(--faint); font-size: .85rem; }
.maintained-card { max-width: 760px; margin: 2.5rem auto 0; display: flex; gap: 1rem; align-items: center; justify-content: center; text-align: left; padding: 1.2rem 1.5rem; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--elevated); color: var(--muted); font-size: .93rem; flex-wrap: wrap; }
.maintained-card .icon { font-size: 1.6rem; color: var(--primary-light); }
.maintained-card a { font-weight: 600; text-decoration: none; }
.maintained-card a:hover { text-decoration: underline; }

/* ---------- Inner pages ---------- */
.page-hero { padding: 4rem 0 2rem; text-align: center; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 1rem; }
.page-hero p { color: var(--muted); max-width: 720px; margin: 0 auto; font-size: 1.1rem; }
.page-hero .meta { margin-top: 1rem; font-size: .85rem; color: var(--faint); font-family: var(--font-mono); }
.page-body { padding: 2rem 0 5rem; }
.prose { max-width: 800px; margin: 0 auto; }
.prose h2 { font-size: 1.6rem; margin: 2.6rem 0 .9rem; padding-top: .4rem; }
.prose h3 { font-size: 1.15rem; margin: 1.8rem 0 .6rem; letter-spacing: -.01em; }
.prose p, .prose li { color: #c3c9d6; font-size: 1rem; line-height: 1.8; }
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { margin: 0 0 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; }
.prose strong { color: var(--text); }
.prose code { font-family: var(--font-mono); font-size: .88em; background: var(--surface-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; color: #c4b5fd; }
.prose a { color: var(--primary-light); }
.prose .callout { border: 1px solid rgba(99, 102, 241, .3); background: rgba(99, 102, 241, .07); border-radius: var(--r-md); padding: 1.2rem 1.4rem; margin: 1.6rem 0; }
.prose .callout.warn { border-color: rgba(245, 158, 11, .35); background: rgba(245, 158, 11, .06); }
.prose .callout p:last-child { margin-bottom: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2rem 0 1.6rem; font-size: .93rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; color: #c3c9d6; min-width: 120px; }
.prose th { color: var(--text); font-family: var(--font-head); font-size: .85rem; background: var(--surface-2); }
.toc { border: 1px solid var(--border); background: var(--elevated); border-radius: var(--r-md); padding: 1.2rem 1.5rem; margin-bottom: 2rem; }
.toc strong { display: block; margin-bottom: .6rem; font-family: var(--font-head); }
.toc ol { margin: 0 0 0 1.2rem; gap: .3rem; } .toc a { text-decoration: none; font-size: .95rem; }
.steps { counter-reset: s; list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.steps li { counter-increment: s; position: relative; padding: 1rem 1rem 1rem 3.6rem; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--elevated); }
.steps li::before { content: counter(s); position: absolute; left: 1rem; top: 1rem; width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; }
.platform-tabs { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .platform-tabs { grid-template-columns: 1fr 1fr; } }
.swatches { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 1rem 0 1.5rem; }
@media (min-width: 700px) { .swatches { grid-template-columns: repeat(4, 1fr); } }
.swatch { border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); font-size: .8rem; }
.swatch i { display: block; height: 64px; }
.swatch .c-indigo { background: #6366f1; } .swatch .c-violet { background: #8b5cf6; } .swatch .c-ink { background: #0f1117; } .swatch .c-mist { background: #f0f2f5; }
.swatch span { display: block; padding: .6rem .8rem; color: var(--muted); } .swatch b { color: var(--text); display: block; }
.asset-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin: 1rem 0 1.5rem; }
@media (min-width: 700px) { .asset-grid { grid-template-columns: repeat(2, 1fr); } }
.asset { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); padding: 1.2rem; text-align: center; }
.asset .stage { display: flex; align-items: center; justify-content: center; min-height: 110px; border-radius: 12px; margin-bottom: .9rem; }
.asset .stage.dark { background: #0f1117; } .asset .stage.light { background: #fafbfc; }
.asset img { max-height: 70px; width: auto; }
.asset a { font-size: .88rem; }
.err-page { min-height: 62vh; display: flex; align-items: center; text-align: center; }
.err-code { font-family: var(--font-head); font-size: clamp(5rem, 18vw, 9rem); line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ---------- Footer ---------- */
.site-footer { background: linear-gradient(to top, var(--surface), transparent); border-top: 1px solid var(--border); padding-top: 4rem; margin-top: 2rem; overflow: hidden; }
.site-footer::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 220px; height: 1px; background: linear-gradient(90deg, transparent, var(--primary), transparent); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2.2rem; margin-bottom: 3rem; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 2.5rem; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr repeat(3, 1fr); gap: 3rem; } }
.footer-logo { height: 42px; width: auto; margin-bottom: 1.2rem; }
.footer-brand p { color: var(--muted); font-size: .94rem; line-height: 1.7; max-width: 340px; margin-bottom: 1rem; }
.footer-brand .maintained { color: var(--text); font-weight: 500; margin-bottom: 1.5rem; }
.footer-brand .maintained a { color: var(--primary-light); font-weight: 700; text-decoration: none; }
.footer-brand .maintained a:hover { text-decoration: underline; }
.footer-social { display: flex; gap: .8rem; }
.social-link { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; background: var(--elevated); border: 1px solid var(--border); border-radius: var(--r-md); color: var(--muted); text-decoration: none; transition: all .15s; font-size: 1.2rem; }
.social-link:hover, .social-link:focus-visible { background: var(--primary); border-color: var(--primary); color: #fff; transform: translateY(-3px); box-shadow: 0 10px 20px rgba(99, 102, 241, .35); }
.footer-title { font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 1.3rem; font-family: var(--font-sans); font-weight: 700; }
.footer-links { display: flex; flex-direction: column; gap: .7rem; }
.footer-link { position: relative; color: var(--muted); text-decoration: none; font-size: .94rem; display: inline-block; transition: color .15s, transform .15s; width: fit-content; }
.footer-link::before { content: "›"; position: absolute; left: -.9rem; opacity: 0; transition: opacity .15s; color: var(--primary-light); font-weight: 700; }
.footer-link:hover, .footer-link:focus-visible { color: var(--text); transform: translateX(.45rem); }
.footer-link:hover::before, .footer-link:focus-visible::before { opacity: 1; }
.footer-bottom { padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 1rem; text-align: center; }
@media (min-width: 768px) { .footer-bottom { flex-direction: row; text-align: left; } }
.footer-copyright { font-size: .86rem; color: var(--muted); }
.footer-copyright a { color: var(--primary-light); font-weight: 600; text-decoration: none; }
.footer-tagline { font-family: var(--font-mono); font-size: .75rem; color: var(--primary-light); opacity: .85; }

/* ---------- Install dialog ---------- */
.install-dialog { margin: auto; width: min(94vw, 520px); max-height: 92vh; overflow-y: auto; padding: 1.6rem; color: var(--text); background: var(--surface); border: 1px solid rgba(99, 102, 241, .35); border-radius: 26px; box-shadow: 0 40px 100px rgba(0, 0, 0, .7), var(--glow); }
.install-dialog::backdrop { background: rgba(3, 4, 10, .72); backdrop-filter: blur(6px); }
.install-dialog[open] { animation: pop .22s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.idlg-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.2rem; }
.idlg-head h2 { font-size: 1.35rem; } .idlg-head p { color: var(--muted); font-size: .9rem; line-height: 1.5; margin-top: .2rem; }
.idlg-head > div { flex: 1; }
.idlg-close { background: none; border: 0; color: var(--muted); padding: .5rem; border-radius: 10px; font-size: 1.2rem; line-height: 0; }
.idlg-close:hover { background: var(--surface-2); color: var(--text); }
.idlg-status { padding: .8rem 1rem; border-radius: 12px; font-size: .92rem; font-weight: 600; margin-bottom: 1rem; background: var(--surface-2); border: 1px solid var(--border); }
.idlg-status.ready { background: rgba(16, 185, 129, .1); border-color: rgba(16, 185, 129, .3); color: #6ee7b7; }
.idlg-status.installed { background: rgba(99, 102, 241, .12); border-color: rgba(99, 102, 241, .35); color: #c7d2fe; }
.idlg-status.bad { background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .3); color: #fca5a5; }
.idlg-checks { list-style: none; display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.idlg-checks li { display: flex; gap: .75rem; align-items: flex-start; font-size: .88rem; padding: .55rem .75rem; border-radius: 10px; background: rgba(21, 24, 34, .7); border: 1px solid var(--border); }
.idlg-checks .st { flex: none; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 800; margin-top: .05rem; }
.idlg-checks .ok .st { background: rgba(16, 185, 129, .18); color: #34d399; }
.idlg-checks .warn .st { background: rgba(245, 158, 11, .18); color: #fbbf24; }
.idlg-checks .bad .st { background: rgba(239, 68, 68, .18); color: #f87171; }
.idlg-checks b { display: block; font-weight: 600; } .idlg-checks small { color: var(--muted); font-size: .8rem; line-height: 1.4; display: block; }
.idlg-note { font-size: .88rem; color: #c3c9d6; background: rgba(99, 102, 241, .08); border: 1px solid rgba(99, 102, 241, .25); border-radius: 12px; padding: .9rem 1rem; margin-bottom: 1rem; line-height: 1.65; }
.idlg-note ol { margin: .4rem 0 0 1.2rem; display: flex; flex-direction: column; gap: .3rem; }
.idlg-actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.idlg-actions .btn { flex: 1; min-width: 150px; }
.idlg-foot { margin-top: 1rem; font-size: .78rem; color: var(--faint); display: flex; gap: .5rem; align-items: center; justify-content: center; }

.toast-root { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 10000; display: flex; flex-direction: column; gap: .5rem; width: min(92vw, 420px); pointer-events: none; }
.site-toast { background: var(--surface-2); border: 1px solid rgba(99, 102, 241, .4); padding: .85rem 1.1rem; border-radius: 14px; box-shadow: 0 14px 40px rgba(0, 0, 0, .6); font-size: .92rem; animation: pop .22s ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media print { .site-header, .site-footer, #mesh-canvas, .install-dialog { display: none !important; } body { background: #fff; color: #000; } .prose p, .prose li { color: #000; } }
.center-note { text-align: center; margin-top: 1.6rem; }
/* keep card hover lift working after the reveal animation finishes */
.js .card.reveal.visible { transition: transform .3s, border-color .3s, box-shadow .3s; transition-delay: 0s; }
.js .card.reveal.visible:hover { transform: translateY(-5px); }

/* compact header on phones: icon-only Install, smaller logo */
@media (max-width: 520px) {
  .header-actions .btn-label { display: none; }
  .header-actions .btn-ghost { padding: .6rem .7rem; }
  .logo { height: 28px; }
  .header-content { gap: 10px; }
}
/* install dialog: collapsible checklist keeps the actions in view */
.idlg-details { margin-bottom: 1rem; border: 1px solid var(--border); border-radius: 12px; background: rgba(21, 24, 34, .5); }
.idlg-details > summary { list-style: none; cursor: pointer; padding: .7rem 1rem; font-size: .88rem; font-weight: 600; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.idlg-details > summary::-webkit-details-marker { display: none; }
.idlg-details > summary::after { content: "Show"; font-size: .76rem; font-weight: 600; color: var(--primary-light); }
.idlg-details[open] > summary::after { content: "Hide"; }
.idlg-details .idlg-checks { padding: 0 .6rem .6rem; margin: 0; }
