:root {
	/* Brand palette */
	--primary: #000000;
	--secondary: #FFFFFF;
	--tertiary: #1f1f1e;
	--accent: #EED200;
	--accent-dark: #eed20096;
	--brPC: 10%;
	--brPX: 8px;

	/* Roles, derived from the palette */
	--bg: var(--tertiary);
	/* Cards and controls sit slightly above the page. */
	--surface: rgb(255 255 255 / 0.05);
	--text: var(--secondary);
	--muted: rgb(255 255 255 / 0.62);
	--border: rgb(255 255 255 / 0.14);
	--link: var(--accent);
	--error: #ff7a6b;
	--success: #7ee2a0;
	--kev-bg: var(--accent);
	--kev-text: var(--primary);
	--sev-critical: #ff6b6b;
	--sev-high: #ff9f43;
	--sev-medium: #f5d76e;
	--sev-low: #8bd17c;
	--sev-none: rgb(255 255 255 / 0.62);
	/* Pill fills: the same colours, darker, so white text on them reads. */
	--pill-critical: #c0392b;
	--pill-high: #b85c12;
	--pill-medium: #977a00;
	--pill-low: #3a8a34;
	--pill-kev: #9c8a00;
	--pill-neutral: rgb(255 255 255 / 0.14);
	--radius: var(--brPX);
	color-scheme: dark;
}

* { box-sizing: border-box; }

[x-cloak], .js .needs-js { display: none !important; }

/* Surfaces: glass, glare, iridescence and tints, from the portfolio's base.css.
   Glass is the frosted base for floating cards and every button; it uses ::before
   and ::after, so anything wearing it must leave those free. Defined early so a
   component's own border-radius, padding and so on still win. `background-color`
   only, never `background`: tints and iridescence layer on as background-image,
   so a panel keeps its glass and gains a colour. */
:root {
	/* The fixed sheen every glass panel wears: light catching the face, brightest top left. */
	--sheen: linear-gradient(135deg, rgb(255 255 255 / 0.10) 0%, rgb(255 255 255 / 0.02) 38%, rgb(255 255 255 / 0) 60%);
	/* The band that crosses a .glare panel on hover: one sweep, left to right. */
	--glare-band: linear-gradient(105deg, transparent 0%, var(--glare-edge) 42%, var(--glare-peak) 50%, var(--glare-edge) 58%, transparent 100%);
	--glare-duration: 0.85s;
	--glare-width: 42%;
	--glare-peak: rgb(255 255 255 / 0.22);
	--glare-edge: rgb(255 255 255 / 0.10);
	--iridescent: linear-gradient(
		135deg,
		rgb(255 200 255 / 0.03),
		rgb(180 220 255 / 0.03),
		rgb(200 255 240 / 0.03),
		rgb(255 220 180 / 0.03)
	);
	/* The accent as a wash, the way the portfolio's tint-yellow washes in yellow. */
	--tint-accent: linear-gradient(260deg, rgba(238, 210, 0, 0.568), rgba(238, 210, 0, 0.384));
	/* The same wash in green, for success, and red, for anything destructive or failed. */
	--tint-success: linear-gradient(260deg, rgba(46, 204, 113, 0.42), rgba(46, 204, 113, 0.26));
	--tint-danger: linear-gradient(260deg, rgba(235, 64, 52, 0.5), rgba(235, 64, 52, 0.32));
}

/* Frosted panel. Read at its rim: a lit top edge, a shadowed bottom one, and a
   hairline that shifts colour across the panel. Buttons wear it too. */
.glass,
button {
	position: relative;
	isolation: isolate;
	border-radius: inherit;
	background-color: rgb(255 255 255 / 0.03);
	backdrop-filter: blur(3px) saturate(125%);
	-webkit-backdrop-filter: blur(3px) saturate(125%);
	box-shadow:
		0 4px 20px rgb(0 0 0 / 0.18),
		inset 0 1px 0 rgb(255 255 255 / 0.28),
		inset 0 -1px 0 rgb(0 0 0 / 0.35);
}

/* The sheen. */
.glass::before,
button::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: inherit;
	pointer-events: none;
	overflow: hidden;
	background-image: var(--sheen);
}

/* The fringe: a one-pixel ring, cool on one side and warm on the other. */
.glass::after,
button::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: inherit;
	padding: 1px;
	pointer-events: none;
	background: linear-gradient(
		135deg,
		rgb(150 225 255 / 0.55) 0%,
		rgb(255 255 255 / 0.28) 28%,
		rgb(255 255 255 / 0.10) 55%,
		rgb(255 190 240 / 0.40) 100%
	);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	mask-composite: exclude;
}

