/* ==========================================================================
   Linkyway News — main styles
   ========================================================================== */

:root {
	/* Brand */
	--c-primary: #5a4ee6;
	--c-primary-600: #4a3ed2;
	--c-primary-400: #7d74ff;
	--c-primary-50: #f0eeff;
	--c-primary-100: #e2deff;
	--c-hot: #ff4d6d;

	/* Dark ("space") */
	--c-ink: #0d0b22;
	--c-night: #15123a;
	--c-night-2: #1e1a4f;
	--c-on-dark: #ffffff;
	--c-on-dark-muted: #a9a6d1;

	/* Light */
	--c-bg: #f5f5fa;
	--c-surface: #ffffff;
	--c-text: #17162b;
	--c-muted: #66647e;
	--c-border: #e6e5f0;

	--font-head: "Unbounded", "Manrope", system-ui, sans-serif;
	--font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--radius: 18px;
	--radius-sm: 12px;
	--shadow: 0 10px 30px -12px rgba(23, 18, 80, .18);
	--shadow-lg: 0 24px 50px -20px rgba(23, 18, 80, .35);
	--container: 1240px;
	--gutter: 24px;
	--header-h: 76px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	color: var(--c-text);
	background: var(--c-bg);
	-webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--c-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--c-primary-600); }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .6em; line-height: 1.25; font-weight: 800; color: inherit; }
p { margin: 0 0 1em; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--c-primary-400); outline-offset: 2px; border-radius: 4px; }
.icon { flex-shrink: 0; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; word-wrap: normal !important;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; z-index: 1000; top: 8px; left: 8px;
	padding: 10px 16px; background: #fff; color: var(--c-text); border-radius: 8px;
}

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: calc(860px + var(--gutter) * 2); }

/* --------------------------------------------------------------------------
   Buttons, pills, chips
   -------------------------------------------------------------------------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 13px 26px; border: 2px solid transparent; border-radius: 999px;
	font-weight: 700; font-size: 15px; line-height: 1.2; text-transform: uppercase; letter-spacing: .02em;
	transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--sm { padding: 9px 18px; font-size: 13px; }
.btn--primary { background: var(--c-primary); color: #fff; }
.btn--primary:hover { background: var(--c-primary-600); color: #fff; }
.btn--light { background: #fff; color: var(--c-text); }
.btn--light:hover { background: var(--c-primary-50); color: var(--c-primary-600); }
.btn--ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.btn--ghost:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }

.pill {
	display: inline-block; padding: 5px 12px; border-radius: 999px;
	background: var(--c-primary); color: #fff;
	font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; line-height: 1.3;
}
.pill:hover { background: var(--c-primary-600); color: #fff; }
.pill--text { padding: 0; background: none; color: var(--c-primary); }
.pill--text:hover { background: none; color: var(--c-primary-600); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.chip {
	padding: 7px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2);
	color: #fff; font-size: 14px; font-weight: 600;
}
.chip:hover { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

.icon-btn {
	display: inline-grid; place-items: center; width: 42px; height: 42px;
	border: 0; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff;
	transition: background .2s;
}
.icon-btn:hover { background: var(--c-primary); }
.link-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: inherit; font-size: inherit; }
.link-btn:hover { color: #fff; }

/* --------------------------------------------------------------------------
   Meta
   -------------------------------------------------------------------------- */
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; color: var(--c-muted); font-size: 13px; font-weight: 500; }
.meta__item { display: inline-flex; align-items: center; gap: 6px; color: inherit; }
a.meta__item:hover { color: var(--c-primary); }
.meta__author a { color: inherit; font-weight: 700; }
.meta__avatar { width: 28px; height: 28px; border-radius: 50%; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 100; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }

