/* ============================================================
   Prevent Impotence — shared styles
   Palette: muted sage/forest, warm sand for ad separation
   Type: Newsreader (serif, editorial) + Public Sans (sans, trustworthy/legible)
   ============================================================ */

:root {
  --bg: #F5F7F2;
  --bg-panel: #EAF0E6;
  --sand: #EFEAE0;
  --line: #D9E1D3;
  --ink: #1E2A21;
  --ink-soft: #4C5A4F;
  --ink-faint: #616C61;
  --teal: #1F4B43;
  --teal-deep: #12332C;
  --gold: #AE7F31;
  --gold-text: #8F6828;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max: 1120px;
  --prose: 42rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--teal-deep);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.1rem, 4vw + 1rem, 3.25rem); font-weight: 480; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.4rem, 1.6vw + 1rem, 1.9rem); margin-top: 2.4em; }
h3 { font-size: 1.2rem; margin-top: 1.8em; }

p { margin: 0 0 1.15em; color: var(--ink-soft); }

a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold-text); }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding-top: 1.4rem;
  padding-bottom: 1.4rem;
}

.wordmark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--teal-deep);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.wordmark:hover { color: var(--teal-deep); opacity: 0.8; }
.wordmark span { color: var(--gold-text); font-style: normal; }

.site-nav {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
  color: var(--teal-deep);
  border-bottom-color: var(--gold);
}

/* ---------- Hero (home) ---------- */

.hero {
  padding: 3.5rem 0 2.5rem;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 820px) {
  .hero .container { grid-template-columns: 1fr; }
}

.hero-heading {
  opacity: 0;
  transform: translateY(8px);
  animation: rise 0.7s ease-out 0.1s forwards;
}
@media (prefers-reduced-motion: reduce) {
  .hero-heading { opacity: 1; transform: none; animation: none; }
}
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

.hero h1 { max-width: 15ch; }

.hero-sub {
  font-size: 1.1rem;
  max-width: 42ch;
  color: var(--ink-soft);
}

.hero-ctas {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.7em 1.3em;
  border-radius: 3px;
  border: 1px solid var(--teal);
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-deep); border-color: var(--teal-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--teal-deep); }
.btn-ghost:hover { background: var(--bg-panel); color: var(--teal-deep); }

.reassure-panel {
  background: var(--bg-panel);
  border-radius: 4px;
  padding: 1.6rem 1.7rem;
}

.reassure-panel p {
  font-size: 1.02rem;
  color: var(--ink);
  padding: 0.75rem 0;
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.reassure-panel p:first-child { padding-top: 0; }
.reassure-panel p:last-child { border-bottom: none; padding-bottom: 0; }

/* ---------- Topic teasers ---------- */

.teasers {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--line);
}

.teasers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 760px) {
  .teasers-grid { grid-template-columns: 1fr; }
}

.teaser {
  padding: 0 2rem;
  border-left: 1px solid var(--line);
}
.teaser:first-child { padding-left: 0; border-left: none; }
.teaser:last-child { padding-right: 0; }

@media (max-width: 760px) {
  .teaser { padding: 1.6rem 0; border-left: none; border-top: 1px solid var(--line); }
  .teaser:first-child { border-top: none; padding-top: 0; }
}

.teaser-kicker {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold-text);
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.teaser h3 { margin-top: 0; font-size: 1.25rem; }

.teaser a.read-link {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.92rem;
  font-weight: 600;
}

/* ---------- Sponsored placements — boxed (banners) ---------- */

.resource-panel {
  background: var(--sand);
  border: 1px solid #E0D8C6;
  border-radius: 3px;
  padding: 1.4rem;
  margin: 2.4rem 0;
  text-align: center;
}

.resource-panel__tag {
  display: block;
  font-size: 0.7rem;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  margin-bottom: 0.6rem;
}

.resource-panel__frame {
  color: var(--ink-faint);
  font-size: 0.85rem;
  padding: 1.6rem 0.5rem;
  border: 1px dashed #CFC5AC;
  border-radius: 2px;
}

.resource-panel--wide { max-width: 728px; margin-left: auto; margin-right: auto; }
.resource-panel--wide .resource-panel__frame { min-height: 70px; display:flex; align-items:center; justify-content:center; }
.resource-panel--box { max-width: 336px; margin-left: auto; margin-right: auto; }
.resource-panel--box .resource-panel__frame { min-height: 200px; display:flex; align-items:center; justify-content:center; }

.resource-panel__creative {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
}

.resource-panel__disclaimer,
.resource-note__disclaimer {
  display: block;
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--ink-faint);
  margin-top: 0.6rem;
}

/* ---------- Sponsored placements — inline (text ads) ---------- */
/* Deliberately unboxed / unshaded so it reads as part of the article
   flow rather than a structural "ad unit" — keeps the required
   disclosure tag but avoids the container patterns cosmetic ad
   blockers key on. */

.resource-note {
  margin: 2rem 0;
}
.resource-note__tag {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  margin-bottom: 0.35rem;
}
.resource-note p {
  margin: 0;
  color: var(--ink-soft);
}
.resource-note a { font-weight: 600; }

/* ---------- Disclaimer band ---------- */

.disclaimer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
}
.disclaimer p {
  font-size: 0.88rem;
  color: var(--ink-faint);
  max-width: 62ch;
  margin: 0;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.footer-nav a { color: var(--ink-soft); font-size: 0.88rem; text-decoration: none; }
.footer-nav a:hover { color: var(--teal-deep); }
.footer-meta { font-size: 0.82rem; color: var(--ink-faint); }

/* ---------- Article pages ---------- */

.article-head {
  padding: 3rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
}
.article-head .container { max-width: var(--prose); }

.article-dek {
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 46ch;
}

.article-meta {
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-bottom: 0.6rem;
}

.article-body {
  padding: 2.5rem 0 1rem;
}
.article-body .container { max-width: var(--prose); }

.article-body ul, .article-body ol {
  color: var(--ink-soft);
  padding-left: 1.3rem;
  margin: 0 0 1.3em;
}
.article-body li { margin-bottom: 0.65em; }
.article-body li strong { color: var(--ink); }

.callout {
  border-left: 3px solid var(--gold);
  padding: 0.2rem 0 0.2rem 1.3rem;
  margin: 2.2rem 0;
}
.callout p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.08rem;
  color: var(--teal-deep);
  margin: 0;
}

.related {
  padding: 1.5rem 0 3rem;
  border-top: 1px solid var(--line);
  margin-top: 1rem;
}
.related .container { max-width: var(--prose); }
.related h3 { margin-top: 0; font-size: 1rem; color: var(--ink-faint); font-weight: 600; font-family: var(--sans); }
.related-links { display: flex; gap: 1.6rem; flex-wrap: wrap; margin-top: 0.6rem; }
.related-links a { font-size: 0.98rem; font-weight: 600; }
