/* ============================================================
   PornWorks Guru — dark creator-tool design system
   Tokens follow the build brief. Mobile-first, WCAG AA.
   ============================================================ */

:root {
  --bg: #08090d;
  --surface: #11131a;
  --surface-raised: #181b24;
  --surface-soft: #f7f7fa;
  --text: #f7f8fb;
  --text-dark: #161821;
  --muted: #a6a9b5;
  --muted-dark: #626776;
  --line: #2b2f3a;
  --line-light: #e5e7eb;
  --brand: #ff3d79;
  --brand-dark: #d9215e;
  --accent: #9b5cff;
  --success: #22c55e;
  --warning: #facc15;
  --warning-bg: #171300;
  --danger: #ef4444;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

html, body { overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Never let long URLs / unbroken strings force horizontal scroll on phones */
p, li, td, th, figcaption, summary, h1, h2, h3, h4 { overflow-wrap: break-word; }
code { overflow-wrap: anywhere; }
@media (min-width: 768px) { body { font-size: 17px; } }

img, svg { max-width: 100%; height: auto; }

a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: #ff6b98; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--warning); color: #111; font-weight: 700;
  padding: 12px 20px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Adult warning bar ---------- */
.adult-warning {
  background: var(--warning);
  color: #111;
  font-weight: 600;
  font-size: 0.88rem;
  text-align: center;
  padding: 8px 16px;
  border-bottom: 3px solid #111;
}
.adult-warning strong { text-transform: uppercase; letter-spacing: 0.03em; }

/* ---------- Disclosure strip ---------- */
.disclosure-strip {
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
  padding: 7px 16px;
  border-bottom: 1px solid var(--line);
}
.disclosure-strip a { color: var(--muted); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8, 9, 13, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 64px;
}
.site-logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.site-logo .logo-mark {
  width: 34px; height: 34px; flex: none; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: grid; place-items: center; color: #fff; font-size: 0.95rem; font-weight: 900;
}
.site-logo .adult-badge {
  font-size: 0.65rem; font-weight: 800; color: #111; background: var(--warning);
  border-radius: 5px; padding: 2px 5px; letter-spacing: 0.04em;
}

.main-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.main-nav a {
  display: block; padding: 10px 13px; color: var(--muted);
  text-decoration: none; font-size: 0.94rem; font-weight: 500; border-radius: 8px;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--text); background: var(--surface-raised); }

.nav-cta {
  display: inline-block; background: var(--brand); color: #fff !important;
  font-weight: 700; font-size: 0.92rem; text-decoration: none;
  padding: 11px 18px; border-radius: 999px; white-space: nowrap;
}
.nav-cta:hover { background: var(--brand-dark); }

.menu-toggle {
  display: none; background: var(--surface-raised); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
  min-width: 44px; min-height: 44px; padding: 8px 14px;
  font: inherit; font-weight: 600; cursor: pointer;
}

@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; align-items: center; gap: 8px; }
  .main-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 10px 20px 18px;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav a { padding: 13px 10px; font-size: 1rem; }
  .header-cta-desktop { display: none; }
  .main-nav .nav-cta-mobile { margin-top: 10px; text-align: center; }
}
@media (min-width: 901px) { .nav-cta-mobile { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 56px 0 40px;
  background:
    radial-gradient(1000px 420px at 80% -10%, rgba(155, 92, 255, 0.16), transparent 60%),
    radial-gradient(800px 380px at 10% 0%, rgba(255, 61, 121, 0.14), transparent 55%);
  border-bottom: 1px solid var(--line);
}
.hero h1 {
  font-size: clamp(1.7rem, 4.2vw, 2.7rem);
  line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 16px; max-width: 20ch;
}
.hero .hero-sub { color: var(--muted); max-width: 62ch; font-size: 1.05rem; margin: 0 0 24px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Hero two-column layout with swipe deck */
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 38px; align-items: center; }
@media (min-width: 940px) {
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr); gap: 48px; }
}

