/* The shared decision story uses the host shell’s typography, palette and theme. */
.case-page {
  max-width: 82rem;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 56px);
  font: 400 16px/1.55 var(--f);
  color: var(--ink);
}
.case-page *, .case-page *::before, .case-page *::after { box-sizing: border-box }
.case-page :where(h1,h2,h3,h4,p,dl,dd,ol,ul) { margin: 0 }
.case-page :where(h1,h2,h3,h4) { text-wrap: balance }
.case-page :where(a,summary,button,pre):focus-visible { outline: 2px solid var(--c-cobalt); outline-offset: 3px }
.case-page a { color: var(--c-cobalt); text-underline-offset: .2em }
.case-page [id] { scroll-margin-top: 6rem }
.case-spread, .case-close, .case-build {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(36px, 7vw, 100px);
}
.case-spread { padding-block: clamp(28px, 5vw, 72px) }
.case-opening { align-self: start; max-width: 35rem }
.case-meta { font: 500 12px/1.5 var(--fm) }
.case-meta { color: var(--mu) }
.case-intro { margin-top: 24px; font-size: 1.3rem; line-height: 1.43; max-width: 35ch }
.case-page .case-action { display: inline-flex; align-items: center; min-height: 44px; margin-top: 24px; padding: 10px 18px; color: var(--onbtn); background: var(--btn); text-decoration: none; font-weight: 550 }
.case-page .case-action:hover { text-decoration: underline }
.research-card { margin-top: 20px; border: 1px solid var(--ink); background: var(--raise) }
.research-card-mast { background: var(--btn); color: var(--onbtn); padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font: 400 12px/1.4 var(--fm); border-bottom: 3px solid transparent; border-image: var(--spectrum) 1 }
.card-brand { display: inline-flex; align-items: center; gap: 8px; font: 600 12px/1.25 var(--f); text-transform: uppercase; letter-spacing: .1em }
.card-brand .em-brand-mark { width: 24px; color: inherit }
.research-card-body { padding: 16px clamp(14px,2vw,24px) 20px }
.card-meta { display: flex; gap: 4px 8px; justify-content: space-between; flex-wrap: wrap }
.research-card h3, .case-close h2, .case-build h2 { font: 600 30px/1.14 var(--f); letter-spacing: -.035em }
.research-card h3 { font-size: 23px; margin-top: 6px }
.research-finding { margin-top: 18px }
.research-finding h4 { font: 600 16px/1.4 var(--f); margin-bottom: 4px }
.case-assessment { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--ru) }
.case-disclosure > summary { min-height: 44px; cursor: pointer; padding-block: 11px; font-size: 14px; font-weight: 550; color: var(--ink) }
.case-disclosure > summary:hover, .case-page a:hover { text-decoration: underline; text-underline-offset: .2em }
.case-sources { padding-left: 20px }
.case-sources li { margin: 4px 0 16px }
.case-sources li + li { padding-top: 12px; border-top: 1px solid var(--ru) }
.case-sources p { margin-top: 6px }
.source-credit { color: var(--mu); font: 400 12px/1.5 var(--fm) }
.trail-step > summary { position: relative; list-style: none; padding: 16px 48px 16px clamp(16px,3vw,32px) }
.trail-step > summary::-webkit-details-marker { display: none }
.case-build, .case-close { padding-block: clamp(28px,5vw,60px); border-top: 1px solid var(--ink) }
.case-build h2, .case-close h2 { font-size: clamp(30px, 3.8vw, 51px) }
.case-build-intro { max-width: 36ch; margin-top: 16px }
.trail-step { border-bottom: 1px solid var(--ru) }
.trail-step > summary { padding-left: 0 }
.trail-step > summary span { display: block }
.trail-step > summary .trail-heading { margin-top: 2px; font: 550 18px/1.4 var(--f) }
.trail-body { padding: 0 24px 16px 0 }
.trail-body .case-links { margin-top: 8px }
.case-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0 20px; margin-top: 10px }
.case-links a { display: inline-flex; padding-block: 10px; min-height: 44px; align-items: center }
.case-reference { padding-block: 4px 40px; border-top: 1px solid var(--ru) }
.case-reference #access { max-width: 68ch }
.case-reference #access p { margin-bottom: 12px }
@media (max-width: 820px) {
  .case-spread, .case-close, .case-build { grid-template-columns: minmax(0,1fr); gap: 24px }
  .case-page { max-width: 48rem }
  .case-intro { margin-top: 16px; font-size: 18px; max-width: 50ch }
}
.delivery-places { max-width: 42ch; margin: 16px 0; font-size: 16px }
.delivery-places p { color: var(--mu); margin-top: 8px; font-size: 14px }
.delivery-places a { white-space: normal }
.brief-choices { margin-top: 24px }
.brief-choices div + div { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--ru) }
.brief-choices dt { font: 550 14px/1.45 var(--fm); margin-bottom: 4px }
.brief-choices dd { font-size: 18px; line-height: 1.45 }
.trail-step:first-child { border-top: 1px solid var(--ru) }
.published-record { border-left: 2px solid var(--ink); padding: 6px 0 6px 14px; margin-top: 16px }
.record-content > * + * { margin-top: 5px }
.record-content strong { display: block }
.record-content ul { padding-left: 20px }
.published-record a, .back-brief { display: inline-flex; min-height: 44px; align-items: center }
.trail-step > summary::after {
  content: ''; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px;
  border-bottom: 1px solid currentColor; border-right: 1px solid currentColor; transform: translateY(-65%) rotate(45deg);
}
.trail-step[open] > summary::after { transform: translateY(-20%) rotate(225deg) }
.case-spread { grid-template-areas: "opening chat" "guide chat"; grid-template-rows: auto 1fr; row-gap: 16px }
.case-opening { grid-area: opening }
.case-jump { display: inline-flex; align-items: center; min-height: 44px }
.case-guide { grid-area: guide; align-self: start; max-width: 42ch }
.case-guide .brief-choices { margin-top: 0 }
.case-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-block: 16px }
.case-tools a { display: inline-flex; align-items: center; min-height: 44px }
.case-tools .case-action { margin: 0 }
.chat-example { grid-area: chat; min-width: 0; align-self: start }
.chat-caption { margin-bottom: 16px }
.chat-title { margin-top: 4px; font: 500 30px/1.12 var(--f); letter-spacing: -.035em }
.case-thread { --chat-inset: clamp(14px, 2vw, 28px); border: 1px solid var(--ru); background: var(--raise) }
.thread-header { display: flex; gap: 8px; align-items: center; padding: 12px var(--chat-inset); border-bottom: 1px solid var(--ru); font-weight: 550 }
.host-initial { display: inline-grid; place-items: center; width: 24px; height: 24px; background: var(--btn); color: var(--onbtn); font: 600 14px/1 var(--f) }
.chat-messages { display: grid; gap: 28px; padding: 24px var(--chat-inset) 28px }
.case-turn { min-width: 0 }
.case-turn .speaker { margin-bottom: 6px; color: var(--mu); font: 500 12px/1.4 var(--f) }
.case-turn[data-speaker="reader"] { justify-self: end; max-width: 88% }
.case-turn[data-speaker="reader"] .speaker { text-align: right }
/* The rounded reader bubble identifies the host app's side of the conversation. */
/* impeccable-disable-next-line design-system-radius */
.case-turn[data-speaker="reader"] .turn-body { padding: 10px 16px; border-radius: 16px; background: color-mix(in srgb, var(--ink) 9%, var(--raise)) }
.case-thread .research-card-body > details { margin-top: 10px; border-top: 1px solid var(--ru) }
@media (max-width: 820px) {
  .case-spread { grid-template-areas: "opening" "chat" "guide"; grid-template-rows: auto; row-gap: 20px }
}

.standalone-chat { max-width: 48rem; padding-block: 20px 36px }
