/* OkieOTSec brand tokens (brand guide v1.1). Light is the default; dark applies with prefers-color-scheme.
   Risk colours carry meaning, not brand. Copper is decoration only: never body text, never status. */
:root {
  --ok-blue:     #2E6CB5;
  --ok-navy:     #14365C;
  --ok-sky:      #6BB0EC;
  --ok-copper:   #C56A33;
  --ok-copper-b: #E08A4E;
  --ok-cream:    #FAF4E8;
  --ok-ink:      #13202E;
  --ok-ink-deep: #0D1520;

  --bg:        var(--ok-cream);
  --surface:   #FFFDF8;
  --line:      #E6DCC8;
  --text:      var(--ok-ink);
  --muted:     #5B6672;
  --brand:     var(--ok-blue);
  --link:      var(--ok-blue);
  --accent:    var(--ok-copper);
  --btn-bg:    var(--ok-blue);
  --btn-text:  #FFFFFF;
  --focus:     var(--ok-blue);

  --risk-now:   #D7263D;
  --risk-next:  #E9A23B;
  --risk-never: #6B7682;

  --font-display: 'Space Grotesk', 'Segoe UI', Arial, sans-serif;
  --font-body:    'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
  --font-mono:    'IBM Plex Mono', Consolas, 'Courier New', monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--ok-ink-deep); --surface: #141F2C; --line: #263445;
    --text: #E8EDF2; --muted: #9AA8B6;
    --brand: var(--ok-sky); --link: var(--ok-sky); --accent: var(--ok-copper-b);
    --btn-bg: var(--ok-blue); --btn-text: #FFFFFF; --focus: var(--ok-sky);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: var(--ok-ink-deep); --surface: #141F2C; --line: #263445;
  --text: #E8EDF2; --muted: #9AA8B6;
  --brand: var(--ok-sky); --link: var(--ok-sky); --accent: var(--ok-copper-b);
  --btn-bg: var(--ok-blue); --btn-text: #FFFFFF; --focus: var(--ok-sky);
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--font-body);
}
.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { line-height: 1.25; font-family: var(--font-display); }
code { font-family: var(--font-mono); font-size: .9em; background: var(--surface); padding: .1em .35em; border-radius: 4px; }
pre code { display: block; padding: 1em; overflow-x: auto; border: 1px solid var(--line); }

.site-header { border-bottom: 3px solid var(--accent); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 40px; width: auto; display: block; }
.site-header nav a { color: var(--muted); margin-left: 18px; font-size: .95rem; }
.site-header nav a:first-child { margin-left: 0; }
.site-header nav a:hover { color: var(--text); }

main { padding: 40px 20px 60px; }
.hero { padding: 24px 0 32px; }
.eyebrow { color: var(--brand); text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; margin: 0; font-family: var(--font-mono); }
.hero h1 { font-size: clamp(2rem, 6vw, 3rem); margin: .2em 0 .4em; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.button { display: inline-block; background: var(--btn-bg); color: var(--btn-text); font-weight: 600; padding: .6em 1.1em; border-radius: 8px; }
.button:hover { text-decoration: none; filter: brightness(1.1); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 16px 0 40px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.card h2 { font-size: 1.05rem; margin: 0 0 .4em; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }

.post-list { list-style: none; padding: 0; }
.post-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.meta { color: var(--muted); font-size: .9rem; margin-right: 10px; font-family: var(--font-mono); }
.post h1 { margin-top: .2em; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); padding: 20px 0 40px; font-size: .95rem; }
.site-footer .small { font-size: .85rem; }

.button.secondary { background: transparent; color: var(--link); border: 1px solid var(--line); }
.featured { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 22px 24px; margin: 8px 0 40px; }
.featured h2 { margin: .2em 0 .4em; }
.featured p { color: var(--muted); }
.shot { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; margin: 16px 0 6px; }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin: 12px 0 8px; }
.shots figure { margin: 0; }
.shots figcaption, .caption { color: var(--muted); font-size: .88rem; margin-top: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.facts { padding-left: 1.1em; }
.facts li { margin: .35em 0; }

/* Resources page */
.res-intro { padding: 8px 0 8px; }
.res-intro h1 { font-size: clamp(2rem, 6vw, 2.6rem); margin: .2em 0 .4em; }
.res-meta { color: var(--muted); font-size: .95rem; max-width: 760px; }
.res-note { border: 1px solid var(--line); border-radius: 8px; padding: .6em 1em; background: var(--surface); }
.res-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin: 24px 0 8px; }
.res-controls[hidden], .res-card[hidden], .res-group[hidden], .res-section[hidden], .res-empty[hidden] { display: none; }
.res-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.res-field label { font-size: .85rem; font-weight: 600; color: var(--muted); }
.res-field input, .res-field select { font: inherit; font-size: .95rem; color: var(--text); background: var(--bg); border: 1px solid var(--muted); border-radius: 8px; padding: .5em .65em; min-height: 44px; width: 100%; }
.res-field--button { justify-content: flex-end; }
.res-field--button .button { min-height: 44px; cursor: pointer; font: inherit; font-weight: 600; }
.res-status { color: var(--muted); font-size: .9rem; margin: 6px 0 18px; min-height: 1.4em; }
.res-empty { border: 1px dashed var(--muted); border-radius: 10px; padding: 8px 18px; margin: 12px 0 24px; }
.res-section { margin: 34px 0; }
.res-section > h2 { border-bottom: 3px solid var(--accent); padding-bottom: .3em; }
.res-group > h3 { margin: 1.6em 0 .6em; font-size: 1.2rem; }
.res-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin: 0 0 14px; scroll-margin-top: 16px; }
.res-card:target { outline: 2px solid var(--focus); outline-offset: 2px; }
.res-id { margin: 0; font: 600 .8rem var(--font-mono); color: var(--muted); letter-spacing: .04em; }
.res-star { font-family: var(--font-body); letter-spacing: 0; color: var(--text); }
.res-title { margin: .15em 0 .4em; font-size: 1.1rem; line-height: 1.3; }
.res-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 .6em; }
.res-badge { font-size: .8rem; font-weight: 700; padding: .1em .65em; border-radius: 999px; border: 2px solid var(--muted); color: var(--text); }
.res-badge--public_free { border-style: solid; }
.res-badge--free_with_conditions { border-style: dashed; }
.res-badge--paid { border-style: double; border-width: 4px; }
.res-level { font-size: .88rem; color: var(--muted); }
.res-summary { margin: .3em 0; }
.res-use { margin: .3em 0 .8em; }
.res-facts { margin: 0; display: grid; gap: 4px; font-size: .92rem; }
.res-facts > div { display: grid; grid-template-columns: 9.5em 1fr; gap: 10px; }
.res-facts dt { color: var(--muted); font-weight: 600; }
.res-facts dd { margin: 0; }
.res-links { margin: .6em 0 0; font-size: .92rem; }
.res-verify { margin-top: .7em; font-size: .88rem; color: var(--muted); }
.res-verify summary { cursor: pointer; width: fit-content; padding: 2px 0; }
.res-verify p { margin: .4em 0 0; }
.res-source { margin-top: 40px; color: var(--muted); font-size: .92rem; }
.res-source h2 { font-size: 1.1rem; }
@media (max-width: 560px) {
  .res-facts > div { grid-template-columns: 1fr; gap: 0; }
  .res-card { padding: 14px 16px; }
}
