/* RatioForge — shared styles for content pages (guides, about, contact, privacy).
   Same design tokens as the calculator. Light is default; dark via [data-theme="dark"]. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #F7F8FA; --surface: #FFFFFF; --border: #E3E7EC; --text: #16202C;
  --muted: #5A6675; --accent: #1F8A8A; --accent-hover: #1A7575; --accent-weak: #E6F2F2;
  --border-strong: #CDD4DC; --text-on-accent: #FFFFFF;
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 8px; --radius-card: 12px;
  --shadow-card: 0 1px 2px rgba(22,32,44,0.04), 0 8px 24px rgba(22,32,44,0.08);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0E1419; --surface: #161E26; --border: #28333D; --text: #E8EDF2;
  --muted: #9AA7B4; --accent: #2BB3B3; --accent-hover: #3FC4C4; --accent-weak: #14333A;
  --border-strong: #3A4651; --text-on-accent: #06181A;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body { font-family: var(--font-ui); background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Header + nav */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 56px; padding: 0 20px; border-bottom: 1px solid var(--border); background: var(--surface);
  position: sticky; top: 0; z-index: 20; }
.site-logo { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600;
  color: var(--text); text-decoration: none; flex: none; }
.site-logo .accent { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.site-nav a { font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none;
  padding: 6px 10px; border-radius: var(--radius); }
.site-nav a:hover { color: var(--text); background: var(--bg); }
.site-nav a[aria-current="page"] { color: var(--accent); }
.theme-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); cursor: pointer; flex: none; }
.theme-btn:hover { border-color: var(--border-strong); }

/* Layout + prose */
.container { max-width: 760px; margin: 0 auto; padding: 40px 20px 56px; }
.container.wide { max-width: 1000px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin: 0 0 16px; }
.breadcrumb a { color: var(--muted); }
.lead { font-size: 18px; color: var(--muted); margin: 0 0 28px; }
.prose h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 12px; }
.prose h2 { font-size: 22px; font-weight: 600; margin: 36px 0 12px; }
.prose h3 { font-size: 17px; font-weight: 600; margin: 24px 0 8px; }
.prose p, .prose li { font-size: 16px; color: var(--text); }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose strong { font-weight: 600; }
.prose code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 0.9em;
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--border); border-radius: var(--radius-card); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
thead th { background: var(--bg); color: var(--muted); font-weight: 600; }
tbody tr:last-child td { border-bottom: none; }

/* Callout */
.callout { background: var(--accent-weak); border: 1px solid var(--accent); border-radius: var(--radius-card);
  padding: 16px 18px; margin: 0 0 20px; }
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--accent); }

/* Cards (guides index) */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { display: block; padding: 20px; border-radius: var(--radius-card); background: var(--surface);
  border: 1px solid var(--border); text-decoration: none; color: var(--text); transition: border-color 120ms, box-shadow 120ms; }
.card:hover { border-color: var(--accent); box-shadow: var(--shadow-card); }
.card h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; color: var(--text); }
.card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }

/* CTA */
.cta { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 24px; text-align: center; margin: 36px 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px;
  border-radius: var(--radius); font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent;
  font-size: 15px; font-family: inherit; }
.btn-primary { background: var(--accent); color: var(--text-on-accent); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--bg); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; }
.field label { font-size: 14px; font-weight: 500; color: var(--muted); }
.field input, .field textarea { font-family: inherit; font-size: 15px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.form-note { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 24px 20px; text-align: center; }
.footer-nav { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.footer-nav a { font-size: 13px; color: var(--accent); text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.site-footer span { font-size: 13px; color: var(--muted); }

/* GDPR consent banner */
.rf-consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; align-items: center;
  justify-content: center; gap: 16px; flex-wrap: wrap; padding: 14px 20px; background: var(--surface);
  border-top: 1px solid var(--border); box-shadow: 0 -4px 16px rgba(0,0,0,0.10); }
.rf-consent[hidden] { display: none; }
.rf-consent p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); max-width: 60ch; }
.rf-consent-actions { display: flex; gap: 8px; flex: none; }
.rf-consent .btn { padding: 7px 14px; font-size: 13px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
