/* ============ CASE STUDY PAGE — Book of Earth ============ */

.case-hero { min-height: 92svh; }
.case-hero h1 { font-size: clamp(1.9rem, 5vw, 3.3rem); }
.case-affil {
  font-size: 0.82rem;
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0.6rem auto 0;
  opacity: 0.85;
}

/* — buttons — */
.btn-earth { background: var(--earth); color: #fff; }

/* — nav map pill (earth, not fire) — */
.nav-links a.nav-map { background: var(--earth); }
.nav-links a.nav-map:hover { background: #3c5c2a; }

/* — hero stat strip — */
.stat-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin: 1.8rem auto 1.6rem;
}
.stat {
  background: rgba(255, 253, 247, 0.72);
  border: 2px solid var(--earth-soft);
  border-bottom: 4px solid var(--earth);
  border-radius: var(--radius);
  padding: 0.7rem 1.1rem;
  min-width: 118px;
}
.stat-num {
  display: block;
  font-family: var(--font-head);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--earth);
  line-height: 1.1;
}
.stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* — prose & callouts — */
.case-prose { max-width: 720px; color: var(--ink-soft); font-size: 1.02rem; }
.case-prose + .case-prose { margin-top: 1rem; }
.section-dark .case-prose { color: #e2d9c6; }
.section-dark .case-prose strong { color: #f6edd9; }
.case-prose code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.9em;
  background: rgba(0, 0, 0, 0.22);
  padding: 0.05em 0.35em;
  border-radius: 5px;
}
.case-callout {
  max-width: 720px;
  margin-top: 1.4rem;
  padding: 1.1rem 1.3rem;
  background: var(--earth-soft);
  border-left: 5px solid var(--earth);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink);
}
.law-callout { background: #efe6cf; border-left-color: var(--fire); }

/* — timeline — */
.timeline {
  list-style: none;
  margin-top: 1rem;
  position: relative;
  padding-left: 1.6rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(var(--earth), #8aa95d);
}
.timeline li {
  position: relative;
  padding: 0 0 1.5rem 0.9rem;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -1.6rem;
  top: 0.35rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--earth);
  border: 4px solid var(--earth-soft);
  box-sizing: border-box;
}
.timeline h3 { color: var(--ink); margin: 0.15rem 0 0.25rem; }
.timeline p { color: var(--ink-soft); max-width: 700px; font-size: 0.96rem; }
.tl-date {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 253, 247, 0.8);
  border: 1.5px solid var(--earth);
  color: var(--earth);
  border-radius: 999px;
  padding: 0.12rem 0.6rem;
}
.tl-highlight::before { background: var(--fire) !important; border-color: var(--fire-soft) !important; }
.tl-highlight .tl-date { border-color: var(--fire); color: var(--fire); }
.tl-highlight h3 { color: var(--fire); }

/* — architecture flow — */
.arch-flow {
  position: relative;
  margin: 1.5rem 0 1.6rem;
  max-width: 720px;
}
.arch-flow::before {
  content: "";
  position: absolute;
  left: 26px;
  top: 18px;
  bottom: 18px;
  width: 4px;
  border-radius: 2px;
  background: var(--earth);
  opacity: 0.3;
}
.arch-step {
  position: relative;
  display: flex;
  gap: 1.05rem;
  align-items: flex-start;
  padding: 0.75rem 0;
}
.arch-icon {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #fffdf7;
  border: 3px solid var(--earth);
  display: grid;
  place-items: center;
  font-size: 1.45rem;
  position: relative;
  z-index: 1;
  box-shadow: 0 3px 8px rgba(60, 45, 20, 0.15);
}
.arch-step h3 { font-size: 1.05rem; color: var(--ink); margin: 0.35rem 0 0.2rem; }
.arch-step p { color: var(--ink-soft); font-size: 0.95rem; max-width: 600px; }
.arch-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.6rem; }
.arch-chips span {
  background: #fffdf7;
  border: 1.5px solid var(--earth);
  color: var(--earth);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
}

