/* Viewer: toolbar, stage map, service diagram, step details. */

/* The diagram view is a fixed-height app so both of its scrollbars stay on screen. */
body[data-view='sd'] { overflow: hidden; }
body[data-view='sd'] #app { height: 100vh; display: flex; flex-direction: column; }
body[data-view='sd'] .main { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* toolbar */
.toolbar { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); padding: 10px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; flex-shrink: 0; }
.search { position: relative; display: flex; align-items: center; flex: 0 1 300px; min-width: 180px; }
.search .ms { position: absolute; left: 10px; color: var(--faint); pointer-events: none; }
.search input { width: 100%; padding: 0 34px 0 36px; }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { position: absolute; right: 8px; font: 600 11px/18px inherit; font-family: inherit; color: var(--faint); border: 1px solid var(--line); border-radius: 5px; padding: 0 6px; background: #faf9f7; pointer-events: none; }
.search input:focus + kbd, .search input:not(:placeholder-shown) + kbd { display: none; }
.match { font-size: 12.5px; font-weight: 600; color: var(--orange-ink); white-space: nowrap; }

.pop-filters { width: 300px; display: grid; gap: 10px; }
.pop-filters .pop-head { margin-bottom: 0; }
.pop-themes { width: 460px; max-width: calc(100vw - 32px); display: grid; gap: 10px; }
.pop-themes .seg button { padding: 0 8px; font-size: 13px; }
.theme-list { display: grid; gap: 6px; }
.theme-list.scroll, .scoring.scroll { max-height: 58vh; overflow-y: auto; margin-right: -6px; padding-right: 6px; }
.theme { display: grid; grid-template-columns: auto 1fr; gap: 10px; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: var(--r-sm); padding: 10px 12px; font-size: 13px; line-height: 18px; transition: border-color .12s, background .12s; }
.theme:hover { border-color: #97948e; }
.theme.on { border-color: var(--orange); background: var(--orange-soft); }
.theme-fb { grid-template-columns: 1fr; }
.theme-n { width: 24px; height: 24px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.theme.on .theme-n { background: var(--orange); }
.theme-body { display: grid; gap: 3px; text-wrap: pretty; }
.theme-body b + span { color: var(--ink-2); }
.theme-body small { font-size: 12px; color: var(--muted); font-weight: 600; }
.theme-fb small + small { font-weight: 400; }
.count-ink { background: var(--ink); }
.btn-hot .count-ink { background: var(--orange); }

/* friction: a step scoring 5 of 5 is top friction, 4 of 5 is high */
.fr-top { --fr: #b5271f; --fr-tint: #fdecec; --fr-edge: #b5271f; }
.fr-high { --fr: #a86400; --fr-tint: #fff4e0; --fr-edge: #e8a317; }
.sw { width: 14px; height: 16px; flex-shrink: 0; background: var(--fr-tint); border-top: 3px solid var(--fr-edge); }
.scoring { display: grid; gap: 12px; font-size: 13px; line-height: 18px; }
.scoring-sec { display: grid; gap: 6px; min-width: 0; }
.scoring-sec + .scoring-sec { border-top: 1px solid var(--line-2); padding-top: 12px; }
.scoring-sec.frlist + .frlist { border-top: 0; padding-top: 0; }
.crit { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.crit li { display: flex; align-items: flex-start; gap: 6px; text-wrap: pretty; }
.crit .ms { font-size: 17px; margin-top: 1px; }
.tiers > span { display: flex; align-items: center; gap: 8px; }
.tiers b { color: var(--fr); }
.fidx { grid-template-columns: auto 1fr; align-items: center; column-gap: 12px; }
.fidx > b { font-size: 28px; line-height: 32px; }
.fidx span { display: grid; }
.fidx small { font-size: 12px; color: var(--ink-3); }
.frlist { gap: 2px; }
.frlist h6 { margin: 0 0 2px; font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--fr); }
.frlist button { display: grid; grid-template-columns: 48px minmax(0, 1fr) 16px; gap: 6px; align-items: center; text-align: left; border: 0; background: transparent; padding: 4px 6px; border-radius: 6px; font-size: 13px; line-height: 18px; }
.frlist button:hover { background: var(--wash); }
.frlist button b { color: var(--fr); }
.frlist button span:not(.ms) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frlist button .ms { font-size: 16px; color: var(--faint); }

.pop-guide { left: auto; right: 0; width: 440px; max-width: calc(100vw - 32px); max-height: calc(100vh - 150px); overflow-y: auto; }
.pop-guide h4 { font-size: 13px; margin: 16px 0 8px; }
.pop-guide h4:first-of-type { margin-top: 0; }
.guide-lanes { display: grid; gap: 10px; }
.guide-lane { display: grid; gap: 1px; }
.guide-lane > b { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.guide-lane > i, .guide-line > i { font-size: 12px; color: var(--muted); }
.guide-lane p, .guide-line p { font-size: 13px; line-height: 19px; color: var(--ink-2); text-wrap: pretty; }
.guide-lane .ex { font-size: 12px; line-height: 17px; color: var(--ink-3); }
.guide-line { border-top: 2px dashed #b9b6b0; padding-top: 6px; }
.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 13px; }
.guide-grid > span { display: flex; align-items: center; gap: 8px; }
.guide-marks { display: grid; gap: 8px; font-size: 13px; }
.guide-marks > span { display: flex; align-items: center; gap: 10px; }
.guide-marks .sw { margin: 0 7px; }
.mk { flex-shrink: 0; }
.mk-unk { border: 1.5px dashed #b9b6b0; color: var(--faint); font-style: italic; font-size: 12px; padding: 0 6px; border-radius: 5px; }
.mk-theme { width: 18px; height: 18px; border: 2px solid var(--orange); border-radius: 5px; }
.guide-owners { display: grid; gap: 5px; font-size: 13px; }
.guide-owners > span { display: grid; grid-template-columns: 14px 1fr auto; gap: 8px; align-items: center; }
.guide-owners i { width: 14px; height: 14px; border-radius: 4px; }
.guide-owners i.none { border: 1.5px dashed #97948e; }
.guide-owners b { color: var(--muted); font-weight: 600; }

.chipbar { background: #fff; border-bottom: 1px solid var(--line); padding: 8px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; flex-shrink: 0; }
.fchip { display: inline-flex; align-items: center; gap: 6px; background: var(--wash); border-radius: 999px; padding: 3px 4px 3px 11px; font-size: 12.5px; font-weight: 600; max-width: 420px; }
.fchip small { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fchip.hot { background: var(--orange-soft); color: var(--orange-deep); }
.fchip.hot small { color: var(--orange-ink); }
.fchip button { width: 20px; height: 20px; border: 0; border-radius: 999px; background: transparent; display: inline-flex; align-items: center; justify-content: center; color: inherit; flex-shrink: 0; }
.fchip button:hover { background: rgba(0, 0, 0, .1); }
.fchip button .ms { font-size: 15px; }

/* faces and marks */
.face { display: inline-flex; align-items: center; justify-content: center; color: var(--unk); flex-shrink: 0; }
.face-pos { color: var(--pos); } .face-neu { color: var(--neu); } .face-mix { color: var(--mix); } .face-neg { color: var(--neg); }
.unknown { font-size: 13.5px; color: var(--faint); font-style: italic; }

/* stage map */
.page { max-width: 1680px; margin: 0 auto; padding: 24px 24px 56px; }
.page-head { margin-bottom: 16px; }
.page-head h2 { font-size: 26px; line-height: 32px; }

.chart-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 9px 16px 9px 18px; border-bottom: 1px solid var(--line-2); }
.chart-head h3 { font-size: 14px; margin-right: auto; }
.chart-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.chart-legend > span { display: flex; align-items: center; gap: 6px; }
.chart-legend .sw { margin: 0 3px; }
.lg { flex-shrink: 0; }
.lg path { stroke: var(--ink); stroke-width: 2; } .lg circle { fill: var(--ink); }
.lg-staff path { stroke: var(--orange); } .lg-staff circle { fill: var(--orange); }
.chart-body { display: grid; grid-template-columns: 88px minmax(0, 1fr); height: 210px; }
.chart-axis { position: relative; border-right: 1px solid var(--line); }
.ax { position: absolute; left: 18px; transform: translateY(-50%); font-size: 12px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.ax-mix { color: var(--ink); font-weight: 700; }
.ax-neg { color: var(--neg); }
.chart-plot { position: relative; }
/* Mixed and below is the zone to worry about. */
.chart-plot .zone { position: absolute; left: 0; right: 0; bottom: 0; background: #fdf5f5; border-bottom-right-radius: 11px; pointer-events: none; }
.chart-plot .midline { position: absolute; left: 0; right: 0; border-top: 1.5px solid #7f7f7f; pointer-events: none; }
.frbar { position: absolute; top: 34px; bottom: 0; background: var(--fr-tint); border-top: 3px solid var(--fr-edge); mix-blend-mode: multiply; pointer-events: none; }
.frbar.dim { opacity: .35; }
.chart-cols { position: absolute; inset: 0; display: grid; }
.chart-col { border: 0; border-right: 1px solid var(--line-2); background: transparent; display: flex; align-items: flex-start; justify-content: center; padding: 4px 6px 0; min-width: 0; color: #9a978f; border-radius: 0; transition: background .12s, color .12s; }
.chart-col:last-child { border-right: 0; border-bottom-right-radius: 11px; }
.chart-col span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; max-height: 26px; font-size: 10px; line-height: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-wrap: balance; }
.chart-col:hover { background: rgba(232, 117, 17, .06); color: var(--orange-ink); }
.chart-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.chart-plot .seg { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-plot .seg-staff { stroke: var(--orange); }
.dot { position: absolute; z-index: 2; width: 22px; height: 22px; transform: translate(-50%, -50%); border: 0; background: transparent; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 999px; }
.dot i { width: 11px; height: 11px; border-radius: 999px; background: var(--ink); transition: transform .12s; }
.dot-staff { z-index: 1; }
.dot-staff i { background: var(--orange); }
.dot.dim { opacity: .25; }
.dot:hover, .dot:focus-visible { z-index: 5; opacity: 1; box-shadow: none; }
.dot:hover i, .dot:focus-visible i { transform: scale(1.35); }
.dot .tip { display: none; position: absolute; top: calc(100% + 2px); left: 50%; transform: translateX(-50%); width: 250px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow-2); padding: 8px 10px; font-size: 12.5px; line-height: 17px; color: var(--ink-2); text-align: left; text-wrap: pretty; pointer-events: none; }
.dot .tip b { color: var(--ink); }
.dot.tip-up .tip { top: auto; bottom: calc(100% + 2px); }
.dot.tip-left .tip { left: auto; right: -4px; transform: none; }
.dot.tip-right .tip { left: -4px; transform: none; }
.dot:hover .tip, .dot:focus-visible .tip { display: block; }
.tip-line { display: block; margin-top: 4px; font-weight: 700; color: var(--ink); }
.tip-line + .tip-line { margin-top: 1px; }
.tip-line.tip-staff { color: var(--orange-ink); }
.tip-line.tip-fr { font-size: 12px; color: var(--fr); }

/* One row of stages in journey order; it scrolls sideways when the window is narrow. */
.stages { display: grid; column-gap: 16px; margin: 14px -2px 0; padding: 2px 2px 12px; overflow-x: auto; }
.stage { grid-row: 1 / span 3; display: grid; grid-template-rows: subgrid; overflow: hidden; min-width: 0; cursor: pointer; transition: border-color .15s; }
.stage:hover { border-color: #97948e; }
.stage-head { border: 0; border-radius: 0; background: var(--ink); color: #fff; text-align: left; padding: 10px 16px; display: flex; align-items: baseline; gap: 8px; }
.stage-num { font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .08em; color: #9a978f; flex-shrink: 0; }
.stage-name { font-size: 17px; line-height: 22px; font-weight: 700; text-wrap: pretty; }
.stage-head:focus-visible { box-shadow: inset 0 0 0 3px var(--orange); }
.stage-sec { padding: 16px 16px 0; min-width: 0; }
.stage-sec:last-child { padding-bottom: 16px; }
h5 { font-size: 10.5px; line-height: 14px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--orange-ink); margin-bottom: 6px; }
.stage-sec p { font-size: 14px; line-height: 20px; text-wrap: pretty; }
.stage-sec p.lead { font-size: 15px; line-height: 21px; font-weight: 600; }
.stage .chip { white-space: normal; }
.acc { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 16px; border: 0; background: #fff; font-size: 13px; font-weight: 700; text-align: left; }
.acc .ms { color: var(--ink-3); }

/* service diagram */
.scopebar { background: #fff; border-bottom: 1px solid var(--line); padding: 10px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex-shrink: 0; }
.scope-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.scope-rule { width: 1px; height: 22px; background: var(--line); margin: 0 6px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills button { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid #d8d5d0; background: #fff; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: border-color .12s; }
.pills button:hover { border-color: #97948e; }
.pills button small { font-size: 11.5px; color: var(--faint); font-weight: 600; }
.pills button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.pills button.on small { color: #b9b6b0; }

.sd-scroll { flex: 1; min-height: 0; overflow: auto; background: #fff; overscroll-behavior: contain; }
.sd { display: flex; width: max-content; min-width: 100%; }
.sd-lanes { position: sticky; left: 0; z-index: 12; width: 178px; flex-shrink: 0; background: #fff; box-shadow: 1px 0 0 var(--line); padding-top: 76px; }
.sd-lanes-in { position: relative; }
.lane-label { position: absolute; left: 18px; right: 8px; }
.lane-name { display: flex; align-items: flex-start; gap: 4px; }
.lane-name > span:first-child { font-size: 11.5px; line-height: 15px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.lane-sub { font-size: 12px; line-height: 15px; font-style: italic; color: var(--muted); margin-top: 3px; text-wrap: pretty; }
.lane-label.is-line .lane-name > span:first-child { font-weight: 400; font-style: italic; text-transform: none; letter-spacing: 0; color: var(--muted); font-size: 12px; }

.tipwrap { position: relative; display: inline-flex; }
.tipbtn { width: 16px; height: 16px; border: 0; padding: 0; background: transparent; color: var(--faint); display: flex; align-items: center; justify-content: center; border-radius: 999px; }
.tipbtn:hover { color: var(--ink); }
.tipbtn .ms { font-size: 16px; }
.tipbox { display: none; position: absolute; left: 22px; top: -6px; width: 288px; max-width: 70vw; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow-2); padding: 12px 14px; z-index: 30; flex-direction: column; gap: 6px; font-size: 12.5px; line-height: 18px; font-weight: 400; font-style: normal; letter-spacing: 0; text-transform: none; color: var(--ink-2); text-align: left; white-space: normal; text-wrap: pretty; cursor: default; }
.tipbox > b { font-size: 13px; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.tipbox .ex { font-size: 12px; color: var(--ink-3); }
.tipbox .extra { font-size: 12px; color: var(--ink-3); border-top: 1px solid var(--line-2); padding-top: 6px; }
.tipbox .soft { color: var(--muted); }
.tipwrap.up .tipbox { top: auto; bottom: -6px; }
.tipwrap:hover .tipbox, .tipwrap:focus-within .tipbox { display: flex; }

.sd-main { position: relative; padding: 0 72px 32px 24px; flex-shrink: 0; box-sizing: content-box; }
/* Stage, scenario and step ids stay in view while the lanes scroll underneath. */
.sd-head { position: sticky; top: 0; z-index: 11; background: #fff; margin: 0 -72px 0 -24px; padding: 0 72px 0 24px; box-shadow: 0 1px 0 var(--line-2); }
.sd-groups { display: flex; gap: 36px; height: 36px; align-items: flex-end; padding-bottom: 6px; }
.sd-ids { position: relative; display: flex; gap: 36px; height: 40px; align-items: center; }
.sd-ids::before { content: ''; position: absolute; left: -24px; right: -44px; top: 50%; border-top: 2px solid #b3b0aa; }
.sd-ids::after { content: ''; position: absolute; right: -46px; top: 50%; width: 9px; height: 9px; border-top: 2px solid #b3b0aa; border-right: 2px solid #b3b0aa; transform: translateY(-50%) rotate(45deg); margin-top: 1px; }
.sd-id { position: relative; z-index: 1; width: 204px; height: 26px; flex-shrink: 0; border: 0; background: var(--ink); color: #fff; border-radius: 7px; font-size: 12px; font-weight: 700; letter-spacing: .06em; transition: background .12s, opacity .15s; }
.sd-id small { margin-left: 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.sd-id small::before { content: '· '; }
.sd-id:hover, .sd-id.sel { background: var(--orange); }
.sd-id.fr-top, .sd-id.fr-high { background: var(--fr); }
.sd-id.fr-top:hover, .sd-id.fr-high:hover { filter: brightness(1.12); }
.sd-id.dim { background: #b9b6b0; }
.sd-group { flex-shrink: 0; display: flex; align-items: baseline; gap: 8px; overflow: hidden; white-space: nowrap; }
.sd-group b { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--orange); }
.sd-group span { font-size: 13.5px; font-weight: 700; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.sd-plot { position: relative; }
.band { position: absolute; left: -24px; right: -72px; pointer-events: none; }
.band-front { background: linear-gradient(#fff, #faf9f7 24px); }
.band-back { background: #f5f4f1; }
.visline { position: absolute; left: -24px; right: -72px; border-top: 2px dashed #b3b0aa; pointer-events: none; }
.sd-plot svg { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.sd-plot .axis { stroke: #b3b0aa; stroke-width: 2; fill: none; }
.sd-plot .conn { stroke: #97948e; stroke-width: 1.75; fill: none; }
.sd-plot .conn.dim { opacity: .25; }
#arr path { fill: none; stroke: #97948e; stroke-width: 2; }
.sd-cols { position: absolute; inset: 0; display: flex; gap: 36px; }
.col { position: relative; width: 204px; height: 100%; flex-shrink: 0; cursor: pointer; border-radius: var(--r-sm); transition: opacity .15s; }
.col.dim { opacity: .26; }
.col.dim:hover { opacity: 1; }
.col-fr { position: absolute; inset: 0 -12px -16px; background: var(--fr-tint); border-top: 3px solid var(--fr-edge); border-radius: 4px 4px 0 0; mix-blend-mode: multiply; pointer-events: none; }
.col::before { content: ''; position: absolute; inset: 4px -12px 0; border: 2px solid transparent; border-radius: 14px; pointer-events: none; transition: border-color .12s; }
.col.hit::before { border-color: var(--orange); }
.col.sel::before { border-color: var(--ink); }
.col:focus-visible { box-shadow: none; } .col:focus-visible::before { border-color: var(--orange); }
.col:hover { z-index: 9; } .col.sel { z-index: 8; }
.box { position: absolute; left: 0; right: 0; border: 1.5px solid #c8c5bf; border-radius: var(--r-sm); background: #fff; font-size: 12.5px; line-height: 17px; color: var(--ink-2); transition: border-color .12s; }
.box-clip { margin: 7px 9px; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--lines, 6); }
.box-cust { border-color: #a5a29c; color: var(--ink); }
.box.unk { border-style: dashed; color: var(--faint); font-style: italic; background: #fcfbfa; }
.box-full { display: none; position: absolute; left: -1.5px; right: -1.5px; top: -1.5px; min-height: calc(100% + 3px); background: #fff; border: 1.5px solid var(--ink-3); border-radius: var(--r-sm); padding: 7px 9px; box-shadow: var(--shadow-2); z-index: 8; white-space: pre-line; text-wrap: pretty; }
.box:hover { z-index: 9; } .box:hover .box-full { display: block; }
/* Pins sit on the top-right corner of the customer and frontstage boxes. */
.pin { position: absolute; right: -11px; z-index: 10; display: inline-flex; }
.pin .face { width: 26px; height: 26px; border-radius: 999px; background: #fff; border: 2px solid currentColor; }
.pin-staff .face { border-radius: 6px; }
.pin-staff .tipbox { left: calc(100% + 8px); top: -4px; width: 264px; }

/* step details */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(12, 10, 6, .32); z-index: 70; animation: fade .15s ease-out; }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 500px; max-width: 100vw; background: #fff; z-index: 71; box-shadow: -8px 0 30px rgba(12, 10, 6, .18); display: flex; flex-direction: column; animation: slide .18s cubic-bezier(.2, .8, .3, 1); }
@keyframes slide { from { transform: translateX(32px); opacity: 0; } }
.drawer-head { background: var(--ink); color: #fff; padding: 10px 12px 16px 20px; }
.drawer-top { display: flex; align-items: center; gap: 2px; }
.crumb { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #f0a05a; }
.pos { font-size: 12px; color: #a5a29c; padding: 0 2px; white-space: nowrap; }
.drawer-title { margin-top: 6px; padding-right: 8px; font-size: 19px; line-height: 26px; color: #e6e4e0; text-wrap: pretty; }
.drawer-title b { color: #fff; }
.drawer-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag { border: 1px solid #5a5a5a; color: #dddbd6; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px; }
.tag .ms { font-size: 14px; }
.tag-flight { border-color: var(--orange); color: #f7b37a; }
.drawer-body { flex: 1; overflow-y: auto; padding: 2px 20px 24px; }
.field-block { margin-top: 18px; display: grid; gap: 5px; min-width: 0; justify-items: start; }
.field-block h5 { margin: 0; }
.field-block .hint { font-size: 12px; color: var(--muted); margin-top: -3px; }
.prose { font-size: 14px; line-height: 21px; white-space: pre-line; text-wrap: pretty; overflow-wrap: anywhere; }
.prose-big { font-size: 15px; line-height: 22px; }
.scoreline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.scoreline b { font-size: 15px; line-height: 22px; }
.frpill { font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fr); background: var(--fr-tint); padding: 1px 8px; border-radius: 999px; }
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.points li { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; color: #7f7f7f; }
.points li.met { color: var(--ink); }
.points .ms { font-size: 16px; }
.points .ring { width: 13px; height: 13px; margin: 0 1.5px; border: 1.5px solid currentColor; border-radius: 999px; flex-shrink: 0; }
.linkbtn.soft { font-size: 12px; font-weight: 400; color: var(--muted); }
.says { display: grid; gap: 3px; min-width: 0; }
.says + .says { margin-top: 8px; }
.says > b { font-size: 12px; line-height: 16px; color: var(--ink-3); }
.flight { display: flex; gap: 10px; margin-top: 4px; padding: 10px 12px; background: #fdf3e8; border: 1px solid #f3cfa8; border-radius: var(--r-sm); justify-self: stretch; }
.flight .ms { color: var(--orange-ink); }
.flight b { display: block; font-size: 12.5px; color: var(--orange-deep); } .flight span { font-size: 13.5px; line-height: 19px; }
.acc-lg { margin-top: 0; padding: 14px 0; border-top: 1px solid var(--line); font-size: 14px; justify-content: flex-start; background: transparent; }
.acc-lg:hover { background: transparent; color: var(--orange-ink); }
.field-block + .acc-lg { margin-top: 22px; }
.acc-lg small { margin-left: 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
.acc-body { padding-bottom: 14px; }
.acc-body .field-block:first-child { margin-top: 2px; }
.acc-body h5 { color: var(--ink-3); letter-spacing: .06em; }
.links { display: grid; gap: 6px; min-width: 0; }
.links a { display: flex; align-items: flex-start; gap: 6px; font-size: 13.5px; line-height: 19px; font-weight: 600; text-underline-offset: 2px; overflow-wrap: anywhere; }
.links a:hover { color: var(--orange-ink); }
.links a .ms { font-size: 16px; margin-top: 1px; }
.links small { font-size: 12px; color: var(--muted); padding-left: 22px; margin-top: -3px; }
.links .plain { font-size: 13.5px; line-height: 19px; color: var(--ink-2); padding-left: 22px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 8px 12px; display: flex; align-items: center; gap: 4px; }

@media (max-width: 900px) {
  .top { gap: 10px; padding: 0 14px; } .conf, .top-meta { display: none; }
  .toolbar, .chipbar, .scopebar { padding-left: 14px; padding-right: 14px; }
  .page { padding: 16px 14px 40px; }
  .search { flex-basis: 100%; order: 5; }
  .sd-lanes { width: 132px; } .lane-label { left: 10px; } .lane-sub { display: none; }
}
@media (max-width: 640px) {
  .toolbar .pop-anchor { position: static; }
  .toolbar .pop { left: 14px; right: 14px; width: auto; max-width: none; }
  .pop-themes .seg button { height: auto; min-height: 30px; min-width: 0; padding: 4px 6px; line-height: 1.2; white-space: normal; }
}
@media print {
  .toolbar, .chipbar, .drawer-backdrop, .avatar, .btn { display: none !important; }
  body { background: #fff; }
  /* every stage on paper: four to a row instead of one row that scrolls */
  .stages { overflow: visible; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; row-gap: 16px; }
  .stage { grid-row: span 3; break-inside: avoid; }
}
