:root {
  --ink: #071a2b;
  --ink-soft: #24384a;
  --paper: #f7f8f1;
  --white: #ffffff;
  --signal: #d9ff52;
  --hot: #ff694a;
  --sky: #aee9ff;
  --line: #b8c2c8;
  --muted: #647483;
  --radius: 18px;
  --shadow: 0 18px 60px rgba(7, 26, 43, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
button, input { font: inherit; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 1rem; top: -5rem; background: var(--signal); color: var(--ink); padding: .75rem 1rem; z-index: 100; font-weight: 800; }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--hot); outline-offset: 3px; }

.site-header {
  min-height: 88px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 4vw;
  border-bottom: 1px solid rgba(7,26,43,.2);
}
.brand { display: inline-flex; width: 210px; }
.brand img { display: block; width: 100%; height: auto; }
nav { display: flex; align-items: center; gap: 2rem; font-size: .92rem; font-weight: 750; }
nav a, .header-action { text-decoration: none; }
nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.header-action { justify-self: end; padding: .7rem 1rem; border-bottom: 3px solid var(--ink); font-weight: 800; }

.intro {
  max-width: 1480px;
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 8rem) 4vw clamp(3rem, 7vw, 6rem);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(380px, .9fr);
  align-items: end;
  gap: clamp(3rem, 7vw, 8rem);
  min-height: calc(100vh - 88px);
}
.kicker, .eyebrow { margin: 0 0 1.1rem; text-transform: uppercase; letter-spacing: .12em; font-size: .76rem; font-weight: 850; }
.kicker { display: flex; align-items: center; gap: .7rem; }
.kicker span { width: 12px; height: 12px; background: var(--hot); border-radius: 50%; }
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 880px;
  margin-bottom: 1.5rem;
  font-size: clamp(3.4rem, 6.5vw, 7.2rem);
  line-height: .92;
  letter-spacing: -.065em;
  font-weight: 900;
}
h1 em { color: var(--ink); font-style: normal; position: relative; white-space: nowrap; }
h1 em::after { content: ""; position: absolute; left: 0; right: -.06em; bottom: .02em; height: .18em; background: var(--signal); z-index: -1; transform: rotate(-1.5deg); }
.intro-lede { max-width: 680px; font-size: clamp(1.12rem, 1.6vw, 1.42rem); color: var(--ink-soft); }
.word-definition { position: relative; max-width: 680px; margin: 2rem 8px 0 0; padding: 1rem 1.25rem 1.1rem; border: 2px solid var(--ink); background: var(--white); box-shadow: 8px 8px 0 var(--signal); }
.definition-label { position: absolute; right: .8rem; top: .8rem; padding: .2rem .45rem; background: var(--hot); color: var(--ink); text-transform: uppercase; letter-spacing: .09em; font-size: .65rem; font-weight: 900; }
.definition-title { display: flex; align-items: baseline; gap: .8rem; padding-right: 7rem; }
.definition-title dfn { font-family: Georgia, "Times New Roman", serif; font-size: 1.75rem; font-weight: 700; font-style: normal; line-height: 1; }
.pronunciation { color: var(--muted); font: 700 .82rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; }
.word-class { margin: .45rem 0 .25rem; color: var(--hot); font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 700; }
.definition-copy { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.05rem; line-height: 1.42; }
.definition-origin { margin: .65rem 0 0; color: var(--muted); font-size: .76rem; }
.definition-origin em { color: var(--ink-soft); }
.principle { margin-top: 2.2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; max-width: 680px; }
.principle p { margin: 0; }
.principle-number { color: var(--hot); font-weight: 900; }

