/* Trauma scheduling case study · page styles.
   Everything here is static: the page reads in full with JavaScript off. The scripts beside this file
   only add the highlights mode (the default with JS), the sky behind the acts, figure reveals and the demo interactions. */
html,body{margin:0;background:#FBF8F6;color:#0F172A;-webkit-text-size-adjust:100%}
*{box-sizing:border-box}
body{position:relative;min-height:100vh;font-family:"Avenir Next",Avenir,"Segoe UI",system-ui,-apple-system,sans-serif}
main a{color:inherit}
main a:hover{color:#C6093B}
:focus-visible{outline:2px solid #C6093B;outline-offset:3px}
@keyframes tp-twinkle{0%,100%{opacity:1}50%{opacity:.35}}
@media (prefers-reduced-motion: reduce){*{transition:none!important;animation:none!important;scroll-behavior:auto!important}}

/* Shared chrome. */
.integration-back{position:relative;z-index:1}
.shared-footer{z-index:1;margin-top:0}

/* "How long have you got?": the HTML is the whole story (what crawlers and no-JS readers get);
   with JS the head script starts in highlights, one feature per act, unless the reader chose the whole story. */
.tp-hi-only{display:none}
html[data-tp-mode="hi"] .tp-hi-only{display:flex}
html[data-tp-mode="hi"] .tp-full-only{display:none!important}

/* The three acts, linked from the intro. In highlights the hidden features read as muted. */
.tp-toc{max-width:56rem;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr));gap:12px;margin-top:6px}
.tp-toc>div{display:flex;flex-direction:column;gap:10px;padding:16px 18px;border-radius:14px;background:rgba(255,255,255,.6);border:1px solid rgba(15,23,42,.1)}
.tp-toc .tp-toc__act{display:flex;flex-direction:column;gap:4px;font:800 18px/1.15 Archivo,sans-serif;color:#0F172A;text-decoration:none}
.tp-toc__act span{font:600 11px 'JetBrains Mono',monospace;letter-spacing:.14em;color:#C6093B}
.tp-toc ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.tp-toc li a{font-size:14px;line-height:1.4;color:#1E293B;text-decoration:none}
.tp-toc li a:hover{color:#C6093B;text-decoration:underline}
html[data-tp-mode="hi"] .tp-toc li a:not(.tp-hi){color:#64748B}
html[data-tp-mode="hi"] .tp-toc li a.tp-hi,html[data-tp-mode="hi"] .tp-toc li a:hover{color:#C6093B}
html[data-tp-mode="hi"] .tp-toc li a.tp-hi{font-weight:700}

/* Each act is a full-width band with its own quiet tint; the middle act, when things break, is the dark one. */
.tp-act{position:relative;z-index:1;--ink:#0F172A;--muted:#334155;--acc:#C6093B;--hl:#C6093B;--line:rgba(15,23,42,.2)}
.tp-act--paper{background:#FBF8F6;border-top:1px solid #E7E2D3}
.tp-act--dark{--ink:#F8FAFC;--muted:#CBD5E1;--acc:#FDA4AF;--hl:#FB7185;--line:rgba(248,250,252,.26);background:#0B1222}
.tp-act--calm{background:#EEF3F8}
/* With the sky (JS and motion only), the bands thin to a wash so the sun and moon show through. Each band stays solid
   at its edges, so a heading arriving while the sky is still turning reads on its own act's colour. */
html.tp-sky .tp-act--paper{background:linear-gradient(180deg,rgba(251,248,246,.2) calc(100% - 40vh),#FBF8F6);border-top-color:transparent}
html.tp-sky .tp-act--dark{background:linear-gradient(180deg,#0B1222,rgba(7,13,28,.5) 60vh,rgba(7,13,28,.5) calc(100% - 40vh),#0B1222)}
html.tp-sky .tp-act--calm{background:linear-gradient(180deg,#EEF3F8,rgba(238,243,248,.2) 60vh)}
.tp-act__in{max-width:1328px;margin:0 auto;padding:clamp(64px,9vw,128px) clamp(16px,4vw,56px) 0}
.tp-act__head{display:flex;flex-direction:column;gap:14px;max-width:44rem;padding-bottom:clamp(8px,2vw,24px)}
.tp-act__n{margin:0;display:flex;align-items:center;gap:12px;font:600 12px/1.2 'JetBrains Mono',monospace;letter-spacing:.16em;text-transform:uppercase;color:var(--acc)}
.tp-act__n span{width:28px;height:2px;background:currentColor}
.tp-act__head h2{margin:0;font-family:Archivo,'Arial Black',sans-serif;font-stretch:118%;font-variation-settings:'wdth' 118;font-weight:850;font-size:clamp(40px,6vw,88px);line-height:.95;letter-spacing:-.035em;text-wrap:balance;color:var(--ink)}
.tp-act__lede{margin:0;font-size:clamp(17px,1.5vw,20px);line-height:1.6;color:var(--muted);text-wrap:pretty}

/* Figures rise into place the first time they are seen (motion only). */
html.tp-motion [data-reveal].tp-pre{transform:translateY(24px)}

/* Each feature sits on the act's rail. Operator features carry slate; on the dark act it lifts. */
.tp-act section[id^="f-"]{position:relative;padding:clamp(56px,8vw,112px) 0 clamp(56px,8vw,112px) clamp(20px,3vw,40px);border-left:1px solid var(--line)}
#f-glance,#f-gen,#f-rules{--acc:#334155}
#f-hole,#f-change{--acc:#94A3B8}
#f-sick{padding-top:clamp(72px,10vw,140px);padding-bottom:clamp(72px,10vw,140px)}
#f-hero{--muted:#1E293B;--acc:#9B0A31;padding-top:clamp(72px,10vw,150px);padding-bottom:clamp(72px,10vw,150px)}
#f-nothing{padding-bottom:clamp(72px,10vw,140px)}
.tp-act--dark section>span[aria-hidden][style*="#334155"],.tp-act--dark .tp-role>span[style*="#334155"]{background:#94A3B8!important}

/* Hover and focus states from the spec (inline styles need !important to give way). */
.tp-fc1:focus{left:8px!important}
.tp-hv2:hover{border-color:#FB7185!important;transform:translateY(-2px)!important}
.tp-hv4:hover{background:#A3072F!important}
.tp-hv5:hover{background:#0F172A!important;color:#fff!important}
.tp-hv6:hover{border-color:#0F172A!important}
.tp-hv7:hover{color:#78cdc6!important}
.tp-hv8:hover{background:#A3072F!important;color:#fff!important}
