﻿/* === White Info Sites — design tokens =================================
 * Импортируется в styles.css каждого сайта первой строкой.
 * Каждый сайт переопределяет --vertical-class у :root для выбора палитры.
 *
 * Использование в site styles.css:
 *   @import "./design-tokens.css";
 *   :root { ... font-family и др. свои переменные ... }
 */

/* ---- Parasites vertical (clean medical) ---- */
:root.vertical-parasites,
.vertical-parasites {
  --bg: #FAFAF7;
  --fg: #1A2E1A;
  --accent: #2D7D3E;
  --accent-hover: #246330;
  --muted: #6B7268;
  --border: #E5E5DC;
  --card-bg: #FFFFFF;
  --code-bg: #F0EFE8;
  --link: #2D7D3E;
  --link-hover: #1A4D24;
}

/* ---- Weight vertical (energetic lifestyle) ----
 * Sites 06, 07 — coral; 08 — teal; 09, 10 — coral (vary by site override).
 */
:root.vertical-weight,
.vertical-weight {
  --bg: #FFFFFF;
  --fg: #1F2937;
  --accent: #F97316;
  --accent-hover: #C2410C;
  --muted: #6B7280;
  --border: #F3F4F6;
  --card-bg: #FFFFFF;
  --code-bg: #F9FAFB;
  --link: #F97316;
  --link-hover: #C2410C;
}
:root.vertical-weight.teal,
.vertical-weight.teal {
  --accent: #14B8A6;
  --accent-hover: #0F766E;
  --link: #14B8A6;
  --link-hover: #0F766E;
}

/* ---- Men's health vertical (serious, trustworthy) ----
 * Sites 11, 13 — deep blue; 12, 14, 15 — slate (vary).
 */
:root.vertical-mens,
.vertical-mens {
  --bg: #FFFFFF;
  --fg: #0F172A;
  --accent: #1E40AF;
  --accent-hover: #1E3A8A;
  --muted: #64748B;
  --border: #E2E8F0;
  --card-bg: #FFFFFF;
  --code-bg: #F1F5F9;
  --link: #1E40AF;
  --link-hover: #1E3A8A;
}
:root.vertical-mens.slate,
.vertical-mens.slate {
  --accent: #475569;
  --accent-hover: #334155;
  --link: #475569;
  --link-hover: #334155;
}

/* ---- Universal base (Sprint 3: premium type/space/shadow scale) ---- */
:root {
  --fs-base: 16.5px;
  /* Modular scale ~1.25, fluid via clamp */
  --fs-h1: clamp(2rem, 1.4rem + 2.4vw, 3.2rem);
  --fs-h2: clamp(1.45rem, 1.15rem + 1.1vw, 2rem);
  --fs-h3: clamp(1.18rem, 1.05rem + .4vw, 1.4rem);
  --fs-h4: 1.05rem;
  --fs-lead: clamp(1.05rem, 1rem + .35vw, 1.22rem);
  --fs-small: .88rem;
  --fs-mini: .78rem;
  --lh-body: 1.7;
  --lh-reading: 1.78;
  --lh-heading: 1.18;
  --lh-display: 1.08;
  --ls-tight: -.012em;
  --ls-loose: .06em;
  --measure: 68ch;
  --measure-narrow: 60ch;
  --measure-wide: 78ch;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 2.6rem;
  --space-6: 3.4rem;
  --space-7: 4.2rem;
  --radius: 8px;
  --radius-lg: 14px;
  --radius-pill: 999px;
  /* Layered modern shadow: small immediate + soft ambient */
  --shadow-sm: 0 1px 2px rgba(15,23,42,.045);
  --shadow-md: 0 1px 2px rgba(15,23,42,.05), 0 6px 20px -8px rgba(15,23,42,.08);
  --shadow-lg: 0 1px 2px rgba(15,23,42,.05), 0 14px 36px -12px rgba(15,23,42,.14);
  --shadow-hover: 0 2px 4px rgba(15,23,42,.06), 0 18px 44px -14px rgba(15,23,42,.18);
  /* Wider container caps per family pick these (see family CSSes) */
  --wrap-media: 1280px;
  --wrap-longread: 800px;
  --wrap-longread-breakout: 1080px;
  --wrap-ref: 1320px;
  --wrap-tool: 1100px;
  --wrap-ed: 1240px;
  --t-fast: 180ms cubic-bezier(.4,0,.2,1);
  --t-base: 240ms cubic-bezier(.4,0,.2,1);
  --t-slow: 360ms cubic-bezier(.4,0,.2,1);
}
::selection { background: color-mix(in srgb, var(--accent) 35%, #fff); color: var(--fg); }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Reset + base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: var(--fs-base); }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 1rem;
  line-height: var(--lh-body);
  color: var(--fg);
  background: var(--bg);
}
h1, h2, h3, h4 { line-height: var(--lh-heading); color: var(--fg); margin-top: 1.5em; margin-bottom: 0.5em; }
h1 { font-size: var(--fs-h1); font-weight: 700; }
h2 { font-size: var(--fs-h2); font-weight: 700; }
h3 { font-size: var(--fs-h3); font-weight: 600; }
p, ul, ol, blockquote { margin: 0 0 1em; max-width: var(--measure); }
ul, ol { padding-left: 1.5em; }
a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }
img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
code { background: var(--code-bg); padding: 0.1em 0.3em; border-radius: 3px; font-size: 0.92em; }
blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5em 1em;
  color: var(--muted);
  background: var(--code-bg);
  margin-left: 0;
}

/* ---- Layout ---- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-3);
}
header.site {
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
  padding: var(--space-3) 0;
}
header.site .container { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
header.site .brand { font-weight: 700; font-size: 1.1rem; color: var(--fg); text-decoration: none; }
header.site nav { display: flex; gap: var(--space-2); flex-wrap: wrap; }
header.site nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
header.site nav a:hover { color: var(--accent); }

main.content { padding: var(--space-4) 0; }
main.content article { max-width: var(--measure); }
main.content article h1 { margin-top: 0; }

footer.site {
  margin-top: var(--space-6);
  padding: var(--space-4) 0;
  background: var(--code-bg);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}
footer.site nav { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-2); }
footer.site nav a { color: var(--muted); text-decoration: none; }
footer.site nav a:hover { color: var(--accent); }
footer.site .disclaimer { font-size: 0.85rem; color: var(--muted); max-width: 70ch; }
footer.site .copyright { margin-top: var(--space-2); font-size: 0.85rem; }

/* ---- Article list (homepage) ---- */
.article-list { list-style: none; padding: 0; }
.article-list li { padding: var(--space-2) 0; border-bottom: 1px solid var(--border); }
.article-list li:last-child { border-bottom: 0; }
.article-list a {
  text-decoration: none; color: var(--fg); font-weight: 600; font-size: 1.1rem;
}
.article-list a:hover { color: var(--accent); }
.article-list .meta { color: var(--muted); font-size: 0.85rem; margin-top: 0.2em; }

