/* =========================================================================
   Unethical Money - site stylesheet
   Blog design inspired by discourse.org / blog.discourse.org.
   Fonts: Baloo 2 (display), Figtree (UI/body), Source Serif 4 (editorial).
   Soft lavender gradient headers with blurred color blobs; purple accent;
   rounded white cards with hover-lift; dark footer.
   Ad slots have fixed reserved dimensions => zero layout shift (CLS).
   ========================================================================= */

:root {
  /* Accent + text */
  --purple: #6D5AE6;
  --purple-dark: #5a49c9;
  --purple-text: #4B3BB3;
  --pill-bg: #ECE7FF;
  --pill-bg-hover: #ddd4ff;

  --heading: #171522;
  --body: #3a3944;
  --muted: #6b6a7a;

  /* Surfaces */
  --page: #ffffff;
  --card: #ffffff;
  --card-border: #efeaff;
  --line: #e8e4f5;
  --footer-bg: #171522;

  --yellow: #F2B705;

  /* Fonts */
  --font-display: "Baloo 2", system-ui, "Segoe UI", Arial, sans-serif;
  --font-ui: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --maxw: 1160px;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow-card: 0 10px 30px rgba(30, 20, 60, .07);
  --shadow-card-hover: 0 18px 44px rgba(30, 20, 60, .13);
  --shadow-soft: 0 2px 10px rgba(30, 20, 60, .06);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--body);
  background: var(--page);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--purple); text-decoration: none; }
a:hover { color: var(--purple-dark); text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--heading);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 40px 20px 8px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--purple); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  font-family: var(--font-ui); font-weight: 700; font-size: .95rem;
  padding: .6rem 1.3rem; border-radius: 12px; border: 1.5px solid transparent;
  cursor: pointer; transition: background .18s ease, box-shadow .18s ease, color .18s ease, border-color .18s ease;
  text-decoration: none; line-height: 1.2;
}
.btn--pill { border-radius: 999px; }
.btn--primary {
  background: var(--purple); color: #fff;
  box-shadow: 0 6px 16px rgba(109, 90, 230, .28);
}
.btn--primary:hover { background: var(--purple-dark); color: #fff; text-decoration: none; }
.btn--secondary {
  background: #fff; color: var(--purple); border-color: var(--purple);
}
.btn--secondary:hover { background: var(--pill-bg); color: var(--purple-dark); text-decoration: none; }

/* ---- Header / nav ----------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, #F4F1FF 0%, rgba(255,255,255,.92) 100%);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid rgba(109, 90, 230, .08);
  transition: background .2s ease, box-shadow .2s ease;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 4px 20px rgba(30, 20, 60, .06);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; }
.brand-name {
  font-family: var(--font-display); font-weight: 800; font-size: 1.35rem;
  color: var(--heading); letter-spacing: -0.02em; line-height: 1;
}
.brand-name-accent { color: var(--purple); }

.primary-nav ul {
  display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0;
}
.primary-nav a {
  display: inline-block; font-weight: 600; font-size: .98rem;
  color: var(--heading); padding: .5rem .8rem; border-radius: 999px;
}
.primary-nav a:hover { background: var(--pill-bg); color: var(--purple-text); text-decoration: none; }
.nav-cta-li { margin-left: 6px; }
.nav-cta { padding: .5rem 1.2rem; }
.nav-cta:hover { background: var(--purple-dark); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; width: 44px; height: 40px;
  background: transparent; border: 1.5px solid var(--card-border); border-radius: 12px;
  cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle-bar { width: 20px; height: 2px; background: var(--heading); border-radius: 2px; }

/* ---- Hero (soft lavender gradient + blobs) ---------------------------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #F4F1FF 0%, #FFFFFF 100%);
  padding: 64px 20px 56px;
}
.hero--compact { padding: 44px 20px 36px; }
.hero--article { padding: 40px 20px 32px; }
.hero-inner, .article-head-inner { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; }

.blob {
  position: absolute; z-index: 1; border-radius: 50%;
  filter: blur(60px); opacity: .5; pointer-events: none;
}
.blob--pink   { width: 340px; height: 340px; background: #ffd6e7; top: -80px; left: -60px; }
.blob--blue   { width: 300px; height: 300px; background: #d6e4ff; top: -40px; right: -40px; }
.blob--yellow { width: 260px; height: 260px; background: #fff3c4; bottom: -110px; left: 25%; opacity: .45; }
.blob--purple { width: 300px; height: 300px; background: #e6dcff; bottom: -120px; right: 8%; }

.hero-eyebrow {
  font-family: var(--font-ui); font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; font-size: .78rem; color: var(--purple);
  margin: 0 0 14px;
}
.hero-eyebrow a { color: var(--purple); }
.hero-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.2rem, 5.5vw, 4rem); line-height: 1.02;
  letter-spacing: -0.02em; color: var(--heading); max-width: 16ch; margin: 0 0 20px;
}
.hero-title--sm { font-size: clamp(2rem, 4vw, 3rem); max-width: 24ch; }
.squiggle-word { position: relative; display: inline-block; white-space: nowrap; }
.squiggle {
  position: absolute; left: 0; right: 0; bottom: -.16em; width: 100%; height: .35em;
  overflow: visible;
}
.hero-sub {
  font-family: var(--font-serif); font-size: 1.25rem; line-height: 1.55;
  color: var(--muted); max-width: 60ch; margin: 0 0 26px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- Breadcrumbs ------------------------------------------------------ */
.breadcrumbs { margin: 0 0 14px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs li { font-size: .82rem; color: var(--muted); font-weight: 600; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: #c9c3e0; }
.breadcrumbs a { color: var(--purple); }
.breadcrumbs [aria-current="page"] span { color: var(--muted); }

/* ---- Listing layout (tags sidebar + main) ----------------------------- */
.listing-layout {
  display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 32px;
  align-items: start;
}
.article-layout .listing-aside,
.listing-aside { min-width: 0; }
.listing-main { min-width: 0; }

.listing-topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}
.listing-h {
  font-family: var(--font-display); font-weight: 700; font-size: 1.6rem;
  color: var(--heading); margin: 0;
}

/* ---- Tags sidebar ----------------------------------------------------- */
.tags-sidebar { position: sticky; top: 88px; }
.sidebar-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 20px;
}
.sidebar-card-h {
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
  color: var(--heading);
}
.tags-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  background: none; border: none; padding: 0; cursor: pointer; margin-bottom: 14px;
}
.tags-caret { color: var(--muted); transition: transform .2s ease; }
.tags-toggle[aria-expanded="false"] .tags-caret { transform: rotate(-90deg); }
.tags-body { overflow: hidden; }
.tags-body[hidden] { display: none; }

