/* Pearl tokens, copied from Table-IQ src/index.css + DESIGN.md. Keep in sync when the app theme changes. */
:root {
  color-scheme: light dark;
  --bg: #fff;
  --surface: #f1f6fb;
  --surface-2: #e4edf6;
  --border: #cbd7e5;
  --text: #1e293b;
  --muted: #475a70;
  --primary: #3e6694;
  --primary-hover: #335781;
  --primary-text: #3e6694;
  --primary-soft: #e8f0fa;
  --accent: #7c3aed;
  --ok: #047857;
  --warn: #9a5408;
  --pearl-base: #e7eff8;
  --pearl-glow: #c5d9ee;
  --pearl-panel: #f4f8fc;
  --pearl-tint: rgb(244 248 252 / .94);
  --pearl-edge: #b7cadd;
  --shadow-pop: 0 20px 60px rgb(36 67 104 / .18), 0 2px 8px rgb(36 67 104 / .08);
  --font-sans: -apple-system, "SF Pro Text", "SF Pro", system-ui, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-family: var(--font-sans);
  color: var(--text);
  font-synthesis: none;
  line-height: 1.6;
  background: radial-gradient(ellipse at 90% 0%, var(--pearl-glow), transparent 70%) no-repeat, var(--pearl-base);
  background-attachment: fixed;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #192536;
    --surface-2: #253449;
    --border: #3c4c62;
    --text: #e6eef8;
    --muted: #b1c0d2;
    --primary: #426b9b;
    --primary-hover: #4f7aad;
    --primary-text: #9ec7f1;
    --primary-soft: #243b58;
    --accent: #8b5cf6;
    --ok: #34d399;
    --warn: #f0b35a;
    --pearl-base: #152236;
    --pearl-glow: #263e58;
    --pearl-panel: #1c2b3d;
    --pearl-tint: rgb(28 43 61 / .96);
    --pearl-edge: #4b627e;
    --shadow-pop: 0 8px 24px rgb(0 0 0 / .55), 0 2px 6px rgb(0 0 0 / .3);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-text); text-underline-offset: 4px; }
a:focus-visible, summary:focus-visible, button:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; border-radius: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.03em; }
h1 { font-size: clamp(2.5rem, 5.4vw, 4.4rem); font-weight: 700; margin-bottom: 22px; }
h1 em, h2 em { font-style: normal; color: var(--primary-text); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); font-weight: 650; margin-bottom: 16px; }
h3 { font-size: 1.15rem; font-weight: 600; line-height: 1.3; margin-bottom: 8px; }
p { margin-bottom: 16px; }
code { font-family: var(--font-mono); font-size: .88em; overflow-wrap: anywhere; }
kbd { font-family: var(--font-sans); font-size: .82em; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--bg); }
.container { max-width: 1180px; margin-inline: auto; padding-inline: 32px; }
.skip { position: absolute; left: 20px; top: -100px; padding: 12px; background: var(--bg); z-index: 20; }
.skip:focus { top: 10px; }

