:root { color-scheme: dark; --bg: #0f1115; --fg: #e4e6eb; --muted: #9aa0aa; --line: #262a33; --accent: #7fb4ff; --warn: #e0b050; --cyber: #e65cff; --ai: #7fb4ff; }
* { box-sizing: border-box; }
body { margin: 0; padding: 1.5rem; background: var(--bg); color: var(--fg); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
header, footer { max-width: 70rem; }
h1 { margin: 0 0 .5rem; font-size: 1.6rem; }
a { color: var(--accent); }
.muted, footer { color: var(--muted); font-size: .85rem; }
.notice { color: var(--muted); }
.unverified { color: var(--warn); border: 1px solid var(--warn); border-radius: 3px; padding: 0 .3em; font-size: .75rem; white-space: nowrap; }
.nowrap { white-space: nowrap; }
/* main matches the header and hero width; a table wider than that scrolls inside it, not the page. */
main { max-width: 70rem; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 60rem; }
th, td { text-align: left; vertical-align: top; padding: .6rem .5rem; border-bottom: 1px solid var(--line); }
/* Control IDs never break at their hyphen; a list of them wraps between IDs. */
.ids a { white-space: nowrap; }
/* Incident list: narrow fixed widths (41rem in all) for the nine metadata columns, in smaller type, so the Incident
   column takes the rest of the 70rem page. The table's min-width keeps Incident at least 22rem wide; below that the
   table scrolls inside main. Long unbroken names (package paths, domains) wrap inside their cell instead of widening it. */
.incident-table { table-layout: fixed; min-width: 63rem; }
.incident-table th, .incident-table td { padding: .5rem .3rem; }
.incident-table th { font-size: .75rem; }
.incident-table .cat { letter-spacing: .03em; padding: .1em .45em; }
.incident-table td:not(:nth-child(4)) { font-size: .8rem; line-height: 1.4; }
.incident-table td.wrap { overflow-wrap: anywhere; }
/* Long words in the narrow text columns ("Unauthenticated") hyphenate where the browser can, else break. */
.incident-table td.hyph { hyphens: auto; }
.c-id { width: 3.75rem; } .c-cat { width: 4.5rem; } .c-date { width: 4.75rem; } .c-harm { width: 4.75rem; } .c-rmf { width: 5.75rem; }
.c-sp { width: 4rem; } .c-jcr { width: 4.75rem; } .c-status { width: 4.25rem; } .c-src { width: 4.5rem; }
th { position: sticky; top: 0; background: var(--bg); color: var(--muted); font-weight: 600; font-size: .85rem; }
tbody tr:hover { background: #161a21; }
.linkfail { color: var(--bg); background: var(--warn); border-radius: 3px; padding: 0 .3em; font-size: .75rem; font-weight: 600; white-space: nowrap; }
nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: baseline; max-width: 70rem; margin: 0 0 1.25rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
nav .brand { font-weight: 600; }
nav .links { display: flex; flex-wrap: wrap; gap: 1rem; }
nav a { text-decoration: none; }
nav a:hover { text-decoration: underline; }
nav a[aria-current="page"] { color: var(--fg); border-bottom: 2px solid var(--accent); }
.prose { max-width: 50rem; }
h2 { font-size: 1.2rem; margin: 2rem 0 .5rem; }
h3 { font-size: 1rem; margin: 0 0 .25rem; }
.control { padding: .75rem 0; border-bottom: 1px solid var(--line); scroll-margin-top: 1rem; }
.control:target { background: #161a21; }
.count { color: var(--muted); font-weight: 400; font-size: .8rem; border: 1px solid var(--line); border-radius: 3px; padding: 0 .35em; margin-left: .25rem; }
.incidents { margin: .25rem 0 0; padding-left: 1.2rem; }
.toc { display: flex; flex-wrap: wrap; gap: .25rem .75rem; font-size: .9rem; }
.placeholder { color: var(--warn); border: 1px dashed var(--warn); border-radius: 3px; padding: 0 .3em; font-weight: 600; }
.label { color: var(--muted); border: 1px solid var(--line); border-radius: 3px; padding: 0 .3em; font-size: .75rem; white-space: nowrap; }
.url { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.fields { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; margin: 1rem 0 0; }
.fields dt { color: var(--muted); font-size: .85rem; font-weight: 600; }
.fields dd { margin: 0; }
.sources li { margin-bottom: .6rem; }
.corrections { padding-left: 1.2rem; }
.corrections li { margin-bottom: .6rem; overflow-wrap: anywhere; }
.corrections time { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; white-space: nowrap; margin-right: .4rem; }

/* Category badges: AI incidents in the accent blue, cyber incidents in the cyber hue (site/hero/shared.js CYBER_COLOR). */
.cat { display: inline-flex; align-items: center; gap: .3em; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border-radius: 999px; padding: .1em .6em; white-space: nowrap; border: 1px solid; }
.cat::before { content: ""; width: .5em; height: .5em; background: currentColor; box-shadow: 0 0 6px currentColor; }
.cat-ai { color: var(--ai); border-color: rgba(127, 180, 255, .4); background: rgba(127, 180, 255, .08); }
.cat-ai::before { border-radius: 50%; }
.cat-cyber { color: var(--cyber); border-color: rgba(230, 92, 255, .45); background: rgba(230, 92, 255, .09); }
.cat-cyber::before { transform: rotate(45deg); }
.linked { color: var(--muted); font-size: .8rem; }

/* AI / Cyber / All list filter: a segmented control. Without JS the options are links and :target filters the rows;
   site/filter.js swaps in aria-pressed buttons and removes the .cat-target anchors. */
.cat-target { display: block; height: 0; scroll-margin-top: 4rem; }
.cat-filter { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; max-width: 70rem; margin: 0 0 .75rem; }
.cat-opt { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.25rem; padding: .3rem .9rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .02); color: var(--fg); font: inherit; font-size: .85rem; text-decoration: none; cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s; }
.cat-opt:hover { border-color: var(--accent); }
.cat-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cat-opt .n { color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
.cat-opt[aria-pressed="true"], a.cat-opt[data-cat="all"],
#only-ai:target ~ .cat-filter a.cat-opt[data-cat="ai"], #only-cyber:target ~ .cat-filter a.cat-opt[data-cat="cyber"] { border-color: var(--accent); background: rgba(127, 180, 255, .16); box-shadow: 0 0 14px rgba(127, 180, 255, .25); }
.cat-opt[data-cat="cyber"][aria-pressed="true"], #only-cyber:target ~ .cat-filter a.cat-opt[data-cat="cyber"] { border-color: var(--cyber); background: rgba(230, 92, 255, .14); box-shadow: 0 0 14px rgba(230, 92, 255, .3); }
.cat-target:target ~ .cat-filter a.cat-opt[data-cat="all"] { border-color: var(--line); background: rgba(255, 255, 255, .02); box-shadow: none; }
#only-ai:target ~ main .incident-table tr[data-category="cyber"], #only-cyber:target ~ main .incident-table tr[data-category="ai"], .incident-table tr[hidden] { display: none; }
.cat-count { margin: 0 0 0 .5rem; color: var(--muted); font-size: .8rem; }

/* Incident pages: KEV badge, techniques, correlated incidents. */
code { font: .85em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.kev { display: inline-block; padding: .1em .6em; border-radius: 999px; border: 1px solid var(--line); font-size: .85rem; }
.kev-listed { color: #ffd27a; border-color: rgba(224, 176, 80, .55); background: rgba(224, 176, 80, .1); font-weight: 600; }
.techniques { padding-left: 1.2rem; }
.techniques li { margin-bottom: .3rem; }
.attack-notice { font-size: .75rem; }
.correlated { list-style: none; padding: 0; display: grid; gap: .75rem; }
.corr { position: relative; padding: .75rem 1rem .75rem 1.1rem; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(135deg, rgba(127, 180, 255, .06), rgba(230, 92, 255, .05) 60%, transparent); overflow-wrap: anywhere; }
.corr::before { content: ""; position: absolute; left: 0; top: .75rem; bottom: .75rem; width: 3px; border-radius: 3px; background: linear-gradient(var(--ai), var(--cyber)); }
.corr p { margin: .2rem 0; }
.corr-head { font-weight: 600; }
.ltype { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--cyber); }
.derived { margin-left: .5rem; font-size: .72rem; color: var(--muted); border: 1px dashed var(--line); border-radius: 999px; padding: 0 .5em; }

/* Phones: incident rows become stacked cards with a label per field; other pages just tighten up. */
@media (max-width: 600px) {
  body { padding: 1rem; overflow-wrap: anywhere; }
  main { overflow-x: visible; }
  .incident-table, .incident-table tbody, .incident-table tr, .incident-table td { display: block; width: 100%; min-width: 0; }
  .incident-table thead, .incident-table colgroup { display: none; }
  .incident-table tr { border: 1px solid var(--line); border-radius: 6px; margin-bottom: 1rem; padding: .25rem .75rem; scroll-margin-top: 1rem; }
  .incident-table tr:target { border-color: var(--accent); }
  .incident-table td { border: 0; padding: .35rem 0; }
  .incident-table td::before { content: attr(data-label); display: block; color: var(--muted); font-size: .75rem; font-weight: 600; }
  .incident-table .nowrap { white-space: normal; }
  .fields { grid-template-columns: 1fr; gap: 0; }
  .fields dd { margin-bottom: .6rem; }
  .prose ul, .prose ol { padding-left: 1.2rem; }
}
