/*
Theme Name: WP Beacon
Theme URI: https://wpbeacon.io
Author: Austin Ginder
Description: Public explorer for WordPress.org plugin supply-chain data collected by the WP Beacon plugin.
Version: 0.2.0
Requires at least: 6.5
Requires PHP: 8.1
License: Proprietary
Text Domain: wpbeacon
*/

:root {
	/* Paper / surface */
	--paper:       #f4ead3;
	--paper-2:     #ece0c3;
	--paper-3:     #e0d2af;
	--paper-card:  #fffdf8;
	--paper-rule:  #c9b88f;
	--paper-soft:  #d8c79e;

	/* Ink */
	--ink:         #1b2a36;
	--ink-2:       #2f4457;
	--ink-soft:    #4b637a;
	--muted:       #7d8e9d;
	--faint:       #a7b4bf;

	/* Signal ink */
	--signal:      #c4422c;
	--signal-deep: #8a2614;
	--warm:        #a8701f;
	--harbor:      #235d82;
	--kelp:        #3f6a4a;
	--lantern:     #f8d97a;
	--sun-warm:    #f2bb6a;

	/* Typography */
	--sans:  "Albert Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	--serif: "Young Serif", Georgia, "Times New Roman", serif;
	--mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

	/* Severity (kept backward-compatible names) */
	--sev-info:     var(--muted);
	--sev-low:      var(--kelp);
	--sev-medium:   var(--warm);
	--sev-high:     var(--signal);
	--sev-critical: var(--signal-deep);

	--radius: 10px;
	--radius-sm: 6px;
	--shadow: 0 1px 2px rgba(27, 42, 54, 0.04);
	--shadow-raised: 0 8px 22px rgba(27, 42, 54, 0.08);

	--maxw: 1180px;
	--gutter: clamp(1rem, 2vw, 1.8rem);
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-weight: 400;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--harbor);
	text-decoration: underline;
	text-decoration-color: rgba(35, 93, 130, 0.28);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color 140ms ease, text-decoration-color 140ms ease;
}
a:hover {
	color: var(--signal);
	text-decoration-color: var(--signal);
}
a.plain, a.plain:hover { text-decoration: none; }

h1, h2, h3, h4 {
	font-family: var(--serif);
	font-weight: 400;
	letter-spacing: -0.01em;
	color: var(--ink);
	margin: 0 0 0.5em;
	line-height: 1.2;
}
h1 { font-size: 2.2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
h2 em, h1 em { font-style: italic; color: var(--harbor); font-weight: 400; }

p { margin: 0 0 1em; }

code, pre, .mono {
	font-family: var(--mono);
	font-size: 0.92em;
}

/* Generic muted utility — used outside tables too (e.g. search, plugin detail). */
.muted { color: var(--muted); }

/* ============ Header / nav ============ */
.site-header {
	border-bottom: 1px solid var(--paper-rule);
	background: var(--paper);
	position: sticky;
	top: 0;
	z-index: 50;
}
.site-header-inner {
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 1rem var(--gutter);
	display: flex;
	align-items: center;
	gap: 1.8rem;
	flex-wrap: wrap;
}

/* Brand: WP Beacon with the bulb-in-corona mark */
.site-title {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	font-family: var(--serif);
	font-size: 1.2rem;
	color: var(--ink);
	text-decoration: none;
	letter-spacing: -0.005em;
}
.site-title .mark {
	width: 22px;
	height: 22px;
	display: inline-block;
	background: radial-gradient(circle at center, var(--signal) 0%, var(--signal) 30%, transparent 70%);
	border-radius: 50%;
	position: relative;
	box-shadow: 0 0 14px rgba(196, 66, 44, 0.38);
	flex-shrink: 0;
}
.site-title .mark::before {
	content: "";
	position: absolute;
	inset: 7px;
	background: var(--lantern);
	border-radius: 50%;
}
/* Backward compatible: old markup used a .beacon span */
.site-title .beacon {
	color: var(--signal);
	font-style: italic;
}

.site-nav {
	display: flex;
	gap: 1.5rem;
	font-family: var(--sans);
	font-size: 0.92rem;
	flex-wrap: wrap;
}
.site-nav a {
	color: var(--ink-soft);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	padding: 0.3rem 0;
	transition: color 140ms ease, border-color 140ms ease;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--signal); }
.site-nav a.active { color: var(--ink); font-weight: 500; border-bottom-color: var(--signal); }

/* Small red tally (event count) on nav items */
.site-nav a .tally,
.site-nav a .pill {
	display: inline-block;
	margin-left: 0.35rem;
	padding: 0 0.4rem;
	background: var(--signal);
	color: #fff;
	font-family: var(--mono);
	font-size: 0.68rem;
	font-weight: 500;
	border-radius: 99px;
	vertical-align: 1px;
	letter-spacing: 0.02em;
	border: none;
	text-transform: none;
}

.site-search {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.4rem 0.7rem;
	border: 1px solid var(--paper-rule);
	background: rgba(255, 253, 248, 0.5);
	border-radius: 99px;
	font-family: var(--mono);
	font-size: 0.78rem;
	color: var(--muted);
}
.site-search:focus-within {
	border-color: var(--harbor);
	background: var(--paper-card);
}
.site-search input {
	border: none;
	background: transparent;
	outline: none;
	font-family: var(--mono);
	font-size: 0.82rem;
	color: var(--ink);
	width: 220px;
}
.site-search input::placeholder { color: var(--faint); }

/* ============ Layout ============ */
.container {
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 2.2rem var(--gutter);
}

/* Page intro (replaces the marketing hero). Simple heading + supporting sentence. */
.page-head {
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 2.8rem var(--gutter) 1.6rem;
}
.page-head h1 {
	font-family: var(--serif);
	font-size: clamp(2rem, 4.2vw, 2.8rem);
	margin: 0 0 0.4rem;
	color: var(--ink);
	letter-spacing: -0.015em;
	line-height: 1.08;
}
.page-head h1 em { font-style: italic; color: var(--harbor); }
.page-head p {
	color: var(--ink-soft);
	font-size: 1.02rem;
	max-width: 62ch;
	margin: 0;
}

/* Section chrome — reusable for any list/table block on the page. */
.section {
	margin: 2.4rem 0;
}
.section-head {
	display: flex;
	align-items: baseline;
	gap: 1rem;
	margin-bottom: 1.2rem;
	flex-wrap: wrap;
}
.section-head h2 {
	font-family: var(--serif);
	font-size: 1.55rem;
	color: var(--ink);
	margin: 0;
	letter-spacing: -0.01em;
}
.section-head .sub,
.section-head p.sub {
	font-family: var(--sans);
	font-style: italic;
	color: var(--ink-soft);
	font-size: 0.98rem;
	margin: 0;
}
.section-head .see-all,
.section-head .more {
	margin-left: auto;
	font-family: var(--mono);
	font-size: 0.78rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--harbor);
	text-decoration: none;
}
.section-head .see-all:hover,
.section-head .more a:hover { color: var(--signal); }
.section-desc {
	color: var(--ink-soft);
	margin: -0.4rem 0 1rem;
	font-size: 0.95rem;
	max-width: 70ch;
	line-height: 1.6;
}

