/* ==========================================================================
   Case study layout (shared by every page in /work/)
   Loads after styles.css and uses its tokens.
   ========================================================================== */

:root {
  --navy-raised: #14263F;      /* stat cards on navy */
  --cobalt-on-light: #2E5A9A;  /* label and link blue that passes AA on off-white */
  --ink-soft: #4A545E;         /* secondary text on light backgrounds */
  --tint: #F1EFE9;             /* warm panel background */
  --cs-radius: 12px;
}

/* ---- Navy header ---- */
.cs-hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--warm-white);
  padding: 3.5rem 0 4rem;
}
.cs-hero__linework {
  position: absolute;
  top: 0;
  right: 0;
  width: 55%;
  height: 100%;
  opacity: 0.22;
  pointer-events: none;
}
.cs-hero .container { position: relative; z-index: 1; }

.cs-breadcrumb { font-size: 0.88rem; color: var(--muted-blue-gray); margin-bottom: 1.25rem; }
.cs-breadcrumb a { color: var(--cobalt); font-weight: 500; }
.cs-breadcrumb a:hover { text-decoration: underline; }

.cs-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: 0.9rem;
}
.cs-title {
  font-weight: 800;
  font-size: clamp(2.1rem, 4.6vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 20ch;
}
.cs-lede {
  margin-top: 1.1rem;
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--muted-blue-gray);
  max-width: 62ch;
}

/* Proof band: up to three large numbers */
.cs-proof {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.cs-proof li { background: var(--navy-raised); border-radius: var(--cs-radius); padding: 1.75rem; }
.cs-proof__num {
  display: block;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--warm-white);
}
.cs-proof__label { display: block; margin-top: 0.6rem; font-size: 0.95rem; line-height: 1.5; color: var(--muted-blue-gray); }

/* Facts row */
.cs-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-dark);
}
.cs-facts dt {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: 0.35rem;
}
.cs-facts dd { font-size: 0.95rem; line-height: 1.5; color: var(--warm-white); }

/* ---- Hero visual, directly under the header ---- */
.cs-heroviz { padding-top: 3.5rem; }
.cs-heroviz__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }

.cs-figure { margin: 0; }
.cs-figure img {
  width: 100%;
  height: auto;
  border: 1px solid #d9dee6;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(13, 27, 46, 0.08);
}
.cs-figure a { display: block; }
.cs-figure figcaption { margin-top: 0.75rem; font-size: 0.9rem; line-height: 1.5; color: var(--gray-text); }
.cs-figure figcaption strong { color: var(--off-black); font-weight: 600; }
.cs-figure--wide { margin: 2.25rem 0; }

/* ---- Body: section list on the left, content on the right ---- */
.cs-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 4rem;
  align-items: start;
  padding-top: 4.5rem;
  padding-bottom: 6rem;
}
.cs-rail { position: sticky; top: 108px; }
.cs-rail__label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
}
.cs-rail ul { list-style: none; border-left: 1px solid var(--border-light); }
.cs-rail a {
  display: block;
  padding: 0.55rem 1rem;
  margin-left: -1px;
  border-left: 2px solid transparent;
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--ink-soft);
}
.cs-rail a:hover { color: var(--off-black); }
.cs-rail a[aria-current="true"] { color: var(--off-black); font-weight: 600; border-left-color: var(--cobalt-on-light); }

@media (max-width: 900px) {
  .cs-layout { grid-template-columns: minmax(0, 1fr); padding-top: 3rem; padding-bottom: 4rem; }
  .cs-rail { display: none; }
}

.cs-body { display: flex; flex-direction: column; gap: 5.5rem; min-width: 0; }
@media (max-width: 640px) { .cs-body { gap: 4rem; } }

.cs-section { scroll-margin-top: 100px; }
.cs-section > p { font-size: 1.06rem; margin-bottom: 1.1rem; max-width: 68ch; }
.cs-section > p:last-child { margin-bottom: 0; }

.cs-label {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cobalt-on-light);
  margin-bottom: 0.6rem;
}
.cs-section h2 {
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 30em;
  margin-bottom: 1.5rem;
}
.cs-section h3 { font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.01em; margin-bottom: 0.5rem; }
.cs-section h3.cs-subhead { font-size: 1.35rem; margin-top: 2.75rem; margin-bottom: 1rem; }

/* ---- Modules ---- */
.cs-module { margin: 2rem 0; }
.cs-module:last-child { margin-bottom: 0; }
.cs-module__label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.9rem;
}

/* Step strip */
.cs-steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.cs-steps li {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--cs-radius);
  padding: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.cs-steps__num {
  display: block;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--cobalt-on-light);
  margin-bottom: 0.6rem;
}
.cs-steps--dark li { background: var(--navy); border-color: var(--navy); color: var(--warm-white); }
.cs-steps--dark .cs-steps__num { color: var(--cobalt); }

