.scenario-page { max-width: 1420px; margin: 0 auto; color: #30344f; }
.scenario-page *, .scenario-page *::before { box-sizing: border-box; }
.scenario-page [hidden] { display: none !important; }
.scenario-page .breadcrumb { margin-bottom: 22px; }
.scenario-hero { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; padding: 38px 40px; border-radius: 20px; color: white; background: linear-gradient(115deg, #292e46, #304559 72%, #30616a); box-shadow: 0 16px 35px #272e4110; }
.scenario-page .scenario-eyebrow { margin: 0 0 12px; color: #278c83; font-size: 11px; font-weight: 800; letter-spacing: .12em; line-height: 1.6; }
.scenario-hero .scenario-eyebrow { color: #7dd2c7; }
.scenario-hero h1 { font-size: clamp(26px, 2.4vw, 36px); line-height: 1.22; letter-spacing: -.035em; max-width: 960px; margin: 0 0 18px; color: inherit; }
.scenario-hero p { font-size: 14px; line-height: 1.75; color: #e0e6ec; margin: 0; max-width: 790px; }
.scenario-hero-note { align-self: center; padding-left: 26px; border-left: 1px solid #ffffff30; }
.scenario-hero-note > span { display: block; font-size: 10px; letter-spacing: .12em; color: #a6ddd7; font-weight: 800; margin-bottom: 10px; }
.scenario-hero-note strong { display: block; font-size: 18px; margin-bottom: 10px; }
.scenario-hero-note p { font-size: 12px; }
.scenario-search-panel, .scenario-section { background: white; border: 1px solid #e3e7ee; border-radius: 18px; padding: 30px; margin: 26px 0; box-shadow: 0 10px 30px #29314504; scroll-margin-top: 100px; }
.scenario-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.scenario-page h2 { margin: 0 0 10px; font-size: 23px; line-height: 1.3; letter-spacing: -.025em; }
.scenario-search-form { margin-top: 23px; }
.scenario-search-form label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 9px; }
.scenario-search-form > div { display: flex; gap: 12px; }
.scenario-search-form input { min-width: 0; flex: 1; border: 1px solid #d7deea; border-radius: 9px; padding: 14px 16px; background: #f8f9fc; color: #30344f; font: inherit; font-size: 14px; }
.scenario-page a:focus-visible, .scenario-page button:focus-visible, .scenario-page input:focus-visible, .scenario-page summary:focus-visible { outline: 3px solid #209e91; outline-offset: 4px; }
.scenario-search-help, .scenario-results-count { font-size: 12px; line-height: 1.6; color: #626c80; }
.scenario-results-count { padding-top: 15px; border-top: 1px solid #edf0f5; margin: 23px 0 15px; font-weight: 600; }
.scenario-card { border: 1px solid #dce6e9; border-radius: 14px; overflow: hidden; background: linear-gradient(120deg, #fbfdfd, white); padding: 25px; }
.scenario-card + .scenario-card { margin-top: 18px; }
.scenario-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.scenario-chip { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 6px; background: #edf4f4; color: #307f78; font-size: 11px; font-weight: 700; line-height: 1.5; }
.scenario-chip--dark { background: #333c56; color: white; }
.scenario-chip--review { background: #fcf3e3; color: #886423; }
.scenario-card h3 { font-size: 23px; line-height: 1.4; letter-spacing: -.02em; margin: 18px 0 23px; max-width: 1000px; }
.scenario-card h3 a { color: #30344f; text-decoration: none; }
.scenario-card h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.scenario-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 30px; margin: 24px 0 12px; }
.scenario-facts dt { font-size: 12px; color: #677086; margin-bottom: 7px; }
.scenario-facts dd { font-size: 16px; font-weight: 700; line-height: 1.5; margin: 0; }
.scenario-facts dd.scenario-fact-explanation { font-size: 12px; color: #657086; line-height: 1.7; margin-top: 7px; font-weight: 400; }
.scenario-facts--compact { margin: 0; }
.scenario-facts--compact dd { font-size: 14px; }
.scenario-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 35px; border-top: 1px solid #e3e9ef; padding-top: 22px; margin-top: 24px; }
.scenario-card-footer p { margin: 0; font-size: 13px; line-height: 1.7; max-width: 790px; }
.scenario-card-footer .button { flex-shrink: 0; }
.scenario-empty { padding: 36px 20px; text-align: center; background: #f7f9fb; border-radius: 12px; }
.scenario-empty h3 { margin-top: 0; }
.scenario-empty p { line-height: 1.7; font-size: 14px; }
.scenario-empty .button { margin: 8px; }
.scenario-explainer { display: flex; gap: 30px; padding: 0 5px; color: #657086; font-size: 13px; line-height: 1.7; }
.scenario-explainer strong { color: #3e4860; min-width: 200px; }
.scenario-explainer p { margin: 0; max-width: 820px; }
.scenario-hero--detail { grid-template-columns: 1fr; }
.scenario-hero--detail .scenario-chips { margin-bottom: 22px; }
.scenario-hero--detail .scenario-chip--dark { background: #ffffff1a; }
.scenario-jump-links { display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 22px 8px 0; font-size: 13px; font-weight: 600; }
.scenario-jump-links a { color: #57637b; text-decoration: none; border-bottom: 1px solid #ccd8df; padding-bottom: 4px; }
.scenario-assumptions { background: #f6f9fb; border-radius: 10px; padding: 17px 20px; margin-top: 25px; font-size: 13px; line-height: 1.8; }
.scenario-assumptions summary { cursor: pointer; font-weight: 700; }
.scenario-assumptions ul { padding-left: 20px; margin-bottom: 0; }
.scenario-assumptions li + li { margin-top: 8px; }
.scenario-section-intro { font-size: 14px; color: #657086; line-height: 1.7; }
.scenario-flow-columns { display: grid; grid-template-columns: minmax(260px, .85fr) minmax(0, 1.15fr); gap: 36px; margin-top: 30px; }
.scenario-steps { list-style: none; counter-reset: step; margin: 0; padding: 8px 0 0; }
.scenario-steps li { counter-increment: step; padding: 0 0 32px 49px; position: relative; }
.scenario-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 31px; height: 31px; display: grid; place-items: center; background: #e9f5f2; color: #267c72; border: 1px solid #c6e5de; border-radius: 50%; font-size: 12px; font-weight: 800; }
.scenario-steps li:not(:last-child)::after { content: ''; position: absolute; left: 15px; top: 35px; bottom: 4px; width: 1px; background: #d8e8e4; }
.scenario-steps h3 { margin: 3px 0 10px; font-size: 16px; line-height: 1.5; }
.scenario-steps p { margin: 0; color: #657086; font-size: 13px; line-height: 1.8; }
.scenario-diagram { margin: 0; border: 1px solid #e1e9ed; border-radius: 12px; background: #fbfdfd; padding: 20px; align-self: start; scroll-margin-top: 100px; }
.scenario-diagram figcaption { font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.scenario-diagram img { display: block; width: 100%; max-height: 760px; object-fit: contain; }
.scenario-diagram-image-link { display: block; }
.scenario-diagram-viewport { overflow-x: auto; }
.scenario-diagram .scenario-diagram-hint { display: none; }
.scenario-search-help { margin-top: 8px; }
.scenario-diagram-downloads { display: flex; flex-wrap: wrap; gap: 12px 20px; font-size: 12px; font-weight: 700; padding-top: 15px; border-top: 1px solid #e1e9ed; margin-top: 16px; }
.scenario-diagram a, .scenario-reference-link { color: #247c73; text-underline-offset: 3px; }
.scenario-diagram p { font-size: 11px; line-height: 1.7; color: #657086; margin-bottom: 0; }
.scenario-outcome { background: #ecf7f3; border-color: #c8e4db; }
.scenario-outcome p { font-size: 15px; line-height: 1.8; max-width: 1000px; }
.scenario-outcome .scenario-outcome-note { font-size: 13px; color: #54776f; margin-bottom: 0; }
.scenario-glossary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 38px; margin: 26px 0 0; }
.scenario-glossary dt { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.scenario-glossary dd { font-size: 13px; color: #657086; margin: 0; line-height: 1.8; }
.scenario-section#source p { font-size: 13px; line-height: 1.8; }
.scenario-section#source .scenario-source { color: #657086; font-size: 12px; margin-top: 22px; }
.scenario-section blockquote { margin: 15px 0 22px; border-left: 3px solid #d4b67f; padding-left: 16px; font-size: 14px; font-style: italic; line-height: 1.8; }
.scenario-reference-link { font-size: 13px; font-weight: 700; }
.scenario-pagination { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 20px; }
.scenario-page button:disabled { opacity: .45; cursor: default; }
@media (max-width: 1100px) {
    .scenario-hero { gap: 25px; padding: 30px; grid-template-columns: 1fr; }
    .scenario-hero-note { display: none; }
    .scenario-flow-columns { gap: 24px; grid-template-columns: minmax(220px, 1fr) minmax(0, 1.2fr); }
    .scenario-card-footer { flex-direction: column; align-items: flex-start; gap: 18px; }
}
@media (max-width: 720px) {
    .scenario-hero { padding: 25px 22px; border-radius: 14px; }
    .scenario-hero h1 { font-size: 26px; }
    .scenario-hero p { font-size: 13px; }
    .scenario-search-panel, .scenario-section { padding: 22px 18px; margin: 20px 0; border-radius: 14px; }
    .scenario-page h2 { font-size: 21px; }
    .scenario-section-heading { display: block; }
    .scenario-section-heading > .scenario-chip { margin-top: 5px; }
    .scenario-search-form > div { flex-direction: column; gap: 10px; }
    .scenario-card { padding: 18px; }
    .scenario-card h3 { font-size: 20px; }
    .scenario-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
    .scenario-facts dd { font-size: 14px; }
    .scenario-facts dt { font-size: 11px; }
    .scenario-flow-columns, .scenario-glossary { grid-template-columns: 1fr; }
    .scenario-diagram { padding: 12px; }
    .scenario-diagram-image-link { min-width: 640px; }
    .scenario-diagram .scenario-diagram-hint { display: block; margin: 12px 0; }
    .scenario-jump-links { gap: 13px 20px; padding-left: 0; font-size: 12px; }
    .scenario-explainer { display: block; }
    .scenario-explainer p { margin-top: 8px; }
    .scenario-card-footer .button { width: 100%; font-size: 12px; }
    .scenario-pagination { flex-wrap: wrap; }
}
@media (max-width: 390px) { .scenario-facts { grid-template-columns: 1fr; } }
.scenario-flow-columns > * { min-width: 0; }

/* Parcours documentaire v2 : trois chapitres, diagrammes lisibles et contrôles explicités. */
.scenario-reading-note { margin-top: 26px; border-left: 3px solid #c59843; background: #fff8e9; border-radius: 0 10px 10px 0; padding: 18px 22px; font-size: 13px; line-height: 1.8; color: #715629; }
.scenario-reading-note p { margin: 7px 0 0; }
.operator-section > .scenario-reading-note + .scenario-section-intro { margin-top: 18px; }
.scenario-phase-rail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.scenario-phase-rail a { padding: 22px; border: 1px solid #dce7e6; border-radius: 12px; background: #f8fcfb; text-decoration: none; color: #30344f; }
.scenario-phase-rail a:hover { border-color: #278c83; background: #edf8f4; }
.scenario-phase-rail span { display: block; color: #278c83; font-size: 12px; font-weight: 800; margin-bottom: 12px; }
.scenario-phase-rail strong { font-size: 16px; line-height: 1.5; }
.scenario-phase-rail p { color: #657086; font-size: 13px; line-height: 1.7; margin: 10px 0 0; }
.scenario-legend { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 24px; font-size: 12px; line-height: 1.5; }
.scenario-legend span::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; background: #8292a8; }
.scenario-legend .scenario-legend--path::before { background: #268d7f; }
.scenario-legend .scenario-legend--pending::before { background: #b68227; }
.scenario-legend .scenario-legend--blocked::before { background: #bd5963; }
.scenario-diagram--journey { margin: 28px 0 12px; padding: 20px; }
.scenario-diagram--journey .scenario-diagram-hint { display: block; margin: 12px 0; font-size: 12px; }
.scenario-journey-steps { list-style: none; margin: 0; padding: 0; }
.scenario-journey-step { padding: 32px 0; border-bottom: 1px solid #e6ecef; }
.scenario-journey-step:last-child { border-bottom: 0; padding-bottom: 0; }
.scenario-journey-step h3 { display: flex; align-items: center; gap: 12px; font-size: 19px; line-height: 1.4; margin: 0 0 14px; }
.scenario-step-number { display: grid; place-items: center; flex: 0 0 32px; height: 32px; border: 1px solid #c6e5de; border-radius: 50%; background: #e9f5f2; color: #267c72; font-size: 12px; }
.scenario-journey-step p, .scenario-journey-step li { font-size: 13px; line-height: 1.85; color: #536078; }
.scenario-journey-step .scenario-step-description { font-size: 14px; color: #46536b; max-width: 1100px; margin: 0 0 20px; }
.scenario-step-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.scenario-step-columns h4 { font-size: 12px; margin: 0 0 10px; color: #286f65; }
.scenario-step-columns p { margin: 0; }
.scenario-step-columns .scenario-step-alternative { color: #876321; margin-top: 18px; }
.scenario-step-evidence { border: 1px solid #e5eaef; background: #f8fafc; padding: 20px; border-radius: 10px; align-self: start; }
.scenario-step-evidence ul { margin: 0; padding-left: 18px; }
.scenario-step-evidence li + li { margin-top: 10px; }
.scenario-journey-step .scenario-step-source { margin: 15px 0 0; color: #738096; font-size: 11px; }
#diagramme .scenario-diagram-downloads a { color: #247c73; }
@media (max-width: 900px) {
    .scenario-phase-rail { grid-template-columns: 1fr; }
    .scenario-step-columns { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 720px) {
    .scenario-diagram--journey { padding: 12px; }
    .scenario-reading-note { padding: 16px; }
    .scenario-journey-step h3 { font-size: 17px; align-items: flex-start; }
    .scenario-step-evidence { padding: 16px; }
}

.scenario-diagram-preview { position: relative; display: block; width: 100%; padding: 18px 18px 58px; border: 1px solid #dce7e5; border-radius: 10px; background: #f8fcfb; overflow: hidden; cursor: zoom-in; transition: border-color .15s, box-shadow .15s; }
.scenario-diagram-preview:hover, .scenario-diagram-preview:focus-visible { border-color: #268d7f; box-shadow: 0 0 0 3px #268d7f18; }
.scenario-diagram-preview img, .scenario-diagram--journey .scenario-diagram-preview img { display: block; width: 100%; height: 510px; max-height: none; object-fit: contain; }
.scenario-preview-action { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 9px; white-space: nowrap; background: white; border: 1px solid #d6e4e0; color: #256e64; border-radius: 24px; padding: 9px 16px; font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1.4; box-shadow: 0 3px 12px #214b4210; pointer-events: none; }
.scenario-preview-lens { position: absolute; z-index: 1; width: 190px; height: 190px; border: 3px solid #278c83; border-radius: 50%; pointer-events: none; background-color: #fbfdfd; background-repeat: no-repeat; box-shadow: 0 4px 26px #173f4530, 0 0 0 5px #ffffffaa; }
.scenario-viewer-open { overflow: hidden; }
.scenario-viewer { width: 96vw; max-width: none; height: 94dvh; max-height: none; padding: 0; border: 1px solid #dce7e5; border-radius: 16px; background: #f8fbfa; color: #30344f; box-shadow: 0 24px 100px #10202b80; overflow: hidden; }
.scenario-viewer[open] { display: flex; flex-direction: column; }
.scenario-viewer::backdrop { background: #172638cc; backdrop-filter: blur(3px); }
.scenario-viewer-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 18px 22px; border-bottom: 1px solid #dce7e5; background: white; }
.scenario-viewer-header h2 { font-size: 18px; line-height: 1.4; margin: 0; }
.scenario-viewer-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.scenario-viewer-controls button { border: 1px solid #cbdad4; border-radius: 7px; padding: 10px 14px; background: white; color: #285f55; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 44px; }
.scenario-viewer-controls button:hover { background: #edf7f3; }
.scenario-viewer-controls button:last-child { background: #2d3b52; color: white; border-color: #2d3b52; }
.scenario-viewer-status { min-width: 48px; text-align: center; font-size: 12px; font-variant-numeric: tabular-nums; }
.scenario-viewer-help { padding: 10px 22px; margin: 0; color: #657086; font-size: 12px; line-height: 1.7; }
.scenario-viewer-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; cursor: grab; touch-action: none; user-select: none; background: radial-gradient(#d4e1dc 1px, transparent 1px); background-size: 20px 20px; }
.scenario-viewer-stage.is-dragging { cursor: grabbing; }
.scenario-viewer-stage:focus-visible, .scenario-viewer button:focus-visible { outline: 3px solid #278c83; outline-offset: -3px; }
.scenario-viewer-image { position: absolute; left: 0; top: 0; max-width: none; max-height: none; transform-origin: 0 0; pointer-events: none; }
@media (max-width: 720px) {
    .scenario-diagram-preview { padding: 10px 10px 60px; }
    .scenario-diagram-preview img, .scenario-diagram--journey .scenario-diagram-preview img { height: 380px; }
    .scenario-viewer { width: 100vw; height: 100dvh; border: 0; border-radius: 0; margin: 0; }
    .scenario-viewer-header { padding: 12px; gap: 10px; }
    .scenario-viewer-header h2 { font-size: 15px; }
    .scenario-viewer-controls { gap: 6px; }
    .scenario-viewer-controls button { padding: 8px 10px; font-size: 12px; }
    .scenario-viewer-help { padding: 8px 12px; font-size: 11px; }
}
@media (hover: none) { .scenario-preview-lens { display: none; } }
.operator-questions { list-style: none; margin: 28px 0 0; padding: 0; }
.operator-question { padding: 24px 0; border-top: 1px solid #e1e7ed; }
.operator-question h3 { display: flex; gap: 12px; align-items: baseline; margin: 0 0 14px; font-size: 17px; line-height: 1.6; }
.operator-state { display: inline-block; border-radius: 999px; padding: 5px 10px; background: #e7f4f0; color: #267c70; font-size: 11px; font-weight: 650; }
.operator-question--unknown .operator-state, .operator-question--assumed .operator-state { background: #fff1d9; color: #7c5b28; }
.operator-answer { color: #30354f; font-weight: 600; font-size: 14px; line-height: 1.7; }
.operator-decision-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.operator-decision-columns h4 { margin: 6px 0; color: #298477; font-size: 12px; }
.operator-decision-columns > div:last-child h4 { color: #9c793c; }
.operator-decision-columns p { margin: 0 0 14px; color: #69738a; font-size: 13px; line-height: 1.85; }
.operator-formulas { padding-left: 22px; color: #4d5870; font-size: 14px; line-height: 1.9; }
.operator-formulas li { padding: 6px 0 6px 8px; }
.operator-calculations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 26px 0; }
.operator-calculation { border: 1px solid #dce9e5; background: #f8fcfa; border-radius: 14px; padding: 22px; min-width: 0; }
.operator-calculation h3 { margin: 10px 0; font-size: 19px; color: #30354f; }
.operator-calculation > p:not(.scenario-eyebrow) { font-size: 13px; line-height: 1.8; color: #626e83; }
.operator-formula { font-weight: 700; color: #257d70; font-size: 17px; line-height: 1.8; padding: 18px 0 6px; }
.operator-money-pending, .operator-demo { background: #fff5e3; border-radius: 9px; padding: 15px; color: #7a5927; font-size: 13px; line-height: 1.8; }
.operator-demo p { margin: 8px 0 0; }
.operator-distribution { margin: 18px 0; }
.operator-distribution > div { padding: 10px 0; border-top: 1px solid #dfe8e5; }
.operator-distribution dt { color: #30354f; font-weight: 650; font-size: 12px; }
.operator-distribution dd { color: #4e675f; margin: 6px 0 0; font-size: 13px; line-height: 1.7; }
.operator-calculation .operator-balance { border-top: 1px solid #dfe8e5; padding-top: 12px; font-size: 12px; }
.scenario-process-annex { margin: 24px 0; padding: 24px; border: 1px solid #dfe5ed; border-radius: 16px; background: #f6f8fa; }
.scenario-process-annex > summary { cursor: pointer; font-weight: 650; color: #4d5970; line-height: 1.8; }
.scenario-process-annex[open] > summary { margin-bottom: 24px; }
@media (max-width: 760px) {
    .operator-decision-columns, .operator-calculations { grid-template-columns: minmax(0, 1fr); }
    .operator-decision-columns { gap: 0; }
    .operator-calculation { padding: 18px; }
    .operator-question h3 { font-size: 16px; }
    .scenario-process-annex { padding: 16px; }
}

/* Explorer: one source groups its variants; filtering never changes the source documents. */
.scenario-explorer .scenario-explorer-hero { display: block; padding: 26px 30px; }
.scenario-explorer-hero h1 { font-size: clamp(25px, 2.3vw, 32px); margin-bottom: 10px; }
.scenario-explorer-hero p { max-width: 950px; }
.scenario-family-section { margin-top: 24px; }
.scenario-family-intro { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.scenario-family-intro h2 { font-size: 17px; margin: 0; }
.scenario-families { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.scenario-family { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; padding: 18px; border: 1px solid #dce3eb; background: white; border-radius: 13px; color: #30344f; text-align: left; font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.scenario-family:hover { border-color: #328a80; }
.scenario-family[aria-pressed="true"] { background: #eaf6f3; border-color: #26877b; box-shadow: inset 0 0 0 1px #26877b; }
.scenario-family-code { display: grid; place-items: center; width: 28px; height: 28px; background: #eef1f6; border-radius: 7px; font-size: 12px; font-weight: 800; }
.scenario-family[aria-pressed="true"] .scenario-family-code { background: #267f75; color: white; }
.scenario-family strong { font-size: 14px; line-height: 1.35; }
.scenario-family-description { color: #647085; font-size: 12px; line-height: 1.55; }
.scenario-family-count { margin-top: auto; padding-top: 4px; color: #365951; font-size: 11px; font-weight: 700; }
.scenario-explorer .scenario-search-panel { margin-top: 20px; padding: 24px; }
.scenario-explorer .scenario-search-form { margin-top: 16px; }
.scenario-search-form .scenario-filter-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.scenario-filter-grid label { min-width: 0; font-size: 12px; margin: 0; }
.scenario-filter-grid select { display: block; margin-top: 7px; width: 100%; min-height: 42px; padding: 8px; font: inherit; font-size: 12px; color: #414a60; border: 1px solid #d7deea; border-radius: 7px; background: #fff; }
.scenario-filter-grid select:focus-visible { outline: 3px solid #209e91; outline-offset: 2px; }
.scenario-topic, .scenario-filter-chip, .scenario-text-button, .scenario-group-all { cursor: pointer; font: inherit; }
.scenario-topic { padding: 9px 12px; border: 1px solid #dce5e6; border-radius: 8px; font-size: 12px; font-weight: 650; color: #526170; background: white; min-height: 40px; }
.scenario-topic[aria-pressed="true"] { background: #e9f5f1; border-color: #328a80; color: #20685f; }
.scenario-topic-shortcuts, .scenario-active-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.scenario-active-filters:empty { display: none; }
.scenario-filter-chip { background: #eff2f7; color: #414a60; font-size: 12px; border: 0; border-radius: 6px; min-height: 36px; padding: 8px 11px; overflow-wrap: anywhere; }
.scenario-text-button { background: none; border: 0; color: #267f75; font-size: 12px; font-weight: 700; min-height: 40px; }
.scenario-result-heading { display: flex; gap: 12px; justify-content: space-between; align-items: center; border-top: 1px solid #edf0f5; margin: 18px 0 12px; padding-top: 14px; }
.scenario-result-heading .scenario-results-count { border: 0; margin: 0; padding: 0; color: #3b475c; }
.scenario-result-heading > span { font-size: 11px; color: #6a7385; }
.scenario-group { border: 1px solid #e0e6ed; border-radius: 10px; margin-top: 10px; overflow: hidden; }
.scenario-group-heading { display: flex; align-items: center; gap: 16px; list-style: none; cursor: pointer; padding: 17px 18px; background: #fff; }
.scenario-group-heading::-webkit-details-marker { display: none; }
.scenario-group-heading:hover, .scenario-group[open] .scenario-group-heading { background: #f6f9fa; }
.scenario-group-title { display: flex; align-items: center; gap: 13px; flex: 1; min-width: 0; }
.scenario-group-title strong { font-size: 14px; line-height: 1.45; }
.scenario-group-code { border-radius: 5px; background: #eaf0f4; padding: 5px 7px; font-size: 11px; font-weight: 750; flex: none; }
.scenario-group-count { font-size: 12px; color: #637084; white-space: nowrap; }
.scenario-group-chevron { font-size: 18px; color: #637084; transition: transform .15s; }
.scenario-group[open] .scenario-group-chevron { transform: rotate(180deg); }
.scenario-variants { margin: 0; padding: 0; list-style: none; }
.scenario-variant { padding: 17px 20px; border-top: 1px solid #e8edf2; }
.scenario-variant-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 11px; color: #607086; }
.scenario-variant-id { font-weight: 750; color: #287f75; }
.scenario-variant-meta .scenario-chip--review { padding: 3px 6px; border-radius: 5px; }
.scenario-variant h3 { font-size: 15px; line-height: 1.5; margin: 8px 0 5px; }
.scenario-variant h3 a { color: #303b52; text-decoration: none; }
.scenario-variant h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.scenario-variant p { font-size: 12px; line-height: 1.65; color: #626e81; margin: 0 0 8px; }
.scenario-variant-link { display: inline-block; padding: 5px 0; color: #24766d; font-size: 12px; font-weight: 700; text-decoration: none; }
.scenario-group-all { display: block; padding: 14px 20px; width: 100%; text-align: left; font-size: 12px; color: #24766d; border: 0; border-top: 1px solid #e8edf2; background: #f7fbfa; }
.scenario-reading-guide, .scenario-document-context { padding: 20px 24px; border: 1px solid #dce6e8; border-radius: 12px; background: #f5f9f9; margin: 20px 0; font-size: 13px; line-height: 1.7; }
.scenario-reading-guide summary { cursor: pointer; font-weight: 700; }
.scenario-reading-guide ol { padding-left: 20px; }
.scenario-reading-guide li + li { margin-top: 8px; }
.scenario-reading-guide p, .scenario-document-context p { color: #607084; margin: 8px 0; }
.scenario-document-links { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.scenario-document-links a { color: #24766d; font-size: 12px; font-weight: 700; text-underline-offset: 3px; }
.scenario-explorer [data-search-results][aria-busy="true"] { opacity: .5; }
@media (max-width: 1150px) {
    .scenario-families { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .scenario-search-form .scenario-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
    .scenario-explorer .scenario-explorer-hero { padding: 22px 20px; }
    .scenario-explorer .scenario-explorer-hero p { font-size: 12px; }
    .scenario-families { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .scenario-family { padding: 13px; gap: 7px; }
    .scenario-family:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: 28px 1fr; align-items: center; }
    .scenario-family:last-child .scenario-family-description, .scenario-family:last-child .scenario-family-count { grid-column: 2; }
    .scenario-family-description { display: none; }
    .scenario-family strong { font-size: 12px; }
    .scenario-family-count { font-size: 10px; }
    .scenario-explorer .scenario-search-panel { padding: 16px; }
    .scenario-search-form .scenario-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .scenario-filter-grid label:last-child { grid-column: 1 / -1; }
    .scenario-explorer .scenario-section-heading h2 { font-size: 19px; }
    .scenario-group-heading { padding: 14px 12px; gap: 8px; flex-wrap: wrap; }
    .scenario-group-title { flex-basis: calc(100% - 30px); }
    .scenario-group-title strong { font-size: 13px; }
    .scenario-group-count { order: 3; margin-left: 48px; font-size: 11px; }
    .scenario-group-chevron { margin-left: auto; }
    .scenario-variant { padding: 15px; }
    .scenario-result-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
    .scenario-reading-guide, .scenario-document-context { padding: 16px; }
    .scenario-explorer .scenario-pagination { flex-wrap: wrap; gap: 10px; }
}

html:has(.scenario-page) { min-width: 0; }
@media (max-width: 380px) {
    .scenario-search-form .scenario-filter-grid { grid-template-columns: minmax(0, 1fr); }
}