/* ============ Stats cards ============ */
.stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
	margin: 1.6rem 0 2.4rem;
}
.stat {
	position: relative;
	display: block;
	padding: 1.3rem 1.3rem 1.35rem;
	background: rgba(255, 253, 248, 0.7);
	border: 1px solid var(--paper-rule);
	border-radius: 14px;
	overflow: hidden;
	transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
a.stat {
	color: inherit;
	text-decoration: none;
}
.stat:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-raised);
	border-color: var(--harbor);
}
a.stat:focus-visible {
	outline: 2px solid var(--harbor);
	outline-offset: 2px;
}
.stat-label {
	font-family: var(--mono);
	font-size: 0.7rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: 0.9rem;
}
.stat-value {
	font-family: var(--serif);
	font-weight: 400;
	font-size: 2.3rem;
	line-height: 1;
	color: var(--ink);
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
}
.stat-value .u {
	font-size: 0.55em;
	color: var(--muted);
	margin-left: 0.25rem;
	font-family: var(--sans);
	letter-spacing: 0.02em;
}
.stat-sub {
	margin-top: 0.6rem;
	font-family: var(--sans);
	font-size: 0.82rem;
	color: var(--ink-soft);
}
/* Alert-state stat card — used when "open alerts" is non-zero */
.stat.alert,
.stat--alert {
	background: linear-gradient(180deg, rgba(196, 66, 44, 0.09), rgba(255, 253, 248, 0.6));
	border-color: rgba(196, 66, 44, 0.35);
}
.stat.alert .stat-value,
.stat--alert .stat-value { color: var(--signal); }
.stat.alert .stat-sub,
.stat--alert .stat-sub { color: var(--signal); font-weight: 500; }
/* Wave accent at the bottom of a stat (optional decorative element) */
.stat .wave {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 26px;
	opacity: 0.5;
	pointer-events: none;
}
.stat .wave svg { width: 100%; height: 100%; display: block; }

/* ============ Dispatch rows (recent alerts / events) ============ */
.dispatches { margin-top: 0; }
.dispatch {
	display: grid;
	grid-template-columns: 20px 140px 1fr auto;
	gap: 1.4rem;
	padding: 1.1rem 0;
	align-items: baseline;
	border-bottom: 1px solid var(--paper-rule);
	position: relative;
	transition: background 140ms ease;
}
.dispatch:first-child { border-top: 1px solid var(--paper-rule); }
.dispatch:hover { background: rgba(255, 253, 248, 0.55); }
.dispatch:hover .dispatch-title a { color: var(--signal); }

.dispatch .flag {
	width: 14px;
	height: 24px;
	border-radius: 2px;
	position: relative;
	top: 2px;
	background: var(--muted);
}
.dispatch .flag::after {
	content: "";
	position: absolute;
	left: 0; top: 100%;
	width: 1px; height: 14px;
	background: var(--muted);
}
.dispatch.sev-critical .flag { background: var(--signal); }
.dispatch.sev-high .flag     { background: var(--signal); opacity: 0.65; }
.dispatch.sev-medium .flag   { background: var(--warm); }
.dispatch.sev-low .flag      { background: var(--kelp); }
.dispatch.sev-info .flag     { background: var(--muted); }

.dispatch .when {
	font-family: var(--mono);
	font-size: 0.78rem;
	color: var(--ink);
	font-variant-numeric: tabular-nums;
}
.dispatch .when small {
	display: block;
	font-family: var(--sans);
	font-size: 0.72rem;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-top: 2px;
	font-weight: 500;
}

.dispatch .body { min-width: 0; }
.dispatch-title,
.dispatch .body h3 {
	font-family: var(--serif);
	font-weight: 400;
	font-size: 1.18rem;
	line-height: 1.3;
	letter-spacing: -0.005em;
	margin: 0 0 0.4rem;
	color: var(--ink);
}
.dispatch-title a {
	color: inherit;
	text-decoration: none;
	transition: color 140ms ease;
}
.dispatch-title em,
.dispatch .body h3 em {
	font-style: italic;
	color: var(--signal);
}
.dispatch .detail {
	font-family: var(--sans);
	font-size: 0.92rem;
	color: var(--ink-soft);
	line-height: 1.55;
	max-width: 72ch;
}
.dispatch .detail code {
	font-family: var(--mono);
	font-size: 0.86em;
	color: var(--ink);
	background: var(--paper-2);
	padding: 1px 5px;
	border-radius: 4px;
}
.dispatch .detail .n { color: var(--ink); font-weight: 600; }
.dispatch .detail .arrow,
.dispatch .detail .ar { color: var(--signal); font-weight: 600; padding: 0 0.2rem; }

.dispatch .rule {
	font-family: var(--mono);
	font-size: 0.7rem;
	letter-spacing: 0.08em;
	color: var(--muted);
	text-align: right;
	white-space: nowrap;
}
.dispatch .rule .sev {
	display: block;
	margin-bottom: 0.25rem;
	font-size: 0.68rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	font-weight: 600;
}
.dispatch.sev-critical .rule .sev { color: var(--signal); }
.dispatch.sev-high .rule .sev     { color: var(--signal); opacity: 0.75; }
.dispatch.sev-medium .rule .sev   { color: var(--warm); }
.dispatch.sev-low .rule .sev      { color: var(--kelp); }
.dispatch.sev-info .rule .sev     { color: var(--muted); }

/* ============ Event cards (plugin detail view keeps this component) ============ */
.event-card {
	border: 1px solid var(--paper-rule);
	border-radius: var(--radius);
	padding: 1rem 1.1rem;
	margin-bottom: 0.7rem;
	background: var(--paper-card);
	transition: border-color 140ms ease, transform 140ms ease;
}
.event-card:hover { border-color: var(--harbor); }
.event-card.is-resolved {
	opacity: 0.72;
	background: var(--paper-2);
}
.event-card.is-resolved:hover { opacity: 1; }

/* Stretched-link variant: the whole card becomes a click target for the
   primary anchor (.event-card-link) without breaking nested inline links.
   The anchor's ::after pseudo-element overlays the card; sibling anchors
   sit above it via z-index so they remain individually clickable. */
.event-card--linked { position: relative; cursor: pointer; }
.event-card--linked .event-card-link::after {
	content: "";
	position: absolute;
	inset: 0;
}
.event-card--linked a:not(.event-card-link) {
	position: relative;
	z-index: 1;
}