/* ---- Form ---- */
.subscribe-form {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  max-width: 30rem;
  margin: var(--space-4) 0;
}
.subscribe-form label { display: block; margin-bottom: 0.4em; font-weight: 500; }
.subscribe-form input[type="email"] {
  width: 100%;
  padding: 0.6em 0.8em;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
}
.subscribe-form input[type="email"]:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.subscribe-form button {
  margin-top: var(--space-2);
  padding: 0.7em 1.4em;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.subscribe-form button:hover { background: var(--accent-hover); }
.subscribe-form .form-note { font-size: 0.85rem; color: var(--muted); margin-top: var(--space-2); }
.subscribe-form label.checkbox { display: flex; gap: 0.5em; align-items: flex-start; font-weight: 400; font-size: 0.9rem; color: var(--muted); margin-top: var(--space-2); }

/* ---- Calculator ---- */
.calc-form {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  margin: var(--space-3) 0;
  max-width: 36rem;
}
.calc-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.calc-form label { display: block; font-weight: 500; margin-bottom: 0.3em; }
.calc-form input, .calc-form select {
  width: 100%;
  padding: 0.5em 0.7em;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
}
.calc-form .btn-row { margin-top: var(--space-3); }
.calc-form button {
  padding: 0.7em 1.4em;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.calc-form button:hover { background: var(--accent-hover); }
.calc-result {
  margin: var(--space-3) 0;
  padding: var(--space-3);
  background: var(--code-bg);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
}
.calc-result h3 { margin-top: 0; }
.calc-disclaimer { color: var(--muted); font-size: 0.9rem; margin-top: var(--space-3); }

/* ---- Disclaimer block ---- */
.disclaimer-block {
  background: var(--code-bg);
  border-left: 4px solid var(--muted);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  font-size: 0.92rem;
  color: var(--muted);
  margin: var(--space-3) 0;
}

/* ---- Sources list ---- */
.sources {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
  font-size: 0.92rem;
}
.sources h3 { font-size: 1rem; color: var(--muted); }
.sources ul { padding-left: 1.2em; }

/* ---- Reference site (sidebar nav) ---- */
.ref-layout { display: grid; grid-template-columns: 14rem 1fr; gap: var(--space-4); }
.ref-layout aside.toc {
  border-right: 1px solid var(--border);
  padding-right: var(--space-3);
  font-size: 0.95rem;
  max-height: 80vh;
  overflow-y: auto;
  position: sticky;
  top: var(--space-3);
}
.ref-layout aside.toc h2 { font-size: 1rem; margin-top: 0; color: var(--muted); }
.ref-layout aside.toc ul { list-style: none; padding: 0; }
.ref-layout aside.toc li { padding: 0.2em 0; }
.ref-layout aside.toc a { color: var(--fg); text-decoration: none; }
.ref-layout aside.toc a:hover { color: var(--accent); }
@media (max-width: 720px) {
  .ref-layout { grid-template-columns: 1fr; }
  .ref-layout aside.toc { border-right: 0; border-bottom: 1px solid var(--border); padding-bottom: var(--space-2); position: static; max-height: none; }
}

/* ---- Site-specific overrides (variations within vertical) ---- */
:root.layout-serif { font-family: Georgia, 'Times New Roman', serif; }
:root.layout-serif h1, :root.layout-serif h2, :root.layout-serif h3 { font-family: Georgia, serif; }
:root.layout-narrow main.content { max-width: 58ch; margin: 0 auto; }
:root.layout-wide main.content article { max-width: 80ch; }


/* ===== Shared portal components ===== */
/* ═════════════════════════════════════════════════════════════════
 * Shared rich-portal components. Imported AFTER design-tokens.css
 * and BEFORE family-specific CSS in every site's styles.css.
 * All families consume these utilities — but families ALSO override
 * structural pieces (grids, header, footer) in their own files.
 * ═════════════════════════════════════════════════════════════════ */

/* ── Tag pills (small accent chip) ────────────────────────────── */
.tag-pill {
  display: inline-block;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.tag-pill--neutral {
  background: var(--code-bg);
  color: var(--muted);
  border-color: var(--border);
}

/* ── Tag cloud (varying sizes) ────────────────────────────────── */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0; padding: 0; list-style: none; }
.tag-cloud li { margin: 0; }
.tag-cloud a {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--code-bg);
  color: var(--fg);
  text-decoration: none;
  font-size: .9rem;
  border: 1px solid var(--border);
  transition: background .15s, color .15s;
}
.tag-cloud a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.tag-cloud a.size-lg { font-size: 1.05rem; font-weight: 600; }
.tag-cloud a.size-md { font-size: .95rem; }
.tag-cloud a.size-sm { font-size: .82rem; }

/* ── Breadcrumbs ──────────────────────────────────────────────── */
.crumbs {
  font-size: .85rem;
  color: var(--muted);
  margin: 0 0 1.2rem;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs .crumb-sep { margin: 0 .35em; opacity: .6; }
.crumbs .crumb-cur { color: var(--fg); }

/* ── Callout boxes (Sprint 3 — premium with header bar + icon) ── */
.callout {
  position: relative;
  background: var(--code-bg);
  padding: 1.1rem 1.3rem 1.1rem 3.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 1.8rem 0;
  box-shadow: var(--shadow-sm);
}
.callout > :first-child { margin-top: 0; }
.callout > :last-child { margin-bottom: 0; }
.callout::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 1.15rem;
  width: 1.3rem;
  height: 1.3rem;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.callout-info {
  border-color: color-mix(in srgb, var(--accent) 25%, var(--border));
  background: #f5f5f5;
  background: color-mix(in srgb, var(--accent) 6%, #fff);
}
.callout-info::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232D7D3E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><line x1='12' y1='16' x2='12' y2='12'/><line x1='12' y1='8' x2='12.01' y2='8'/></svg>");
}
.callout-warn {
  border-color: #fcd34d;
  background: #fffbeb;
}
.callout-warn::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b45309' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/><line x1='12' y1='9' x2='12' y2='13'/><line x1='12' y1='17' x2='12.01' y2='17'/></svg>");
}
/* Doctor callout — authoritative red header bar + soft body */
.callout-doctor {
  border: 1px solid #fecaca;
  border-left: 0;
  background: #fff8f8;
  padding: 0;
  overflow: hidden;
}
.callout-doctor::before { content: none; }
.callout-doctor > h2,
.callout-doctor > h3 {
  margin: 0;
  padding: .8rem 1.4rem .8rem 3.2rem;
  background: #b91c1c;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .005em;
  position: relative;
}
.callout-doctor > h2::before,
.callout-doctor > h3::before {
  content: "";
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.3rem;
  height: 1.3rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/><polyline points='22 4 12 14.01 9 11.01'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
}
.callout-doctor > p,
.callout-doctor > ul,
.callout-doctor > ol { margin: 0; padding: 0 1.4rem; }
.callout-doctor > p:first-of-type { padding-top: 1rem; }
.callout-doctor > :last-child { padding-bottom: 1rem; }
.callout-doctor a { color: #b91c1c; font-weight: 600; }

.callout-definition {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  background: #fff;
  padding: 1.1rem 1.3rem;
  border-radius: var(--radius);
  margin: 1.4rem 0;
  box-shadow: var(--shadow-sm);
}
.callout-definition-label {
  display: inline-block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: .4rem;
}

/* "Кратко" / standfirst summary box on term and article pages */
.summary-box {
  background: color-mix(in srgb, var(--accent) 5%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border));
  border-radius: var(--radius);
  padding: 1rem 1.3rem;
  margin: 1.2rem 0 1.6rem;
  font-size: 1.02rem;
  color: var(--fg);
  line-height: 1.6;
}
.summary-box__label {
  display: inline-block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: .4rem;
}

/* Standfirst (lead paragraph) on reading families */
.standfirst {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 1.4rem;
}

/* ── Pull-quote ───────────────────────────────────────────────── */
.pull-quote {
  border-left: 4px solid var(--accent);
  padding: .8rem 1.4rem;
  margin: 2rem 0;
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--fg);
  background: transparent;
}

