:root {
  color-scheme: dark;
  --bg: #080816;
  --bg-soft: #0d0d20;
  --panel: #111126;
  --panel-2: #15152d;
  --panel-3: #1b1b36;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(167, 139, 250, .28);
  --text: #f8f8ff;
  --muted: #a7a7bc;
  --muted-2: #77778e;
  --accent: #818cf8;
  --accent-2: #a78bfa;
  --accent-3: #c084fc;
  --success: #34d399;
  --danger: #fb7185;
  --warning: #fbbf24;
  --shadow: 0 24px 70px rgba(0, 0, 0, .32);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --container: 1240px;
  --article: 820px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 50% -15%, rgba(99, 102, 241, .14), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
p, li, dd, figcaption, .prose, .article-lead { overflow-wrap: anywhere; }
a { color: inherit; text-decoration: none; }
:where(a, button, input, textarea, select, summary):focus-visible { outline: 3px solid rgba(167, 139, 250, .78); outline-offset: 3px; }
button, input, textarea, select { max-width: 100%; font: inherit; }
button { color: inherit; }
::selection { color: #fff; background: rgba(129, 140, 248, .55); }

.container { width: min(var(--container), calc(100% - 36px)); margin-inline: auto; }
.article-width { width: min(var(--article), calc(100% - 36px)); }
.section { padding-block: 74px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.honeypot { position: absolute !important; left: -10000px !important; }
.skip-link { position: fixed; z-index: 9999; left: 16px; top: -80px; padding: 10px 16px; border-radius: 10px; background: #fff; color: #111; transition: top .2s; }
.skip-link:focus { top: 16px; }
.portal-gradient { position: fixed; z-index: 1001; top: 0; inset-inline: 0; height: 4px; background: linear-gradient(90deg, #5b5cf6, #a855f7, #ec4899); }

.portal-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 8, 22, .86);
  backdrop-filter: blur(18px);
}
.portal-header__inner { min-height: 72px; display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; align-items: center; gap: 24px; }
.portal-logo { display: inline-flex; align-items: center; width: fit-content; }
.portal-logo img { width: 116px; height: auto; }
.portal-nav { display: flex; justify-content: center; align-items: center; gap: clamp(12px, 1.65vw, 26px); }
.portal-nav a { position: relative; color: #c8c8d8; font-size: .84rem; font-weight: 700; white-space: nowrap; transition: color .2s; }
.portal-nav a:hover, .portal-nav a:focus-visible, .portal-nav a.is-active { color: #fff; }
.portal-actions { display: flex; align-items: center; gap: 10px; }
.icon-link, .nav-toggle { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.035); cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.icon-link:hover, .nav-toggle:hover { border-color: var(--line-strong); background: rgba(129,140,248,.09); transform: translateY(-1px); }
.icon-link svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.nav-toggle { display: none; padding: 0 10px; }
.nav-toggle span { display: block; width: 18px; height: 2px; margin: 2px 0; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }


.home-hero { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); grid-template-rows: 1fr; gap: 18px; padding-top: 28px; }
.hero-lead, .hero-side-card { position: relative; min-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); box-shadow: var(--shadow); }
.hero-lead { min-height: 590px; }
.hero-lead__media, .hero-side-card__media { position: absolute; inset: 0; }
.hero-lead__media img, .hero-side-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease; }
@media (hover: hover) and (pointer: fine) { .hero-lead:hover img, .hero-side-card:hover img { transform: scale(1.035); } }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,5,15,.02) 22%, rgba(5,5,15,.38) 52%, rgba(5,5,15,.96) 100%); }
.hero-lead__content { position: absolute; z-index: 2; inset: auto 0 0; padding: clamp(28px, 4vw, 54px); }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.hero-badges a, .hero-badges span, .kind-badge, .new-badge { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 9px; border-radius: 7px; color: #ecebff; background: rgba(99,102,241,.85); font-size: .66rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; backdrop-filter: blur(8px); }
.hero-badges span:nth-child(2), .new-badge { background: rgba(236,72,153,.86); }
.hero-lead h1 { max-width: 940px; margin: 0; font-size: clamp(2rem, 4.4vw, 4.25rem); line-height: 1.02; letter-spacing: -.045em; text-wrap: balance; }
.hero-lead h1 a:hover { color: #dedcff; }
.hero-lead__content > p { max-width: 780px; margin: 18px 0 0; color: #d0d0df; font-size: clamp(.97rem, 1.3vw, 1.16rem); line-height: 1.62; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 18px; color: #aeaec1; font-size: .76rem; font-weight: 650; }
.hero-meta span + span { position: relative; }
.hero-meta span + span::before { content: ""; position: absolute; left: -9px; top: 50%; width: 3px; height: 3px; border-radius: 50%; background: #74748d; }
.hero-side { display: grid; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 18px; }
.hero-side-card { min-height: 285px; }
.hero-side-card__content { position: absolute; z-index: 2; inset: auto 0 0; padding: 24px; }
.hero-side-card h2 { margin: 11px 0 0; font-size: clamp(1.1rem, 1.6vw, 1.48rem); line-height: 1.18; letter-spacing: -.025em; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-heading--line { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.eyebrow { display: block; margin-bottom: 5px; color: var(--accent-2); font-size: .69rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.section-heading h2, .page-hero h1, .results-heading h2 { margin: 0; font-size: clamp(1.85rem, 3.1vw, 3rem); line-height: 1.08; letter-spacing: -.04em; }
.section-heading p { max-width: 650px; margin: 9px 0 0; color: var(--muted); }
.section-link { flex: 0 0 auto; color: #c7c4ff; font-size: .82rem; font-weight: 800; }
.section-link:hover { color: #fff; }

.current-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; gap: 34px; }
.portal-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 18px; }
.portal-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015)); transition: transform .25s, border-color .25s, box-shadow .25s; }
@media (hover: hover) and (pointer: fine) { .portal-card:hover { transform: translateY(-4px); border-color: rgba(129,140,248,.25); box-shadow: 0 18px 45px rgba(0,0,0,.25); } }
.portal-card__media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--panel-2); }
.portal-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
@media (hover: hover) and (pointer: fine) { .portal-card:hover .portal-card__media img { transform: scale(1.04); } }
.portal-card__shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(7,7,18,.6)); }
.portal-card__badges { position: absolute; inset: 12px auto auto 12px; display: flex; gap: 6px; }
.score-badge { position: absolute; inset: 12px 12px auto auto; padding: 5px 8px; border: 1px solid rgba(251,191,36,.32); border-radius: 8px; color: #fde68a; background: rgba(15,15,25,.78); font-size: .7rem; font-weight: 900; backdrop-filter: blur(7px); }
.score-badge--inline { position: static; }
.portal-card__body { padding: 18px; }
.portal-card h3 { margin: 0; font-size: 1.05rem; line-height: 1.27; letter-spacing: -.018em; }
.portal-card h3 a:hover { color: #cbc8ff; }
.portal-card__body > p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 9px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.52; }
.portal-card__meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 15px; color: var(--muted-2); font-size: .7rem; font-weight: 700; }