/* Masthead */
.masthead-wrap { position: sticky; top: 0; z-index: 10; background: var(--pearl-tint); border-bottom: 1px solid transparent; }
@supports (backdrop-filter: blur(20px)) { .masthead-wrap { backdrop-filter: blur(20px) saturate(120%); -webkit-backdrop-filter: blur(20px) saturate(120%); } }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 1.2rem; font-weight: 750; text-decoration: none; color: var(--text); letter-spacing: -.035em; }
.brand em { font-style: normal; color: var(--primary-text); }
nav { display: flex; align-items: center; gap: 26px; font-size: .9rem; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--text); }
nav .button { padding: 7px 14px; font-size: .85rem; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; padding: 12px 20px; border-radius: 8px; font-weight: 600; font-size: .98rem; border: 1px solid transparent; }
nav a.primary, .primary { background: var(--primary); color: #fff; }
.primary:hover { background: var(--primary-hover); color: #fff; }
.secondary { border-color: var(--border); color: var(--text); background: var(--bg); }
.secondary:hover { border-color: var(--primary); }
.button[aria-disabled="true"] { cursor: default; opacity: .72; }
.badge { display: inline-block; font-size: .68rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; border-radius: 999px; padding: 2px 8px; background: rgb(255 255 255 / .22); }
.secondary .badge, .tag { background: var(--primary-soft); color: var(--primary-text); }

/* Hero */
.hero { padding-top: 72px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 650; color: var(--muted); margin-bottom: 18px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.hero h1 { max-width: 980px; margin-inline: auto; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 700px; margin-inline: auto; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin: 30px 0 14px; }
.fineprint { font-size: .82rem; color: var(--muted); }

/* macOS window frame around real screenshots */
.window { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--pearl-edge); background: var(--pearl-panel); box-shadow: var(--shadow-pop); }
.window { container-type: inline-size; }
.window::before { content: ""; position: absolute; top: calc(20 / 1440 * 100cqw); left: calc(14 / 1440 * 100cqw); width: calc(12 / 1440 * 100cqw); height: calc(12 / 1440 * 100cqw); border-radius: 50%; background: #ff5f57; box-shadow: calc(20 / 1440 * 100cqw) 0 #febc2e, calc(40 / 1440 * 100cqw) 0 #28c840; z-index: 1; }
.hero-shot { margin: 56px auto 0; max-width: 1180px; }

/* Engines strip */
.engines { padding-top: 64px; text-align: center; }
.engines p { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 650; color: var(--muted); }

/* Logo strip */
.logo-strip { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; list-style: none; padding: 0; margin: 0 auto; }
.logo-strip li { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: #fff; border: 1px solid var(--pearl-edge); box-shadow: 0 2px 8px rgb(36 67 104 / .08); }
.logo-strip img { width: 30px; height: 30px; }
.logo-strip li.more { width: auto; padding: 0 16px; background: var(--pearl-panel); font-size: .9rem; font-weight: 600; }
.logo-strip li.more a { text-decoration: none; }

/* Performance */
.speed { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: center; padding: 48px; border-radius: 18px; border: 1px solid var(--pearl-edge); background: linear-gradient(135deg, var(--pearl-panel), var(--primary-soft)); box-shadow: var(--shadow-pop); }
.speed-head p { color: var(--muted); }
.stack { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 20px 0 0; }
.stack li { font-family: var(--font-mono); font-size: .8rem; padding: 4px 10px; border-radius: 6px; background: var(--bg); border: 1px solid var(--border); }
.speed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.speed-grid div { padding: 20px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); }
.speed-grid h3 { font-size: 1rem; }
.speed-grid p { color: var(--muted); font-size: .9rem; margin: 0; }

/* Engine groups */
.eng-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.eng-group { padding: 24px; border-radius: 12px; border: 1px solid var(--pearl-edge); background: var(--pearl-panel); }
.eng-group h3 { margin-bottom: 2px; }
.eng-group > p { color: var(--muted); font-size: .88rem; margin-bottom: 16px; }
.eng-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.eng { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); font-size: .88rem; }
.mark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: #fff; flex: none; }
.mark img { width: 18px; height: 18px; }
.mark.mono { color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: -.02em; }
.beta { font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--warn); }

/* Sections */
.section { padding-top: 112px; }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.label { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 650; color: var(--primary-text); margin-bottom: 12px; display: block; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { background: var(--pearl-panel); border: 1px solid var(--pearl-edge); border-radius: 12px; padding: 24px; }
.card p { color: var(--muted); font-size: .94rem; margin-bottom: 0; }
.icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--primary-soft); color: var(--primary-text); margin-bottom: 16px; }
.icon svg { width: 20px; height: 20px; }

.feature { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; margin-bottom: 96px; }
.feature.flip { grid-template-columns: 7fr 5fr; }
.feature.flip .copy { order: 2; }
.feature .copy p { color: var(--muted); }
.feature ul { padding-left: 18px; color: var(--muted); margin: 0; }
.feature li { margin-bottom: 6px; }

.grid-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--pearl-edge); border-radius: 12px; overflow: hidden; background: var(--pearl-panel); }
.grid-list div { padding: 22px 24px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.grid-list div:nth-child(3n) { border-right: 0; }
.grid-list div:nth-last-child(-n+3) { border-bottom: 0; }
.grid-list h3 { font-size: 1rem; }
.grid-list p { color: var(--muted); font-size: .9rem; margin: 0; }

/* Agent section */
.steps { list-style: none; padding: 0; margin: 0 0 24px; counter-reset: step; }
.steps li { position: relative; padding-left: 44px; margin-bottom: 18px; color: var(--muted); }
.steps li strong { color: var(--text); display: block; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .82rem; font-weight: 700; background: var(--primary-soft); color: var(--primary-text); }
.note { border-left: 3px solid var(--warn); background: var(--pearl-panel); border-radius: 0 8px 8px 0; padding: 14px 18px; font-size: .9rem; color: var(--muted); }
.note strong { color: var(--text); }

.agent-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 48px; align-items: start; margin-bottom: 40px; }
.agent-shot { margin: 0; }
.caption { font-size: .85rem; color: var(--muted); margin-top: 14px; text-align: center; }


