/* ============================================================
   CASE STUDY KIT
   Merged from work-qween.html and work-price-genie.html.
   All 103 Price Genie selectors already existed in QWEEN and the
   article body was byte-identical; only .cs-hero* differed, so the
   hero's per-project values are exposed as custom properties.
   ============================================================ */

:root { --fade-y: 20px; }

/* ---------- HERO ---------- */
.cs-hero {
  width: 100%; height: 100vh; min-height: 660px;
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end;
}
.cs-hero-bg { position: absolute; inset: 0; background: var(--cs-hero-bg, var(--ink)); }
.cs-hero-bg::before {
  content: ''; position: absolute; inset: 0;
  background: var(--cs-hero-tint, radial-gradient(120% 90% at 78% 18%, rgba(122,138,235,0.18) 0%, rgba(11,11,12,0) 62%));
}
.cs-hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: var(--cs-hero-overlay, linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 58%));
}
.cs-hero-content { position: relative; z-index: 1; padding: 0 var(--gutter) var(--gutter); max-width: 1040px; }
.cs-hero-tag {
  font-size: var(--fs-kicker); font-weight: 300; letter-spacing: var(--ls-kicker);
  text-transform: uppercase; color: rgba(255, 255, 255, 0.55); margin-bottom: 22px;
}
.cs-hero-title {
  font-family: 'Instrument Serif', serif; font-style: italic; font-size: var(--fs-hero); color: var(--white);
  line-height: 1.1; letter-spacing: 0.02em; margin-bottom: 26px;
}
.cs-hero-subtitle {
  font-size: var(--fs-body); font-weight: 300; color: rgba(255, 255, 255, 0.78);
  line-height: 1.65; max-width: 600px;
}
.cs-hero-meta {
  display: flex; flex-wrap: wrap; gap: 48px; margin-top: 48px; padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.cs-hero-meta div h4 {
  font-size: 10px; font-weight: 300; letter-spacing: 0.28em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45); margin-bottom: 8px;
}
.cs-hero-meta div p { font-size: 14px; font-weight: 300; color: rgba(255, 255, 255, 0.82); line-height: 1.5; }
.cs-hero-scroll {
  position: absolute; right: var(--gutter); bottom: 76px; z-index: 2;
  font-size: 10px; font-weight: 300; letter-spacing: 0.28em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4); writing-mode: vertical-rl;
}

/* ---------- ARTICLE ---------- */
.cs-article { max-width: var(--w-read); margin: 0 auto; padding: var(--space-block) 40px 0; }
.cs-section { margin-bottom: var(--space-block); }
.cs-kicker {
  font-size: var(--fs-kicker); font-weight: 300; letter-spacing: var(--ls-kicker);
  text-transform: uppercase; color: var(--muted); margin-bottom: 16px;
}
.cs-section h2 { font-family: 'Instrument Serif', serif; font-style: italic; font-size: var(--fs-h2); font-weight: 400; color: var(--dark); letter-spacing: 0.02em; line-height: 1.25; margin-bottom: 24px; }
.cs-section h3 { font-size: var(--fs-h3); font-weight: 500; color: var(--dark); line-height: 1.35; margin: 40px 0 14px; }
.cs-section p { font-size: var(--fs-body); font-weight: 300; color: #2a2a2a; line-height: 1.75; margin-bottom: 18px; }
.cs-section p:last-child { margin-bottom: 0; }
.cs-section ul { margin: 0 0 18px 18px; }
.cs-section li { font-size: var(--fs-body); font-weight: 300; color: #2a2a2a; line-height: 1.75; margin-bottom: 6px; }

.cs-pullquote {
  border-left: 2px solid var(--brand-blue); padding: 4px 0 4px 28px; margin: 48px 0;
  font-size: 22px; font-weight: 300; color: var(--dark); line-height: 1.5; font-style: italic;
}
.cs-statement {
  font-family: 'Instrument Serif', serif; font-style: italic; font-size: 34px; line-height: 1.35; letter-spacing: 0.01em;
  color: var(--dark); margin: 56px 0; text-align: center;
}

/* ---------- MEDIA ---------- */
.cs-img { margin: 44px 0; }
.cs-img-frame {
  width: 100%; border: 1px dashed rgba(28, 28, 28, 0.3); background: rgba(28, 28, 28, 0.03);
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px;
}
.cs-img-frame.xtall { min-height: 660px; }
.cs-img-frame.tall { min-height: 520px; }
.cs-img-frame.med { min-height: 380px; }
.cs-img-frame.short { min-height: 260px; }
.cs-img-frame span {
  font-size: 12px; font-weight: 300; letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(28, 28, 28, 0.4); line-height: 1.8; max-width: 480px;
}
/* Real screenshots drop straight into .cs-img-frame and replace the dashed box. */
.cs-img-frame:has(> img) { border: 0; padding: 0; background: none; min-height: 0; }
.cs-img-frame img { width: 100%; height: auto; display: block; }
.cs-img-caption { margin-top: 12px; font-size: var(--fs-meta); font-weight: 300; color: var(--muted); line-height: 1.5; }
.cs-img-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 44px 0; }
.cs-img-grid .cs-img { margin: 0; }
.cs-img-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 44px 0; }
.cs-img-grid-3 .cs-img { margin: 0; }

