/* ==========================================================================
   guides-standards.css
   New classes introduced by /guides/ and /standards/ templates.
   Uses var(--token, fallback) throughout — if your ink/redline token file
   already defines --ink / --redline / --paper / etc., these inherit them
   automatically. If names differ, the fallback values keep this correct
   on its own; just re-point the var() names to match your actual tokens.
   ========================================================================== */

:root {
  --gs-ink: var(--ink, #1a1a1a);
  --gs-redline: var(--redline, #b3121b);
  --gs-paper: var(--paper, #ffffff);
  --gs-paper-muted: var(--paper-muted, #f7f5f2);
  --gs-border: var(--border-color, #e2ddd6);
  --gs-text-muted: var(--text-muted, #6b6560);
  --gs-radius: var(--radius, 6px);
  --gs-gold: var(--gold, #b8935a);
}

/* ---- Shared: ptype-grid card sits inside both templates, only new
   variants below --------------------------------------------------------- */

.table-scroll { overflow-x: auto; }

/* ---- GUIDE hero ---------------------------------------------------- */

.guide-hero {
  padding: 3rem 1.5rem 2rem;
  max-width: 860px;
  margin: 0 auto;
}
.guide-hero__eyebrow {
  font-size: 0.85rem;
  color: var(--gs-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}
.guide-hero__eyebrow a { color: var(--gs-redline); text-decoration: none; }
.guide-hero__eyebrow a:hover { text-decoration: underline; }
.guide-hero h1 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.15; margin: 0 0 1rem; color: var(--gs-ink); }
.guide-hero__summary { font-size: 1.1rem; color: var(--gs-text-muted); line-height: 1.6; margin: 0 0 0.5rem; }
.guide-hero__updated { font-size: 0.8rem; color: var(--gs-text-muted); }

/* ---- Standard badge card (guide -> standard cross-link) ------------ */

.standard-badge-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--gs-redline);
  border-radius: var(--gs-radius);
  text-decoration: none;
  background: var(--gs-paper);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.standard-badge-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); transform: translateY(-1px); }
.standard-badge-card__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gs-redline);
}
.standard-badge-card__title { font-size: 1rem; font-weight: 600; color: var(--gs-ink); }

.guide-standards-strip { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem 2.5rem; }
.guide-standards-strip h2 { font-size: 1.1rem; color: var(--gs-ink); margin-bottom: 1rem; }

/* ---- GUIDE body ------------------------------------------------------ */

.guide-body { max-width: 860px; margin: 0 auto; padding: 0 1.5rem 3rem; }
.guide-section { margin-bottom: 2.25rem; }
.guide-section h2 { font-size: 1.4rem; color: var(--gs-ink); margin-bottom: 0.75rem; border-bottom: 2px solid var(--gs-border); padding-bottom: 0.4rem; }
.guide-section__body { color: var(--gs-ink); line-height: 1.75; }
.guide-section__body p { margin: 0 0 1rem; }
.guide-section__list { margin: 0.75rem 0 0; padding-left: 1.25rem; line-height: 1.7; }

/* ---- Checklist -------------------------------------------------------- */

.guide-checklist__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.guide-checklist__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--gs-paper-muted);
  border-radius: var(--gs-radius);
  border-left: 3px solid var(--gs-border);
}
.guide-checklist__list li.is-critical { border-left-color: var(--gs-redline); }
.guide-checklist__box {
  width: 18px; height: 18px; flex-shrink: 0; margin-top: 0.15rem;
  border: 2px solid var(--gs-text-muted); border-radius: 3px;
}
.guide-checklist__flag {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gs-redline);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* ---- Comparison table -------------------------------------------------- */

.comparison-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 480px; }
.comparison-table th, .comparison-table td { padding: 0.65rem 0.9rem; border: 1px solid var(--gs-border); text-align: left; }
.comparison-table th { background: var(--gs-ink); color: var(--gs-paper); font-weight: 600; }
.comparison-table tbody tr:nth-child(even) { background: var(--gs-paper-muted); }

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