/* Collapsible container for resolved events on plugin / author pages */
.resolved-events {
	margin-top: 0.6rem;
}
.resolved-events > summary {
	cursor: pointer;
	display: inline-block;
	padding: 0.4rem 0.2rem 0.7rem;
	font-family: var(--mono);
	font-size: 0.78rem;
	letter-spacing: 0.04em;
	color: var(--muted);
	list-style: none;
}
.resolved-events > summary::-webkit-details-marker { display: none; }
.resolved-events > summary::before {
	content: "▸ ";
	display: inline-block;
}
.resolved-events[open] > summary::before { content: "▾ "; }
.resolved-events > summary:hover { color: var(--ink-2); }
.event-card .event-head {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	flex-wrap: wrap;
	font-family: var(--sans);
	font-size: 0.88rem;
}
.event-card .event-rule {
	font-family: var(--mono);
	font-size: 0.82rem;
	color: var(--muted);
}
.event-card .event-time {
	margin-left: auto;
	color: var(--muted);
	font-family: var(--mono);
	font-size: 0.76rem;
	letter-spacing: 0.02em;
}
.event-card .event-body {
	margin-top: 0.5rem;
	color: var(--ink-2);
	font-size: 0.94rem;
	line-height: 1.55;
}
.event-card .event-details {
	margin-top: 0.7rem;
	padding: 0.7rem 0.8rem;
	background: var(--paper-2);
	border: 1px solid var(--paper-rule);
	border-radius: var(--radius-sm);
	font-family: var(--mono);
	font-size: 0.8rem;
	color: var(--ink-2);
	white-space: pre-wrap;
	word-break: break-all;
	line-height: 1.55;
}

/* ============ Event detail info table ============ */
.event-detail-wrap {
	margin-top: 0.7rem;
}
.event-detail-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.88rem;
	line-height: 1.5;
}
.event-detail-table th,
.event-detail-table td {
	text-align: left;
	vertical-align: top;
	padding: 0.35rem 0.7rem 0.35rem 0;
	border-bottom: 1px dashed var(--paper-rule);
}
.event-detail-table > tbody > tr:last-child > th,
.event-detail-table > tbody > tr:last-child > td {
	border-bottom: 0;
}
.event-detail-table th {
	width: 11rem;
	white-space: nowrap;
	font-family: var(--sans);
	font-weight: 500;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 0.72rem;
	padding-top: 0.5rem;
}
.event-detail-table td code {
	font-size: 0.82rem;
}
.event-detail-table .mono {
	font-family: var(--mono);
	font-size: 0.82rem;
	color: var(--ink-2);
}
.event-detail-table .tag-list {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.3rem;
}
.event-detail-table .tag-list .tag {
	font-size: 0.78rem;
}
.event-detail-nested {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.82rem;
	background: var(--paper-2);
	border: 1px solid var(--paper-rule);
	border-radius: var(--radius-sm);
	overflow: hidden;
}
.event-detail-nested th,
.event-detail-nested td {
	text-align: left;
	padding: 0.3rem 0.55rem;
	border-bottom: 1px solid var(--paper-rule);
	vertical-align: top;
}
.event-detail-nested thead th {
	font-family: var(--sans);
	font-weight: 500;
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--muted);
	background: rgba(0, 0, 0, 0.02);
}
.event-detail-nested tbody tr:last-child th,
.event-detail-nested tbody tr:last-child td {
	border-bottom: 0;
}
.event-detail-nested-kv {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 0.2rem 0.7rem;
	margin: 0;
}
.event-detail-nested-kv dt {
	font-family: var(--sans);
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--muted);
	padding-top: 0.1rem;
}
.event-detail-nested-kv dd { margin: 0; font-size: 0.85rem; }

/* Raw JSON collapsible + copy button */
.event-detail-raw {
	position: relative;
	margin-top: 0.6rem;
}
.event-detail-raw details > summary {
	cursor: pointer;
	display: inline-block;
	font-family: var(--mono);
	font-size: 0.76rem;
	color: var(--muted);
	letter-spacing: 0.02em;
	padding: 0.3rem 0.1rem;
	list-style: none;
}
.event-detail-raw details > summary::-webkit-details-marker { display: none; }
.event-detail-raw details > summary::before {
	content: "▸ ";
	display: inline-block;
	transition: transform 120ms ease;
}
.event-detail-raw details[open] > summary::before { content: "▾ "; }
.event-detail-raw details > summary:hover { color: var(--ink-2); }
.event-detail-raw .copy-json {
	position: absolute;
	top: 0;
	right: 0;
	font-family: var(--mono);
	font-size: 0.72rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 0.3rem 0.6rem;
	background: var(--paper-2);
	border: 1px solid var(--paper-rule);
	border-radius: var(--radius-sm);
	color: var(--muted);
	cursor: pointer;
	transition: color 120ms ease, border-color 120ms ease, background 120ms ease;
}
.event-detail-raw .copy-json:hover {
	color: var(--ink);
	border-color: var(--harbor);
}
.event-detail-raw .copy-json.copied {
	color: var(--signal);
	border-color: var(--signal);
}

/* ============ Audit summary teaser on plugin pages ============ */
.audit-summary-teaser {
	margin-top: 0.5rem;
	color: var(--ink-2);
	font-size: 0.95rem;
	line-height: 1.55;
}
.audit-summary-teaser > p { margin: 0.4rem 0 0 0; }
.audit-summary-teaser .audit-summary-more {
	margin-top: 0.4rem;
	font-size: 0.85rem;
}
.audit-summary-teaser .audit-summary-more a {
	font-family: var(--sans);
	color: var(--harbor);
	text-decoration: none;
}
.audit-summary-teaser .audit-summary-more a:hover { text-decoration: underline; }