/* — findings grid (dark section) — */
.finding-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.1rem;
}
.finding {
  background: linear-gradient(165deg, #26331b 0%, #3d5527 60%, #4a6531 100%);
  border: 2px solid #7d9b52;
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem;
  box-shadow: 0 7px 0 -3px #18200f, 0 12px 22px rgba(0, 0, 0, 0.4);
}
.finding h3 { color: #cbe3a4; margin-bottom: 0.4rem; font-size: 1.05rem; }
.finding p { color: #e8e2d2; font-size: 0.92rem; }

/* — humans list — */
.case-list { list-style: none; max-width: 760px; }
.case-list li {
  padding: 0.45rem 0 0.45rem 1.5em;
  position: relative;
  color: var(--ink-soft);
}
.case-list li::before {
  content: "◆";
  position: absolute;
  left: 0;
  color: var(--earth);
}
.case-list strong { color: var(--ink); }

/* — cost table — */
.cost-heading { margin-top: 2.4rem; }
.table-wrap { overflow-x: auto; margin-top: 1rem; }
.case-table {
  width: 100%;
  border-collapse: collapse;
  background: #fffdf7;
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.92rem;
  box-shadow: 0 2px 10px rgba(60, 45, 20, 0.08);
}
.case-table th {
  background: var(--earth);
  color: #fff;
  text-align: left;
  padding: 0.6rem 0.9rem;
  font-family: var(--font-head);
  letter-spacing: 0.03em;
}
.case-table td {
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--earth-soft);
  color: var(--ink-soft);
}
.case-table td:first-child { font-weight: 700; color: var(--ink); white-space: nowrap; }

/* — lessons — */
.lesson-list {
  list-style: none;
  counter-reset: scar;
  max-width: 760px;
  margin-top: 0.6rem;
}
.lesson-list li {
  counter-increment: scar;
  position: relative;
  padding: 0.7rem 0 0.7rem 3rem;
  color: var(--ink-soft);
}
.lesson-list li::before {
  content: counter(scar);
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--earth);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 3px 0 #2c3a1c;
}
.lesson-list strong { color: var(--ink); }
.lesson-list em { display: block; margin-top: 0.15rem; color: var(--earth); font-weight: 600; }

/* — teachings — */
.teaching-list {
  list-style: none;
  counter-reset: teach;
  max-width: 720px;
  margin-top: 0.8rem;
}
.teaching-list li {
  counter-increment: teach;
  position: relative;
  padding: 0.55rem 0 0.55rem 2.6rem;
  font-size: 1.04rem;
  color: var(--ink);
  font-weight: 600;
}
.teaching-list li::before {
  content: counter(teach);
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2.5px solid var(--earth);
  color: var(--earth);
  font-family: var(--font-head);
  font-weight: 700;
  display: grid;
  place-items: center;
}
.case-end-cta { margin-top: 2.2rem; justify-content: flex-start; }

/* — century-of-forms era strip — */
.era-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 0.9rem;
  margin: 1.5rem 0 1.4rem;
}
.era-card {
  background: #fffdf7;
  border: 2px solid var(--earth-soft);
  border-top: 5px solid var(--earth);
  border-radius: 10px;
  padding: 0.95rem 1rem;
  box-shadow: 0 2px 8px rgba(60, 45, 20, 0.07);
}
.era-years {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--earth);
}
.era-name {
  display: block;
  font-weight: 700;
  color: var(--ink);
  margin: 0.1rem 0 0.35rem;
}
.era-card p { font-size: 0.86rem; color: var(--ink-soft); line-height: 1.5; }

/* — poster figure & links (Tulsa interlude) — */
.poster-figure {
  display: block;
  margin: 1.1rem auto 0.3rem;
  max-width: 540px;
  text-decoration: none;
  text-align: center;
}
.poster-figure img {
  width: 100%;
  display: block;
  border: 3px solid var(--earth);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(60, 45, 20, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.poster-figure:hover img {
  transform: scale(1.015);
  box-shadow: 0 10px 26px rgba(60, 45, 20, 0.35);
}
.poster-figure-hint {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--earth);
  margin-top: 0.45rem;
}
.poster-links {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}
.poster-links a { font-weight: 700; text-decoration: none; color: var(--earth); font-size: 0.9rem; }
.poster-links a:hover { text-decoration: underline; }

/* — required notices — */
.funding-section { padding: 3.2rem 1.2rem; }
.funding-section h2 { font-size: 1.4rem; }
.smallprint {
  font-size: 0.84rem;
  color: var(--ink-soft);
  max-width: 860px;
  margin-top: 0.8rem;
  line-height: 1.55;
}

/* — living journal — */
.journal-entry {
  background: #fffdf7;
  border: 2px solid var(--earth-soft);
  border-left: 5px solid var(--earth);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.3rem 1.2rem;
  max-width: 760px;
  margin-top: 1rem;
  box-shadow: 0 2px 10px rgba(60, 45, 20, 0.08);
}
.journal-entry h3 { margin: 0.5rem 0 0.3rem; }
.journal-entry h3 a { color: var(--ink); text-decoration: none; }
.journal-entry h3 a:hover { color: var(--earth); text-decoration: underline; }
.journal-entry p { color: var(--ink-soft); font-size: 0.95rem; }
.journal-more { margin-top: 1.2rem; }
.journal-more a { font-weight: 700; text-decoration: none; color: var(--earth); }
.journal-more a:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .stat { min-width: 44%; }
  .case-end-cta { justify-content: center; }
}