.tag-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill {
  display: inline-block; background: var(--pill-bg); color: var(--purple-text);
  border-radius: 999px; padding: .25rem .7rem; font-size: .8rem; font-weight: 600;
  transition: background .15s ease;
}
.tag-pill:hover { background: var(--pill-bg-hover); color: var(--purple-text); text-decoration: none; }
.tag-pill--active { background: var(--purple); color: #fff; }
.tag-pill--active:hover { background: var(--purple-dark); color: #fff; }

/* ---- Horizontal tags bar (above the listing) ------------------------- */
.tags-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 18px; margin-bottom: 22px;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); box-shadow: var(--shadow-card);
}
.tags-bar-label {
  font-family: var(--font-display); font-weight: 700; font-size: .95rem;
  color: var(--heading); flex: 0 0 auto;
}
.tags-bar .tag-pills { flex: 1 1 auto; }
.card--featured .card-media-fallback { font-size: 5rem; }

/* ---- Search box ------------------------------------------------------- */
.searchbox { position: relative; display: flex; align-items: center; }
.searchbox-icon {
  position: absolute; left: 14px; width: 18px; height: 18px; color: var(--muted);
  pointer-events: none;
}
.searchbox input {
  font-family: var(--font-ui); font-size: .95rem; color: var(--heading);
  background: #fff; border: 1px solid #e3ddf7; border-radius: 999px;
  padding: .6rem 1rem .6rem 2.5rem; min-width: 230px; box-shadow: var(--shadow-soft);
  outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.searchbox input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(109,90,230,.15); }

