/* Case studies. Structure mirrors digitaltabby.com's case-study section
   (breadcrumb, meta row, stat cards, article body, CTA band, related grid),
   rendered in The Annuity Agency's own palette and type. */

/* ---------- shared: the thumbnail used on cards ---------- */
.cs-thumb {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
}
.cs-thumb::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(212,169,58,0.07) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(212,169,58,0.07) 1px, transparent 1px);
  background-size: 44px 44px;
}
.cs-thumb .cs-stat {
  position: absolute; left: 24px; top: 50%; transform: translateY(-58%);
  font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 40px;
  line-height: 1; letter-spacing: -0.03em; color: var(--gold-bright);
}
.cs-thumb .cs-stat-lab {
  position: absolute; left: 24px; top: 50%; transform: translateY(34px);
  font-size: 11px; letter-spacing: 2.4px; text-transform: uppercase;
  font-weight: 700; color: rgba(248,246,240,0.62);
}
.cs-thumb .cs-chip {
  position: absolute; left: 24px; bottom: 20px; font-size: 12px; font-weight: 600;
  letter-spacing: 1.2px; text-transform: uppercase; color: rgba(248,246,240,0.8);
  border-top: 1px solid rgba(212,169,58,0.45); padding-top: 10px;
}

/* ---------- index grid ---------- */
.cs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 72px 0 96px; }
@media (max-width: 1000px) { .cs-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px)  { .cs-grid { grid-template-columns: 1fr; gap: 24px; } }

.cs-card {
  display: block; background: var(--paper); border: 1px solid rgba(10,31,68,0.1);
  border-radius: 4px; overflow: hidden; transition: all 0.2s;
}
.cs-card:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 16px 40px -16px rgba(10,31,68,0.18); }
.cs-card-body { padding: 28px 26px 30px; }
.cs-card .cs-ind {
  font-size: 10.5px; letter-spacing: 2.4px; text-transform: uppercase;
  font-weight: 700; color: var(--gold); margin-bottom: 12px;
}
.cs-card h2 { font-family: 'Source Serif 4', serif; font-size: 25px; color: var(--navy); margin: 0 0 12px; line-height: 1.2; font-weight: 600; }
.cs-card p { font-size: 15px; color: var(--muted); line-height: 1.6; margin: 0 0 18px; }
.cs-card .cs-more { font-size: 13px; font-weight: 700; color: var(--navy); letter-spacing: 0.4px; }
.cs-card:hover .cs-more { color: var(--gold); }

/* ---------- detail page ---------- */
.cs-body { max-width: 780px; margin: 0 auto; padding: 56px 32px 88px; }

.cs-crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 30px; letter-spacing: 0.3px; }
.cs-crumb a { color: var(--muted); text-decoration: none; }
.cs-crumb a:hover { color: var(--navy); }
.cs-crumb span { margin: 0 8px; opacity: 0.5; }

.cs-meta {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  border-top: 2px solid var(--navy); border-bottom: 1px solid rgba(10,31,68,0.12);
  padding: 22px 0; margin-bottom: 40px;
}
@media (max-width: 640px) { .cs-meta { grid-template-columns: 1fr; gap: 16px; } }
.cs-meta .lab { font-size: 10.5px; letter-spacing: 2.2px; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.cs-meta .val { font-size: 15.5px; color: var(--ink); line-height: 1.45; }

.cs-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0 0 48px; }
@media (max-width: 640px) { .cs-stats { grid-template-columns: 1fr; } }
.cs-stat-card { background: var(--off-white); border: 1px solid rgba(10,31,68,0.09); border-top: 3px solid var(--gold); padding: 26px 22px; }
.cs-stat-card .n { font-family: 'Source Serif 4', serif; font-size: 38px; font-weight: 700; color: var(--navy); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.cs-stat-card .l { font-size: 13.5px; color: var(--muted); margin-top: 10px; line-height: 1.45; }

.cs-article h2 { font-family: 'Source Serif 4', serif; font-size: 29px; color: var(--navy); margin: 52px 0 16px; font-weight: 600; letter-spacing: -0.01em; }
.cs-article h3 { font-size: 19px; color: var(--navy); margin: 36px 0 12px; font-weight: 700; }
.cs-article p, .cs-article li { font-size: 17px; line-height: 1.72; color: #2a2f3a; }
.cs-article p { margin: 0 0 17px; }
.cs-article ul { padding-left: 24px; margin: 0 0 18px; }
.cs-article li { margin-bottom: 9px; }

.cs-article blockquote {
  margin: 34px 0; padding: 26px 30px; background: var(--off-white);
  border-left: 3px solid var(--gold);
  font-family: 'Source Serif 4', serif; font-size: 21px; line-height: 1.55; color: var(--navy);
}
.cs-article blockquote cite { display: block; margin-top: 14px; font-family: 'Inter', sans-serif; font-style: normal; font-size: 13px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); font-weight: 600; }

.cs-table-wrap { overflow-x: auto; margin: 22px 0 26px; }
.cs-article table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
.cs-article th, .cs-article td { text-align: left; padding: 12px 14px; border-bottom: 1px solid rgba(10,31,68,0.1); }
.cs-article th { font-size: 10.5px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--muted); font-weight: 700; border-bottom: 2px solid rgba(10,31,68,0.18); }
.cs-article td.num, .cs-article th.num { text-align: right; font-variant-numeric: tabular-nums; }
.cs-article tr.total td { border-top: 2px solid var(--navy); border-bottom: none; font-weight: 700; color: var(--navy); }

