/* Identity pages share the canonical tokens from features/base/base.css. */
html { scroll-padding-top: 90px; }
body.identity { background: #0d1218; color: #f4f7f8; font-family: 'Segoe UI', system-ui, sans-serif; }
.identity::after { display: none; }
.identity a { color: inherit; text-decoration: none; }
.identity button { font: inherit; }
.identity h1, .identity h2, .identity h3 { color: inherit; border: 0; padding: 0; }
.identity h2 { display: block; }
.identity h2::before { display: none; }
.identity :focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 6px; }
.identity [hidden] { display: none !important; }
.identity .skip-link { position: fixed; top: -100px; left: 20px; z-index: 100; padding: 12px 20px; background: #f4f7f8; color: #0d1218; }
.identity .skip-link:focus { top: 12px; }
.story-host { position: relative; }
.story-stage { --story-paper: rgb(244 247 248 / .78); --story-ink: #10354a; --story-accent: #0bbdbb; position: sticky; top: 0; height: 100svh; overflow: hidden; background: #0d1218; isolation: isolate; }
.story-svg, .story-transition { position: absolute; inset: 0; width: 100%; height: 100%; }
.story-transition { z-index: 2; pointer-events: none; }
.story-toolbar { position: absolute; z-index: 4; inset: 20px 24px auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.story-toolbar :is(button,a), .story-controls button { cursor: pointer; border: 0; color: var(--story-ink); background: var(--story-paper); border-radius: 0; padding: 9px 18px; font-size: 13px; min-height: 44px; }
.story-toolbar :is(button,a) { display:inline-flex;align-items:center;justify-content:center;position: relative; border-bottom: 2px solid var(--story-accent); font-weight: 600; }
.story-toolbar :is(button,a):hover, .story-toolbar :is(button,a)[aria-expanded="true"] { background: #0bbdbb; color: var(--story-ink); }
.story-toolbar :is(button,a):focus-visible, .story-chapters button:focus-visible { outline: 2px solid #008c98; outline-offset: 3px; }
.story-ribbon { --ribbon-gutter: clamp(24px,4.5vw,80px); --ribbon-pad-top: 26px; --ribbon-tab-height: 48px; --ribbon-paper: var(--story-paper); position: absolute; z-index: 4; inset: auto 0 0; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: clamp(18px,3vw,50px); min-height: 112px; padding: var(--ribbon-pad-top) var(--ribbon-gutter) 30px; background: var(--ribbon-paper); color: #10354a; }
.story-ribbon::before { content: ''; position: absolute; left: 0; top: -12px; width: calc(var(--ribbon-gutter) + 24px); height: 12px; background: var(--ribbon-paper); clip-path: polygon(0 100%,14px 0,calc(100% - 14px) 0,100% 100%); }
.story-controls { position: static; display: flex; align-items: center; gap: 12px; }
.story-controls button { position: relative; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; padding: 8px; border: 0; background: transparent; color: #10354a; border-radius: 0; }
.story-controls [data-previous] { color: #049eaa; }
.story-controls button svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.story-controls button:hover:not(:disabled) { color: #00a99f; background: #0ebcb412; }
.story-controls button:disabled { opacity: .25; cursor: default; }
.story-controls input { position: absolute; left: var(--ribbon-gutter); bottom: 0; width: calc(100% - 2*var(--ribbon-gutter)); height: 44px; margin: 0; padding: 0; border: 0; appearance: none; -webkit-appearance: none; background: transparent; cursor: pointer; }
.story-controls input::-webkit-slider-runnable-track { height: 3px; transform: translateY(10px); border-radius: 2px; background: linear-gradient(90deg,#13c6bd 0 var(--story-progress,0%),#c5d4da var(--story-progress,0%) 100%); }
.story-controls input::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 8px; height: 8px; margin-top: -2.5px; border: 0; border-radius: 50%; background: #008c98; opacity: 0; }
.story-controls input:hover::-webkit-slider-thumb,.story-controls input:focus-visible::-webkit-slider-thumb { opacity: 1; }
.story-controls input::-moz-range-track { height: 3px; transform: translateY(10px); background: #c5d4da; }
.story-controls input::-moz-range-progress { height: 3px; transform: translateY(10px); background: #13c6bd; }
.story-controls input::-moz-range-thumb { width: 8px; height: 8px; transform: translateY(10px); border: 0; background: #008c98; opacity: 0; }
.story-controls input:hover::-moz-range-thumb,.story-controls input:focus-visible::-moz-range-thumb { opacity: 1; }
.story-controls output { font-size: clamp(17px,1.5vw,23px); font-weight: 650; white-space: nowrap; color: #10354a; min-width: 78px; text-align: center; font-variant-numeric: tabular-nums; }
.story-loading { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; gap: 20px; text-align: center; background: #0d1218; font-size: 13px; color: #cad8df; }
.story-loading .document-utility-action {min-height:44px;padding:10px 15px;}
.story-chapters { position: absolute; right: 24px; top: 76px; background: var(--story-paper); color: var(--story-ink); border: 0; border-top: 3px solid var(--story-accent); padding: 8px 12px; display: grid; z-index: 5; width: min(280px,calc(100vw - 30px)); max-height: min(65svh,calc(100svh - 250px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #008c9880 transparent; }
.story-chapters button { background: transparent; border: 0; border-bottom: 1px solid #10354a20; color: inherit; text-align: left; padding: 13px 12px; min-height: 44px; cursor: pointer; font-size: 13px; font-weight: 550; }
.story-chapters button:last-child { border-bottom: 0; }
.story-chapters button:hover { color: #006e78; background: #0bbdbb24; }
.story-caption { position: relative; min-width: 0; align-self: stretch; display: flex; align-items: center; color: #10354a; pointer-events: none; opacity: 0; transform-origin: left center; transform: translateY(-18px) scale(.96); filter: blur(4px); transition: opacity .4s ease, transform .5s ease, filter .5s ease; }
.story-caption p { margin: 0; }
.story-caption-context { position: absolute; top: calc(-1*(var(--ribbon-pad-top) + var(--ribbon-tab-height))); left: 0; display: flex; align-items: center; gap: 18px; min-height: calc(var(--ribbon-tab-height) + 3px); width: max-content; max-width: min(680px,calc(100vw - 2*var(--ribbon-gutter))); padding: 11px 54px 11px 28px; clip-path: polygon(0 60%,7% 0,87% 0,100% 100%,5% 100%); background: #0bbdbb; color: #fff; font-size: clamp(17px,1.7vw,26px); font-weight: 700; line-height: 1.2; isolation: isolate; }
.story-caption-context::before,.story-caption-context::after { content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none; }
.story-caption-context::before { background: #047f90; opacity: .25; clip-path: polygon(0 60%,7% 0,30% 0,17% 100%,5% 100%); }
.story-caption-context::after { background: #70e1cd; opacity: .32; clip-path: polygon(72% 0,87% 0,100% 100%,80% 100%,88% 52%); }
.story-caption-context [data-caption-place]:not([hidden]) { border-left: 1px solid #ffffff9c; padding-left: 18px; }
.story-caption-text { font-size: clamp(20px,1.6vw,28px); font-weight: 600; line-height: 1.4; text-wrap: pretty; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 600px) {
 .story-toolbar { inset: 12px 15px auto; } .story-toolbar :is(button,a) { font-size: 11px; padding: 8px 10px; }
 .story-ribbon { --ribbon-gutter: 18px; --ribbon-pad-top: 18px; --ribbon-tab-height: 38px; grid-template-columns: 1fr; gap: 6px; min-height: 0; padding-bottom: 26px; }
 .story-caption { min-height: 24px; }
 .story-caption-context { gap: 11px; padding: 9px 30px 9px 18px; font-size: 14px; }
 .story-caption-context [data-caption-place]:not([hidden]) { padding-left: 11px; }
 .story-caption-text { font-size: 17px; line-height: 1.4; }
 .story-controls { justify-content: flex-end; gap: 6px; } .story-controls output { font-size: 16px; min-width: 68px; }
 .story-chapters { right: 15px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
@media (max-width: 360px) { .story-toolbar { inset-inline: 10px; } .story-toolbar :is(button,a) { padding-inline: 6px; font-size: 10px; } }