.hero-deck { max-width: 400px; width: 100%; margin: 0 auto; }
.deck-stage {
  position: relative; width: 100%; aspect-ratio: 4 / 5;
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.deck-card {
  position: absolute; inset: 0;
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-raised);
  box-shadow: var(--shadow);
  opacity: 0; pointer-events: none;
  transform: scale(0.92) translateY(18px);
  transition: transform 0.35s ease, opacity 0.35s ease;
  cursor: grab;
}
.deck-card:active { cursor: grabbing; }
.deck-card img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.deck-card.is-top { opacity: 1; pointer-events: auto; transform: none; z-index: 3; }
.deck-card.is-next { opacity: 0.7; transform: scale(0.94) translateY(14px); z-index: 2; }
.deck-card.is-back { opacity: 0.35; transform: scale(0.88) translateY(26px); z-index: 1; }
.deck-card.is-dragging { transition: none; }
.deck-card-label {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 32px 16px 14px;
  background: linear-gradient(to top, rgba(5, 6, 10, 0.9), transparent);
  color: #fff; font-size: 0.85rem; font-weight: 600;
}
.deck-badge {
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--warning); color: #111; border-radius: 5px; padding: 3px 8px;
}
.deck-controls {
  display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 16px;
}
.deck-btn {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--surface-raised); color: var(--text);
  border: 1px solid var(--line); font-size: 1rem; cursor: pointer;
  display: grid; place-items: center;
}
.deck-btn:hover { border-color: var(--brand); color: var(--brand); }
.deck-dots { display: flex; gap: 8px; }
.deck-dots button {
  width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--line); min-width: 0; min-height: 0;
}
.deck-dots button[aria-selected="true"] { background: var(--brand); transform: scale(1.25); }
.deck-note { text-align: center; font-size: 0.75rem; color: var(--muted-dark); margin: 10px 0 0; }

/* Partner banner strip under hero */

.btn {
  display: inline-block; text-decoration: none; font-weight: 700;
  padding: 14px 26px; border-radius: 999px; font-size: 1rem;
  min-height: 44px;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-secondary { background: transparent; color: var(--text); border: 1.5px solid var(--line); }
.btn-secondary:hover { border-color: var(--muted); color: var(--text); }

.cta-caveat { font-size: 0.82rem; color: var(--muted); margin-top: 12px; max-width: 60ch; }

/* ---------- Last-checked badge ---------- */
.last-checked {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface-raised); border: 1px solid var(--line);
  color: var(--muted); font-size: 0.82rem; font-weight: 600;
  padding: 6px 13px; border-radius: 999px; margin-bottom: 18px;
}
.last-checked .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex: none; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding: 16px 0 0; font-size: 0.84rem; color: var(--muted); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--muted-dark); }
.breadcrumbs a { color: var(--muted); }

/* ---------- Article layout ---------- */
.article-shell { padding: 24px 0 64px; }
.article-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 1024px) {
  .article-grid { grid-template-columns: minmax(0, 1fr) 280px; align-items: start; }
}
/* Allow grid/flex children to shrink below their content width on small
   screens — prevents wide tables/media from forcing horizontal page scroll */
.article-grid > *,
.hero-grid > *,
.footer-grid > *,
.card-grid > *,
.pros-cons > *,
.verdict-panel > * { min-width: 0; }

.article-surface {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 4vw, 48px);
  box-shadow: var(--shadow);
  max-width: 820px;
}
.article-surface > * { max-width: 760px; }

/* Homepage review article: full-width surface matching the scorecard section */
#review-article { max-width: none; }
#review-article > * { max-width: 900px; }
#review-article .table-scroll { max-width: 900px; }
#review-article .voucher-card,
#review-article .verdict-card,
#review-article .pros-cons,
#review-article .safety-notice,
#review-article .author-box,
#review-article .related-list,
#review-article .correction-notice { max-width: 900px; }

