/*
	THE public frame's stylesheet — nexym.nl, docs.nexym.nl and status.nexym.nl
	(CLAUDE.md §10d½).

	The docs import this file directly (astro.config.mjs → customCss); the status page
	serves a byte-for-byte copy at /assets/frame.css, and the website (its own repo)
	carries one at src/frame/frame.css. `node public-frame/sync.mjs` writes the copies
	(`--website <checkout>` for the website's) and `--check` verifies them. Edit THIS
	file, never a copy.

	Tokens are nexym.nl's (website/src/styles/global.css, the @theme block), under an
	--nx- prefix so they cannot collide with Starlight's. The header, footer and 404
	take their sizes from the website's own components (Header.astro, Footer.astro,
	PillButton.astro) and the platform's error card (connect::errors.style).

	Everything here is scoped to .nx-* classes and sets its own font, size and line
	height, so Starlight's reset and the docs' prose rules cannot leak into it.
*/

/* ── Fonts ──────────────────────────────────────────────────────────────
   Self-hosted and preloaded (<link rel=preload> in both heads), one variable
   file per family. `swap` so text never waits on a slow network, and a fallback
   face measured to Manrope's width and height so the swap does not move a line. */
@font-face {
	font-family: 'Manrope';
	src: url('/fonts/manrope-latin.woff2') format('woff2');
	font-weight: 200 800;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'JetBrains Mono';
	src: url('/fonts/jetbrains-mono-latin.woff2') format('woff2');
	font-weight: 100 800;
	font-style: normal;
	font-display: swap;
}
/* Arial, stretched per weight to Manrope's measured widths (a 20px sample line at
   500/600/700/800 against Arial and Arial Bold), and set to Manrope's ascent and
   descent (2132/600 on 2000 units) so line boxes keep their height.
   Each fallback face stops at the glyphs its real font has (the unicode-range is
   the woff2's own cmap): a character Manrope does not draw — the → and ← on the
   website's buttons — falls through to the system font, as it did when the
   website loaded Manrope from Google, instead of being drawn by stretched Arial. */
@font-face {
	font-family: 'Manrope Fallback';
	src: local('Arial'), local('ArialMT'), local('Helvetica Neue'), local('Helvetica');
	font-weight: 200 550;
	size-adjust: 103.9%;
	ascent-override: 102.6%;
	descent-override: 28.9%;
	line-gap-override: 0%;
	unicode-range: U+0000-00FF, U+0102, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+2026, U+2039-203A, U+2044, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
	font-family: 'Manrope Fallback';
	src: local('Arial Bold'), local('Arial-BoldMT'), local('Helvetica Neue Bold'), local('Helvetica Bold');
	font-weight: 551 650;
	size-adjust: 99.2%;
	ascent-override: 107.5%;
	descent-override: 30.2%;
	line-gap-override: 0%;
	unicode-range: U+0000-00FF, U+0102, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+2026, U+2039-203A, U+2044, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
	font-family: 'Manrope Fallback';
	src: local('Arial Bold'), local('Arial-BoldMT'), local('Helvetica Neue Bold'), local('Helvetica Bold');
	font-weight: 651 750;
	size-adjust: 100.9%;
	ascent-override: 105.6%;
	descent-override: 29.7%;
	line-gap-override: 0%;
	unicode-range: U+0000-00FF, U+0102, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+2026, U+2039-203A, U+2044, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
	font-family: 'Manrope Fallback';
	src: local('Arial Bold'), local('Arial-BoldMT'), local('Helvetica Neue Bold'), local('Helvetica Bold');
	font-weight: 751 900;
	size-adjust: 102.6%;
	ascent-override: 103.9%;
	descent-override: 29.2%;
	line-gap-override: 0%;
	unicode-range: U+0000-00FF, U+0102, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+2026, U+2039-203A, U+2044, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
	font-family: 'JetBrains Mono Fallback';
	src: local('Menlo'), local('Consolas'), local('Courier New');
	size-adjust: 100%;
	ascent-override: 102%;
	descent-override: 30%;
	line-gap-override: 0%;
	unicode-range: U+0000-00FF, U+0102, U+0131, U+0152-0153, U+02BC, U+02C6, U+02DA, U+02DC, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+2026, U+2032-2033, U+2039-203A, U+2044, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF;
}