/* ---- Category label ---------------------------------------------------- */
.cat-label {
  display: inline-block; text-transform: uppercase; letter-spacing: .06em;
  font-size: .72rem; font-weight: 700; color: var(--purple);
}

/* ---- Cards ------------------------------------------------------------ */
.card-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px;
}
.card-grid--compact { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }

.card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); box-shadow: var(--shadow-card);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }

.card-media-link { display: block; }
.card-media {
  position: relative; aspect-ratio: 16 / 9; background: #f2eefc; overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media-fallback {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 3rem; color: #fff;
  background: linear-gradient(135deg, #6D5AE6, #a78bfa);
}
.media-pill {
  position: absolute; bottom: 10px; left: 10px;
  background: rgba(23, 21, 34, .82); color: #fff; font-size: .72rem; font-weight: 600;
  padding: .2rem .55rem; border-radius: 999px; letter-spacing: .02em;
}

.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title {
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem;
  line-height: 1.12; letter-spacing: -0.01em; margin: 2px 0 0;
}
.card-title a { color: var(--heading); }
.card-title a:hover { color: var(--purple); text-decoration: none; }
.card-excerpt {
  font-family: var(--font-serif); font-size: .98rem; line-height: 1.5; color: var(--muted);
  margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* Byline */
.byline { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 6px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; color: #fff; font-size: 1rem;
  background: linear-gradient(135deg, #6D5AE6, #a78bfa);
}
.avatar--sm { width: 28px; height: 28px; font-size: .85rem; }
.byline-text { display: flex; flex-direction: column; line-height: 1.25; }
.byline-name { font-weight: 700; font-size: .85rem; color: var(--heading); }
.byline-meta { font-size: .78rem; color: var(--muted); }

/* Featured (large horizontal) card */
.featured-wrap { margin-bottom: 30px; }
.card--featured { flex-direction: row; align-items: stretch; }
.card--featured .card-media-link { flex: 0 0 52%; min-width: 0; align-self: stretch; }
.card--featured .card-media { height: 100%; width: 100%; aspect-ratio: auto; min-height: 300px; }
.card--featured .card-body { justify-content: center; padding: 28px 32px; gap: 12px; }
.card--featured .card-title { font-size: clamp(1.5rem, 2.5vw, 2rem); }
.card--featured .card-excerpt { font-size: 1.1rem; -webkit-line-clamp: 3; }

/* In-feed ad card */
.card--ad {
  grid-column: 1 / -1; align-items: center; justify-content: center;
  background: #faf9ff; border-style: dashed;
}
.card--ad:hover { transform: none; box-shadow: var(--shadow-card); }

/* ---- Topic hubs + intro ----------------------------------------------- */
.topic-hubs, .intro-copy, .crosslinks { margin-top: 48px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.cat-card {
  display: block; background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 22px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); text-decoration: none; }
.cat-card-desc { font-family: var(--font-serif); color: var(--muted); font-size: .95rem; margin: 8px 0 14px; }
.cat-count { font-weight: 700; font-size: .85rem; color: var(--purple); }

.intro-copy p { font-family: var(--font-serif); font-size: 1.08rem; color: var(--body); max-width: 68ch; }

.empty-note { grid-column: 1 / -1; color: var(--muted); font-family: var(--font-serif); }

/* ---- Article page ----------------------------------------------------- */
.article-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.04; letter-spacing: -0.02em;
  color: var(--heading); max-width: 20ch; margin: 4px 0 18px;
}
.article-dek {
  font-family: var(--font-serif); font-size: 1.3rem; line-height: 1.5; color: var(--muted);
  max-width: 58ch; margin: 0 0 22px;
}
.byline--article .avatar { width: 44px; height: 44px; font-size: 1.2rem; }
.byline--article .byline-name { font-size: .95rem; }
.byline--article .byline-meta { font-size: .85rem; }

.article-hero {
  margin: 26px 0 0; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-card); background: #f2eefc;
}
.article-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.article-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 44px;
  align-items: start; padding-top: 40px; padding-bottom: 24px;
}
.article { min-width: 0; max-width: 760px; }