.faq-accordion { display: flex; flex-direction: column; gap: 0.6rem; }
.faq-item { border: 1px solid var(--gs-border); border-radius: var(--gs-radius); padding: 0.9rem 1.1rem; background: var(--gs-paper); }
.faq-item summary { cursor: pointer; font-weight: 600; color: var(--gs-ink); list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; float: right; color: var(--gs-redline); font-weight: 700; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { margin: 0.75rem 0 0; color: var(--gs-text-muted); line-height: 1.6; }

/* ---- Related content grids (reuses .ptype-grid, new card variant) ------ */

.guide-related, .standard-related { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem 3rem; }
.guide-related h2, .standard-related h2 { font-size: 1.2rem; margin-bottom: 1rem; color: var(--gs-ink); }

/* ---- CTA band ------------------------------------------------------------ */

.guide-cta, .standard-cta {
  background: var(--gs-ink);
  color: var(--gs-paper);
  text-align: center;
  padding: 3rem 1.5rem;
}
.guide-cta h2, .standard-cta h2 { font-size: 1.5rem; margin: 0 0 0.5rem; }
.guide-cta p, .standard-cta p { color: #d8d4cf; margin: 0 0 1.5rem; }
.cta-button {
  display: inline-block;
  background: var(--gs-redline);
  color: #fff;
  padding: 0.85rem 1.75rem;
  border-radius: var(--gs-radius);
  text-decoration: none;
  font-weight: 600;
}
.cta-button:hover { filter: brightness(1.08); }
.cta-button--outline { background: transparent; border: 2px solid var(--gs-redline); color: var(--gs-redline); }

/* ---- STANDARD hero — badge/certification treatment ---------------------- */

.standard-hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  text-align: center;
}
.standard-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--gs-ink);
  color: var(--gs-gold);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 1.25rem;
}
.standard-hero__badge-mark { color: #fff; }
.standard-hero__eyebrow { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gs-text-muted); margin-bottom: 0.5rem; }
.standard-hero__eyebrow a { color: var(--gs-redline); text-decoration: none; }
.standard-hero h1 { font-size: clamp(1.85rem, 3.2vw, 2.75rem); color: var(--gs-ink); margin: 0 0 0.75rem; }
.standard-hero__tagline { font-size: 1.15rem; color: var(--gs-text-muted); line-height: 1.6; margin: 0 0 1.75rem; }
.standard-hero__stat {
  display: inline-flex;
  flex-direction: column;
  padding: 1rem 2rem;
  background: var(--gs-paper-muted);
  border-radius: var(--gs-radius);
  margin-bottom: 1rem;
}
.standard-hero__stat-num { font-size: 2.25rem; font-weight: 700; color: var(--gs-redline); line-height: 1; }
.standard-hero__stat-label { font-size: 0.85rem; color: var(--gs-text-muted); margin-top: 0.25rem; }
.standard-hero__applies { font-size: 0.9rem; color: var(--gs-text-muted); }

/* ---- Principles grid ------------------------------------------------------ */

.standard-principles { max-width: 1100px; margin: 0 auto; padding: 1rem 1.5rem 3rem; }
.standard-principles h2 { text-align: center; font-size: 1.5rem; color: var(--gs-ink); margin-bottom: 1.75rem; }
.standard-principle-card { border-top: 3px solid var(--gs-redline); }
.standard-principle-card h3 { color: var(--gs-ink); margin: 0 0 0.5rem; font-size: 1.05rem; }
.standard-principle-card p { color: var(--gs-text-muted); line-height: 1.6; margin: 0; font-size: 0.92rem; }

/* ---- Protocol steps -------------------------------------------------------- */

.standard-protocol { max-width: 780px; margin: 0 auto; padding: 1rem 1.5rem 3rem; }
.standard-protocol h2 { text-align: center; font-size: 1.5rem; color: var(--gs-ink); margin-bottom: 2rem; }
.standard-protocol__steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.5rem; }
.standard-protocol__step { display: flex; gap: 1.25rem; }
.standard-protocol__num {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gs-ink);
  color: var(--gs-gold);
  border-radius: 50%;
  font-weight: 700;
}
.standard-protocol__step h3 { margin: 0 0 0.35rem; color: var(--gs-ink); font-size: 1.05rem; }
.standard-protocol__step p { margin: 0; color: var(--gs-text-muted); line-height: 1.6; }

/* ---- Download block -------------------------------------------------------- */

.standard-download { max-width: 700px; margin: 0 auto; padding: 1rem 1.5rem 3rem; text-align: center; }
.standard-download h2 { font-size: 1.2rem; color: var(--gs-ink); margin-bottom: 0.5rem; }
.standard-download p { color: var(--gs-text-muted); margin-bottom: 1.25rem; }

/* ---- Mobile ---------------------------------------------------------------- */

@media (max-width: 640px) {
  .standard-protocol__step { gap: 0.9rem; }
  .comparison-table { font-size: 0.85rem; }
}