:root {
	--nx-cream: #f4f2ea;
	--nx-paper: #ffffff;
	--nx-ink: #0f1017;
	--nx-ink-2: #33354a;
	--nx-muted: #565a6e;
	--nx-faint: #7b7f93;
	--nx-violet: #763cf7;
	--nx-violet-deep: #5a25d6;
	--nx-teal: #2fb6a8;
	--nx-butter: #fbe7a1;
	--nx-vanilla: #fbf4d6;
	--nx-mint: #c9f0ea;
	--nx-lilac: #ece6fb;
	--nx-sky: #d9eef7;
	--nx-sand: #efe9de;
	--nx-line: #ebe7dc;
	--nx-line-2: #d9d4c6;
	--nx-input: #dcdde6;
	--nx-gutter: #e4e6ee;

	--nx-radius-tile: 28px;
	--nx-radius-card: 24px;
	--nx-radius-inner: 20px;
	--nx-radius-chip: 12px;
	--nx-shadow-sticker: 0 6px 16px rgba(20, 21, 31, 0.08);
	--nx-shadow-float: 0 20px 50px rgba(20, 21, 31, 0.15);

	--nx-sans: 'Manrope', 'Manrope Fallback', ui-sans-serif, system-ui, sans-serif;
	--nx-mono: 'JetBrains Mono', 'JetBrains Mono Fallback', ui-monospace, monospace;

	/* .nx-container: 1280 wide, clamp(16px,3vw,32px) gutters. */
	--nx-width: 1280px;
	--nx-gutter-x: clamp(16px, 3vw, 32px);
	--nx-top-h: 90px;
	/* The one focus ring: violet, soft, never the browser's blue. */
	--nx-ring: 0 0 0 3px rgba(118, 60, 247, 0.28);
}
@media (max-width: 1099.98px) {
	:root { --nx-top-h: 72px; }
}

.nx-container {
	width: 100%;
	max-width: var(--nx-width);
	margin-inline: auto;
	padding-inline: var(--nx-gutter-x);
}

/* ── Header ──────────────────────────────────────────────────────────── */
.nx-top {
	position: sticky; top: 0; z-index: 50;
	background: rgba(244, 242, 234, 0.92);
	-webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
	font-family: var(--nx-sans); font-size: 16px; font-weight: 500; line-height: 1.5;
	color: var(--nx-ink); -webkit-font-smoothing: antialiased;
}
.nx-top__in {
	box-sizing: border-box; width: 100%; max-width: var(--nx-width); height: var(--nx-top-h);
	margin: 0 auto; padding: 0 var(--nx-gutter-x);
	display: flex; align-items: center; gap: 20px;
}
.nx-top a { color: inherit; text-decoration: none; }

