/* WatchmanHQ. Retro park-poster colours, clean layout. No web fonts, no scripts. */

:root {
  --navy: #1F2A44;
  --cream: #F2E6CF;
  --amber: #E0A33A;
  --rust: #B5532F;
  --rust-dark: #8A3E22;

  --bg: #F7F0E1;
  --paper: #FFFBF3;
  --ink: #1F2A44;
  --muted: #4B5672;
  --line: #DCCBA8;
  --link: #8A3E22;
  --code-bg: #EFE4CC;
  --caution-bg: #FBEBD0;
  --accent: #B5532F;
  --active-bg: #1F2A44;
  --active-fg: #F2E6CF;

  --display: "Rockwell", "Roboto Slab", "Clarendon", "Bookman Old Style", Georgia, serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131A2B;
    --paper: #1B2440;
    --ink: #F2E6CF;
    --muted: #C7BDA7;
    --line: #33405F;
    --link: #E0A33A;
    --code-bg: #232E4E;
    --caution-bg: #2A2A35;
    --accent: #E0A33A;
    --active-bg: #E0A33A;
    --active-fg: #1F2A44;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--body);
}

a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

h1, h2, h3, h4 {
  font-family: var(--display);
  line-height: 1.2;
  margin: 1.6em 0 0.5em;
}
h1 { font-size: 2.2rem; margin-top: 1.2em; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.2rem; }

code, pre { font-family: var(--mono); font-size: 0.9em; }
code { background: var(--code-bg); padding: 0.1em 0.3em; border-radius: 3px; overflow-wrap: anywhere; }
pre { background: var(--code-bg); padding: 14px 16px; border-radius: 6px; overflow-x: auto; line-height: 1.45; }
pre code { background: none; padding: 0; overflow-wrap: normal; }

blockquote { margin: 1.2em 0; padding: 0.2em 1em; border-left: 4px solid var(--amber); color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 10; }

/* Header and footer: navy, like an enamel sign. */
.site-header { background: var(--navy); color: var(--cream); border-bottom: 4px solid var(--amber); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; font-family: var(--display); font-size: 1.5rem; font-weight: 700; letter-spacing: 0.02em; }
.site-header nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-header nav a { color: var(--cream); text-decoration: none; padding: 5px 12px; border-radius: 4px; font-weight: 600; display: flex; flex-direction: column; line-height: 1.25; }
.nav-sub { font-size: 0.72rem; font-weight: 400; opacity: 0.8; }
.site-header nav a:hover { background: rgba(242, 230, 207, 0.12); }
.site-header nav a[aria-current="page"] { background: var(--amber); color: var(--navy); }

.banner { background: var(--rust-dark); color: var(--cream); padding: 10px 0; }
.banner p { margin: 0.3em 0; }
.banner ul { margin: 0.3em 0; }

