/* ═══════════════════════════════════════════════════════════
   ARTICLE READING VIEW
   ═══════════════════════════════════════════════════════════ */

/* ─── Section filter buttons ─── */
.section-filter {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}
.section-filter:hover { color: var(--text); }
.section-filter.active { color: var(--text); }

/* ─── Page wrapper ─── */
.article-reading-wrap {
  max-width: 700px;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
}

/* ─── Fixed article back button ─── */
.article-back-fixed {
  position: fixed;
  bottom: 2rem;
  left: 1.25rem;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: color 0.2s, box-shadow 0.2s;
}
.article-back-fixed:hover {
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.article-back-fixed[hidden] { display: none; }

/* ─── Back navigation ─── */
.article-back-link {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.25rem;
  gap: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0;
  transition: color 0.2s;
}
.article-back-link:hover { color: var(--text); }

/* ─── Article header ─── */
.article-reading-header {
  margin-bottom: 2.5rem;
}

/* Side-image header: image left, text right */
.article-reading-header--side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 3rem;
}

.article-reading-section {
  display: block;
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.article-reading-title {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.12;
  color: var(--text);
  margin: 0 0 1.5rem;
  letter-spacing: -0.01em;
}

.article-reading-deck {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 1.75rem;
}

.article-reading-rule {
  width: 48px;
  height: 1px;
  background: var(--accent);
  margin-bottom: 1.25rem;
}

.article-reading-meta {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.article-reading-dot {
  margin: 0 0.5rem;
  opacity: 0.5;
}

/* ─── Hero image ─── */
.article-hero--top {
  margin: 0 -2rem 3.5rem;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.article-hero--side .article-hero-img,
.article-hero--top .article-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-hero-img {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #EDE8DF 0%, #D5CCBC 100%);
  display: block;
  object-fit: cover;
}


.article-hero--side {
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

/* ─── Article body ─── */
.article-body {
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.9;
  color: var(--text);
}

/* Opening paragraph slightly larger */

.article-body p {
  margin: 0 0 1.6rem;
}

.article-body h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text);
  margin: 3rem 0 1.25rem;
  letter-spacing: 0.01em;
}

.article-body h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 400;
  font-style: italic;
  color: var(--text);
  margin: 2rem 0 1rem;
}

/* Section dividers (---) */
.article-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* Inline links */
.article-body a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.article-body a:hover {
  text-decoration-color: var(--accent);
}

/* Pull quotes */
.article-body blockquote {
  margin: 3rem -1rem;
  padding: 0 1rem;
  border: none;
  text-align: center;
}
.article-body blockquote::before {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--accent);
  margin: 0 auto 1.5rem;
}
.article-body blockquote::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--accent);
  margin: 1.5rem auto 0;
}
.article-body blockquote p {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.4;
  color: var(--text);
  margin: 0;
}

/* Inline images */
.article-inline-img {
  margin: 2.5rem 0;
  padding: 0;
  border: none;
}
.article-inline-img img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

/* Portrait inset — floats right, cropped to show subject */
.article-inline-img--inset {
  float: right;
  width: 52%;
  margin: 0.5rem 0 1.5rem 2.5rem;
  clear: right;
}
.article-inline-img--inset img {
  width: 100%;
  height: auto;
  max-height: none;
  display: block;
}

/* Small — centred, constrained width, natural aspect ratio */
.article-inline-img--small {
  float: right;
  width: 200px;
  margin: 0.5rem 0 1.5rem 2rem;
  clear: right;
}
.article-inline-img--small img {
  width: 100%;
  height: auto;
  display: block;
}

/* Medium — centred, portrait-friendly, no crop */
.article-inline-img--medium {
  max-width: 380px;
  margin: 2.5rem auto;
}
.article-inline-img--medium img {
  width: 100%;
  height: auto;
  object-fit: initial;
  display: block;
}

.article-inline-img-caption {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--faint);
  line-height: 1.5;
  margin-top: 0.5rem;
  text-align: center;
}

/* Clear floats after article body */
.article-body::after {
  content: '';
  display: table;
  clear: both;
}

@media (max-width: 640px) {
  .article-inline-img--inset {
    float: none;
    width: 100%;
    margin: 2rem 0;
  }
}

/* List/recommendation layout — each h2 becomes an item header */
.article-body--recommendation_list h2 {
  font-size: 1.2rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-style: italic;
}
.article-body--recommendation_list h2:first-of-type {
  margin-top: 1.5rem;
}

/* Guide layout — headings get a number-like visual weight */
.article-body--practical_guide h2 {
  font-size: 1.25rem;
  margin-top: 3rem;
  padding-left: 0;
}

/* ─── Tool CTA card ─── */
.tool-cta-card {
  margin: 4rem 0;
  border: 1px solid var(--border);
  padding: 2rem 2.25rem;
}

.tool-cta-inner {
  display: flex;
  align-items: baseline;
  gap: 2rem;
  flex-wrap: wrap;
}

.tool-cta-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  flex-shrink: 0;
}

.tool-cta-desc {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
  flex-grow: 1;
}

.tool-cta-link {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: border-color 0.2s;
}
.tool-cta-link:hover { border-color: var(--text); }

/* ─── Newsletter capture ─── */
.article-newsletter {
  margin: 4rem 0;
  padding: 2.5rem 2.25rem;
  background: var(--bg-alt, #F1EDE5);
  text-align: center;
}

.article-newsletter-heading {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
  margin: 0 0 0.4rem;
  color: var(--text);
}

.article-newsletter-sub {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
  letter-spacing: 0.03em;
}

.article-newsletter-form {
  display: flex;
  gap: 0.75rem;
  max-width: 400px;
  margin: 0 auto;
}

.article-newsletter-input {
  flex: 1;
  font-family: var(--sans);
  font-size: 0.85rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 0.65rem 1rem;
  outline: none;
  min-width: 0;
}
.article-newsletter-input:focus { border-color: var(--accent); }

.article-newsletter-btn {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--text);
  color: var(--bg);
  border: none;
  padding: 0.65rem 1.25rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}
.article-newsletter-btn:hover { background: var(--accent); }

.article-newsletter-note {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0.75rem 0 0;
  min-height: 1.2em;
}

/* ─── Related articles ─── */
.related-articles {
  margin: 4rem 0 2rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.related-articles-label {
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.related-articles-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.related-article-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: opacity 0.2s;
}
.related-article-item:last-child { border-bottom: 1px solid var(--border); }
.related-article-item:hover { opacity: 0.65; }

.related-article-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.3;
}

.related-article-time {
  font-family: var(--sans);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

/* ─── Responsive ─── */
@media (max-width: 760px) {
  .article-reading-header--side {
    grid-template-columns: 1fr;
  }
  .article-hero--side {
    aspect-ratio: 3 / 2;
    order: -1;
  }
  .article-hero--top {
    margin: 0 -1.5rem 3rem;
  }
}

@media (max-width: 640px) {
  .article-reading-wrap {
    padding: 2rem 1.5rem 4rem;
  }
  .article-reading-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }
  .article-body {
    font-size: 1.05rem;
  }

  .tool-cta-inner {
    flex-direction: column;
    gap: 0.75rem;
  }
  .article-newsletter-form {
    flex-direction: column;
  }
  .article-newsletter-btn {
    width: 100%;
  }
  .article-hero--top {
    margin: 0 -1.5rem 2.5rem;
    aspect-ratio: 4 / 3;
  }
}