/* ── Generic cover (16:9 / square variants set per-family) ────── */
.cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background: var(--code-bg);
  overflow: hidden;
}
.cover img, .cover svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover--square { aspect-ratio: 1 / 1; }

/* ── Article card (Sprint 3 — layered shadow, cover zoom on hover) ─ */
.art-card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
  text-decoration: none;
  color: inherit;
  isolation: isolate;
}
.art-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  box-shadow: var(--shadow-hover);
}
.art-card .cover { border-radius: 0; overflow: hidden; }
.art-card .cover img, .art-card .cover svg {
  transition: transform var(--t-slow);
}
.art-card:hover .cover img, .art-card:hover .cover svg {
  transform: scale(1.04);
}
.art-card__body { padding: 1.2rem 1.3rem 1.3rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.art-card__title { font-size: 1.12rem; line-height: 1.35; font-weight: 700; margin: 0; color: var(--fg); letter-spacing: var(--ls-tight); }
.art-card__title a { color: inherit; text-decoration: none; }
.art-card__excerpt { font-size: .94rem; color: var(--muted); margin: 0; line-height: 1.55; flex: 1; }
.art-card__meta { font-size: .82rem; color: var(--muted); display: flex; gap: .5em; align-items: center; flex-wrap: wrap; }
.art-card__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); display: inline-block; opacity: .6; }

/* ── Related-cards block ──────────────────────────────────────── */
.related-block {
  margin-top: 3rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border);
}
.related-block h2 { font-size: 1.25rem; margin: 0 0 1rem; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.related-card {
  display: block;
  padding: .9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  text-decoration: none;
  color: var(--fg);
  transition: border-color .15s, background .15s;
}
.related-card:hover { border-color: var(--accent); background: var(--code-bg); }
.related-card__title { font-weight: 600; font-size: .98rem; line-height: 1.35; }
.related-card__meta { font-size: .78rem; color: var(--muted); margin-top: .3em; }

/* ── Sidebar widgets ──────────────────────────────────────────── */
.widget {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: 0 0 1rem;
}
.widget h3 {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  font-weight: 700;
  margin: 0 0 .7rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}
.widget ol, .widget ul { list-style: none; padding: 0; margin: 0; }
.widget--popular ol { counter-reset: pop; }
.widget--popular li {
  counter-increment: pop;
  padding: .45em 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: .7em;
  align-items: flex-start;
}
.widget--popular li:last-child { border-bottom: 0; }
.widget--popular li::before {
  content: counter(pop);
  font-weight: 800;
  color: var(--accent);
  font-size: 1.1rem;
  line-height: 1.1;
  min-width: 1.4em;
}
.widget--popular a { color: var(--fg); text-decoration: none; font-size: .92rem; line-height: 1.4; }
.widget--popular a:hover { color: var(--accent); }
.widget--about p { margin: 0; font-size: .92rem; color: var(--muted); }
.widget--about a { color: var(--accent); }
.widget--mini-subscribe { background: color-mix(in srgb, var(--accent) 5%, var(--card-bg)); }

/* ── Trust badges row ─────────────────────────────────────────── */
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card-bg);
  font-size: .82rem;
  font-weight: 600;
  color: var(--fg);
}
.trust-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

/* ── Accordion (CSS details/summary) ──────────────────────────── */
.acc { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card-bg); }
.acc + .acc { margin-top: 8px; }
.acc summary {
  cursor: pointer;
  padding: .85rem 1.1rem;
  font-weight: 600;
  font-size: .98rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5em;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--accent);
  font-weight: 400;
  transition: transform .2s;
}
.acc[open] summary::after { transform: rotate(45deg); }
.acc-body { padding: 0 1.1rem 1rem; color: var(--muted); font-size: .94rem; line-height: 1.6; }

/* ── Metric / stat readout ────────────────────────────────────── */
.metric-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
}
.metric-card__label { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; margin: 0 0 .4rem; }
.metric-card__value { font-size: 2.6rem; line-height: 1; font-weight: 800; color: var(--fg); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.metric-card__unit { font-size: 1rem; color: var(--muted); margin-left: .25em; font-weight: 500; }
.metric-card__sub { color: var(--muted); font-size: .9rem; margin: .5rem 0 0; }
.band {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .02em;
  margin-top: .8rem;
}
.band-low { background: #ecfdf5; color: #047857; }
.band-mid { background: #fffbeb; color: #b45309; }
.band-high { background: #fef2f2; color: #b91c1c; }

/* ── Footer multi-column grid (universal scaffold) ────────────── */
.fc-foot {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem 2rem;
}
.fc-foot h4 {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  font-weight: 700;
  margin: 0 0 .7rem;
}
.fc-foot ul { list-style: none; padding: 0; margin: 0; }
.fc-foot li { padding: 2px 0; }
.fc-foot a { color: var(--fg); text-decoration: none; font-size: .92rem; }
.fc-foot a:hover { color: var(--accent); }
.fc-foot__bottom {
  margin-top: 1.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: .82rem;
  color: var(--muted);
}

/* ── Hero (universal scaffold; families restyle) ──────────────── */
.hero {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.hero .cover { aspect-ratio: 4 / 3; border-radius: 0; }
.hero__body { padding: 1.6rem 1.8rem; display: flex; flex-direction: column; gap: .8rem; justify-content: center; }
.hero__eyebrow { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); font-weight: 700; }
.hero__title { font-size: 1.7rem; line-height: 1.2; margin: 0; }
.hero__title a { color: var(--fg); text-decoration: none; }
.hero__lead { color: var(--muted); margin: 0; }
.hero__meta { font-size: .85rem; color: var(--muted); margin-top: .4rem; display: flex; gap: .4em; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } .hero .cover { aspect-ratio: 16 / 9; } }

/* ── Section heading divider ──────────────────────────────────── */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.4rem 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--accent);
}
.section-head h2 { margin: 0; font-size: 1.25rem; }
.section-head a { font-size: .85rem; color: var(--muted); text-decoration: none; }
.section-head a:hover { color: var(--accent); }

/* ── Helpers ──────────────────────────────────────────────────── */
.muted-text { color: var(--muted); }
.flow > * + * { margin-top: 1em; }
.flow-lg > * + * { margin-top: 1.4em; }
.divider-dashed { border: 0; border-top: 1px dashed var(--border); margin: 2rem 0; }

/* ── Search results dropdown (used by search.js on families A & C) ── */
.search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  z-index: 50;
  max-height: 320px;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  display: none;
}
.search-results.show { display: block; }
.search-results__item {
  display: block;
  padding: 8px 12px;
  color: var(--fg);
  text-decoration: none;
  font-size: .9rem;
  border-bottom: 1px solid var(--border);
}
.search-results__item:last-child { border-bottom: 0; }
.search-results__item:hover { background: var(--code-bg); color: var(--accent); }
.search-results__empty {
  padding: 12px;
  color: var(--muted);
  font-size: .9rem;
  text-align: center;
}
.media-search { position: relative; }
.ref_topbar__search { position: relative; }
.ref_searchhero__box { position: relative; }

