:root {
  --srch-accent: #1f7a66;
  --srch-accent-hover: #155a4c;
  --srch-accent-soft: #d8f0e8;
  --case-accent: var(--srch-accent);
  --case-accent-hover: var(--srch-accent-hover);
  --case-accent-soft: var(--srch-accent-soft);
}

/* ========================================
   HERO
   ======================================== */

#srch-hero {
  width: 100%;
  padding: 28px 5% 32px;
  box-sizing: border-box;
  background: linear-gradient(135deg, #ffffff 0%, var(--srch-accent-soft) 100%);
  margin-bottom: 40px;
}

#srch-hero-meta {
  max-width: 1200px;
  margin: 0 auto 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
}

.hero-meta-item h4 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--srch-accent);
  margin: 0 0 4px;
}

.hero-meta-item p {
  margin: 0;
  font-size: 14px;
  color: #4a4a4a;
}

#srch-hero-vid {
  display: block;
  width: 100%;
  max-width: 1200px;
  height: 350px;
  max-height: 350px;
  object-fit: cover;
  object-position: top;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  margin: 0 auto;
  background: #f0f0f0;
}

@media screen and (max-width: 768px) {
  #srch-hero {
    padding: 20px 4% 24px;
    margin-bottom: 32px;
  }

  #srch-hero-meta {
    flex-direction: column;
    gap: 12px;
  }

  #srch-hero-vid {
    height: 220px;
    max-height: 220px;
  }
}

.link:hover {
  color: var(--srch-accent);
  text-decoration: underline;
}

.section-lede {
  margin: 0 0 12px;
  max-width: 42em;
  font-family: "Instrument-sans-reg", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: #404040;
}

.section-intro {
  margin: 0 0 20px;
  max-width: 42em;
  font-family: "Instrument-sans-reg", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: #505050;
}

.decision-section {
  margin-top: 72px;
  padding-top: 40px;
  border-top: 1px solid #e8e8e8;
}

.decision-section:first-of-type {
  margin-top: 40px;
  padding-top: 0;
  border-top: none;
}

/* Match .section h3 / My Role — uppercase Instrument Sans */
#design-decisions .decision-section-title,
.decision-section-title {
  margin: 0 0 12px;
  font-size: 22px;
  font-family: "Instrument-sans-reg", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: normal;
  color: #565656;
  text-transform: uppercase;
}

.section > .decision {
  margin-bottom: 0;
}

/* ========================================
   DECISION → WHY → EVIDENCE
   No card chrome — hierarchy via type + spacing
   ======================================== */

.decision {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 0;
  box-shadow: none;
}

.decision-head {
  margin-bottom: 24px;
  padding-bottom: 0;
  border-bottom: none;
}

.decision-kicker,
.why-kicker {
  display: block;
  font-family: "Instrument-sans-reg", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--srch-accent);
  margin: 0 0 12px;
}

.evidence-kicker {
  display: block;
  font-family: "Instrument-sans-reg", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
  color: #2c2c2c;
  margin: 0 0 12px;
}

/* Decision card titles — bold sentence-case sans with leading asterisk
   (.section h3 would otherwise force uppercase) */
.section h3.decision-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  font-size: 20px;
  font-family: "Instrument-sans-reg", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 700;
  line-height: 1.35;
  color: #2c2c2c;
  text-transform: none;
  letter-spacing: normal;
}

.section h3.decision-title::before {
  content: "*";
  flex-shrink: 0;
  font-size: 1.45em;
  font-weight: 700;
  line-height: 1;
  color: var(--srch-accent);
  margin-top: 0.08em;
}

.decision-why {
  margin: 20px 0 0;
  padding: 0 0 0 16px;
  border-left: 3px solid var(--srch-accent);
  background: transparent;
  border-radius: 0;
}

.decision-why:first-child,
.decision-head + .decision-why {
  margin-top: 0;
  margin-bottom: 24px;
}

.decision-why p {
  margin: 0;
  font-family: "Instrument-sans-reg", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: #404040;
}

.fill-in {
  display: inline;
  color: var(--srch-accent);
  background: #fff3a8;
  padding: 0 4px;
  border-radius: 3px;
  font-style: italic;
}

