/* Know My Battery website. Motion follows Emil Kowalski's skills (MIT): custom ease-out curves,
   transform/opacity only, under 300 ms for UI, one staggered entrance, reduced motion respected. */

:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --bg: #f6f7fb;
  --surface: #ffffff;
  --raised: #eef1f7;
  --text: #0b1020;
  --muted: #586074;
  --line: #e3e7ef;
  --accent: #059669;
  --accent-strong: #047857;
  --accent-2: #0891b2;
  --accent-soft: #e0f7ef;
  --on-accent: #ffffff;
  --grad: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  --glow: radial-gradient(60% 50% at 70% 0%, rgb(16 185 129 / 0.16), transparent 70%),
          radial-gradient(40% 40% at 10% 10%, rgb(6 182 212 / 0.12), transparent 70%);
  --warn: #b45309;

  --radius: 20px;
  --radius-sm: 12px;
  --gutter: 16px;
  --max: 1080px;

  color-scheme: light dark;
  font: 100%/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070a12;
    --surface: #0e1320;
    --raised: #151b2b;
    --text: #eef1f8;
    --muted: #98a1b6;
    --line: #20283a;
    --accent: #34d399;
    --accent-strong: #6ee7b7;
    --accent-2: #22d3ee;
    --accent-soft: #0f2a25;
    --on-accent: #03140d;
    --glow: radial-gradient(60% 50% at 70% 0%, rgb(52 211 153 / 0.14), transparent 70%),
            radial-gradient(40% 40% at 10% 10%, rgb(34 211 238 / 0.10), transparent 70%);
    --warn: #fbbf24;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }

/* ---------- Header and menu ---------- */
.skip { position: absolute; left: 16px; top: -48px; z-index: 30; background: var(--surface); color: var(--text); padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 8px; }
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  padding-top: env(safe-area-inset-top);
}
@media (prefers-reduced-transparency: reduce) { .site-header { background: var(--bg); backdrop-filter: none; } }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 650; letter-spacing: -0.01em; }
.brand-mark { width: 28px; height: 28px; flex-shrink: 0; }
.nav { display: flex; align-items: center; gap: 4px; font-size: 0.95rem; }
.nav a:not(.button) { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 10px; }
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.nav .nav-cta { margin-left: 8px; }
@media (hover: hover) and (pointer: fine) { .nav a:not(.button) { transition: color 150ms ease, background-color 150ms ease; } .nav a:not(.button):hover { color: var(--text); background: var(--raised); } }
.menu-button { display: none; }

