/* ==========================================================================
   Guides, About and Contact: long-form reading pages.
   Nothing here relies on data-reveal, because this is the content a reader or
   a crawler came for and it must be there with JavaScript off.
   ========================================================================== */

.article [id] { scroll-margin-top: calc(var(--nav-h) + 24px); }

/* --- Hero ---------------------------------------------------------------- */
.article-hero { padding: clamp(32px, 5vw, 60px) 0 clamp(24px, 3vw, 36px); }
.article-hero .h-page {
  font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.1; font-weight: 800;
  letter-spacing: -.03em; max-width: 21ch; margin-top: 18px; color: var(--ink);
}
.article-hero .lede { margin-top: 16px; }
.crumbs-plain { display: flex; flex-wrap: wrap; gap: 6px 8px; font-size: .9rem; color: var(--muted); }
.crumbs-plain li + li::before { content: "/"; margin-right: 8px; color: var(--hint); }
.crumbs-plain a { color: var(--coral-deep); font-weight: 600; }
.crumbs-plain a:hover { text-decoration: underline; }

.article-meta {
  display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 20px;
  font-size: .9rem; color: var(--muted);
}
.article-meta strong { color: var(--ink); font-weight: 700; }

/* --- Layout -------------------------------------------------------------- */
.article-wrap {
  display: grid; grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px); align-items: start;
  padding-bottom: clamp(48px, 6vw, 84px);
}
.article-wrap--single { grid-template-columns: minmax(0, 1fr); max-width: 780px; }

.article-toc {
  position: sticky; top: calc(var(--nav-h) + 20px);
  max-height: calc(100vh - var(--nav-h) - 40px); overflow-y: auto;
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 20px 16px; box-shadow: var(--nm-flat);
}
.article-toc__title {
  font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--coral-deep); padding: 0 8px 8px;
}
.article-toc a {
  display: block; padding: 7px 8px; border-radius: 10px;
  font-size: .9rem; line-height: 1.4; color: var(--ink-soft);
}
.article-toc a:hover { background: var(--coral-wash); color: var(--coral-deep); }

/* --- Prose --------------------------------------------------------------- */
.article { min-width: 0; max-width: 760px; color: var(--ink-soft); font-size: 1.04rem; line-height: 1.75; }
.article h2 {
  font-size: clamp(1.4rem, 2.3vw, 1.75rem); line-height: 1.2; font-weight: 800;
  letter-spacing: -.02em; color: var(--ink); margin-top: 44px;
}
/* Only the first heading of the page sits flush: each guide section is its own
   <section>, so a plain :first-child rule would remove every section's gap. */
.article > h2:first-child { margin-top: 0; }
.article h3 { font-size: 1.14rem; font-weight: 800; color: var(--ink); margin-top: 26px; }
.article p { margin-top: 14px; }
.article ul, .article ol.plain { margin-top: 12px; padding-left: 22px; }
.article ul { list-style: disc; }
.article ol.plain { list-style: decimal; }
.article li { margin-top: 7px; }
.article strong { color: var(--ink); }
.article a:not(.btn):not(.guide-card) { color: var(--coral-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }

.cite { font-size: .72em; line-height: 0; margin-left: 1px; }
.article .cite a { text-decoration: none; padding: 0 1px; }

/* --- Key points and notes ------------------------------------------------ */
.guide-key {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 22px 26px; box-shadow: var(--nm-raised);
}
.guide-key h2 { font-size: 1.08rem; margin: 0; letter-spacing: -.01em; }
.guide-key ul { margin-top: 8px; }

.guide-note {
  margin-top: 22px; padding: 16px 20px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--nm-flat);
  border-left: 5px solid var(--blue-deep);
}
.guide-note--warn { border-left-color: var(--coral); }
.guide-note p { margin-top: 0; }
.guide-note p + p { margin-top: 10px; }

