/*
 * ExA docs site. Material Design 3 color roles from the extension's tokens
 * (apps/extension/src/shared/tokens.css, seed #1a56db), light and dark from prefers-color-scheme.
 */
@font-face { font-family: 'Roboto Flex'; font-weight: 100 1000; font-display: swap; src: url('fonts/roboto-flex-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: 'Roboto Flex'; font-weight: 100 1000; font-display: swap; src: url('fonts/roboto-flex-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+1E00-1E9F, U+2020, U+20A0-20AB; }
@font-face { font-family: 'Roboto Mono'; font-weight: 100 700; font-display: swap; src: url('fonts/roboto-mono-latin.woff2') format('woff2'); }

:root {
  color-scheme: light dark;
  --primary: #0051df; --on-primary: #fff; --primary-container: #dbe1ff; --on-primary-container: #003dab;
  --secondary-container: #e3dfff; --on-secondary-container: #454364;
  --tertiary: #675687; --tertiary-container: #ebdcff; --on-tertiary-container: #4f3e6e;
  --error: #ba1a1a; --error-container: #ffdad6;
  --surface: #faf8ff; --surface-low: #f3f3ff; --surface-container: #ecedfb; --surface-high: #e6e7f5; --surface-highest: #e1e1ef; --surface-lowest: #fff;
  --on-surface: #191b25; --on-surface-variant: #434654; --outline: #747685; --outline-variant: #c3c5d6;
  --shadow: 0 1px 3px 1px rgb(0 0 0 / .15), 0 1px 2px rgb(0 0 0 / .3);
  --shadow-3: 0 4px 8px 3px rgb(0 0 0 / .15), 0 1px 3px rgb(0 0 0 / .3);
  --shadow-5: 0 12px 24px 6px rgb(0 0 0 / .14), 0 4px 8px rgb(0 0 0 / .22);
  --glow-a: #b5c4ff66; --glow-b: #ebdcffaa;
  --font: 'Roboto Flex', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Roboto Mono', ui-monospace, monospace;
  --r-s: 8px; --r-m: 12px; --r-l: 16px; --r-xl: 28px;
  --ease: cubic-bezier(.2, 0, 0, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #b5c4ff; --on-primary: #00297a; --primary-container: #003dab; --on-primary-container: #dbe1ff;
    --secondary-container: #454364; --on-secondary-container: #e3dfff;
    --tertiary: #d2bdf5; --tertiary-container: #4f3e6e; --on-tertiary-container: #ebdcff;
    --error: #ffb4ab; --error-container: #93000a;
    --surface: #10131c; --surface-low: #191b25; --surface-container: #1d1f29; --surface-high: #272a34; --surface-highest: #32343f; --surface-lowest: #0b0e17;
    --on-surface: #e1e1ef; --on-surface-variant: #c3c5d6; --outline: #8d909f; --outline-variant: #434654;
    --glow-a: #003dab88; --glow-b: #4f3e6e88;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--surface); color: var(--on-surface); font: 400 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font: 500 .88em var(--mono); background: var(--surface-high); padding: .1em .4em; border-radius: 6px; }
kbd { font: 500 .8em var(--mono); display: inline-block; padding: .15em .5em; margin: 0 .12em; border-radius: 6px; background: var(--surface-lowest); border: 1px solid var(--outline-variant); border-bottom-width: 2px; color: var(--on-surface); }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
.muted { color: var(--on-surface-variant); font-size: 14px; }

.ms { font-family: 'Material Symbols Rounded'; font-weight: normal; font-style: normal; font-size: 20px; line-height: 1; display: inline-block; vertical-align: middle; font-variation-settings: 'FILL' 0, 'wght' 400, 'opsz' 24; -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga'; user-select: none; }
.ms.big { font-size: 32px; }

/* Top app bar */
.top-app-bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; padding: 12px max(24px, calc((100vw - 1200px) / 2)); background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(16px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top-app-bar nav { display: flex; gap: 4px; margin-left: auto; }
.top-app-bar nav a { color: var(--on-surface-variant); font-weight: 500; font-size: 14px; padding: 8px 14px; border-radius: 20px; }
.top-app-bar nav a:hover { background: color-mix(in srgb, var(--on-surface) 8%, transparent); text-decoration: none; color: var(--on-surface); }
.top-app-bar.scrolled { border-bottom-color: var(--outline-variant); }
.scroll-progress { display: none; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--primary); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
.motion .scroll-progress { display: block; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--on-surface); }
.brand:hover { text-decoration: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 24px; border-radius: 24px; font: 500 15px var(--font); letter-spacing: .01em; position: relative; overflow: hidden; transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.btn:hover { text-decoration: none; }
.btn::after { content: ''; position: absolute; inset: 0; background: currentColor; opacity: 0; transition: opacity .2s; }
.btn:hover::after { opacity: .08; }
.btn:active::after { opacity: .12; }
.btn.small { height: 40px; padding: 0 16px; font-size: 14px; }
.btn.filled { background: var(--primary); color: var(--on-primary); }
.btn.filled:hover { box-shadow: var(--shadow); }
.btn.tonal { background: var(--secondary-container); color: var(--on-secondary-container); }
.btn.outlined { border: 1px solid var(--outline); color: var(--primary); }

/* Hero */
.hero { max-width: 1248px; margin: 0 auto; padding: 72px 24px 48px; display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; position: relative; }
.hero::before { content: ''; position: absolute; inset: -80px -10vw auto; height: 720px; z-index: -1; background: radial-gradient(40% 50% at 75% 40%, var(--glow-a), transparent 70%), radial-gradient(35% 45% at 20% 20%, var(--glow-b), transparent 70%); }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--outline-variant); font-size: 14px; font-weight: 500; color: var(--on-surface-variant); background: var(--surface-low); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #e8101a; box-shadow: 0 0 0 0 #e8101a88; animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero h1 { font-size: clamp(40px, 5.2vw, 64px); line-height: 1.06; font-weight: 600; margin: 20px 0; letter-spacing: -.025em; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--primary), var(--tertiary)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 19px; color: var(--on-surface-variant); margin: 0 0 32px; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.cta.center { justify-content: center; }
.dl { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; }
.hint { font: 400 12px/16px var(--mono); color: var(--on-surface-variant); letter-spacing: .02em; min-height: 16px; }
.facts { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--on-surface-variant); font-size: 14px; }
.facts .ms { color: var(--primary); margin-right: 6px; }

.hero-art { position: relative; aspect-ratio: 1.25; }
.frame { margin: 0; border-radius: var(--r-m); overflow: hidden; background: var(--surface-lowest); box-shadow: var(--shadow-5); border: 1px solid var(--outline-variant); position: absolute; transition: transform .5s var(--ease); }
.chrome { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; background: var(--surface-high); font-size: 12px; color: var(--on-surface-variant); }
.chrome i { width: 10px; height: 10px; border-radius: 50%; background: var(--outline-variant); }
.chrome i:first-child { background: #ff5f57; } .chrome i:nth-child(2) { background: #febc2e; } .chrome i:nth-child(3) { background: #28c840; }
.chrome span { margin-left: 8px; }
.frame.back { width: 88%; top: 0; right: 0; transform: rotate(1.5deg); }
.frame.front { width: 74%; left: 0; bottom: 4%; }
.frame.popup { width: 32%; right: -2%; bottom: -4%; border-radius: var(--r-l); }
.hero-art:hover .back { transform: rotate(0) translateY(-6px); }
.hero-art:hover .popup { transform: translateY(-6px); }

/* Capture strip */
.strip { max-width: 1200px; margin: 24px auto 0; padding: 0 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.strip div { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: var(--surface-container); color: var(--on-surface-variant); font-weight: 500; font-size: 14px; }
.strip .ms { color: var(--primary); }

/* Sections */
.section { max-width: 1200px; margin: 0 auto; padding: 96px 24px 0; }
.eyebrow { margin: 0 0 8px; color: var(--primary); font-weight: 600; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.section h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; font-weight: 600; max-width: 22em; margin-bottom: 40px; }
.sub { color: var(--on-surface-variant); margin: -24px 0 32px; }
.card { background: var(--surface-low); border-radius: var(--r-xl); padding: 28px; border: 1px solid color-mix(in srgb, var(--outline-variant) 60%, transparent); }
.card h3 { font-size: 20px; font-weight: 600; margin: 16px 0 8px; }
.card p { margin: 0; color: var(--on-surface-variant); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.steps .card { position: relative; overflow: hidden; }
.steps .ms.big { color: var(--primary); }
.num { position: absolute; right: 20px; top: -10px; font-size: 120px; font-weight: 800; line-height: 1; color: var(--surface-highest); z-index: 0; }
.steps .card > :not(.num) { position: relative; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { transition: background .2s, transform .3s var(--ease), box-shadow .3s; }
.feature:hover { background: var(--surface-container); transform: translateY(-3px); box-shadow: var(--shadow); }
.icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: var(--primary-container); color: var(--on-primary-container); }
.feature:nth-child(3n+2) .icon { background: var(--tertiary-container); color: var(--on-tertiary-container); }
.feature:nth-child(3n) .icon { background: var(--secondary-container); color: var(--on-secondary-container); }
.icon .ms { font-size: 24px; }

/* Tour */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 20px; scrollbar-width: none; }
.tabs button { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--outline-variant); background: transparent; color: var(--on-surface-variant); font: 500 14px var(--font); cursor: pointer; transition: background .2s; }
.tabs button:hover { background: color-mix(in srgb, var(--on-surface) 8%, transparent); }
.tabs button[aria-selected=true] { background: var(--secondary-container); color: var(--on-secondary-container); border-color: transparent; }
.tabs button:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.howto { margin: 0; }
.howto video { display: block; width: 100%; height: auto; border-radius: var(--r-l); border: 1px solid var(--outline-variant); box-shadow: var(--shadow-3); background: var(--surface-lowest); }
.panel { margin: 0; animation: fade .35s var(--ease); }
.panel img { border-radius: var(--r-l); border: 1px solid var(--outline-variant); box-shadow: var(--shadow-3); }
.panel#t-options img { max-width: 880px; margin: 0 auto; }
.panel figcaption { margin-top: 16px; color: var(--on-surface-variant); text-align: center; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

/* Install */
.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.split h2 { margin-bottom: 24px; }
.numbered { padding: 0; margin: 0; list-style: none; counter-reset: n; }
.numbered li { counter-increment: n; position: relative; padding: 0 0 18px 48px; }
.numbered li::before { content: counter(n); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--primary-container); color: var(--on-primary-container); display: grid; place-items: center; font-weight: 600; font-size: 14px; }
.note { display: flex; gap: 10px; padding: 14px 16px; border-radius: var(--r-m); background: var(--surface-container); color: var(--on-surface-variant); font-size: 14px; }
.note .ms { color: var(--primary); }
.keys h3 { margin-top: 0; display: flex; gap: 10px; align-items: center; }
.keys h3 .ms { color: var(--primary); }
.keys dl { display: grid; grid-template-columns: auto 1fr; gap: 14px 20px; margin: 20px 0; align-items: center; }
.keys dt { white-space: nowrap; }
.keys dd { margin: 0; }

/* Final call */
.final { padding-bottom: 96px; }
.hero-card { text-align: center; padding: 64px 24px; background: linear-gradient(135deg, var(--primary-container), var(--tertiary-container)); border: 0; }
.hero-card h2 { margin: 0 auto 12px; color: var(--on-primary-container); }
.hero-card .hint { color: var(--on-primary-container); opacity: .8; }
.hero-card p { color: var(--on-primary-container); margin-bottom: 32px; font-size: 18px; }

footer { border-top: 1px solid var(--outline-variant); padding: 32px max(24px, calc((100vw - 1200px) / 2)); display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
footer .brand { font-size: 16px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; }
footer nav a { color: var(--on-surface-variant); }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .steps, .grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .top-app-bar nav { display: none; }
  .top-app-bar .btn { margin-left: auto; }
}
@media (max-width: 640px) {
  .steps, .grid { grid-template-columns: 1fr; }
  .hero-art { aspect-ratio: 1.1; }
  .section { padding-top: 72px; }
}
/* Scroll animations (assets/motion.js). Reveal targets rise by --rise; hero frames drift by --py.
   `translate` keeps both apart from the hover transforms above. Same list as REVEAL in motion.js. */
:is(.hero-copy > *, .frame, .strip > div, .section > .eyebrow, .section > h2, .section > .sub, .steps > li, .grid > .feature, .tabs, .panels, .split > *) { translate: 0 calc(var(--rise, 0px) + var(--py, 0px)); }
.motion :is(.hero-copy > *, .frame, .strip > div, .section > .eyebrow, .section > h2, .section > .sub, .steps > li, .grid > .feature, .tabs, .panels, .split > *) { --rise: 80px; opacity: 0; visibility: hidden; }
.howto, .hero-card { will-change: transform; }
@media print { .motion :is(.hero-copy > *, .frame, .strip > div, .section > .eyebrow, .section > h2, .section > .sub, .steps > li, .grid > .feature, .tabs, .panels, .split > *) { opacity: 1 !important; visibility: visible !important; translate: none; } }

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