/* CORD Reports: page styles over the CORD brand tokens (tokens.css). Research indigo is the accent.
   All colours go through the tokens so light and dark themes both hold; nothing here hard-codes a hex. */
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
body{margin:0;background:var(--bg);color:var(--fg);font:16px/1.7 var(--font-sans);
 -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
a{color:var(--link);text-underline-offset:2px}a:hover{text-decoration-thickness:2px}
:focus-visible{outline:2px solid var(--focus);outline-offset:2px;border-radius:2px}
img{max-width:100%;height:auto}
::selection{background:var(--accent-soft);color:var(--fg)}

.wrap{max-width:78rem;margin:0 auto;padding:0 16px}
@media (min-width:720px){.wrap{padding:0 1.5rem}}

/* reading-progress bar: a thin gradient line that fills as the page scrolls. JS sets --p (0..1);
   with no JS it stays at 0 width and the page is unaffected. */
.progress{position:fixed;top:0;left:0;right:0;height:3px;z-index:20;transform:scaleX(var(--p,0));
 transform-origin:0 50%;background:var(--brand-rule);pointer-events:none;will-change:transform}

/* sticky top bar */
.top{background:color-mix(in srgb,var(--surface) 86%,transparent);backdrop-filter:saturate(1.3) blur(8px);
 border-bottom:1px solid var(--line);position:sticky;top:0;z-index:5}
.top::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;background:var(--brand-rule);opacity:.9}
.top .in{max-width:78rem;margin:0 auto;padding:0 16px;display:flex;align-items:center;gap:.75rem;min-height:3.5rem;flex-wrap:wrap}
@media (min-width:720px){.top .in{padding:0 1.5rem}}
.top .brand{display:flex;align-items:center;color:var(--fg);transition:opacity .15s}
.top .brand:hover{opacity:.85}
.top .brand svg{height:24px;width:auto;display:block}
.top .site{color:var(--muted);font-size:14px;border-left:1px solid var(--line);padding-left:.75rem;letter-spacing:.01em}
.top nav{margin-left:auto;display:flex;align-items:center;gap:.35rem;font-size:14px;flex-wrap:wrap}
.top nav a{color:var(--muted);text-decoration:none;padding:.3rem .55rem;border-radius:var(--radius);transition:color .15s,background .15s}
.top nav a:hover{color:var(--fg);background:var(--surface-2)}
.theme-toggle{display:inline-grid;place-items:center;width:2rem;height:2rem;margin-left:.25rem;padding:0;
 background:var(--surface-2);border:1px solid var(--line);border-radius:var(--radius);color:var(--muted);cursor:pointer;
 transition:color .15s,border-color .15s,background .15s}
.theme-toggle:hover{color:var(--fg);border-color:var(--accent)}
.theme-toggle svg{width:16px;height:16px}
.theme-toggle .sun{display:none}.theme-toggle .moon{display:block}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .theme-toggle .sun{display:block}
 :root:not([data-theme="light"]) .theme-toggle .moon{display:none}}
:root[data-theme="dark"] .theme-toggle .sun{display:block}:root[data-theme="dark"] .theme-toggle .moon{display:none}
:root[data-theme="light"] .theme-toggle .sun{display:none}:root[data-theme="light"] .theme-toggle .moon{display:block}

/* hero / title block */
.hero{margin:1.75rem 0 1.25rem;padding:1.6rem 1.5rem 1.4rem;border:1px solid var(--line);border-radius:var(--radius);
 position:relative;overflow:hidden;background:
  radial-gradient(120% 140% at 100% 0%,var(--accent-soft) 0%,transparent 55%),var(--surface)}
.hero::before{content:"";position:absolute;left:0;right:0;top:0;height:3px;background:var(--brand-rule)}
.hero h1{margin:.55rem 0 .5rem;font-size:clamp(1.55rem,3.6vw,2.3rem);line-height:1.18;letter-spacing:var(--display-tracking);
 font-weight:var(--display-weight)}
.hero .sub{color:var(--muted);margin:.3rem 0;max-width:60rem;font-size:1.05rem;line-height:1.55}
.hero .sub.small{font-size:13px;color:var(--muted);margin-top:.7rem}
.small{font-size:13px}
.meta{display:flex;flex-wrap:wrap;gap:.4rem;align-items:center}

/* pills */
.pill{display:inline-flex;align-items:center;padding:.12rem .62rem;border-radius:999px;font-size:12px;line-height:1.5;
 border:1px solid var(--line);background:var(--surface-2);color:var(--muted);font-weight:500;letter-spacing:.01em}
.pill.tlp{border-color:var(--ok);color:var(--ok);background:transparent;font-weight:700;letter-spacing:.03em}
a.rcard:hover .pill{border-color:var(--line)}
.date{color:var(--muted);font-size:13px;margin-right:.25rem;font-variant-numeric:tabular-nums}