.article-body {
  font-family: var(--font-serif); font-size: 1.18rem; line-height: 1.72; color: var(--body);
}
.article-body > * { margin: 0 0 1.3em; }
.article-body h2 {
  font-family: var(--font-display); font-weight: 700; font-size: 1.7rem;
  margin: 1.6em 0 .5em; color: var(--heading);
}
.article-body h3 {
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem;
  margin: 1.3em 0 .4em; color: var(--heading);
}
.article-body a { text-decoration: underline; text-underline-offset: 2px; }
.article-body ul, .article-body ol { padding-left: 1.4em; }
.article-body li { margin-bottom: .5em; }
.article-body strong { color: var(--heading); }
.article-body blockquote {
  border-left: 4px solid var(--purple); background: #faf9ff; margin: 1.4em 0;
  padding: .6em 1.2em; border-radius: 0 12px 12px 0; color: var(--body);
}
.article-body code {
  background: var(--pill-bg); color: var(--purple-text); padding: .1em .4em;
  border-radius: 6px; font-size: .9em;
}

/* Section blocks inside article */
.takeaways, .video-block, .faq, .related, .discussion { margin-top: 44px; }
.takeaways h2, .video-block h2, .faq h2, .discussion h2 {
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; margin-bottom: .6em;
}
.takeaways {
  background: linear-gradient(180deg, #F4F1FF, #fff); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 26px 30px; box-shadow: var(--shadow-soft);
}
.takeaways ul { list-style: none; margin: 0; padding: 0; }
.takeaways li {
  font-family: var(--font-serif); font-size: 1.05rem; line-height: 1.5; color: var(--body);
  padding-left: 30px; position: relative; margin-bottom: 12px;
}
.takeaways li::before {
  content: "\2713"; position: absolute; left: 0; top: 0;
  color: var(--purple); font-weight: 800; font-family: var(--font-ui);
}

/* Video / platform links */
.platform-links { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.platform-link {
  display: flex; flex-direction: column; gap: 2px;
  background: #fff; border: 1px solid var(--card-border); border-radius: var(--radius-sm);
  padding: 14px 16px; box-shadow: var(--shadow-soft); transition: transform .15s ease, box-shadow .15s ease;
}
.platform-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); text-decoration: none; }
.platform-name { font-weight: 700; color: var(--heading); }
.platform-go { font-size: .85rem; color: var(--purple); }
.embed-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); background: #000; }
.embed-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* FAQ */
.faq-item {
  background: #fff; border: 1px solid var(--card-border); border-radius: var(--radius-sm);
  margin-bottom: 12px; box-shadow: var(--shadow-soft); overflow: hidden;
}
.faq-item summary {
  cursor: pointer; list-style: none; padding: 16px 20px; font-weight: 700;
  font-family: var(--font-ui); color: var(--heading);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; float: right; color: var(--purple); font-weight: 800; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-answer { padding: 0 20px 18px; font-family: var(--font-serif); color: var(--body); }

/* ---- Article sidebar (products + ad) ---------------------------------- */
.article-aside { min-width: 0; }
.aside-sticky { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 22px; }
.sidebar-card-h {
  display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  color: var(--heading); margin-bottom: 16px;
}
.products-sub { font-size: .82rem; color: var(--muted); margin: -8px 0 16px; line-height: 1.4; }
/* Resources list grows with the number of products, then scrolls (no scrollbar
   appears until it overflows ~5 items). Room on the right for the scrollbar. */
.product-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; max-height: 460px; overflow-y: auto; }
.product-list::-webkit-scrollbar { width: 8px; }
.product-list::-webkit-scrollbar-thumb { background: var(--card-border); border-radius: 999px; }
.products-card:has(.product:nth-child(6)) .product-list { padding-right: 8px; }

