/* Fair Market Rent Map developer docs — shared stylesheet.
   Tokens mirror the app's design system (globals.css fmr-* tokens):
   Geist for text, JetBrains Mono for code, voucher green as the primary
   accent, amber as the Pro accent. */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --bg: #f8f8f8;             /* fmr-base */
  --surface: #ffffff;        /* fmr-surface */
  --raised: #f0f0f0;         /* fmr-raised */
  --ink: #1a1a1a;            /* fmr-ink */
  --ink-secondary: #4a4a4a;  /* fmr-ink-secondary */
  --muted: #6b6b6b;          /* fmr-ink-muted */
  --border: rgba(0, 0, 0, 0.12);       /* fmr-boundary */
  --border-soft: rgba(0, 0, 0, 0.06);  /* fmr-boundary-soft */
  --accent: #059669;         /* fmr-voucher */
  --accent-hover: #047857;   /* fmr-voucher-hover */
  --accent-subtle: rgba(5, 150, 105, 0.12);
  --pro: #b45309;            /* fmr-pro, darkened for AA text on light */
  --pro-subtle: rgba(217, 119, 6, 0.12);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --header-bg: rgba(248, 248, 248, 0.85);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --surface: #1e1e1e;
    --raised: #282828;
    --ink: #e5e5e5;
    --ink-secondary: #a3a3a3;
    --muted: #888888;
    --border: rgba(255, 255, 255, 0.12);
    --border-soft: rgba(255, 255, 255, 0.07);
    --accent: #10b981;
    --accent-hover: #34d399;
    --accent-subtle: rgba(16, 185, 129, 0.15);
    --pro: #f59e0b;
    --pro-subtle: rgba(245, 158, 11, 0.15);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    --header-bg: rgba(17, 17, 17, 0.85);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }

header.site {
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 20px;
}

.brand {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand:hover { color: var(--ink); opacity: 0.7; }
.brand em { font-style: italic; }
.brand .docs-tag {
  font-family: "Geist", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-subtle);
  border-radius: 999px;
  padding: 2px 9px;
  margin-left: 8px;
  vertical-align: 3px;
  letter-spacing: 0;
}

nav.top { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
nav.top a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 8px;
}
nav.top a:hover { color: var(--accent); background: var(--accent-subtle); }
nav.top a[aria-current="page"] { color: var(--accent); font-weight: 600; background: var(--accent-subtle); }

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 36px 20px 64px;
}

html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 72px; }

hr.rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

h1 { font-size: 32px; line-height: 1.2; margin: 0 0 10px; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 22px; margin: 44px 0 12px; font-weight: 650; letter-spacing: -0.01em; }
h3 { font-size: 17px; margin: 28px 0 8px; font-weight: 600; }
p.lead { font-size: 18px; color: var(--ink-secondary); margin-top: 0; }

pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  box-shadow: var(--shadow);
}

code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.88em;
  background: var(--raised);
  border-radius: 5px;
  padding: 1px 5px;
}
pre code { background: none; padding: 0; font-size: inherit; }

.tbl-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  margin: 12px 0;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14.5px;
}
th, td {
  text-align: left;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}
tbody tr:last-child td { border-bottom: none; }
th {
  background: var(--raised);
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.note, .warn {
  border-radius: 10px;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 14.5px;
}
.note { background: var(--accent-subtle); border: 1px solid var(--border-soft); }
.warn { background: var(--pro-subtle); border: 1px solid var(--border-soft); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 6px; }
.card p { margin: 0; font-size: 14px; color: var(--muted); }

.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 2px 10px;
  margin-left: 8px;
  vertical-align: middle;
  letter-spacing: 0;
}
.badge.free { background: var(--accent-subtle); color: var(--accent); }
.badge.pro { background: var(--pro-subtle); color: var(--pro); }

.demo {
  margin: 16px 0;
  padding: 20px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.demo-label {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

footer.site {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: 24px;
}
footer.site .site-inner {
  display: block;
  font-size: 14px;
  color: var(--muted);
  padding: 20px;
}
