/* Guides, comparisons and feature pages. Loaded after style.css.
   Layout: one 800px reading column, answer first, app box at the points
   where a reader is likely to leave. Colours and type come from style.css. */

.page-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem var(--gap-lg) 4.5rem;
}

/* breadcrumbs */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: var(--body-small);
  color: var(--slate);
  margin-bottom: 1.5rem;
}
.crumbs a { font-weight: 700; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span[aria-hidden] { opacity: 0.5; }

/* header */
.page-kicker {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-weight: 800;
  font-size: var(--label-small);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--forest);
  background: var(--sand);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  margin-bottom: 1rem;
}
.page-title {
  font-size: clamp(2rem, 5vw, var(--display-medium));
  line-height: 1.12;
  margin-bottom: 1rem;
}
.page-meta {
  font-size: var(--body-small);
  color: var(--slate);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-bottom: 1.5rem;
  border-bottom: 4px solid var(--forest);
  margin-bottom: 2rem;
}

/* the direct answer */
.answer {
  font-size: var(--body-large);
  color: var(--forest);
  line-height: 1.6;
  margin-bottom: 1.75rem;
}
.answer p { font-size: inherit; color: inherit; margin-bottom: 0.9rem; }
.answer p:last-child { margin-bottom: 0; }

/* article body */
.prose h2 {
  font-size: var(--display-small);
  margin: 2.75rem 0 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 1.5px solid rgba(27, 67, 50, 0.15);
}
.prose h3 { font-size: var(--headline-medium); margin: 1.75rem 0 0.5rem; }
.prose p { font-size: var(--body-medium); line-height: 1.7; margin-bottom: 1.1rem; }
.prose ul, .prose ol { margin: 0 0 1.25rem; padding-left: 0; }
.prose ul li, .prose ol li {
  position: relative;
  font-size: var(--body-medium);
  color: var(--slate);
  line-height: 1.65;
  padding: 0.25rem 0 0.25rem 1.6rem;
}
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 0.95rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--forest);
}
.prose ol { counter-reset: n; list-style: none; }
.prose ol li { counter-increment: n; padding-left: 2.4rem; }
.prose ol li::before {
  content: counter(n);
  position: absolute;
  left: 0;
  top: 0.3rem;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: var(--forest);
  color: var(--paper);
  font-family: 'DM Sans', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.prose strong { color: var(--forest); }
.prose blockquote {
  border-left: 4px solid var(--forest);
  background: var(--sand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.prose blockquote p { margin-bottom: 0; }

.table-wrap { overflow-x: auto; margin: 0 0 1.5rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--body-small); color: var(--slate); }
.prose caption { text-align: left; font-weight: 800; color: var(--forest); padding-bottom: 0.5rem; }
.prose th, .prose td { padding: 0.65rem 0.75rem; text-align: left; border-bottom: 1.5px solid rgba(27, 67, 50, 0.12); vertical-align: top; }
.prose thead th { color: var(--forest); font-weight: 800; }
.prose tbody th { color: var(--forest); font-weight: 700; }

/* app box: shown right after the answer and again at the end */
.app-box {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.25rem;
  align-items: center;
  background: var(--forest);
  color: var(--on-forest);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 0 0 2rem;
}
.app-box__mark { width: 52px; height: 52px; border-radius: 14px; background: var(--paper); padding: 8px; }
.app-box__title {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: var(--title-large);
  color: var(--paper);
  line-height: 1.25;
}
.app-box__text { font-size: var(--body-small); color: var(--on-forest-muted); line-height: 1.55; margin-top: 0.3rem; }
.app-box__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; }
.app-box .btn-primary { background: var(--paper); color: var(--forest) !important; font-size: var(--body-medium); padding: 0.85rem 1.5rem; }
.app-box__note { font-size: var(--label-small); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--on-forest-faint); }

/* small inline nudge between sections */
.nudge {
  border: 1.5px solid rgba(27, 67, 50, 0.2);
  background: var(--success-bg);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
}
.nudge p { font-size: var(--body-small); color: var(--forest); margin: 0; line-height: 1.6; }

/* related, sources */
.page-related { margin-top: 3rem; }
.page-related h2, .page-sources h2, .page-faq h2 {
  font-size: var(--headline-medium);
  margin-bottom: 1rem;
}
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-md); }
.related-card {
  display: block;
  background: var(--sand);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.related-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); opacity: 1; }
.related-card__kind {
  font-size: var(--label-small);
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--forest);
  opacity: 0.7;
}
.related-card__title { font-family: 'Playfair Display', serif; font-weight: 800; font-size: var(--title-large); color: var(--forest); line-height: 1.25; margin-top: 0.3rem; }

.page-sources { margin-top: 2.5rem; }
.page-sources ol { counter-reset: s; }
.page-sources li { font-size: var(--body-small); color: var(--slate); padding: 0.3rem 0; }

/* FAQ without JavaScript */
.page-faq { margin-top: 2.5rem; }
.page-faq details { border-bottom: 1.5px solid rgba(27, 67, 50, 0.15); }
.page-faq summary {
  cursor: pointer;
  list-style: none;
  font-family: 'DM Sans', sans-serif;
  font-weight: 800;
  font-size: var(--body-medium);
  color: var(--forest);
  padding: 1rem 2rem 1rem 0;
  position: relative;
}
.page-faq summary::-webkit-details-marker { display: none; }
.page-faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 0.85rem; font-size: 1.4rem; line-height: 1; }
.page-faq details[open] summary::after { content: "\2212"; }
.page-faq details p { font-size: var(--body-medium); line-height: 1.65; padding-bottom: 1.1rem; margin: 0; }

/* hub pages */
.hub-intro { font-size: var(--body-medium); color: var(--slate); max-width: 60ch; margin-bottom: 2rem; }
.hub-list { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-md); }
.hub-card {
  display: block;
  background: var(--sand);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.4rem;
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.hub-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); opacity: 1; }
.hub-card__title { font-family: 'Playfair Display', serif; font-weight: 800; font-size: var(--title-large); color: var(--forest); line-height: 1.25; }
.hub-card__text { font-size: var(--body-small); color: var(--slate); line-height: 1.55; margin-top: 0.45rem; font-weight: 400; }

@media (max-width: 640px) {
  .page-wrap { padding: 1rem 1rem 3.5rem; }
  .related-grid, .hub-list { grid-template-columns: 1fr; }
  .app-box { grid-template-columns: 1fr; }
  .app-box__mark { display: none; }
  .app-box .btn-primary { width: 100%; }
}