/* ---------- FLOW ---------- */
.cs-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 40px 0; }
.cs-flow-step {
  border: 1px solid rgba(28, 28, 28, 0.25); padding: 12px 18px;
  font-size: 12px; font-weight: 300; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--dark); white-space: nowrap; background: rgba(255, 255, 255, 0.4);
}
.cs-flow-step.hl { background: var(--brand-blue); color: var(--white); border-color: var(--brand-blue); }
.cs-flow-arrow { font-size: 14px; color: var(--muted); font-weight: 300; }
.cs-flow-vertical { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 40px 0; }
.cs-flow-vertical .cs-flow-arrow { padding-left: 22px; }

/* ---------- CARDS ---------- */
.cs-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 40px 0; }
.cs-card { border: 1px solid var(--line); padding: 26px; background: rgba(255, 255, 255, 0.35); }
.cs-card h4 {
  font-size: 12px; font-weight: 400; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--dark); margin-bottom: 12px;
}
.cs-card p { font-size: var(--fs-small) !important; line-height: 1.65 !important; margin-bottom: 0 !important; color: #3a3a3a !important; }
.cs-cards-1 { grid-template-columns: 1fr; }
.cs-cards-3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- INSIGHTS ---------- */
.cs-insight { border-top: 1px solid var(--line); padding: 32px 0; display: flex; gap: 32px; align-items: flex-start; }
.cs-insight:last-child { border-bottom: 1px solid var(--line); }
.cs-insight-num {
  font-family: 'Instrument Serif', serif; font-style: italic; font-size: 28px; color: rgba(28, 28, 28, 0.25);
  line-height: 1; flex: 0 0 56px; padding-top: 4px;
}
.cs-insight-body h4 { font-size: 19px; font-weight: 500; color: var(--dark); margin-bottom: 10px; line-height: 1.4; }
.cs-insight-body p { font-size: 15.5px !important; line-height: 1.7 !important; margin-bottom: 0 !important; }

/* ---------- SCORECARD ---------- */
.cs-scorecard { border: 1px solid var(--line); margin: 40px 0; }
.cs-scorecard-row { display: grid; grid-template-columns: 160px 1fr; border-bottom: 1px solid var(--line); }
.cs-scorecard-row:last-child { border-bottom: none; }
.cs-scorecard-dim {
  padding: 22px 24px; font-size: var(--fs-kicker); font-weight: 400; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--muted); border-right: 1px solid var(--line);
  display: flex; align-items: center;
}
.cs-scorecard-metrics { padding: 22px 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.cs-scorecard-metrics span,
.tech-tag {
  border: 1px solid rgba(28, 28, 28, 0.2); padding: 7px 14px;
  font-size: 12.5px; font-weight: 300; color: var(--dark);
}

/* ---------- OPTIONS ---------- */
.cs-option { border: 1px solid var(--line); margin-bottom: 20px; background: rgba(255, 255, 255, 0.35); }
.cs-option-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 26px; border-bottom: 1px solid var(--line);
}
.cs-option-head h4 { font-size: 16px; font-weight: 500; color: var(--dark); }
.cs-option-tag {
  font-size: 10px; font-weight: 400; letter-spacing: 0.24em; text-transform: uppercase;
  padding: 6px 12px; border: 1px solid rgba(28, 28, 28, 0.35); color: var(--muted); white-space: nowrap;
}
.cs-option-tag.win { border-color: var(--brand-blue); background: var(--brand-blue); color: var(--white); }
.cs-option-body { padding: 20px 26px; }
.cs-option-body p { font-size: var(--fs-small) !important; line-height: 1.7 !important; margin-bottom: 10px !important; color: #3a3a3a !important; }
.cs-option-body p:last-child { margin-bottom: 0 !important; }

/* ---------- CHAPTER + DECISIONS ---------- */
.cs-chapter { border-top: 1px solid var(--line); padding-top: 56px; margin-top: 56px; }
.cs-chapter-num {
  font-size: var(--fs-kicker); font-weight: 300; letter-spacing: var(--ls-kicker);
  text-transform: uppercase; color: var(--muted); margin-bottom: 12px;
}
.cs-chapter h3 { margin-top: 0; font-size: 24px; }
.cs-decision-grid { display: grid; grid-template-columns: 110px 1fr; gap: 0; border: 1px solid var(--line); margin: 28px 0; }
.cs-decision-grid > div { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.cs-decision-grid > div:nth-last-child(-n+2) { border-bottom: none; }
.cs-decision-label {
  font-size: 10px; font-weight: 400; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); border-right: 1px solid var(--line);
  display: flex; align-items: flex-start; padding-top: 19px !important;
}
.cs-decision-text { font-size: var(--fs-small); font-weight: 300; line-height: 1.65; color: #3a3a3a; }

/* ---------- METRICS ---------- */
.cs-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 40px 0; }
.cs-metric { border: 1px solid var(--line); padding: 28px 26px; background: rgba(255, 255, 255, 0.35); }
.cs-metric-value { font-family: 'Instrument Serif', serif; font-style: italic; font-size: 40px; color: var(--dark); line-height: 1; margin-bottom: 10px; }
.cs-metric-label {
  font-size: 12px; font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--dark); margin-bottom: 10px;
}
.cs-metric p { font-size: 13.5px !important; line-height: 1.6 !important; color: var(--muted) !important; margin-bottom: 0 !important; }

