/* ─────────────────────────────────────────────────────────────────────────────
   ways-of-healing-case-study.css — page accent + page-specific components
   The design language lives in css/editorial.css; this file only sets the
   field-notebook terracotta accent and styles the atlas's own pieces
   (diagrams, sketches, survey ratings, research decisions).
   ───────────────────────────────────────────────────────────────────────────── */

:root {
  --accent: #a34a26;            /* field-notebook terracotta at ink strength */
  --accent-dim: rgba(163, 74, 38, 0.06);
}

[data-theme="dark"] {
  --accent: #d98a5f;            /* brighter terracotta for near-black paper */
  --accent-dim: rgba(217, 138, 95, 0.07);
}

/* guard: wide children (diagrams) must not blow the grid column open */
.layout > * { min-width: 0; }

/* ── Hero caption ── */
.hero-caption {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--faint);
}

/* ── Inline links inside body copy ── */
.inline-link {
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.inline-link:hover { color: var(--accent); }

/* ── Sub-headings inside sections ── */
.section-body h3 {
  font-family: "Syne", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.01em;
  margin: 2.5rem 0 1rem;
}

.section-body h3:first-of-type { margin-top: 1.75rem; }

/* ── Diagrams: ruled figures, scrollable on small screens ── */
.diagram-frame { border-top: 1px solid var(--text); padding-top: 1.25rem; }

.section-body p + .diagram-frame { margin-top: 2rem; }

.section-body .diagram-frame + .decision-grid,
.section-body .diagram-frame + p { margin-top: 2rem; }

.diagram-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.diagram-frame svg {
  width: 100%;
  height: auto;
  display: block;
  min-width: 560px;
}

.diagram-frame figcaption {
  font-size: 0.78rem;
  color: var(--faint);
  margin-top: 0.6rem;
}

/* ── Sketch gallery ── */
.sketch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem 1.25rem;
  margin-top: 1.5rem;
}

.sketch-grid img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.sketch-grid figcaption {
  font-size: 0.78rem;
  color: var(--faint);
  line-height: 1.45;
  margin-top: 0.6rem;
}

/* ── Illustration strip ── */
.illo-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.illo-strip img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.section-body .illo-strip + .callout { margin-top: 2rem; }

/* ── Bookmark strip ── */
.bookmark-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: flex-start;
  margin-top: 1.5rem;
}

.bookmark-row img {
  width: 110px;
  box-shadow: var(--shadow);
}

/* ── Wandering figures: one manifest line instead of pills ── */
.npc-line {
  font-size: 0.9rem;
  line-height: 1.9;
}

/* ── Survey ratings: bare numbers between hairlines ── */
.rating-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-top: 1rem;
}

.section-body .rating-row + p { margin-top: 1rem; }

.rating-score {
  display: block;
  font-family: "Syne", sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.rating-score small {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--faint);
}

.rating-dim {
  display: block;
  font-size: 0.78rem;
  color: var(--faint);
  line-height: 1.5;
  margin-top: 0.2rem;
}

/* ── Research decisions: status + basis as a plain meta line ── */
.decision-status,
.decision-basis {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 0.55rem;
}

.decision-status { color: var(--text); margin-right: 0.9rem; }

.status-declined,
.status-deferred { color: var(--faint); }

.decision-basis { color: var(--faint); }

/* ── Participant quote: a ruled aside in the accent ── */
.field-quote {
  margin-top: 2rem;
  padding: 0.2rem 0 0.2rem 1.4rem;
  border-left: 2px solid var(--accent);
  font-style: italic;
  color: var(--text-muted);
  max-width: 60ch;
}

.field-quote cite {
  display: block;
  font-style: normal;
  font-size: 0.78rem;
  color: var(--faint);
  margin-top: 0.5rem;
}

/* ── Responsive ── */
@media (max-width: 980px) {
  .rating-row { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 2rem; }
}

@media (max-width: 680px) {
  .sketch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 1rem; }
  .illo-strip { grid-template-columns: repeat(3, 1fr); }
  .diagram-frame svg { min-width: 480px; }
  .diagram-frame figcaption::after {
    content: " (swipe sideways to see the full diagram)";
    opacity: 0.75;
  }
}

@media (max-width: 767px) {
  .rating-row { grid-template-columns: 1fr 1fr; }
}