/* report index */
.rlist{display:grid;gap:1rem;margin:1.25rem 0 2rem}
.rcard{display:block;text-decoration:none;color:inherit;background:var(--surface);border:1px solid var(--line);
 border-left:4px solid var(--accent);border-radius:var(--radius);padding:1.1rem 1.25rem;position:relative;
 transition:border-color .15s,box-shadow .15s,transform .15s}
.rcard::after{content:"\2192";position:absolute;right:1.1rem;top:1.05rem;color:var(--accent);font-size:1.1rem;
 opacity:0;transform:translateX(-4px);transition:opacity .15s,transform .15s}
.rcard:hover{border-color:var(--accent);box-shadow:0 6px 20px -12px var(--accent);transform:translateY(-1px)}
.rcard:hover::after{opacity:1;transform:translateX(0)}
.rcard h2{margin:.5rem 0 .35rem;font-size:1.22rem;line-height:1.3;color:var(--fg);padding-right:1.5rem}
.rcard p{margin:0;color:var(--muted);max-width:60rem}

/* report layout: TOC sidebar + prose */
.cols{display:grid;grid-template-columns:minmax(0,1fr);gap:1.25rem}
.cols>*{min-width:0}
@media (min-width:1100px){.cols{grid-template-columns:15rem minmax(0,1fr);gap:2.5rem}}
.toc{font-size:13.5px;display:none}
@media (min-width:1100px){.toc{display:block}.toc-m{display:none}}
.toc-m{border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);padding:.6rem .9rem;font-size:14px;margin:0 0 1rem}
.toc-m summary{cursor:pointer;font-weight:600;color:var(--fg)}
.toc-m ul{list-style:none;margin:.3rem 0 0;padding-left:.75rem}.toc-m>ul{padding-left:0}
.toc-m li{margin:.25rem 0}.toc-m a{color:var(--muted);text-decoration:none}.toc-m a:hover{color:var(--accent)}
.hero,.prose,.top .in{overflow-wrap:break-word}
.prose code{overflow-wrap:anywhere}
.toc-in{border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);padding:.9rem 1rem}
@media (min-width:1100px){.toc-in{position:sticky;top:4.75rem;max-height:calc(100vh - 6rem);overflow:auto}}
.toc-h{font-weight:700;margin-bottom:.5rem;font-size:11px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted)}
.toc ul{list-style:none;margin:0;padding-left:.85rem}.toc>.toc-in>div>ul{padding-left:0}
.toc li{margin:0}
.toc a{color:var(--muted);text-decoration:none;display:block;padding:.2rem .5rem;border-left:2px solid transparent;
 margin-left:-2px;border-radius:0 var(--radius) var(--radius) 0;line-height:1.35;transition:color .12s,background .12s,border-color .12s}
.toc a:hover{color:var(--fg);background:var(--surface-2)}
.toc a.active{color:var(--accent);border-left-color:var(--accent);background:var(--accent-soft);font-weight:600}
.toc ul ul a{font-size:.95em}

/* prose */
.prose{min-width:0;max-width:44rem}
.prose.solo{margin:1.75rem auto 3rem;max-width:46rem}
.prose>:first-child{margin-top:0}
.prose h2{font-size:1.45rem;margin:2.8rem 0 .8rem;padding-bottom:.4rem;line-height:1.25;letter-spacing:-.01em;
 border-bottom:1px solid var(--line);scroll-margin-top:4.75rem;position:relative}
.prose h2::before{content:"";position:absolute;left:0;bottom:-1px;width:2.5rem;height:2px;background:var(--accent)}
.prose h3{font-size:1.15rem;margin:2rem 0 .55rem;line-height:1.3;scroll-margin-top:4.75rem}
.prose h4{font-size:1rem;margin:1.5rem 0 .4rem}
.prose .headerlink{opacity:0;margin-left:.4rem;text-decoration:none;color:var(--muted);font-weight:400}
.prose h2:hover .headerlink,.prose h3:hover .headerlink{opacity:1}
.prose p,.prose li{max-width:40rem}
.prose li{margin:.3rem 0}
.prose ul,.prose ol{padding-left:1.4rem}
.prose li::marker{color:var(--muted)}
.prose blockquote{margin:1.25rem 0;padding:.7rem 1.1rem;border-left:4px solid var(--accent);background:var(--accent-soft);
 border-radius:0 var(--radius) var(--radius) 0;color:var(--fg)}
.prose blockquote p{margin:.3rem 0}
.prose hr{border:0;border-top:1px solid var(--line);margin:2.5rem 0}

/* code */
code,pre,.mono{font-family:var(--font-mono);font-size:.86em}
:not(pre)>code{background:var(--code-bg);color:var(--code-fg);padding:.1em .34em;border-radius:4px;
 border:1px solid var(--line);overflow-wrap:anywhere}