/* Cards */
.cs-cards { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.cs-cards--wide { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.cs-card { background: #fff; border: 1px solid var(--border-light); border-radius: var(--cs-radius); padding: 1.5rem; }
.cs-card p { font-size: 0.97rem; line-height: 1.55; color: var(--ink-soft); max-width: none; }
.cs-card > p:only-child { color: var(--off-black); }

/* Tinted panel */
.cs-panel { background: var(--tint); border-radius: var(--cs-radius); padding: 1.75rem 2rem; }
.cs-panel p { font-size: 1.02rem; max-width: 68ch; }
.cs-panel p + p { margin-top: 0.9rem; }

/* Field quote (someone else's words) */
.cs-quote { background: var(--tint); border-radius: var(--cs-radius); padding: 2.25rem 2.5rem; }
.cs-quote blockquote {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--navy);
}
.cs-quote figcaption { margin-top: 0.75rem; font-size: 0.88rem; color: var(--gray-text); }

/* Pull quote (my own words) */
.cs-pull { background: var(--navy); border-radius: var(--cs-radius); padding: 3rem; }
.cs-pull p {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--warm-white);
  max-width: 24em;
}

/* Decision card */
.cs-decision { background: #fff; border: 1px solid var(--border-light); border-radius: var(--cs-radius); padding: 2rem; }
.cs-decision .cs-label { margin-bottom: 1.25rem; }
.cs-decision__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.75rem; }
.cs-decision p { font-size: 0.97rem; line-height: 1.55; color: var(--ink-soft); max-width: none; }

/* Timeline */
.cs-timeline {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-top: 2px solid var(--navy);
}
.cs-timeline li { padding: 1.1rem 1.25rem 0.5rem 0; font-size: 0.95rem; line-height: 1.5; color: var(--ink-soft); }
.cs-timeline__date {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

/* Bar comparison */
.cs-bars { background: #fff; border: 1px solid var(--border-light); border-radius: var(--cs-radius); padding: 2rem; }
.cs-bars__row { margin-top: 1.1rem; }
.cs-bars__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; font-size: 0.97rem; }
.cs-bars__head strong { font-weight: 600; }
.cs-bars__bar { height: 14px; border-radius: 7px; margin-top: 0.4rem; background: var(--cobalt-on-light); min-width: 14px; }
.cs-bars__bar--before { background: var(--navy); }
.cs-bars__note { margin-top: 1.25rem; font-size: 0.88rem; color: var(--gray-text); max-width: none; }

/* Video inside the new layout */
.cs-body .video-embed, .cs-heroviz .video-embed { max-width: none; margin: 0; }

/* ---- Next case study ---- */
.cs-next { background: var(--navy); padding: 4rem 0; border-bottom: 1px solid var(--border-dark); }
.cs-next__label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: 0.6rem;
}
.cs-next__link {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--warm-white);
  transition: color 0.15s ease;
}
.cs-next__link:hover { color: var(--cobalt); }

@media (max-width: 640px) {
  .cs-hero { padding: 2.5rem 0 3rem; }
  .cs-quote, .cs-pull, .cs-decision, .cs-bars { padding: 1.5rem; }
  .cs-panel { padding: 1.5rem; }
}

/* ---- Additions for the full set of pages ---- */
.cs-heroviz__single { max-width: 960px; }
.cs-steps strong { display: block; font-family: var(--font-heading); font-weight: 700; color: var(--off-black); margin-bottom: 0.25rem; }
.cs-steps__kicker {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cobalt-on-light);
  margin-bottom: 0.35rem;
}
.cs-section p a { color: var(--cobalt-on-light); text-decoration: underline; text-underline-offset: 2px; }
.cs-section p a:hover { color: var(--navy); }
.cs-section .cs-subhead + p { margin-top: 0; }

