/* Consent Receipts: shared design tokens and components for the landing, auth, account, and legal pages.
   Look: warm light gray shell, white rounded cards with hairline borders, black primary buttons, one accent. */
:root {
  --ink: #0e0f11;
  --ink-2: #2b2e33;
  --muted: #5b5f66;
  --faint: #8a8e95;
  --shell: #f4f3f1;
  --shell-2: #ecebe8;
  --card: #ffffff;
  --line: #e4e2de;
  --line-strong: #cfccc6;
  --accent: #0f7b5f;
  --accent-soft: #e3f2ec;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --warn: #b54708;
  --warn-soft: #fef4e6;
  --ok: #067647;
  --ok-soft: #e6f4ec;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-1: 0 1px 2px rgba(14, 15, 17, 0.06);
  --shadow-window: 0 24px 60px rgba(14, 15, 17, 0.12), 0 2px 6px rgba(14, 15, 17, 0.06);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --page-max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.55 var(--font);
  color: var(--ink);
  background: var(--shell);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }

.container { max-width: var(--page-max); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--shell); position: sticky; top: 0; z-index: 10; }
.site-header .container { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; text-decoration: none; letter-spacing: -0.01em; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--ink); color: #fff; display: grid; place-items: center; }
.brand-mark svg { width: 18px; height: 18px; }
.nav { display: flex; gap: 28px; margin: 0 auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.header-actions .link { text-decoration: none; font-size: 15px; }
.back-link { margin-left: auto; color: var(--muted); text-decoration: none; font-size: 15px; display: inline-flex; gap: 6px; align-items: center; }
.back-link:hover { color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: var(--radius-sm);
  font: 500 15px/1 var(--font); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-2); }
.btn-secondary { background: var(--card); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--shell-2); color: var(--faint); border-color: transparent; cursor: not-allowed; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); }
.card-pad { padding: 32px; }

/* Auth pages */
.auth-main { padding: 64px 24px 96px; }
.auth-card { max-width: 460px; margin: 0 auto; padding: 40px; }
.auth-card h1 { font-size: 28px; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 6px; font-weight: 600; }
.auth-card .lede { color: var(--muted); margin: 0 0 28px; }
.auth-foot { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); }
.auth-foot a { color: var(--ink); font-weight: 500; }

/* Forms */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 500; font-size: 15px; margin-bottom: 6px; }
.field .req { color: var(--muted); }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > svg { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--faint); pointer-events: none; }
.input {
  width: 100%; height: 48px; padding: 0 14px 0 42px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font: 15px var(--font); color: var(--ink); background: #fff;
}
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(14, 15, 17, 0.08); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.toggle-pass {
  position: absolute; right: 8px; height: 34px; padding: 0 10px; border: 0; border-radius: 6px;
  background: transparent; color: var(--ink); font: 500 14px var(--font); cursor: pointer; display: inline-flex; gap: 6px; align-items: center;
}
.toggle-pass svg { width: 16px; height: 16px; }
.input-wrap.has-toggle .input { padding-right: 88px; }
.hint { color: var(--muted); font-size: 14px; margin-top: 6px; }
.field-error { color: var(--danger); font-size: 14px; margin-top: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 22px; color: var(--ink-2); }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--ink); }
.alert { border-radius: var(--radius-sm); padding: 12px 14px; font-size: 15px; margin-bottom: 18px; }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-info { background: var(--shell); color: var(--ink-2); border: 1px solid var(--line); }
[hidden] { display: none !important; }