/* .glare: a highlight that crosses the panel once on hover. Must follow .glass::before. */
.glare::before,
button::before {
	background-image: var(--glare-band), var(--sheen);
	background-size: var(--glare-width) 100%, auto;
	background-repeat: no-repeat, no-repeat;
	background-position: -80% 0, 0 0;
}
.glare:hover::before,
.glare:focus-visible::before,
button:hover::before,
button:focus-visible::before {
	background-position: 200% 0, 0 0;
	transition: background-position var(--glare-duration) ease-out;
}
@media (prefers-reduced-motion: reduce) {
	.glare:hover::before,
	.glare:focus-visible::before,
	button:hover::before,
	button:focus-visible::before {
		transition: none;
	}
}

.iridescent { background-image: var(--iridescent); }
.tint-accent { background-image: var(--tint-accent); }
.tint-success { background-image: var(--tint-success); }
.tint-danger { background-image: var(--tint-danger); }

/* Glass buttons turn iridescent on hover; a tinted one keeps its tint underneath. */
.button.glass:hover,
button:hover { background-image: var(--iridescent); }
.button.glass.tint-accent:hover,
button.tint-accent:hover { background-image: var(--iridescent), var(--tint-accent); }
button.tint-success:hover { background-image: var(--iridescent), var(--tint-success); }
button.tint-danger:hover { background-image: var(--iridescent), var(--tint-danger); }

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

body {
	margin: 0;
	background: linear-gradient(0deg, rgb(17, 17, 17), var(--bg));
	color: var(--text);
	font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: 1.75rem; line-height: 1.25; margin: 1.5rem 0 0.75rem; overflow-wrap: anywhere; }
h2 { font-size: 1.15rem; margin: 2rem 0 0.75rem; }

code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }

main { flex: 1; padding-bottom: 3rem; }

/* Header and footer */

/* Same colour as the page; stays at the top while content scrolls under it, lifted by the shadow. */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--bg); box-shadow: 0 2px 25px rgb(0 0 0 / 0.3); }
/* Wider than the content column (.wrap is 960px), but short of the screen edges. */
.header-inner { max-width: 1200px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-top: 2rem; padding-bottom: 1.5rem; }
.brand { display: inline-flex; align-items: center; }
.brand img { display: block; height: 40px; width: auto; }
.site-nav, .nav-group { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; }
.site-nav a { color: var(--muted); padding: 0.35rem 0.75rem; border-radius: var(--radius); transition: background-color 0.2s ease, color 0.2s ease; }
.site-nav a:hover { color: var(--text); text-decoration: none; background-color: var(--surface); }
/* The current section: a soft accent wash behind the link. */
.site-nav a.active { color: var(--text); background-color: rgb(238 210 0 / 0.16); }
.nav-cta { display: none; }
.nav-toggle, .nav-backdrop, .nav-close { display: none; }

/* Narrow screens: the links move into a drawer that slides in from the right, behind a burger
   that turns into a close button. Keep the width in step with DRAWER_QUERY in app.js. */
