/* intentfilter.app: the one style sheet for every page.
   Tokens, font, shape and wording follow the extension's design language
   (AI intent filter/docs/design/design-language.md, values from src/pages/theme.css).
   Light and dark follow the system (prefers-color-scheme); there is no switch. */

@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #f7f7fa; --surface: #ffffff; --sunken: #f1f1f5;
  --text: #16161d; --muted: #5c5c6b; --faint: #6b6b79;
  --border: #e3e3ea; --border-strong: #cfcfd9;
  --accent: #4f46e5; --accent-hover: #4338ca; --accent-text: #ffffff; --accent-soft: #eeedfd; --accent-ink: #3f36c9;
  --off: #16794a; --off-soft: #e6f4ec;
  --font: "Geist", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101014; --surface: #18181e; --sunken: #1f1f27; --text: #ededf3; --muted: #a3a3b2; --faint: #8b8b9a;
    --border: #2b2b35; --border-strong: #3a3a47;
    --accent: #8b85ff; --accent-hover: #a29dff; --accent-text: #111118; --accent-soft: #25234a; --accent-ink: #b4b0ff;
    --off: #6fd79a; --off-soft: #16301f;
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 400 15px/1.55 var(--font); -webkit-font-smoothing: antialiased;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
button, input, textarea { font: inherit; color: inherit; }
a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 50; padding: 8px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border-strong); color: var(--text); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }
.hint { font-size: 13px; color: var(--muted); }

/* ---------- Top bar and footer ---------- */
.top { height: 60px; border-bottom: 1px solid var(--border); background: var(--surface); }
.top-in, .foot-in { max-width: 1120px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 16px; }
.top-in { height: 100%; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; font-size: 16px; text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.top nav { display: flex; gap: 4px; }
.top nav a { padding: 7px 10px; border-radius: 10px; color: var(--muted); font-size: 14px; font-weight: 560; text-decoration: none; transition: background-color .15s ease, color .15s ease; }
.top nav a:hover, .top nav a[aria-current="page"] { background: var(--sunken); color: var(--text); }

.foot { margin-top: auto; border-top: 1px solid var(--border); }
.foot-in { flex-wrap: wrap; justify-content: space-between; padding-top: 20px; padding-bottom: 28px; font-size: 13px; color: var(--muted); }
.foot ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--text); }

/* ---------- Buttons and fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 10px; border: 1px solid transparent;
  font-size: 15px; font-weight: 580; white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover:not(:disabled) { border-color: var(--faint); }

.input {
  width: 100%; min-width: 0; padding: 9px 12px; min-height: 76px; resize: vertical; line-height: 1.45;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 10px; transition: border-color .15s ease;
}
.input::placeholder { color: var(--faint); }
.input:focus-visible { outline-offset: 0; border-color: var(--accent); }

/* ---------- Home ---------- */
.hero { max-width: 680px; margin: 0 auto; padding: 72px 20px 56px; text-align: center; }
.hero .mark { width: 96px; height: 96px; display: block; margin: 0 auto; }
.hero h1 { margin-top: 20px; font-size: 40px; line-height: 1.15; font-weight: 650; letter-spacing: -0.01em; }
.hero .lead { margin-top: 14px; font-size: 18px; line-height: 1.5; }
.hero .sub { margin-top: 10px; color: var(--muted); }
.stores { margin-top: 28px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.store {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px;
  border-radius: 10px; border: 1px dashed var(--border-strong); background: var(--surface);
  font-weight: 580; color: var(--text);
}
.store small { font-size: 13px; font-weight: 500; color: var(--muted); }

.plans { max-width: 680px; margin: 0 auto 72px; padding: 0 20px; }
.plans h2 { font-size: 17px; font-weight: 630; text-align: center; }
.plan-list { margin-top: 10px; }
.plan { padding: 14px 2px; }
.plan + .plan { border-top: 1px solid var(--border); }
.plan b { font-weight: 630; }
.plans .hint { margin-top: 12px; text-align: center; }

/* Screenshots under the hero (rendered from the extension's design mocks) */
.shots { max-width: 1040px; margin: 0 auto 64px; padding: 0 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.shots figure { margin: 0; }
.shots img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.shots figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); text-align: center; }
@media (max-width: 720px) { .shots { grid-template-columns: 1fr; } }

/* ---------- Text pages (privacy, terms, help, key) ---------- */
.doc { width: 100%; max-width: 720px; margin: 0 auto; padding: 48px 20px 72px; }
.doc h1 { font-size: 28px; font-weight: 650; line-height: 1.2; }
.doc .updated { margin-top: 6px; font-size: 13px; color: var(--muted); }
.doc .intro { margin-top: 18px; font-size: 16px; }
.doc h2 { margin-top: 36px; font-size: 17px; font-weight: 630; scroll-margin-top: 16px; }
.doc h3 { margin-top: 20px; font-size: 15px; font-weight: 630; }
.doc p, .doc ul, .doc ol, .doc dl { margin-top: 10px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li + li { margin-top: 6px; }
.doc .toc { margin-top: 22px; padding: 14px 18px 14px 38px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.note { margin-top: 18px; padding: 12px 16px; border-radius: 10px; background: var(--accent-soft); color: var(--text); }
.steps { counter-reset: s; list-style: none; padding-left: 0 !important; }
.steps > li { counter-increment: s; position: relative; padding-left: 38px; }
.steps > li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 6px;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink);
  font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums;
}
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .92em; padding: 1px 5px; border-radius: 6px; background: var(--sunken); }

/* ---------- Small centred pages (sign-in, uninstalled, 404) ---------- */
.card-page { flex: 1; display: grid; place-items: center; padding: 48px 20px; }
.card { width: 100%; max-width: 460px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 28px; }
.card h1 { font-size: 22px; font-weight: 650; line-height: 1.25; }
.card p { margin-top: 10px; }
.card .btn { margin-top: 20px; width: 100%; }
.choices { margin: 18px 0 0; padding: 0; border: 0; display: grid; gap: 8px; }
.choices legend { padding: 0; margin-bottom: 8px; font-weight: 630; }
.choice { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.choice:hover { border-color: var(--faint); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { margin: 0; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.field-label { display: block; margin-top: 16px; margin-bottom: 6px; font-weight: 560; }
.status { margin-top: 14px; }

/* ---------- Narrow screens ---------- */
@media (max-width: 400px) {
  .top-in { gap: 8px; padding: 0 12px; }
  .top nav { gap: 0; }
  .top nav a { padding: 7px 7px; }
  .brand { gap: 8px; font-size: 15px; }
}
@media (max-width: 560px) {
  .hero { padding-top: 48px; }
  .hero h1 { font-size: 32px; }
  .hero .lead { font-size: 17px; }
  .stores { flex-direction: column; align-items: stretch; }
  .store { justify-content: center; }
  .card { padding: 22px; }
}

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

/* ---------- Pricing (W2) ---------- */
.price-grid { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: stretch; }
.price-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.price-card.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.doc .price-card h3 { margin-top: 0; }
.price { margin-top: 8px; font-size: 28px; font-weight: 650; line-height: 1.1; font-variant-numeric: tabular-nums; }
.price span { font-size: 14px; font-weight: 500; color: var(--muted); }
.doc .price-alt { margin-top: 4px; font-size: 14px; color: var(--muted); }
.doc .price-card ul { margin-top: 14px; padding-left: 18px; font-size: 14px; }
.doc .price-grid + .hint { margin-top: 12px; }
@media (max-width: 720px) { .price-grid { grid-template-columns: 1fr; } }
