/* experience-reader.css — dark coastal/amber theme, additive to reader.css & case-player.css */
body { background: #08181b; color: #d8e0db; }

/* Masthead */
.reader-mast { border-bottom-color: rgba(242,233,216,.14); background: #0a1f24; }
.reader-mast > div { min-height: 62px; }
.wordmark { color: #f2e9d8; }
.wordmark span { color: #9db2ae; }
.reader-mast a { color: #d8e0db; }
.reader-mast a:hover { color: #efb066; text-decoration-color: #efb066; }
.reader-mast nav a { color: #9db2ae; }

/* Case wrapper */
.case-wrap { color: #d8e0db; }
.case-title { padding: 26px 0 20px; border-bottom: 1px solid rgba(242,233,216,.1); }
.case-title a { color: #efb066; }
.case-title a:hover { color: #f2b96e; }
.case-title h1 { color: #f2e9d8; }

/* Layout */
.case-layout { gap: clamp(18px,3vw,40px); }

/* Concept menu */
.concept-menu { border-top-color: rgba(242,233,216,.14); }
.concept-menu a {
  color: #9db2ae; border: 1px solid transparent; background: transparent;
  transition: background .18s, color .18s, border-color .18s;
}
.concept-menu a:hover:not([aria-current]) {
  background: rgba(239,176,102,.08); color: #f2e9d8; border-color: rgba(239,176,102,.22);
}
.concept-menu a[aria-current="true"] {
  color: #18100a; background: #efb066; border-color: #efb066;
}

/* Case panel */
.case-panel { color: #d8e0db; }
.case-panel h2 { color: #f2e9d8; }

/* Storyboard */
.storyboard {
  border-color: rgba(242,233,216,.14); background: #0e272d;
  box-shadow: 0 6px 22px rgba(0,0,0,.35);
}
.storyboard h3 {
  color: #f2e9d8; border-bottom-color: rgba(242,233,216,.1);
  background: rgba(239,176,102,.06);
}
.storyboard h3::before { color: #efb066; border-right-color: rgba(242,233,216,.18); }

/* Drawing — KEEP PALE background and original dark SVG text */
.case-frame .drawing {
  background-color: #f5f6fc;
  background-image: radial-gradient(#cfd4e5 .8px, transparent .8px);
  background-size: 12px 12px;
}

/* Figcaption */
.case-frame figcaption strong { color: #f2e9d8; }
.case-frame figcaption p { color: #d8e0db; }
.case-frame figcaption .progress { color: #9db2ae; }
.case-frame figcaption .baseline { color: #d8e0db; }
.touch-note { color: #9db2ae; }

/* Step bar */
.step-bar { border-top: 1px solid rgba(242,233,216,.1); }
.step-marks label {
  color: #9db2ae; border-color: rgba(242,233,216,.14); background: transparent;
  transition: border-color .18s, color .18s, background .18s;
}
.step-marks label:hover {
  color: #f2e9d8; border-color: rgba(239,176,102,.3); background: rgba(239,176,102,.06);
}
.case-sequence:has(.frame-choice:nth-of-type(1):checked) .step-marks label:nth-child(1),
.case-sequence:has(.frame-choice:nth-of-type(2):checked) .step-marks label:nth-child(2),
.case-sequence:has(.frame-choice:nth-of-type(3):checked) .step-marks label:nth-child(3),
.case-sequence:has(.frame-choice:nth-of-type(4):checked) .step-marks label:nth-child(4) {
  background: rgba(239,176,102,.12); border-color: rgba(239,176,102,.4); color: #efb066;
}
.step-arrows button {
  background: transparent; border-color: rgba(242,233,216,.14); color: #d8e0db;
}
.step-arrows button:hover { border-color: rgba(239,176,102,.3); color: #f2e9d8; }
.step-arrows button:last-child {
  background: #efb066; color: #18100a; border-color: #efb066;
}
.step-arrows button:last-child:hover { background: #f2b96e; border-color: #f2b96e; }
.step-arrows button:disabled { opacity: .42; }

/* Condition toggle */
.condition {
  background: rgba(239,176,102,.08); color: #f2e9d8;
  border: 1px solid rgba(239,176,102,.2);
}
.condition input { accent-color: #efb066; }

/* Reference / deep reading */
.case-panel .reference { border-bottom-color: rgba(242,233,216,.12); background: none; }
.reference > summary { color: #9db2ae; transition: color .18s; }
.reference > summary:hover { color: #efb066; }
.reference .lesson-b {
  background: #0e272d; border: 1px solid rgba(242,233,216,.1);
  border-radius: 10px; color: #d8e0db;
}
.reference .lesson-b p, .reference .lesson-b li, .reference .lesson-b dd { color: #d8e0db; }
.reference .lesson-b .lead, .reference .lesson-b h4, .reference .lesson-b strong { color: #f2e9d8; }
.reference .lesson-b dt { color: #efb066; font-weight: 650; }
.reference .lesson-b code {
  color: #efb066; background: rgba(239,176,102,.1); padding: 1px 5px;
  border-radius: 4px; font-size: .92em;
}
.reference .lesson-b pre {
  background: rgba(0,0,0,.3); color: #d8e0db; padding: 14px 16px;
  border-radius: 8px; overflow-x: auto; border: 1px solid rgba(242,233,216,.08);
}
.reference .lesson-b pre code { color: inherit; background: none; padding: 0; }

/* Next topic link */
.case-wrap .next-topic { color: #efb066; }
.case-wrap .next-topic:hover { color: #f2b96e; }

/* Footer */
.reader-foot { border-top-color: rgba(242,233,216,.14); }
.reader-foot a { color: #9db2ae; }
.reader-foot a:hover { color: #efb066; }

/* Focus visibility */
.frame-choice:focus-visible + .case-frame .drawing { outline-color: #7fd4c8; }

/* Responsive */
@media (max-width: 740px) {
  .concept-menu a { border-color: rgba(242,233,216,.14); }
}

.case-wrap { width: min(1120px, calc(100% - 40px)); }
.case-layout { grid-template-columns: 220px minmax(0, 1fr); }
.drawing svg { max-height: 275px; }
.touch-note { color: #4d6274; }
@media (max-width: 740px) {
  .case-wrap { width: calc(100% - 28px); }
  .case-layout { display: block; }
}