.article-surface h1 { font-size: clamp(1.55rem, 3.6vw, 2.25rem); line-height: 1.18; letter-spacing: -0.02em; margin: 0 0 14px; color: var(--text); }
.article-surface h2 { font-size: 1.45rem; line-height: 1.25; margin: 2.2em 0 0.6em; letter-spacing: -0.01em; color: var(--text); }
.article-surface h3 { font-size: 1.13rem; margin: 1.8em 0 0.5em; color: var(--text); }
.article-surface p, .article-surface li { color: #c3c7d4; }
.article-surface strong { color: var(--text); }
.article-surface a { color: var(--brand); }
.article-surface a:hover { color: #ff6b98; }
.article-surface hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }

.article-summary { font-size: 1.08rem; color: #d4d7e2; }

.article-meta {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  font-size: 0.83rem; color: var(--muted);
  padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 22px;
}
.article-meta .meta-badge {
  background: rgba(34, 197, 94, 0.12); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.35);
  font-weight: 700; border-radius: 999px; padding: 4px 12px;
}

/* Inline adult warning inside articles */
.warning-inline {
  background: var(--warning);
  color: #111;
  border: 2px solid #111;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 18px;
}
/* Keep warning text dark on the yellow bar (beats .article-surface p/strong colours) */
.article-surface p.warning-inline,
.article-surface .warning-inline,
.article-surface .warning-inline strong { color: #111; }

/* Affiliate disclosure inside articles */
.affiliate-note {
  background: var(--surface-raised); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 16px;
  font-size: 0.84rem; color: var(--muted); margin: 0 0 22px;
}
.affiliate-note a { color: var(--muted); }

/* ---------- Table of contents ---------- */
.toc {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 20px 22px;
}
@media (min-width: 1024px) {
  .toc-sticky { position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow: auto; }
}
.toc h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; }
.toc a {
  display: block; color: var(--muted); text-decoration: none;
  font-size: 0.88rem; padding: 6px 0; border-left: 2px solid transparent;
}
.toc a:hover { color: var(--text); }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; margin: 1.2em 0; max-width: 760px; -webkit-overflow-scrolling: touch; }
.article-surface table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.92rem; }
.article-surface th, .article-surface td {
  text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line);
  vertical-align: top; color: #c3c7d4;
}
.article-surface th { background: var(--surface-raised); color: var(--text); font-weight: 700; white-space: nowrap; }
.article-surface tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.025); }
.article-surface td.num, .article-surface th.num { text-align: right; }