/* ---------- figures / charts ---------- */
/* Inline SVG only, no chart library. Series colours are navy vs gold: a blue/yellow
   pair, which stays separable under deuteranopia, protanopia and tritanopia. Every
   mark is also direct-labelled, so identity never rests on colour alone. */
.cs-fig { margin: 30px 0 34px; }
.cs-fig svg { width: 100%; height: auto; display: block; overflow: visible; }
.cs-fig figcaption { font-size: 13px; color: var(--muted); line-height: 1.55; margin-top: 12px; }
.cs-fig .fig-title { font-family: 'Source Serif 4', serif; font-size: 19px; color: var(--navy); font-weight: 600; margin-bottom: 4px; }
.cs-fig .fig-sub { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.ch-grid { stroke: rgba(10,31,68,0.1); stroke-width: 1; }
.ch-axis { stroke: rgba(10,31,68,0.28); stroke-width: 1; }
.ch-tick { font-size: 12px; fill: var(--muted); font-family: 'Inter', sans-serif; }
.ch-cat  { font-size: 13px; fill: #2a2f3a; font-family: 'Inter', sans-serif; font-weight: 600; }
.ch-val  { font-size: 14px; fill: var(--navy); font-family: 'Inter', sans-serif; font-weight: 700; font-variant-numeric: tabular-nums; }
.ch-key  { font-size: 12.5px; fill: #2a2f3a; font-family: 'Inter', sans-serif; font-weight: 600; }
.ch-bar-navy { fill: #0A1F44; }
.ch-bar-gold { fill: #D4A93A; }
.ch-line-navy { fill: none; stroke: #0A1F44; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ch-line-gold { fill: none; stroke: #D4A93A; stroke-width: 2; stroke-dasharray: 6 4; stroke-linecap: round; }
.ch-dot-navy { fill: #0A1F44; stroke: var(--paper); stroke-width: 2; }
.ch-dot-gold { fill: #D4A93A; stroke: var(--paper); stroke-width: 2; }
.cs-fig [data-bar]:hover { opacity: 0.82; }

.cs-note { font-size: 13px; color: var(--muted); font-style: italic; line-height: 1.6; margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(10,31,68,0.1); }

/* ---------- two-number contrast panel ----------
   Deliberately holds TWO numbers and nothing else. One figure, one consequence.
   Logan 2026-09-22: a graphic carrying six numbers is a wall, not a graphic. */
.cs-contrast {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  padding: 46px 44px; margin: 36px 0 40px; position: relative; overflow: hidden;
}
.cs-contrast::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(212,169,58,0.06) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(212,169,58,0.06) 1px, transparent 1px);
  background-size: 46px 46px;
}
.cs-contrast .cc-in { position: relative; display: grid; grid-template-columns: 1fr 78px 1fr; align-items: center; gap: 8px; }
.cs-contrast .cc-n {
  font-family: 'Source Serif 4', serif; font-weight: 700; line-height: .92;
  letter-spacing: -.045em; font-variant-numeric: tabular-nums; font-size: 68px;
}
.cs-contrast .cc-in > div:first-child .cc-n { color: rgba(248,246,240,.92); }
.cs-contrast .cc-in > div:last-child  .cc-n { color: var(--gold-bright); }
.cs-contrast .cc-l { font-size: 14px; color: rgba(248,246,240,.62); margin-top: 14px; line-height: 1.5; max-width: 260px; }
.cs-contrast .cc-arrow { display: flex; align-items: center; justify-content: center; }
.cs-contrast .cc-arrow svg { width: 52px; height: 18px; }
@media (max-width: 680px) {
  .cs-contrast { padding: 34px 26px; }
  .cs-contrast .cc-in { grid-template-columns: 1fr; gap: 20px; }
  .cs-contrast .cc-n { font-size: 52px; }
  .cs-contrast .cc-l { max-width: none; margin-top: 10px; }
  .cs-contrast .cc-arrow { justify-content: flex-start; }
  .cs-contrast .cc-arrow svg { transform: rotate(90deg); width: 38px; }
}

/* ---------- inline stat band (breaks up long prose) ---------- */
.cs-band {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  padding: 34px 34px 36px; margin: 34px 0 38px; position: relative; overflow: hidden;
}
.cs-band::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(212,169,58,0.06) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(212,169,58,0.06) 1px, transparent 1px);
  background-size: 46px 46px;
}
.cs-band > * { position: relative; }
.cs-band .band-lab {
  font-size: 10.5px; letter-spacing: 2.6px; text-transform: uppercase; font-weight: 800;
  color: rgba(248,246,240,0.5); margin-bottom: 22px;
}
.cs-band .band-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 680px) { .cs-band .band-grid { grid-template-columns: 1fr 1fr; gap: 26px 18px; } }
.cs-band .bn {
  font-family: 'Source Serif 4', serif; font-size: 38px; font-weight: 700; line-height: 1;
  color: var(--gold-bright); letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.cs-band .bl { font-size: 13px; color: rgba(248,246,240,0.7); margin-top: 10px; line-height: 1.45; }
.cs-band .band-foot {
  margin-top: 26px; padding-top: 20px; border-top: 1px solid rgba(248,246,240,0.14);
  font-size: 15px; color: rgba(248,246,240,0.85); line-height: 1.6;
}
.cs-band .band-foot b { color: var(--gold-bright); font-weight: 700; }

/* ---------- horizontal timeline ---------- */
.cs-time { margin: 34px 0 38px; }
.cs-time .t-track { display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.cs-time .t-track::before {
  content: ''; position: absolute; left: 0; right: 0; top: 9px; height: 2px;
  background: linear-gradient(90deg, rgba(10,31,68,0.14), var(--gold));
}
.cs-time .t-step { position: relative; padding: 30px 20px 0 0; }
.cs-time .t-dot {
  position: absolute; top: 0; left: 0; width: 20px; height: 20px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--gold);
}
.cs-time .t-step:last-child .t-dot { background: var(--gold); }
.cs-time .t-when {
  font-size: 11px; letter-spacing: 2.2px; text-transform: uppercase; font-weight: 800;
  color: var(--navy); margin-bottom: 7px;
}
.cs-time .t-what { font-size: 14.5px; color: var(--muted); line-height: 1.55; }
@media (max-width: 680px) {
  .cs-time .t-track { grid-template-columns: 1fr; gap: 26px; }
  .cs-time .t-track::before { left: 9px; right: auto; top: 0; bottom: 0; width: 2px; height: auto;
    background: linear-gradient(180deg, rgba(10,31,68,0.14), var(--gold)); }
  .cs-time .t-step { padding: 0 0 0 38px; }
  .cs-time .t-dot { top: 2px; }
}

/* ---------- CTA band + related ---------- */
.cs-cta { background: var(--navy-deep); color: var(--off-white); padding: 78px 0; text-align: center; position: relative; overflow: hidden; }
.cs-cta::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(212,169,58,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(212,169,58,0.04) 1px, transparent 1px); background-size: 60px 60px; }
.cs-cta > .wrap { position: relative; }
.cs-cta h2 { font-family: 'Source Serif 4', serif; font-size: 38px; color: var(--off-white); margin: 0 0 16px; font-weight: 600; }
.cs-cta p { color: rgba(248,246,240,0.8); font-size: 18px; max-width: 560px; margin: 0 auto 32px; }
@media (max-width: 640px) { .cs-cta h2 { font-size: 29px; } }

.cs-related { background: var(--off-white); border-top: 1px solid rgba(10,31,68,0.1); padding: 72px 0 84px; }
.cs-related h2 { font-family: 'Source Serif 4', serif; font-size: 28px; color: var(--navy); margin: 0 0 32px; font-weight: 600; }
.cs-related .cs-grid { padding: 0; grid-template-columns: 1fr 1fr; }
@media (max-width: 680px) { .cs-related .cs-grid { grid-template-columns: 1fr; } }