pre{background:var(--code-bg);color:var(--code-fg);border:1px solid var(--line);border-radius:var(--radius);
 padding:.85rem 1.05rem;overflow:auto;font-size:13px;line-height:1.55;position:relative}
pre code{background:none;border:0;padding:0}

/* tables */
.tw{overflow:auto;margin:1.1rem 0;border:1px solid var(--line);border-radius:var(--radius);max-height:34rem;
 box-shadow:inset -14px 0 14px -14px rgba(0,0,0,.25)}
table{border-collapse:separate;border-spacing:0;width:100%;font-size:13.5px;background:var(--surface)}
th,td{border-bottom:1px solid var(--line);padding:.5rem .7rem;text-align:left;vertical-align:top;line-height:1.5}
th{background:var(--surface-2);font-weight:700;white-space:nowrap;position:sticky;top:0;z-index:1;
 border-bottom:2px solid var(--line);font-size:12.5px;letter-spacing:.01em}
tbody tr:nth-child(even) td{background:color-mix(in srgb,var(--surface-2) 55%,var(--surface))}
tbody tr:hover td{background:var(--accent-soft)}
tr:last-child td{border-bottom:0}
td code{word-break:break-all;background:none;border:0;padding:0;color:var(--fg)}
td .mono,td.mono{word-break:break-all}

/* figures and images */
figure{margin:1.6rem 0}
figure img{display:block;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface-2)}
figcaption{color:var(--muted);font-size:13.5px;margin-top:.5rem;line-height:1.5}
.figs{display:grid;gap:1rem;grid-template-columns:1fr}
@media (min-width:760px){.figs{grid-template-columns:1fr 1fr}}
.figs figure{margin:0}

/* the inline attack-chain diagram (viewBox trimmed to its content in the source SVG). */
figure.diagram{margin:1.75rem auto;padding:1.1rem 1.1rem .8rem;border:1px solid var(--line);border-radius:var(--radius);
 background:var(--surface);text-align:center;max-width:660px}
figure.diagram svg{display:block;width:100%;height:auto;max-width:620px;margin:0 auto .6rem}
figure.diagram figcaption{text-align:left}

/* callouts */
.callout{border:1px solid var(--line);border-left:4px solid var(--warn);background:var(--surface);
 border-radius:var(--radius);padding:.9rem 1.1rem .9rem 2.9rem;margin:1.25rem 0;position:relative}
.callout::before{content:"!";position:absolute;left:.95rem;top:.95rem;width:1.3rem;height:1.3rem;border-radius:50%;
 display:grid;place-items:center;font-size:12px;font-weight:800;line-height:1;
 color:var(--surface);background:var(--warn)}
.callout.bad{border-left-color:var(--bad);background:
  linear-gradient(90deg,color-mix(in srgb,var(--bad) 7%,transparent),transparent 40%),var(--surface)}
.callout.bad::before{background:var(--bad);content:"!"}
.callout.ok{border-left-color:var(--ok);background:
  linear-gradient(90deg,color-mix(in srgb,var(--ok) 8%,transparent),transparent 40%),var(--surface)}
.callout.ok::before{background:var(--ok);content:"\2713"}
.callout>:first-child{margin-top:0}.callout>:last-child{margin-bottom:0}
.callout p,.callout li{max-width:46rem}

/* stat cards */
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(10.5rem,1fr));gap:.8rem;margin:1.25rem 0 1.5rem}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:.85rem 1rem;
 position:relative;overflow:hidden}
.card::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--accent);opacity:.75}
.card .k{color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.05em;line-height:1.35;font-weight:600}
.card .v{font-size:1.6rem;font-weight:800;margin-top:.15rem;line-height:1.1;color:var(--fg);
 letter-spacing:-.02em;font-variant-numeric:tabular-nums}

/* numbered flow steps */
.flow{display:grid;gap:.6rem;margin:1.25rem 0;counter-reset:step}
.flow>div{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
 padding:.7rem .95rem .7rem 2.9rem;position:relative}
.flow>div::before{counter-increment:step;content:counter(step);position:absolute;left:.75rem;top:.7rem;
 width:1.5rem;height:1.5rem;border-radius:50%;background:var(--accent);color:var(--accent-fg);font-size:12px;
 font-weight:700;display:grid;place-items:center;box-shadow:0 0 0 3px var(--accent-soft)}

/* checklist */
.checklist{padding-left:.25rem}
.checklist li{list-style:none;position:relative;padding-left:1.7rem;margin:.4rem 0}
.checklist li::before{content:"";position:absolute;left:0;top:.4rem;width:1rem;height:1rem;
 border:2px solid var(--muted);border-radius:3px}

footer{color:var(--muted);font-size:13px;line-height:1.6;padding:2.5rem 16px 3rem;border-top:1px solid var(--line);
 margin-top:3.5rem;max-width:78rem;margin-left:auto;margin-right:auto}
@media (min-width:720px){footer{padding-left:1.5rem;padding-right:1.5rem}}