/* ---------- CONCEPT BADGE ---------- */
.cs-concept-flag {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--brand-blue); color: var(--brand-blue);
  font-size: 10px; font-weight: 400; letter-spacing: 0.26em; text-transform: uppercase;
  padding: 9px 16px; margin-bottom: 22px;
}
.cs-concept-flag::before { content: ''; width: 5px; height: 5px; background: var(--brand-blue); border-radius: 50%; }
.cs-concept-note { border: 1px solid rgba(30, 42, 158, 0.35); background: rgba(30, 42, 158, 0.05); padding: 20px 24px; margin: 32px 0; }
.cs-concept-note p { font-size: 14px !important; line-height: 1.7 !important; color: rgba(255, 255, 255, 0.7) !important; margin-bottom: 0 !important; }

/* ---------- DESIGN NOTES (toggleable) ---------- */
.cs-note { border: 1px solid var(--line); margin: 36px 0; background: rgba(255, 255, 255, 0.25); }
body:not(.notes-on) .cs-note { display: none; }
.cs-note summary {
  list-style: none; cursor: pointer; padding: 14px 20px;
  font-size: 10px; font-weight: 400; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--muted); user-select: none;
}
.cs-note summary::-webkit-details-marker { display: none; }
.cs-note summary::after { content: '+'; float: right; font-size: 13px; line-height: 1; }
.cs-note[open] summary::after { content: '\2212'; }
.cs-note-body { padding: 0 20px 6px; }
.cs-note-row { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 13px 0; border-top: 1px solid var(--line); }
.cs-note-row-label { font-size: 9.5px; font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(28, 28, 28, 0.45); padding-top: 2px; }
.cs-note-row-text { font-size: 13.5px; font-weight: 300; line-height: 1.65; color: #4a4a4a; }
.notes-toggle {
  position: fixed; right: var(--gutter-sm); bottom: var(--gutter-sm); z-index: 120;
  font-family: 'Hanken Grotesk', sans-serif; font-size: 10px; font-weight: 400;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--cream); background: var(--ink); border: 1px solid var(--ink);
  padding: 12px 18px; cursor: pointer; transition: opacity var(--dur-hover);
}
.notes-toggle:hover { opacity: 0.82; }
body.notes-on .notes-toggle { background: var(--brand-blue); border-color: var(--brand-blue); color: var(--white); }

