/* ==========================================================================
   Spynobet — Utility Dashboard design system
   Tokens come from the approved homepage design (oklch values, with hex fallbacks).
   ========================================================================== */

/* ---- Fonts (self-hosted, latin subset) ---- */
@font-face { font-family: 'Space Grotesk'; font-weight: 600; font-style: normal; font-display: swap; src: url('../fonts/space-grotesk-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 700; font-style: normal; font-display: swap; src: url('../fonts/space-grotesk-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 500; font-style: normal; font-display: swap; src: url('../fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 600; font-style: normal; font-display: swap; src: url('../fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-style: normal; font-display: swap; src: url('../fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); }

/* ---- Tokens ---- */
:root {
	color-scheme: dark;
	--bg: #060d14;
	--bg-raised: #0d161f;
	--bg-raised-2: #151f29;
	--text: #ecf1f5;
	--text-muted: #989fa7;
	--text-faint: #8c939b;
	--border: #262f38;
	--accent: #00d2d2;
	--accent-hover: #6ce8e7;
	--accent-ink: #050c13;
	--trust: #70cf94;
	--trust-border: #31573f;
	--amber: #f3ae58;

	--font-head: 'Space Grotesk', system-ui, sans-serif;
	--font-body: 'IBM Plex Sans', system-ui, sans-serif;
	--font-mono: 'IBM Plex Mono', ui-monospace, monospace;

	--gutter: clamp(16px, 4.4vw, 64px);
	--wrap: 1312px;
	--radius: 6px;
}
@supports (color: oklch(0 0 0)) {
	:root {
		--bg: oklch(0.155 0.02 250);
		--bg-raised: oklch(0.195 0.022 250);
		--bg-raised-2: oklch(0.235 0.024 250);
		--text: oklch(0.955 0.008 250);
		--text-muted: oklch(0.70 0.014 250);
		--text-faint: oklch(0.66 0.014 250);
		--border: oklch(0.30 0.02 250);
		--accent: oklch(0.78 0.135 195);
		--accent-hover: oklch(0.86 0.11 195);
		--accent-ink: oklch(0.15 0.02 250);
		--trust: oklch(0.78 0.125 155);
		--trust-border: oklch(0.42 0.06 155);
		--amber: oklch(0.80 0.13 70);
	}
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; line-height: 1.2; }
p { margin: 0; }
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.mono { font-family: var(--font-mono); }
.screen-reader-text, .skip-link:not(:focus) {
	position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}
.skip-link:focus { position: fixed; top: 12px; left: 12px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 4px; font-weight: 600; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* ---- Small components ---- */
.k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.02em; color: var(--text-faint); text-transform: none; }
.k--trust { color: var(--trust); }
.k--accent { color: var(--accent); }
.k--amber { color: var(--amber); }
.btn {
	display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 4px;
	font-weight: 600; font-size: 14.5px; line-height: 1.2; cursor: pointer; border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-trust { background: var(--trust); color: var(--accent-ink); }
.btn-trust:hover { filter: brightness(1.1); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--text-faint); color: var(--text); }
.card { background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
a.card { display: block; color: inherit; }
a.card:hover { border-color: var(--text-faint); color: inherit; }
.card h3 { font-size: 16.5px; margin-top: 12px; line-height: 1.35; }
.card p { font-size: 13.5px; color: var(--text-muted); margin-top: 8px; line-height: 1.55; }
.view-all { font-family: var(--font-mono); font-size: 13px; }

/* ---- Header ---- */
.site-header { border-bottom: 1px solid var(--border); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 20px; }
.site-header__left { display: flex; align-items: center; gap: 40px; min-width: 0; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand__mark { width: 9px; height: 9px; background: var(--accent); border-radius: 2px; flex: none; }
.brand__name { font-family: var(--font-head); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.primary-nav { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.primary-nav a { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); }
.primary-nav a:hover { color: var(--text); }
.primary-nav a[aria-current] { color: var(--accent); }
.header-tools { display: flex; align-items: center; gap: 12px; position: relative; }
.search-toggle summary {
	list-style: none; cursor: pointer; color: var(--text-muted); display: inline-flex; padding: 6px; border-radius: 4px;
}
.search-toggle summary::-webkit-details-marker { display: none; }
.search-toggle summary:hover, .search-toggle[open] summary { color: var(--text); }
.search-toggle form { position: absolute; right: 0; top: calc(100% + 10px); z-index: 20; display: flex; gap: 8px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; width: min(340px, calc(100vw - 2 * var(--gutter))); }
.search-toggle input[type='search'] {
	flex: 1; min-width: 0; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 4px; padding: 9px 12px; font: inherit; font-size: 14px;
}
.search-toggle button { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 4px; padding: 0 14px; font-weight: 600; cursor: pointer; }
.nav-menu-toggle { display: none; }
.nav-menu-toggle summary {
	list-style: none; cursor: pointer; font-family: var(--font-mono); font-size: 13px; color: var(--text-muted);
	border: 1px solid var(--border); border-radius: 4px; padding: 7px 12px;
}
.nav-menu-toggle summary::-webkit-details-marker { display: none; }

@media (max-width: 900px) {
	.site-header__inner { flex-wrap: wrap; }
	.nav-menu-toggle { display: block; }
	.site-header__left { gap: 16px; }
	.nav-holder { order: 3; width: 100%; }
	.js:not(.nav-ready) .nav-holder .primary-nav { display: none; }
	.primary-nav { flex-direction: column; gap: 4px; padding: 12px 0 4px; }
	.primary-nav a { padding: 8px 0; font-size: 14px; }
}
@media (min-width: 901px) {
	.nav-holder > summary { display: none; }
}

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--border); padding-block: 52px 36px; margin-top: 0; }
.site-footer__top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.site-footer__about { max-width: 280px; }
.site-footer__about p { font-size: 13px; color: var(--text-faint); margin-top: 14px; line-height: 1.6; }
.site-footer .brand__mark { width: 8px; height: 8px; }
.site-footer .brand__name { font-size: 17px; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 13.5px; color: var(--text-muted); }
.footer-col a:hover { color: var(--text); }
.site-footer__bottom {
	margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border);
	display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; font-size: 12px; color: var(--text-faint);
}

/* ---- Sections shared ---- */
.section { padding-block: 44px; }
.section--tight { padding-block: 18px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.section-head h2 { font-size: 21px; margin-top: 8px; }
.grid { display: grid; gap: 14px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1000px) { .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 800px) { .grid--3, .grid--2, .grid--4 { grid-template-columns: minmax(0, 1fr); } }

/* ---- Homepage ---- */
.hero { padding-block: 76px 52px; display: flex; gap: 60px; align-items: center; flex-wrap: wrap; }
.hero__copy { flex: 1 1 420px; max-width: 640px; }
.hero__eyebrow { font-family: var(--font-mono); font-size: 12.5px; color: var(--accent); }
.hero h1 { font-size: clamp(36px, 5.2vw, 52px); line-height: 1.08; margin-top: 16px; letter-spacing: -0.01em; }
.hero__lead { margin-top: 20px; font-size: 16.5px; line-height: 1.6; color: var(--text-muted); max-width: 540px; }
.hero__actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.tool-preview { width: 340px; max-width: 100%; flex: none; background: var(--bg-raised-2); }
.tool-preview h3 { font-size: 15px; margin-top: 10px; }
.tool-preview__rows { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.tool-preview__row { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 12.5px; }
.tool-preview__row span:first-child { color: var(--text-faint); }
.tool-preview__rule { height: 1px; background: var(--border); margin: 2px 0; }
.tool-preview__total { font-size: 13.5px; font-weight: 600; }
.tool-preview__total span:first-child { color: var(--text); }
.tool-preview__total span:last-child { color: var(--accent); }
@media (max-width: 800px) { .hero { padding-block: 44px 32px; gap: 32px; } .tool-preview { width: 100%; } }

.trust-bar { border-block: 1px solid var(--border); }
.trust-bar__inner { display: flex; }
.trust-bar__item { flex: 1; display: flex; align-items: center; gap: 10px; padding: 20px 20px; border-right: 1px solid var(--border); font-size: 13.5px; color: var(--text-muted); }
.trust-bar__item:first-child { padding-left: 0; }
.trust-bar__item:last-child { border-right: 0; padding-right: 0; }
.trust-bar__item .mono { color: var(--trust); font-size: 13px; }
@media (max-width: 800px) {
	.trust-bar__inner { flex-direction: column; }
	.trust-bar__item { border-right: 0; border-bottom: 1px solid var(--border); padding: 14px 0; }
	.trust-bar__item:last-child { border-bottom: 0; }
}

.spotlight { background: var(--bg-raised); border: 1px solid var(--trust-border); border-radius: 8px; padding: 44px; }
.spotlight__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.spotlight h2 { font-size: 26px; margin-top: 10px; }
.spotlight__sub { font-size: 14.5px; color: var(--text-muted); margin-top: 8px; }
.spotlight__links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 26px; }
.spotlight__link { display: block; padding: 16px 18px; background: var(--bg-raised-2); border-radius: var(--radius); color: var(--text); font-weight: 600; font-size: 14px; line-height: 1.4; }
.spotlight__link:hover { color: var(--accent); }
@media (max-width: 800px) { .spotlight { padding: 24px 20px; } .spotlight__links { grid-template-columns: minmax(0, 1fr); } }

.hl-card { background: var(--bg-raised); }
.hl-card__head { display: flex; justify-content: space-between; align-items: baseline; }
.hl-card > p { font-size: 12.5px; color: var(--text-muted); margin-top: 8px; line-height: 1.5; }
.hl-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.hl-item { display: block; padding: 14px 16px; background: var(--bg-raised-2); border-radius: var(--radius); color: var(--text); }
a.hl-item:hover { color: var(--accent); }
.hl-item__name { font-family: var(--font-mono); font-weight: 500; font-size: 13.5px; }
.hl-item--empty .hl-item__name { color: var(--text-faint); }
.hl-item__tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 9px; }

.guide-card { padding: 18px; }
.guide-card h3 { font-size: 15px; margin-top: 10px; }
.guide-card p { font-size: 12.5px; color: var(--text-faint); }

.tools-band { background: var(--bg-raised); padding-block: 52px; }
.tools-band h2 { font-size: 21px; margin-top: 10px; }
.tool-card { background: var(--bg-raised-2); position: relative; }
.tool-card h3 { margin-top: 0; font-size: 16px; max-width: 78%; }
.tool-card .k { position: absolute; top: 22px; right: 20px; }

/* ---- Generic page / article ---- */
.page-head { padding-block: 56px 28px; }
.page-head__crumbs { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); display: flex; flex-wrap: wrap; gap: 4px 8px; }
.page-head__crumbs a { color: var(--text-muted); }
.page-head h1 { font-size: clamp(30px, 4.4vw, 42px); margin-top: 14px; letter-spacing: -0.01em; }
.page-head__lead { margin-top: 16px; font-size: 17px; color: var(--text-muted); max-width: 680px; line-height: 1.6; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }
.takeaway { margin-top: 28px; padding: 18px 22px; border: 1px solid var(--trust-border); border-radius: var(--radius); background: var(--bg-raised); max-width: 760px; }
.takeaway p { margin-top: 8px; font-size: 16px; line-height: 1.55; }
.entry { padding-bottom: 72px; }
.entry--narrow > * { max-width: 760px; }

.prose { font-size: 17px; line-height: 1.7; color: color-mix(in srgb, var(--text) 88%, var(--bg)); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 26px; margin-top: 2em; color: var(--text); letter-spacing: -0.01em; }
.prose h3 { font-size: 20px; margin-top: 1.7em; color: var(--text); }
.prose h4 { font-size: 17px; margin-top: 1.5em; color: var(--text); }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.4em; }
.prose strong { color: var(--text); font-weight: 600; }
.prose blockquote { margin-inline: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); color: var(--text-muted); }
.prose code { font-family: var(--font-mono); font-size: 0.88em; background: var(--bg-raised-2); padding: 2px 6px; border-radius: 4px; }
.prose pre { background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin-block: 2em; }
.prose img { border-radius: var(--radius); }
.prose figure { margin-inline: 0; }
.prose figcaption { font-size: 13px; color: var(--text-faint); margin-top: 8px; }
.prose .wp-block-table, .prose .table-wrap { overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--text-faint); background: var(--bg-raised); }

.sources { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); max-width: 760px; }
.sources h2 { font-size: 15px; font-family: var(--font-mono); font-weight: 500; color: var(--text-faint); }
.sources ul { margin: 12px 0 0; padding-left: 1.2em; font-size: 14.5px; color: var(--text-muted); }

/* ---- Archives / lists ---- */
.list-grid { padding-bottom: 72px; }
.pagination { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 72px; font-family: var(--font-mono); font-size: 13px; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--border); border-radius: 4px; color: var(--text-muted); }
.pagination .page-numbers.current { border-color: var(--accent); color: var(--accent); }
.empty-state { padding: 40px 0 80px; color: var(--text-muted); max-width: 560px; }
.not-found { padding-block: 96px; text-align: left; }
.not-found h1 { font-size: 44px; }
.not-found p { margin-top: 16px; color: var(--text-muted); max-width: 520px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