/* ============ Audit explainer callout ============ */
.audit-explainer {
	margin: 1rem 0 1.6rem;
	padding: 0.8rem 1.3rem;
	background: var(--paper-2);
	border: 1px solid var(--paper-rule);
	border-left: 4px solid var(--harbor, #c25c2d);
	border-radius: var(--radius);
	font-size: 0.95rem;
	line-height: 1.6;
}
details.audit-explainer > summary {
	cursor: pointer;
	font-weight: 500;
	color: var(--ink-2);
	font-size: 0.9rem;
	list-style: none;
	padding: 0.2rem 0;
	user-select: none;
}
details.audit-explainer > summary::-webkit-details-marker {
	display: none;
}
details.audit-explainer > summary::before {
	content: '▸';
	display: inline-block;
	margin-right: 0.5rem;
	transition: transform 0.15s ease;
	color: var(--harbor, #c25c2d);
}
details.audit-explainer[open] > summary::before {
	transform: rotate(90deg);
}
details.audit-explainer[open] {
	padding-bottom: 1.1rem;
}
details.audit-explainer[open] > summary {
	margin-bottom: 0.5rem;
	border-bottom: 1px solid var(--paper-rule);
	padding-bottom: 0.6rem;
}
.audit-explainer p {
	margin: 0 0 0.7rem;
}
.audit-explainer p:last-child {
	margin-bottom: 0;
}
.audit-explainer ul.audit-list {
	margin: 0.2rem 0 0.7rem 1.2rem;
	padding: 0;
	list-style: disc;
}
.audit-explainer ul.audit-list li {
	margin: 0.2rem 0;
	line-height: 1.55;
}
.audit-explainer strong {
	color: var(--ink, inherit);
}
.audit-explainer code {
	background: var(--paper, #fff);
	padding: 0.05rem 0.35rem;
	border: 1px solid var(--paper-rule);
	border-radius: 3px;
	font-size: 0.88em;
}

/* ============ Audit report rendering ============ */
.audit-report {
	margin-top: 1.4rem;
}
.audit-report h2 { margin-top: 1.8rem; font-size: 1.25rem; }
.audit-report h3 { margin-top: 1.4rem; font-size: 1.05rem; color: var(--ink-2); }
.audit-report h4 { margin-top: 1rem; font-size: 0.95rem; color: var(--ink-2); }
.audit-report ul.audit-list {
	margin: 0.5rem 0 0.8rem 1.2rem;
	padding: 0;
	list-style: disc;
}
.audit-report ul.audit-list li {
	margin: 0.2rem 0;
	font-size: 0.92rem;
	line-height: 1.5;
}
.audit-report p {
	margin: 0.6rem 0;
	line-height: 1.6;
}
.audit-report blockquote {
	border-left: 3px solid var(--paper-rule);
	padding: 0.2rem 0.8rem;
	margin: 0.6rem 0;
	color: var(--muted, #888);
	font-size: 0.9rem;
}
.audit-report pre {
	background: var(--paper-2);
	border: 1px solid var(--paper-rule);
	border-radius: var(--radius-sm);
	padding: 0.7rem 0.9rem;
	font-family: var(--mono);
	font-size: 0.78rem;
	line-height: 1.5;
	overflow-x: auto;
	max-height: 600px;
	overflow-y: auto;
}
.audit-report pre.lang-diff code {
	display: block;
}
.audit-report pre code {
	background: transparent;
	padding: 0;
	border: 0;
	white-space: pre;
}
/* Minimal diff coloring — works because we preserve the raw `+`/`-` line prefixes. */
.audit-report pre.lang-diff {
	color: var(--ink-2);
}

/* ============ Audit page — stakes callout + audience CTAs + footer ============ */
.audit-stakes {
	display: flex;
	gap: 0.9rem;
	align-items: flex-start;
	padding: 1rem 1.15rem;
	border-radius: var(--radius);
	margin: 0 0 1.4rem;
	border: 1px solid var(--paper-rule);
	background: rgba(255, 253, 248, 0.55);
}
.audit-stakes-emoji {
	font-size: 1.4rem;
	line-height: 1.4;
}
.audit-stakes strong {
	font-size: 1.02rem;
}
.audit-stakes p {
	color: var(--ink-2);
	font-size: 0.94rem;
}
.audit-stakes.stakes-active {
	background: #fef2f2;
	border-color: #fca5a5;
}
.audit-stakes.stakes-suspicious {
	background: #fffbeb;
	border-color: #fcd34d;
}
.audit-stakes.stakes-cleaned {
	background: #ecfdf5;
	border-color: #6ee7b7;
}
.audit-stakes.stakes-benign {
	background: #f0f9ff;
	border-color: #93c5fd;
}
.audit-stakes.stakes-progress {
	background: rgba(236, 224, 195, 0.4);
}

.audit-cta-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	margin: 0 0 1.6rem;
}
@media (max-width: 720px) {
	.audit-cta-grid {
		grid-template-columns: 1fr;
	}
}
.audit-cta-card {
	border: 1px solid var(--paper-rule);
	border-radius: var(--radius);
	padding: 1rem 1.1rem;
	background: rgba(255, 253, 248, 0.55);
	display: flex;
	flex-direction: column;
}
.audit-cta-card.cta-site-owner {
	border-top: 3px solid #ef4444;
}
.audit-cta-card.cta-author {
	border-top: 3px solid #2563eb;
}
.audit-cta-card h3 {
	font-size: 1rem;
	margin: 0 0 0.7rem;
	font-weight: 600;
}
.audit-cta-card p,
.audit-cta-card li {
	font-size: 0.92rem;
	line-height: 1.5;
	margin: 0.5rem 0;
}
.audit-cta-card p.cta-step {
	margin-top: 0.85rem;
	color: var(--ink-2);
}
.audit-cta-card p.cta-step:first-of-type {
	margin-top: 0;
}
.audit-cta-card pre.cta-code {
	background: #1e293b;
	color: #f8fafc;
	padding: 0.7rem 0.85rem;
	border-radius: 6px;
	font-size: 0.82rem;
	line-height: 1.45;
	overflow-x: auto;
	margin: 0.4rem 0 0.6rem;
	font-family: var(--mono);
}
.audit-cta-card pre.cta-code code {
	background: transparent;
	color: inherit;
	padding: 0;
	font-family: inherit;
}
.audit-cta-card .cta-note {
	font-size: 0.85rem;
	color: var(--muted);
	margin-top: 0.4rem;
}
.audit-cta-card .cta-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
	margin: 0.5rem 0 0.4rem;
}
.audit-cta-card .cta-actions .button-primary {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.55rem 0.95rem;
	background: #ef4444;
	color: #fff;
	border: 1px solid #b91c1c;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9rem;
	transition: background 0.15s ease;
}
.audit-cta-card .cta-actions .button-primary:hover,
.audit-cta-card .cta-actions .button-primary:focus {
	background: #dc2626;
	text-decoration: none;
}
.audit-cta-card .cta-actions-meta {
	font-size: 0.85rem;
}
.audit-cta-card ol,
.audit-cta-card ul {
	padding-left: 1.2rem;
	margin: 0.5rem 0;
}
.audit-cta-card ol li,
.audit-cta-card ul li {
	margin-bottom: 0.4rem;
}
.audit-cta-card code {
	font-size: 0.85em;
}

.audit-footer {
	margin-top: 2rem;
	padding-top: 1.2rem;
	border-top: 1px solid var(--paper-rule);
	font-size: 0.88rem;
}
.audit-footer p {
	margin: 0;
	color: var(--muted);
}

/* ============ Audit page — IOCs table ============ */
.audit-iocs {
	margin-bottom: 1.6rem;
}
.audit-iocs h2 {
	margin: 0 0 0.7rem;
	font-size: 1.1rem;
}
.audit-iocs .table-wrap {
	margin: 0;
}
.audit-iocs .ioc-col-kind { width: 11rem; }
.audit-iocs .ioc-col-conf { width: 8rem; }
.audit-iocs td.ioc-kind {
	font-family: var(--mono);
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.audit-iocs td.ioc-value code {
	font-family: var(--mono);
	font-size: 0.85rem;
	background: rgba(0, 0, 0, 0.04);
	padding: 0.1rem 0.4rem;
	border: 1px solid var(--paper-rule);
	border-radius: 3px;
	color: var(--ink);
	word-break: break-all;
}
.audit-iocs td.ioc-conf {
	white-space: nowrap;
}

/* ============ Audit page — sibling-plugin blast-radius chart ============ */
.audit-blast-radius {
	margin: 0 0 1.6rem;
	padding: 1rem 1.2rem;
	border: 1px solid var(--paper-rule);
	border-radius: var(--radius);
	background: rgba(255, 253, 248, 0.55);
}
.audit-blast-radius h2 {
	margin: 0 0 0.4rem;
	font-size: 1.1rem;
}
.blast-summary {
	margin: 0 0 1rem;
	font-size: 0.92rem;
	line-height: 1.55;
}
.blast-chart {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
}
.blast-bar-row {
	display: grid;
	grid-template-columns: minmax(220px, 0.5fr) 1fr;
	gap: 1rem;
	align-items: center;
}
@media (max-width: 720px) {
	.blast-bar-row {
		grid-template-columns: 1fr;
		gap: 0.25rem;
	}
}
.blast-bar-label {
	font-size: 0.88rem;
	line-height: 1.35;
}
.blast-bar-label .muted {
	display: block;
	font-size: 0.78rem;
}
.blast-bar-track {
	height: 26px;
	background: var(--paper-2, rgba(236, 224, 195, 0.4));
	border-radius: 4px;
	overflow: hidden;
	position: relative;
}
.blast-bar {
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding-right: 0.6rem;
	color: #fff;
	font-size: 0.78rem;
	font-weight: 600;
	border-radius: 4px;
	transition: width 0.25s ease;
	min-width: 30px;
}
.blast-bar.bar-red {
	background: linear-gradient(90deg, #b91c1c 0%, #ef4444 100%);
}
.blast-bar.bar-orange {
	background: linear-gradient(90deg, #c2410c 0%, #f97316 100%);
}
.blast-bar.bar-yellow {
	background: linear-gradient(90deg, #a16207 0%, #eab308 100%);
}
.blast-bar.bar-grey {
	background: linear-gradient(90deg, #64748b 0%, #94a3b8 100%);
}
.blast-bar-installs {
	white-space: nowrap;
}

/* ============ Audit page — visual timeline ============ */
.audit-timeline {
	margin: 1.6rem 0;
}
.audit-timeline h2 {
	margin: 0 0 0.9rem;
	font-size: 1.2rem;
}
.timeline-list {
	list-style: none;
	padding: 0 0 0 0.4rem;
	margin: 0;
	position: relative;
}
/* The vertical connector — sized to start at the first dot's vertical center
   and end at the last dot's vertical center, so no stub peeks above the
   first item or below the last. */
.timeline-list::before {
	content: '';
	position: absolute;
	left: 8px;
	top: calc(0.5rem + 0.85rem + 6px);
	bottom: calc(0.5rem + 0.85rem + 6px);
	width: 2px;
	background: var(--paper-rule);
	z-index: 0;
}
.timeline-item {
	position: relative;
	padding: 0.5rem 0 0.5rem 1.4rem;
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 0.9rem;
	align-items: baseline;
}
.timeline-item::before {
	content: '';
	position: absolute;
	left: -5px;
	top: 0.85rem;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #94a3b8;
	border: 2px solid var(--paper, #fff);
	z-index: 1;
}
.timeline-item.severity-orange::before {
	background: #f97316;
}
.timeline-item.severity-red::before {
	background: #ef4444;
	box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}
.timeline-date {
	font-family: var(--mono);
	font-size: 0.82rem;
	color: var(--muted);
	white-space: nowrap;
}
.timeline-item.severity-red .timeline-date {
	color: #b91c1c;
	font-weight: 600;
}
.timeline-item.severity-orange .timeline-date {
	color: #c2410c;
}
.timeline-text {
	font-size: 0.92rem;
	line-height: 1.5;
}
.timeline-text code {
	font-size: 0.85em;
	padding: 0.05rem 0.3rem;
	background: var(--paper-2, rgba(236, 224, 195, 0.4));
	border-radius: 3px;
}
@media (max-width: 720px) {
	.timeline-item {
		grid-template-columns: 1fr;
		gap: 0.2rem;
	}
}

/* ============ Audit page — version history ============ */
.audit-version-timeline {
	margin: 1.6rem 0;
}
.audit-version-timeline h2 {
	margin: 0 0 0.4rem;
	font-size: 1.2rem;
}
.audit-version-timeline .section-desc {
	margin: 0 0 0.9rem;
	color: var(--muted);
	font-size: 0.92rem;
	line-height: 1.5;
}
.version-history {
	list-style: none;
	padding: 0;
	margin: 0;
	border-left: 2px solid var(--paper-rule);
}
.version-row {
	position: relative;
	padding: 0.45rem 0 0.45rem 1.1rem;
}
.version-row-body {
	display: grid;
	grid-template-columns: 110px 110px 110px 1fr;
	gap: 0.8rem;
	align-items: baseline;
	font-size: 0.92rem;
}
.version-num {
	font-family: var(--mono);
	font-size: 0.88rem;
	font-weight: 600;
}
.version-date {
	font-family: var(--mono);
	font-size: 0.82rem;
	white-space: nowrap;
}
.version-note {
	font-size: 0.88rem;
}
.version-collapsed > details > summary {
	cursor: pointer;
	font-size: 0.92rem;
	padding: 0.2rem 0;
	color: var(--muted);
}
.version-collapsed > details > summary .pill {
	margin-right: 0.4rem;
}
.version-collapsed-list {
	list-style: none;
	padding: 0.5rem 0 0.2rem 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 0.25rem 1rem;
	font-size: 0.85rem;
}
.version-collapsed-list code {
	margin-right: 0.4rem;
}
.version-window-banner {
	background: rgba(239, 68, 68, 0.08);
	border: 1px solid rgba(239, 68, 68, 0.3);
	border-radius: 6px;
	padding: 0.7rem 0.9rem;
	margin: 0.3rem 0;
}
.version-window-head {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	flex-wrap: wrap;
	margin-bottom: 0.4rem;
}
.version-window-body {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.55;
}
.version-window-body code {
	font-size: 0.85em;
	padding: 0.05rem 0.35rem;
	background: rgba(255, 255, 255, 0.5);
	border-radius: 3px;
	margin: 0 0.1rem;
}
.version-baseline .version-num,
.version-cleanup .version-num,
.version-current .version-num,
.version-compromised_head .version-num,
.version-rescue .version-num {
	font-weight: 700;
}
.version-compromised_head .version-num,
.version-compromised_visible .version-num {
	color: var(--signal, #b91c1c);
}
@media (max-width: 720px) {
	.version-row-body {
		grid-template-columns: 1fr;
		gap: 0.2rem;
	}
}

/* ============ Plugin page — historical audits (de-emphasized) ============ */
.section-historical-audits {
	margin-top: 1rem;
}
.section-historical-audits > details > summary {
	cursor: pointer;
	display: flex;
	align-items: baseline;
	gap: 0.6rem;
	padding: 0.4rem 0;
	list-style: none;
}
.section-historical-audits > details > summary::-webkit-details-marker {
	display: none;
}
.section-historical-audits > details > summary::before {
	content: '▸';
	font-size: 0.75rem;
	color: var(--muted);
	transition: transform 0.15s ease;
	display: inline-block;
}
.section-historical-audits > details[open] > summary::before {
	transform: rotate(90deg);
}
.section-historical-audits h3 {
	margin: 0;
	font-size: 1rem;
	font-weight: 500;
	display: inline;
}
.historical-audit-list {
	list-style: none;
	padding: 0.4rem 0 0 1.4rem;
	margin: 0;
}
.historical-audit-item {
	display: flex;
	align-items: baseline;
	gap: 0.6rem;
	flex-wrap: wrap;
	padding: 0.3rem 0;
	font-size: 0.9rem;
	border-bottom: 1px dashed var(--paper-rule);
}
.historical-audit-item:last-child {
	border-bottom: none;
}

/* ============ Tables ============ */
.table-wrap {
	border: 1px solid var(--paper-rule);
	border-radius: var(--radius);
	overflow: hidden;
	background: rgba(255, 253, 248, 0.5);
	box-shadow: var(--shadow);
}
table.data {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.92rem;
}
table.data th,
table.data td {
	padding: 0.8rem 1rem;
	text-align: left;
	border-bottom: 1px solid var(--paper-rule);
	vertical-align: baseline;
}
table.data th {
	background: rgba(236, 224, 195, 0.55);
	font-family: var(--mono);
	font-weight: 500;
	color: var(--muted);
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.18em;
	border-bottom: 1px solid var(--paper-rule);
}
table.data th a.col-sort {
	color: inherit;
	text-decoration: none;
	border-bottom: none;
	display: inline-block;
	cursor: pointer;
	white-space: nowrap;
}
table.data th a.col-sort:hover { color: var(--ink); }
table.data th a.col-sort.sorted { color: var(--ink); font-weight: 600; }
table.data th .sort-arrow { color: var(--signal); font-size: 0.9em; margin-left: 0.15em; }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: rgba(255, 253, 248, 0.9); }
table.data td.num {
	text-align: right;
	font-variant-numeric: tabular-nums;
	font-family: var(--mono);
	color: var(--ink);
	font-size: 0.88rem;
}
table.data td.rank {
	font-family: var(--serif);
	font-size: 1.1rem;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
	width: 3rem;
}
table.data td.slug {
	font-family: var(--mono);
	font-size: 0.85rem;
	color: var(--ink-soft);
}
table.data td.muted,
table.data .muted {
	color: var(--muted);
	font-family: var(--mono);
	font-size: 0.82rem;
}
/* A name link inside a data row shows in red on hover as a small flourish */
table.data a {
	color: var(--ink);
	text-decoration: none;
}
table.data a:hover {
	color: var(--signal);
	text-decoration: underline;
	text-decoration-color: var(--signal);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

/* ============ Pills ============ */
.pill {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 99px;
	font-family: var(--mono);
	font-size: 0.68rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	border: 1px solid transparent;
	line-height: 1.55;
	text-decoration: none;
}
a.pill:hover { text-decoration: none; }
.pill.closed {
	background: rgba(196, 66, 44, 0.08);
	color: var(--signal);
	border-color: rgba(196, 66, 44, 0.4);
}
.pill.active {
	background: rgba(63, 106, 74, 0.08);
	color: var(--kelp);
	border-color: rgba(63, 106, 74, 0.4);
}
.pill.severity-info {
	background: rgba(125, 142, 157, 0.08);
	color: var(--muted);
	border-color: rgba(125, 142, 157, 0.4);
}
.pill.severity-low {
	background: rgba(63, 106, 74, 0.08);
	color: var(--kelp);
	border-color: rgba(63, 106, 74, 0.4);
}
.pill.severity-medium {
	background: rgba(168, 112, 31, 0.08);
	color: var(--warm);
	border-color: rgba(168, 112, 31, 0.4);
}
.pill.severity-high {
	background: rgba(196, 66, 44, 0.1);
	color: var(--signal);
	border-color: rgba(196, 66, 44, 0.4);
}
.pill.severity-critical {
	background: var(--signal);
	color: #fff;
	border-color: var(--signal);
}

/* ============ Author / plugin detail ============ */
.detail-head {
	display: flex;
	align-items: flex-start;
	gap: 1.5rem;
	margin-bottom: 1.5rem;
	flex-wrap: wrap;
}
.detail-head .detail-title { flex: 1; min-width: 0; }
.detail-head h1 {
	font-family: var(--serif);
	font-size: 2rem;
	margin: 0 0 0.3rem;
	letter-spacing: -0.015em;
}
.detail-head .detail-meta {
	color: var(--ink-soft);
	margin-top: 0.3rem;
	font-size: 0.95rem;
	font-family: var(--sans);
}
.detail-head .detail-meta code {
	font-family: var(--mono);
	font-size: 0.88em;
	color: var(--ink);
	background: var(--paper-2);
	padding: 1px 6px;
	border-radius: 4px;
}
.detail-head .detail-actions {
	color: var(--ink-soft);
	font-size: 0.9rem;
	font-family: var(--mono);
}

.detail-kv {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 0.9rem 2rem;
	padding: 1.2rem 1.3rem;
	background: rgba(255, 253, 248, 0.65);
	border: 1px solid var(--paper-rule);
	border-radius: var(--radius);
	margin-bottom: 1.5rem;
}
.detail-kv dt {
	font-family: var(--mono);
	color: var(--muted);
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.18em;
}
.detail-kv dd {
	margin: 0.2rem 0 0;
	font-family: var(--serif);
	font-size: 1.05rem;
	color: var(--ink);
	letter-spacing: -0.005em;
}
.detail-kv dd.mono,
.detail-kv dd .mono {
	font-family: var(--mono);
	font-size: 0.95rem;
}

/* ============ Pagination ============ */
.pagination {
	display: flex;
	gap: 0.4rem;
	margin-top: 1.4rem;
	justify-content: center;
	font-family: var(--mono);
	font-size: 0.82rem;
}
.pagination a,
.pagination span {
	padding: 0.42rem 0.8rem;
	border: 1px solid var(--paper-rule);
	border-radius: 99px;
	color: var(--ink-soft);
	background: rgba(255, 253, 248, 0.5);
	transition: all 140ms ease;
}
.pagination a { text-decoration: none; }
.pagination a:hover {
	color: var(--ink);
	border-color: var(--harbor);
	background: var(--paper-card);
}
.pagination .current {
	background: var(--ink);
	color: var(--paper);
	border-color: var(--ink);
}

/* ============ Notice ============ */
.notice {
	padding: 0.9rem 1.1rem;
	background: rgba(255, 253, 248, 0.65);
	border: 1px solid var(--paper-rule);
	border-left: 3px solid var(--harbor);
	border-radius: var(--radius-sm);
	font-size: 0.94rem;
	margin: 1rem 0;
	color: var(--ink-2);
}
.notice code {
	font-family: var(--mono);
	color: var(--ink);
	background: var(--paper-2);
	padding: 1px 5px;
	border-radius: 4px;
}
.notice.warning { border-left-color: var(--signal); }
.notice.critical {
	background: rgba(196, 66, 44, 0.06);
	border-color: rgba(196, 66, 44, 0.35);
	border-left-color: var(--signal);
	color: var(--signal-deep);
}
.notice.critical strong { color: var(--signal-deep); }

/* ============ Takeover banner ============ */
.takeover-banner {
	background: var(--ink);
	color: var(--paper);
	border-radius: var(--radius);
	padding: 1.4rem 1.6rem 1.4rem 1.8rem;
	margin: 0 0 1.5rem;
	position: relative;
	overflow: hidden;
	border: 1px solid var(--ink);
}
.takeover-banner::before {
	content: "";
	position: absolute;
	left: 0; top: 0; bottom: 0;
	width: 4px;
	background: var(--signal);
}
.takeover-badge {
	display: inline-block;
	border: 1px solid var(--signal);
	color: var(--signal);
	font-family: var(--mono);
	font-size: 0.68rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.18em;
	padding: 2px 8px;
	border-radius: 99px;
	margin-bottom: 0.7rem;
	background: transparent;
}
.takeover-headline {
	font-family: var(--serif);
	font-size: 1.25rem;
	line-height: 1.4;
	color: #fff;
	margin-bottom: 1rem;
	letter-spacing: -0.005em;
}
.takeover-headline strong {
	color: var(--lantern);
	font-weight: 500;
}
.takeover-meta {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 0.8rem 1.6rem;
	margin: 0 0 1rem;
	padding: 0.9rem 0 0.2rem;
	border-top: 1px solid rgba(248, 217, 122, 0.18);
}
.takeover-meta dt {
	font-family: var(--mono);
	color: rgba(248, 217, 122, 0.8);
	font-size: 0.68rem;
	text-transform: uppercase;
	letter-spacing: 0.18em;
	margin-bottom: 0.25rem;
}
.takeover-meta dd {
	margin: 0;
	color: #fff;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	font-family: var(--mono);
	font-size: 0.95rem;
}
.takeover-note {
	font-size: 0.88rem;
	color: rgba(250, 247, 239, 0.8);
	margin-top: 0.8rem;
	padding-top: 0.8rem;
	border-top: 1px solid rgba(248, 217, 122, 0.18);
	font-family: var(--sans);
}
.takeover-note a {
	color: var(--lantern);
	text-decoration-color: rgba(248, 217, 122, 0.4);
}
.takeover-note a:hover {
	color: #fff;
	text-decoration-color: #fff;
}

/* ============ Footer ============ */
.site-footer {
	background: var(--ink);
	color: #c8d3de;
	margin-top: 4rem;
	padding: 3rem var(--gutter);
	font-family: var(--sans);
	font-size: 0.88rem;
	line-height: 1.65;
	text-align: left;
}
.site-footer .footer-inner {
	max-width: var(--maxw);
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 2.5rem;
	align-items: start;
}
.site-footer h5 {
	font-family: var(--mono);
	font-size: 0.7rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--faint);
	margin: 0 0 0.9rem;
	font-weight: 500;
}
.site-footer .brand-stack {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	margin-bottom: 1rem;
}
.site-footer .brand-stack .mark {
	width: 32px;
	height: 32px;
	display: inline-block;
	background: radial-gradient(circle at center, var(--signal) 0%, var(--signal) 30%, transparent 70%);
	border-radius: 50%;
	position: relative;
	box-shadow: 0 0 20px rgba(196, 66, 44, 0.55);
	flex-shrink: 0;
}
.site-footer .brand-stack .mark::before {
	content: "";
	position: absolute;
	inset: 11px;
	background: var(--lantern);
	border-radius: 50%;
}
.site-footer .brand-stack .name {
	font-family: var(--serif);
	font-size: 1.4rem;
	color: #fff;
}
.site-footer p {
	max-width: 38ch;
	margin: 0 0 1rem;
	color: #a7b4bf;
}
.site-footer p em { color: var(--lantern); font-style: italic; }
.site-footer a {
	color: #d5e0ea;
	text-decoration-color: rgba(213, 224, 234, 0.25);
}
.site-footer a:hover {
	color: var(--lantern);
	text-decoration-color: var(--lantern);
}
.site-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.9rem;
	line-height: 2;
}
.site-footer .coda {
	max-width: var(--maxw);
	margin: 2rem auto 0;
	padding-top: 1.4rem;
	border-top: 1px solid rgba(248, 217, 122, 0.18);
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem;
	font-family: var(--mono);
	font-size: 0.72rem;
	color: #7d8e9d;
	letter-spacing: 0.06em;
}
.site-footer .coda b { color: #fff; font-weight: 500; }
.site-footer .coda .coda-disclaimer {
	margin-left: auto;
	font-family: var(--sans);
	font-size: 0.78rem;
	letter-spacing: normal;
	text-transform: none;
	color: #8a99a7;
}
.site-footer .coda .coda-disclaimer a { color: #d5e0ea; }
@media (max-width: 820px) {
	.site-footer .coda .coda-disclaimer { margin-left: 0; flex-basis: 100%; }
}

/* ============ Small screens ============ */
@media (max-width: 820px) {
	.site-header-inner { gap: 1rem; }
	.site-search { margin-left: 0; order: 10; width: 100%; }
	.site-search input { width: 100%; }
	.dispatch {
		grid-template-columns: 20px 1fr;
		gap: 1rem;
	}
	.dispatch .when,
	.dispatch .rule {
		grid-column: 2;
		font-size: 0.74rem;
	}
	.dispatch .rule {
		text-align: left;
		margin-top: 0.3rem;
	}
	.site-footer .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
	.page-head { padding-top: 2rem; }
	.page-head h1 { font-size: 1.8rem; }
	.site-nav { gap: 1rem; font-size: 0.88rem; }
	.detail-head h1 { font-size: 1.6rem; }
	table.data th:nth-child(n+5),
	table.data td:nth-child(n+5) { display: none; }
}

/* Active-hijacks list on the home page. The card is the whole anchor — entire
 * surface is clickable to the audit detail page. Compact: status pill, plugin
 * + installs, one-line tagline, actor + CTA. Full report lives on /audits/N. */
a.hijack-card {
	display: block;
	border: 1px solid var(--border, #2a2a2a);
	border-left: 4px solid #c0392b;
	border-radius: 6px;
	padding: 0.9rem 1.1rem;
	margin-bottom: 0.7rem;
	background: rgba(192, 57, 43, 0.04);
	color: inherit;
	text-decoration: none;
	transition: background 0.12s ease, transform 0.12s ease;
}
a.hijack-card:hover {
	background: rgba(192, 57, 43, 0.08);
	transform: translateY(-1px);
}
a.hijack-card.hijack-closed {
	border-left-color: #d4892b;
	background: rgba(212, 137, 43, 0.04);
}
a.hijack-card.hijack-closed:hover { background: rgba(212, 137, 43, 0.08); }
.hijack-head {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 0.7rem;
}
.hijack-status {
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 0.18rem 0.5rem;
	border-radius: 3px;
	background: #c0392b;
	color: #fff;
	white-space: nowrap;
}
a.hijack-card.hijack-closed .hijack-status { background: #d4892b; }
.hijack-title {
	font-size: 1.1rem;
	margin: 0;
	font-weight: 600;
}
.hijack-title .muted { font-weight: 400; font-size: 0.88rem; }
.hijack-tagline {
	margin: 0.55rem 0 0.55rem 0;
	font-size: 0.92rem;
	line-height: 1.45;
	color: var(--ink-2, #ccc);
}
.hijack-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.6rem;
	font-size: 0.8rem;
	color: var(--muted, #888);
}
.hijack-actor-line {
	flex: 1 1 60%;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.hijack-cta {
	white-space: nowrap;
	font-weight: 500;
	color: var(--ink-soft, #4b637a);
}
a.hijack-card:hover .hijack-cta { color: var(--signal); }

/* Audit detail page — actor banner + cleanup-instructions section. */
.audit-actor {
	margin: 0.6rem 0 1.2rem 0;
	padding: 0.7rem 0.9rem;
	background: rgba(255, 255, 255, 0.03);
	border-left: 3px solid var(--accent, #888);
	border-radius: 4px;
	font-size: 0.95rem;
}
.audit-cleanup {
	margin: 1.6rem 0;
	padding: 1.1rem 1.3rem;
	background: rgba(212, 137, 43, 0.05);
	border-left: 4px solid #d4892b;
	border-radius: 6px;
}

/* Section spacing on the audit detail page — every block-level section needs
 * vertical breathing room from its predecessor. Without this, the IOCs heading
 * sits flush against the bottom of the Affected plugins table, etc. */
.audit-affected,
.audit-iocs,
section.audit-report {
	margin-top: 2.2rem;
}
.audit-affected h2,
.audit-iocs h2 {
	margin-top: 0;
	margin-bottom: 0.9rem;
}
.audit-affected .section-desc {
	margin: 0 0 1rem 0;
}
.audit-cleanup h2 {
	margin: 0 0 0.7rem 0;
	font-size: 1.15rem;
}
.audit-cleanup p { margin: 0 0 0.6rem 0; line-height: 1.55; }
.audit-cleanup ol,
.audit-cleanup ul { margin: 0.4rem 0 0.6rem 1.4rem; line-height: 1.55; }
.audit-cleanup li { margin-bottom: 0.4rem; }
.audit-cleanup code {
	background: rgba(0, 0, 0, 0.25);
	padding: 0.1rem 0.3rem;
	border-radius: 3px;
	font-size: 0.86em;
}

/* ============ Copy-to-clipboard button on code blocks ============ */
.audit-cta-card pre.cta-code {
	position: relative;
}
.cta-copy-btn {
	position: absolute;
	top: 0.4rem;
	right: 0.4rem;
	background: rgba(255, 255, 255, 0.08);
	color: #cbd5e1;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 4px;
	padding: 0.2rem 0.5rem;
	font-size: 0.72rem;
	font-family: var(--mono);
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.15s ease, background 0.15s ease;
}
.audit-cta-card pre.cta-code:hover .cta-copy-btn,
.cta-copy-btn:focus {
	opacity: 1;
}
.cta-copy-btn:hover {
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
}
.cta-copy-btn.copied {
	background: #22c55e;
	color: #fff;
	border-color: #16a34a;
	opacity: 1;
}

/* ============ Print stylesheet — clean handoff to plugin review team ============ */
@media print {
	/* Hide nav, footer, search, anything interactive */
	.site-nav,
	header.site-header,
	footer.site-footer,
	.site-search,
	form.search-form,
	.cta-copy-btn {
		display: none !important;
	}

	body {
		background: #fff !important;
		color: #000 !important;
		font-size: 10.5pt;
		line-height: 1.45;
	}

	.container {
		max-width: none;
		width: auto;
		margin: 0;
		padding: 0;
	}

	a {
		color: #000;
		text-decoration: none;
	}

	/* Inline link URLs after the link text for traceable hardcopy */
	.audit-explainer a[href]::after,
	.audit-cta-card a[href]::after,
	.audit-blast-radius a[href]::after,
	.audit-timeline a[href]::after,
	.audit-report a[href]::after,
	.audit-footer a[href]::after {
		content: " <" attr(href) ">";
		font-size: 0.85em;
		color: #555;
		word-break: break-all;
	}
	a[href^="#"]::after,
	a[href=""]::after {
		content: "";
	}

	/* Force-expand collapsed details */
	details.audit-explainer,
	details {
		display: block;
	}
	details.audit-explainer > summary,
	details > summary {
		font-weight: 600;
		margin-bottom: 0.4rem;
	}
	details.audit-explainer > summary::before,
	details > summary::before {
		display: none;
	}
	details[open],
	details {
		padding-bottom: 0;
	}

	/* Stakes callout — keep visible but neutralize the colors so it prints clean */
	.audit-stakes {
		border: 1.5px solid #000 !important;
		background: #fff !important;
		page-break-inside: avoid;
		break-inside: avoid;
	}

	/* CTA cards: switch to grayscale, no dark code blocks */
	.audit-cta-grid {
		grid-template-columns: 1fr 1fr !important;
		gap: 0.6rem;
		page-break-inside: avoid;
		break-inside: avoid;
	}
	.audit-cta-card {
		background: #fff !important;
		border: 1px solid #000 !important;
		border-top-width: 3px !important;
		page-break-inside: avoid;
		break-inside: avoid;
	}
	.audit-cta-card pre.cta-code {
		background: #f3f4f6 !important;
		color: #000 !important;
		border: 1px solid #d1d5db;
		font-size: 8pt;
		padding: 0.4rem 0.5rem;
	}
	.audit-cta-card pre.cta-code code {
		color: #000 !important;
		white-space: pre-wrap;
		word-break: break-all;
	}
	.audit-cta-card .cta-actions .button-primary {
		background: #fff !important;
		color: #000 !important;
		border: 1.5px solid #000 !important;
	}

	/* Sibling chart: simplify gradients to solid greyscale */
	.audit-blast-radius {
		background: #fff !important;
		border: 1px solid #000 !important;
		page-break-inside: avoid;
		break-inside: avoid;
	}
	.blast-bar-track {
		background: #e5e7eb !important;
		border: 1px solid #9ca3af;
	}
	.blast-bar.bar-red {
		background: #1f2937 !important;
	}
	.blast-bar.bar-orange,
	.blast-bar.bar-yellow {
		background: #6b7280 !important;
	}
	.blast-bar.bar-grey {
		background: #d1d5db !important;
		color: #000 !important;
	}

	/* Timeline: keep visual structure but in greyscale */
	.audit-timeline {
		page-break-inside: auto;
	}
	.timeline-list {
		border-left-color: #000;
	}
	.timeline-item::before {
		background: #6b7280 !important;
		border-color: #fff !important;
	}
	.timeline-item.severity-red::before {
		background: #000 !important;
		box-shadow: none !important;
	}
	.timeline-item.severity-orange::before {
		background: #4b5563 !important;
	}
	.timeline-item.severity-red .timeline-date,
	.timeline-item.severity-orange .timeline-date {
		color: #000 !important;
	}
	.timeline-item {
		page-break-inside: avoid;
		break-inside: avoid;
	}

	/* IOC table: ensure full width, no banding */
	.data-table {
		font-size: 8.5pt;
	}
	.data-table th,
	.data-table td {
		border: 1px solid #999 !important;
	}

	/* Analyst report: shrink + allow page breaks */
	.audit-report {
		font-size: 9.5pt;
	}
	.audit-report pre {
		background: #f3f4f6 !important;
		color: #000 !important;
		font-size: 8pt;
		page-break-inside: avoid;
		break-inside: avoid;
	}
	.audit-report h2,
	.audit-report h3 {
		page-break-after: avoid;
		break-after: avoid;
	}

	/* Headings: keep with their content */
	h1, h2, h3 {
		page-break-after: avoid;
		break-after: avoid;
	}

	/* Page setup */
	@page {
		margin: 0.6in;
	}
}