/* ---------- CHAPTER INDEX ---------- */
.cs-index { border-top: 1px solid rgba(255, 255, 255, 0.16); border-bottom: 1px solid rgba(255, 255, 255, 0.16); margin: 44px 0; }
.cs-index a {
  display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08); text-decoration: none; transition: opacity var(--dur-hover);
}
.cs-index a:last-child { border-bottom: none; }
.cs-index a:hover { opacity: 0.6; }
.cs-index-num { font-size: var(--fs-kicker); font-weight: 300; letter-spacing: 0.2em; color: var(--brand-blue-soft); }
.cs-index-label { font-size: var(--fs-small); font-weight: 300; color: rgba(255, 255, 255, 0.82); }

/* ---------- TOKEN STRIP ---------- */
.cs-tokens { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); margin: 40px 0; }
.cs-token { padding: 22px 18px; border-right: 1px solid var(--line); }
.cs-token:last-child { border-right: none; }
.cs-token-swatch { height: 52px; margin-bottom: 14px; border: 1px solid rgba(28, 28, 28, 0.1); }
.cs-token-name { font-size: 10px; font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.cs-token-val { font-size: 12.5px; font-weight: 300; color: #3a3a3a; }

/* ---------- APPENDIX ---------- */
.cs-appendix-row { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.cs-appendix-row:last-child { border-bottom: 1px solid var(--line); }
.cs-appendix-label { font-size: 10px; font-weight: 400; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.cs-appendix-text { font-size: var(--fs-small); font-weight: 300; line-height: 1.7; color: #3a3a3a; }

/* ---------- CTA ---------- */
.cs-cta-wrap {
  margin-top: 90px; padding-top: 48px; border-top: 1px solid rgba(28, 28, 28, 0.1);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px;
}
.cs-cta {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--fs-meta); font-weight: 300; letter-spacing: var(--ls-btn); text-transform: uppercase;
  color: var(--white); background: var(--brand-blue); padding: 14px 28px;
  text-decoration: none; transition: background var(--dur-hover);
}
.cs-cta:hover { background: var(--brand-blue-hover); }
.cs-cta-note { font-size: var(--fs-meta); font-weight: 300; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- FULL-BLEED DARK BAND ---------- */
.cs-bleed {
  position: relative; left: 50%; right: 50%;
  margin-left: -50vw; margin-right: -50vw; width: 100vw;
  background: var(--ink);
  padding: var(--space-block) 0;
  margin-top: var(--space-block); margin-bottom: var(--space-block);
}
.cs-bleed-inner { max-width: var(--w-read); margin: 0 auto; padding: 0 40px; }
.cs-bleed .cs-kicker { color: rgba(255, 255, 255, 0.42); }
.cs-bleed h2, .cs-bleed h3, .cs-bleed .cs-statement { color: var(--white); }
.cs-bleed p, .cs-bleed li { color: rgba(255, 255, 255, 0.72); }
.cs-bleed .cs-img-frame { border-color: rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.03); }
.cs-bleed .cs-img-frame span { color: rgba(255, 255, 255, 0.38); }
.cs-bleed .cs-img-caption { color: rgba(255, 255, 255, 0.45); }
.cs-bleed .cs-pullquote { border-left-color: var(--brand-blue-soft); color: rgba(255, 255, 255, 0.9); }
.cs-bleed .cs-card { border-color: rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.03); }
.cs-bleed .cs-card h4 { color: var(--white); }
.cs-bleed .cs-card p { color: rgba(255, 255, 255, 0.66) !important; }
.cs-bleed .cs-decision-grid { border-color: rgba(255, 255, 255, 0.16); }
.cs-bleed .cs-decision-grid > div { border-bottom-color: rgba(255, 255, 255, 0.16); }
.cs-bleed .cs-decision-label { color: rgba(255, 255, 255, 0.45); border-right-color: rgba(255, 255, 255, 0.16); }
.cs-bleed .cs-decision-text { color: rgba(255, 255, 255, 0.72); }
.cs-bleed .cs-chapter { border-top-color: rgba(255, 255, 255, 0.16); }
.cs-bleed .cs-chapter-num { color: var(--brand-blue-soft); }
.cs-bleed .cs-note { border-color: rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.02); }
.cs-bleed .cs-note summary { color: rgba(255, 255, 255, 0.5); }
.cs-bleed .cs-note-row-label { color: rgba(255, 255, 255, 0.4); }
.cs-bleed .cs-note-row-text { color: rgba(255, 255, 255, 0.62); }
.cs-bleed .cs-note-row { border-top-color: rgba(255, 255, 255, 0.1); }
.cs-bleed .cs-insight { border-top-color: rgba(255, 255, 255, 0.16); }
.cs-bleed .cs-insight:last-child { border-bottom-color: rgba(255, 255, 255, 0.16); }
.cs-bleed .cs-insight-num { color: rgba(255, 255, 255, 0.28); }
.cs-bleed .cs-insight-body h4 { color: var(--white); }
.cs-bleed .cs-flow-step { border-color: rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.04); color: rgba(255, 255, 255, 0.85); }
.cs-bleed .cs-flow-step.hl { background: var(--brand-blue-soft); border-color: var(--brand-blue-soft); color: var(--ink); }
.cs-bleed .cs-flow-arrow { color: rgba(255, 255, 255, 0.4); }
.cs-bleed .cs-scorecard { border-color: rgba(255, 255, 255, 0.16); }
.cs-bleed .cs-scorecard-row { border-bottom-color: rgba(255, 255, 255, 0.16); }
.cs-bleed .cs-scorecard-dim { color: rgba(255, 255, 255, 0.45); border-right-color: rgba(255, 255, 255, 0.16); }
.cs-bleed .cs-scorecard-metrics span { border-color: rgba(255, 255, 255, 0.2); color: rgba(255, 255, 255, 0.8); }
.cs-bleed .cs-tokens { border-color: rgba(255, 255, 255, 0.16); }
.cs-bleed .cs-token { border-right-color: rgba(255, 255, 255, 0.16); }
.cs-bleed .cs-token-name { color: rgba(255, 255, 255, 0.4); }
.cs-bleed .cs-token-val { color: rgba(255, 255, 255, 0.7); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 760px) {
  .cs-hero-content { padding: 0 var(--gutter-sm) 48px; }
  .cs-hero-title { font-size: 38px; }
  .cs-hero-meta { gap: 28px; }
  .cs-hero-scroll { display: none; }
  .cs-article { padding: 80px var(--gutter-sm) 0; }
  .cs-bleed { padding: 72px 0; }
  .cs-bleed-inner { padding: 0 var(--gutter-sm); }
  .cs-statement { font-size: 24px; }
  .cs-cards, .cs-img-grid, .cs-metrics, .cs-cards-3, .cs-img-grid-3 { grid-template-columns: 1fr; }
  .cs-tokens { grid-template-columns: 1fr 1fr; }
  .cs-token { border-bottom: 1px solid var(--line); }
  .cs-scorecard-row { grid-template-columns: 1fr; }
  .cs-scorecard-dim { border-right: none; border-bottom: 1px solid var(--line); }
  .cs-decision-grid { grid-template-columns: 1fr; }
  .cs-decision-label { border-right: none; padding-bottom: 0 !important; }
  .cs-decision-grid > div { border-bottom: none; }
  .cs-decision-grid > div.cs-decision-text { border-bottom: 1px solid var(--line); }
  .cs-decision-grid > div.cs-decision-text:last-child { border-bottom: none; }
  .cs-note-row, .cs-appendix-row { grid-template-columns: 1fr; gap: 6px; }
  .notes-toggle { right: 16px; bottom: 16px; padding: 10px 14px; }
}