/* ---- Org diagram (built in the page so the text stays readable on a phone) ---- */
.cs-org { margin: 0; }
.cs-org__top {
  position: relative;
  width: min(100%, 320px);
  margin: 0 auto;
  background: var(--navy);
  border-radius: var(--cs-radius);
  padding: 1.1rem 1.25rem;
  text-align: center;
}
.cs-org__top strong { display: block; font-family: var(--font-heading); font-weight: 700; font-size: 1.2rem; color: var(--warm-white); }
.cs-org__top span { display: block; font-size: 0.92rem; color: var(--muted-blue-gray); }
.cs-org__top::after { content: ""; position: absolute; left: 50%; top: 100%; height: 1.25rem; border-left: 2px solid var(--navy); }
.cs-org__row { list-style: none; position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2.5rem; }
.cs-org__row::before {
  content: "";
  position: absolute;
  top: -1.25rem;
  left: calc((100% - 2.5rem) / 6);
  right: calc((100% - 2.5rem) / 6);
  border-top: 2px solid var(--navy);
}
.cs-org__box { position: relative; background: #fff; border: 2px solid var(--navy); border-radius: var(--cs-radius); padding: 1.1rem; text-align: center; }
.cs-org__box::before { content: ""; position: absolute; left: 50%; bottom: 100%; height: calc(1.25rem + 2px); border-left: 2px solid var(--navy); }
.cs-org__box strong { display: block; font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem; line-height: 1.25; color: var(--navy); margin-bottom: 0.3rem; }
.cs-org__box span { display: block; font-size: 0.92rem; line-height: 1.45; color: var(--ink-soft); }
.cs-org__box--accent { background: #EDF2FA; border-color: var(--cobalt-on-light); }
.cs-org__box--accent strong { color: var(--cobalt-on-light); }
.cs-org__box--accent span { color: var(--off-black); }
.cs-org__bracket { height: 16px; margin-top: 0.9rem; border: 2px solid var(--cobalt-on-light); border-top: 0; border-radius: 0 0 14px 14px; }
.cs-org__note { max-width: none; margin-top: 0.6rem; text-align: center; font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; color: var(--cobalt-on-light); }
.cs-org figcaption { margin-top: 1.1rem; text-align: center; font-size: 0.92rem; line-height: 1.5; color: var(--gray-text); }
@media (max-width: 640px) {
  .cs-org__top { width: 100%; }
  .cs-org__row { grid-template-columns: 1fr; gap: 0.75rem; margin-top: 1.25rem; }
  .cs-org__row::before, .cs-org__box::before, .cs-org__bracket { display: none; }
}

/* ---- Interns by summer ---- */
.cs-dots { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 2.5rem; background: #fff; border: 1px solid var(--border-light); border-radius: var(--cs-radius); padding: 2rem; }
.cs-dots__years { list-style: none; flex: 1 1 340px; display: grid; grid-template-columns: repeat(4, auto); gap: 1.5rem 2rem; }
.cs-dots__label { display: block; font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; color: var(--navy); margin-bottom: 0.5rem; }
.cs-dots__row { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-dots__dot { width: 18px; height: 18px; border-radius: 50%; background: var(--cobalt-on-light); }
.cs-dots__count { display: block; margin-top: 0.45rem; font-size: 0.88rem; color: var(--gray-text); }
.cs-dots__stat { flex: 0 1 230px; border-left: 1px solid var(--border-light); padding-left: 2rem; }
.cs-dots__stat-num { display: block; font-family: var(--font-heading); font-weight: 800; font-size: 2rem; line-height: 1; letter-spacing: -0.02em; color: var(--navy); }
.cs-dots__stat-label { display: block; margin-top: 0.4rem; font-size: 0.95rem; color: var(--ink-soft); }
@media (max-width: 640px) {
  .cs-dots { padding: 1.5rem; }
  .cs-dots__years { grid-template-columns: repeat(2, auto); }
  .cs-dots__stat { border-left: 0; padding-left: 0; }
}

/* ---- Before and after, drawn as a diagram ---- */
.cs-ba { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.cs-ba__panel { background: #fff; border: 1px solid var(--border-light); border-radius: var(--cs-radius); padding: 1.5rem; }
.cs-ba__panel p { font-size: 0.95rem; line-height: 1.5; color: var(--ink-soft); max-width: none; }
.cs-ba__rows { list-style: none; display: grid; gap: 0.4rem; margin: 1rem 0; }
.cs-ba__rows li { background: var(--off-white); border: 1px solid var(--border-light); border-radius: 6px; padding: 0.45rem 0.75rem; font-size: 0.9rem; color: var(--ink-soft); }
.cs-ba__rows li.cs-ba__more { border-style: dashed; }
.cs-ba__panel--after { background: var(--navy); border-color: var(--navy); color: var(--warm-white); }
.cs-ba__panel--after p { color: var(--muted-blue-gray); }
.cs-ba__panel--after .cs-ba__rows li { background: var(--navy-raised); border-color: var(--border-dark); color: var(--warm-white); }
.cs-jam .cs-cards { margin-bottom: 1.5rem; }

/* ---- Plain numbered list (lighter than cards) ---- */
.cs-list { list-style: none; counter-reset: cs-list; margin: 1.5rem 0; border-top: 1px solid var(--border-light); max-width: 68ch; }
.cs-list li { counter-increment: cs-list; display: grid; grid-template-columns: 2.25rem 1fr; padding: 0.9rem 0; border-bottom: 1px solid var(--border-light); font-size: 1.02rem; line-height: 1.55; }
.cs-list li::before { content: counter(cs-list); font-family: var(--font-heading); font-weight: 800; font-size: 1.1rem; color: var(--cobalt-on-light); }
.cs-list strong { font-family: var(--font-heading); font-weight: 700; }