/* Guides */
.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.guide { display: block; text-decoration: none; color: inherit; background: var(--pearl-panel); border: 1px solid var(--pearl-edge); border-radius: 12px; padding: 26px; }
.guide:hover { border-color: var(--primary); }
.guide h3 { margin-top: 10px; }
.guide p { color: var(--muted); font-size: .94rem; margin: 0; }

/* Download + FAQ */
.download { text-align: center; padding: 64px 32px; margin-top: 112px; background: var(--pearl-panel); border: 1px solid var(--pearl-edge); border-radius: 16px; box-shadow: var(--shadow-pop); }
.download img { margin: 0 auto 20px; }
.download p { color: var(--muted); max-width: 620px; margin-inline: auto; }
.faq { max-width: 820px; margin-inline: auto; }
details { border-bottom: 1px solid var(--border); padding: 18px 0; }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 1.3rem; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { color: var(--muted); margin: 12px 0 0; }

/* Footer */
.footer { margin-top: 112px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 28px; font-size: .85rem; color: var(--muted); }
.footer p { margin: 0; }
.footer nav { font-size: .85rem; }

/* Guide pages */
.prose { max-width: 860px; padding-top: 48px; padding-bottom: 40px; }
.prose h1 { font-size: clamp(2rem, 4vw, 3rem); }
.prose h2 { font-size: 1.6rem; margin-top: 45px; }
.prose h3 { margin-top: 30px; }
.prose li { margin-bottom: 12px; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; width: 100%; font-size: .9rem; }
.prose td, .prose th { min-width: 140px; vertical-align: top; text-align: left; border-bottom: 1px solid var(--border); padding: 9px 6px; }
.prose a { overflow-wrap: anywhere; }
pre { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 18px; overflow-x: auto; line-height: 1.7; font-size: .82rem; white-space: pre; }
pre code { font-size: inherit; overflow-wrap: normal; }

.card, .guide, .grid-list { transition: border-color .15s; }
@supports (backdrop-filter: blur(20px)) {
  .card, .guide, .download { background: var(--pearl-tint); backdrop-filter: blur(20px) saturate(120%); -webkit-backdrop-filter: blur(20px) saturate(120%); }
}
@media (prefers-reduced-transparency: reduce) {
  .card, .guide, .download, .masthead-wrap { background: var(--pearl-panel); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (max-width: 980px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 28px; margin-bottom: 72px; }
  .feature.flip .copy { order: 0; }
  .agent-grid { grid-template-columns: 1fr; gap: 8px; }
  .speed { grid-template-columns: 1fr; padding: 32px; gap: 28px; }
  .eng-groups { grid-template-columns: 1fr; }
  .grid-list { grid-template-columns: 1fr 1fr; }
  .grid-list div:nth-child(n) { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .grid-list div:nth-child(2n) { border-right: 0; }
  .grid-list div:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 680px) {
  .container { padding-inline: 20px; }
  nav .hide-sm { display: none; }
  .hero { padding-top: 44px; }
  .lead { font-size: 1.08rem; }
  .actions .button { width: 100%; }
  .hero-shot { margin-top: 40px; }
  .window { border-radius: 8px; }
  .section { padding-top: 80px; }
  .cards, .grid-list, .guide-grid, .speed-grid { grid-template-columns: 1fr; }
  .speed { padding: 24px 20px; }
  .logo-strip li { width: 48px; height: 48px; }
  .logo-strip img { width: 26px; height: 26px; }
  .grid-list div:nth-child(n) { border-right: 0; border-bottom: 1px solid var(--border); }
  .grid-list div:last-child { border-bottom: 0; }
      .download { padding: 44px 20px; margin-top: 80px; }
  .footer { flex-direction: column; align-items: flex-start; margin-top: 80px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