.trending-rail { position: sticky; top: 98px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(99,102,241,.08), rgba(255,255,255,.02)); }
.trending-rail__heading { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.trending-rail__heading h2 { margin: 0; font-size: 1.45rem; line-height: 1; }
.trending-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #6366f1, #a855f7); font-size: 1.2rem; font-weight: 900; }
.trending-rail ol { list-style: none; padding: 0; margin: 0; }
.trending-rail li { display: grid; grid-template-columns: 35px minmax(0,1fr); gap: 12px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.trending-rail li:last-child { padding-bottom: 0; border-bottom: 0; }
.trending-number { color: rgba(167,139,250,.64); font-size: 1.15rem; font-weight: 900; line-height: 1.25; }
.trending-rail a { display: block; font-size: .88rem; font-weight: 750; line-height: 1.32; }
.trending-rail a:hover { color: #c7c4ff; }
.trending-rail small { display: block; margin-top: 6px; color: var(--muted-2); font-size: .67rem; }

.category-block { border-top: 1px solid rgba(255,255,255,.025); }
.category-block__layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .9fr); gap: 30px; }
.category-feature { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); }
.category-feature__media { display: block; aspect-ratio: 16/8.6; overflow: hidden; }
.category-feature:hover img { transform: scale(1.025); }
.category-feature > div { padding: 25px; }
.category-feature h3 { margin: 13px 0 0; font-size: clamp(1.45rem, 2.4vw, 2.25rem); line-height: 1.13; letter-spacing: -.035em; }
.category-feature p { margin: 12px 0 0; color: var(--muted); }
.category-feature small, .category-list-card small { display: block; margin-top: 14px; color: var(--muted-2); }
.category-list { display: grid; align-content: start; }
.category-list-card { display: grid; grid-template-columns: 142px minmax(0,1fr); gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.category-list-card:first-child { padding-top: 0; }
.category-list-card__media { aspect-ratio: 16/10; overflow: hidden; border-radius: 11px; background: var(--panel-2); }
.category-list-card__media img { width: 100%; height: 100%; object-fit: cover; }
.category-list-card span { color: var(--accent-2); font-size: .65rem; font-weight: 900; text-transform: uppercase; }
.category-list-card h3 { margin: 5px 0 0; font-size: .95rem; line-height: 1.28; }
.category-list-card h3 a:hover { color: #c7c4ff; }

.page-hero { padding-top: 78px; padding-bottom: 38px; border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 900px; }
.page-hero > p { max-width: 730px; margin: 15px 0 0; color: var(--muted); font-size: 1.02rem; }
.listing-section { padding-top: 40px; }
.portal-card-grid--listing { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.results-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
.results-heading h2 { font-size: 1.55rem; }
.results-heading span { color: var(--muted); font-size: .82rem; }
.search-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; max-width: 780px; margin-top: 28px; }
.form-error { grid-column: 1 / -1; color: #fda4af; font-size: .8rem; font-weight: 700; }
[aria-invalid="true"] { border-color: rgba(251,113,133,.8) !important; box-shadow: 0 0 0 3px rgba(251,113,133,.12); }
.search-form input { flex: 1; min-width: 0; min-height: 50px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; outline: none; color: var(--text); background: var(--panel); }
.search-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(129,140,248,.1); }

.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 9px 16px; border: 1px solid var(--line); border-radius: 11px; color: var(--text); background: var(--panel-2); font-weight: 800; cursor: pointer; }
.button:hover { border-color: var(--line-strong); }
.button.primary { border-color: transparent; background: linear-gradient(135deg, #6366f1, #8b5cf6); box-shadow: 0 10px 28px rgba(99,102,241,.2); }
.empty-state { padding: 55px 26px; border: 1px dashed rgba(167,139,250,.3); border-radius: var(--radius); text-align: center; background: rgba(99,102,241,.04); }
.empty-state--large { margin-top: 45px; margin-bottom: 45px; }
.empty-state h1, .empty-state h2 { margin: 0; }
.empty-state p { color: var(--muted); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 45px; padding-top: 26px; border-top: 1px solid var(--line); }
.pagination a { padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: .8rem; font-weight: 800; }
.pagination span { color: var(--muted); font-size: .76rem; }

.article-page { padding-top: 58px; }
.article-header { text-align: center; }
.breadcrumbs { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; color: var(--muted-2); font-size: .76rem; }
.breadcrumbs a:hover { color: var(--accent-2); }
.article-kicker { display: flex; justify-content: center; flex-wrap: wrap; align-items: center; gap: 10px; }
.article-kicker > a { color: var(--accent-2); font-size: .72rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.article-header h1 { margin: 17px auto 0; font-size: clamp(2.25rem, 5.7vw, 5.2rem); line-height: 1.01; letter-spacing: -.055em; text-wrap: balance; }
.article-lead { max-width: 760px; margin: 22px auto 0; color: #bdbdcc; font-size: clamp(1.03rem, 1.65vw, 1.3rem); line-height: 1.62; }
.article-byline { display: inline-flex; align-items: center; gap: 12px; margin-top: 28px; text-align: left; }
.author-mark { width: 39px; height: 39px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(167,139,250,.3); border-radius: 50%; color: #fff; background: linear-gradient(135deg, #4f46e5, #9333ea); font-weight: 900; }
.author-mark--large { width: 62px; height: 62px; font-size: 1.35rem; }
.article-byline a { display: block; font-size: .83rem; font-weight: 850; }
.article-byline span { display: block; color: var(--muted-2); font-size: .7rem; }
.article-cover { margin-top: 42px; }
.article-cover img { width: 100%; max-height: 720px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.article-cover figcaption { margin-top: 9px; color: var(--muted-2); font-size: .7rem; text-align: center; }
.article-layout { display: grid; grid-template-columns: minmax(0, var(--article)) 260px; justify-content: center; align-items: start; gap: 55px; padding-top: 52px; }
.article-body { min-width: 0; }
.article-aside { min-width: 0; }
.sticky-box { position: sticky; top: 100px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(17,17,38,.9); backdrop-filter: blur(14px); }
.article-toc ol { list-style: none; padding: 0; margin: 12px 0 0; }
.article-toc li { margin: 9px 0; }
.article-toc li.level-3 { padding-left: 10px; }
.article-toc a { display: block; color: #b9b9ca; font-size: .74rem; line-height: 1.35; }
.article-toc a:hover { color: #fff; }
.share-box { top: 100px; margin-top: 14px; }
.share-box a, .share-box button { width: 100%; display: block; padding: 9px 0; border: 0; border-bottom: 1px solid var(--line); color: #c7c7d7; background: transparent; text-align: left; font-size: .77rem; cursor: pointer; }
.share-box a:hover, .share-box button:hover { color: var(--accent-2); }
.mobile-toc { display: none; }

.prose { color: #d8d8e4; font-size: 1.04rem; line-height: 1.82; }
.prose > :first-child { margin-top: 0; }
.prose h2, .prose h3, .prose h4 { scroll-margin-top: 100px; color: #fff; line-height: 1.2; letter-spacing: -.03em; }
.prose h2 { margin: 2.3em 0 .7em; font-size: clamp(1.55rem, 2.4vw, 2.25rem); }
.prose h3 { margin: 1.9em 0 .65em; font-size: 1.35rem; }
.prose h4 { margin: 1.6em 0 .55em; font-size: 1.1rem; }
.prose p { margin: 1.2em 0; }
.prose a { color: #b9b6ff; text-decoration: underline; text-decoration-color: rgba(185,182,255,.35); text-underline-offset: 3px; }
.prose a:hover { color: #fff; }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose li { margin: .5em 0; }
.prose li::marker { color: var(--accent-2); }
.prose blockquote { margin: 1.7em 0; padding: 18px 22px; border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; color: #cfcfe0; background: rgba(99,102,241,.07); }
.prose pre { max-width: 100%; overflow: auto; margin: 1.8em 0; padding: 20px; border: 1px solid var(--line); border-radius: 14px; color: #e7e7ef; background: #060611; font-size: .83rem; line-height: 1.65; }
.prose code { padding: .13em .35em; border-radius: 5px; color: #d8b4fe; background: rgba(168,85,247,.1); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.prose pre code { padding: 0; color: inherit; background: transparent; }
.prose table { width: 100%; display: block; overflow-x: auto; border-collapse: collapse; margin: 1.8em 0; font-size: .88rem; }
.prose th, .prose td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; }
.prose th { color: #fff; background: var(--panel-2); }
.prose hr { margin: 2.4em 0; border: 0; border-top: 1px solid var(--line); }
.prose img { border-radius: 14px; }

.tldr-box { margin: 0 0 34px; padding: 25px; border: 1px solid rgba(129,140,248,.25); border-radius: var(--radius); background: linear-gradient(135deg, rgba(99,102,241,.1), rgba(168,85,247,.045)); }
.tldr-box h2 { margin: 0; font-size: 1.35rem; }
.tldr-box ul { margin-bottom: 0; }
.review-block { margin: 42px 0; padding: 28px; border: 1px solid rgba(251,191,36,.22); border-radius: var(--radius-lg); background: linear-gradient(145deg, rgba(251,191,36,.055), rgba(255,255,255,.02)); }
.review-block__header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.review-block__header h2 { margin: 0; }
.review-block__header > strong { color: #fde68a; font-size: 2.5rem; line-height: 1; }
.review-block__header small { font-size: .8rem; }
.review-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.review-columns > div { padding: 17px; border-radius: 13px; background: rgba(255,255,255,.025); }
.review-columns h3 { margin: 0; font-size: 1rem; }
.review-pros h3 { color: var(--success); }
.review-cons h3 { color: var(--danger); }
.review-columns ul { margin-bottom: 0; }
.review-verdict { margin-bottom: 0 !important; padding-top: 20px; border-top: 1px solid var(--line); font-weight: 650; }
.article-sources { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); }
.article-sources h2 { margin-top: 0; font-size: 1.25rem; }
.article-sources ol { padding-left: 1.2em; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 34px; }
.article-tags a { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; color: #b8b8c8; background: rgba(255,255,255,.02); font-size: .72rem; text-decoration: none; }
.article-tags a:hover { color: #fff; border-color: var(--line-strong); }
.author-box { display: flex; gap: 18px; margin-top: 42px; padding: 25px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.author-box > div > span { color: var(--accent-2); font-size: .67rem; font-weight: 900; text-transform: uppercase; }
.author-box h2 { margin: 2px 0 0; font-size: 1.3rem; }
.author-box p { margin: 7px 0 0; color: var(--muted); font-size: .86rem; }
.portal-card-grid--related { grid-template-columns: repeat(4, minmax(0,1fr)); }

.comments-section { margin-top: 65px; padding-block: 70px; border-top: 1px solid var(--line); background: rgba(255,255,255,.018); }
.comments-list { display: grid; gap: 14px; }
.comments-list article { padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
.comments-list article > div { display: flex; justify-content: space-between; gap: 14px; }
.comments-list time { color: var(--muted-2); font-size: .72rem; }
.comments-list p { margin-bottom: 0; color: #c7c7d6; }
.comment-form { display: grid; gap: 15px; margin-top: 28px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.comment-form label { display: grid; gap: 6px; color: #cfcfde; font-size: .78rem; font-weight: 700; }
.comment-form input, .comment-form textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; outline: none; color: var(--text); background: #0b0b1b; resize: vertical; }
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--accent); }
.comment-form input:user-invalid, .comment-form textarea:user-invalid { border-color: var(--danger); }
.comment-form .button { min-height: 44px; width: fit-content; }
.comment-form .button[aria-busy="true"] { cursor: wait; opacity: .72; }
.comment-form small { color: var(--muted-2); }
.alert { margin: 15px 0; padding: 12px 14px; border-radius: 10px; }
.alert.success { color: #d1fae5; background: rgba(52,211,153,.1); }
.alert.error { color: #ffe4e6; background: rgba(251,113,133,.1); }

.page-content { display: grid; gap: 16px; padding-top: 35px; padding-bottom: 75px; }
.error-page { min-height: 56vh; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; border: 0; }
.error-page .button { margin-top: 15px; }

.portal-footer { margin-top: 90px; border-top: 1px solid var(--line); background: #060611; }
.portal-footer__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 50px; padding-block: 58px; }
.portal-footer__brand { grid-column: span 2; }
.portal-footer__brand img { width: 130px; }
.portal-footer__brand p { max-width: 380px; margin: 16px 0 0; color: var(--muted); font-size: .86rem; }
.portal-footer h2 { margin: 0 0 15px; color: #eeeef7; font-size: .77rem; letter-spacing: .08em; text-transform: uppercase; }
.footer-links { display: grid; gap: 9px; }
.footer-links a { color: #9e9eaf; font-size: .79rem; }
.footer-links a:hover { color: #fff; }
.portal-footer__bottom { border-top: 1px solid var(--line); }
.portal-footer__bottom .container { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: #6e6e82; font-size: .7rem; }
.portal-footer__bottom a { color: #9b98ff; }

@media (max-width: 1120px) {
  .portal-nav { gap: 13px; }
  .portal-nav a { font-size: .76rem; }
  .current-layout { grid-template-columns: minmax(0, 1fr) 290px; gap: 24px; }
  .portal-card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .portal-card-grid--listing, .portal-card-grid--related { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .article-layout { grid-template-columns: minmax(0, var(--article)) 225px; gap: 35px; }
}

@media (max-width: 900px) {
  .portal-header__inner { grid-template-columns: 1fr auto; min-height: 66px; }
  .portal-nav { position: absolute; top: calc(100% + 1px); left: 18px; right: 18px; display: none; max-height: calc(100vh - 90px); overflow: auto; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: rgba(12,12,30,.98); box-shadow: var(--shadow); }
  .portal-nav.is-open { display: grid; }
  .portal-nav a { min-height: 44px; display: flex; align-items: center; padding: 11px 12px; border-radius: 8px; font-size: .85rem; }
  .portal-nav a:hover, .portal-nav a.is-active { background: rgba(129,140,248,.1); }
  .nav-toggle { display: grid; }
  .home-hero, .current-layout, .category-block__layout { grid-template-columns: 1fr; }
  .hero-lead { min-height: 520px; }
  .hero-side { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .trending-rail { position: static; }
  .article-layout { grid-template-columns: minmax(0, var(--article)); }
  .article-aside { display: none; }
  .mobile-toc { display: block; margin-bottom: 25px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
  .mobile-toc summary { cursor: pointer; font-weight: 850; }
  .mobile-toc ol { margin-bottom: 0; }
  .portal-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .portal-footer__brand { grid-column: auto; }
}

@media (max-width: 680px) {
  .container, .article-width { width: min(100% - 28px, var(--container)); }
  .section { padding-block: 52px; }
  .home-hero { padding-top: 14px; gap: 12px; }
  .hero-lead { min-height: 480px; border-radius: 17px; }
  .hero-lead__content { padding: 24px 20px; }
  .hero-lead h1 { font-size: clamp(2rem, 10vw, 3.05rem); }
  .hero-lead__content > p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
  .hero-side { grid-template-columns: 1fr; gap: 12px; }
  .hero-side-card { min-height: 260px; }
  .section-heading { align-items: start; }
  .section-heading p { display: none; }
  .portal-card-grid, .portal-card-grid--listing, .portal-card-grid--related { grid-template-columns: 1fr; }
  .portal-card { display: grid; grid-template-columns: 125px minmax(0,1fr); }
  .portal-card__media { min-height: 132px; height: 100%; aspect-ratio: auto; }
  .portal-card__body { padding: 14px; }
  .portal-card h3 { font-size: .94rem; }
  .portal-card__body > p { display: none; }
  .portal-card__meta { display: block; }
  .portal-card__meta span:last-child { display: block; margin-top: 5px; }
  .portal-card__badges { inset: 7px auto auto 7px; }
  .portal-card__badges .new-badge { display: none; }
  .score-badge { inset: auto 7px 7px auto; }
  .category-feature > div { padding: 20px; }
  .category-list-card { grid-template-columns: 112px minmax(0,1fr); gap: 13px; }
  .page-hero { padding-top: 52px; }
  .search-form { grid-template-columns: 1fr; }
  .results-heading { display: block; }
  .results-heading span { display: block; margin-top: 6px; }
  .article-page { padding-top: 38px; }
  .article-header h1 { font-size: clamp(2rem, 11vw, 3.35rem); }
  .article-cover { margin-top: 30px; }
  .article-cover img { border-radius: 16px; }
  .article-layout { padding-top: 34px; }
  .prose { font-size: 1rem; line-height: 1.75; }
  .tldr-box, .review-block { padding: 20px; }
  .review-columns, .form-row { grid-template-columns: 1fr; }
  .review-block__header > strong { font-size: 2rem; }
  .author-box { align-items: flex-start; padding: 20px; }
  .portal-footer { margin-top: 60px; }
  .portal-footer__grid { grid-template-columns: 1fr 1fr; gap: 35px 20px; }
  .portal-footer__brand { grid-column: 1 / -1; }
  .portal-footer__grid > section:last-child { grid-column: auto; }
  .portal-footer__bottom .container { padding-block: 16px; flex-direction: column; justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Razgovori u komentarima. */
.comment-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(9, 16, 29, .76);
}
.comment-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.comment-meta > div { display: grid; gap: 3px; }
.comment-meta time { color: var(--muted); font-size: .75rem; }
.comment-card > p { margin: 12px 0 0; line-height: 1.72; }
.comment-reply-button,
.comment-reply-status button {
  min-height: 44px;
  border: 0;
  padding: 8px 2px;
  color: var(--accent-soft, #a5b4fc);
  background: transparent;
  font: inherit;
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
}
.comment-children {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-left: 18px;
  border-left: 2px solid rgba(129, 140, 248, .24);
}
.comment-reply-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(129, 140, 248, .28);
  border-radius: 10px;
  background: rgba(99, 102, 241, .08);
  color: var(--text);
  font-size: .8rem;
}
.comment-reply-status[hidden] { display: none; }
@media (max-width: 680px) {
  .comment-children { padding-left: 10px; }
  .comment-meta { align-items: center; }
  .comment-card { padding: 15px; }
  .comment-form { padding: 18px; }
  .comment-reply-status { align-items: flex-start; flex-direction: column; }
}

/* Javne stranice i raspored usklađeni s referentnom skriptom. */
.rubrike-heading { padding-top: 18px; }
.page-content > p { margin: 0 0 4px; }
.legal-updated,
.legal-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.018));
  box-shadow: 0 14px 38px rgba(0,0,0,.18);
}
.legal-card h2 { margin: 0 0 10px; font-size: 1.12rem; line-height: 1.25; }
.legal-card p { margin: 8px 0 0; color: var(--muted); }
.legal-card a { color: #c7c4ff; }
.contact-page-grid { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 22px; }
.contact-primary { align-self: start; }
.contact-primary .button { display: inline-flex; margin-top: 10px; color: #fff; }
.contact-info-grid { display: grid; gap: 14px; }
@media (max-width: 760px) {
  .contact-page-grid { grid-template-columns: 1fr; }
}

@media (min-width: 901px) {
  :root { --container: 1280px; }
  .portal-header__inner { min-height: 64px; }
  .portal-nav { gap: 2px; }
  .portal-nav a { padding: 7px 11px; border-radius: 9px; }
  .portal-nav a:hover, .portal-nav a:focus-visible, .portal-nav a.is-active { background: rgba(255,255,255,.055); }
  .home-hero { gap: 12px; padding-top: 20px; }
  .hero-lead { min-height: 452px; border-radius: 16px; }
  .hero-side { gap: 12px; }
  .hero-side-card { min-height: 220px; border-radius: 16px; }
  .hero-lead__content { padding: 34px; }
  .hero-lead h1 { font-size: clamp(2rem, 3.3vw, 3.45rem); }
  .hero-side-card__content { padding: 20px; }
}

@media (max-width: 420px) {
  .container, .article-width { width: min(100% - 24px, var(--container)); }
  .portal-header__inner { min-height: 64px; gap: 10px; }
  .portal-logo img { width: 104px; }
  .section { padding-block: 52px; }
  .hero-lead__content, .hero-side-card__content { padding: 20px; }
  .portal-card { grid-template-columns: 108px minmax(0,1fr); }
  .portal-card__media { min-height: 124px; }
  .portal-card__body, .trending-rail, .sticky-box { padding: 14px; }
  .article-header h1 { font-size: clamp(1.85rem, 10vw, 2.65rem); }
  .form-row { grid-template-columns: 1fr; }
}


/* Završni javni responsive i accessibility hardening. */
.prose, .page-content, .comment-card, .portal-card__body { min-width: 0; }
.prose img, .page-content img { max-width: 100%; height: auto; }
.prose table, .page-content table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.prose pre, .page-content pre { max-width: 100%; overflow-x: auto; }
.prose a, .page-content a, .comment-card p { overflow-wrap: anywhere; }
@media (max-width: 420px) {
  .comment-children { margin-left: 0; padding-left: 7px; }
  .comment-meta { align-items: flex-start; flex-direction: column; gap: 5px; }
  .comment-reply-button { align-self: flex-start; }
  .search-form .button, .comment-form .button { width: 100%; }
  .pagination { align-items: stretch; flex-direction: column; text-align: center; }
  .pagination a, .pagination span { width: 100%; }
}