/* ── Mini-subscribe form (compact widget variant) ─────────────── */
.widget .subscribe-form {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  max-width: none;
}
.widget .subscribe-form label.checkbox { font-size: .8rem; }
.widget .subscribe-form input[type="email"] { padding: .45em .7em; font-size: .92rem; }
.widget .subscribe-form button { padding: .55em 1em; font-size: .92rem; }
.widget .subscribe-form .form-note { font-size: .78rem; margin-top: .5rem; }

/* ═════════════════════════════════════════════════════════════════
 * Sprint 3 — additional premium components
 * ═════════════════════════════════════════════════════════════════ */

/* ── Form: polished inputs, focus, success/error states ─────────── */
.subscribe-form { transition: opacity var(--t-base); }
.subscribe-form .form-field { margin-bottom: .9rem; display: flex; flex-direction: column; gap: .3rem; }
.subscribe-form .form-field label { font-weight: 600; font-size: .92rem; color: var(--fg); }
.subscribe-form input[type="text"],
.subscribe-form input[type="email"],
.subscribe-form input[type="url"],
.subscribe-form textarea {
  width: 100%;
  padding: .65em .9em;
  font: inherit;
  font-size: 1rem;
  background: #fff;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.subscribe-form input:focus,
.subscribe-form textarea:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.subscribe-form textarea { resize: vertical; min-height: 5em; }
.subscribe-form input[aria-invalid="true"],
.subscribe-form textarea[aria-invalid="true"] {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220,38,38,.15);
}
.form-error {
  color: #b91c1c;
  font-size: .85rem;
  margin-top: .3rem;
}
.form-success {
  background: color-mix(in srgb, var(--accent) 8%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  color: var(--fg);
  font-weight: 600;
  transition: opacity var(--t-base);
}
.form-success::before {
  content: "✓";
  display: inline-block;
  width: 1.3em; height: 1.3em;
  line-height: 1.3em;
  text-align: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  margin-right: .55em;
  font-weight: 800;
}
.subscribe-form .form-checkbox-wrap {
  display: flex;
  gap: .55em;
  align-items: flex-start;
  margin: .6rem 0 1rem;
  font-size: .9rem;
  color: var(--muted);
}
.subscribe-form .form-checkbox-wrap input[type="checkbox"] {
  margin-top: .25em;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

/* ── Primary button system (override family-specific where needed) ── */
.subscribe-form button[type="submit"] {
  padding: .75em 1.6em;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.subscribe-form button[type="submit"]:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-md);
}
.subscribe-form button[type="submit"]:active { transform: translateY(1px); }

/* ── Reading progress bar (family B sticky) ─────────────────────── */
.read-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent);
  z-index: 100;
  transition: width 80ms linear;
  pointer-events: none;
}

/* ── Inline gauge / meter (calculator result) ───────────────────── */
.gauge {
  position: relative;
  width: 100%;
  max-width: 280px;
  height: 8px;
  background: var(--code-bg);
  border-radius: 999px;
  overflow: hidden;
  margin: .8rem 0;
}
.gauge__fill {
  height: 100%;
  background: linear-gradient(90deg, #16a34a 0%, #f59e0b 60%, #dc2626 100%);
  border-radius: 999px;
}
.gauge__marker {
  position: absolute;
  top: -3px;
  width: 14px;
  height: 14px;
  background: #fff;
  border: 3px solid var(--accent);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

/* ── Featured strip (family A) ──────────────────────────────────── */
.featured-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin: 1.6rem 0 2rem;
}
@media (max-width: 820px) { .featured-strip { grid-template-columns: 1fr; } }

/* ── Editor's pick band (family E) ──────────────────────────────── */
.editors-pick {
  margin: 3rem 0 2rem;
  padding: 1.6rem 1.8rem;
  background: color-mix(in srgb, var(--accent) 4%, #fff);
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border));
}
.editors-pick__label {
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 1rem;
  display: block;
}
.editors-pick__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
@media (max-width: 820px) { .editors-pick__grid { grid-template-columns: 1fr; } }

/* ── Anchor link icons (hover-visible) ──────────────────────────── */
.article-anchor {
  opacity: 0;
  margin-left: .35em;
  font-size: .8em;
  color: var(--muted);
  text-decoration: none;
  transition: opacity var(--t-fast);
}
h2:hover .article-anchor, h3:hover .article-anchor { opacity: 1; }

/* ── In-article TOC ─────────────────────────────────────────────── */
.in-article-toc {
  background: var(--code-bg);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.3rem;
  margin: 1.4rem 0 1.8rem;
  font-size: .94rem;
}
.in-article-toc__head {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: .55rem;
}
.in-article-toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.in-article-toc li {
  padding: 3px 0;
  counter-increment: toc;
  position: relative;
  padding-left: 1.7em;
}
.in-article-toc li::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0; top: 3px;
  font-size: .75rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.in-article-toc a { color: var(--fg); text-decoration: none; }
.in-article-toc a:hover { color: var(--accent); text-decoration: underline; }
.in-article-toc a.is-active { color: var(--accent); font-weight: 600; }

/* ── Article hero kicker + standfirst (universal) ───────────────── */
.article-kicker {
  display: inline-block;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .6rem;
}

