/* ============================================================
   Article & guides layout — shares tokens with styles.css
   ============================================================ */

/* Nav variant for pages that open on porcelain */
.nav--onlight { color: var(--text-dark); }
.nav--onlight .nav__wordmark em { color: var(--gold-deep); }
.nav--onlight .nav__links a::after { background: var(--gold-deep); }
.nav--onlight .nav__burger span { background: var(--ink); }
.nav--onlight.nav--scrolled {
  background: rgba(248, 245, 240, 0.86);
  box-shadow: 0 1px 0 var(--hairline-dark);
}

.article, .guides {
  padding-top: 150px;
  padding-bottom: 70px;
}

.article__head {
  max-width: 880px;
  margin-bottom: clamp(30px, 5vh, 50px);
}

.article__title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 5.4vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin-top: 20px;
}

.article__title em { font-style: italic; color: var(--teal); }

.article__meta {
  margin-top: 18px;
  font-family: var(--f-mono);
  font-size: 13.5px;
  line-height: 1.6;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-dark);
}

/* ---------- Prose ---------- */

.article__prose {
  max-width: 880px;
  font-size: 1.14rem;
  line-height: 1.75;
  color: var(--text-dark);
}

.article__prose > * + * { margin-top: 1.2em; }

.article__prose h2 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.1;
  margin-top: 2em;
  color: var(--ink);
}

.article__prose h3 {
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 1.12rem;
  margin-top: 1.8em;
}

.article__prose p { max-width: 70ch; }

.article__prose ul, .article__prose ol {
  padding-left: 0;
  max-width: 66ch;
  display: grid;
  gap: 10px;
}

.article__prose ul li, .article__prose ol li {
  list-style: none;
  padding-left: 26px;
  position: relative;
}

.article__prose ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.68em;
  width: 12px;
  height: 3px;
  border-radius: 2px;
  background: var(--gold-deep);
}

.article__prose ol { counter-reset: item; }
.article__prose ol li::before {
  counter-increment: item;
  content: counter(item, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.12em;
  font-family: var(--f-mono);
  font-size: 0.8em;
  color: var(--teal);
}

.article__prose strong { font-weight: 600; color: var(--ink); }

.article__prose blockquote {
  border-left: 2px solid var(--gold);
  padding-left: 22px;
  font-family: var(--f-display);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.35;
  color: var(--ink);
}

.article__prose a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.article__prose a:hover { color: var(--ink); }

.article__prose hr {
  border: 0;
  height: 10px;
  margin-block: 2.4em;
  background:
    repeating-linear-gradient(90deg, var(--hairline-dark) 0 1px, transparent 1px 10px) left bottom / 240px 8px no-repeat;
}

/* ---------- FAQ ---------- */

.article__faq {
  max-width: 880px;
  margin-top: clamp(50px, 8vh, 80px);
}

.article__faq-title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  margin-bottom: 26px;
}

.article__faq dl {
  display: grid;
  gap: 22px;
}

.article__faq-item {
  border-top: 1px solid var(--hairline-dark);
  padding-top: 20px;
}

.article__faq-item dt {
  font-weight: 600;
  font-size: 1.16rem;
  color: var(--ink);
}

.article__faq-item dd {
  margin-top: 8px;
  font-size: 1.08rem;
  color: var(--muted-dark);
  max-width: 68ch;
  line-height: 1.7;
}

/* ---------- CTA + related ---------- */

.article__cta { margin-top: clamp(50px, 8vh, 80px); }

.article__related {
  margin-top: clamp(50px, 8vh, 80px);
  padding-bottom: 30px;
}

.article__related-grid, .guides__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 28px);
  margin-top: 26px;
}

.guides__grid { margin-top: clamp(36px, 6vh, 56px); }

.article__related-card, .guides__card {
  border-radius: 20px;
  background: #FFFFFF;
  box-shadow: inset 0 0 0 1px var(--hairline-dark);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.3s cubic-bezier(.2,.7,.3,1), box-shadow 0.3s;
}

