/* ==========================================================================
   AtmosWise
   Design seed: night indigo + electric violet + amplifier glow, Outfit / Source Sans 3,
   14px radii, rising-arc motif. Built for readability first.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
	--ink:          #14162B;
	--ink-2:        #262A4A;
	--surface-dark: #1C1F3A;
	--bg:           #F6F6FB;
	--card:         #FFFFFF;
	--glow:        #F5A05A;
	--glow-dark:   #C97524;
	--violet:         #6D4AFF;
	--violet-dark:    #5334D6;
	--signal:        #45C2B1;
	--violet-soft:   #8E74FF;
	--line:         #E2E1EE;
	--line-dark:    #343858;
	--muted:        #5F627E;
	--muted-dark:   #AEB2CE;

	--font-head: 'Outfit', 'Segoe UI', system-ui, sans-serif;
	--font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

	--r:    14px;
	--r-sm: 8px;
	--r-lg: 20px;

	--shadow-sm: 0 1px 2px rgba(20, 22, 43, .06), 0 2px 8px rgba(20, 22, 43, .04);
	--shadow:    0 2px 6px rgba(20, 22, 43, .07), 0 12px 28px rgba(20, 22, 43, .07);
	--shadow-lg: 0 4px 12px rgba(20, 22, 43, .09), 0 24px 56px rgba(20, 22, 43, .12);

	--wrap:   1280px;
	--wrap-n: 1120px;
	--read:   730px;

	--header-h: 74px;
	--ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 2. Reset and base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

body.aw-no-scroll { overflow: hidden; }

img, picture, video, svg { max-width: 100%; height: auto; display: block; }

/* Inline icons ship a viewBox but no intrinsic width, so without this they
   expand to fill whatever box they land in. Sized rules later override. */
svg:not([width]) { width: 18px; height: 18px; flex: 0 0 auto; }

a { color: var(--violet-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
	outline: 3px solid var(--glow);
	outline-offset: 2px;
	border-radius: var(--r-sm);
}

::selection { background: var(--glow); color: var(--ink); }

hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

/* ---------- 3. Typography ---------- */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-head);
	font-weight: 600;
	line-height: 1.18;
	letter-spacing: -.012em;
	color: var(--ink);
	margin: 0 0 .6em;
	text-wrap: balance;
}

h1 { font-size: clamp(2rem, 1.35rem + 2.6vw, 3.15rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.1rem); }
h3 { font-size: clamp(1.22rem, 1.08rem + .6vw, 1.5rem); }
h4 { font-size: 1.14rem; }

p { margin: 0 0 1.15rem; }
p:last-child { margin-bottom: 0; }

strong, b { font-weight: 600; }

small { font-size: .8125rem; }

blockquote {
	margin: 2rem 0;
	padding: .35rem 0 .35rem 1.6rem;
	border-left: 3px solid var(--glow);
	font-family: var(--font-head);
	font-size: 1.2rem;
	line-height: 1.5;
	color: var(--ink-2);
	font-style: italic;
}
blockquote p:last-child { margin-bottom: 0; }

code, kbd, pre {
	font-family: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
	font-size: .9em;
}
code {
	background: #EBEAF4;
	padding: .12em .38em;
	border-radius: var(--r-sm);
}

/* ---------- 4. Layout ---------- */
.wrap    { width: 100%; max-width: var(--wrap);   margin-inline: auto; padding-inline: 28px; }
.wrap-n  { width: 100%; max-width: var(--wrap-n); margin-inline: auto; padding-inline: 28px; }
.wrap-r  { width: 100%; max-width: var(--read);   margin-inline: auto; padding-inline: 22px; }

