: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;
	--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);
	--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));
}

/* 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); }

/* 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 { background-image: var(--iridescent), var(--tint-accent); }

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: 960px; 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-header nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.site-header nav a { color: var(--muted); padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.site-header nav a:hover, .site-header nav a.active { color: var(--text); text-decoration: none; border-bottom-color: var(--accent); }

.site-footer { border-top: 1px solid var(--border); 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; }
.notice { border-radius: var(--radius); padding: 1rem; margin-top: 1.5rem; }

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

/* Home */

.hero { padding: 1.5rem 0 0.5rem; }
.eyebrow { margin: 0; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); line-height: 1.15; max-width: 22ch; margin: 0.5rem 0 0.75rem; }
.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; }
.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; }


/* Lists */

.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; padding: 0.65rem 0; border-bottom: 1px solid var(--border); }
.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-name { overflow-wrap: anywhere; }
.product-vendor { color: var(--muted); font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.badge {
	display: inline-block;
	font-size: 0.78rem;
	font-weight: 600;
	line-height: 1.4;
	padding: 0.05rem 0.45rem;
	border-radius: var(--brPC);
	border: 1px solid var(--border);
	color: var(--muted);
	white-space: nowrap;
	text-align: center;
}
.badge.kev { background: var(--kev-bg); color: var(--kev-text); border-color: transparent; }
.badge.big { font-size: 0.9rem; margin-left: 0.6rem; vertical-align: middle; }

/* Fixed-width widgets, so every row and card lines up whatever the value. */
.badge.score { width: 5.5rem; }
.badge.score-number { width: 3.25rem; }
.badge.kev { width: 3rem; }
.badge.kev.big { width: 3.5rem; }
.badge.kind { width: 9rem; }

.sev-critical { color: var(--sev-critical); border-color: currentColor; }
.sev-high { color: var(--sev-high); border-color: currentColor; }
.sev-medium { color: var(--sev-medium); border-color: currentColor; }
.sev-low { color: var(--sev-low); border-color: currentColor; }
.sev-none, .sev-unknown { color: var(--sev-none); }

/* CVE detail */

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; margin: 1.5rem 0; }
.facts > div { border-radius: var(--radius); padding: 0.75rem 1rem; min-width: 0; }
.facts dt { font-size: 0.8rem; color: var(--muted); }
.facts dd { margin: 0.2rem 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.vector { display: block; width: 100%; font-size: 0.78rem; color: var(--muted); overflow-wrap: anywhere; }

.links { padding-left: 1.2rem; }

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

/* Data tables: DataTables, restyled to the theme, with fixed columns. */

.dt-container { margin-top: 1rem; color: var(--text); }
.dt-container .dt-layout-row { gap: 0.75rem; }
.dt-container .dt-length,
.dt-container .dt-search { display: flex; align-items: center; gap: 0.5rem; color: var(--muted); font-size: 0.9rem; }
.dt-container .dt-length select { width: auto; margin: 0; }
.dt-container .dt-search input { width: 16rem; max-width: 100%; margin: 0; }
.dt-container .dt-info { color: var(--muted); font-size: 0.9rem; }

table.dataTable.data-table { width: 100%; table-layout: fixed; border-collapse: collapse; margin: 0.5rem 0; }
table.dataTable.data-table > thead > tr > th { color: var(--muted); font-size: 0.85rem; font-weight: 600; text-align: left; border-bottom: 1px solid var(--border); padding: 0.6rem 0.5rem; }
table.dataTable.data-table > tbody > tr > td { border-top: 1px solid var(--border); padding: 0.6rem 0.5rem; vertical-align: middle; }
table.dataTable.data-table > tbody > tr:first-child > td { border-top: 0; }
table.dataTable.data-table th.dt-type-numeric,
table.dataTable.data-table td.dt-type-numeric { text-align: left; }
table.dataTable.data-table.hover > tbody > tr:hover > * { box-shadow: inset 0 0 0 9999px rgb(255 255 255 / 0.04); }

/* Fixed widths for the columns that must never truncate; title, name and vendor take the rest. */
table.data-table .col-cve { width: 11rem; }
table.data-table .col-score { width: 7rem; }
table.data-table .col-kev { width: 4.5rem; }
table.data-table .col-date { width: 7.5rem; }
table.data-table .col-kind { width: 10.5rem; }
table.data-table .col-vendor { width: 16rem; }
table.data-table td.col-cve,
table.data-table td.col-score,
table.data-table td.col-kev,
table.data-table td.col-date,
table.data-table td.col-kind { white-space: nowrap; }
table.data-table td.col-title,
table.data-table td.col-vendor { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
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; }

@media (max-width: 479px) {
	table.data-table .col-cve { width: 9.75rem; }
	table.data-table .col-score { width: 6.25rem; }
	table.data-table .col-kev { width: 3.75rem; }
	table.data-table .col-kind { width: 9.5rem; }
}

/* Paging */
/* Paging buttons are <button>s, so they wear the glass; DataTables' own fills are cleared. */
.dt-container .dt-paging .dt-paging-button {
	color: var(--text) !important;
	background-color: rgb(255 255 255 / 0.03) !important;
	background-image: none !important;
	border: 0 !important;
	border-radius: var(--radius);
	padding: 0.3rem 0.7rem;
	margin: 0 0.15rem;
	min-width: 2.25rem;
}
.dt-container .dt-paging .dt-paging-button:hover { background-image: var(--iridescent) !important; }
.dt-container .dt-paging .dt-paging-button.current,
.dt-container .dt-paging .dt-paging-button.current:hover { background-image: var(--tint-accent) !important; color: var(--text) !important; font-weight: 700; }
.dt-container .dt-paging .dt-paging-button.disabled,
.dt-container .dt-paging .dt-paging-button.disabled:hover { color: var(--muted) !important; background-image: none !important; box-shadow: none; opacity: 0.5; }

/* 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); }

/* Responsive: the expand control and the details of collapsed columns. */
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before { color: var(--muted); }
table.dataTable > tbody > tr.child ul.dtr-details > li { border-bottom-color: var(--border); }
table.dataTable > tbody > tr.child span.dtr-title { color: var(--muted); }
table.dataTable > tbody > tr.child td.child { white-space: normal; }


/* 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; }
.entity-head { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; margin: 20px 0;}
.entity-head h1 { margin-bottom: 0.5rem; }
img.entity-logo { width: auto; height: 2.5rem; max-width: 9rem; }

/* Detail-page logos sit on a backing coloured from the logo itself (set by tintBacking):
   a soft glow in its main colour, or a near-solid white panel behind dark logos. */
.logo-backing {
	display: inline-flex;
	align-items: center;
	margin-top: 0.75rem;
	padding: 0.45rem 0.65rem;
	border-radius: var(--radius);
	transition: background-color 0.2s, box-shadow 0.2s;
}
.logo-backing-on { background: rgb(var(--logo-rgb) / 0.2); box-shadow: 0 0 28px rgb(var(--logo-rgb) / 0.35); }
.logo-backing-on.logo-backing-white { background: rgb(255 255 255 / 0.92); box-shadow: 0 0 24px rgb(255 255 255 / 0.2); }

/* Profile ("About") on vendor and product pages. */
.profile { max-width: 46rem; }
.profile-summary { margin-top: 0; }
.profile-facts { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; margin: 1rem 0; }
.profile-facts dt { font-size: 0.8rem; color: var(--muted); }
.profile-facts dd { margin: 0.15rem 0 0; overflow-wrap: anywhere; }
.profile-source { margin-top: 0; }