.article__related-card:hover, .guides__card:hover {
  transform: translateY(-5px);
  box-shadow: inset 0 0 0 1px var(--hairline-dark), 0 24px 50px -28px rgba(6, 30, 37, 0.35);
}

.article__related-card h3, .guides__card h2 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 1.62rem;
  line-height: 1.12;
}

.article__related-card a, .guides__card a { color: var(--ink); }
.article__related-card a:hover, .guides__card a:hover { color: var(--teal); }

.article__related-card p, .guides__card p {
  color: var(--muted-dark);
  font-size: 1.04rem;
  line-height: 1.55;
}

.guides__more {
  margin-top: auto;
  padding-top: 4px;
  font-family: var(--f-mono);
  font-size: 13.5px;
  letter-spacing: 0.08em;
  color: var(--teal);
}

/* ---------- Whole-card links ----------
   The title anchor stretches to cover the entire card, so the summary and the
   "Read the guide →" line are clickable too — not just the title.
   The card is the only positioned ancestor, so inset:0 resolves against the
   card. Nothing between them may be positioned or the overlay would shrink to
   that element instead. */

.card--linked { position: relative; }

.card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.card--linked:hover h2 a,
.card--linked:hover h3 a { color: var(--teal); }

.card--linked:hover .guides__more { color: var(--ink); }

/* the stretched anchor is the focus target, so show the ring on the whole card */
.card--linked:focus-within {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
}

.card__link:focus-visible { outline: none; }

@media (max-width: 920px) {
  .article__related-grid, .guides__grid { grid-template-columns: 1fr; }
  .article, .guides { padding-top: 120px; }
}

/* ---------- Back navigation ----------
   Guides are entry points from search, so a visitor often lands mid-site with
   no history to go "back" to. Both of these are real links to /guides/, not
   history.back(), so they behave the same however the reader arrived.
   Arrow language matches .railbtn on the homepage rail. */

.backlink {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-dark);
  transition: color 0.25s;
}

.backlink__ico {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--hairline-dark);
  display: grid;
  place-items: center;
  transition: background 0.25s, border-color 0.25s, transform 0.25s cubic-bezier(.2,.7,.3,1);
}

.backlink__ico svg,
.guides-back__ico svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.backlink:hover { color: var(--ink); }

.backlink:hover .backlink__ico {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--porcelain);
  transform: translateX(-3px);
}

/* wide return bar closing the page */
.guides-back {
  margin-top: clamp(40px, 6vh, 64px);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 26px);
  padding: clamp(22px, 3vw, 30px) clamp(24px, 3.4vw, 36px);
  border-radius: 20px;
  background: #FFFFFF;
  box-shadow: inset 0 0 0 1px var(--hairline-dark);
  transition: transform 0.3s cubic-bezier(.2,.7,.3,1), box-shadow 0.3s, background 0.3s;
}

.guides-back__ico {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 50%;
  background: var(--porcelain);
  color: var(--ink);
  display: grid;
  place-items: center;
  transition: background 0.3s, color 0.3s, transform 0.3s cubic-bezier(.2,.7,.3,1);
}

.guides-back__copy { display: grid; gap: 4px; }

.guides-back__label {
  font-family: var(--f-display);
  font-size: 1.5rem;
  line-height: 1.15;
  color: var(--ink);
}

.guides-back__note {
  font-size: 1rem;
  color: var(--muted-dark);
}

.guides-back:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 0 0 1px var(--hairline-dark), 0 24px 50px -28px rgba(6, 30, 37, 0.35);
}

.guides-back:hover .guides-back__ico {
  background: var(--gold);
  transform: translateX(-4px);
}

@media (max-width: 560px) {
  .guides-back { padding: 22px; gap: 14px; }
  .guides-back__ico { width: 44px; height: 44px; }
  .guides-back__label { font-size: 1.3rem; }
}