.site-footer { background: var(--navy); color: var(--cream); margin-top: 64px; padding: 32px 0 24px; border-top: 4px solid var(--rust); }
.site-footer a { color: var(--cream); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.site-footer h2 { font-size: 1rem; margin: 0 0 0.5em; color: var(--amber); text-transform: uppercase; letter-spacing: 0.08em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.3em 0; }
.slogan { font-family: var(--display); font-size: 1.3rem; color: var(--amber); margin: 28px 0 8px; }
.fine { font-size: 0.85rem; opacity: 0.85; max-width: 720px; }

/* Home */
.hero { display: flex; gap: 32px; align-items: center; padding: 40px 0 16px; }
.hero h1 { font-size: 2.7rem; margin: 0.2em 0 0.4em; }
.hero-mark { flex: 0 0 auto; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; color: var(--accent); margin: 0; font-size: 0.85rem; }
.eyebrow a { text-decoration: none; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 760px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.button { display: inline-block; background: var(--rust); color: #FFF8EC; padding: 10px 18px; border-radius: 4px; font-weight: 700; text-decoration: none; border: 2px solid var(--rust); }
.button:hover { background: var(--rust-dark); border-color: var(--rust-dark); }
.button.ghost { background: transparent; color: var(--link); border-color: var(--line); }

.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 24px; }
.pillars article, .tier { background: var(--paper); border: 1px solid var(--line); border-top: 6px solid var(--amber); border-radius: 6px; padding: 4px 20px 16px; }
.pillars article { display: flex; flex-direction: column; }
.pillars .more { margin-top: auto; padding-top: 4px; font-weight: 600; }
.pillars h2 { margin-top: 0.7em; }
.pillars h2 a { text-decoration: none; color: var(--ink); }

/* Home: today's numbers, so the first screen shows the work is real and current. */
.proof { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin: 12px 0 8px; padding: 18px 22px; background: var(--paper); border: 1px solid var(--line); border-left: 6px solid var(--rust); border-radius: 6px; }
.proof-head { flex: 1 1 220px; max-width: 280px; }
.proof-head p { margin: 0 0 6px; }
.proof-head p:last-child { margin: 0; }
.stats { list-style: none; margin: 0; padding: 0; flex: 3 1 560px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats li { padding: 2px 16px; border-left: 1px solid var(--line); }
.stats a { display: block; text-decoration: none; color: var(--muted); font-size: 0.9rem; line-height: 1.3; }
.stats strong { display: block; font-family: var(--display); font-size: 2rem; line-height: 1.15; color: var(--accent); }
.stats a:hover span { text-decoration: underline; }
.plain { max-width: 780px; }

.state { display: inline-block; font-weight: 700; padding: 2px 10px; border-radius: 3px; margin-bottom: 0; }
.state.ok { background: #2F6B45; color: #FFF; }
.state.bad { background: var(--rust-dark); color: #FFF; }

/* Long-form pages */
.prose { max-width: 780px; }
.prose table { font-size: 0.95rem; }
.meta { color: var(--muted); font-size: 0.95rem; }
.construction { background: var(--caution-bg); border-left: 4px solid var(--amber); padding: 8px 14px; font-weight: 600; }
.toc { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 4px 20px 8px; margin: 1em 0 2em; }
.toc h2 { font-size: 1rem; margin-top: 0.8em; }
.posts { list-style: none; padding: 0; }
.posts li { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.posts h2 { margin-bottom: 0.2em; }
.small { font-size: 0.9rem; color: var(--muted); }
.empty { color: var(--muted); font-style: italic; }
.ai-note { color: var(--muted); }

.callout { background: var(--paper); border: 1px solid var(--line); border-left: 6px solid var(--navy); border-radius: 4px; padding: 4px 18px; margin: 1.5em 0; }
.callout.caution { background: var(--caution-bg); border-left-color: var(--rust); }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1em 0; }
table { border-collapse: collapse; width: 100%; background: var(--paper); }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--navy); color: var(--cream); font-weight: 700; white-space: nowrap; }
tbody th { font-weight: 600; }
.iocs { font-size: 0.9rem; }
.iocs td.ioc { min-width: 220px; max-width: 420px; }
.iocs td.ioc code { word-break: break-all; }
.cites a, .cites span { font-size: 0.85em; text-decoration: none; margin-right: 2px; }
.pubs { color: var(--muted); }
.count { color: var(--muted); font-size: 0.85em; }
.na { color: var(--muted); }

.badge { display: inline-block; padding: 1px 8px; border-radius: 3px; font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.b-confident { background: var(--rust); color: #FFF8EC; }
.b-blocking { background: var(--amber); color: #1F2A44; }
.b-hunting { border: 1px solid var(--muted); color: var(--muted); }
.b-ok { background: #2F6B45; color: #FFF; }
.b-held { background: var(--rust); color: #FFF8EC; }

/* Watch */
.release-line { color: var(--muted); }
.subnav, .pills, .pager { display: flex; gap: 6px; flex-wrap: wrap; margin: 0.6em 0 1em; }
.subnav a, .pills a, .pager a { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; background: var(--paper); font-size: 0.95rem; }
.subnav a[aria-current="page"], .pills a[aria-current="page"], .pager a[aria-current="page"] { background: var(--active-bg); color: var(--active-fg); border-color: var(--active-bg); }
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.tier h3 { display: flex; justify-content: space-between; align-items: baseline; }
.tier .num { font-family: var(--body); font-size: 1.1rem; color: var(--muted); }
.tier .short { font-weight: 700; margin-bottom: 0; }
.t-confident { border-top-color: var(--rust); }
.t-blocking { border-top-color: var(--amber); }
.t-hunting { border-top-color: var(--muted); }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.windows { padding-left: 1.2em; }

/* Download tabs, no JavaScript: radio buttons pick the panel. */
.tabs { margin: 1em 0; }
.tab-input { position: absolute; opacity: 0; pointer-events: none; }
.tab-list { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 3px solid var(--active-bg); }
.tab-list label { padding: 8px 14px; cursor: pointer; border: 1px solid var(--line); border-bottom: 0; border-radius: 6px 6px 0 0; background: var(--paper); font-weight: 600; }
.tab-panel { display: none; padding-top: 8px; }
.downloads td a { font-family: var(--mono); font-size: 0.9rem; }
#dl-0:checked ~ #panel-0, #dl-1:checked ~ #panel-1, #dl-2:checked ~ #panel-2,
#dl-3:checked ~ #panel-3, #dl-4:checked ~ #panel-4, #dl-5:checked ~ #panel-5,
#dl-6:checked ~ #panel-6, #dl-7:checked ~ #panel-7 { display: block; }
#dl-0:checked ~ .tab-list label[for="dl-0"], #dl-1:checked ~ .tab-list label[for="dl-1"],
#dl-2:checked ~ .tab-list label[for="dl-2"], #dl-3:checked ~ .tab-list label[for="dl-3"],
#dl-4:checked ~ .tab-list label[for="dl-4"], #dl-5:checked ~ .tab-list label[for="dl-5"],
#dl-6:checked ~ .tab-list label[for="dl-6"], #dl-7:checked ~ .tab-list label[for="dl-7"] {
  background: var(--active-bg); color: var(--active-fg); border-color: var(--active-bg);
}
#dl-0:focus-visible ~ .tab-list label[for="dl-0"], #dl-1:focus-visible ~ .tab-list label[for="dl-1"],
#dl-2:focus-visible ~ .tab-list label[for="dl-2"], #dl-3:focus-visible ~ .tab-list label[for="dl-3"],
#dl-4:focus-visible ~ .tab-list label[for="dl-4"], #dl-5:focus-visible ~ .tab-list label[for="dl-5"],
#dl-6:focus-visible ~ .tab-list label[for="dl-6"], #dl-7:focus-visible ~ .tab-list label[for="dl-7"] {
  outline: 3px solid var(--amber); outline-offset: 2px;
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  h1 { font-size: 1.8rem; }
  .hero { flex-direction: column; align-items: flex-start; padding-top: 24px; }
  .hero h1 { font-size: 2rem; }
  .hero-mark { width: 90px; height: auto; }
  .brand { font-size: 1.25rem; }
  .site-header nav { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
  .site-header nav a { padding: 4px 6px; }
  .nav-sub { font-size: 0.66rem; }
  .proof { padding: 16px; }
  .proof-head { max-width: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 0; }
  .stats li:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stats strong { font-size: 1.7rem; }
}

/* Numbered steps drawn as cards: [[steps]] on the line before a numbered list. */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 1.2em 0 2em; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.steps li { counter-increment: step; background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--amber); border-radius: 6px; padding: 10px 14px 12px; font-size: 0.93rem; line-height: 1.45; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--display); font-weight: 700; font-size: 1.35rem; line-height: 1; color: var(--accent); margin-bottom: 6px; }
.steps li strong:first-child { display: block; font-size: 1.02rem; color: var(--ink); }

.pillar-sub { margin: -0.4em 0 0.6em; font-size: 0.85rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; }
.start { margin-top: 32px; }
.start h2 { margin-top: 0.6em; }
.start .cards article { border-top-color: var(--navy); }

/* One-page printable handouts (layout: sheet) */
.sheet { max-width: 820px; font-size: 1.1rem; }
.sheet h1 { font-size: 2.4rem; }
.sheet h2 { border-bottom: 3px solid var(--amber); padding-bottom: 4px; }
.print-note { background: var(--paper); border: 1px dashed var(--line); border-radius: 6px; padding: 8px 14px; }

@media print {
  @page { size: letter; margin: 0.5in; }
  html, body { background: #fff !important; color: #000 !important; }
  .site-header, .site-footer, .skip, .banner, .subnav, .pager, .tab-list, .toc, .print-note,
  .construction, .prose > .eyebrow, .prose > .meta { display: none !important; }
  .tab-panel { display: block; }
  main.wrap { max-width: none; padding: 0; }
  .prose { max-width: none; }
  a { color: #000 !important; text-decoration: none; }
  code { background: none; }
  table, th, td { border: 1px solid #000; background: #fff !important; color: #000 !important; }
  .sheet { font-size: 13.5pt; line-height: 1.35; }
  .sheet + .small { display: none; }
  .sheet h1 { font-size: 24pt; margin: 0 0 4pt; }
  .sheet h2 { font-size: 15pt; margin: 9pt 0 3pt; border-bottom: 2px solid #000; break-after: avoid; }
  .sheet p, .sheet ul, .sheet ol { margin: 3pt 0; }
  .sheet li { break-inside: avoid; }
  .sheet blockquote { border-left: 3px solid #000; color: #000; }
}

/* Copy and paste boxes (Confident page) */
.copies { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.copy { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; }
.copy label { display: flex; justify-content: space-between; gap: 8px; }
.copy p { margin: 4px 0 8px; }
.copy-box { width: 100%; font: 0.85rem/1.5 var(--mono); background: var(--code-bg); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; padding: 8px; resize: vertical; }
kbd { font: 0.85em var(--mono); background: var(--paper); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 3px; padding: 0 4px; }

/* Guide cards (Protect) */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 1em 0 2em; }
.cards article { background: var(--paper); border: 1px solid var(--line); border-top: 6px solid var(--rust); border-radius: 6px; padding: 4px 18px 10px; }
.cards h3 { margin-top: 0.7em; }
.checklist li { margin: 0.25em 0; }

.prose > .eyebrow:first-child { margin-top: 2em; }
.sheet p { overflow-wrap: anywhere; }

/* Track record: one square per day, with words for screen readers. */
.days { list-style: none; padding: 0; margin: 0.8em 0 0.4em; display: flex; flex-wrap: wrap; gap: 5px; }
.days li { width: 24px; height: 24px; border-radius: 4px; }
.d-ok { background: #2F6B45; }
.d-held { background: var(--rust); }
.d-missed { background: transparent; box-shadow: inset 0 0 0 2px var(--muted); }
.legend { list-style: none; padding: 0; margin: 0 0 1em; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.9rem; color: var(--muted); }
.legend span { display: inline-block; width: 13px; height: 13px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