@media (max-width: 760px) {
	.header-inner { flex-wrap: nowrap; padding-top: 1rem; padding-bottom: 1rem; }
	.brand img { height: 34px; }

	.nav-toggle {
		display: inline-grid;
		place-items: center;
		position: relative;
		z-index: 31;
		width: 2.75rem;
		height: 2.75rem;
		padding: 0;
		flex: none;
	}
	.bars { position: relative; width: 1.25rem; height: 0.9rem; }
	.bars span {
		position: absolute;
		left: 0;
		width: 100%;
		height: 2px;
		border-radius: 2px;
		background: var(--text);
		transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease, top 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
	}
	.bars span:nth-child(1) { top: 0; }
	.bars span:nth-child(2) { top: calc(50% - 1px); }
	.bars span:nth-child(3) { top: calc(100% - 2px); }
	/* While the drawer is open its own close button stands where the burger was. */
	.nav-toggle.open { visibility: hidden; }
	.nav-close {
		display: grid;
		place-items: center;
		position: absolute;
		top: 1rem;
		right: 16px;
		width: 2.75rem;
		height: 2.75rem;
		padding: 0;
		font-size: 1.35rem;
	}
	.nav-toggle.open .bars span:nth-child(1) { top: calc(50% - 1px); transform: rotate(45deg); }
	.nav-toggle.open .bars span:nth-child(2) { opacity: 0; transform: scaleX(0.2); }
	.nav-toggle.open .bars span:nth-child(3) { top: calc(50% - 1px); transform: rotate(-45deg); }

	.site-nav {
		position: fixed;
		z-index: 30;
		top: 0;
		right: 0;
		width: min(82vw, 20rem);
		height: 100vh;
		height: 100dvh;
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: stretch;
		gap: 1.5rem;
		padding: 5.5rem 1.5rem 2rem;
		overflow-y: auto;
		overscroll-behavior: contain;
		background: rgb(31 31 30 / 0.92);
		backdrop-filter: blur(14px) saturate(130%);
		-webkit-backdrop-filter: blur(14px) saturate(130%);
		box-shadow: -12px 0 40px rgb(0 0 0 / 0.45);
		transform: translateX(100%);
		visibility: hidden;
		transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.35s;
	}
	.site-nav.open { transform: none; visibility: visible; transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s; }
	.nav-group { flex-direction: column; align-items: stretch; gap: 0.25rem; }
	.nav-account { padding-top: 1rem; }
	.site-nav a {
		font-size: 1.15rem;
		padding: 0.6rem 0.75rem;
		border-radius: var(--radius);
		opacity: 0;
		transform: translateX(1.5rem);
		transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.2s ease;
	}
	.site-nav a.active { color: var(--text); background-color: rgb(238 210 0 / 0.16); }
	.site-nav a:hover { background-color: var(--surface); }
	/* The links follow the drawer in, one after another. */
	.site-nav.open a { opacity: 1; transform: none; }
	.site-nav.open .nav-group a:nth-child(1) { transition-delay: 0.08s; }
	.site-nav.open .nav-group a:nth-child(2) { transition-delay: 0.12s; }
	.site-nav.open .nav-group a:nth-child(3) { transition-delay: 0.16s; }
	.site-nav.open .nav-account a:nth-child(1) { transition-delay: 0.2s; }
	.site-nav.open .nav-account a:nth-child(2) { transition-delay: 0.24s; }
	.site-nav.open .nav-account a:nth-child(3) { transition-delay: 0.28s; }
	/* In the drawer, icon links show their names. */
	.site-nav .nav-icon .nav-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
	.site-nav .nav-icon .icon { width: 1.15em; height: 1.15em; }
	.nav-cta { display: block; margin-top: 0.5rem; text-align: center; font-weight: 600; color: var(--text) !important; }

	.nav-backdrop {
		display: block;
		position: fixed;
		z-index: 29;
		inset: 0;
		background: rgb(0 0 0 / 0.5);
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.3s ease;
	}
	.nav-backdrop.open { opacity: 1; pointer-events: auto; }
	.nav-open, .nav-open body { overflow: hidden; }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
	.site-nav, .site-nav.open, .site-nav a, .nav-backdrop, .bars span { transition: none !important; }
}

.site-footer { background: rgb(0 0 0 / 0.18); color: var(--muted); font-size: 0.875rem; padding: 3rem 0; margin-top: 30px; }
/* Footer: details on the left, site map on the right; stacked on narrow screens. */
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem 4rem; }
.footer-info p { margin: 0 0 0.75rem; max-width: 36rem; }
.footer-sitemap { display: flex; flex-wrap: wrap; gap: 2rem 3.5rem; }
.footer-sitemap h2 { margin: 0 0 0.75rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); }
.footer-sitemap ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.footer-sitemap a { color: var(--muted); }
.footer-sitemap a:hover { color: var(--text); }
@media (max-width: 640px) {
	.footer-grid { grid-template-columns: 1fr; }
}

/* Text */

.lede { font-size: 1.05rem; color: var(--muted); margin-top: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.capitalise { text-transform: capitalize; }
.crumbs { margin: 1.5rem 0 -0.75rem; font-size: 0.9rem; }
.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.description { white-space: pre-line; overflow-wrap: anywhere; }

/* Long-form pages: App, Privacy policy. */
.prose { max-width: 46rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin: 0.4rem 0; }
.prose .notice { margin-top: 0; }
.prose h3 { font-size: 1rem; margin: 1.25rem 0 0.25rem; }
.prose h3 + p { margin-top: 0; }
.notice { border-radius: var(--radius); padding: 1rem; margin-top: 1.5rem; }
/* Outcome messages on forms: a green panel when it worked, a red one when it didn't. */
.message { border-radius: var(--radius); padding: 0.75rem 1rem; margin: 0; }


.status { color: var(--muted); }
.error { color: var(--error); }

/* Home */

.hero { padding: 1.5rem 0 0.5rem; }
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); line-height: 1.15; max-width: 25ch; margin: 0.5rem 0 0.75rem; }
.hero-title { margin-top: 3rem !important;}
.hero .lede { max-width: 42rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 1.25rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 0.35rem 0.6rem; color: var(--muted); font-size: 0.9rem; }
.hero-stats a { color: var(--muted); }
.hero-stats strong { color: var(--text); }