/* --- Numbered steps ------------------------------------------------------ */
.guide-steps { counter-reset: step; margin-top: 16px; display: grid; gap: 12px; }
.guide-steps > li {
  counter-increment: step; position: relative; margin: 0;
  padding: 16px 20px 16px 66px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--nm-flat);
}
.guide-steps > li::before {
  content: counter(step); position: absolute; left: 18px; top: 15px;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--coral-deep); color: #fff; font-weight: 800; font-size: .95rem;
}

/* --- Tables -------------------------------------------------------------- */
.guide-table { margin-top: 18px; overflow-x: auto; border-radius: var(--radius); box-shadow: var(--nm-flat); background: var(--surface); }
.guide-table:focus-visible { outline: 3px solid var(--coral-deep); outline-offset: 2px; }
.guide-table table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: .95rem; line-height: 1.55; }
.guide-table caption { text-align: left; padding: 14px 16px 4px; font-weight: 700; color: var(--ink); }
.guide-table th, .guide-table td { padding: 12px 16px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.guide-table thead th { border-top: 0; color: var(--ink); font-weight: 800; }
.guide-table tbody th { color: var(--ink); font-weight: 700; }

/* --- Sources ------------------------------------------------------------- */
.guide-sources { margin-top: 48px; padding-top: 8px; border-top: 2px solid var(--line); }
.guide-sources ol { list-style: decimal; padding-left: 24px; margin-top: 12px; font-size: .93rem; line-height: 1.6; }
.guide-sources li { margin-top: 10px; padding-left: 4px; }
.guide-sources li:target { background: var(--coral-wash); border-radius: 8px; }
.guide-sources .src-org { color: var(--ink); font-weight: 700; }
.guide-sources .src-note { display: block; color: var(--muted); font-size: .88rem; }

.guide-disclaimer { margin-top: 28px; font-size: .9rem; color: var(--muted); }

/* --- Cards --------------------------------------------------------------- */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.guide-card {
  display: flex; flex-direction: column; gap: 8px; padding: 24px 26px;
  border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--nm-raised);
  color: var(--ink-soft); transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.guide-card:hover { transform: translateY(-3px); box-shadow: var(--nm-lifted); }
.guide-card__topic { font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--coral-deep); }
.guide-card h2, .guide-card h3 { font-size: 1.16rem; line-height: 1.3; font-weight: 800; color: var(--ink); margin: 0; letter-spacing: -.012em; }
.guide-card p { margin: 0; font-size: .95rem; line-height: 1.55; }
.guide-card__meta { margin-top: auto; padding-top: 8px; font-size: .84rem; color: var(--muted); }

.guide-related { margin-top: 48px; }
.guide-related .guide-grid { margin-top: 16px; }

.contact-card {
  margin-top: 16px; padding: 22px 26px; border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--nm-raised);
}
.contact-card h2 { margin: 0; font-size: 1.15rem; }
.contact-card p { margin-top: 8px; }
.contact-card a[data-contact-email] { font-size: .92rem; }

/* --- Narrow screens: the contents list folds above the article ----------- */
@media (max-width: 960px) {
  .article-wrap { grid-template-columns: minmax(0, 1fr); }
  .article-toc { position: static; max-height: none; }
}

@media (max-width: 520px) {
  .guide-steps > li { padding: 58px 18px 16px; }
  .guide-key { padding: 20px; }
}

@media print {
  .article-toc, .guide-related, .nav, .footer { display: none; }
  .article-wrap { display: block; }
  .article { max-width: none; color: #000; }
}

/* AdSense units. Labelled so nobody mistakes an ad for our own content (and
   AdSense allows the word "Advertisement"); min-height reserves room so the
   text below does not jump when the ad arrives. */
.ad-slot { margin: 32px 0; min-height: 120px; }
.ad-slot::before { content: "Advertisement"; display: block; margin-bottom: 6px; font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.ad-slot--multiplex { margin-top: 48px; min-height: 280px; }