.topbar { background: var(--c-ink); color: var(--c-on-dark-muted); font-size: 13px; border-bottom: 1px solid rgba(255,255,255,.06); }
.topbar__inner { display: flex; align-items: center; gap: 24px; min-height: 38px; }
.topbar__date { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.topbar__trending { display: flex; align-items: center; gap: 14px; overflow: hidden; white-space: nowrap; flex: 1; }
.topbar__trending a { color: var(--c-on-dark-muted); }
.topbar__trending a:hover { color: #fff; }
.topbar__label { display: inline-flex; align-items: center; gap: 4px; color: var(--c-hot); font-weight: 800; text-transform: uppercase; font-size: 11px; letter-spacing: .08em; }
.topbar .socials { margin-left: auto; }

.socials { display: flex; gap: 8px; }
.socials a {
	display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
	color: var(--c-on-dark-muted); background: rgba(255,255,255,.06);
}
.socials a:hover { background: var(--c-primary); color: #fff; }

.header-main {
	position: relative;
	background:
		radial-gradient(1200px 200px at 85% -40%, rgba(125,116,255,.35), transparent 70%),
		linear-gradient(90deg, var(--c-ink), var(--c-night) 60%, var(--c-night-2));
	color: #fff;
	transition: box-shadow .2s;
}
.is-scrolled .header-main { box-shadow: 0 8px 30px rgba(0,0,0,.35); }
.header-main__inner { display: flex; align-items: center; gap: 32px; min-height: var(--header-h); }
.header-main__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.logo { display: inline-flex; align-items: center; gap: 12px; color: #fff; }
.logo:hover { color: #fff; }
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__name { margin: 0; font-family: var(--font-head); font-size: 22px; font-weight: 800; letter-spacing: .01em; text-transform: uppercase; }
.logo__tagline { margin-top: 6px; font-size: 9px; letter-spacing: .32em; text-transform: uppercase; color: var(--c-primary-400); font-weight: 700; }
.custom-logo-link img { max-height: 52px; width: auto; }

.nav .menu { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav .menu > li { position: relative; }
.nav .menu > li > a {
	display: block; padding: 10px 14px; border-radius: 999px;
	color: #fff; font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .03em;
}
.nav .menu > li > a:hover,
.nav .menu > li.current-menu-item > a,
.nav .menu > li.current-category-ancestor > a,
.nav .menu > li.current-post-ancestor > a,
.nav .menu > li.current-menu-ancestor > a { background: rgba(125,116,255,.22); color: #fff; }
.nav .sub-menu {
	position: absolute; top: 100%; left: 0; min-width: 220px; margin: 8px 0 0; padding: 8px; list-style: none;
	background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s;
}
.nav .sub-menu::before { content: ""; position: absolute; inset: -10px 0 auto; height: 10px; }
.nav li:hover > .sub-menu, .nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.nav .sub-menu a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--c-text); font-weight: 600; font-size: 14px; }
.nav .sub-menu a:hover { background: var(--c-primary-50); color: var(--c-primary); }

.nav-toggle { display: none; }
.nav-toggle__close { display: none; }
.nav-open .nav-toggle__open { display: none; }
.nav-open .nav-toggle__close { display: block; }

.search-panel { background: var(--c-night); border-top: 1px solid rgba(255,255,255,.08); padding: 18px 0; }
.search-form { display: flex; align-items: center; gap: 10px; position: relative; }
.search-form__icon { position: absolute; left: 18px; color: var(--c-muted); display: flex; }
.search-form__input {
	flex: 1; min-width: 0; height: 52px; padding: 0 20px 0 50px;
	border: 1px solid var(--c-border); border-radius: 999px; background: #fff;
	font: inherit; font-size: 16px; color: var(--c-text);
}
.search-form__input:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 4px var(--c-primary-100); }
.search-form .btn { height: 52px; }

/* Ticker */
.ticker { background: #fff; border-bottom: 1px solid var(--c-border); }
.ticker__inner { display: flex; align-items: center; gap: 16px; height: 46px; }
.ticker__label {
	display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
	padding: 6px 14px; border-radius: 999px; background: var(--c-primary); color: #fff;
	font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
}
.ticker__dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: lw-pulse 1.4s infinite; }
@keyframes lw-pulse { 50% { opacity: .25; } }
.ticker__viewport { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 30px, #000 calc(100% - 30px), transparent); }
.ticker__track { display: flex; gap: 40px; width: max-content; animation: lw-ticker 60s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__item { display: inline-flex; align-items: center; gap: 10px; color: var(--c-text); font-weight: 600; font-size: 14px; white-space: nowrap; }
.ticker__item time { color: var(--c-primary); font-weight: 800; font-size: 12px; }
.ticker__item:hover { color: var(--c-primary); }
@keyframes lw-ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker__track { animation: none; } .ticker__dot { animation: none; } }

/* Reading progress */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200; pointer-events: none; }
.admin-bar .progress { top: 32px; }
.progress__bar { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--c-primary-400), var(--c-hot)); }

/* --------------------------------------------------------------------------
   Page hero (dark band)
   -------------------------------------------------------------------------- */
.page-hero {
	position: relative; overflow: hidden;
	padding: 36px 0 56px;
	color: #fff;
	background:
		radial-gradient(600px 300px at 90% 10%, rgba(125,116,255,.35), transparent 70%),
		radial-gradient(500px 260px at 10% 120%, rgba(90,78,230,.35), transparent 70%),
		var(--c-ink);
}
.page-hero::before {
	content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
	background-image:
		radial-gradient(1px 1px at 12% 30%, #fff, transparent),
		radial-gradient(1px 1px at 32% 70%, #fff, transparent),
		radial-gradient(1.5px 1.5px at 58% 22%, #fff, transparent),
		radial-gradient(1px 1px at 74% 64%, #fff, transparent),
		radial-gradient(1px 1px at 88% 38%, #fff, transparent),
		radial-gradient(1.5px 1.5px at 44% 86%, #fff, transparent),
		radial-gradient(1px 1px at 6% 80%, #fff, transparent);
}
.page-hero > .container { position: relative; }
.page-hero--compact { padding-bottom: 44px; }
.page-hero__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.page-hero__label {
	display: inline-block; margin-bottom: 14px; color: var(--c-primary-400);
	font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
}
.page-hero__title {
	margin: 0; font-family: var(--font-head); font-weight: 800; text-transform: uppercase;
	font-size: clamp(30px, 4.6vw, 54px); line-height: 1.08; letter-spacing: -.01em;
}
.page-hero__desc { max-width: 680px; margin-top: 16px; color: var(--c-on-dark-muted); font-size: 17px; }
.page-hero__desc p:last-child { margin: 0; }
.page-hero__stat { flex-shrink: 0; padding: 16px 22px; border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); text-align: center; background: rgba(255,255,255,.04); }
.page-hero__stat strong { display: block; font-family: var(--font-head); font-size: 32px; line-height: 1; }
.page-hero__stat span { color: var(--c-on-dark-muted); font-size: 13px; }
.page-hero__meta { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 18px; color: var(--c-on-dark-muted); font-size: 14px; }
.page-hero__meta > span { display: inline-flex; align-items: center; gap: 6px; }
.page-hero__search { max-width: 640px; margin-top: 24px; }
.page-hero--404 { padding: 80px 0 90px; text-align: center; }
.page-hero--404 .page-hero__desc, .page-hero--404 .page-hero__search { margin-left: auto; margin-right: auto; }
.page-hero--404 .btn { margin-top: 24px; }
.err-code {
	display: block; font-family: var(--font-head); font-weight: 800; font-size: clamp(90px, 18vw, 180px); line-height: 1;
	background: linear-gradient(135deg, #fff, var(--c-primary-400)); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 26px; font-size: 13px; color: var(--c-on-dark-muted); }
.breadcrumbs a { color: var(--c-on-dark-muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.25); }
.breadcrumbs a:hover { color: #fff; }
.breadcrumbs [aria-current] { color: #fff; font-weight: 600; }
.breadcrumbs__sep { display: inline-flex; opacity: .5; }

/* Single post head */
.page-hero--post { padding-bottom: 64px; }
.post-head { max-width: 900px; }
.post-head__title {
	margin: 18px 0 0; font-family: var(--font-head); font-weight: 800; text-transform: uppercase;
	font-size: clamp(26px, 3.8vw, 46px); line-height: 1.12;
}
.post-head__lead { margin: 18px 0 0; color: var(--c-on-dark-muted); font-size: 19px; line-height: 1.55; }
.post-head .meta { margin-top: 26px; color: var(--c-on-dark-muted); font-size: 14px; }
.post-head .meta a:hover { color: #fff; }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; padding-top: 48px; padding-bottom: 64px; }
.layout--post { padding-top: 0; }
.layout--post .layout__main { margin-top: -32px; }
.layout--post .sidebar { padding-top: 40px; }
.block + .block { margin-top: 48px; }

.section-title {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	margin-bottom: 24px; padding-bottom: 14px; border-bottom: 2px solid var(--c-border); position: relative;
}
.section-title::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 64px; height: 2px; background: var(--c-primary); }
.section-title__text { margin: 0; font-family: var(--font-head); font-size: 20px; text-transform: uppercase; letter-spacing: .01em; }
.section-title__link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.section-title__link .icon { transition: transform .2s; }
.section-title__link:hover .icon { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.thumb { position: relative; overflow: hidden; background: var(--c-night); aspect-ratio: 16 / 10; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.thumb__placeholder {
	position: absolute; inset: 0; display: grid; place-items: center;
	background: radial-gradient(circle at 70% 20%, rgba(125,116,255,.55), transparent 60%), linear-gradient(135deg, var(--c-night), var(--c-ink));
}
.thumb__placeholder svg { width: 22%; height: auto; opacity: .85; }
.card:hover .thumb img { transform: scale(1.05); }

.card__title { margin: 0; font-weight: 800; line-height: 1.3; }
.card__title a { color: var(--c-text); background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .3s, color .2s; }
.card__title a:hover { color: var(--c-primary); background-size: 100% 2px; }
.card__excerpt { margin: 0; color: var(--c-muted); font-size: 15px; line-height: 1.55; }
.card__media { display: block; }

/* grid */
.card--grid { display: flex; flex-direction: column; background: var(--c-surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--c-border); transition: box-shadow .25s, transform .25s; }
.card--grid:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card--grid .card__body { display: flex; flex-direction: column; gap: 12px; padding: 20px 22px 22px; flex: 1; }
.card--grid .card__body .pill { align-self: flex-start; }
.card--grid .card__title { font-size: 19px; }
.card--grid .meta { margin-top: auto; padding-top: 4px; }

/* list */
.post-list { display: flex; flex-direction: column; gap: 20px; }
.card--list { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; padding: 16px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); transition: box-shadow .25s; }
.card--list:hover { box-shadow: var(--shadow); }
.card--list .thumb { border-radius: var(--radius-sm); height: 100%; width: 100%;}
.card--list .card__body { display: flex; flex-direction: column; gap: 10px; padding: 6px 8px 6px 0; }
.card--list .card__body .pill { align-self: flex-start; }
.card--list .card__title { font-size: 21px; }
.card--list .meta { margin-top: auto; }

/* side */
.card--side { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; align-items: center; }
.card--side .thumb { border-radius: var(--radius-sm); aspect-ratio: 4 / 3; }
.card--side .card__body { display: flex; flex-direction: column; gap: 6px; }
.card--side .card__title { font-size: 15px; line-height: 1.35; }
.card--side .meta { font-size: 12px; }

/* mini (numbered) */
.card--mini { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--c-border); }
.card--mini:last-child { border-bottom: 0; }
.card__num { flex-shrink: 0; font-family: var(--font-head); font-weight: 800; font-size: 22px; line-height: 1.1; color: var(--c-primary-100); }
.card--mini:hover .card__num { color: var(--c-primary); }
.card--mini .card__body { display: flex; flex-direction: column; gap: 6px; }
.card--mini .card__title { font-size: 15px; line-height: 1.4; }
.card--mini .meta { font-size: 12px; }

/* hero */
.card--hero { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--c-ink); color: #fff; min-height: 460px; height: 100%; isolation: isolate; }
.card--hero .card__media, .card--hero .thumb { position: absolute; inset: 0; aspect-ratio: auto; height: 100%; }
.card--hero .card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,11,34,0) 25%, rgba(13,11,34,.65) 55%, rgba(13,11,34,.95)); }
.card--hero .card__overlay { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 36px; pointer-events: none; }
.card--hero .card__overlay a { pointer-events: auto; }
.card--hero .card__title { font-family: var(--font-head); text-transform: uppercase; font-size: clamp(22px, 2.6vw, 34px); line-height: 1.15; }
.card--hero .card__title a { color: #fff; }
.card--hero .card__title a:hover { color: #fff; }
.card--hero .card__excerpt { color: rgba(255,255,255,.78); max-width: 620px; }
.card--hero .meta { color: rgba(255,255,255,.75); }

/* Home hero */
.hero { padding: 32px 0 8px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 28px; }
.hero__side { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; padding: 22px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); }
.hero__side .card--side + .card--side { padding-top: 16px; border-top: 1px solid var(--c-border); }

/* Grids */
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.post-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.archive-lead { margin-bottom: 24px; }
.archive-lead .card--hero { min-height: 420px; }

/* Category blocks */
.cat-blocks { padding: 56px 0 72px; background: var(--c-surface); border-top: 1px solid var(--c-border); }
.cat-blocks__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.cat-block .card--grid { margin-bottom: 6px; }
.cat-block .card--grid .card__excerpt { display: none; }
.cat-block .card--mini .card__num { display: none; }

/* Related */
.related { padding: 56px 0 72px; background: var(--c-surface); border-top: 1px solid var(--c-border); }

/* --------------------------------------------------------------------------
   Sidebar & widgets
   -------------------------------------------------------------------------- */
.sidebar__sticky { position: sticky; top: calc(var(--header-h) + 100px); display: flex; flex-direction: column; gap: 24px; }
.admin-bar .sidebar__sticky { top: calc(var(--header-h) + 132px); }
.widget { padding: 24px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); }
.widget__title { display: flex; margin: 0 0 8px; padding-bottom: 12px; border-bottom: 2px solid var(--c-primary-100); font-size: 18px; }
.widget__title span { display: inline-flex; align-items: center; gap: 8px; }
.widget--popular .icon-fire { color: #ff9d2e; }
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget > ul li, .widget .menu li { padding: 8px 0; border-bottom: 1px solid var(--c-border); }
.widget > ul li:last-child { border-bottom: 0; }

.cat-list li { padding: 0 !important; border: 0 !important; }
.cat-list a { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; margin: 0 -12px; border-radius: 10px; color: var(--c-text); font-weight: 600; }
.cat-list a:hover { background: var(--c-primary-50); color: var(--c-primary); }
.cat-list__count { min-width: 30px; padding: 2px 8px; border-radius: 999px; background: var(--c-bg); color: var(--c-muted); font-size: 12px; font-weight: 700; text-align: center; }
.cat-list a:hover .cat-list__count { background: var(--c-primary); color: #fff; }
.widget--cats .widget__title { margin-bottom: 12px; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.widget--tags .widget__title { margin-bottom: 16px; }
.tag-cloud a { padding: 6px 12px; border-radius: 999px; background: var(--c-bg); color: var(--c-text); font-size: 13px !important; font-weight: 600; }
.tag-cloud a:hover { background: var(--c-primary); color: #fff; }

.widget--cta { padding: 0; border: 0; background: none; }
.cta-box {
	position: relative; overflow: hidden; padding: 28px; border-radius: var(--radius); color: #fff;
	background: radial-gradient(260px 160px at 100% 0, rgba(255,255,255,.25), transparent 70%), linear-gradient(140deg, var(--c-primary), var(--c-night-2));
}
.cta-box .logo__mark { width: 52px; height: 52px; margin-bottom: 14px; }
.cta-box__title { font-family: var(--font-head); font-size: 20px; text-transform: uppercase; }
.cta-box p { color: rgba(255,255,255,.82); font-size: 15px; }
.cta-box .btn { width: 100%; margin-top: 6px; }

/* --------------------------------------------------------------------------
   Entry (single, page)
   -------------------------------------------------------------------------- */
.entry { min-width: 0; }
.layout--post .entry { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 40px 48px 48px; position: relative; z-index: 2; }
.entry__cover { margin: -40px -48px 36px; }
.entry__cover img { width: 100%; border-radius: var(--radius) var(--radius) 0 0; }
.entry__cover figcaption { padding: 10px 48px 0; color: var(--c-muted); font-size: 13px; }

.entry--page { margin: -28px 0 72px; padding: 48px 56px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); position: relative; }
.entry--page .entry__cover { margin: -48px -56px 36px; }

.entry__footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--c-border); }

.share { display: flex; align-items: center; gap: 8px; }
.share__label { margin-right: 4px; color: var(--c-muted); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.share__btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--c-border); background: #fff; color: var(--c-text); transition: .2s; }
.share__btn:hover { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.share__btn.is-copied { background: #22c55e; border-color: #22c55e; color: #fff; }

.author-box { display: flex; gap: 20px; align-items: flex-start; margin-top: 32px; padding: 24px; border-radius: var(--radius); background: var(--c-primary-50); }
.author-box__avatar { width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0; }
.author-box__label { display: block; color: var(--c-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.author-box__name { display: inline-block; margin: 2px 0 6px; color: var(--c-text); font-size: 19px; font-weight: 800; }
.author-box__bio { margin: 0; color: var(--c-muted); font-size: 15px; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.post-nav__item { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border: 1px solid var(--c-border); border-radius: var(--radius-sm); color: var(--c-text); transition: .2s; }
.post-nav__item:hover { border-color: var(--c-primary); color: var(--c-primary); }
.post-nav__item span { color: var(--c-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.post-nav__item strong { font-size: 15px; line-height: 1.4; }
.post-nav__item--next { grid-column: 2; text-align: right; }

/* TOC */
.toc { margin: 0 0 36px; border: 1px solid var(--c-border); border-radius: var(--radius); background: var(--c-bg); overflow: hidden; }
.toc__head { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 16px 22px; border: 0; background: none; color: var(--c-text); text-align: left; }
.toc__title { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; }
.toc__title .icon { color: var(--c-primary); }
.toc__toggle { display: inline-flex; transform: rotate(90deg); transition: transform .2s; color: var(--c-muted); }
.toc.is-collapsed .toc__toggle { transform: rotate(0); }
.toc.is-collapsed .toc__list { display: none; }
.toc__list { margin: 0; padding: 0 22px 18px 22px; list-style: none; counter-reset: toc; }
.toc__item { counter-increment: toc; }
.toc__item a { display: flex; gap: 10px; padding: 7px 10px; margin: 0 -10px; border-radius: 8px; color: var(--c-text); font-size: 15px; font-weight: 500; line-height: 1.45; }
.toc__item--h2 a::before { content: counter(toc) "."; color: var(--c-primary); font-weight: 800; min-width: 22px; }
.toc__item--h3 { counter-increment: none; }
.toc__item--h3 a { padding-left: 42px; font-size: 14px; color: var(--c-muted); }
.toc__item a:hover, .toc__item a.is-active { background: var(--c-primary-50); color: var(--c-primary); }

/* --------------------------------------------------------------------------
   Prose (post content)
   -------------------------------------------------------------------------- */
.prose { font-size: 18px; line-height: 1.75; color: #24233a; overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { margin: 1.8em 0 .6em; font-size: 28px; line-height: 1.25; text-transform: uppercase; letter-spacing: -.005em; }
.prose h3 { margin: 1.6em 0 .5em; font-size: 22px; }
.prose h4 { margin: 1.4em 0 .4em; font-size: 19px; }
.prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--c-primary-100); }
.prose a:hover { text-decoration-color: currentColor; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose ul li::marker { color: var(--c-primary); }
.prose ol li::marker { color: var(--c-primary); font-weight: 800; }
.prose strong { color: var(--c-text); }
.prose img { border-radius: var(--radius-sm); }
.prose figure { margin-left: 0; margin-right: 0; }
.prose figcaption, .prose .wp-element-caption { margin-top: 8px; color: var(--c-muted); font-size: 14px; text-align: center; }
.prose blockquote, .prose .wp-block-quote {
	margin-left: 0; margin-right: 0; padding: 22px 26px; border-left: 4px solid var(--c-primary);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--c-primary-50); font-size: 19px; font-weight: 600; color: var(--c-text);
}
.prose blockquote p + p { margin-top: .6em; }
.prose blockquote cite { display: block; margin-top: 10px; color: var(--c-muted); font-size: 14px; font-style: normal; font-weight: 700; }
.prose hr { border: 0; height: 1px; background: var(--c-border); margin: 2.4em 0; }
.prose code { padding: 2px 6px; border-radius: 6px; background: var(--c-bg); font-size: .88em; }
.prose pre { padding: 20px; border-radius: var(--radius-sm); background: var(--c-ink); color: #e6e4ff; overflow: auto; font-size: 14px; }
.prose pre code { padding: 0; background: none; }
.prose table, .prose .wp-block-table table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.prose .wp-block-table, .prose .table-wrap { overflow-x: auto; border: 1px solid var(--c-border); border-radius: var(--radius-sm); }
.prose th, .prose td { padding: 12px 16px; border-bottom: 1px solid var(--c-border); text-align: left; vertical-align: top; }
.prose th { background: var(--c-night); color: #fff; font-weight: 700; font-size: 14px; white-space: nowrap; }
.prose tbody tr:nth-child(even) td { background: #fafafe; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose .wp-block-table:not(:has(> table)) { border: 0; }
.prose .wp-block-table table { border: 0; }
.prose .wp-block-button__link { border-radius: 999px; background: var(--c-primary); padding: 12px 26px; font-weight: 700; text-decoration: none; }
.prose .alignwide { margin-left: -24px; margin-right: -24px; }
.prose .alignleft { float: left; margin: .3em 1.4em 1em 0; }
.prose .alignright { float: right; margin: .3em 0 1em 1.4em; }
.prose .aligncenter { margin-left: auto; margin-right: auto; }
.page-links { margin-top: 24px; font-weight: 700; }

/* Legal pages */
.page-hero--legal { padding-bottom: 72px; }
.legal { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; align-items: start; padding-bottom: 72px; }
.legal__aside { position: relative; z-index: 2; margin-top: -32px; }
.legal__sticky { position: sticky; top: calc(var(--header-h) + 100px); display: flex; flex-direction: column; gap: 20px; }
.toc--aside { margin: 0; background: var(--c-surface); }
.toc--aside .toc__list { max-height: 55vh; overflow: auto; }
.legal__menu { padding: 18px 22px; border: 1px solid var(--c-border); border-radius: var(--radius); background: var(--c-surface); }
.legal__menu ul { margin: 0; padding: 0; list-style: none; }
.legal__menu a { display: block; padding: 7px 0; color: var(--c-text); font-weight: 600; font-size: 15px; }
.legal__menu a:hover, .legal__menu .current-menu-item > a { color: var(--c-primary); }
.entry--legal { margin-top: -32px; padding: 48px 56px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); position: relative; z-index: 2; }
.entry--legal .prose { font-size: 17px; }
.entry--legal .prose h2 { font-size: 22px; padding-top: 1em; border-top: 1px solid var(--c-border); }
.entry--legal .prose h2:first-child { padding-top: 0; border-top: 0; }

/* Empty state */
.empty { padding: 48px 32px; text-align: center; background: var(--c-surface); border: 1px dashed var(--c-border); border-radius: var(--radius); }
.empty__icon { display: inline-grid; place-items: center; width: 72px; height: 72px; margin-bottom: 16px; border-radius: 50%; background: var(--c-primary-50); color: var(--c-primary); }
.empty__title { font-family: var(--font-head); text-transform: uppercase; }
.empty .search-form { max-width: 520px; margin: 20px auto 0; }

/* Pagination */
.pagination { margin-top: 40px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.page-numbers {
	display: inline-grid; place-items: center; min-width: 46px; height: 46px; padding: 0 12px;
	border-radius: 999px; border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-text); font-weight: 700;
}
.page-numbers:hover { border-color: var(--c-primary); color: var(--c-primary); }
.page-numbers.current { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.page-numbers.dots { border: 0; background: none; }
.page-numbers.prev .icon { transform: rotate(180deg); }

/* Comments */
.comments { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--c-border); }
.comments__title, .comment-reply-title { font-size: 22px; }
.comment-list { margin: 0 0 32px; padding: 0; list-style: none; }
.comment-list .children { margin: 0; padding-left: 32px; list-style: none; }
.comment-body { padding: 20px 0; border-bottom: 1px solid var(--c-border); }
.comment-author { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.comment-author .avatar { border-radius: 50%; }
.comment-author .says { display: none; }
.comment-metadata { margin: 4px 0 10px 56px; font-size: 13px; }
.comment-metadata a { color: var(--c-muted); }
.comment-content { margin-left: 56px; }
.reply { margin-left: 56px; font-size: 14px; font-weight: 700; }
.comment-form { display: grid; gap: 16px; }
.comment-form label { display: block; margin-bottom: 6px; font-weight: 700; font-size: 14px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 14px 18px; border: 1px solid var(--c-border); border-radius: var(--radius-sm); font: inherit; background: #fff;
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 4px var(--c-primary-100); }
.comment-form-cookies-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.comment-form-cookies-consent label { font-weight: 500; margin: 0; }
.comment-form-cookies-consent input { accent-color: var(--c-primary); margin-top: 4px; }
.form-submit { margin: 0; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
	color: var(--c-on-dark-muted);
	background: radial-gradient(700px 300px at 90% 0, rgba(90,78,230,.28), transparent 70%), var(--c-ink);
}
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-top: 64px; padding-bottom: 48px; }
.site-footer__about p { margin: 20px 0; font-size: 15px; max-width: 340px; }
.site-footer .widget__title { border-bottom-color: rgba(255,255,255,.1); color: #fff; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; }
.site-footer .widget { padding: 0; background: none; border: 0; }
.footer-list, .site-footer .widget ul { margin: 0; padding: 0; list-style: none; }
.footer-list li, .site-footer .widget li { padding: 6px 0; border: 0; }
.site-footer a { color: var(--c-on-dark-muted); }
.site-footer a:hover { color: #fff; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.08); }
.site-footer__bottom-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 20px; padding-bottom: 20px; font-size: 14px; }
.site-footer__bottom p { margin: 0; }
.legal-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none; }

/* Back to top */
.to-top {
	position: fixed; right: 24px; bottom: 24px; z-index: 90;
	display: grid; place-items: center; width: 52px; height: 52px; border: 0; border-radius: 50%;
	background: var(--c-primary); color: #fff; box-shadow: 0 10px 24px -6px rgba(90,78,230,.6);
	opacity: 0; visibility: hidden; transform: translateY(10px); transition: .25s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--c-primary-600); }
.cookie-visible .to-top { bottom: 110px; }

/* Cookie banner */
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 150; display: flex; justify-content: center; pointer-events: none; }
.cookie[hidden] { display: none; }
.cookie__inner {
	pointer-events: auto; display: flex; align-items: center; gap: 18px; max-width: 980px; width: 100%;
	padding: 16px 18px 16px 22px; border-radius: 22px; color: #fff;
	background: linear-gradient(120deg, var(--c-primary), var(--c-night-2)); box-shadow: var(--shadow-lg);
	animation: lw-up .4s ease;
}
@keyframes lw-up { from { opacity: 0; transform: translateY(20px); } }
.cookie__icon { font-size: 26px; }
.cookie__text { flex: 1; margin: 0; font-size: 14px; line-height: 1.5; }
.cookie__text a { color: #fff; text-decoration: underline; }
.cookie__actions { display: flex; gap: 8px; flex-shrink: 0; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
	.nav .menu > li > a { padding: 10px 10px; font-size: 13px; }
	.header-main__cta { display: none; }
}

@media (max-width: 1024px) {
	:root { --header-h: 66px; }
	.layout { grid-template-columns: minmax(0, 1fr); }
	.sidebar__sticky { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.layout--post .sidebar { padding-top: 0; }
	.hero__grid { grid-template-columns: minmax(0, 1fr); }
	.hero__side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
	.hero__side .card--side + .card--side { padding-top: 0; border-top: 0; }
	.cat-blocks__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.site-footer__grid { grid-template-columns: 1fr 1fr; }
	.legal { grid-template-columns: minmax(0, 1fr); }
	.legal__sticky { position: static; }
	.legal__aside { margin-top: -32px; }
	.entry--legal { margin-top: 0; }
	.toc--aside .toc__list { max-height: none; }

	/* Mobile nav */
	.nav-toggle { display: inline-grid; }
	.nav {
		position: fixed; top: 0; right: 0; bottom: 0; z-index: 120; width: min(340px, 86vw);
		padding: 90px 20px 30px; overflow-y: auto; background: var(--c-ink);
		transform: translateX(100%); visibility: hidden; transition: transform .3s ease, visibility .3s; box-shadow: -20px 0 40px rgba(0,0,0,.4);
	}
	.nav-open .nav { transform: none; visibility: visible; }
	.nav-open .nav-toggle { position: relative; z-index: 130; }
	.nav-open::after { content: ""; position: fixed; inset: 0; z-index: 110; background: rgba(13,11,34,.6); }
	.nav-open { overflow: hidden; }
	.nav .menu { flex-direction: column; align-items: stretch; gap: 2px; }
	.nav .menu > li > a { padding: 14px 16px; font-size: 15px; border-radius: 12px; }
	.nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; margin: 0 0 6px 12px; padding: 0; background: none; box-shadow: none; }
	.nav .sub-menu a { color: var(--c-on-dark-muted); }
	.nav .sub-menu a:hover { background: rgba(255,255,255,.06); color: #fff; }
	.header-main__actions { position: relative; z-index: 130; }
}

@media (max-width: 760px) {
	:root { --gutter: 16px; }
	.topbar__trending { display: none; }
	.logo__name { font-size: 18px; }
	.logo__mark { width: 36px; height: 36px; }
	.logo__tagline { display: none; }
	.ticker__label { padding: 5px 10px; }
	.hero { padding-top: 16px; }
	.card--hero { min-height: 400px; }
	.card--hero .card__overlay { padding: 22px; }
	.card--hero .card__excerpt { display: none; }
	.hero__side { grid-template-columns: minmax(0, 1fr); padding: 16px; }
	.hero__side .card--side + .card--side { padding-top: 14px; border-top: 1px solid var(--c-border); }
	.card--list { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 12px; }
	.card--list .thumb { height: auto; }
	.card--list .card__body { padding: 0 6px 6px; }
	.card--list .card__title { font-size: 19px; }
	.post-grid, .post-grid--3, .cat-blocks__grid { grid-template-columns: minmax(0, 1fr); }
	.sidebar__sticky { grid-template-columns: minmax(0, 1fr); }
	.page-hero { padding: 24px 0 44px; }
	.page-hero__row { flex-direction: column; align-items: flex-start; }
	.page-hero__stat { display: flex; align-items: baseline; gap: 8px; padding: 10px 16px; }
	.page-hero__stat strong { font-size: 22px; }
	.post-head__lead { font-size: 17px; }
	.layout { padding-top: 28px; gap: 32px; }
	.layout--post .entry, .entry--page, .entry--legal { padding: 24px 18px 28px; margin-left: calc(var(--gutter) * -1 + 6px); margin-right: calc(var(--gutter) * -1 + 6px); }
	.entry__cover { margin: -24px -18px 24px; }
	.entry--page .entry__cover { margin: -24px -18px 24px; }
	.entry__cover figcaption { padding: 8px 18px 0; }
	.prose { font-size: 17px; }
	.prose h2 { font-size: 22px; }
	.prose h3 { font-size: 19px; }
	.prose .alignleft, .prose .alignright { float: none; margin: 1em 0; }
	.prose .alignwide { margin-left: 0; margin-right: 0; }
	.post-nav { grid-template-columns: minmax(0, 1fr); }
	.post-nav__item--next { grid-column: auto; }
	.author-box { flex-direction: column; }
	.site-footer__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 48px; }
	.search-form .btn { padding: 0 18px; }
	.cookie { left: 8px; right: 8px; bottom: 8px; }
	.cookie__inner { flex-wrap: wrap; gap: 12px; padding: 16px; }
	.cookie__icon { display: none; }
	.cookie__actions { width: 100%; }
	.cookie__actions .btn { flex: 1; }
	.to-top { right: 16px; bottom: 16px; width: 46px; height: 46px; }
	.cookie-visible .to-top { bottom: 150px; }
}

/* Print (legal pages) */
@media print {
	.site-header, .site-footer, .sidebar, .legal__aside, .cookie, .to-top, .share, .comments, .related, .progress, .page-hero__meta .link-btn { display: none !important; }
	.page-hero { background: none; color: #000; padding: 0 0 20px; }
	.page-hero::before, .breadcrumbs { display: none; }
	.legal, .layout { display: block; }
	.entry--legal, .entry { margin: 0; padding: 0; border: 0; }
}