.button {
	display: inline-flex;
	align-items: center;
	padding: 0.6rem 1.1rem;
	border-radius: var(--radius);
	color: var(--text);
	font-weight: 600;
}
.button:hover { text-decoration: none; }

/* iOS App card, between the header and the latest vulnerabilities. */
.app-card {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin: 2rem 0 0.5rem;
	padding: 1.1rem 1.25rem;
	border-radius: var(--radius);
	color: var(--text);
	transition: ease 0.2s;
}
.app-card:hover { text-decoration: none; scale: 1.02;}
.app-card-icon { width: 5rem; height: 5rem; flex: none; border-radius: 22.37%; } /* iOS's icon corner */
.app-card-body { display: grid; gap: 0.15rem; flex: 1; min-width: 0; }
.app-card-eyebrow { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.app-card-body strong { font-size: 1.1rem; }
.app-card-text { color: var(--muted); }

/* Latest-update banner: the newest data change, refreshed every minute. */
.update-banner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.75rem;
	margin: 1.5rem 0 0;
	padding: 0.6rem 0.9rem;
	border-radius: var(--radius);
	font-size: 0.9rem;
}
.update-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-dark); flex: none; }
.update-label { font-weight: 700; color: var(--text); }
.update-text { flex: 1 1 16rem; min-width: 0; }
.update-ago { color: var(--muted); white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) {
	.update-dot { animation: update-pulse 2s ease-in-out infinite; }
}
@keyframes update-pulse { 50% { box-shadow: 0 0 0 6px transparent; } }


.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem; }

/* Form controls */

input, select, button { font: inherit; color: var(--text); }
input[type="search"], select {
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 0.45rem 0.6rem;
	min-width: 0;
	width: 100%;
}
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

button {
	border: 0;
	border-radius: var(--radius);
	padding: 0.45rem 0.9rem;
	cursor: pointer;
}
button.more { display: block; margin: 1rem auto 0; }
button:disabled { opacity: 0.55; cursor: default; }
button.link { background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0; color: var(--link); }
button.link::before, button.link::after { content: none; }
button.link:hover { background-image: none; text-decoration: underline; }

input[type="email"], input[type="password"], input[type="text"], input[type="number"], input[type="time"] {
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 0.55rem 0.7rem;
	min-width: 0;
	width: 100%;
}
input[type="checkbox"] { accent-color: var(--accent); width: 1.1rem; height: 1.1rem; flex: none; margin: 0.15rem 0 0; }

/* Forms: account pages */
.auth { max-width: 28rem; }
.form { display: grid; gap: 1rem; padding: 1.25rem; border-radius: var(--radius); margin: 1rem 0; }
.form.wide { max-width: 40rem; }
.form h2 { margin: 0; font-size: 1.1rem; }
.form p { margin: 0; }
.field { display: grid; gap: 0.35rem; }
.field > span { font-weight: 600; }
.field small { font-size: 0.8rem; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; }
.check { display: flex; align-items: flex-start; gap: 0.6rem; }
input.code { font: 600 1.5rem/1.2 ui-monospace, monospace; letter-spacing: 0.35em; }
.form button[type="submit"] { justify-self: start; padding: 0.6rem 1.2rem; font-weight: 600; }
.danger h2 { color: var(--error); }
.form h3 { margin: 0.5rem 0 0; font-size: 1rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.stack-add { max-width: 28rem; margin: 1rem 0; }
.row.starred { align-items: center; }


/* Lists */

.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; padding: 0.65rem 0.9rem; border-radius: var(--radius); background-color: var(--surface); }
.row > a:first-child { font-weight: 600; }