.decision-evidence {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.decision-evidence > .evidence-kicker:not(:first-child) {
  margin-top: 40px;
}

.decision-evidence > .strategy-list {
  margin-bottom: 0;
}

.decision-evidence > .decision-followup {
  margin: 0 0 12px;
}

.decision-evidence > .decision-why {
  margin-top: 20px;
  margin-bottom: 0;
}

.decision-evidence > .media-row,
.decision-evidence > .media-block,
.decision-evidence > .wcag-row,
.decision-evidence > .option-grid,
.decision-evidence > .diagram-gallery {
  margin-top: 16px;
  margin-bottom: 0;
}

.strategy-list {
  margin: 0 0 20px;
  padding-left: 1.25rem;
}

.strategy-list li {
  margin-bottom: 12px;
  font-family: "Instrument-sans-reg", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #404040;
}

.strategy-list li:last-child {
  margin-bottom: 0;
}

.strategy-list strong {
  color: #2c2c2c;
  font-weight: 600;
}

.decision-followup {
  margin: 0 0 8px;
  font-family: "Instrument-sans-reg", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: #404040;
}

.decision a.link {
  color: var(--srch-accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.decision a.link:hover {
  color: var(--srch-accent-hover);
}

/* Before / after comparisons */
.comparison-group {
  margin-top: 28px;
  padding: 22px 0 8px;
  border-top: 1px solid #dce8e4;
}

.comparison-group:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.comparison-title {
  margin: 0 0 6px;
  font-family: "Instrument-sans-reg", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  color: #2c2c2c;
}

.comparison-source {
  font-size: 14px;
  font-weight: 400;
  color: #7a7a7a;
}

.comparison-desc {
  margin: 0 0 16px;
  font-family: "Instrument-sans-reg", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: #555;
}

.comparison-media {
  margin: 0;
}

.comparison-group .media-block {
  margin: 0;
}

.ba-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.ba-panel {
  margin: 0;
  min-width: 0;
}

.ba-panel figcaption {
  margin-bottom: 10px;
}

.ba-panel img,
.ba-vid {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  background: #fff;
}

.ba-panel img {
  cursor: zoom-in;
}

.ba-vid {
  cursor: default;
}

.ba-pair-narrow {
  max-width: 560px;
  margin: 0 auto;
}

.ba-pair-crop .ba-panel img {
  aspect-ratio: 1 / 2;
  height: auto;
  object-fit: cover;
  object-position: top center;
}

.ba-pair-video .ba-vid {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
}

@media screen and (max-width: 768px) {
  .ba-pair {
    grid-template-columns: 1fr;
  }

  .ba-pair-narrow {
    max-width: none;
  }

  #design-decisions .decision-section-title,
  .decision-section-title {
    font-size: 20px;
  }

  .decision {
    padding: 0;
  }
}

.visual-needed-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 12px;
}

.visual-needed {
  border: 1px dashed #cfcfcf;
  background: #fafafa;
  border-radius: 12px;
  padding: 16px 18px;
}

.visual-needed strong {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--srch-accent);
}

.visual-needed p {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.45;
  color: #4a4a4a;
}

.visual-needed span {
  font-size: 13px;
  color: #7a7a7a;
  font-family: "Instrument-sans-reg", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

@media screen and (max-width: 768px) {
  .visual-needed-grid {
    grid-template-columns: 1fr;
  }
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 4px;
}

.option-card {
  margin: 0;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.option-card--chosen {
  border: 1.5px solid var(--srch-accent);
  box-shadow: 0 4px 16px rgba(31, 122, 102, 0.12);
}

.option-card figcaption {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-family: "Instrument-sans-reg", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 13px;
  color: #6b7280;
}

.option-tag {
  display: inline-block;
  font-family: "Instrument-sans-reg", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #666;
  background: #f0f0f0;
  padding: 3px 8px;
  border-radius: 4px;
}

.option-tag--chosen {
  color: #fff;
  background: var(--srch-accent);
}

/* WCAG checks: no card chrome; shared portrait ratio near originals (~577×920) */
.wcag-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 12px 0 0;
  align-items: start;
}

.wcag-item {
  margin: 0;
  min-width: 0;
}

.wcag-item img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 8;
  height: auto;
  object-fit: cover;
  object-position: top center;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.wcag-item figcaption {
  margin-top: 10px;
  text-align: center;
  font-family: "Instrument-sans-reg", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 13px;
  color: #7a7a7a;
}

/* Diagrams: compact 2-col grid */
.diagram-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 12px;
}

.diagram-card {
  margin: 0;
}

.diagram-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  cursor: zoom-in;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.diagram-frame:hover,
.diagram-frame:focus-visible {
  border-color: var(--srch-accent);
  box-shadow: 0 0 0 2px rgba(31, 122, 102, 0.18);
  outline: none;
}

.diagram-frame img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 220px;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}

.diagram-card figcaption {
  margin-top: 10px;
  text-align: center;
  font-family: "Instrument-sans-reg", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  color: #7a7a7a;
}

.asset-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px 24px;
  box-sizing: border-box;
  background: rgba(20, 20, 20, 0.92);
}

.asset-lightbox[hidden] {
  display: none;
}

.asset-lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.asset-lightbox-close:hover,
.asset-lightbox-close:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  outline: none;
}

.asset-lightbox-img {
  display: block;
  max-width: min(960px, 92vw);
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.asset-lightbox-caption {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  text-align: center;
}

#takeaway-list {
  margin-top: 8px;
}

#takeaway-list li {
  margin-bottom: 12px;
  line-height: 1.6;
  color: #404040;
}

.handoff-note {
  margin-top: 32px;
  max-width: 42em;
  font-size: 16px;
  line-height: 1.65;
  color: #505050;
}

@media screen and (max-width: 900px) {
  .option-grid {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 768px) {
  .decision {
    padding: 0;
  }

  .section h3.decision-title {
    font-size: 18px;
  }

  .decision-section {
    margin-top: 56px;
    padding-top: 32px;
  }

  .wcag-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .diagram-gallery {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .diagram-frame {
    padding: 10px;
  }

  .diagram-frame img {
    max-height: 180px;
  }
}