/* Account page */
.page-main { padding: 48px 24px 96px; }
.page-head { max-width: 760px; margin: 0 auto 24px; }
.page-head h1 { font-size: 32px; letter-spacing: -0.02em; margin: 0; font-weight: 600; }
.page-head p { color: var(--muted); margin: 4px 0 0; }
.stack { max-width: 760px; margin: 0 auto; display: grid; gap: 20px; }
.panel { padding: 28px; }
.panel h2 { font-size: 18px; margin: 0 0 4px; font-weight: 600; }
.panel .sub { color: var(--muted); margin: 0 0 18px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.badge { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.badge-pro { background: var(--accent-soft); color: var(--accent); }
.badge-free { background: var(--shell-2); color: var(--ink-2); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.price { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; }
.price small { font-size: 15px; color: var(--muted); font-weight: 400; }
.ticks { list-style: none; padding: 0; margin: 12px 0 20px; display: grid; gap: 8px; }
.ticks li { padding-left: 26px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 8px; width: 10px; height: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

/* Landing page building blocks (used by index.html) */
.eyebrow { color: var(--muted); font-size: 15px; margin: 0 0 12px; }
.hero { text-align: center; padding: 72px 0 40px; }
.hero h1 { font-size: clamp(40px, 7vw, 72px); line-height: 1.04; letter-spacing: -0.035em; margin: 0 auto 20px; max-width: 900px; font-weight: 600; }
.hero .lede { font-size: 20px; color: var(--muted); max-width: 640px; margin: 0 auto 32px; }
.hero .row { justify-content: center; }
.showcase { background: var(--shell-2); border-radius: var(--radius-xl); padding: 40px; margin: 32px 0 0; }
.window { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-window); overflow: hidden; }
.section { padding: 88px 0; }
.section h2 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.025em; line-height: 1.1; margin: 0 0 14px; font-weight: 600; }
.section .lede { color: var(--muted); font-size: 18px; max-width: 680px; margin: 0 0 40px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.step-num { font-size: 14px; font-weight: 600; color: var(--accent); margin-bottom: 10px; display: block; }
.feature h3, .step h3 { font-size: 19px; margin: 0 0 8px; font-weight: 600; }
.feature p, .step p { color: var(--muted); margin: 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 500; font-size: 17px; }
.faq details p { color: var(--muted); margin: 10px 0 0; }
.cta { text-align: center; padding: 88px 24px; }

/* Legal pages */
.legal { max-width: 760px; margin: 0 auto; padding: 48px 24px 96px; }
.legal h1 { font-size: 36px; letter-spacing: -0.02em; margin: 0 0 6px; }
.legal h2 { font-size: 20px; margin: 32px 0 8px; }
.legal p, .legal li { color: var(--ink-2); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 40px; color: var(--muted); font-size: 14px; }
.site-footer .container { display: grid; gap: 12px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }

@media (max-width: 860px) {
  .nav { display: none; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .showcase { padding: 16px; border-radius: var(--radius-lg); }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 10px; }
}
@media (max-width: 520px) {
  .container { padding: 0 16px; }
  .auth-main { padding: 32px 16px 64px; }
  .auth-card { padding: 28px 20px; }
  .card-pad, .panel { padding: 22px; }
  .header-actions .link { display: none; }
}

/* Small utilities (inline style attributes are blocked by the CSP) */
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.row-center { justify-content: center; }
.window-popup { max-width: 400px; margin: 0 auto; }
.cta .row { justify-content: center; }
.cta .lede { color: var(--muted); font-size: 18px; margin: 0 auto 28px; max-width: 560px; }
.brand-logo { width: 32px; height: 32px; border-radius: 8px; }
.btn-google { gap: 10px; }
.btn-google svg { width: 18px; height: 18px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 14px; margin: 20px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Terms change tracker (/changes) */
.changes-list { list-style: none; margin: 12px 0 0; padding: 0; }
.changes-item { padding: 12px 0; border-top: 1px solid var(--line); gap: 12px; }
.changes-item:first-child { border-top: 0; }
.changes-item .hint { margin: 4px 0 0; }
.code-pill { font: 500 15px ui-monospace, Menlo, Consolas, monospace; background: var(--shell); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; user-select: all; }
.no-ext-title { margin: 0; font-weight: 500; color: var(--ink); }