.nx-logo { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.nx-logo__pill {
	display: inline-block; background: var(--nx-violet); color: #fff; border-radius: 14px;
	padding: 6px 16px; transform: rotate(-1.5deg);
	font-size: 22px; font-weight: 800; letter-spacing: -0.05em; line-height: 33px;
}
/* Wide enough for the longest label ("Status"), so the search pill starts at the
   same pixel on every site whatever the label says. */
.nx-logo__label { min-width: 50px; font-size: 15px; font-weight: 700; color: var(--nx-muted); white-space: nowrap; }
.nx-logo:hover .nx-logo__label { color: var(--nx-ink); }

/* The search pill. On the docs it is Starlight's own button, on the status page a
   link that opens the docs' search; the one rule below draws both. */
.nx-top__search { flex: 1 1 auto; min-width: 0; max-width: 460px; display: flex; }
.nx-top__search > * { flex: 1 1 auto; min-width: 0; }
.nx-search-btn,
.nx-top site-search button[data-open-modal] {
	box-sizing: border-box; display: flex; align-items: center; gap: 10px;
	width: 100%; height: 44px; margin: 0; padding: 0 16px;
	background: #fff; border: 1px solid var(--nx-input); border-radius: 999px; box-shadow: none;
	font-family: var(--nx-sans); font-size: 14px; font-weight: 500; line-height: 20px;
	color: var(--nx-faint); text-decoration: none; cursor: pointer; white-space: nowrap; overflow: hidden;
}
.nx-search-btn:hover,
.nx-top site-search button[data-open-modal]:hover { border-color: var(--nx-line-2); color: var(--nx-muted); }
/* Starlight's own glyph is not a Heroicon: it steps aside for ours. */
.nx-top site-search button[data-open-modal] > svg,
.nx-top site-search button[data-open-modal] > kbd { display: none !important; }
.nx-search-btn::before,
.nx-top site-search button[data-open-modal]::before {
	flex: none; width: 18px; height: 18px; color: var(--nx-faint);
	content: ''; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M9 3.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11ZM2 9a7 7 0 1 1 12.452 4.391l3.328 3.329a.75.75 0 1 1-1.06 1.06l-3.329-3.328A7 7 0 0 1 2 9Z' clip-rule='evenodd'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M9 3.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11ZM2 9a7 7 0 1 1 12.452 4.391l3.328 3.329a.75.75 0 1 1-1.06 1.06l-3.329-3.328A7 7 0 0 1 2 9Z' clip-rule='evenodd'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}
.nx-search-btn__label,
.nx-top site-search button[data-open-modal] > span { display: block !important; overflow: hidden; text-overflow: ellipsis; }

/* The four links: the website's white pill. */
.nx-top__links {
	display: flex; align-items: center; gap: 32px; flex: none; margin-left: auto;
	background: #fff; border-radius: 999px; padding: 14px 32px;
	font-size: 15px; font-weight: 600; line-height: 22px;
}
.nx-top__links a { white-space: nowrap; color: var(--nx-ink); }
.nx-top__links a:hover, .nx-top__links a.is-active { color: var(--nx-violet); }
/* No search (the website): the pill sits centred between the logo and the actions. */
.nx-logo + .nx-top__links { margin-inline: auto; }

/* A plain link beside the ink pill (the website's "Inloggen"). */
.nx-top__text { flex: none; font-size: 15px; font-weight: 600; line-height: 22px; white-space: nowrap; color: var(--nx-ink); }
.nx-top__text:hover { color: var(--nx-violet); }

.nx-lang { display: inline-flex; flex: none; background: var(--nx-sand); border-radius: 999px; padding: 3px; }
.nx-lang a {
	padding: 5px 11px; border-radius: 999px;
	font-size: 12.5px; font-weight: 700; line-height: 18px; color: var(--nx-muted) !important; white-space: nowrap;
}
.nx-lang a.is-on { background: #fff; color: var(--nx-ink) !important; box-shadow: 0 1px 2px rgba(20, 21, 31, 0.08); }

/* PillButton, ink: never violet — violet is the wordmark's. */
.nx-open {
	display: inline-flex; align-items: center; gap: 12px; flex: none;
	background: var(--nx-ink); color: #fff !important; border-radius: 999px; padding: 14px 22px;
	font-size: 14px; font-weight: 700; line-height: 21px; white-space: nowrap;
	transition: transform 0.15s ease;
}
.nx-open:hover { transform: translateY(-2px); }
.nx-open__arrow {
	display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
	background: var(--nx-teal); color: var(--nx-ink);
}

.nx-menu {
	display: none; flex: none; height: 40px; padding: 0 16px; margin: 0;
	background: #fff; border: 1px solid var(--nx-input); border-radius: 999px; cursor: pointer;
	font-family: var(--nx-sans); font-size: 14px; font-weight: 700; line-height: 20px; color: var(--nx-ink);
}

/* One focus ring for everything in the frame. */
:is(.nx-top, .nx-drawer, .nx-site-foot, .nx-err-card) :is(a, button):focus-visible,
.nx-top site-search button[data-open-modal]:focus-visible {
	outline: none; box-shadow: var(--nx-ring);
}

/* ── The drawer (Menu, under 1100px) ─────────────────────────────────── */
.nx-drawer__links { display: none; }
.nx-drawer[data-nx-drawer='standalone'] { display: none; }

@media (max-width: 1099.98px) {
	.nx-top__links, .nx-top__in > .nx-lang, .nx-top__in > .nx-open, .nx-top__in > .nx-top__text { display: none; }
	.nx-menu { display: block; }
	.nx-top__in:not(:has(> .nx-top__search)) > .nx-menu { margin-left: auto; }
	.nx-top__search { margin-left: auto; max-width: 420px; }

	.nx-drawer, .nx-drawer[data-nx-drawer='standalone'] {
		display: block; position: fixed; z-index: 45; inset: var(--nx-top-h) 0 0 0;
		box-sizing: border-box; overflow-y: auto; overscroll-behavior: contain;
		background: var(--nx-cream); padding: 12px var(--nx-gutter-x) 48px;
		visibility: hidden; opacity: 0; transform: translateY(-6px);
		transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
		font-family: var(--nx-sans);
	}
	.nx-menu-open .nx-drawer {
		visibility: visible; opacity: 1; transform: none;
		transition: opacity 0.15s ease, transform 0.15s ease;
	}
	.nx-menu-open body { overflow: hidden; }
	.nx-drawer__links { display: block; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--nx-line); }
	.nx-drawer__nav { display: flex; flex-direction: column; gap: 6px; }
	.nx-drawer__nav a {
		font-size: 26px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.25;
		color: var(--nx-ink); text-decoration: none;
	}
	.nx-drawer__nav a.is-active { color: var(--nx-violet); }
	.nx-drawer__row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
	.nx-drawer a { text-decoration: none; }
}
@media (max-width: 799.98px) {
	/* The search pill folds to its glyph — Starlight hides its label here too. */
	.nx-top__search { flex: none; }
	.nx-search-btn, .nx-top site-search button[data-open-modal] { width: 44px; padding: 0; justify-content: center; }
	.nx-search-btn__label, .nx-top site-search button[data-open-modal] > span { display: none !important; }
}

/* ── Footer: nexym.nl's ink panel ────────────────────────────────────── */
.nx-site-foot {
	background: var(--nx-ink); color: #fff; margin: 0;
	font-family: var(--nx-sans); font-size: 16px; font-weight: 500; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
.nx-site-foot__in { box-sizing: border-box; max-width: var(--nx-width); margin: 0 auto; padding: 64px var(--nx-gutter-x) 0; }
.nx-site-foot h3 {
	margin: 0 0 16px; font-size: 13px; font-weight: 800; letter-spacing: 0.05em; line-height: 1.5;
	text-transform: uppercase; color: rgba(255, 255, 255, 0.5);
}
.nx-site-foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.nx-site-foot li { margin: 0; }
.nx-site-foot a { color: rgba(255, 255, 255, 0.8); text-decoration: none; font-size: 14px; line-height: 20px; }
.nx-site-foot a:hover { color: var(--nx-teal); }

/*
 * The columns: the Toolbox group (its modules in three sub-columns) and Product ·
 * Bedrijf · Hulp. Stacked on a phone, side by side from 1024. The sub-columns are
 * 3 → 2 → 1: at two, the three lists pour into one column-first grid of eight
 * rows (display: contents), so the halves stay even.
 */
.nx-site-foot__cols { display: grid; gap: 48px; grid-template-columns: minmax(0, 1fr); }
.nx-site-foot__toolbox { min-width: 0; }
.nx-site-foot__mods { display: grid; gap: 8px 24px; grid-template-columns: minmax(0, 1fr); }
.nx-site-foot .nx-site-foot__all {
	display: inline-flex; align-items: center; gap: 6px; margin-top: 20px;
	font-weight: 700; color: var(--nx-teal);
}
.nx-site-foot .nx-site-foot__all:hover { color: #fff; }
.nx-site-foot__more { display: grid; gap: 40px 24px; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); align-content: start; }
@media (min-width: 440px) {
	.nx-site-foot__mods { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(8, auto); grid-auto-flow: column; }
	.nx-site-foot__mods ul { display: contents; }
}
@media (min-width: 720px) {
	.nx-site-foot__mods { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: none; grid-auto-flow: row; }
	.nx-site-foot__mods ul { display: flex; }
}
@media (min-width: 1024px) {
	.nx-site-foot__cols { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 56px; }
	.nx-site-foot__more { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/*
 * The wordmark: "nexym" in the ink one step lighter, cut off at the bottom, with
 * the butter sticker on it. Its height follows its font size, so nothing moves
 * when the font arrives.
 */
.nx-site-foot__mark {
	position: relative; overflow: hidden; margin-top: 48px;
	height: clamp(77px, 21vw, 298px);
}
.nx-site-foot__word {
	position: absolute; left: 0; right: 0; top: 0; text-align: center; white-space: nowrap;
	font-size: clamp(88px, 24vw, 340px); font-weight: 800; letter-spacing: -0.07em; line-height: 0.8;
	color: #1b1c26; user-select: none;
}
.nx-site-foot__sticker {
	position: absolute; right: 4px; top: 18%; white-space: nowrap;
	background: var(--nx-butter); color: var(--nx-ink); border-radius: var(--nx-radius-chip); padding: 6px 12px;
	font-size: clamp(13px, 1.4vw, 18px); font-weight: 800; line-height: 1.3; transform: rotate(-5deg);
}
@media (min-width: 640px) { .nx-site-foot__sticker { right: auto; left: 52%; padding: 8px 16px; } }

.nx-site-foot__bar {
	padding: 24px 0 28px; border-top: 1px solid rgba(255, 255, 255, 0.1);
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px;
	font-size: 13px; line-height: 20px; color: rgba(255, 255, 255, 0.6);
}
.nx-site-foot__end { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
.nx-site-foot__bar a { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: inherit; }
.nx-site-foot__bar .nx-site-foot__status {
	background: #1b1c26; color: rgba(255, 255, 255, 0.8); border-radius: 999px; padding: 6px 12px; white-space: nowrap;
}
.nx-site-foot__bar i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--nx-teal); }
.nx-site-foot__bar .nx-site-foot__social {
	width: 34px; height: 34px; justify-content: center; border-radius: 50%;
	background: #1b1c26; color: rgba(255, 255, 255, 0.8); font-weight: 800;
}
.nx-site-foot__bar .nx-site-foot__social:hover { background: var(--nx-violet); color: #fff; }

/* ── 404: the platform's error card (connect::errors.style) ──────────── */
.nx-err-main {
	box-sizing: border-box; display: flex; justify-content: center; align-items: center;
	min-height: calc(100vh - var(--nx-top-h) - 160px);
	padding: clamp(32px, 5vw, 64px) var(--nx-gutter-x);
}
.nx-err-card {
	box-sizing: border-box; width: 640px; max-width: 100%; margin: 0;
	display: flex; flex-direction: column; gap: 18px; text-align: left;
	background: #fff; color: var(--nx-ink); border-radius: var(--nx-radius-tile);
	padding: clamp(24px, 4vw, 36px); box-shadow: 0 20px 50px rgba(20, 21, 31, 0.08);
	font-family: var(--nx-sans); font-weight: 500; -webkit-font-smoothing: antialiased;
}
.nx-err-card h1 {
	margin: 0; font-family: inherit; font-size: clamp(26px, 3vw, 32px); font-weight: 800;
	letter-spacing: -0.04em; line-height: 1.05; color: var(--nx-ink); text-wrap: balance;
}
.nx-err-card p { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.55; color: var(--nx-muted); text-wrap: pretty; }
.nx-err-tag {
	align-self: flex-start; border-radius: 6px; padding: 4px 10px; white-space: nowrap;
	font-size: 11px; font-weight: 800; line-height: 1.3; letter-spacing: 0.06em; text-transform: uppercase;
	color: #946000; background: var(--nx-butter);
}
.nx-err-path {
	margin: 0; padding: 10px 14px; background: #faf8f2; border: 1px solid var(--nx-line); border-radius: 12px;
	font-family: var(--nx-mono); font-size: 12.5px; font-weight: 500; line-height: 20px; color: var(--nx-muted);
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nx-err-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 0; }
.nx-err-btn {
	display: inline-flex; align-items: center; gap: 10px; border-radius: 999px; padding: 10px 18px;
	font-family: inherit; font-size: 13.5px; font-weight: 700; line-height: 20px; white-space: nowrap;
	border: 0; cursor: pointer; text-decoration: none;
}
.nx-err-btn.ink { background: var(--nx-ink); color: #fff; }
.nx-err-btn.ink:hover { background: #27283a; color: #fff; }
.nx-err-btn.outline { background: transparent; border: 1.5px solid var(--nx-line-2); padding: 8.5px 16px; color: var(--nx-ink); }
.nx-err-btn.outline:hover { border-color: var(--nx-violet); color: var(--nx-violet); }

/* A page carrying both languages (status, the status 404) shows one. */
html[lang='nl'] [data-nx-only='en'],
html[lang='en'] [data-nx-only='nl'] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
	.nx-open, .nx-drawer { transition: none !important; }
}
