/*
 * Shared styling for the static, crawlable pages (guide, tools, how-it-works,
 * faq, privacy, terms, refunds, pricing, settings). Extracted from
 * platforms.html so every page looks like the same product without each one
 * carrying its own copy of the CSS.
 *
 * These pages exist because the app itself is a single-page app: the AdSense and
 * search crawlers do not run JavaScript, so every SPA route looks like an empty
 * shell to them. Real HTML with real content is the only thing they can read.
 */
:root {
  --bg: #0a0e14; --panel: #121824; --panel2: #0f1520; --line: rgba(255,255,255,.08);
  --text: #e8edf4; --muted: #93a0b4; --brand: #ff6b35; --brand2: #ff9142;
  --radius: 14px; --radius-sm: 9px; --radius-lg: 20px;
  --shadow: 0 8px 28px rgba(0,0,0,.28);
  --ease: cubic-bezier(.16,1,.3,1);
}
* { box-sizing: border-box; margin: 0; padding: 0 }
html { scroll-behavior: smooth }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand2); text-decoration: none; transition: color .15s ease }
a:hover { text-decoration: underline }
::selection { background: color-mix(in srgb, var(--brand) 30%, transparent); }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 24px }
.wrap.wide { max-width: 1080px }

header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0; flex-wrap: wrap; gap: 12px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; color: var(--text) }
.logo:hover { text-decoration: none }
.logo img { width: 30px; height: 30px; border-radius: 7px }
nav.site { display: flex; gap: 4px; flex-wrap: wrap; font-size: 14px; align-items: center }
nav.site a {
  color: var(--muted); font-weight: 600; padding: 7px 12px; border-radius: 999px;
  transition: color .15s ease, background .15s ease;
}
nav.site a:hover { color: var(--brand2); text-decoration: none; background: color-mix(in srgb, var(--brand) 8%, transparent) }
nav.site a[aria-current="page"] { color: var(--text); background: color-mix(in srgb, var(--brand) 12%, transparent) }

.hero { padding: 52px 0 28px }
.hero .pill {
  display: inline-block; font-size: 12.5px; font-weight: 600; color: var(--brand2);
  background: rgba(255,107,53,.1); border: 1px solid rgba(255,107,53,.28);
  border-radius: 999px; padding: 6px 14px; margin-bottom: 22px;
}
h1 { font-size: clamp(30px,5vw,46px); line-height: 1.1; letter-spacing: -.03em; font-weight: 800; margin-bottom: 16px }
.lead { font-size: clamp(16px,2.2vw,19px); color: var(--muted); max-width: 680px }

main section { padding: 28px 0 }
h2 { font-size: clamp(22px,3.2vw,30px); font-weight: 800; letter-spacing: -.02em; margin: 34px 0 14px }
h3 { font-size: 18px; font-weight: 700; margin: 24px 0 8px }
p { margin: 0 0 14px; color: #cfd8e6 }
ul, ol { margin: 0 0 16px 22px; color: #cfd8e6 }
li { margin-bottom: 8px }
strong { color: var(--text) }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em;
  background: rgba(255,255,255,.06); border: 1px solid var(--line);
  border-radius: 5px; padding: 1px 6px;
}
pre {
  background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; overflow-x: auto; margin: 0 0 16px;
}
pre code { background: none; border: 0; padding: 0 }

.card {
  background: linear-gradient(180deg, var(--panel), var(--panel2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 16px;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.card:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); box-shadow: var(--shadow); transform: translateY(-2px) }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 18px }
.grid .card { margin-bottom: 0 }
.card h3 { margin-top: 0 }

table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 14.5px; display: block; overflow-x: auto; border-radius: var(--radius-sm); }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top }
th { color: var(--text); font-weight: 700; white-space: nowrap; background: color-mix(in srgb, var(--panel) 60%, transparent) }
td { color: #cfd8e6 }
td code { white-space: nowrap }
tr:hover td { background: color-mix(in srgb, var(--brand) 4%, transparent) }

.cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; font-weight: 700;
  padding: 12px 24px; border-radius: var(--radius-sm); margin: 6px 8px 6px 0;
  box-shadow: 0 4px 16px rgba(255,107,53,.25);
  transition: transform .15s var(--ease), box-shadow .15s ease, filter .15s ease;
}
.cta:hover { text-decoration: none; filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 6px 22px rgba(255,107,53,.35) }
.cta:active { transform: translateY(0) }
.cta.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); box-shadow: none }
.cta.ghost:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, transparent) }

.note { font-size: 14px; color: var(--muted) }
.updated { font-size: 13.5px; color: var(--muted); margin-bottom: 24px }

footer {
  border-top: 1px solid var(--line); margin-top: 56px; padding: 28px 0 44px;
  font-size: 14px; color: var(--muted);
}
footer nav { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px }
footer nav a { color: var(--muted); padding: 5px 10px; border-radius: 999px; transition: color .15s ease, background .15s ease }
footer nav a:hover { color: var(--brand2); text-decoration: none; background: color-mix(in srgb, var(--brand) 8%, transparent) }

/* Keyboard-navigation baseline — every link/button/control on these static
   pages gets a visible ring instead of the browser default or nothing. */
a:focus-visible, button:focus-visible, .theme-toggle-btn:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px;
}

/* ─── Light theme overrides ───────────────────────────────────────────────── */
[data-theme="light"] {
  --bg: #f5f6f8; --panel: #ffffff; --panel2: #edf0f4; --line: rgba(0,0,0,.1);
  --text: #111827; --muted: #5a6575; --brand: #e85d25; --brand2: #c44d1a;
  --shadow: 0 8px 28px rgba(17,24,39,.08);
}
[data-theme="light"] body { background: var(--bg); color: var(--text) }
[data-theme="light"] p,
[data-theme="light"] ul,
[data-theme="light"] ol,
[data-theme="light"] td { color: #374151 }
[data-theme="light"] code { background: rgba(0,0,0,.05); border-color: rgba(0,0,0,.12) }
[data-theme="light"] pre { background: var(--panel2); border-color: rgba(0,0,0,.1) }
[data-theme="light"] .card { background: linear-gradient(180deg, var(--panel), var(--panel2)); border-color: var(--line) }
[data-theme="light"] th { color: var(--text) }
[data-theme="light"] .cta { box-shadow: 0 4px 16px rgba(232,93,37,.18) }

/* ─── Theme toggle button (injected by site-theme.js into every page nav) ─── */
.theme-toggle-btn {
  background: none; border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1;
  padding: 6px 10px; transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.theme-toggle-btn:hover { border-color: var(--brand); color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, transparent) }

@media (max-width: 640px) {
  .wrap, .wrap.wide { padding: 0 18px }
  nav.site { gap: 2px; font-size: 13.5px }
  .card { padding: 18px }
}