.section { padding-block: clamp(3rem, 2rem + 4vw, 5.25rem); }
.section--tight { padding-block: clamp(2.25rem, 1.6rem + 3vw, 3.75rem); }
.section--dark { background: var(--surface-dark); color: #EDECF6; }
.section--dark h2, .section--dark h3 { color: #FFF; }
.section--dark .eyebrow { color: var(--glow); }
.section--alt { background: #EEEDF7; }

.skip-link {
	position: absolute; left: 12px; top: -100px;
	z-index: 999;
	background: var(--ink); color: #FFF;
	padding: .7rem 1.1rem; border-radius: var(--r);
	font-weight: 600; text-decoration: none;
	transition: top .18s var(--ease);
}
.skip-link:focus { top: 12px; color: #FFF; }

/* Section heading pattern: eyebrow + heading + optional lead */
.eyebrow {
	display: inline-flex; align-items: center; gap: .55rem;
	font-family: var(--font-body);
	font-size: .75rem; font-weight: 600;
	letter-spacing: .14em; text-transform: uppercase;
	color: var(--violet-dark);
	margin: 0 0 .7rem;
}
.eyebrow::before {
	content: ''; width: 22px; height: 2px;
	background: var(--glow); border-radius: 2px;
}

.sec-head { margin-bottom: 2.25rem; max-width: 640px; }
.sec-head p { color: var(--muted); margin: .5rem 0 0; }
.section--dark .sec-head p { color: var(--muted-dark); }

.sec-head--row {
	display: flex; align-items: flex-end; justify-content: space-between;
	gap: 1.5rem; max-width: none;
}

/* ---------- 5. Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	flex: 0 0 auto;
	padding: .78rem 1.4rem;
	border: 1px solid transparent;
	border-radius: var(--r);
	background: var(--violet-dark);
	color: #FFF;
	font-weight: 600; font-size: .95rem;
	line-height: 1.2;
	white-space: nowrap;
	text-decoration: none;
	cursor: pointer;
	transition: background .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
}
.btn svg { flex: 0 0 auto; width: 18px; height: 18px; }
.btn:hover { background: var(--ink); color: #FFF; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }

.btn--glow { background: var(--glow); color: var(--ink); }
.btn--glow:hover { background: var(--glow-dark); color: var(--ink); }

.btn--ghost {
	background: transparent; color: var(--ink);
	border-color: var(--line);
}
.btn--ghost:hover { background: var(--ink); color: #FFF; border-color: var(--ink); }

/* Ghost buttons sit on dark surfaces in three places: the hero, dark sections,
   and the consent card is light. Keep them legible in every dark context. */
.section--dark .btn--ghost,
.hero .btn--ghost,
.page-hero .btn--ghost,
.news-band .btn--ghost { color: #EDECF6; border-color: rgba(234, 242, 237, .34); }
.section--dark .btn--ghost:hover,
.hero .btn--ghost:hover,
.page-hero .btn--ghost:hover,
.news-band .btn--ghost:hover { background: #FFF; color: var(--ink); border-color: #FFF; }

.btn--sm { padding: .55rem 1rem; font-size: .875rem; }

.link-more {
	display: inline-flex; align-items: center; gap: .4rem;
	font-weight: 600; font-size: .925rem;
	text-decoration: none;
	color: var(--violet-dark);
	white-space: nowrap;
}
.link-more svg { transition: transform .18s var(--ease); }
.link-more:hover svg { transform: translateX(3px); }

/* ---------- 6. Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 100;
	background: rgba(244, 247, 244, .88);
	border-bottom: 1px solid transparent;
	transition: background .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.site-header.is-stuck {
	background: rgba(244, 247, 244, .82);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
	backdrop-filter: saturate(180%) blur(14px);
	border-bottom-color: var(--line);
	box-shadow: 0 1px 20px rgba(20, 22, 43, .06);
}

.header-inner {
	height: var(--header-h);
	display: flex; align-items: center; justify-content: space-between;
	gap: 1.5rem;
}

.brand {
	display: inline-flex; align-items: center; gap: .6rem;
	text-decoration: none; color: var(--ink);
	flex: 0 0 auto;
}
.brand svg, .brand img { height: 30px; width: auto; }
.brand-text {
	font-family: var(--font-head);
	font-size: 1.42rem; font-weight: 600;
	letter-spacing: -.02em;
	line-height: 1;
}
.brand-text b { font-weight: 600; color: var(--violet-dark); }

.nav-main { flex: 1 1 auto; display: flex; justify-content: flex-end; }
.nav-main ul {
	display: flex; align-items: center;
	gap: clamp(.5rem, .1rem + .9vw, 1.05rem);
	list-style: none; margin: 0; padding: 0;
}
.nav-main a {
	position: relative;
	display: block;
	padding: .45rem .1rem;
	font-size: .935rem; font-weight: 500;
	color: var(--ink-2);
	text-decoration: none;
	white-space: nowrap;
	transition: color .18s var(--ease);
}
.nav-main a::after {
	content: '';
	position: absolute; left: 0; right: 0; bottom: -2px;
	height: 2px; border-radius: 2px;
	background: var(--glow);
	transform: scaleX(0); transform-origin: left;
	transition: transform .22s var(--ease);
}
.nav-main a:hover { color: var(--ink); }
.nav-main a:hover::after,
.nav-main .current-menu-item > a::after,
.nav-main .current-cat > a::after,
.nav-main .is-current > a::after { transform: scaleX(1); }
.nav-main .current-menu-item > a,
.nav-main .current-cat > a,
.nav-main .is-current > a { color: var(--ink); font-weight: 600; }

.header-tools { display: flex; align-items: center; gap: .35rem; flex: 0 0 auto; }

.icon-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px;
	background: transparent;
	border: 1px solid transparent;
	border-radius: var(--r);
	color: var(--ink-2);
	cursor: pointer;
	transition: background .18s var(--ease), color .18s var(--ease);
}
.icon-btn:hover { background: rgba(109, 74, 255, .1); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }

.nav-toggle {
	display: none;
	/* .icon-btn is inline-flex, so without this the three bars lay out in a
	   row and read as dashes. The X animation below assumes a vertical stack. */
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4.5px;
}
.nav-toggle .bar {
	display: block;
	width: 20px; height: 2px;
	flex: 0 0 auto;
	background: currentColor;
	border-radius: 2px;
	transition: transform .24s var(--ease), opacity .18s var(--ease);
}
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Search panel */
.search-panel {
	display: grid; grid-template-rows: 0fr;
	background: var(--card);
	border-bottom: 1px solid transparent;
	transition: grid-template-rows .3s var(--ease), border-color .3s var(--ease);
}
.search-panel.is-open { grid-template-rows: 1fr; border-bottom-color: var(--line); }
.search-panel > div { overflow: hidden; }
.search-panel form { display: flex; flex-wrap: wrap; gap: .6rem; padding: 1.1rem 0; }
.search-panel input[type="search"] {
	flex: 1 1 140px;
	/* Flex items default to min-width:auto, and a text input's intrinsic width
	   is around 200px, so without this it refuses to shrink and shoves the
	   button past the right edge on a 320px screen. */
	min-width: 0;
	padding: .82rem 1.05rem;
	border: 1px solid var(--line);
	border-radius: var(--r);
	background: var(--bg);
	font-size: 1rem;
}
.search-panel input[type="search"]:focus { border-color: var(--violet); background: #FFF; }

/* ---------- 7. Mobile drawer ---------- */
.drawer-backdrop {
	position: fixed; inset: 0; z-index: 190;
	background: rgba(20, 22, 43, .5);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	opacity: 0; visibility: hidden;
	transition: opacity .28s var(--ease), visibility .28s var(--ease);
}
.drawer-backdrop.is-open { opacity: 1; visibility: visible; }

.drawer {
	position: fixed; top: 0; right: 0; bottom: 0; z-index: 200;
	width: min(88vw, 340px);
	background: var(--surface-dark);
	color: #EDECF6;
	display: flex; flex-direction: column;
	transform: translateX(100%);
	transition: transform .32s var(--ease);
	overflow-y: auto;
	overscroll-behavior: contain;
}
.drawer.is-open { transform: translateX(0); }

.drawer-head {
	display: flex; align-items: center; justify-content: space-between;
	padding: 1.1rem 1.25rem;
	border-bottom: 1px solid var(--line-dark);
}
.drawer-head .brand { color: #FFF; }
.drawer-head .brand-text b { color: var(--glow); }
.drawer .icon-btn { color: #EDECF6; }
.drawer .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #FFF; }

.drawer nav ul { list-style: none; margin: 0; padding: .6rem 0; }
.drawer nav a {
	display: flex; align-items: center; gap: .85rem;
	padding: .95rem 1.25rem;
	color: #EDECF6; text-decoration: none;
	font-size: 1.02rem; font-weight: 500;
	border-left: 3px solid transparent;
	transition: background .18s var(--ease), border-color .18s var(--ease);
}
.drawer nav a:hover,
.drawer nav .current-menu-item > a,
.drawer nav .is-current > a {
	background: rgba(255, 255, 255, .06);
	border-left-color: var(--glow);
	color: #FFF;
}
.drawer nav a svg { width: 19px; height: 19px; color: var(--glow); flex: 0 0 auto; }
.drawer-sep { height: 1px; background: var(--line-dark); margin: .5rem 1.25rem; }
.drawer-foot { margin-top: auto; padding: 1.25rem; }
.drawer-foot .btn { width: 100%; }

/* ---------- 8. Hero ---------- */
.hero {
	position: relative;
	background: var(--surface-dark);
	color: #EDECF6;
	overflow: hidden;
	isolation: isolate;
}
.hero-bg {
	position: absolute; inset: 0; z-index: -2;
}
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .3; }
.hero::after {
	content: '';
	position: absolute; inset: 0; z-index: -1;
	background:
		radial-gradient(70% 90% at 12% 0%, rgba(109, 74, 255, .38), transparent 62%),
		radial-gradient(50% 70% at 92% 20%, rgba(245, 160, 90, .2), transparent 60%),
		linear-gradient(180deg, rgba(20, 22, 43, .55) 0%, rgba(20, 22, 43, .88) 100%);
}
/* floating accent shapes */
.hero-orb {
	position: absolute; z-index: -1;
	border-radius: 50%;
	border: 1px solid rgba(245, 160, 90, .28);
	pointer-events: none;
}
.hero-orb--1 { width: 230px; height: 230px; top: -70px;  right: 8%;  }
.hero-orb--2 { width: 120px; height: 120px; bottom: 12%; right: 22%; border-color: rgba(69, 194, 177, .3); }
.hero-orb--3 { width: 60px;  height: 60px;  top: 32%;    right: 4%;  background: rgba(245, 160, 90, .08); border: 0; }

.hero-inner {
	display: grid;
	grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
	gap: clamp(2rem, 1rem + 4vw, 4rem);
	align-items: center;
	padding-block: clamp(3.25rem, 2rem + 6vw, 6rem);
}

.hero h1 { color: #FFF; margin-bottom: 1rem; }
.hero h1 .accent {
	background: linear-gradient(96deg, var(--glow) 0%, var(--violet-soft) 100%);
	-webkit-background-clip: text; background-clip: text;
	-webkit-text-fill-color: transparent; color: transparent;
}
.hero-lead {
	font-size: clamp(1.03rem, .98rem + .25vw, 1.16rem);
	color: #C9C7DE;
	max-width: 50ch;
	margin-bottom: 1.75rem;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 2.25rem; }

.trust-row {
	display: flex; flex-wrap: wrap; gap: 1.5rem 2.25rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--line-dark);
}
.trust-item { display: flex; align-items: center; gap: .65rem; }
.trust-item svg { width: 22px; height: 22px; color: var(--glow); flex: 0 0 auto; }
.trust-item b { display: block; font-size: .95rem; color: #FFF; font-weight: 600; line-height: 1.3; }
.trust-item span { display: block; font-size: .8rem; color: var(--muted-dark); }

/* Hero featured card stack */
.hero-stack { display: grid; gap: 1rem; }

.hero-feature {
	position: relative;
	display: block;
	border-radius: var(--r-lg);
	overflow: hidden;
	text-decoration: none;
	background: var(--ink);
	box-shadow: var(--shadow-lg);
	transition: transform .3s var(--ease);
}
.hero-feature:hover { transform: translateY(-3px); }
.hero-feature img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .5s var(--ease); }
.hero-feature:hover img { transform: scale(1.035); }
.hero-feature-body {
	position: absolute; inset: auto 0 0 0;
	padding: 1.5rem 1.35rem 1.35rem;
	background: linear-gradient(180deg, transparent, rgba(20, 22, 43, .93) 55%);
}
.hero-feature h3 {
	color: #FFF; font-size: 1.28rem; margin: .55rem 0 0; line-height: 1.25;
}
.hero-feature .meta { color: #C0BDD8; }

.hero-mini {
	display: grid; grid-template-columns: 84px 1fr; gap: .9rem;
	align-items: center;
	padding: .65rem;
	background: rgba(255, 255, 255, .05);
	border: 1px solid var(--line-dark);
	border-radius: var(--r);
	text-decoration: none;
	transition: background .2s var(--ease), border-color .2s var(--ease);
}
.hero-mini:hover { background: rgba(255, 255, 255, .09); border-color: rgba(245, 160, 90, .45); }
.hero-mini img { width: 84px; height: 62px; object-fit: cover; border-radius: var(--r-sm); }
.hero-mini h4 {
	color: #EDECF6; font-size: .96rem; font-weight: 600;
	margin: 0; line-height: 1.35;
	font-family: var(--font-body);
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-mini .cat { font-size: .72rem; color: var(--glow); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- 9. Cards ---------- */
.grid { display: grid; gap: 1.6rem; }
.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)); }

.card {
	/* The category badge is absolutely positioned and is a sibling of
	   .card-media, so the card itself has to be the containing block. */
	position: relative;
	display: flex; flex-direction: column;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	overflow: hidden;
	transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #CBC9E0; }

.card-media { position: relative; display: block; overflow: hidden; background: #E6E5F1; }
.card-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .45s var(--ease); }
.card:hover .card-media img { transform: scale(1.04); }

.badge {
	position: absolute; top: .8rem; left: .8rem;
	display: inline-block;
	padding: .3rem .6rem;
	background: rgba(20, 22, 43, .82);
	-webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
	color: #FFF;
	font-size: .69rem; font-weight: 600;
	letter-spacing: .07em; text-transform: uppercase;
	border-radius: var(--r-sm);
	text-decoration: none;
}
.badge:hover { background: var(--glow); color: var(--ink); }

.card-body { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; flex: 1 1 auto; }

/* Cards with no featured image: a short accent rule stands in for the photo
   so the card reads as designed rather than as a failed image. The grid
   stretches every card in a row to the tallest, so a tinted surface makes
   the extra height look like a second card style, not a broken article. */
.card--noimg {
	background: linear-gradient(170deg, #F4F3FB 0%, #FFFFFF 62%);
	border-color: #E2E1EE;
}
.card--noimg:hover { border-color: #C9C7DE; }
.card--noimg .card-body { padding-top: 1.4rem; }
.card--noimg .card-body h3 { font-size: 1.22rem; }
.card--noimg .card-body::before {
	content: "";
	width: 40px; height: 3px;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--glow), var(--violet));
	margin-bottom: 1rem;
	flex: 0 0 auto;
}
.card-kind {
	align-self: flex-start;
	margin-bottom: .6rem;
	padding: .24rem .58rem;
	background: var(--tint, #EEEDF7);
	color: var(--violet-dark);
	font-size: .68rem; font-weight: 600;
	letter-spacing: .07em; text-transform: uppercase;
	border-radius: var(--r-sm);
	text-decoration: none;
}
a.card-kind:hover { background: var(--violet-dark); color: #FFF; }
.card-body h3 { font-size: 1.16rem; margin: 0 0 .5rem; line-height: 1.3; }
.card-body h3 a { color: var(--ink); text-decoration: none; }
.card-body h3 a:hover { color: var(--violet-dark); }
.card-body p { color: var(--muted); font-size: .935rem; line-height: 1.62; margin: 0 0 1rem; }
.card-body .meta { margin-top: auto; }

.meta {
	display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
	font-size: .8rem; color: var(--muted);
}
.meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }
.meta .cat-label { color: var(--violet-dark); font-weight: 600; }

/* Category cards */
.cat-card {
	position: relative;
	display: flex; flex-direction: column; justify-content: flex-end;
	min-height: 236px;
	padding: 1.4rem;
	border-radius: var(--r-lg);
	overflow: hidden;
	text-decoration: none;
	color: #FFF;
	isolation: isolate;
}
.cat-card img {
	position: absolute; inset: 0; z-index: -2;
	width: 100%; height: 100%; object-fit: cover;
	transition: transform .5s var(--ease);
}
.cat-card::after {
	content: ''; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(170deg, rgba(20, 22, 43, .25) 0%, rgba(20, 22, 43, .88) 78%);
	transition: background .3s var(--ease);
}
.cat-card:hover img { transform: scale(1.06); }
.cat-card:hover::after { background: linear-gradient(170deg, rgba(83, 52, 214, .35) 0%, rgba(20, 22, 43, .9) 78%); }
.cat-card h3 { color: #FFF; font-size: 1.3rem; margin: 0 0 .3rem; }
.cat-card p { color: #C9C7DE; font-size: .88rem; line-height: 1.55; margin: 0 0 .7rem;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cat-card .count {
	display: inline-flex; align-items: center; gap: .4rem;
	font-size: .76rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
	color: var(--glow);
}

/* Editor's picks */
.picks { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.6rem; }
.pick-lead { position: relative; display: flex; flex-direction: column; justify-content: flex-end;
	min-height: 100%; padding: 1.75rem; border-radius: var(--r-lg); overflow: hidden;
	text-decoration: none; color: #FFF; isolation: isolate; min-height: 380px; }
.pick-lead img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover;
	transition: transform .5s var(--ease); }
.pick-lead::after { content: ''; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(180deg, rgba(20, 22, 43, .2) 0%, rgba(20, 22, 43, .9) 72%); }
.pick-lead:hover img { transform: scale(1.04); }
.pick-lead h3 { color: #FFF; font-size: clamp(1.4rem, 1.15rem + 1vw, 1.85rem); margin: .6rem 0 .5rem; }
.pick-lead p { color: #C9C7DE; font-size: .95rem; margin: 0 0 .8rem; max-width: 46ch; }
.pick-lead .meta { color: #C0BDD8; }

.pick-list { display: flex; flex-direction: column; gap: 1rem; }
.pick-item {
	display: grid; grid-template-columns: 108px 1fr; gap: 1rem;
	align-items: center;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--r);
	padding: .7rem;
	text-decoration: none;
	transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
	flex: 1 1 0;
}
.pick-item:hover { border-color: #CBC9E0; box-shadow: var(--shadow-sm); transform: translateX(2px); }
.pick-item img { width: 108px; height: 82px; object-fit: cover; border-radius: var(--r-sm); }
.pick-item h4 { font-family: var(--font-body); font-size: .98rem; font-weight: 600;
	margin: .25rem 0 .35rem; line-height: 1.35; color: var(--ink);
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Trending list */
.trend-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: .5rem 2.5rem; }
.trend-item {
	display: grid; grid-template-columns: 42px 1fr; gap: 1rem;
	align-items: center;
	padding: 1rem 0;
	border-bottom: 1px solid var(--line);
	text-decoration: none;
}
.trend-item:hover .trend-title { color: var(--violet-dark); }
.trend-num {
	font-family: var(--font-head); font-size: 1.75rem; font-weight: 600;
	color: var(--line); line-height: 1;
	transition: color .2s var(--ease);
}
.trend-item:hover .trend-num { color: var(--glow); }
.trend-title { display: block; font-weight: 600; font-size: 1rem; color: var(--ink); line-height: 1.4;
	margin-bottom: .2rem; transition: color .2s var(--ease); }

/* Trust band */
.trust-band { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 1rem + 3vw, 3.5rem); align-items: center; }
.trust-author { display: flex; align-items: center; gap: 1.15rem; margin-bottom: 1.5rem; }
.trust-author img {
	width: 88px; height: 88px; border-radius: 50%; object-fit: cover;
	border: 2px solid var(--glow); padding: 3px; background: var(--surface-dark);
	flex: 0 0 auto;
}
.trust-author .name { font-family: var(--font-head); font-size: 1.28rem; font-weight: 600; color: #FFF; margin: 0 0 .2rem; }
.trust-author .role { font-size: .875rem; color: var(--muted-dark); margin: 0; }

.value-list { display: grid; gap: 1.1rem; margin: 0; padding: 0; list-style: none; }
.value-item { display: grid; grid-template-columns: 42px 1fr; gap: 1rem; align-items: start; }
.value-item .ico {
	width: 42px; height: 42px; border-radius: var(--r);
	display: grid; place-items: center;
	background: rgba(245, 160, 90, .14);
	color: var(--glow);
}
.value-item .ico svg { width: 21px; height: 21px; }
.value-item b { display: block; color: #FFF; font-size: 1rem; margin-bottom: .18rem; }
.value-item span { color: var(--muted-dark); font-size: .92rem; line-height: 1.6; }

/* Newsletter */
.news-band {
	background: linear-gradient(120deg, var(--surface-dark) 0%, #10122A 100%);
	border-radius: var(--r-lg);
	padding: clamp(2rem, 1.4rem + 2.5vw, 3.25rem);
	color: #EDECF6;
	position: relative; overflow: hidden;
	text-align: center;
}
.news-band::before {
	content: ''; position: absolute; top: -60%; right: -10%;
	width: 380px; height: 380px; border-radius: 50%;
	background: radial-gradient(circle, rgba(245, 160, 90, .18), transparent 68%);
	pointer-events: none;
}
.news-band h2 { color: #FFF; }
.news-band > * { position: relative; }
.news-band p { color: var(--muted-dark); max-width: 52ch; margin-inline: auto; }
.news-form { display: flex; flex-wrap: wrap; gap: .6rem; max-width: 460px; margin: 1.6rem auto 0; }
.news-form input[type="email"] {
	flex: 1 1 140px; min-width: 0;   /* same min-width:auto trap as the header search */
	padding: .82rem 1.05rem;
	border: 1px solid var(--line-dark); border-radius: var(--r);
	background: rgba(255, 255, 255, .06); color: #FFF;
	font-size: .97rem;
}
.news-form input::placeholder { color: #9698B8; }
.news-form input:focus { background: rgba(255, 255, 255, .1); border-color: var(--glow); }
.news-note { font-size: .8rem; color: #9294B5; margin-top: .9rem; }

/* FAQ accordion */
.faq { display: grid; gap: .7rem; max-width: 800px; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.faq-q {
	width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
	padding: 1.05rem 1.25rem;
	background: none; border: 0; text-align: left;
	font-family: var(--font-head); font-size: 1.075rem; font-weight: 600; color: var(--ink);
	cursor: pointer;
}
.faq-q:hover { color: var(--violet-dark); }
.faq-q .chev {
	flex: 0 0 auto; width: 20px; height: 20px; color: var(--violet-dark);
	transition: transform .25s var(--ease);
}
.faq-q[aria-expanded="true"] .chev { transform: rotate(180deg); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s var(--ease); }
.faq-a > div { overflow: hidden; }
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }
.faq-a p { padding: 0 1.25rem 1.15rem; color: var(--muted); font-size: .965rem; margin: 0; }
.faq-a p + p { padding-top: .8rem; }

/* ---------- 10. Page hero (archives, pages) ---------- */
.page-hero {
	position: relative;
	background: var(--surface-dark);
	color: #EDECF6;
	overflow: hidden; isolation: isolate;
	padding-block: clamp(2.5rem, 1.8rem + 3.5vw, 4.25rem);
}
.page-hero img.bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: .28; }
.page-hero::after {
	content: ''; position: absolute; inset: 0; z-index: -1;
	background:
		radial-gradient(60% 100% at 10% 0%, rgba(109, 74, 255, .35), transparent 60%),
		linear-gradient(180deg, rgba(20, 22, 43, .6), rgba(20, 22, 43, .9));
}
.page-hero h1 { color: #FFF; margin-bottom: .6rem; }
.page-hero .lead { color: #C9C7DE; max-width: 62ch; font-size: 1.02rem; margin: 0; }
.page-hero .count-pill {
	display: inline-block; margin-top: 1.1rem;
	padding: .38rem .85rem;
	background: rgba(245, 160, 90, .16);
	border: 1px solid rgba(245, 160, 90, .35);
	border-radius: 999px;
	font-size: .8rem; font-weight: 600; color: var(--glow);
}

/* Breadcrumbs */
.crumbs { font-size: .82rem; margin-bottom: 1rem; color: var(--muted); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: 0; padding: 0; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs .sep { opacity: .5; }
.crumbs [aria-current="page"] { color: var(--ink); font-weight: 500; }
.page-hero .crumbs { color: #AEB2CE; }
.page-hero .crumbs a:hover { color: #FFF; }
.page-hero .crumbs [aria-current="page"] { color: #EDECF6; }

/* ---------- 11. Single article ---------- */
.article-head { padding-block: clamp(2rem, 1.4rem + 2.5vw, 3rem) 0; }
.article-head .cat-badge {
	display: inline-block; margin-bottom: .9rem;
	padding: .34rem .75rem;
	background: rgba(109, 74, 255, .1);
	color: var(--violet-dark);
	border-radius: var(--r-sm);
	font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
	text-decoration: none;
}
.article-head .cat-badge:hover { background: var(--violet-dark); color: #FFF; }
.article-head h1 { margin-bottom: .75rem; }
.article-dek { font-size: 1.14rem; color: var(--muted); line-height: 1.62; margin: 0 0 1.6rem; max-width: 62ch; }

.byline {
	display: flex; flex-wrap: wrap; align-items: center; gap: .85rem;
	padding: 1.05rem 0;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}
.byline img.avatar {
	width: 46px; height: 46px; border-radius: 50%; object-fit: cover;
	border: 2px solid var(--glow); padding: 2px;
	flex: 0 0 auto;
}
.byline .who { display: flex; flex-direction: column; gap: .1rem; }
.byline .who a { font-weight: 600; color: var(--ink); text-decoration: none; font-size: .95rem; }
.byline .who a:hover { color: var(--violet-dark); }
.byline .who .meta { font-size: .82rem; }

.featured-img {
	margin: 1.75rem 0 0;
	border-radius: var(--r-lg);
	overflow: hidden;
	background: #E6E5F1;
}
.featured-img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* Article layout with sticky TOC */
.article-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 250px;
	gap: clamp(2rem, 1rem + 3vw, 3.5rem);
	align-items: start;
	padding-block: clamp(2rem, 1.5rem + 2vw, 3rem);
}
/* Without a TOC the grid is wider than the reading measure, so the column has
   to be centred or the text sits left of the centred article header.
   Centre the TRACK, never the item: margin-inline:auto on a grid item drops it
   out of stretch sizing into shrink-to-fit, which then overflows narrow
   viewports (it sized to 473px inside a 296px track at 320px wide). */
.article-layout--full {
	grid-template-columns: minmax(0, var(--read));
	justify-content: center;
}

/* min-width on a grid item defaults to auto, so .entry refuses to shrink below
   the widest thing inside it (a table, a long token) and breaks out of its
   track instead. minmax(0, 1fr) protects the track, not the item. */
.entry { max-width: var(--read); min-width: 0; font-size: 1.0938rem; line-height: 1.75; }
.entry > * { max-width: 100%; }
.entry p { margin: 0 0 1.25rem; }
.entry h2 { margin: 2.4rem 0 .85rem; scroll-margin-top: calc(var(--header-h) + 20px); }
.entry h3 { margin: 1.9rem 0 .7rem; scroll-margin-top: calc(var(--header-h) + 20px); }
.entry h2:first-child, .entry h3:first-child { margin-top: 0; }
.entry ul, .entry ol { margin: 0 0 1.35rem; padding-left: 1.35rem; }
.entry li { margin-bottom: .55rem; }
.entry li::marker { color: var(--violet-dark); }
.entry a { font-weight: 500; }
.entry img { border-radius: var(--r); margin: 1.75rem 0; }
.entry figure { margin: 1.75rem 0; }

/* Callouts */
.callout {
	margin: 1.75rem 0;
	padding: 1.15rem 1.25rem;
	border-radius: var(--r);
	border: 1px solid var(--line);
	border-left: 3px solid var(--violet);
	background: #EFEEF8;
	font-size: 1rem;
}
.callout > :last-child { margin-bottom: 0; }
.callout .label {
	display: block;
	margin-bottom: .3rem;
	font-size: .74rem; font-weight: 700;
	letter-spacing: .11em; text-transform: uppercase;
	color: var(--violet-dark);
}
.callout--tip  { border-left-color: var(--signal); background: #E8F7F4; }
.callout--tip .label  { color: #16645A; }
.callout--warn { border-left-color: var(--glow); background: #FBF4E5; }
.callout--warn .label { color: #8A6210; }

.takeaways {
	margin: 0 0 2rem;
	padding: 1.35rem 1.5rem;
	background: var(--surface-dark);
	color: #EDECF6;
	border-radius: var(--r-lg);
}
.takeaways h2 {
	color: #FFF; font-size: 1.1rem; margin: 0 0 .85rem;
	font-family: var(--font-body); font-weight: 600;
	letter-spacing: .04em; text-transform: uppercase;
}
.takeaways ul { margin: 0; padding-left: 1.2rem; }
.takeaways li { margin-bottom: .5rem; color: #C9C7DE; font-size: .97rem; }
.takeaways li::marker { color: var(--glow); }
.takeaways li:last-child { margin-bottom: 0; }

/* Tables */
.table-scroll { overflow-x: auto; margin: 1.75rem 0; -webkit-overflow-scrolling: touch; border-radius: var(--r); border: 1px solid var(--line); }
.entry table { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--card); }
.entry th, .entry td { padding: .78rem .95rem; text-align: left; border-bottom: 1px solid var(--line); }
.entry th { background: #ECEBF5; font-weight: 600; font-size: .84rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.entry tbody tr:last-child td { border-bottom: 0; }
.entry tbody tr:hover { background: #F8F8FC; }

/* Checklist */
.checklist { list-style: none; padding-left: 0 !important; }
.checklist li {
	position: relative; padding-left: 1.9rem; margin-bottom: .7rem;
}
.checklist li::before {
	content: ''; position: absolute; left: 0; top: .42em;
	width: 15px; height: 8px;
	border-left: 2px solid var(--signal); border-bottom: 2px solid var(--signal);
	transform: rotate(-45deg);
}

/* TOC */
.toc { position: sticky; top: calc(var(--header-h) + 24px); }
.toc-inner {
	background: var(--card); border: 1px solid var(--line);
	border-radius: var(--r); padding: 1.15rem 1.25rem;
	max-height: calc(100vh - var(--header-h) - 60px); overflow-y: auto;
}
.toc h2 {
	font-family: var(--font-body); font-size: .74rem; font-weight: 600;
	letter-spacing: .13em; text-transform: uppercase; color: var(--muted);
	margin: 0 0 .85rem;
}
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; margin-bottom: .1rem; }
.toc a {
	display: block; padding: .4rem 0 .4rem 1.5rem;
	font-size: .875rem; line-height: 1.45; color: var(--muted);
	text-decoration: none; position: relative;
	border-left: 2px solid var(--line); margin-left: -1px;
	transition: color .18s var(--ease), border-color .18s var(--ease);
}
.toc a::before {
	content: counter(toc); position: absolute; left: .5rem; top: .4rem;
	font-size: .72rem; font-variant-numeric: tabular-nums; opacity: .6;
}
.toc a:hover, .toc a.is-active { color: var(--ink); border-left-color: var(--glow); }
.toc a.is-active { font-weight: 600; }

/* Tags */
.tag-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 2.5rem 0 0; }
.tag-row .label { font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-right: .25rem; }
.chip {
	display: inline-block; padding: .38rem .8rem;
	background: #ECEBF5; border: 1px solid var(--line);
	border-radius: 999px;
	font-size: .82rem; color: var(--ink-2); text-decoration: none;
	transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.chip:hover { background: var(--violet-dark); color: #FFF; border-color: var(--violet-dark); }

/* Author box */
.author-box {
	position: relative;
	display: grid; grid-template-columns: 152px 1fr; gap: 2rem;
	align-items: center;
	margin-top: 3rem;
	padding: 2rem 2.25rem;
	background:
		radial-gradient(120% 180% at 100% 0%, rgba(245, 160, 90, .06), transparent 55%),
		linear-gradient(180deg, #FFFFFF 0%, #FBFAFF 100%);
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	box-shadow: var(--shadow-sm);
	overflow: hidden;
}
.author-box::before {
	content: "";
	position: absolute; inset: 0 0 auto 0; height: 3px;
	background: linear-gradient(90deg, var(--violet) 0%, var(--violet-soft) 50%, var(--glow) 100%);
	opacity: .9;
}
.author-box .photo {
	width: 152px; height: 152px;
	border-radius: 50%;
	object-fit: cover; object-position: 50% 30%;
	padding: 5px;
	background: linear-gradient(135deg, var(--violet) 0%, var(--glow) 100%);
	box-shadow:
		0 0 0 1px rgba(255, 255, 255, .9) inset,
		0 10px 24px rgba(83, 52, 214, .18);
	transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.author-box .photo:hover {
	transform: translateY(-2px) scale(1.02);
	box-shadow:
		0 0 0 1px rgba(255, 255, 255, .9) inset,
		0 16px 32px rgba(83, 52, 214, .25);
}
.author-box .kicker {
	display: inline-flex; align-items: center; gap: .5rem;
	font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
	color: var(--violet-dark);
	margin: 0 0 .55rem;
}
.author-box .kicker::before {
	content: ""; width: 22px; height: 2px; border-radius: 2px;
	background: linear-gradient(90deg, var(--violet), var(--glow));
}
.author-box h2 {
	font-family: var(--font-head);
	font-size: 1.65rem; line-height: 1.15; margin: 0 0 .65rem;
	letter-spacing: -.01em;
}
.author-box h2 a {
	color: var(--ink); text-decoration: none;
	background-image: linear-gradient(var(--violet-dark), var(--violet-dark));
	background-repeat: no-repeat; background-size: 0 2px; background-position: 0 100%;
	transition: background-size .3s var(--ease), color .2s var(--ease);
}
.author-box h2 a:hover { color: var(--violet-dark); background-size: 100% 2px; }
.author-box p {
	color: var(--muted); font-size: 1rem; line-height: 1.6;
	margin: 0 0 1.15rem;
	max-width: 62ch;
}
.author-badges { display: flex; flex-wrap: wrap; gap: .5rem; }
.author-badges span {
	display: inline-flex; align-items: center; gap: .4rem;
	padding: .38rem .8rem;
	background: rgba(109, 74, 255, .08);
	color: var(--violet-dark);
	border: 1px solid rgba(109, 74, 255, .18);
	border-radius: 999px;
	font-size: .78rem; font-weight: 600; letter-spacing: .01em;
	transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.author-badges span:hover {
	background: rgba(109, 74, 255, .14);
	border-color: rgba(109, 74, 255, .32);
	transform: translateY(-1px);
}

@media (max-width: 640px) {
	.author-box {
		grid-template-columns: 1fr;
		gap: 1.1rem;
		padding: 1.75rem 1.5rem 1.85rem;
		text-align: center;
	}
	.author-box .photo {
		width: 132px; height: 132px;
		margin: .25rem auto 0;
	}
	.author-box .kicker { justify-content: center; }
	.author-box .kicker::before { display: none; }
	.author-box p { margin-left: auto; margin-right: auto; }
	.author-badges { justify-content: center; }
}

/* Post navigation */
.post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 2.5rem; }
.post-nav a {
	display: block; padding: 1.15rem 1.3rem;
	background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
	text-decoration: none;
	transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.post-nav a:hover { border-color: #CBC9E0; box-shadow: var(--shadow-sm); }
.post-nav .dir { display: block; font-size: .74rem; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); margin-bottom: .35rem; }
.post-nav .t { display: block; font-weight: 600; color: var(--ink); line-height: 1.4; font-size: .97rem; }
.post-nav .next { text-align: right; }

/* ---------- 12. Forms ---------- */
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .4rem; color: var(--ink-2); }
.field .req { color: #B3341F; }
.field input, .field textarea, .field select {
	width: 100%;
	padding: .8rem 1rem;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--r);
	font-size: 1rem;
	transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus {
	border-color: var(--violet); box-shadow: 0 0 0 3px rgba(109, 74, 255, .13); outline: none;
}
.field textarea { min-height: 158px; resize: vertical; }
.field .hint { font-size: .82rem; color: var(--muted); margin-top: .35rem; }
.field .err { display: none; font-size: .84rem; color: #B3341F; margin-top: .35rem; font-weight: 500; }
.field.has-error input, .field.has-error textarea { border-color: #B3341F; background: #FDF3F1; }
.field.has-error .err { display: block; }

/* Sits directly under the submit button, so it needs real separation or the
   confirmation reads as part of the button. */
.form-status { margin-top: 1.75rem; padding: 1rem 1.15rem; border-radius: var(--r); font-size: .93rem; line-height: 1.6; display: none; }

/* The contact form renders inside .entry, where `.entry p { margin: 0 0 1.25rem }`
   is (0,1,1) and outranks `.form-status` at (0,1,0), silently zeroing the top
   margin. These scoped rules restore it. */
.entry .form-status { margin-top: 1.75rem; margin-bottom: 0; }
.entry .form-msg    { margin-top: 1.15rem; margin-bottom: 0; }
.form-status.is-ok   { display: block; background: #E8F5EE; border: 1px solid #B4DCC6; color: #17603C; }
.form-status.is-bad  { display: block; background: #FDF0ED; border: 1px solid #F0C4B9; color: #97301A; }

.form-msg { margin-top: 1.15rem; font-size: .88rem; display: none; }
.form-msg.is-ok  { display: block; color: #9BD8AE; }
.form-msg.is-bad { display: block; color: #F0AC9C; }

.is-busy { opacity: .65; pointer-events: none; }

/* ---------- 13. Archive / pagination ---------- */
.filter-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filter-row a {
	display: inline-block; padding: .5rem 1rem;
	background: var(--card); border: 1px solid var(--line); border-radius: 999px;
	font-size: .88rem; font-weight: 500; color: var(--ink-2); text-decoration: none;
	transition: all .18s var(--ease);
}
.filter-row a:hover { border-color: var(--violet); color: var(--violet-dark); }
.filter-row a.is-active { background: var(--ink); border-color: var(--ink); color: #FFF; }

.pagination { display: flex; justify-content: center; margin-top: 3rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 44px; height: 44px; padding: 0 .8rem;
	background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
	font-size: .95rem; font-weight: 500; color: var(--ink-2); text-decoration: none;
	transition: all .18s var(--ease);
}
.pagination .page-numbers:hover { border-color: var(--violet); color: var(--violet-dark); }
.pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: #FFF; }
.pagination .page-numbers.dots { border-color: transparent; background: none; }

/* Empty state */
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-state .ico { width: 56px; height: 56px; color: var(--line); margin: 0 auto 1.25rem; }

/* ---------- 14. Footer ---------- */
.site-footer { background: var(--surface-dark); color: #C9C7DE; margin-top: auto; }
.footer-top { padding-block: clamp(2.75rem, 2rem + 3vw, 4rem); }
.footer-grid {
	display: grid;
	/* Brand takes the slack, the two link columns size to their content and
	   sit against the right edge so the row stays visually balanced. */
	grid-template-columns: minmax(0, 1fr) auto auto;
	gap: clamp(1.75rem, 1rem + 4vw, 5.5rem);
}
.footer-brand .brand { color: #FFF; margin-bottom: .9rem; }
.footer-brand .brand-text b { color: var(--glow); }
.footer-brand p { font-size: .92rem; line-height: 1.7; max-width: 44ch; color: #AEB2CE; }
.footer-contact { margin-top: .9rem; font-size: .9rem; }
.footer-contact a { color: var(--glow); text-decoration: none; }
.footer-contact a:hover { color: #FFF; text-decoration: underline; }
.footer-col h3 {
	font-family: var(--font-body); font-size: .76rem; font-weight: 600;
	letter-spacing: .13em; text-transform: uppercase; color: #FFF;
	margin: 0 0 1rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: .6rem; }
.footer-col a { color: #AEB2CE; text-decoration: none; font-size: .92rem; transition: color .18s var(--ease); }
.footer-col a:hover { color: var(--glow); }

.footer-legal {
	border-top: 1px solid var(--line-dark);
	padding-block: 1.15rem;
}
.footer-legal ul {
	list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem;
	margin: 0; padding: 0; justify-content: center;
}
.footer-legal a, .footer-legal button {
	color: #AEB2CE; font-size: .84rem; text-decoration: none;
	background: none; border: 0; padding: 0; cursor: pointer;
	transition: color .18s var(--ease);
}
.footer-legal a:hover, .footer-legal button:hover { color: var(--glow); }

.footer-bottom {
	border-top: 1px solid var(--line-dark);
	padding-block: 1.15rem;
	display: flex; flex-wrap: wrap; gap: .6rem 1.5rem;
	align-items: center; justify-content: space-between;
	font-size: .84rem; color: #9294B5;
}
.footer-bottom p { margin: 0; }

.to-top {
	position: fixed; right: 20px; bottom: 20px; z-index: 90;
	width: 46px; height: 46px;
	display: grid; place-items: center;
	background: var(--ink); color: #FFF;
	border: 0; border-radius: 50%;
	cursor: pointer;
	opacity: 0; visibility: hidden; transform: translateY(8px);
	box-shadow: var(--shadow);
	transition: opacity .25s var(--ease), visibility .25s var(--ease), transform .25s var(--ease), background .18s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--violet-dark); }
.to-top svg { width: 20px; height: 20px; }

/* ---------- 15. Cookie consent ---------- */
.aw-consent {
	position: fixed; right: 20px; bottom: 20px; z-index: 300;
	width: min(calc(100vw - 32px), 390px);
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	box-shadow: var(--shadow-lg);
	padding: 1.35rem;
	opacity: 0; visibility: hidden; transform: translateY(14px) scale(.98);
	transition: opacity .3s var(--ease), visibility .3s var(--ease), transform .3s var(--ease);
}
.aw-consent.is-open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.aw-consent-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.aw-consent-head h2 { font-size: 1.12rem; margin: 0; }
.aw-consent-close {
	flex: 0 0 auto; width: 32px; height: 32px;
	display: grid; place-items: center;
	background: none; border: 0; border-radius: var(--r-sm);
	color: var(--muted); cursor: pointer;
	transition: background .18s var(--ease), color .18s var(--ease);
}
.aw-consent-close:hover { background: #EEEDF7; color: var(--ink); }
.aw-consent-close svg { width: 17px; height: 17px; }
.aw-consent p { font-size: .875rem; line-height: 1.62; color: var(--muted); margin: 0 0 1rem; }
.aw-consent p a { color: var(--violet-dark); }
.aw-consent .btn { width: 100%; }
.aw-consent-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .5rem; }
.aw-consent-row .btn { padding: .58rem .9rem; font-size: .875rem; }

.aw-prefs { display: none; margin-top: .25rem; }
.aw-consent.show-prefs .aw-prefs { display: block; }
.aw-consent.show-prefs .aw-consent-main { display: none; }
.pref-row {
	display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
	padding: .8rem 0; border-bottom: 1px solid var(--line);
}
.pref-row:last-of-type { border-bottom: 0; }
.pref-row b { display: block; font-size: .92rem; margin-bottom: .12rem; }
.pref-row span { font-size: .8rem; color: var(--muted); line-height: 1.5; display: block; }
.switch { position: relative; flex: 0 0 auto; width: 42px; height: 24px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .track {
	position: absolute; inset: 0; background: #CDCBE2; border-radius: 999px;
	transition: background .2s var(--ease); pointer-events: none;
}
.switch .track::after {
	content: ''; position: absolute; top: 3px; left: 3px;
	width: 18px; height: 18px; background: #FFF; border-radius: 50%;
	transition: transform .2s var(--ease);
	box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}
.switch input:checked + .track { background: var(--violet-dark); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:disabled + .track { opacity: .55; }
.switch input:focus-visible + .track { outline: 3px solid var(--glow); outline-offset: 2px; }

/* ---------- 16. Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .07s; }
.reveal-d2 { transition-delay: .14s; }
.reveal-d3 { transition-delay: .21s; }
/* No-JS and failsafe: never leave content invisible. */
.no-js .reveal { opacity: 1; transform: none; }

.hero-anim { opacity: 0; transform: translateY(16px); animation: tmRise .7s var(--ease) forwards; }
.hero-anim-1 { animation-delay: .05s; }
.hero-anim-2 { animation-delay: .16s; }
.hero-anim-3 { animation-delay: .27s; }
.hero-anim-4 { animation-delay: .38s; }
@keyframes tmRise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
	}
	.reveal { opacity: 1; transform: none; }
	.hero-anim { opacity: 1; transform: none; }
}

/* ---------- 17. Responsive ---------- */
@media (max-width: 1180px) {
	.nav-main ul { gap: .72rem; }
	.nav-main a { font-size: .9rem; }
}

@media (max-width: 1024px) {
	.wrap, .wrap-n { padding-inline: 24px; }
	.nav-main ul { gap: .6rem; }
	.nav-main a { font-size: .875rem; }
	.brand-text { font-size: 1.3rem; }
	/* The TOC drops below the text here, so this column is wide too. */
	.article-layout { grid-template-columns: minmax(0, var(--read)); justify-content: center; }
	.toc { position: static; margin-bottom: 2rem; }
	.toc-inner { max-height: none; }
	.trust-band { grid-template-columns: minmax(0, 1fr); }
	.grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
	:root { --header-h: 66px; }
	.nav-main { display: none; }
	.nav-toggle { display: inline-flex; }
	.picks { grid-template-columns: minmax(0, 1fr); }
	.pick-lead { min-height: 320px; }
}

@media (max-width: 820px) {
	.grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hero-inner { grid-template-columns: minmax(0, 1fr); }
	.hero-orb--1 { width: 160px; height: 160px; }
	.footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.footer-brand { grid-column: 1 / -1; }
	.author-box { grid-template-columns: minmax(0, 1fr); text-align: center; }
	.author-box .photo { margin: 0 auto; }
	.author-badges { justify-content: center; }
}

@media (max-width: 620px) {
	body { font-size: 1.0625rem; }
	.wrap, .wrap-n, .wrap-r { padding-inline: 18px; }
	.grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
	.grid { gap: 1.2rem; }
	.post-nav { grid-template-columns: minmax(0, 1fr); }
	.post-nav .next { text-align: left; }
	.news-form { flex-direction: column; }
	/* flex-basis follows the main axis, so the 140px basis set for the row
	   layout becomes a 140px HEIGHT once this stacks. Reset it here. */
	.news-form input[type="email"] { flex: 0 0 auto; width: 100%; }
	.news-form .btn { width: 100%; }
	.trend-list { gap: 0; }
	.sec-head--row { flex-direction: column; align-items: flex-start; gap: .9rem; }
	.entry { font-size: 1.0625rem; }
	.byline { gap: .7rem; }
	.footer-legal ul { justify-content: flex-start; }
	.aw-consent {
		right: 12px; left: 12px; bottom: 12px;
		width: auto;
		padding: 1.15rem;
	}
	.to-top { right: 14px; bottom: 14px; width: 42px; height: 42px; }
}

@media (max-width: 420px) {
	.wrap, .wrap-n, .wrap-r { padding-inline: 15px; }
	.brand svg, .brand img { height: 26px; }
	.brand-text { font-size: 1.18rem; }
	.hero-mini { grid-template-columns: 66px 1fr; }
	.hero-mini img { width: 66px; height: 52px; }
	.pick-item { grid-template-columns: 84px 1fr; }
	.pick-item img { width: 84px; height: 66px; }
	.footer-grid { grid-template-columns: minmax(0, 1fr); }
	.trust-row { gap: 1rem 1.5rem; }
	.aw-consent-row { grid-template-columns: 1fr; }
	.author-box { padding: 1.35rem; }
}

@media (max-width: 340px) {
	.wrap, .wrap-n, .wrap-r { padding-inline: 12px; }
	.brand-text { font-size: 1.06rem; }
	.hero-cta { flex-direction: column; }
	.hero-cta .btn { width: 100%; }
	.trend-item { grid-template-columns: 30px 1fr; gap: .7rem; }
	.trend-num { font-size: 1.4rem; }
}

/* ---------- 18. Print ---------- */
@media print {
	.site-header, .site-footer, .to-top, .aw-consent, .toc, .post-nav, .drawer, .drawer-backdrop { display: none !important; }
	body { background: #FFF; font-size: 12pt; }
	.entry { max-width: none; }
	a { text-decoration: underline; }
}
