/* SQL Everything landing page. Same tokens and components as the extension panel (panel.css):
   near-white canvas, hairline borders, ink-black primary action, one calm blue accent. */
:root {
  --bg: #f7f7f8; --surface: #ffffff; --hover: #f3f4f6;
  --line: #e7e8eb; --line-strong: #d6d8dd;
  --fg: #0f1115; --muted: #6e7380;
  --ink: #0f1115; --ink-fg: #ffffff; --ink-hover: #2a2d34;
  --accent: #2f54eb; --accent-soft: #eef2ff;
  --kw: #4b4fd8; --str: #0f7b5f; --num: #b45309; --cmt: #9aa0ab; --fn: #0e7490;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0a0b0d; --surface: #111316; --hover: #1a1d21;
    --line: #1f2328; --line-strong: #2d3238;
    --fg: #eceef1; --muted: #8b919b;
    --ink: #eceef1; --ink-fg: #0a0b0d; --ink-hover: #ffffff;
    --accent: #7b93ff; --accent-soft: #181f3d;
    --kw: #a5a8ff; --str: #5fd3a8; --num: #f2b26b; --cmt: #6b717c; --fn: #6cc6dc;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0b0d; --surface: #111316; --hover: #1a1d21;
  --line: #1f2328; --line-strong: #2d3238;
  --fg: #eceef1; --muted: #8b919b;
  --ink: #eceef1; --ink-fg: #0a0b0d; --ink-hover: #ffffff;
  --accent: #7b93ff; --accent-soft: #181f3d;
  --kw: #a5a8ff; --str: #5fd3a8; --num: #f2b26b; --cmt: #6b717c; --fn: #6cc6dc;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); -webkit-font-smoothing: antialiased;
       font: 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; font-feature-settings: "tnum", "cv11"; }
a { color: inherit; }
button { font: inherit; color: inherit; }
section[id] { scroll-margin-top: 72px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- app bar ---------- */
.appbar { position: sticky; top: 0; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.appbar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 14px; letter-spacing: -0.01em; text-decoration: none; }
.brand b { font-weight: 600; }
.local { padding: 1px 9px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); font-size: 11px; font-style: italic; line-height: 1.5; white-space: nowrap; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.brand-title { display: flex; align-items: center; gap: 8px; }
.brand-sub { color: var(--muted); font-size: 12px; }
.logo { position: relative; flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--ink); }
.logo::after { content: ""; position: absolute; inset: 0; background: var(--ink-fg);
               -webkit-mask: url("../images/chrome_ext_gsheets_sql_logo.215909a3ff2e.png") center / 76% no-repeat; mask: url("../images/chrome_ext_gsheets_sql_logo.215909a3ff2e.png") center / 76% no-repeat; }
.bar-right { display: flex; align-items: center; gap: 8px; }
.nav { display: none; gap: 20px; margin-right: 8px; font-size: 13px; color: var(--muted); }
.nav a { text-decoration: none; }
.nav a:hover { color: var(--fg); }
@media (min-width: 760px) { .nav { display: flex; } }
.pill { padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; white-space: nowrap; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 8px;
       border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; white-space: nowrap; font-size: 13px; font-weight: 500;
       text-decoration: none; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--ink-fg); }
.btn.primary:hover { background: var(--ink-hover); border-color: var(--ink-hover); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--muted); }
.btn.quiet:hover { background: var(--hover); color: var(--fg); }
.btn.large { height: 40px; padding: 0 18px; font-size: 14px; border-radius: 10px; }
.btn.icon { width: 26px; height: 26px; padding: 0; }
.btn[aria-disabled="true"] { opacity: .55; cursor: default; pointer-events: none; }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ico-sun { display: none; }
:root[data-theme="dark"] .ico-sun { display: block; }
:root[data-theme="dark"] .ico-moon { display: none; }
kbd { padding: 0 5px; border-radius: 4px; background: color-mix(in srgb, currentColor 16%, transparent); font: 11px var(--mono); }

/* ---------- hero ---------- */
.hero { padding: 56px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; }
.hero-text { max-width: 40em; }
.hero-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
@media (min-width: 900px) { .hero-top { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 48px; } }