@media (max-width: 899px) {
  .menu-button {
    display: grid; place-content: center; gap: 6px; width: 48px; height: 48px; margin-right: -10px;
    background: none; border: 0; border-radius: 12px; color: var(--text); cursor: pointer; touch-action: manipulation;
  }
  .menu-button span { display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 200ms var(--ease-out); }
  .menu-open .menu-button span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-open .menu-button span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 8px var(--gutter) 20px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -24px rgb(0 0 0 / 0.35);
    opacity: 0; transform: translateY(-8px); visibility: hidden; pointer-events: none;
    transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s 200ms;
  }
  .nav a:not(.button) { padding: 14px 12px; font-size: 1.05rem; }
  .nav .nav-cta { margin: 10px 0 0; min-height: 48px; }
  .menu-open .nav { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
}
/* Without scripts the menu button can't work, so show the links in a row under the logo instead. */
@media (max-width: 899px) {
  html:not(.js) .menu-button { display: none; }
  html:not(.js) .site-header .wrap { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 6px; }
  html:not(.js) .nav { position: static; flex-direction: row; flex-wrap: wrap; opacity: 1; transform: none; visibility: visible; pointer-events: auto; box-shadow: none; border: 0; padding: 0; background: none; }
  html:not(.js) .nav a:not(.button) { padding: 8px 10px; font-size: 0.95rem; }
  html:not(.js) .nav .nav-cta { display: none; }
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; touch-action: manipulation;
  transition: transform 160ms var(--ease-out), background-color 150ms ease, border-color 150ms ease;
}
.button:active { transform: scale(0.97); }
.button.primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px -10px rgb(16 185 129 / 0.6); }
.button.ghost { background: transparent; color: var(--text); border-color: var(--line); }
@media (hover: hover) and (pointer: fine) {
  .button.primary { transition: transform 160ms var(--ease-out), filter 150ms ease; }
  .button.primary:hover { filter: brightness(1.07); }
  .button.ghost:hover { border-color: var(--muted); }
}
.button[aria-disabled="true"] { opacity: 0.6; cursor: default; }
.button[aria-disabled="true"]:active { transform: none; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 56px; background: var(--glow); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* Brand mark: the app's launcher icon. */
.brand-mark .b { fill: #006c51; }
.brand-mark .z { fill: #b8f5d7; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-mark .b { fill: #34d399; } :root:not([data-theme="light"]) .brand-mark .z { fill: #052e22; } }
.hero .wrap { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.1fr 0.9fr; } .hero { padding: 104px 0 88px; } }
.eyebrow { display: inline-block; font-size: 0.85rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 4px 12px; border-radius: 999px; }
h1, h2, h3 { line-height: 1.1; margin: 0; }
h1 {
  font-size: clamp(2.25rem, 6vw, 4rem); letter-spacing: -0.03em; line-height: 1.03;
  margin: 18px 0 18px; font-weight: 750; text-wrap: balance;
}
.lede { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--muted); max-width: 52ch; margin: 0 0 28px; text-wrap: pretty; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-note { font-size: 0.875rem; color: var(--muted); margin-top: 14px; }

.button.small { min-height: 40px; padding: 0 18px; font-size: 0.925rem; }
.button.light { background: #fff; color: #062a24; }
.button.outline-light { color: #fff; border-color: rgb(255 255 255 / 0.4); }
@media (hover: hover) and (pointer: fine) { .button.outline-light:hover { border-color: #fff; } }
.ticks { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 18px 0 0; color: var(--muted); font-size: 0.925rem; }
.ticks li::before { content: "✓"; color: var(--accent); font-weight: 700; margin-right: 6px; }

/* Phone frames around real screenshots (720 x 1440 crops: 1:2). */
.phone {
  position: relative; border-radius: 34px; padding: 8px; background: #0b1020;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.06) inset, 0 40px 80px -40px rgb(3 20 13 / 0.55), 0 18px 36px -24px rgb(0 0 0 / 0.4);
}
.phone img { width: 100%; height: auto; aspect-ratio: 1 / 2; border-radius: 27px; background: #eef1f7; }
.hero-phones { position: relative; margin: 0; justify-self: center; width: min(64vw, 300px); padding: 0 0 40px; }
.hero-phones .phone-front { position: relative; z-index: 2; }
.hero-phones .phone-back { position: absolute; z-index: 1; width: 82%; top: 9%; left: -38%; transform: rotate(-7deg); opacity: 0.92; }
.hero-phones figcaption { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: max-content; max-width: 88vw; font-size: 0.8rem; color: var(--muted); text-align: center; }
.chip {
  position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-size: 0.85rem; box-shadow: 0 14px 30px -16px rgb(0 0 0 / 0.35);
}
.chip b { font-variant-numeric: tabular-nums; }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.chip-a { top: -3%; right: -18%; animation: rise 600ms var(--ease-out) 500ms both; }
.chip-b { bottom: 22%; left: -30%; animation: rise 600ms var(--ease-out) 650ms both; }
@media (max-width: 899px) { .hero-phones { margin-top: 8px; } .hero-phones .phone-back { left: -30%; } .chip-a { right: -12%; } .chip-b { left: -16%; } }
@media (max-width: 420px) { .hero-phones .phone-back { display: none; } .chip-a { right: -8%; } .chip-b { left: -8%; } }

/* Highlights strip */
.strip { padding: 0 0 56px; }
.strip .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 900px) { .strip .wrap { grid-template-columns: repeat(4, 1fr); } }
.strip .wrap > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.strip b { display: block; font-size: 1.9rem; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; }
.strip span { color: var(--muted); font-size: 0.9rem; }

/* Feature tour */
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center p { margin: 0 auto; }
.section-head .eyebrow { margin-bottom: 14px; }
/* The soft glow behind each screenshot and the hero's floating chips reach past the edges; clip them so the page never scrolls sideways. */
.tour, .hero { overflow-x: clip; }
.tour-row { display: grid; gap: 32px; align-items: center; padding: 40px 0; }
.tour-row + .tour-row { border-top: 1px solid var(--line); }
@media (min-width: 900px) {
  .tour-row { grid-template-columns: 1fr 1fr; gap: 72px; padding: 56px 0; }
  .tour-row.flip .tour-shot { order: 2; }
}
.tour-shot { position: relative; justify-self: center; width: min(70vw, 280px); }
.tour-shot::before { content: ""; position: absolute; inset: 5% -35%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 20%, transparent), transparent); z-index: -1; }
.kicker { font-size: 0.85rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.tour-copy h3 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.02em; margin: 8px 0 12px; text-wrap: balance; }
.tour-copy > p { color: var(--muted); font-size: 1.05rem; max-width: 52ch; margin: 0 0 16px; }
.checks { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.checks li { position: relative; padding-left: 28px; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 0.75rem; font-weight: 700; display: grid; place-items: center; margin-top: 2px; }
.more { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.more::after { content: "→"; transition: transform 160ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .more:hover::after { transform: translateX(3px); } }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--grad); color: #fff; font-weight: 700; margin-bottom: 16px; }
.steps h3 { font-size: 1.1rem; margin-bottom: 8px; }
.steps p { margin: 0; color: var(--muted); }
.row-links { margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }

/* Screenshot gallery: native horizontal scrolling with snap points. */
.gallery-band { padding-bottom: 56px; }
.gallery {
  display: flex; gap: 20px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding: 8px max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))) 24px; scrollbar-width: thin;
}
.gallery figure { flex: 0 0 220px; margin: 0; scroll-snap-align: center; }
@media (min-width: 720px) { .gallery figure { flex-basis: 240px; } }
.gallery figcaption { text-align: center; color: var(--muted); font-size: 0.9rem; margin-top: 12px; }
.gallery:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.plan { position: relative; }
.plan-tag { position: absolute; top: 24px; right: 24px; font-size: 0.75rem; font-weight: 650; color: #fff; background: var(--grad); padding: 3px 10px; border-radius: 999px; }
.faq-wrap { display: grid; gap: 8px 56px; }
@media (min-width: 900px) { .faq-wrap { grid-template-columns: 0.8fr 1.2fr; } }
.faq .more { margin-top: 8px; }

/* Closing call to action */
.cta-band { padding: 72px 0 88px; }
.cta-card {
  display: grid; gap: 24px; align-items: center; padding: 40px 28px; border-radius: 28px; color: #fff;
  background: radial-gradient(70% 90% at 85% 0%, rgb(16 185 129 / 0.55), transparent 70%), linear-gradient(135deg, #062a24, #0a1d33);
}
@media (min-width: 900px) { .cta-card { grid-template-columns: 1.3fr 1fr; padding: 56px; } .cta-card .cta-row { justify-content: flex-end; } }
.cta-card h2 { color: #fff; }
.cta-card p { color: #c7d3e3; margin: 0; max-width: 52ch; }

/* Figures inside the manual */
.shot { margin: 20px 0 28px; display: grid; gap: 10px; justify-items: start; }
.shot .phone { width: min(70vw, 260px); }
.shot figcaption { font-size: 0.875rem; color: var(--muted); max-width: 60ch; }
.shot-pair { display: flex; flex-wrap: wrap; gap: 20px; }

/* Illustration: an example reading card, clearly labelled as an example. */
.example {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: 28px; padding: 24px; box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.25);
  max-width: 420px; justify-self: center; width: 100%;
}
.example-tag { position: absolute; top: 16px; right: 16px; font-size: 0.75rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.example h3 { font-size: 0.95rem; color: var(--muted); font-weight: 600; }
.example .big { font-size: 3.25rem; font-weight: 750; letter-spacing: -0.03em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.example .sub { color: var(--muted); margin: 0 0 18px; }
.meter { height: 10px; background: var(--raised); border-radius: 999px; overflow: hidden; }
.meter span { display: block; height: 100%; width: 100%; background: var(--grad); border-radius: inherit; transform-origin: left center; transform: scaleX(0.89); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.stat { background: var(--raised); border-radius: var(--radius-sm); padding: 12px 14px; }
.stat b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); }
.confidence { margin-top: 16px; font-size: 0.875rem; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-head { max-width: 640px; margin-bottom: 36px; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: -0.02em; margin-bottom: 12px; text-wrap: balance; }
.section-head p { color: var(--muted); margin: 0; font-size: 1.075rem; max-width: 60ch; }

.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .grid.three { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { font-size: 1.1rem; margin-bottom: 8px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); }
.icon { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 16px; }
.icon svg { width: 22px; height: 22px; }

.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Honesty list */
.honest { display: grid; gap: 14px; padding: 0; margin: 0; list-style: none; }
@media (min-width: 720px) { .honest { grid-template-columns: 1fr 1fr; } }
.honest li { display: flex; gap: 14px; align-items: flex-start; }
.honest li::before { content: ""; width: 22px; height: 22px; flex-shrink: 0; margin-top: 2px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f7a4d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/14px no-repeat; }
.honest p { margin: 2px 0 0; color: var(--muted); }

/* Free vs Premium */
.plans { display: grid; gap: 16px; }
@media (min-width: 800px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.plan.premium { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.plan h3 { font-size: 1.35rem; letter-spacing: -0.01em; }
.plan .price { color: var(--muted); margin: 6px 0 18px; }
.plan ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.plan li::marker { color: var(--accent); }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 760px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; font-weight: 400; color: var(--muted); transition: transform 200ms var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--muted); max-width: 65ch; }

/* ---------- Footer ---------- */
.site-footer { padding: 56px 0 calc(28px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 0.925rem; border-top: 1px solid var(--line); background: var(--surface); }
.footer-grid { display: grid; gap: 32px 24px; grid-template-columns: 1fr 1fr; }
.footer-about { grid-column: 1 / -1; max-width: 360px; }
.footer-about p { margin: 12px 0 16px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.6fr repeat(4, 1fr); } .footer-about { grid-column: auto; } }
.site-footer nav { display: grid; gap: 4px; align-content: start; }
.site-footer h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text); margin: 0 0 8px; }
.site-footer nav a { color: var(--muted); text-decoration: none; padding: 6px 0; }
@media (hover: hover) and (pointer: fine) { .site-footer nav a { transition: color 150ms ease; } .site-footer nav a:hover { color: var(--accent); } }
.store-badge { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 12px; border-radius: 12px; background: var(--text); color: var(--bg); line-height: 1.1; }
.store-badge svg { width: 24px; height: 24px; }
.store-badge span { font-weight: 650; display: grid; }
.store-badge small { font-weight: 400; font-size: 0.7rem; opacity: 0.8; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.85rem; }

/* ---------- Document pages (privacy, support) ---------- */
.doc { padding: 56px 0 72px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
.doc h2 { font-size: 1.35rem; margin: 36px 0 10px; letter-spacing: -0.01em; }
.doc p, .doc li { color: var(--text); max-width: 65ch; }
.doc .meta { color: var(--muted); }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 0.95rem; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--muted); font-weight: 600; }
.table-scroll { overflow-x: auto; }

/* ---------- Manual and guide pages ---------- */
.doc-layout { display: grid; gap: 32px; }
@media (min-width: 980px) { .doc-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 56px; } .doc-layout .wrap-inner { max-width: 760px; } }
.toc { font-size: 0.925rem; }
.toc nav { position: sticky; top: 84px; display: grid; gap: 2px; }
.toc a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; }
@media (hover: hover) and (pointer: fine) { .toc a { transition: background-color 150ms ease, color 150ms ease; } .toc a:hover { background: var(--raised); color: var(--text); } }
.toc strong { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 0 10px 8px; }
@media (max-width: 979px) { .toc nav { position: static; } .toc details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; } }
.doc h2 { scroll-margin-top: 80px; }
.doc h3 { font-size: 1.1rem; margin: 24px 0 8px; scroll-margin-top: 80px; }
.doc ol, .doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.callout { background: var(--accent-soft); border-radius: var(--radius-sm); padding: 14px 18px; margin: 18px 0; }
.callout p { margin: 0; }
.callout.warn { background: color-mix(in srgb, var(--warn) 14%, transparent); }
.pill { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--grad); color: #fff; vertical-align: middle; margin-left: 4px; }
kbd, .ui { font: inherit; font-weight: 600; background: var(--raised); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; white-space: nowrap; }
.breadcrumb { font-size: 0.875rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }

/* ---------- Contact form ---------- */
.form { display: grid; gap: 16px; max-width: 620px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; }
.field input, .field textarea, .field select {
  font: inherit; font-size: 16px; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; min-height: 48px; width: 100%;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.field .hint { font-size: 0.85rem; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.status { min-height: 1.5em; font-weight: 600; }
.status.ok { color: var(--accent); }
.status.err { color: var(--warn); }

/* ---------- Entrance (marketing, rare: one staggered entrance on the hero) ---------- */
/* Pure CSS so the content always appears, even if scripts or animation frames don't run. */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes fill { from { transform: scaleX(0); } }
.enter { animation: rise 600ms var(--ease-out) both; }
.enter:nth-child(2) { animation-delay: 90ms; }
.enter:nth-child(3) { animation-delay: 160ms; }
.enter:nth-child(4) { animation-delay: 220ms; }
.example.enter { animation-delay: 140ms; }
.meter span { animation: fill 900ms var(--ease-in-out) 450ms both; }

/* Sections fade in once as they come into view; hidden only once the observer is running. */
.io .reveal { opacity: 0; transform: translateY(16px); }
.io .reveal.shown { opacity: 1; transform: none; transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  @keyframes rise { from { opacity: 0; } }
  .enter { animation-duration: 300ms; animation-delay: 0ms !important; }
  .meter span { animation: none; }
  .io .reveal { transform: none; }
  .io .reveal.shown { transition: opacity 300ms ease; }
  .button, .faq summary::after { transition: none; }
}
