/* Shared look of the static info pages (privacy, terms, refunds, help,
   pricing). Follows the app's colour theme: the same variables, with the same
   dark and light values, as client/src/index.css (which isn't loaded here),
   switched by data-theme on <html> from /theme-init.js. Only use colours the
   app already uses; add a variable in both files rather than a literal. */

:root {
  color-scheme: dark;
  --bg: #0f0f0f;
  --surface: #181818;
  --surface-2: #272727;
  --border: #2a2a2a;
  --border-strong: #3a3a3a;
  --text: #f1f1f1;
  --text-muted: #aaa;
  --link-color: #3ea6ff;
  --link-hover: #65b8ff;
  --on-accent: #0f0f0f;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f9f9f9;
  --surface: #ffffff;
  --surface-2: #f0f0f0;
  --border: #e5e5e5;
  --border-strong: #d0d0d0;
  --text: #0f0f0f;
  --text-muted: #606060;
  --link-color: #0b67c2;
  --link-hover: #0a5aa8;
  --on-accent: #ffffff;
}

body {
  font: 16px/1.6 system-ui, sans-serif;
  max-width: 42rem;
  margin: 2rem auto;
  padding: 0 1rem;
  background: var(--bg);
  color: var(--text);
}

h1, h2, h3 { line-height: 1.25; }

/* Same rule as the app: one link colour in every state. */
:where(a:any-link, a:visited, a:hover, a:active) { color: var(--link-color); }

table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { border: 1px solid var(--border-strong); padding: 6px 8px; text-align: left; vertical-align: top; }

.site-footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: 14px; color: var(--text-muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.site-footer p { margin: 0.5rem 0 0; }

/* Help */
ol.steps > li { margin-bottom: 0.75rem; }
.toc { background: var(--surface); border-radius: 6px; padding: 0.75rem 1rem; }
.toc ul { margin: 0.25rem 0 0; padding-left: 1.25rem; }
.key { display: inline-block; min-width: 1.4em; padding: 0 0.3em; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface-2); text-align: center; font-size: 0.9em; }
details { border-bottom: 1px solid var(--border); padding: 0.6rem 0; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 0.5rem 0 0.25rem; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.plan { border: 1px solid var(--border-strong); border-radius: 10px; padding: 1.25rem 1.25rem 1.5rem; display: flex; flex-direction: column; }
.plan.premium { border: 2px solid var(--link-color); }
.plan h2 { margin: 0; font-size: 1.3rem; }
.price { font-size: 2rem; font-weight: 700; margin: 0.5rem 0 0; }
.price small { font-size: 1rem; font-weight: 400; color: var(--text-muted); }
.price-alt { margin: 0; color: var(--text-muted); }
.plan ul { padding-left: 1.25rem; margin: 1rem 0 1.25rem; flex: 1; }
.plan li { margin-bottom: 0.4rem; }
.btn { display: block; text-align: center; padding: 0.6rem 1rem; border-radius: 6px; font-weight: 600; text-decoration: none; border: 1px solid var(--link-color); }
/* Like the app's .btn-primary: accent fill with --on-accent text. */
a.btn { background: var(--link-color); color: var(--on-accent); }
a.btn:hover { background: var(--link-hover); border-color: var(--link-hover); }
/* Like the app's neutral (disabled) button. */
.btn[aria-disabled="true"] { background: var(--surface-2); color: var(--text-muted); border-color: var(--border-strong); cursor: not-allowed; }
.note { color: var(--text-muted); font-size: 15px; }
/* Premium's yearly/monthly choice (pricing.html, pricing.js). */
.price-options { display: flex; gap: 0.6rem; border: none; margin: 0.75rem 0 0; padding: 0; }
.price-option { flex: 1; display: flex; flex-direction: column; gap: 0.15rem; padding: 0.6rem 0.75rem; border: 1px solid var(--border-strong); border-radius: 8px; cursor: pointer; }
.price-option:has(input:checked) { border: 2px solid var(--link-color); padding: calc(0.6rem - 1px) calc(0.75rem - 1px); }
.price-option:focus-within { outline: 2px solid var(--link-color); outline-offset: 2px; }
.price-option input { position: absolute; opacity: 0; pointer-events: none; }
.price-option-name { font-weight: 600; }
.price-option .price { font-size: 1.6rem; margin: 0; }
.price-option .price-alt { font-size: 14px; }
.save-badge { margin-left: 0.3rem; padding: 0 0.4rem; border: 1px solid var(--link-color); border-radius: 10px; color: var(--link-color); font-size: 12px; white-space: nowrap; }
.founding-note { margin: 0.75rem 0 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Print: back to black text on white, no dark surfaces. */
@media print {
  :root { color-scheme: light; }
  body { background: #fff; color: #000; }
  :where(a:any-link, a:visited, a:hover, a:active) { color: #000; }
  th, td, .plan, .key, .btn, .btn[aria-disabled="true"] { border-color: #000; }
  .plan.premium { border-color: #000; }
  .toc, .key, a.btn, .btn[aria-disabled="true"] { background: #fff; color: #000; }
  details, .site-footer { border-color: #000; }
  .site-footer, .price small, .price-alt, .note, .save-badge { color: #000; }
  .price-option, .save-badge { border-color: #000; }
}