/* ---------- Voucher card ---------- */
.voucher-card {
  background: linear-gradient(140deg, #1a1030, #241436);
  color: var(--text);
  border: 1px solid #3d2a63;
  border-radius: var(--radius-md);
  padding: 24px 26px;
  margin: 1.6em 0;
  max-width: 760px;
}
.voucher-card h2, .voucher-card h3 { margin: 0 0 10px; color: #fff; font-size: 1.2rem; }
.voucher-card p, .voucher-card li { color: #cfc7e6; }
.voucher-card .voucher-label {
  display: inline-block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: #111; background: var(--warning);
  border-radius: 5px; padding: 3px 9px; margin-bottom: 12px;
}
.voucher-code-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.voucher-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.25rem; font-weight: 700; letter-spacing: 0.06em;
  background: #0d0a18; color: #ffd75e; border: 1.5px dashed #5c4a8a;
  border-radius: 10px; padding: 10px 18px;
}
.copy-btn {
  background: var(--accent); color: #fff; border: 0; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 0.9rem;
  padding: 11px 20px; cursor: pointer; min-height: 44px; min-width: 44px;
}
.copy-btn:hover { background: #8747f0; }
.copy-btn[data-copied="true"] { background: var(--success); }
.voucher-card .btn-primary { margin-top: 8px; }
.voucher-card .voucher-terms { font-size: 0.82rem; color: #a99cc9; margin-top: 14px; }

/* ---------- Verdict / scorecard ---------- */
.verdict-card {
  background: var(--surface-raised); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 26px 28px; margin: 1.6em 0; max-width: 760px;
}
.verdict-card .verdict-score {
  font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em;
  background: linear-gradient(120deg, var(--brand), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.verdict-card p { color: var(--muted); }
.verdict-card h2, .verdict-card h3 { color: var(--text); margin-top: 0; }

/* Homepage verdict panel (score box + copy) */
.verdict-panel {
  display: grid; gap: 24px; align-items: start;
  background: var(--surface-raised); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 26px 28px; margin: 0 0 28px;
}
@media (min-width: 720px) { .verdict-panel { grid-template-columns: auto 1fr; gap: 32px; } }
.verdict-score-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; text-align: center;
  background: linear-gradient(150deg, rgba(255, 61, 121, 0.14), rgba(155, 92, 255, 0.14));
  border: 1px solid rgba(255, 61, 121, 0.35);
  border-radius: var(--radius-md); padding: 22px 30px; min-width: 168px;
}
.verdict-score-box .verdict-score-value {
  font-size: 3rem; font-weight: 900; line-height: 1; letter-spacing: -0.03em;
  background: linear-gradient(120deg, var(--brand), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.verdict-score-box .verdict-score-of { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.verdict-score-box .verdict-score-label {
  margin-top: 8px; font-size: 0.68rem; font-weight: 800;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent);
}
.verdict-copy h3 { margin: 0 0 10px; font-size: 1.05rem; color: var(--text); }
.verdict-copy p { margin: 0 0 12px; color: var(--muted); }
.verdict-copy p:last-child { margin-bottom: 0; }

/* Homepage feature scorecard */
.scorecard-card {
  background: var(--surface-raised); border: 1px solid var(--line);
  border-radius: var(--radius-md); overflow: hidden;
}
.scorecard-head { padding: 20px 24px 4px; }
.scorecard-head h3 { margin: 0 0 4px; font-size: 1.05rem; color: var(--text); }
.scorecard-head p { margin: 0; font-size: 0.86rem; color: var(--muted); }
.scorecard-scroll { margin: 0; max-width: none; }
.scorecard-table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 0.92rem; }
.scorecard-table th, .scorecard-table td {
  text-align: left; padding: 14px 24px; border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.scorecard-table thead th {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.scorecard-table tbody th[scope="row"] { color: var(--text); font-weight: 700; white-space: nowrap; }
.scorecard-table tbody td { color: var(--muted); }
.scorecard-table tbody tr:last-child th,
.scorecard-table tbody tr:last-child td { border-bottom: 0; }
.scorecard-table tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.scorecard-table .score-cell { white-space: nowrap; width: 150px; }
.scorecard-table .score-cell strong { display: block; color: var(--text); font-weight: 800; }
.scorecard-table .score-cell strong span { font-size: 0.75em; font-weight: 600; color: var(--muted-dark); }
.score-bar {
  display: block; width: 108px; height: 5px; margin-top: 6px;
  background: var(--line); border-radius: 999px; overflow: hidden;
}
.score-bar > span {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

/* ---------- Pros / cons ---------- */
.pros-cons { display: grid; gap: 18px; margin: 1.4em 0; max-width: 760px; }
@media (min-width: 720px) { .pros-cons { grid-template-columns: 1fr 1fr; } }
.pros-cons > div { border-radius: var(--radius-sm); padding: 18px 20px; }
.pros-box { background: rgba(34, 197, 94, 0.08); border: 1px solid rgba(34, 197, 94, 0.3); }
.cons-box { background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.3); }
.pros-box h3 { color: #4ade80; } .cons-box h3 { color: #f87171; }
.pros-box h3, .cons-box h3 { margin: 0 0 10px; font-size: 1rem; }
.pros-box ul, .cons-box ul { margin: 0; padding-left: 20px; }
.pros-box li, .cons-box li { margin: 5px 0; font-size: 0.94rem; }

/* ---------- Safety notice ---------- */
.safety-notice {
  background: rgba(239, 68, 68, 0.08); border: 2px solid var(--danger);
  border-radius: var(--radius-sm); padding: 16px 20px; margin: 1.4em 0; max-width: 760px;
}
.safety-notice h3 { margin: 0 0 8px; color: #f87171; font-size: 1rem; }
.safety-notice p, .safety-notice li { color: #e7cfcf; font-size: 0.93rem; }

/* ---------- Blockquote (generic) ---------- */
.article-surface blockquote {
  margin: 1.4em 0; padding: 14px 20px;
  border-left: 4px solid var(--accent);
  background: rgba(155, 92, 255, 0.1); border-radius: 0 10px 10px 0;
  color: #cfc3ee;
}
.article-surface blockquote p { color: #cfc3ee; margin: 0.4em 0; }

/* ---------- FAQ ---------- */
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  margin: 10px 0; background: var(--surface-raised); max-width: 760px;
}
.faq summary {
  cursor: pointer; font-weight: 700; padding: 15px 18px; color: var(--text);
  list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center;
  min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--muted); flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 18px 16px; }
.faq details > div p { margin-top: 0; }

/* ---------- Tool grid / card grids ---------- */
.card-grid { display: grid; gap: 16px; margin: 1.4em 0; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }

.tool-card {
  background: var(--surface-raised); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 20px 22px;
}
.tool-card .tool-icon {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(255,61,121,.18), rgba(155,92,255,.18));
  color: var(--brand); font-size: 1.1rem; margin-bottom: 12px;
}
.tool-card h3 { margin: 0 0 6px; font-size: 1.02rem; color: var(--text); }
.tool-card p { margin: 0; font-size: 0.88rem; color: var(--muted); }
.tool-card a { color: var(--text); text-decoration: none; }
.tool-card a:hover { color: var(--brand); }

/* Hub / related cards on dark background */
.hub-card {
  display: block; background: var(--surface-raised); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 20px 22px; text-decoration: none; color: var(--text);
}
.hub-card:hover { border-color: var(--brand); color: var(--text); }
.hub-card .hub-kicker { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.hub-card h3 { margin: 8px 0 6px; font-size: 1.02rem; line-height: 1.35; }
.hub-card p { margin: 0; font-size: 0.87rem; color: var(--muted); }
.hub-card .pending-badge {
  display: inline-block; margin-top: 10px; font-size: 0.7rem; font-weight: 700;
  color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 2px 8px;
}

/* Related links inside article */
.related-list { list-style: none; margin: 1em 0; padding: 0; max-width: 760px; }
.related-list li { margin: 0; border-bottom: 1px solid var(--line); }
.related-list a { display: block; padding: 12px 4px; text-decoration: none; font-weight: 600; color: var(--brand); }
.related-list a:hover { color: #ff6b98; }

/* ---------- Author box / correction notice ---------- */
.author-box {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface-raised); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 18px 20px; margin: 2em 0 0; max-width: 760px;
}
.author-box .author-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.2rem;
}
.author-box h3 { margin: 0 0 4px; font-size: 1rem; }
.author-box p { margin: 0; font-size: 0.87rem; }

.correction-notice {
  font-size: 0.84rem; color: var(--muted);
  border-top: 1px solid var(--line); margin-top: 1.6em; padding-top: 14px; max-width: 760px;
}

/* ---------- Dark sections on homepage ---------- */
.dark-section { padding: 52px 0; border-bottom: 1px solid var(--line); }
.dark-section h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); letter-spacing: -0.01em; margin: 0 0 8px; }
.dark-section .section-sub { color: var(--muted); margin: 0 0 26px; max-width: 66ch; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 44px 0 30px; margin-top: 0; }
.footer-warning {
  background: var(--warning); color: #111; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 0.88rem; padding: 12px 18px; margin-bottom: 30px; text-align: center;
}
.footer-grid { display: grid; gap: 28px; margin-bottom: 30px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-grid h2 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin: 7px 0; }
.footer-grid a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.footer-grid a:hover { color: var(--text); }
.footer-about p { color: var(--muted); font-size: 0.88rem; margin: 10px 0 0; max-width: 44ch; }
.footer-disclaimer {
  border-top: 1px solid var(--line); padding-top: 20px;
  color: var(--muted-dark); font-size: 0.8rem; max-width: 90ch;
}
.footer-disclaimer p { margin: 8px 0; }

/* ---------- 404 ---------- */
.error-page { padding: 90px 0; text-align: center; }
.error-code {
  font-size: clamp(3.4rem, 12vw, 6.5rem); font-weight: 900; line-height: 1; margin: 0 0 8px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.error-page .related-list { max-width: 520px; margin: 0 auto; text-align: left; }
.error-page .related-list li { border-bottom-color: var(--line); }
.error-page .related-list a { color: var(--brand); }
.error-page .related-list a:hover { color: #ff6b98; }
.error-page nav h2 { font-size: 1.05rem; margin: 36px 0 12px; }
.error-page h1 { font-size: clamp(2rem, 6vw, 3.2rem); margin: 0 0 12px; }
.error-page p { color: var(--muted); max-width: 52ch; margin: 0 auto 28px; }
.error-links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- New-template article shell compatibility ---------- */
/* Header logo variant used on article pages */
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.logo:hover { color: var(--text); }
.logo > span { position: relative; padding-left: 44px; }
.logo > span::before {
  content: "P"; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: grid; place-items: center; color: #fff; font-size: 0.95rem; font-weight: 900;
}
.footer-logo > span { padding-left: 44px; }

/* Hamburger icon built from three spans */
.menu-toggle span {
  display: block; width: 20px; height: 2px; border-radius: 2px;
  background: var(--text); margin: 4px auto;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* aria-current="true" variant used on article pages */
.main-nav a[aria-current] { color: var(--text); background: var(--surface-raised); }

/* Article header block */
.article-header { margin-bottom: 20px; }
.article-header h1 { margin-bottom: 14px; }
.article-header .article-meta { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }

/* Standalone breadcrumbs bar on article pages */
.breadcrumbs { padding: 16px 0 8px; }

/* TOC with <ul> lists */
.toc ul { list-style: none; margin: 0; padding: 0; }

/* Buttons used without the .btn base class */
a.btn-primary {
  display: inline-block; text-decoration: none; font-weight: 700;
  padding: 14px 26px; border-radius: 999px; font-size: 1rem; min-height: 44px;
  background: var(--brand); color: #fff;
}
a.btn-primary:hover { background: var(--brand-dark); color: #fff; }

/* FAQ answers written as direct <p> children */
.faq details > p { padding: 0 18px 16px; margin: 0 0 4px; }
.faq details > p + p { padding-top: 0; }

/* Code blocks inside articles */
.article-surface pre {
  background: #05060a; color: #e8eaf2;
  border-radius: var(--radius-sm); border: 1px solid var(--line);
  padding: 16px 18px; overflow-x: auto; max-width: 760px;
  font-size: 0.86rem; line-height: 1.55;
}
.article-surface pre code { background: none; color: inherit; padding: 0; }
.article-surface code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--surface-raised); color: #ff8ab1; border: 1px solid var(--line);
  border-radius: 5px; padding: 2px 6px; font-size: 0.88em;
}

/* Verdict card inside the article surface */
.article-surface .verdict-card { background: var(--surface-raised); }
.article-surface .verdict-card p { color: #cfd3e0; }
.article-surface .verdict-card strong { color: #fff; }

/* Footer variant with .footer-col / .footer-bottom */
.footer-col h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 7px 0; }
.footer-col a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.footer-col a:hover { color: var(--text); }
.site-footer .footer-warning a { color: #111; }
.footer-bottom {
  border-top: 1px solid var(--line); padding-top: 20px;
  color: var(--muted-dark); font-size: 0.8rem; max-width: 90ch;
}
.footer-bottom p { margin: 8px 0; }
.footer-bottom a { color: var(--muted-dark); }

/* ---------- Media: promo images, banners, videos, galleries ---------- */
.media-figure { margin: 26px 0; max-width: 760px; }
.media-figure img,
.media-figure video {
  display: block; width: 100%; height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #000;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3);
}
.media-figure figcaption {
  font-size: 0.8rem; color: var(--muted);
  margin-top: 10px; text-align: center;
}
.media-banner { margin: 26px 0; max-width: 760px; }
.media-banner a { display: block; border-radius: var(--radius-sm); }
.media-banner img {
  display: block; width: 100%; height: auto;
  border-radius: var(--radius-sm); border: 1px solid var(--line);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.media-banner a:hover img { transform: translateY(-2px); border-color: var(--brand); }
.media-banner figcaption { font-size: 0.75rem; color: var(--muted); margin-top: 8px; text-align: center; }
.media-gallery {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 14px; margin: 26px 0;
}
@media (min-width: 760px) { .media-gallery { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.media-gallery figure { margin: 0; }
.media-gallery img {
  display: block; width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: var(--radius-md); border: 1px solid var(--line);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.media-gallery figure:hover img { transform: scale(1.02); border-color: var(--brand); }
.media-gallery figcaption { font-size: 0.75rem; color: var(--muted); margin-top: 6px; text-align: center; }
.media-section { padding: 54px 0; border-bottom: 1px solid var(--line); }
.media-section h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); letter-spacing: -0.01em; margin: 0 0 8px; }
.media-section .section-sub { color: var(--muted); margin: 0 0 26px; max-width: 66ch; }
.media-section .media-figure { max-width: 980px; margin-left: auto; margin-right: auto; }
.media-note { font-size: 0.8rem; color: var(--muted); max-width: 78ch; }

/* ---------- Small-screen refinements ---------- */
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 40px 0 32px; }
  .hero-grid { gap: 28px; }
  .hero-deck { max-width: 320px; }
  .dark-section, .media-section { padding: 40px 0; }
  .article-surface { border-radius: var(--radius-md); }
  .article-surface table, .scorecard-table { font-size: 0.86rem; }
  .article-surface th, .article-surface td { padding: 8px 10px; }
  .scorecard-table th, .scorecard-table td { padding: 12px 14px; }
  .scorecard-head { padding: 16px 16px 4px; }
  .verdict-panel { padding: 20px 18px; }
  .verdict-score-box { width: 100%; min-width: 0; }
  .voucher-card { padding: 20px 18px; }
  .voucher-code { font-size: 1.05rem; padding: 9px 14px; }
  .footer-grid { gap: 22px; }
  .btn, a.btn-primary { width: 100%; text-align: center; }
  .hero-ctas .btn { width: auto; flex: 1 1 150px; }
  .deck-btn { width: 42px; height: 42px; }
}

/* Keep horizontally scrollable tables usable on touch screens */
.table-scroll { scrollbar-width: thin; }

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.small-note { font-size: 0.83rem; color: var(--muted-dark); }
