/* Shared styles for the static guides (served by nginx, not the SPA).
   Follows DESIGN.md: carbon palette, Space Grotesk headings, Plus Jakarta Sans body,
   tonal layering instead of dividing lines, sharp corners, no accent hue. */
:root {
  --bg: #F5F5F5; --surface: #EBEBEB; --fg: #1A1A1A; --secondary: #525252; --muted: #6E6E6E;
  --heading: #000000; --line: rgba(0,0,0,0.12);
  --sans: 'Plus Jakarta Sans', system-ui, sans-serif; --display: 'Space Grotesk', system-ui, sans-serif; --mono: 'Space Mono', ui-monospace, monospace;
}
.dark { --bg: #131313; --surface: #1F1F1F; --fg: #E8E8E8; --secondary: #A0A0A0; --muted: #909090; --heading: #FFFFFF; --line: rgba(255,255,255,0.15); }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 17px; line-height: 1.7; }
::selection { background: var(--heading); color: var(--bg); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--heading); outline-offset: 3px; }

.nav { max-width: 760px; margin: 0 auto; padding: 16px 24px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.12em; text-decoration: none; text-transform: uppercase; color: var(--heading); display: inline-flex; align-items: center; min-height: 44px; }
.navlinks { display: flex; gap: 8px; }
.navlinks a { font-family: var(--display); font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--secondary); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }
.navlinks a:hover { color: var(--heading); }

main { max-width: 760px; margin: 0 auto; padding: 48px 24px 72px; }
.crumbs { font-family: var(--display); font-size: 13px; letter-spacing: 0.04em; color: var(--muted); margin: 0 0 24px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--heading); text-decoration: underline; }

h1 { color: var(--heading); font-family: var(--display); font-size: 48px; font-weight: 700; line-height: 1.04; letter-spacing: -0.02em; text-transform: uppercase; margin: 0 0 24px; text-wrap: balance; overflow-wrap: break-word; }
h2 { font-family: var(--display); font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: 0.01em; text-transform: uppercase; color: var(--heading); margin: 64px 0 16px; text-wrap: balance; }
h3 { font-family: var(--display); font-size: 17px; font-weight: 700; line-height: 1.35; color: var(--heading); margin: 32px 0 8px; }
p, li { max-width: 68ch; }
p { margin: 0 0 18px; }
ul, ol { padding-left: 22px; margin: 0 0 18px; }
li { margin-bottom: 8px; }
li::marker { color: var(--muted); }
strong { color: var(--heading); font-weight: 600; }

.lede { font-size: 20px; line-height: 1.6; color: var(--fg); }
.meta { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 0 0 8px; font-variant-numeric: tabular-nums; }

/* Tonal panels: short answer, worked example, call to action. No borders. */
.panel { background: var(--surface); padding: 24px 28px; margin: 36px 0; }
.panel > :last-child { margin-bottom: 0; }
.panel h2 { margin-top: 0; }
.panel-title { font-family: var(--display); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--heading); margin: 0 0 10px; }

.table-wrap { overflow-x: auto; margin: 24px 0; }
table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.55; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); }
th { font-family: var(--display); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--secondary); }
td:first-child { color: var(--heading); font-weight: 600; min-width: 9em; }

.button { display: inline-flex; align-items: center; min-height: 48px; margin-top: 4px; padding: 0 22px; background: var(--heading); color: var(--bg); font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; transition: opacity 160ms cubic-bezier(0.16, 1, 0.3, 1); }
.button:hover { opacity: 0.86; }

.sources { font-size: 14px; color: var(--secondary); }
.sources li { overflow-wrap: anywhere; }

.guide-list { list-style: none; padding: 0; margin: 32px 0 0; }
.guide-list li { background: var(--surface); padding: 24px 28px; margin-bottom: 12px; max-width: none; }
.guide-list a { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.3; color: var(--heading); text-decoration: none; text-transform: uppercase; }
.guide-list a:hover { text-decoration: underline; }
.guide-list p { margin: 8px 0 0; color: var(--secondary); font-size: 15px; }

footer { max-width: 760px; margin: 0 auto; padding: 24px 24px 32px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; font-family: var(--display); font-size: 13px; color: var(--muted); }
footer a { text-decoration: none; }
footer a:hover { color: var(--heading); text-decoration: underline; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  main { padding-top: 32px; }
  h1 { font-size: 32px; }
  h2 { font-size: 20px; margin-top: 48px; }
  .lede { font-size: 18px; }
  .panel, .guide-list li { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { .button { transition: none; } }