.starter-panel { background: var(--ink); color: var(--white); border-radius: 30px 30px 6px 30px; padding: clamp(1.5rem, 3vw, 2.5rem); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.starter-panel::before { content: ""; position: absolute; width: 170px; height: 170px; background: var(--signal); border-radius: 50%; right: -110px; top: -100px; }
.starter-heading { display: flex; align-items: start; justify-content: space-between; gap: 1.5rem; }
.starter-heading h2 { margin-bottom: 1.4rem; font-size: clamp(1.65rem, 2.5vw, 2.25rem); line-height: 1.05; letter-spacing: -.035em; }
.time-note { color: var(--signal); font-size: .76rem; font-weight: 800; white-space: nowrap; }
.search-box { display: grid; grid-template-columns: 25px 1fr auto; align-items: center; gap: .8rem; background: var(--white); color: var(--ink); padding: .85rem 1rem; border-radius: 10px; }
.search-box svg { width: 23px; fill: none; stroke: currentColor; stroke-width: 2; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); min-height: 32px; font-size: 1rem; }
.search-box kbd { color: var(--muted); border: 1px solid var(--line); padding: .05rem .42rem; border-radius: 4px; font: 700 .78rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.quick-picks { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.quick-picks button { border: 1px solid rgba(255,255,255,.35); color: var(--white); background: transparent; padding: .55rem .72rem; border-radius: 999px; cursor: pointer; font-size: .83rem; font-weight: 700; }
.quick-picks button:hover { background: var(--signal); border-color: var(--signal); color: var(--ink); }
.starter-footnote { color: #b9c5ce; margin: 1.1rem 0 0; font-size: .8rem; }

.whistle-section { background: var(--ink); color: var(--white); padding: clamp(3.5rem, 7vw, 6.5rem) max(4vw, calc((100vw - 1480px)/2 + 4vw)); display: grid; grid-template-columns: minmax(0, .9fr) minmax(520px, 1.1fr); align-items: center; gap: clamp(3rem, 8vw, 8rem); border-bottom: 12px solid var(--signal); }
.whistle-copy .eyebrow { display: flex; align-items: center; gap: .65rem; color: var(--signal); }
.live-dot { width: 10px; height: 10px; background: var(--hot); border-radius: 50%; box-shadow: 0 0 0 5px rgba(255,105,74,.18); }
.whistle-copy h2 { max-width: 680px; margin-bottom: 1.35rem; font-size: clamp(2.8rem, 5.2vw, 5.6rem); line-height: .92; letter-spacing: -.06em; }
.whistle-copy > p:not(.eyebrow):not(.whistle-caveat) { max-width: 680px; color: #d7e0e6; font-size: 1.08rem; }
.whistle-button { display: inline-flex; align-items: center; justify-content: space-between; gap: 2rem; margin-top: .8rem; padding: 1rem 1.2rem; min-width: min(100%, 300px); background: var(--signal); color: var(--ink); border: 2px solid var(--signal); text-decoration: none; font-weight: 900; }
.whistle-button:hover { background: var(--white); border-color: var(--white); }
.whistle-caveat { margin: 1rem 0 0; color: #aebbc5; font-size: .82rem; }
.whistle-path { display: grid; grid-template-columns: repeat(3, 1fr); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.28); }
.whistle-path > div { min-height: 230px; padding: 1.4rem; display: flex; flex-direction: column; }
.whistle-path > div + div { border-left: 1px solid rgba(255,255,255,.28); }
.whistle-path span { color: var(--hot); font: 900 .8rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.whistle-path strong { display: block; margin-top: auto; font-size: 1.15rem; }
.whistle-path p { margin: .55rem 0 0; color: #bdc9d1; font-size: .88rem; line-height: 1.45; }

.evidence-strip { background: var(--ink); color: var(--white); padding: 2rem 4vw; display: grid; grid-template-columns: minmax(260px, 1.7fr) repeat(3, minmax(130px,.65fr)) minmax(160px,.7fr); gap: 2rem; align-items: center; }
.evidence-strip > * + * { border-left: 1px solid rgba(255,255,255,.2); padding-left: 2rem; }
.evidence-intro p:last-child { color: #c9d2d8; margin-bottom: 0; max-width: 540px; }
.evidence-stat strong, .evidence-stat span, .evidence-stat small { display: block; }
.evidence-stat strong { color: var(--signal); font-size: 2.4rem; line-height: 1; }
.evidence-stat span { font-weight: 850; margin-top: .45rem; }
.evidence-stat small { color: #b9c5ce; line-height: 1.25; margin-top: .25rem; }
.source-link { color: var(--signal); font-weight: 800; text-decoration-thickness: 2px; text-underline-offset: 4px; }

.category-section { max-width: 1480px; margin: 0 auto; padding: clamp(5rem, 9vw, 9rem) 4vw; }
.section-heading { display: grid; grid-template-columns: 1fr minmax(300px, .65fr); gap: 3rem; align-items: end; }
.section-heading h2, .history-heading h2, .network-intro h2, .action-band h2 { margin-bottom: 0; font-size: clamp(2.5rem, 5vw, 5.2rem); line-height: .95; letter-spacing: -.055em; }
.section-heading > p { margin: 0; color: var(--ink-soft); max-width: 560px; }
.filter-row { display: flex; gap: .65rem; margin: 3rem 0 2rem; flex-wrap: wrap; }
.filter-chip { border: 1px solid var(--ink); background: transparent; color: var(--ink); border-radius: 999px; padding: .65rem 1rem; font-weight: 750; cursor: pointer; }
.filter-chip:hover, .filter-chip.is-active { background: var(--ink); color: var(--white); }
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--ink); border: 1px solid var(--ink); }
.category-card { background: var(--paper); min-height: 380px; padding: 1.8rem; display: flex; flex-direction: column; position: relative; }
.category-card::after { content: ""; position: absolute; right: 0; top: 0; width: 0; height: 0; border-left: 28px solid transparent; border-top: 28px solid var(--signal); opacity: 0; transition: opacity .2s; }
.category-card:hover::after { opacity: 1; }
.card-topline { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2.4rem; }
.category-number { font: 800 .8rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
.priority { display: inline-flex; align-items: center; gap: .45rem; text-transform: uppercase; letter-spacing: .08em; font-size: .68rem; font-weight: 900; }
.priority::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--hot); }
.priority[data-level="focused"]::before { background: #f2b84b; }
.category-card h3 { font-size: 1.7rem; line-height: 1.05; letter-spacing: -.03em; margin-bottom: 1rem; }
.category-card > p { color: var(--ink-soft); }
.risk-tags { display: flex; flex-wrap: wrap; gap: .45rem; margin: auto 0 1.5rem; padding-top: 1.5rem; }
.risk-tags span { background: #e4e9e7; padding: .3rem .5rem; font-size: .75rem; font-weight: 800; }
.open-card { border: 0; border-top: 1px solid var(--ink); padding: .9rem 0 0; background: transparent; color: var(--ink); display: flex; align-items: center; justify-content: space-between; text-align: left; font-weight: 900; cursor: pointer; }
.open-card span { font-size: 1.5rem; transition: transform .2s; }
.open-card:hover span { transform: translateX(5px); }
.empty-state { border: 1px solid var(--line); padding: 3rem; text-align: center; }

.history-section { background: var(--sky); padding: clamp(5rem, 9vw, 9rem) max(4vw, calc((100vw - 1480px)/2 + 4vw)); display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(3rem,8vw,9rem); }
.history-heading { position: sticky; top: 2rem; align-self: start; }
.history-heading p:last-child { margin-top: 2rem; max-width: 500px; }
.timeline { border-top: 1px solid var(--ink); }
.timeline article { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; padding: 2rem 0; border-bottom: 1px solid var(--ink); }
.timeline-year { font: 900 .82rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; }
.timeline h3 { font-size: 1.35rem; margin-bottom: .5rem; }
.timeline p { color: var(--ink-soft); margin-bottom: 0; }
.history-links { grid-column: 2; display: flex; gap: 1.5rem; flex-wrap: wrap; }
.history-links a { font-weight: 850; text-underline-offset: 4px; }

.network-section { background: var(--white); padding: clamp(5rem, 9vw, 9rem) 4vw; }
.network-intro { max-width: 1480px; margin: 0 auto 4rem; display: grid; grid-template-columns: 1fr 1fr; align-items: end; column-gap: 4rem; }
.network-intro .eyebrow { grid-column: 1 / -1; }
.network-intro p:last-child { margin: 0; max-width: 500px; justify-self: end; color: var(--ink-soft); }
.network-flow { max-width: 1480px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 1.1rem; }
.network-card { border: 1px solid var(--ink); padding: 2rem; min-height: 290px; display: flex; flex-direction: column; }
.network-card.thwartly-card { background: var(--ink); color: var(--white); box-shadow: inset 0 -8px 0 var(--signal); }
.network-step { text-transform: uppercase; letter-spacing: .1em; font-size: .7rem; font-weight: 900; color: var(--hot); }
.network-card h3 { font-size: 2rem; margin: 1.2rem 0 .8rem; }
.network-card p { color: inherit; opacity: .82; }
.network-card a { margin-top: auto; font-weight: 900; text-underline-offset: 4px; }
.flow-arrow { align-self: center; font-size: 2rem; }
.network-note { max-width: 1480px; margin: 2rem auto 0; border-left: 5px solid var(--signal); padding-left: 1rem; font-size: .9rem; color: var(--ink-soft); }

.action-band { background: var(--signal); padding: clamp(3.5rem, 7vw, 6rem) max(4vw, calc((100vw - 1480px)/2 + 4vw)); display: grid; grid-template-columns: 1.25fr .75fr; align-items: end; gap: 3rem; }
.action-band h2 { max-width: 900px; }
.action-buttons { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: flex-end; }
.button { padding: 1rem 1.2rem; text-decoration: none; font-weight: 900; border: 2px solid var(--ink); }
.button-primary { background: var(--ink); color: var(--white); }
.button-secondary { background: transparent; }

footer { background: var(--ink); color: var(--white); padding: 2.5rem 4vw; display: grid; grid-template-columns: auto auto 1fr; gap: 2rem; align-items: baseline; }
.footer-brand { font-size: 1.45rem; font-weight: 900; text-decoration: none; }
.footer-brand span { color: var(--signal); }
footer p { margin: 0; color: #c5d0d8; }
.footer-cic { justify-self: end; text-align: right; font-size: .86rem; }

.safecheck-dialog { width: min(780px, 100%); height: 100%; max-height: 100%; margin: 0 0 0 auto; padding: 0; border: 0; background: var(--paper); color: var(--ink); box-shadow: -20px 0 70px rgba(0,0,0,.25); }
.safecheck-dialog[open] { animation: slide-in .28s ease-out; }
.safecheck-dialog::backdrop { background: rgba(7,26,43,.7); backdrop-filter: blur(3px); }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }
.dialog-shell { min-height: 100%; padding: clamp(1.5rem, 5vw, 4rem); }
.dialog-topbar { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); margin-bottom: 2rem; }
.icon-button { border: 0; background: transparent; font-size: 2rem; cursor: pointer; min-width: 44px; min-height: 44px; }
.dialog-header { margin-bottom: 2.5rem; }
.dialog-header h2 { font-size: clamp(2.5rem, 7vw, 4.8rem); line-height: .92; letter-spacing: -.06em; margin-bottom: 1rem; }
.dialog-header p { color: var(--ink-soft); font-size: 1.08rem; }
.dialog-alert { background: var(--ink); color: var(--white); padding: 1.25rem; border-left: 7px solid var(--signal); margin: 1.5rem 0; }
.dialog-alert strong { color: var(--signal); }
.check-section { margin: 2.5rem 0; }
.check-section h3 { font-size: 1.4rem; border-bottom: 1px solid var(--ink); padding-bottom: .7rem; }
.incident-list { display: grid; gap: .75rem; }
.incident-item { display: grid; grid-template-columns: 8px 1fr; gap: .8rem; align-items: start; }
.incident-item::before { content: ""; width: 8px; height: 8px; margin-top: .48rem; background: var(--hot); border-radius: 50%; }
.incident-item p { margin: 0; }
.checklist { display: grid; gap: .65rem; }
.check-item { display: grid; grid-template-columns: 24px 1fr; gap: .8rem; align-items: start; padding: .85rem; border: 1px solid var(--line); background: var(--white); cursor: pointer; }
.check-item:has(input:checked) { border-color: var(--ink); background: #f0f8d3; }
.check-item input { width: 20px; height: 20px; accent-color: var(--ink); }
.progress-wrap { margin: 1rem 0; }
.progress-label { display: flex; justify-content: space-between; font-size: .82rem; font-weight: 850; }
.progress-track { height: 8px; background: #d9dfdc; margin-top: .45rem; }
.progress-bar { width: 0; height: 100%; background: var(--ink); transition: width .2s; }
.red-flags { background: #ffe3da; padding: 1.2rem; }
.red-flags ul { margin-bottom: 0; padding-left: 1.2rem; }
.whistle-inline { margin: 2.5rem 0; padding: 1.4rem; background: var(--ink); color: var(--white); box-shadow: inset 7px 0 0 var(--signal); }
.whistle-inline .eyebrow { color: var(--signal); margin-bottom: .75rem; }
.whistle-inline h3 { border: 0; margin: 0 0 .65rem; padding: 0; color: var(--white); }
.whistle-inline p:not(.eyebrow) { color: #cbd5db; }
.whistle-inline a { display: inline-block; color: var(--signal); font-weight: 900; text-underline-offset: 4px; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2.5rem; }
.dialog-actions a, .dialog-actions button { padding: .9rem 1rem; border: 2px solid var(--ink); background: transparent; color: var(--ink); text-decoration: none; font-weight: 900; cursor: pointer; }
.dialog-actions .primary { background: var(--ink); color: var(--white); }
.dialog-disclaimer { margin-top: 2rem; color: var(--muted); font-size: .82rem; }
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 30px); background: var(--ink); color: var(--white); padding: .8rem 1.1rem; opacity: 0; pointer-events: none; transition: .25s; z-index: 120; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1000px) {
  .site-header { grid-template-columns: 1fr auto; }
  nav { display: none; }
  .intro { grid-template-columns: 1fr; min-height: auto; }
  .intro-copy { max-width: 900px; }
  .starter-panel { max-width: 680px; }
  .whistle-section { grid-template-columns: 1fr; }
  .evidence-strip { grid-template-columns: 1.4fr repeat(3,1fr); }
  .source-link { grid-column: 1 / -1; border-left: 0 !important; padding-left: 0 !important; }
  .category-grid { grid-template-columns: repeat(2,1fr); }
  .history-section { grid-template-columns: 1fr; }
  .history-heading { position: static; }
  .history-links { grid-column: 1; }
  .network-flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); justify-self: center; }
  .action-band { grid-template-columns: 1fr; }
  .action-buttons { justify-content: flex-start; }
}

@media (max-width: 680px) {
  .site-header { min-height: 72px; padding: 0 1rem; }
  .brand { width: 168px; }
  .header-action { display: none; }
  .intro, .category-section { padding-left: 1rem; padding-right: 1rem; }
  .intro { padding-top: 3rem; }
  h1 { font-size: clamp(3.1rem, 16vw, 5rem); }
  h1 em { white-space: normal; }
  .word-definition { margin-top: 1.5rem; padding: 1rem; }
  .definition-label { position: static; display: inline-block; margin-bottom: .75rem; }
  .definition-title { display: block; padding-right: 0; }
  .pronunciation { display: block; margin-top: .45rem; }
  .starter-panel { border-radius: 20px 20px 4px 20px; }
  .whistle-section { padding-left: 1rem; padding-right: 1rem; }
  .whistle-path { grid-template-columns: 1fr; }
  .whistle-path > div { min-height: auto; }
  .whistle-path > div + div { border-left: 0; border-top: 1px solid rgba(255,255,255,.28); }
  .whistle-path strong { margin-top: 1.8rem; }
  .starter-heading { display: block; }
  .time-note { display: inline-block; margin-bottom: 1rem; }
  .search-box kbd { display: none; }
  .evidence-strip { padding: 2.5rem 1rem; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .evidence-intro, .source-link { grid-column: 1 / -1; }
  .evidence-strip > * + * { border-left: 0; padding-left: 0; }
  .section-heading, .network-intro { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }
  .category-card { min-height: 340px; }
  .history-section, .network-section, .action-band { padding-left: 1rem; padding-right: 1rem; }
  .timeline article { grid-template-columns: 85px 1fr; }
  .network-intro p:last-child { justify-self: start; }
  footer { grid-template-columns: 1fr; padding: 2rem 1rem; gap: .6rem; }
  .footer-cic { justify-self: start; text-align: left; }
  .safecheck-dialog { width: 100%; }
  .dialog-shell { padding: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media print {
  .site-header, .intro, .evidence-strip, .category-section, .history-section, .network-section, .action-band, footer, .dialog-topbar, .dialog-actions { display: none !important; }
  .safecheck-dialog[open] { position: static; width: 100%; height: auto; max-height: none; box-shadow: none; }
  .safecheck-dialog::backdrop { display: none; }
  .dialog-shell { padding: 0; }
}