.row-date { text-align: right; color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Product rows: the name never truncates; the vendor does if it must. */
.product-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 9rem 14rem;
	align-items: center;
	gap: 0.25rem 1rem;
}
.product-row.no-vendor { grid-template-columns: minmax(0, 1fr) 9rem; }
.product-row.starred { grid-template-columns: 2.25rem minmax(0, 1fr) 9rem 14rem; }
.product-row.starred.no-kind { grid-template-columns: 2.25rem minmax(0, 1fr) 14rem; }
.product-name { overflow-wrap: anywhere; }
.product-vendor { color: var(--muted); font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Pills: solid, rounded, white text, in the colour each already used. */
.badge {
	display: inline-block;
	font-size: 0.78rem;
	font-weight: 600;
	line-height: 1.45;
	padding: 0.1rem 0.6rem;
	border-radius: 999px;
	color: #fff;
	background-color: rgb(255 255 255 / 0.14);
	white-space: nowrap;
	text-align: center;
}
.badge.kev { background-color: var(--pill-kev); }
.badge.kind { background-color: var(--pill-neutral); }
.badge.epss { background-color: var(--pill-neutral); }

/* Fixed-width pills in tables, so every row lines up whatever the value. */
.badge.score { width: 3.25rem; }
.badge.kev:not(.pill-wide) { min-width: 3rem; }
.badge.kind { min-width: 7rem; }

.badge.sev-critical { background-color: var(--pill-critical); }
.badge.sev-high { background-color: var(--pill-high); }
.badge.sev-medium { background-color: var(--pill-medium); }
.badge.sev-low { background-color: var(--pill-low); }
.badge.sev-none, .badge.sev-unknown { background-color: var(--pill-neutral); }

/* CVE detail */

.cve-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.cve-head h1 { margin-right: 0.25rem; }
.head-links { display: inline-flex; flex-wrap: wrap; gap: 0.4rem; margin-left: auto; }
.chip { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; color: var(--muted); padding: 0.3rem 0.65rem; border-radius: 999px; background-color: var(--surface); }
.chip:hover { color: var(--text); text-decoration: none; }
.chip .icon { width: 0.9em; height: 0.9em; }
.pill-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 1rem 0 0.4rem; }
.pill-line .badge { font-size: 0.85rem; padding: 0.2rem 0.75rem; }
.pill-line .badge:first-child { text-transform: capitalize; }
.dates { margin: 0 0 1.25rem; }
.vector-details { margin: 0.75rem 0 0; color: var(--muted); }
.vector-details summary { cursor: pointer; }
.vector { display: block; font-size: 0.78rem; color: var(--muted); overflow-wrap: anywhere; margin-top: 0.35rem; }

@media (max-width: 560px) {
	h1 { font-size: 1.45rem; }
	.product-row { grid-template-columns: minmax(0, 1fr) 9rem; }
	.product-vendor { grid-column: 1 / -1; }
	.product-row.starred { grid-template-columns: 2.25rem minmax(0, 1fr) auto; }
	.product-row.starred.no-kind { grid-template-columns: 2.25rem minmax(0, 1fr); }
	.product-row.starred .product-vendor { grid-column: 2 / -1; }
}

/* Data tables: DataTables, restyled to the theme. Content columns take their content's width
   and the title (or name) takes the rest; below 640px every row becomes a card. */

.dt-container { margin-top: 1rem; color: var(--text); }
.dt-container .dt-layout-row { gap: 0.75rem; }
.dt-container .dt-layout-cell:has(> .dt-search) { flex: 1; }
.dt-container .dt-search { display: flex; align-items: center; gap: 0.5rem; position: relative; width: 100%; }
.dt-container .dt-search label { position: absolute; left: 0.75rem; top: 50%; translate: 0 -50%; display: flex; color: var(--muted); pointer-events: none; }
.dt-container .dt-length { display: flex; align-items: center; gap: 0.5rem; color: var(--muted); font-size: 0.9rem; }
.dt-container .dt-layout-cell:has(> .dt-info) { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; }
.dt-container .dt-info { color: var(--muted); font-size: 0.9rem; }
/* No outlines: a soft fill instead. */
/* "div." to outrank DataTables' own rules for these. */
div.dt-container .dt-search input,
div.dt-container .dt-length select { border: 0; background-color: var(--surface); border-radius: var(--radius); margin: 0; }
div.dt-container .dt-search input { width: 100%; max-width: none; padding: 0.6rem 0.75rem 0.6rem 2.4rem; }
div.dt-container .dt-length select { width: auto; padding: 0.35rem 0.5rem; }