/* ── Newsletter band in footer (family A dark) ──────────────────── */
.newsletter-band {
  background: color-mix(in srgb, var(--accent) 12%, #1a1a1a);
  padding: 2rem 2rem;
  border-radius: var(--radius-lg);
  margin: 0 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
  align-items: center;
}
@media (max-width: 760px) { .newsletter-band { grid-template-columns: 1fr; } }
.newsletter-band h3 { font-family: inherit; color: #fff; margin: 0 0 .4rem; font-size: 1.3rem; }
.newsletter-band p { color: #cfd1d3; margin: 0; font-size: .95rem; }
.newsletter-band .subscribe-form { background: transparent; border: 0; padding: 0; margin: 0; }
.newsletter-band .subscribe-form .form-checkbox-wrap span,
.newsletter-band .subscribe-form .form-checkbox-wrap a { color: #cfd1d3; font-size: .78rem; }
.newsletter-band .subscribe-form .form-note { color: #9a9c9e; font-size: .78rem; }

/* ── Subtle decorative section rule ─────────────────────────────── */
.deco-rule {
  border: 0;
  height: 24px;
  margin: 2.4rem 0;
  position: relative;
}
.deco-rule::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: var(--border);
}
.deco-rule::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 6px var(--bg);
}

/* Article tables polished */
.article-body table,
article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
article thead th {
  background: color-mix(in srgb, var(--accent) 10%, var(--code-bg));
  color: var(--fg);
  font-weight: 700;
  text-align: left;
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: .92rem;
}
article tbody td {
  padding: .6rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: .94rem;
}
article tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--accent) 3%, #fff); }
article tbody tr:last-child td { border-bottom: 0; }


/* ===== Family a layout ===== */
/* ─── Family A — MEDIA PORTAL ───────────────────────────────────────
 * Magazine/news site. Two-row header (utility + rubric nav),
 * hero, category tiles, article grid, sticky right sidebar widgets,
 * multi-column footer. Playfair Display + PT Sans.
 * ─────────────────────────────────────────────────────────────────── */
body.media-portal {
  font-family: 'PT Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  margin: 0;
}
body.media-portal h1, body.media-portal h2, body.media-portal h3, body.media-portal h4 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.005em;
}
body.media-portal h1 { font-size: var(--fs-h1); line-height: var(--lh-display); letter-spacing: var(--ls-tight); font-weight: 800; }
body.media-portal h2 { font-size: var(--fs-h2); letter-spacing: var(--ls-tight); }

/* Header */
.media-top { background: #fff; border-bottom: 1px solid var(--border); }
.media-top__upper { padding: .7rem 0; border-bottom: 1px solid var(--border); }
.media-top__wrap { max-width: 1180px; margin: 0 auto; padding: 0 1.2rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.media-brand { display: inline-flex; align-items: center; gap: .55em; text-decoration: none; color: var(--fg); }
.media-brand__mark {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  font-family: 'Playfair Display', serif; font-weight: 800;
  font-size: 1.3rem; border-radius: 4px;
}
.media-brand__name { font-family: 'Playfair Display', serif; font-size: 1.35rem; font-weight: 700; }
.media-top__util { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.media-search { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; padding: 2px 4px 2px 12px; background: var(--code-bg); }
.media-search input { border: 0; background: transparent; padding: 6px 4px; font-size: .9rem; min-width: 180px; outline: none; color: var(--fg); }
.media-search input::placeholder { color: var(--muted); }
.media-search button { background: var(--accent); color: #fff; border: 0; width: 28px; height: 28px; border-radius: 999px; font-size: .95rem; cursor: not-allowed; opacity: .85; }
.media-util-nav { display: flex; gap: 1rem; font-size: .88rem; }
.media-util-nav a { color: var(--muted); text-decoration: none; }
.media-util-nav a:hover { color: var(--accent); }
.media-top__rubrics { padding: .5rem 0; }
.media-top__rubrics .media-top__wrap { gap: 1.2rem; }
.media-rubric-link {
  display: inline-block;
  color: var(--fg);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.media-rubric-link + .media-rubric-link { margin-left: 1.1rem; }
.media-rubric-link:hover, .media-rubric-link.is-active { border-bottom-color: var(--accent); color: var(--accent); }

/* Main grid: content + sticky sidebar */
.media-main { padding: var(--space-5) 0 var(--space-6); }
.media-main__wrap { max-width: var(--wrap-media); margin: 0 auto; padding: 0 1.4rem; }
.media-grid { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 3rem; align-items: start; }
@media (max-width: 1000px) { .media-grid { grid-template-columns: 1fr; } }

/* Hero — larger, layered shadow, restrained accent border */
.media-hero {
  display: grid; grid-template-columns: 44% 1fr;
  background: #fff;
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2.4rem;
  box-shadow: var(--shadow-md);
  isolation: isolate;
}
.media-hero .cover { aspect-ratio: 4/3; border-radius: 0; overflow: hidden; }
.media-hero .cover svg, .media-hero .cover img { transition: transform var(--t-slow); }
.media-hero:hover .cover svg, .media-hero:hover .cover img { transform: scale(1.03); }
.media-hero__body { padding: 2rem 2.4rem; display: flex; flex-direction: column; gap: .9rem; justify-content: center; }
.media-hero__eyebrow { font-size: .78rem; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .12em; }
.media-hero__title { font-size: clamp(1.6rem, 2.8vw, 2.4rem); margin: 0; line-height: 1.15; }
.media-hero__title a { color: var(--fg); text-decoration: none; }
.media-hero__title a:hover { color: var(--accent); }
.media-hero__lead { color: var(--muted); margin: 0; line-height: 1.55; }
.media-hero__meta { font-size: .85rem; color: var(--muted); }
.media-hero__cta { color: var(--accent); font-weight: 700; text-decoration: none; align-self: flex-start; padding-top: .3rem; border-top: 1px solid var(--border); }
@media (max-width: 720px) { .media-hero { grid-template-columns: 1fr; } }

/* Main category tiles */
.media-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-bottom: 2.4rem; }
@media (max-width: 720px) { .media-cats { grid-template-columns: 1fr; } }
.media-cat {
  background: var(--card-bg); border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius); padding: 1rem 1.1rem;
}
.media-cat__icon { width: 30px; height: 30px; background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--accent); font-weight: 800; font-family: 'Playfair Display', serif; }
.media-cat__title { font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 700; margin: .5rem 0 .6rem; }
.media-cat ul { list-style: none; padding: 0; margin: 0; }
.media-cat li { padding: 4px 0; border-top: 1px solid var(--border); font-size: .92rem; }
.media-cat li:first-child { border-top: 0; }
.media-cat a { color: var(--fg); text-decoration: none; }
.media-cat a:hover { color: var(--accent); }

/* Article cards grid (2-col) */
.media-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem; }
@media (max-width: 760px) { .media-cards { grid-template-columns: 1fr; } }
.media-cards .art-card .cover { aspect-ratio: 16/9; }

/* Popular widget with thumbnails (sidebar) */
.widget--popular.has-thumbs li {
  padding: .7rem 0;
  gap: .8em;
  align-items: center;
}
.widget--popular.has-thumbs li::before { font-size: .92rem; min-width: 1.2em; padding-top: .2em; }
.widget--popular.has-thumbs .pop-thumb {
  width: 56px; height: 56px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--code-bg);
}
.widget--popular.has-thumbs .pop-thumb svg, .widget--popular.has-thumbs .pop-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.widget--popular.has-thumbs .pop-meta { font-size: .76rem; color: var(--muted); margin-top: 2px; }

/* Sidebar */
.media-side { position: sticky; top: 1rem; align-self: start; }

/* Article page */
.media-article { background: #fff; padding: 1.6rem 1.8rem; border: 1px solid var(--border); border-radius: var(--radius); }
.media-article__cover { aspect-ratio: 16/9; margin: 1rem -.2rem 1.4rem; border-radius: var(--radius); overflow: hidden; }
.media-article h1 { margin: .4rem 0 .6rem; }
.media-article .article-meta { color: var(--muted); font-size: .9rem; display: flex; flex-wrap: wrap; gap: .4em; align-items: center; margin-bottom: 1rem; }
.media-article p { font-size: 1.05rem; }
.media-article a { color: var(--accent); }
.media-article-error-link { font-size: .85rem; margin-top: 2rem; color: var(--muted); }
.media-article-error-link a { color: var(--muted); text-decoration: underline dotted; }

/* Footer multi-column */
.media-footer { background: #1a1a1a; color: #cfd1d3; margin-top: 4rem; padding: 2.4rem 0 1.4rem; }
.media-footer__wrap { max-width: 1180px; margin: 0 auto; padding: 0 1.2rem; }
.media-footer h4 { color: #fff; font-family: 'Playfair Display', serif; }
.media-footer a { color: #cfd1d3; }
.media-footer a:hover { color: #fff; }
.media-footer .fc-foot__bottom { color: #9a9c9e; border-top-color: #2b2b2b; }
.media-footer .fc-foot__bottom a { color: #cfd1d3; }


/* ===== Site 12 override ===== */
/* ════════════════════════════════════════════════════════════════════
 * Site 12 — Уролог-блог (A, mens media)
 * Identity: doctor's column — navy + teal + soft gold.
 *           Libre Caslon Text + DM Sans. Distinct from site 06.
 * ════════════════════════════════════════════════════════════════════ */

body.site12 {
  --s12-bg:        #f5f7fa;
  --s12-bg-2:      #e8edf3;
  --s12-paper:     #ffffff;
  --s12-ink:       #0d1f3c;
  --s12-ink-2:     #2a3a55;
  --s12-muted:     #6a7790;
  --s12-line:      #d3dae4;
  --s12-line-2:    #b9c2d0;
  --s12-navy:      #15294d;
  --s12-navy-2:    #0a1b3a;
  --s12-teal:      #1f8a8a;
  --s12-teal-2:    #135c5c;
  --s12-teal-lt:   #bfe0e0;
  --s12-gold:      #c89b3f;
  --s12-gold-2:    #a67a1e;
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--s12-bg);
  color: var(--s12-ink);
}

body.site12 .media-top, body.site12 .media-footer:not(.s12-footer) { display: none; }
body.site12 .media-main__wrap { padding: 0; max-width: none; }
body.site12 .media-main { padding: 0; }

.s12-topbar { background: var(--s12-paper); border-bottom: 1px solid var(--s12-line); position: sticky; top: 0; z-index: 50; }
.s12-topbar__upper { border-bottom: 1px solid var(--s12-line); }
.s12-topbar__wrap { max-width: 1280px; margin: 0 auto; padding: 16px 28px; display: flex; align-items: center; gap: 24px; }
.s12-brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--s12-ink); }
.s12-brand__mark { color: var(--s12-navy); display: inline-flex; }
.s12-brand__txt { display: flex; flex-direction: column; line-height: 1.05; }
.s12-brand__name { font-family: 'Libre Caslon Text', Georgia, serif; font-weight: 700; font-size: 1.32rem; letter-spacing: -.006em; }
.s12-brand__tag { font-family: 'Libre Caslon Text', serif; font-style: italic; font-size: .82rem; color: var(--s12-muted); margin-top: 2px; }
.s12-topbar__util { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.s12-search { display: flex; align-items: center; background: var(--s12-bg-2); border: 1px solid var(--s12-line); border-radius: 999px; padding: 4px 5px 4px 16px; }
.s12-search input { background: transparent; border: 0; color: var(--s12-ink); font-size: .88rem; padding: 6px 4px; min-width: 200px; outline: none; }
.s12-search input::placeholder { color: var(--s12-muted); }
.s12-search button { background: var(--s12-navy); color: #fff; border: 0; padding: 6px 12px; border-radius: 999px; cursor: pointer; font-size: .9rem; }
.s12-btn { padding: 10px 22px; background: var(--s12-navy); color: #fff; text-decoration: none; font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: .9rem; border-radius: 999px; transition: background var(--t-fast); }
.s12-btn:hover { background: var(--s12-navy-2); }
.s12-topbar__rubrics .s12-topbar__wrap { padding: 0 28px; }
.s12-topbar__rubrics .media-rubric-link { display: inline-block; padding: 14px 18px 14px 0; margin-right: 4px; font-family: 'DM Sans', sans-serif; font-size: .9rem; font-weight: 600; color: var(--s12-ink-2); text-decoration: none; border-bottom: 2px solid transparent; transition: border-color var(--t-fast), color var(--t-fast); }
.s12-topbar__rubrics .media-rubric-link:hover { color: var(--s12-teal); border-bottom-color: var(--s12-teal); }
.s12-topbar__rubrics .media-rubric-link:first-child { color: var(--s12-navy); font-weight: 700; }

.s12-hero { background: var(--s12-paper); border-bottom: 1px solid var(--s12-line); position: relative; overflow: hidden; }
.s12-hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(800px 400px at 100% 0%, rgba(31,138,138,.1), transparent 60%); pointer-events: none; }
.s12-hero__wrap { max-width: 1280px; margin: 0 auto; padding: 72px 28px 56px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: end; position: relative; z-index: 1; }
@media (max-width: 1000px) { .s12-hero__wrap { grid-template-columns: 1fr; padding: 56px 24px 40px; } }
.s12-hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; background: var(--s12-teal-lt); color: var(--s12-teal-2); border-radius: 999px; font-family: 'DM Sans', sans-serif; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 18px; }
.s12-hero__eyebrow::before { content: ""; width: 8px; height: 8px; background: var(--s12-gold); border-radius: 50%; }
.s12-hero h1 { font-family: 'Libre Caslon Text', Georgia, serif; font-weight: 700; font-size: clamp(2.4rem, 1.4rem + 4vw, 4.6rem); line-height: 1.02; letter-spacing: -.022em; margin: 0 0 18px; color: var(--s12-ink); }
.s12-hero h1 em { font-style: italic; font-weight: 400; color: var(--s12-teal); }
.s12-hero__standfirst { font-family: 'Libre Caslon Text', serif; font-style: italic; font-size: clamp(1.18rem, 1.05rem + .4vw, 1.36rem); line-height: 1.42; color: var(--s12-ink-2); max-width: 56ch; margin: 0 0 22px; }
.s12-hero__chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.s12-hero__chips > span { font-size: .76rem; font-weight: 600; color: var(--s12-muted); text-transform: uppercase; letter-spacing: .1em; margin-right: 4px; font-family: 'DM Sans', sans-serif; }
.s12-hero__chips a { display: inline-block; padding: 6px 14px; background: var(--s12-bg-2); color: var(--s12-ink); font-size: .86rem; text-decoration: none; border-radius: 999px; border: 1px solid var(--s12-line); transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast); }
.s12-hero__chips a:hover { background: var(--s12-navy); color: #fff; border-color: var(--s12-navy); }
.s12-hero__feat { background: var(--s12-navy); color: #fff; padding: 32px 30px 28px; position: relative; border-left: 5px solid var(--s12-gold); }
.s12-hero__feat__eyebrow { font-family: 'DM Sans', sans-serif; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--s12-gold); margin: 0 0 10px; }
.s12-hero__feat h2 { font-family: 'Libre Caslon Text', serif; font-weight: 700; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.85rem); line-height: 1.1; margin: 0 0 10px; letter-spacing: -.014em; color: #fff; }
.s12-hero__feat h2 a { color: inherit; text-decoration: none; }
.s12-hero__feat h2 a:hover { color: var(--s12-teal-lt); }
.s12-hero__feat p { font-family: 'Libre Caslon Text', serif; font-style: italic; font-size: 1.02rem; color: #dde6f0; line-height: 1.45; margin: 0 0 14px; }
.s12-hero__feat__meta { font-size: .78rem; color: var(--s12-teal-lt); letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }

.s12-stats { background: var(--s12-navy); color: #fff; }
.s12-stats__wrap { max-width: 1280px; margin: 0 auto; padding: 32px 28px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 900px) { .s12-stats__wrap { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .s12-stats__wrap { grid-template-columns: 1fr; } }
.s12-stat { padding: 18px 22px; background: var(--s12-navy-2); border-radius: 12px; }
.s12-stat__num { font-family: 'Libre Caslon Text', serif; font-weight: 700; font-size: 1.5rem; color: var(--s12-gold); line-height: 1; letter-spacing: -.014em; }
.s12-stat__txt { font-size: .84rem; color: #c4cee0; line-height: 1.4; margin-top: 6px; }

.s12-section { max-width: 1280px; margin: 0 auto; padding: 64px 28px; }
.s12-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; padding-bottom: 16px; border-bottom: 1px solid var(--s12-line); position: relative; }
.s12-section__head::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 80px; height: 3px; background: var(--s12-gold); }
.s12-section__kicker { display: inline-block; font-family: 'DM Sans', sans-serif; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--s12-teal); margin-bottom: 8px; }
.s12-section__title { font-family: 'Libre Caslon Text', serif; font-weight: 700; font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem); margin: 0; color: var(--s12-ink); letter-spacing: -.014em; }
.s12-section__sub { color: var(--s12-muted); font-family: 'Libre Caslon Text', serif; font-style: italic; font-size: 1.05rem; max-width: 60ch; margin: 6px 0 0; }

.s12-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 36px; align-items: start; }
@media (max-width: 1000px) { .s12-grid { grid-template-columns: 1fr; } }
.s12-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 720px) { .s12-cards { grid-template-columns: 1fr; } }
.s12-card { background: var(--s12-paper); border: 1px solid var(--s12-line); text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast); }
.s12-card:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -22px rgba(13,31,60,.4); border-color: var(--s12-teal); }
.s12-card__cover { aspect-ratio: 16/10; overflow: hidden; border-bottom: 1px solid var(--s12-line); background: var(--s12-bg-2); }
.s12-card__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.s12-card:hover .s12-card__cover img { transform: scale(1.04); }
.s12-card__body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.s12-card__eyebrow { font-family: 'DM Sans', sans-serif; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--s12-teal); }
.s12-card__title { font-family: 'Libre Caslon Text', serif; font-weight: 700; font-size: 1.3rem; line-height: 1.1; margin: 4px 0 6px; color: var(--s12-ink); letter-spacing: -.012em; }
.s12-card__title a { color: inherit; text-decoration: none; }
.s12-card__title a:hover { color: var(--s12-teal-2); }
.s12-card__deck { font-size: .94rem; line-height: 1.55; color: var(--s12-ink-2); margin: 0 0 10px; flex: 1; }
.s12-card__meta { display: flex; gap: 10px; align-items: center; font-size: .78rem; color: var(--s12-muted); margin-top: auto; padding-top: 10px; border-top: 1px dotted var(--s12-line); }
.s12-card__meta .dot { width: 3px; height: 3px; background: var(--s12-gold); border-radius: 50%; }

.s12-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 130px; }
@media (max-width: 1000px) { .s12-side { position: static; } }
.s12-widget { padding: 22px; background: var(--s12-paper); border: 1px solid var(--s12-line); border-radius: 10px; }
.s12-widget h3 { font-family: 'Libre Caslon Text', serif; font-weight: 700; font-size: 1.05rem; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--s12-line); letter-spacing: -.008em; color: var(--s12-ink); }
.s12-widget ol { padding-left: 0; margin: 0; list-style: none; counter-reset: pop; display: flex; flex-direction: column; gap: 10px; }
.s12-widget ol li { counter-increment: pop; padding-left: 32px; position: relative; font-size: .9rem; line-height: 1.4; }
.s12-widget ol li::before { content: counter(pop, decimal-leading-zero); position: absolute; left: 0; top: 0; font-family: 'Libre Caslon Text', serif; font-style: italic; font-size: 1rem; color: var(--s12-gold); }
.s12-widget ol li a { color: var(--s12-ink); text-decoration: none; }
.s12-widget ol li a:hover { color: var(--s12-teal-2); }
.s12-widget p { font-size: .9rem; color: var(--s12-ink-2); line-height: 1.5; margin: 0; font-family: 'Libre Caslon Text', serif; font-style: italic; }
.s12-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.s12-tags a { padding: 4px 10px; background: var(--s12-bg-2); color: var(--s12-ink-2); font-size: .78rem; text-decoration: none; border-radius: 999px; }
.s12-tags a:hover { background: var(--s12-navy); color: #fff; }
.s12-trust { display: flex; flex-wrap: wrap; gap: 6px; }
.s12-trust span { padding: 4px 10px; background: var(--s12-gold); color: #fff; font-size: .76rem; font-weight: 600; border-radius: 999px; }

.s12-cta { background: var(--s12-navy); color: #f5f7fa; position: relative; overflow: hidden; }
.s12-cta::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(800px 400px at 100% 100%, rgba(31,138,138,.32), transparent 60%); pointer-events: none; }
.s12-cta__wrap { max-width: 1280px; margin: 0 auto; padding: 72px 28px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; position: relative; z-index: 1; }
@media (max-width: 900px) { .s12-cta__wrap { grid-template-columns: 1fr; } }
.s12-cta h2 { font-family: 'Libre Caslon Text', serif; font-weight: 700; font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.5rem); letter-spacing: -.018em; margin: 0 0 14px; color: #fff; }
.s12-cta p { color: #cad3e0; font-family: 'Libre Caslon Text', serif; font-style: italic; font-size: 1.12rem; line-height: 1.5; max-width: 56ch; margin: 0 0 22px; }
.s12-cta__trust { display: flex; flex-wrap: wrap; gap: 10px; }
.s12-cta__trust span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18); border-radius: 999px; font-size: .8rem; font-weight: 600; color: #f5f7fa; }
.s12-cta__trust span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--s12-gold); }
.s12-cta__form { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: 28px; }
.s12-cta__form-head { font-family: 'Libre Caslon Text', serif; font-weight: 700; font-size: 1.32rem; color: #fff; margin: 0 0 12px; letter-spacing: -.012em; }
.s12-cta__form .subscribe-form { background: transparent; border: 0; padding: 0; margin: 0; }
.s12-cta__form .subscribe-form label { color: #cad3e0; }
.s12-cta__form .subscribe-form input[type="email"] { background: rgba(0,0,0,.32); color: #fff; border-color: rgba(255,255,255,.22); }
.s12-cta__form .subscribe-form input[type="email"]:focus { border-color: var(--s12-gold); box-shadow: 0 0 0 3px rgba(200,155,63,.28); }
.s12-cta__form button[type="submit"] { background: var(--s12-teal); }
.s12-cta__form button[type="submit"]:hover { background: var(--s12-teal-2); }
.s12-cta__form .form-checkbox-wrap span, .s12-cta__form .form-checkbox-wrap a { color: #cad3e0; }
.s12-cta__form .form-note { color: #9aa6bd; }

.s12-footer { background: var(--s12-paper); border-top: 1px solid var(--s12-line); }
.s12-footer__wrap { max-width: 1280px; margin: 0 auto; padding: 56px 28px 22px; }
.s12-footer__top { display: grid; grid-template-columns: 1fr 1.6fr; gap: 48px; padding-bottom: 28px; border-bottom: 1px solid var(--s12-line); }
@media (max-width: 760px) { .s12-footer__top { grid-template-columns: 1fr; } }
.s12-footer__lede { color: var(--s12-muted); font-family: 'Libre Caslon Text', serif; font-style: italic; font-size: 1rem; line-height: 1.5; margin: 14px 0 0; max-width: 36ch; }
.s12-footer__top .fc-foot { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 760px) { .s12-footer__top .fc-foot { grid-template-columns: repeat(2, 1fr); } }
.s12-footer__top .fc-foot h4 { font-family: 'Libre Caslon Text', serif; font-weight: 700; font-size: .98rem; color: var(--s12-navy); margin: 0 0 12px; letter-spacing: -.004em; }
.s12-footer__top .fc-foot ul { list-style: none; padding: 0; margin: 0; }
.s12-footer__top .fc-foot a { color: var(--s12-ink-2); text-decoration: none; font-size: .88rem; display: block; padding: 3px 0; }
.s12-footer__top .fc-foot a:hover { color: var(--s12-teal-2); }
.s12-footer__bot { padding-top: 18px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.s12-footer__bot p { margin: 0; font-size: .82rem; color: var(--s12-muted); }
.s12-footer__discl { max-width: 60ch; }
.s12-footer__bot a { color: var(--s12-teal-2); }

.s12-article-grid { max-width: 1280px; margin: 0 auto; padding: 36px 28px 56px; display: grid; grid-template-columns: 2fr 1fr; gap: 36px; align-items: start; }
@media (max-width: 1000px) { .s12-article-grid { grid-template-columns: 1fr; } }
.s12-article { background: var(--s12-paper); border: 1px solid var(--s12-line); padding: 40px 44px 44px; border-top: 4px solid var(--s12-gold); }
.s12-article .crumbs { color: var(--s12-muted); font-size: .82rem; margin-bottom: 14px; }
.s12-article .crumbs a { color: var(--s12-muted); text-decoration: none; }
.s12-article .crumbs a:hover { color: var(--s12-teal-2); }
.s12-article__eyebrow { display: inline-block; padding: 4px 12px; background: var(--s12-teal-lt); color: var(--s12-teal-2); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; border-radius: 999px; margin-bottom: 14px; }
.s12-article h1 { font-family: 'Libre Caslon Text', serif; font-weight: 700; font-size: clamp(1.9rem, 1.4rem + 2.4vw, 3rem); line-height: 1.04; margin: 0 0 14px; color: var(--s12-ink); letter-spacing: -.018em; }
.s12-article__standfirst { font-family: 'Libre Caslon Text', serif; font-style: italic; font-size: clamp(1.12rem, 1rem + .4vw, 1.32rem); line-height: 1.42; color: var(--s12-ink-2); margin: 0 0 14px; }
.s12-article__meta { font-size: .82rem; color: var(--s12-muted); margin-bottom: 18px; letter-spacing: .04em; }
.s12-article__cover { aspect-ratio: 16/9; margin: 18px 0 26px; overflow: hidden; border: 1px solid var(--s12-line); }
.s12-article__cover img { width: 100%; height: 100%; object-fit: cover; }
.s12-article__body { font-family: 'DM Sans', sans-serif; font-size: 1.05rem; line-height: 1.72; color: var(--s12-ink); }
.s12-article__body h2 { font-family: 'Libre Caslon Text', serif; font-weight: 700; font-size: 1.7rem; margin-top: 2.4rem; color: var(--s12-ink); letter-spacing: -.014em; }
.s12-article__body h3 { font-family: 'Libre Caslon Text', serif; font-weight: 700; font-size: 1.32rem; margin-top: 1.8rem; color: var(--s12-ink); letter-spacing: -.012em; }
.s12-article__body a { color: var(--s12-teal-2); text-decoration: underline; text-underline-offset: 2px; }
.s12-article__body a:hover { color: var(--s12-gold-2); }
.s12-article__body blockquote.pull-quote { font-family: 'Libre Caslon Text', serif; font-style: italic; font-size: 1.4rem; border-left: 4px solid var(--s12-gold); padding-left: 22px; color: var(--s12-ink); margin: 24px 0; }
body.site12 .summary-box { background: var(--s12-bg-2); border-left: 4px solid var(--s12-teal); border-radius: 0 8px 8px 0; }

.s12-page-wrap { max-width: 880px; margin: 36px auto 0; padding: 0 28px 64px; }
.s12-page-wrap h1 { font-family: 'Libre Caslon Text', serif; font-weight: 700; letter-spacing: -.014em; font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.4rem); color: var(--s12-ink); }
.s12-page-wrap .crumbs { margin-bottom: 16px; font-size: .82rem; color: var(--s12-muted); }
.s12-page-wrap .crumbs a { color: var(--s12-muted); }
.s12-page-wrap .subscribe-form { max-width: 520px; }
body.site12 .sources { border-top: 1px solid var(--s12-line); margin-top: 36px; padding-top: 22px; }
body.site12 .sources h3 { font-family: 'Libre Caslon Text', serif; font-weight: 700; font-size: 1.2rem; color: var(--s12-ink); text-transform: none; letter-spacing: -.008em; }

