/* ============================================================
   Our Reporting Process — interactive cycle variations
   Shared component styles
   ============================================================ */

@import url("./colors_and_type.css");

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-text);
  color: var(--fg-1);
  background: var(--bg-muted);
}

/* ---------- Shared variation chrome ---------- */
.variation {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: var(--ct-white);
  display: flex;
  flex-direction: column;
}

.v-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-5) var(--space-3);
}

.v-head .eyebrow {
  color: var(--ct-orange);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.v-title {
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.3px;
  margin: 4px 0 0;
  text-transform: none;
  color: var(--ct-near-black);
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  min-height: 44px; /* WCAG 2.5.5 touch target */
  background: var(--ct-orange);
  color: var(--ct-white);
  border: none;
  border-radius: 0;
  font-family: var(--font-text);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 160ms ease, transform 120ms ease;
}
.download-btn:hover {
  background: var(--ct-orange-d20);
}
.download-btn:active { transform: translateY(1px); }

.cycle-svg {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
}

/* ---------- V1 — Classic cycle ---------- */
.v1-stage {
  position: relative;
}

.cycle-node:hover circle:first-of-type,
.cycle-node:hover circle:last-of-type {
  filter: brightness(1.08);
}

.v-detail {
  background: var(--ct-white);
  border-top: 1px solid var(--border);
  padding: 20px 28px 28px;
  min-height: 110px;
}
.detail-hint {
  margin: 0;
  font-size: 14px;
  color: var(--fg-2);
  text-align: center;
}
.detail-hint strong {
  color: var(--ct-purple);
  font-weight: 600;
}
.detail-num {
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ct-orange);
  margin-bottom: 8px;
}
.detail-body {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ct-near-black);
  margin: 0 0 12px;
  max-width: 64ch;
}
.detail-close {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: transparent;
  color: var(--ct-purple);
  border: 1px solid var(--ct-purple-40);
  border-radius: var(--radius-sm);
  font-family: var(--font-text);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 140ms ease;
}
.detail-close:hover {
  background: var(--ct-purple);
  color: var(--ct-white);
}

/* ---------- Page-level layout ---------- */
.page-intro {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 32px 24px;
  text-align: center;
  font-family: var(--font-text);
}
.page-intro .eyebrow {
  color: var(--ct-orange);
}
.page-intro h1 {
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 44px;
  letter-spacing: -0.8px;
  text-transform: none;
  color: var(--ct-near-black);
  margin: 12px 0 16px;
  line-height: 1.05;
}
.page-intro p {
  font-size: 17px;
  color: var(--fg-2);
  line-height: 1.55;
  margin: 0 auto;
  max-width: 60ch;
}
/* ---------- Final page layout (V04 only) ---------- */
.final-page {
  background: var(--ct-charcoal-05);
  min-height: 100vh;
  padding-bottom: 80px;
}
.final-stage {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px;
  background: var(--ct-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.final-stage .variation {
  width: 100%;
}

/* ---------- Embed page layout ---------- */
body.embed-page {
  background: var(--ct-white);
  /* Suppress scrollbar so document.body.scrollHeight reflects content height,
     not the scrollable overflow — paired with the ResizeObserver in embed-bare.html. */
  overflow: hidden;
}

/* ---------- Below-graphic download strip ---------- */
.v-footer {
  display: flex;
  justify-content: flex-end;
  /* No right padding — button right edge aligns flush with SVG right edge */
  padding: var(--space-3) 0 var(--space-3) var(--space-5);
  border-top: 1px solid var(--border);
}

/* ---------- Mobile accessibility ---------- */
@media (max-width: 480px) {
  /* Larger body copy — easier to read on small screens */
  .detail-hint  { font-size: 15px; }
  .detail-body  { font-size: 16px; line-height: 1.55; }
  .detail-num   { font-size: 13px; }

  /* Tighten detail panel padding on narrow viewports */
  .v-detail { padding: 16px 16px 24px; }

  /* Ensure "Back to overview" meets 44px touch target */
  .detail-close {
    padding: 10px 14px;
    font-size: 13px;
    min-height: 44px;
  }

  /* Extra bottom breathing room so button clears the viewport edge */
  .v-footer { padding-bottom: 0; }
}