/* ASCII animation (query typed, bar chart grown) */
.ascii { padding: 16px 18px; justify-self: start; }
.ascii[hidden] { display: none; }
.ascii pre { margin: 0; font: 12.5px/1.7 var(--mono); white-space: pre; overflow-x: auto; }
.ascii .nm { color: var(--muted); }
.ascii .bar, .ascii .cur { color: var(--accent); }
.ascii .track { color: var(--line-strong); }
@media (max-width: 400px) { .ascii { padding: 14px; } .ascii pre { font-size: 11.5px; } }
.eyebrow { margin: 0 0 14px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(30px, 5vw, 44px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 650; }
h1 em { font-style: normal; color: var(--accent); }
/* Rotating phrase in the headline: items stack in one clipped line and roll up. */
.rotator { display: block; position: relative; height: 1.25em; overflow: hidden; }
.rot-item { position: absolute; left: 0; top: 0; white-space: nowrap; line-height: 1.25;
            box-shadow: inset 0 -0.09em 0 var(--accent);
            transform: translateY(105%); opacity: 0; transition: transform .55s cubic-bezier(.2, .8, .2, 1), opacity .4s; }
.rot-item.is-active { transform: translateY(0); opacity: 1; }
.rot-item.is-out { transform: translateY(-105%); opacity: 0; }
@media (max-width: 420px) { .rotator { font-size: .88em; } }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.lead { margin: 18px 0 0; max-width: 34em; color: var(--muted); font-size: 17px; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.fine { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.local-note { display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 0; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px;
              background: var(--surface); color: var(--str); font-size: 14px; }
.local-note span { color: var(--fg); }
.local-note b { font-weight: 600; }

/* ---------- sections ---------- */
.section { padding: 48px 0; border-top: 1px solid var(--line); }
.section h2 { margin: 0 0 8px; font-size: 24px; line-height: 1.25; letter-spacing: -0.02em; font-weight: 650; }
.section .intro { margin: 0 0 28px; max-width: 40em; color: var(--muted); }
.label { display: block; margin: 0 0 10px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 10px 4px 14px; border-bottom: 1px solid var(--line); }
.card-title, .lang { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.lang { font-family: var(--mono); letter-spacing: .06em; }
.crumb { flex: 1; min-width: 0; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-body { padding: 14px 16px 16px; }
.card-body p { margin: 0; }

/* ---------- hero window: Google Sheet on the left, extension panel on the right ---------- */
.window { margin: 0; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); overflow: hidden;
          box-shadow: 0 1px 2px rgba(15, 17, 21, .04), 0 12px 32px -12px rgba(15, 17, 21, .18); }
.win-bar { display: flex; align-items: center; gap: 12px; padding: 8px 14px; background: var(--hover); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.dots { display: flex; gap: 6px; flex: none; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.win-tab { flex: none; max-width: 55%; padding: 3px 12px; border-radius: 7px; background: var(--surface); color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-url { flex: 1; min-width: 0; padding: 3px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: none; }
@media (min-width: 640px) { .win-url { display: block; } }
.win-body { display: grid; grid-template-columns: minmax(0, 1fr); font-size: 13px; line-height: 1.5; }
@media (min-width: 900px) { .win-body { grid-template-columns: minmax(0, 1fr) 400px; } }
.panel { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 10px; background: var(--bg); border-top: 1px solid var(--line); }
@media (min-width: 900px) { .panel { border-top: 0; border-left: 1px solid var(--line); } }
.panel .btn { cursor: default; }
.panel .btn:hover { background: var(--surface); }
.panel .btn.primary:hover { background: var(--ink); }
.panel .btn.quiet:hover { background: transparent; }
.row-btns { display: flex; gap: 8px; margin-bottom: 8px; }
.panel .tree { padding-top: 6px; border-top: 1px solid var(--line); }

.sheet { display: flex; flex-direction: column; min-width: 0; background: var(--surface); }
.sheet-title { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.sheet-ico { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line-strong); color: var(--str); }
.grid-wrap { flex: 1; overflow-x: auto; }
.sheet-grid { border-collapse: collapse; width: 100%; min-width: 360px; font-size: 12.5px; }
.sheet-grid th, .sheet-grid td { padding: 5px 12px; border: 1px solid var(--line); text-align: left; white-space: nowrap; }
.sheet-grid th { background: var(--hover); color: var(--muted); font-weight: 500; font-size: 11px; text-align: center; }
.sheet-grid th.num { text-align: center; }
.sheet-grid td.rn, .sheet-grid th.rn { width: 36px; padding: 5px 0; background: var(--hover); color: var(--muted); font-size: 11px; text-align: center; }
.sheet-grid td.num { text-align: right; font-variant-numeric: tabular-nums; }
.sheet-grid tr.hdr td:not(.rn) { font-weight: 600; background: var(--accent-soft); }
.sheet-grid tr.fill td { height: 30px; }
@media (max-width: 899px) { .sheet-grid tr.fill:nth-child(n+11) { display: none; } }
.sheet-tabs { display: flex; gap: 2px; padding: 6px 10px 0; border-top: 1px solid var(--line); background: var(--hover); }
.sheet-tab { padding: 6px 14px; border-radius: 0 0 8px 8px; color: var(--muted); font-size: 12px; }
.sheet-tab.active { background: var(--surface); color: var(--accent); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.preview-note { margin: 0; padding: 8px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

/* ---------- demo video ---------- */
.demo video { display: block; width: 100%; height: auto; aspect-ratio: 1664 / 1082; background: var(--hover); }

/* ---------- panel preview (static copy of the extension look) ---------- */
.tree-row { display: flex; align-items: center; gap: 6px; min-height: 26px; padding: 2px 6px; border-radius: 8px; }
.tree-row .chev { display: grid; place-items: center; width: 16px; height: 16px; flex: none; color: var(--muted); }
.tree-row .chev.open { transform: rotate(90deg); }
.tree-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-row .meta { flex: none; color: var(--muted); font-size: 11px; }
.tree-row.schema .name { font-weight: 600; }
.tree-children { margin-left: 14px; padding-left: 6px; border-left: 1px solid var(--line); }
.tree-row.column { min-height: 22px; font-size: 12px; }
.tree-row.column .name { font-family: var(--mono); font-size: 11.5px; }
.badge { flex: none; min-width: 26px; font: 500 10px/16px var(--mono); color: var(--muted); }
.editor { display: flex; background: var(--surface); }
.gutter, .code { margin: 0; font: 12.5px/20px var(--mono); white-space: pre; }
.gutter { flex: none; min-width: 36px; padding: 10px 10px 10px 8px; text-align: right; color: var(--cmt); user-select: none; }
.code { flex: 1; min-width: 0; padding: 10px 14px 10px 4px; overflow-x: auto; }
.tk-kw { color: var(--kw); font-weight: 600; } .tk-str { color: var(--str); } .tk-num { color: var(--num); }
.tk-cmt { color: var(--cmt); font-style: italic; } .tk-fn { color: var(--fn); }
.table-wrap { overflow-x: auto; }
.result { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12.5px; }
.result th, .result td { padding: 7px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.result th { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; border-bottom-color: var(--line-strong); }
.result th .badge { min-width: 0; margin-right: 6px; text-transform: none; letter-spacing: 0; }
.result tbody tr:last-child td { border-bottom: 0; }
.result td.num, .result th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- steps and feature grids ---------- */
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 640px) { .grid.two { grid-template-columns: repeat(2, 1fr); } .grid.three { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px) and (max-width: 899px) { .grid.three { grid-template-columns: repeat(2, 1fr); } }
.step-no { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-bottom: 10px; border-radius: 7px; background: var(--ink); color: var(--ink-fg); font: 600 12px var(--mono); }
.item h3 { margin: 0 0 4px; font-size: 15px; letter-spacing: -0.01em; font-weight: 600; }
.item p { color: var(--muted); font-size: 14px; }
.item code, .prose code { padding: 1px 5px; border-radius: 5px; background: var(--hover); font: 12.5px var(--mono); color: var(--fg); }
.ico { display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }

/* ---------- privacy and limits ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 820px) { .split { grid-template-columns: 1fr 1fr; } }
.list { margin: 0; padding: 0; list-style: none; }
.list li { position: relative; padding: 7px 0 7px 22px; border-bottom: 1px solid var(--line); font-size: 14px; }
.list li:last-child { border-bottom: 0; }
.list li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.list.plain li::before { background: var(--line-strong); }
.list b { font-weight: 600; }
.list span { color: var(--muted); }
.list a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.list a:hover { text-decoration-color: var(--fg); }
.perm { font: 12.5px var(--mono); }

/* ---------- privacy page ---------- */
.prose-page { padding: 48px 0 64px; }
.prose-page .wrap { max-width: 720px; }
.prose-page h1 { font-size: clamp(28px, 4vw, 36px); }
.prose-page .updated { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.prose { margin-top: 28px; }
.prose h2 { margin: 28px 0 6px; font-size: 17px; letter-spacing: -0.01em; font-weight: 600; }
.prose p, .prose ul { margin: 0 0 10px; color: var(--muted); font-size: 15px; }
.prose ul { padding-left: 20px; }
.prose li { margin: 4px 0; }
.prose a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--fg); }
.prose .summary { margin: 0 0 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--fg); font-size: 16px; }

/* ---------- footer ---------- */
.footer { padding: 28px 0 44px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.footer a { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.footer a:hover { color: var(--fg); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