/* ---- At a glance fact box -------------------------------------------- */
.glance-table { width: 100%; border-collapse: collapse; }
.glance-table td { padding: 7px 0; font-size: .86rem; vertical-align: top; border-top: 1px solid var(--card-border); }
.glance-table tr:first-child td { border-top: none; }
.glance-label { color: var(--muted); white-space: nowrap; padding-right: 12px; }
.glance-value { color: var(--heading); font-weight: 600; text-align: right; }
.glance-pill { display: inline-block; font-size: .76rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; }
.glance-pill.tone-ok { background: #e7f6ec; color: #1a7f43; }
.glance-pill.tone-warn { background: #fdf1dd; color: #9a6206; }
.glance-pill.tone-bad { background: #fdeaea; color: #b3261e; }
.glance-pill.tone-neutral { background: var(--pill-bg); color: var(--purple-text); }
.product { display: flex; gap: 14px; }
.product-cover {
  flex: 0 0 62px; width: 62px; height: 88px; border-radius: 8px;
  background: linear-gradient(135deg, #6D5AE6, #a78bfa); background-size: cover; background-position: center;
  box-shadow: 0 4px 10px rgba(30,20,60,.15);
  display: flex; align-items: center; justify-content: center;
}
.product-emoji { font-size: 1.7rem; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.product-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.product-title { font-weight: 600; font-size: .92rem; line-height: 1.25; color: var(--heading); margin: 0; }
.product-note { font-size: .78rem; color: var(--muted); line-height: 1.35; margin: 0; }
.product-price { font-weight: 700; font-size: .85rem; color: var(--purple-text); margin: 0; }
.btn--amazon { align-self: flex-start; font-size: .78rem; padding: .35rem .8rem; margin-top: 2px; background: var(--purple); color: #fff; }
.btn--amazon:hover { background: var(--purple-dark); color: #fff; }
.product-disclosure { font-size: .72rem; color: var(--muted); margin: 16px 0 0; line-height: 1.4; }

/* ---- Sidebar short-video card ---------------------------------------- */
.video-card .sidebar-card-h { margin-bottom: 14px; }
.short-frame {
  position: relative; aspect-ratio: 9 / 16; width: 100%; margin: 0 auto;
  max-width: 260px; border-radius: 14px; overflow: hidden; background: #0e0b1c;
  box-shadow: 0 8px 22px rgba(30,20,60,.22);
}
.short-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.short-poster {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, #6D5AE6, #4b39c4); background-size: cover; background-position: center;
}
.short-poster--img::after { content: ""; position: absolute; inset: 0; background: rgba(14,11,28,.28); }
.short-poster-mark { font-family: var(--font-display); font-weight: 800; font-size: 3.4rem; color: rgba(255,255,255,.9); }
.short-play {
  position: absolute; z-index: 2; width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.92); color: var(--purple); font-size: 1.3rem; padding-left: 4px;
  box-shadow: 0 6px 16px rgba(0,0,0,.3); transition: transform .15s ease;
}
.short-poster:hover .short-play { transform: scale(1.08); }
.short-platforms { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; justify-content: center; }
.short-plink {
  font-size: .78rem; font-weight: 600; color: var(--purple-text);
  background: var(--pill-bg); border-radius: 999px; padding: .3rem .8rem;
  transition: background .15s ease;
}
.short-plink:hover { background: var(--pill-bg-hover); text-decoration: none; }

/* ---- Forum ------------------------------------------------------------ */
.forum-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; max-width: 780px; }
.forum-item {
  background: #fff; border: 1px solid var(--card-border); border-radius: var(--radius-sm);
  padding: 18px 20px; box-shadow: var(--shadow-soft);
}
.forum-item-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.comment-author { font-weight: 700; color: var(--heading); }
.comment-time { font-size: .8rem; color: var(--muted); margin-left: auto; }
.comment-body { font-family: var(--font-serif); color: var(--body); margin: 6px 0 8px; }
.forum-item-link { font-size: .85rem; font-weight: 600; }
.forum-item--empty { font-family: var(--font-serif); color: var(--muted); }

/* Discussion (per-article) */
.count-badge {
  display: inline-block; background: var(--pill-bg); color: var(--purple-text);
  border-radius: 999px; padding: .1rem .6rem; font-size: .85rem; font-weight: 700;
  vertical-align: middle; margin-left: 6px; font-family: var(--font-ui);
}
.comment-list { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 14px; }
.comment {
  background: #fff; border: 1px solid var(--card-border); border-radius: var(--radius-sm);
  padding: 16px 18px; box-shadow: var(--shadow-soft);
}
.comment-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.comment--empty { font-family: var(--font-serif); color: var(--muted); }

.notice { border-radius: var(--radius-sm); padding: 12px 16px; font-weight: 600; margin-bottom: 18px; }
.notice--ok { background: #e6f7ec; color: #1a7a43; }
.notice--warn { background: #fdeede; color: #a15c00; }

.comment-form {
  background: linear-gradient(180deg, #F4F1FF, #fff); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 24px 26px; box-shadow: var(--shadow-soft);
}
.comment-form h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-weight: 600; font-size: .88rem; color: var(--heading); }
.field em { color: var(--purple); font-style: normal; }
.field small { color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  font-family: var(--font-ui); font-size: 1rem; color: var(--heading);
  border: 1px solid #e3ddf7; border-radius: 12px; padding: .6rem .8rem; background: #fff;
  outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(109,90,230,.15); }
.hp { position: absolute; left: -9999px; }
.form-note { margin-top: 12px; }
.muted { color: var(--muted); }

/* ---- Ad slots (reserved sizes -> zero CLS) ---------------------------- */
.ad-wrap-top, .ad-wrap-bottom { display: flex; justify-content: center; padding: 18px 20px; }
.ad {
  position: relative; display: flex; align-items: center; justify-content: center;
  background: #f6f4fd; border: 1px dashed #d9d1f5; border-radius: var(--radius-sm);
  color: #b8b0d6; overflow: hidden; width: 100%;
}
.ad-label {
  position: absolute; top: 6px; left: 10px; font-size: .62rem; letter-spacing: .12em;
  text-transform: uppercase; color: #c4bce0; font-weight: 700;
}
.ad::after { content: "Ad space"; font-size: .8rem; font-weight: 600; }
.ad--leaderboard { max-width: 728px; height: 90px; }
.ad--in-article { max-width: 728px; height: 250px; margin: 0 auto; }
.ad--sidebar { height: 600px; max-width: 300px; }
.ad--mobile-anchor { height: 60px; }
.in-article-ad { margin: 30px 0; }
.sidebar-ad-card { padding: 0; background: transparent; border: none; box-shadow: none; }
.sidebar-ad-card .ad { margin: 0 auto; }

.anchor-ad {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; display: none;
  justify-content: center; background: rgba(255,255,255,.96); border-top: 1px solid var(--line);
  padding: 6px;
}

/* ---- Footer (dark) ---------------------------------------------------- */
.site-footer { background: var(--footer-bg); color: #cfcbe0; margin-top: 64px; }
.footer-inner {
  display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr; gap: 40px;
  padding-top: 52px; padding-bottom: 36px; align-items: start;
}
.footer-brand { max-width: 34ch; }
.brand--footer .brand-name { color: #fff; }
.footer-tagline { font-family: var(--font-serif); color: #9d98b8; max-width: 34ch; margin: 14px 0 0; }
.footer-h { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: #fff; margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: #cfcbe0; font-size: .95rem; }
.footer-col a:hover { color: #fff; }
.footer-legal { padding-top: 24px; padding-bottom: 40px; border-top: 1px solid rgba(255,255,255,.08); }
.footer-legal p { color: #8b86a6; font-size: .85rem; max-width: 80ch; margin: 20px 0 0; }

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 900px) {
  .listing-layout { grid-template-columns: 1fr; }
  .tags-sidebar { position: static; }
  .article-layout { grid-template-columns: 1fr; gap: 32px; }
  .aside-sticky { position: static; }
  .article { max-width: none; }
  .card--featured { flex-direction: column; }
  .card--featured .card-media-link { flex: none; }
  .card--featured .card-body { padding: 22px 24px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .anchor-ad { display: flex; }
}

@media (max-width: 720px) {
  .card-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-card); display: none;
  }
  .primary-nav.open { display: block; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 16px; }
  .primary-nav a { padding: .7rem 1rem; border-radius: 12px; }
  .nav-cta-li { margin: 6px 0 0; }
  .nav-cta { justify-content: center; }
  .field-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .searchbox input { min-width: 0; width: 100%; }
  .listing-topbar .searchbox { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