table.dataTable.data-table { width: 100%; table-layout: auto; border-collapse: separate; border-spacing: 0 0.3rem; margin: 0.25rem 0; }
table.dataTable.data-table,
table.dataTable.data-table > thead > tr > th,
table.dataTable.data-table > tbody > tr > td,
div.dt-container.dt-empty-footer table.data-table > tbody > tr:last-child > * { border: 0; }
table.dataTable.data-table > thead > tr > th { color: var(--muted); font-size: 0.85rem; font-weight: 600; text-align: left; padding: 0.6rem 0.5rem; white-space: nowrap; }
table.dataTable.data-table > tbody > tr > td { padding: 0.6rem 0.5rem; vertical-align: middle; background: none; box-shadow: none; }
/* No ruled lines: each row is shaded, a little apart from the next, and clipped to a rounded
   shape, so the corners are right however many columns there are. */
table.dataTable.data-table > tbody > tr,
table.dataTable.data-table > tbody > tr:nth-child(odd) { background-color: var(--surface); clip-path: inset(0 round var(--radius)); }
table.dataTable.data-table.hover > tbody > tr:hover { background-color: rgb(255 255 255 / 0.08); }
table.dataTable.data-table th.dt-type-numeric,
table.dataTable.data-table td.dt-type-numeric { text-align: left; }

/* A sort arrow only on the column being sorted, and on any header under the pointer. */
table.dataTable.data-table thead th:not(.dt-ordering-asc):not(.dt-ordering-desc) .dt-column-order { opacity: 0; transition: opacity 0.15s; }
table.dataTable.data-table thead th:hover .dt-column-order { opacity: 0.7; }

/* Content-width columns; the title, name and vendor share what's left, cut short with an ellipsis. */
table.data-table .col-star,
table.data-table .col-cve,
table.data-table .col-score,
table.data-table .col-kev,
table.data-table .col-date,
table.data-table .col-kind { width: 1%; white-space: nowrap; }
table.data-table td.col-title,
table.data-table td.col-vendor,
table.data-table td.col-affects { max-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.data-table .col-star { padding-left: 0.25rem; padding-right: 0; }
table.data-table .cve-id { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.95rem; font-weight: 600; }
table.data-table .product-name { font-weight: 600; }
table.data-table .row-date { text-align: left; }

/* Phones: each row a card. CVEs: ID and pills, then the title, then the date. Products: star,
   name and kind, then the vendor. The header becomes a row of sort chips. */
@media (max-width: 640px) {
	.dt-container .dt-length { display: none; }
	table.dataTable.data-table,
	table.dataTable.data-table > thead,
	table.dataTable.data-table > tbody { display: block; width: 100%; }
	table.dataTable.data-table > thead > tr { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.6rem; }
	table.dataTable.data-table > thead > tr > th { padding: 0.3rem 0.7rem; border-radius: 999px; background-color: var(--surface); font-size: 0.8rem; width: auto !important; }
	table.dataTable.data-table > thead > tr > th.dt-orderable-none { display: none; }
	table.dataTable.data-table > thead > tr > th.dt-ordering-asc,
	table.dataTable.data-table > thead > tr > th.dt-ordering-desc { color: var(--text); background-color: rgb(238 210 0 / 0.16); }
	table.dataTable.data-table > tbody { display: grid; gap: 0.4rem; }
	table.dataTable.data-table > tbody > tr,
	table.dataTable.data-table > tbody > tr:nth-child(odd) {
		display: grid;
		align-items: center;
		gap: 0.3rem 0.6rem;
		padding: 0.7rem 0.85rem;
		border-radius: var(--radius);
		clip-path: none;
		background-color: var(--surface);
	}
	table.dataTable.data-table > tbody > tr > td { display: block; padding: 0; width: auto; max-width: none; }
	table.dataTable.data-table > tbody > tr > td.dt-empty { text-align: left; color: var(--muted); }

	table.dataTable.data-table > tbody > tr:has(> td.col-cve) {
		grid-template-columns: minmax(0, 1fr) auto auto;
		grid-template-areas: "cve score kev" "title title title" "date date date";
	}
	table.dataTable.data-table > tbody > tr:has(> td.col-affects) {
		grid-template-areas: "cve score kev" "title title title" "affects affects date";
	}
	td.col-cve { grid-area: cve; }
	td.col-score { grid-area: score; }
	td.col-kev { grid-area: kev; }
	td.col-kev:empty { display: none; }
	table.dataTable.data-table > tbody > tr > td.col-title { grid-area: title; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
	td.col-date { grid-area: date; color: var(--muted); font-size: 0.8rem; }
	table.dataTable.data-table > tbody > tr > td.col-affects { grid-area: affects; color: var(--muted); font-size: 0.8rem; white-space: nowrap; }

	table.dataTable.data-table > tbody > tr:has(> td.col-star) {
		grid-template-columns: auto minmax(0, 1fr) auto;
		grid-template-areas: "star name kind" "star vendor vendor";
	}
	td.col-star { grid-area: star; }
	td.col-name { grid-area: name; min-width: 0; }
	td.col-kind { grid-area: kind; }
	table.dataTable.data-table > tbody > tr > td.col-vendor { grid-area: vendor; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* Paging */
/* Paging buttons are <button>s, so they wear the glass; DataTables' own fills are cleared. */
/* DataTables colours its paging text through these, in rules more specific than ours. */
.dt-container {
	--dt-paging-button_color: var(--text);
	--dt-paging-button_color-hover: var(--text);
	--dt-paging-button_color-current: var(--text);
	--dt-paging-button_color-current-hover: var(--text);
	--dt-paging-button_color-disabled: var(--muted);
}
/* Paging buttons are <button>s; they don't wear the glass here: flat fills only. */
div.dt-container .dt-paging .dt-paging-button {
	color: var(--text) !important;
	background: rgb(255 255 255 / 0.05) !important;
	border: 0 !important;
	border-radius: var(--radius);
	box-shadow: none !important;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	padding: 0.3rem 0.7rem;
	margin: 0 0.15rem;
	min-width: 2.25rem;
}
div.dt-container .dt-paging .dt-paging-button::before,
div.dt-container .dt-paging .dt-paging-button::after { content: none; }
div.dt-container .dt-paging .dt-paging-button:hover { background: rgb(255 255 255 / 0.12) !important; }
div.dt-container .dt-paging .dt-paging-button.current,
div.dt-container .dt-paging .dt-paging-button.current:hover { background: rgb(238 210 0 / 0.28) !important; font-weight: 700; }
div.dt-container .dt-paging .dt-paging-button.disabled,
div.dt-container .dt-paging .dt-paging-button.disabled:hover { color: var(--muted) !important; background: rgb(255 255 255 / 0.03) !important; opacity: 0.5; }
@media (max-width: 640px) {
	div.dt-container .dt-paging nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; }
	div.dt-container .dt-paging .dt-paging-button { margin: 0; min-width: 2.1rem; padding: 0.25rem 0.55rem; font-size: 0.85rem; }
}

/* Loading indicator */
div.dt-container div.dt-processing { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 4px 20px rgb(0 0 0 / 0.4); }
div.dt-container div.dt-processing > div:last-child > div { background: var(--accent); }


/* Logos: from the API's logo route. Simple Icons are square marks; Commons logos are often
   full wordmarks, so width is capped rather than fixed. */
.with-logo { display: inline-flex; align-items: center; gap: 0.5rem; min-width: 0; max-width: 100%; }
.with-logo > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* List icons are square, in a fixed slot whether or not there is one, so names line up. */
.logo { display: inline-block; width: 1.1rem; height: 1.1rem; object-fit: contain; flex: none; }
/* The logo on its own row, the name and star beneath it: a wordmark logo beside the same name
   in text read twice. */
.entity-head { display: flex; align-items: center; gap: 0.5rem 0.75rem; flex-wrap: wrap; margin: 20px 0; }
.entity-head h1 { margin: 0; }
.entity-logo-row { flex-basis: 100%; margin-bottom: 0.25rem; }
img.entity-logo { display: block; width: auto; height: 3.75rem; max-width: min(18rem, 100%); }

/* Logos sit on nothing, shown as they are. */
/* A product or vendor without a logo gets its initial, in the same slot. */
.logo-initial {
	display: inline-grid;
	place-items: center;
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 1;
	color: var(--muted);
	border-radius: 4px;
	background-color: var(--surface);
}

/* Profile ("About") on vendor and product pages. */
.profile { max-width: 46rem; }
.profile-summary { margin: 0; }
/* Three lines until "More". */
.profile-summary.clamped { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.more-toggle { font-size: 0.9rem; margin: 0.25rem 0 0; }
.facts-line { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 1rem 0 0.5rem; padding: 0; color: var(--muted); }
.facts-line li { display: inline-flex; align-items: center; gap: 0.4rem; min-width: 0; overflow-wrap: anywhere; }
.profile-source { display: flex; align-items: flex-start; gap: 0.4rem; margin: 0.5rem 0 0; }
.profile-source .icon { margin-top: 0.15em; }

/* Icons (Lucide, from the sprite). They take the text colour; .on and friends can fill them. */
.icon {
	width: 1.15em;
	height: 1.15em;
	flex: none;
	vertical-align: -0.2em;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.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; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 0.9s linear infinite; }
.status.loading { display: flex; justify-content: center; padding: 1.5rem 0; font-size: 1.4rem; }

/* Icon-only buttons: glass, square, a finger-sized target. */
.icon-button { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; vertical-align: middle; }
.icon-button.ghost { background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; color: var(--muted); }
.icon-button.ghost::before, .icon-button.ghost::after { content: none; }
.icon-button.ghost:hover { color: var(--text); background-color: var(--surface); background-image: none; }
.with-icon { display: inline-flex; align-items: center; gap: 0.45rem; }
button.more.icon-button { display: grid; margin: 1rem auto 0; }

/* The star: outline when not in the stack, filled yellow when it is. */
.star-toggle {
	display: inline-grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border-radius: 999px;
	background: none;
	box-shadow: none;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	color: var(--muted);
	font-size: 1.15rem;
	transition: color 0.2s ease, transform 0.15s ease;
}
.star-toggle::before, .star-toggle::after { content: none; }
.star-toggle:hover { color: var(--accent); background-color: var(--surface); background-image: none; }
.star-toggle.on { color: var(--accent); }
.star-toggle.on .icon { fill: currentColor; animation: star-pop 0.3s ease; }
.star-toggle:active { transform: scale(0.9); }
@keyframes star-pop { 50% { transform: scale(1.3); } }
@media (prefers-reduced-motion: reduce) { .star-toggle.on .icon { animation: none; } }
.entity-head .star-toggle { width: 2.75rem; height: 2.75rem; font-size: 1.5rem; }
table.data-table .col-star { width: 3rem; padding-left: 0; padding-right: 0; text-align: center; }

/* Back links. */
.crumbs a { display: inline-flex; align-items: center; gap: 0.2rem; }

/* Header: account links as icons; the drawer adds their names back. */
.nav-icon, .nav-with-icon { display: inline-flex; align-items: center; gap: 0.45rem; }
.nav-icon .nav-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav-icon .icon { width: 1.3em; height: 1.3em; }
/* On My stack, its star is filled. */
.nav-icon[href="/stack"].active .icon { fill: currentColor; }

/* Switches: a checkbox drawn as a track and knob. */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-weight: 600; }
input.switch {
	appearance: none;
	-webkit-appearance: none;
	position: relative;
	flex: none;
	width: 2.75rem;
	height: 1.6rem;
	margin: 0;
	border-radius: 999px;
	background-color: rgb(255 255 255 / 0.18);
	cursor: pointer;
	transition: background-color 0.2s ease;
}
.switch::after {
	content: "";
	position: absolute;
	top: 0.2rem;
	left: 0.2rem;
	width: 1.2rem;
	height: 1.2rem;
	border-radius: 50%;
	background: #fff;
	transition: transform 0.2s ease;
}
.switch:checked { background-color: var(--accent); }
.switch:checked::after { transform: translateX(1.15rem); }
.hint { color: var(--muted); cursor: help; font-weight: 400; }

/* Account: collapsed panels that open on a tap. */
.panel { border-radius: var(--radius); margin: 1rem 0; max-width: 40rem; }
.panel > summary { display: flex; align-items: center; gap: 0.75rem; padding: 1.1rem 1.25rem; cursor: pointer; list-style: none; }
.panel > summary::-webkit-details-marker { display: none; }
.panel > summary h2 { margin: 0; font-size: 1.05rem; flex: 1; }
.panel .chev { color: var(--muted); transition: transform 0.25s ease; }
.panel[open] .chev { transform: rotate(180deg); }
.panel .summary-note { color: var(--muted); font-size: 0.9rem; }
.panel > .form { margin: 0; padding-top: 0; }
.panel.danger summary h2 { color: var(--error); }

/* Account: setting up an authenticator app. */
.form.flush { padding: 0; margin: 0; }
.qr { width: 200px; height: 200px; border-radius: var(--radius); background: #fff; }
.totp-key { word-break: break-all; letter-spacing: 0.05em; }
.backup-codes { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.5rem; }
.backup-codes li { background: var(--surface); border-radius: var(--radius); padding: 0.45rem 0.7rem; text-align: center; }
