@font-face { font-family: "Inter"; src: url("fonts/InterVariable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/InterVariable-Italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
/* Analyst Desk. Light, calm and precise, with one accent (deep teal) kept apart from the chart series colors.
   Body text is 16px since the page is read over a shared screen. Status always pairs a color with an icon. */
:root {
  --bg: #F6F7F9; --surface: #FFFFFF; --surface-2: #EEF0F3; --border: #E3E6EA; --text: #0F1419; --text-muted: #4A5361;
  --grid: #E6E8EC; --axis: #C9CDD3; --accent: #0F766E; --accent-soft: rgba(15, 118, 110, .09); --accent-contrast: #FFFFFF;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --spark: #a3abb6;
  --good: #0ca30c; --good-text: #006300; --warn: #fab219; --bad: #d03b3b; --bad-text: #b42323; --info: #5b6b7f;
  --good-bg: rgba(12, 163, 12, .07); --bad-bg: rgba(208, 59, 59, .07); --info-bg: rgba(91, 107, 127, .08);
  --shadow: 0 16px 40px rgba(15, 20, 25, .16); --maxw: 1320px; --drawer-w: min(560px, 100vw);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; }
code { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0 0 10px; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--text-muted); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; z-index: 80; background: var(--surface); padding: 8px 12px; border-radius: 6px; }
svg.icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round;
  stroke-linejoin: round; }

/* Every line runs the full width of its block before it wraps, headings and labels included. Pretty wrapping keeps a
   single word from standing alone on a last line, and balanced wrapping isn't used, since it ends lines early to even
   them out. Our own copy is rephrased wherever a last line still holds only one or two words (app.js spillReport). */
h1, h2, h3, h4, figcaption, summary, .sd, .tile-label, p, li, dd, dt, td, th, .note span { text-wrap: pretty; }
/* A figure and its punctuation. text-wrap and white-space both set the wrap mode in current Chrome, and a balance rule
   like .note span would turn wrapping back on, so this one wins outright. */
.nw { white-space: nowrap !important; text-wrap: nowrap !important; }

/* ------------------------------------------------------------------ header */
header.top { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--border); }
.bar, .tabs ul, main, footer .wrap { max-width: var(--maxw); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 14px; padding-bottom: 8px; }
.brand { display: flex; align-items: flex-start; gap: 14px; }
/* The mark spans both header rows: its top meets the top of the title's capitals, which sit about 6px into the
   title's 30px line, and its bottom meets the bottom of the line under it, about 49px down. */
.brand .mark { flex: none; width: 43px; height: 43px; margin-top: 6px; color: var(--accent); }
.brand .mark svg { display: block; width: 100%; height: 100%; }
/* The mark is the way back to the start, so it takes the pointer and dims a little under it. */
.brand a.mark { border-radius: 11px; transition: opacity .15s; }
.brand a.mark:hover { opacity: .85; }
.brand h1 { font-size: 24px; }
.brand .line { margin: 0; color: var(--text-muted); font-size: 14px; }
.bar-right { text-align: right; }
.bar-right p { margin: 0; font-size: 14px; }

.strip { margin: 0 0 14px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.step { position: relative; display: grid; grid-template-columns: 26px 1fr; column-gap: 8px; align-items: start;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  transition: border-color .2s ease-out, background .2s ease-out, opacity .2s ease-out; }
.step .dot { grid-row: span 2; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--axis); color: transparent; background: var(--surface); }
.step .st { font-weight: 600; font-size: 16px; }
.step .sd { font-size: 14px; color: var(--text-muted); line-height: 1.35; }
.step.idle { opacity: .55; }
.step.idle .sd { visibility: hidden; }
.step.active { border-color: var(--accent); background: var(--accent-soft); opacity: 1; }
.step.active .dot { border-color: var(--accent); animation: pulse 0.9s ease-out infinite; }
.step.done .dot { background: var(--good); border-color: var(--good); color: #fff; }
.step.held { border-color: var(--bad); background: var(--bad-bg); }
.step.held .dot { background: var(--bad); border-color: var(--bad); color: #fff; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(15, 118, 110, .35); } 100% { box-shadow: 0 0 0 9px rgba(15, 118, 110, 0); } }

.tabs ul { list-style: none; display: flex; gap: 4px; padding-top: 0; padding-bottom: 0; margin: 0 auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; font-size: 16px; font-weight: 500; color: var(--text-muted);
  border-bottom: 2px solid transparent; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }

/* ------------------------------------------------------------------ main */
main { padding-top: 18px; padding-bottom: 48px; }
.tab { display: none; }
.tab.active { display: block; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.controls .spacer { flex: 1; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--surface); font-weight: 500; font-size: 14px; line-height: 1.2; white-space: nowrap; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); font-weight: 600; }
/* The Run button's three labels and two icons share one spot each, so its size never changes */
#run .run-icons, #run .run-labels { display: inline-grid; }
#run .run-icons > svg, #run .run-labels > span { grid-area: 1 / 1; visibility: hidden; }
#run[data-mode="run"] [data-lbl="run"], #run[data-mode="replay"] [data-lbl="replay"],
#run[data-mode="skip"] [data-lbl="skip"], #run[data-mode="skip"] [data-ico="skip"],
#run:not([data-mode="skip"]) [data-ico="play"] { visibility: visible; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-muted); }
.btn.ghost:hover { color: var(--text); border-color: var(--border); }
.btn.icon { width: 36px; height: 36px; padding: 0; justify-content: center; }
.btn.on { border-color: var(--accent); background: var(--accent-soft); }
.btn.primary.on { background: #0b5e57; border-color: #0b5e57; color: var(--accent-contrast); }
.menu { position: relative; }
.menu-list { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 340px; list-style: none; margin: 0;
  padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); }
.menu-list button { width: 100%; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 6px; font-size: 14px; }
.menu-list button:hover, .menu-list button:focus-visible { background: var(--surface-2); }

.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 10px; margin-bottom: 14px;
  border: 1px solid; font-size: 16px; }
.banner p { margin: 0; }
.banner .icon { margin-top: 3px; }
.banner.ok { background: var(--good-bg); border-color: rgba(12, 163, 12, .3); color: var(--good-text); }
.banner.ok p { color: var(--text); }
.banner.held { background: var(--bad-bg); border-color: rgba(208, 59, 59, .35); color: var(--bad-text); }
.banner.held p { color: var(--text); }
.banner .banner-test { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 18px 20px; margin-bottom: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.panel h3 { font-size: 20px; }
.panel h4 { font-size: 14px; margin: 6px 0 8px; color: var(--text-muted); font-weight: 600; }
.lookalike { border-left: 4px solid var(--info); }
.intake { border-left: 4px solid var(--accent); }
.intake-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; margin-top: 8px; }
table.map { width: 100%; border-collapse: collapse; font-size: 16px; }
table.map th { text-align: left; font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--border); padding: 6px 8px; }
table.map td { padding: 6px 8px; border-bottom: 1px solid var(--grid); vertical-align: top; }
table.map tr.chg td:first-child { font-weight: 600; }
table.map .was { display: block; font-weight: 400; color: var(--text-muted); font-size: 12px; text-decoration: line-through; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.tag.changed { background: var(--accent-soft); color: var(--accent); }
.tag.new { background: var(--surface-2); color: var(--text-muted); }
.result { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; margin-top: 10px; }
.result.ok { color: var(--good-text); }
.result.held { color: var(--bad-text); }
.result .icon { margin-top: 4px; }
.tie { font-size: 16px; margin: 8px 0 0; }
.eval { font-size: 16px; margin-top: 10px; }
.upload { border-left: 4px solid var(--accent); }
.upick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin: 8px 0 16px; }
.uchip { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; row-gap: 4px; align-items: center;
  text-align: left; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.uchip code { grid-row: span 2; font-weight: 600; color: var(--accent); }
.uchip-h { font-size: 14px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uchip .tag { justify-self: start; }
.uchip:hover { border-color: var(--accent); }
.uchip.on { border-color: var(--accent); background: var(--accent-soft); }
.udetail { border-top: 1px solid var(--grid); padding-top: 12px; }
.ufile { margin: 0 0 6px; }
.tag.held { background: var(--bad-bg); color: var(--bad-text); }
.prerun .files { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 18px; }
.prerun .files li { display: flex; gap: 8px; align-items: center; color: var(--text-muted); }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.tile-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.tile-label { font-weight: 600; font-size: 14px; }
.tile-period { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.tile-value { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; margin: 6px 0 2px; }
.tile-foot { font-size: 14px; color: var(--text-muted); min-height: 22px; }
.tile.affected { border-color: var(--warn); box-shadow: inset 3px 0 0 var(--warn); }

/* cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; }
.card.held { border-color: rgba(208, 59, 59, .45); }
.card-head { margin-bottom: 8px; }
.ch-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.card-head h3 { font-size: 20px; }
.tiles-caption { font-size: 14px; color: var(--text-muted); margin: 0 0 6px; }
.card .sector { margin: 2px 0 0; color: var(--text-muted); font-size: 14px; }
.card h4 { font-size: 14px; text-transform: none; color: var(--text-muted); margin: 14px 0 6px; font-weight: 600; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px;
  border-radius: 999px; white-space: nowrap; }
.pill.s-final { background: var(--good-bg); color: var(--good-text); }
.pill.s-held { background: var(--bad-bg); color: var(--bad-text); }
.pill.s-expected { background: var(--info-bg); color: var(--info); }
.kpis { display: grid; }
.kpi { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 10px; padding: 7px 0;
  border-bottom: 1px solid var(--grid); }
.kpi:last-child { border-bottom: 0; }
.klabel { font-size: 16px; color: var(--text-muted); display: inline-flex; align-items: center; gap: 6px; }
.kval { text-align: right; font-size: 20px; font-weight: 600; }
.kvar { font-size: 14px; }
.kspark { text-align: right; line-height: 0; }
.kpi.affected .klabel { color: var(--bad-text); }
.kpi.affected .kval .num { color: var(--bad-text); text-decoration-color: var(--bad); }
.aff { color: var(--warn); display: inline-flex; }
.spark { display: inline-block; vertical-align: middle; }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.note { display: grid; grid-template-columns: 18px 1fr; gap: 8px; font-size: 16px; line-height: 1.45; }
.note .icon { margin-top: 3px; }
.note.s-pass .icon { color: var(--good); }
.note.s-flag .icon { color: var(--bad); }
.note.s-expected .icon, .note.s-info .icon { color: var(--info); }
.commentary p { font-size: 16px; margin-bottom: 8px; }
.commentary .ai-label { display: flex; gap: 6px; align-items: flex-start; color: var(--text-muted); font-size: 14px; margin: 6px 0 0; }
.commentary .ai-label .icon { width: 14px; height: 14px; margin-top: 2px; color: var(--accent); }

/* figures that open their trace */
.num { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline;
  text-decoration-style: dotted; text-decoration-color: var(--axis); text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.num:hover, .num:focus-visible { color: var(--accent); text-decoration-color: var(--accent); }
.num.meta { text-decoration-style: dotted; }
span.num.meta { cursor: default; text-decoration: none; }

/* ------------------------------------------------------------------ the Deal tab */
.deal-head { margin: 4px 0 12px; }
.deal-head h2 { font-size: 24px; }
.deal-head p { margin: 4px 0 0; }
.dataroom .files { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 24px; }
.dfile { width: 100%; display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: start; text-align: left;
  padding: 8px 10px; margin: -8px -10px; border: 1px solid transparent; border-radius: 6px; background: none; }
.dfile:hover, .dfile:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.dfile .icon { margin-top: 3px; }
.dfile-n { display: grid; }
.dataroom .files .muted { font-size: 14px; }
.dataroom .sha { color: var(--text-muted); font-size: 12px; }
.tablewrap { overflow-x: auto; }
table.assume { width: 100%; border-collapse: collapse; font-size: 16px; }
table.assume th { text-align: left; font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--border); padding: 8px; }
table.assume td { padding: 8px; border-bottom: 1px solid var(--grid); vertical-align: top; }
table.assume td:first-child { min-width: 220px; white-space: nowrap; }
table.assume .r { text-align: right; white-space: nowrap; }
table.assume td.why { font-size: 14px; color: var(--text); min-width: 380px; }
.pill.s-agent { background: var(--accent-soft); color: var(--accent); }
.pill.s-override { background: rgba(250, 178, 25, .18); color: #7a5200; }
.pill.s-history { background: var(--surface-2); color: var(--text-muted); }
.ai-label { display: flex; gap: 6px; align-items: flex-start; color: var(--text-muted); font-size: 14px; margin: 10px 0 0; }
.ai-label .icon { width: 14px; height: 14px; margin-top: 2px; color: var(--accent); }
.tiles.six { grid-template-columns: repeat(6, 1fr); }
.tiles.six .tile { display: flex; flex-direction: column; }
.tiles.six .tile-value { margin-top: auto; }
.tiles.six .tile-value { font-size: 32px; }
.fbar { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 6px 6px 0 0; padding: 6px 10px;
  background: var(--surface-2); font-size: 14px; min-height: 40px; }
.fx-cell { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; min-width: 120px; font-weight: 600; }
.fx { font-style: italic; color: var(--text-muted); }
.fx-text { flex: 1; font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: 14px; overflow-x: auto; white-space: nowrap; }
.fref { border: 0; background: var(--accent-soft); color: var(--accent); border-radius: 4px; padding: 0 3px; font: inherit; }
.sheets { border: 1px solid var(--border); border-top: 0; max-height: max(300px, min(560px, calc(100vh - 330px))); overflow: auto;
  background: #fff; }
.sheet { display: none; }
.sheet.active { display: block; }
table.xl { border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; table-layout: fixed; }
table.xl th { position: sticky; top: 0; background: #f3f4f6; color: #6b7280; font-weight: 500; font-size: 12px; border: 1px solid #e5e7eb;
  padding: 2px 4px; z-index: 1; }
table.xl tbody th { position: sticky; left: 0; top: auto; text-align: right; min-width: 34px; }
table.xl td { border: 1px solid #eef0f3; padding: 3px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: cell; }
table.xl td.n { text-align: right; }
table.xl td.k-input { color: #0000FF; }
table.xl td.k-link { color: #008000; }
table.xl td.k-formula_b, table.xl td.k-label_b, table.xl td.k-header, table.xl td.k-header_l, table.xl td.k-title,
table.xl td.k-section { font-weight: 600; }
table.xl td.k-title { font-size: 16px; }
table.xl td.k-section { color: var(--accent); }
table.xl td.k-header, table.xl td.k-header_l { background: #eef0f3; }
table.xl td.k-header { text-align: right; }
table.xl td.k-note { color: #5b6b7f; font-style: italic; }
table.xl td.k-text { white-space: normal; }
table.xl td.ok { background: #C6EFCE; color: #006100; font-weight: 700; text-align: center; }
table.xl td.bad { background: #FFC7CE; color: #9C0006; font-weight: 700; text-align: center; }
table.xl td.sel { outline: 2px solid var(--accent); outline-offset: -2px; }
.sheet-tabs { display: flex; flex-wrap: wrap; gap: 2px; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 6px 6px;
  padding: 4px 6px; background: var(--surface-2); }
.sheet-tab { border: 1px solid transparent; background: none; padding: 4px 10px; border-radius: 6px; font-size: 14px; }
.sheet-tab.active { background: #fff; border-color: var(--border); font-weight: 600; color: var(--accent); }
.notes.big .note { font-size: 16px; }
.claim { font-style: italic; color: var(--text-muted); margin-bottom: 4px; }

/* the memo */
.memo { border-left: 4px solid var(--accent); }
.memo-head .kicker { margin: 0 0 4px; font-size: 12px; font-weight: 600; color: var(--accent); }
.memo-head h3 { font-size: 24px; }
.draft-line { display: flex; gap: 8px; align-items: flex-start; color: var(--text-muted); font-size: 14px; margin: 8px 0 0; }
.draft-line .icon { margin-top: 3px; color: var(--accent); }
.memo-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0 10px; }
.memo-controls .test-note { font-size: 14px; }
.memo-controls .spacer { flex: 1; }
.gate { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 6px; margin: 10px 0; font-size: 16px; }
.gate p { margin: 0; }
.gate .icon { margin-top: 3px; }
.gate.pass { background: var(--good-bg); color: var(--good-text); }
.gate.pass p { color: var(--text); }
.gate.fail { background: var(--bad-bg); color: var(--bad-text); border: 1px solid rgba(208, 59, 59, .35); }
.gate.fail p { color: var(--text); }
mark { background: rgba(208, 59, 59, .18); color: var(--bad-text); padding: 0 2px; border-radius: 3px; font-weight: 600; }
.memo-body { max-width: 980px; }
.memo-section { margin-top: 18px; }
.memo-section h4 { font-size: 20px; margin-bottom: 6px; color: var(--text); }
.memo-section h5 { font-size: 16px; margin: 10px 0 4px; }
.memo-section p, .memo-section li { font-size: 16px; line-height: 1.6; }
table.memo-table { border-collapse: collapse; font-size: 14px; margin: 8px 0 4px; font-variant-numeric: tabular-nums; }
table.memo-table th { text-align: left; font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--border); padding: 5px 10px; }
table.memo-table td { padding: 5px 10px; border-bottom: 1px solid var(--grid); }
table.memo-table .r { text-align: right; }
table.memo-table.claims-table td:first-child { font-style: italic; color: var(--text-muted); max-width: 460px; }
.table-caption { font-size: 14px; color: var(--text-muted); margin: 10px 0 0; }

@media print {
  body.print-memo header.top, body.print-memo footer, body.print-memo .controls, body.print-memo .deal-head,
  body.print-memo .dataroom, body.print-memo .assumptions, body.print-memo .model-summary, body.print-memo .modelview,
  body.print-memo .claims, body.print-memo .memo-controls, body.print-memo [data-tab-panel="portfolio"] { display: none !important; }
  body.print-memo [data-tab-panel="deal"] { display: block !important; }
  body.print-memo .memo { border: 0; padding: 0; }
  body.print-memo .memo-body { max-width: none; font-size: 12px; }
  body.print-memo .memo-section { break-inside: avoid; }
}

/* ------------------------------------------------------------------ the board deck */
.deck-head { margin: 4px 0 14px; }
.deck-head h2 { font-size: 24px; }
.deck-head p { margin: 4px 0 0; }
.slides { display: grid; gap: 22px; }
.slide { aspect-ratio: 16 / 9; width: min(100%, 1120px); background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 2px 10px rgba(15, 20, 25, .06); padding: 26px 34px 18px; display: grid; grid-template-rows: auto auto 1fr auto; }
.slide-top { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--text-muted);
  border-bottom: 2px solid var(--accent); padding-bottom: 8px; }
.slide-top > span:last-child { white-space: nowrap; }
.slide-h { font-size: 24px; line-height: 1.25; margin: 16px 0 12px; }
.slide-body { display: grid; grid-template-columns: 1fr 1.15fr; gap: 28px; align-items: start; min-height: 0; }
.slide.wide .slide-body { grid-template-columns: 1fr; }
.slide-bullets { margin: 0; padding-left: 20px; display: grid; gap: 12px; font-size: 16px; line-height: 1.5; }
.slide-chart .chart { margin: 0; }
.slide-foot { font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--grid); padding-top: 6px; }
.mini-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.mini { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; }
.mini-l { font-size: 12px; color: var(--text-muted); }
.mini-v { font-size: 24px; font-weight: 600; }
.mini-d { font-size: 12px; }
.chart-title { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.chart-summary { font-size: 14px; color: var(--text-muted); margin: 8px 0 0; }
details.tableview { margin-top: 6px; font-size: 12px; }
details.tableview table { border-collapse: collapse; margin-top: 6px; font-variant-numeric: tabular-nums; }
details.tableview th, details.tableview td { padding: 3px 8px; border-bottom: 1px solid var(--grid); text-align: left; }
details.tableview .r { text-align: right; }
.waterfall { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 10px; align-items: end; height: 230px; }
.wf-col { display: grid; grid-template-rows: 1fr auto auto; height: 100%; text-align: center; }
.wf-plot { position: relative; border-bottom: 1px solid var(--axis); }
.wf-bar { position: absolute; left: 18%; right: 18%; border-radius: 4px 4px 0 0; background: var(--s1); }
.wf-col.total .wf-bar { background: #5b6b7f; }
.wf-col.up .wf-bar { background: var(--good); }
.wf-col.down .wf-bar { background: var(--bad); }
.wf-v { font-size: 12px; margin-top: 4px; }
.wf-l { font-size: 12px; color: var(--text-muted); }
.cols-chart .plot, .pair-chart .plot { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 12px; align-items: end;
  height: 200px; border-bottom: 1px solid var(--axis); }
.cols-chart .cc { height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.cols-chart .b { width: 60%; max-width: 48px; background: var(--s1); border-radius: 4px 4px 0 0; }
.pair-chart .pc { height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.pair-chart .b { width: 34%; max-width: 24px; border-radius: 4px 4px 0 0; }
.pair-chart .b.s1, .legend .sw.s1 { background: var(--s1); }
.pair-chart .b.s2, .legend .sw.s2 { background: var(--s2); }
.xaxis { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 12px; font-size: 12px; color: var(--text-muted);
  text-align: center; margin-top: 4px; }
.legend { list-style: none; display: flex; gap: 14px; padding: 0; margin: 8px 0 0; font-size: 14px; }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend .sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legend { flex-wrap: wrap; }
.legend .sw.s3 { background: var(--s3); }
.legend .sw.so { background: #a3abb6; }
.legend .sw.ring { border-radius: 50%; border: 2px solid var(--text); background: var(--surface); box-sizing: border-box; }

/* the scatter: a plot of fixed height with each dot directly labeled. Ticks and titles are HTML, so they keep their
   size on a shared screen, and the script moves a label to the left, above or below when the right side is taken. */
.scatter { padding-right: 28px; }
.sc-yt, .sc-xt { margin: 0; font-size: 12px; color: var(--text-muted); }
.sc-yt { margin: 0 0 8px 44px; }
.sc-xt { margin: 2px 0 0 44px; text-align: center; }
.sc-body { display: grid; grid-template-columns: 44px 1fr; }
.sc-y { position: relative; height: 300px; }
.sc-y > span, .sc-x > span { position: absolute; font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums;
  white-space: nowrap; }
.sc-y > span { right: 8px; transform: translateY(50%); }
.sc-plot { position: relative; height: 300px; border-left: 1px solid var(--axis); border-bottom: 1px solid var(--axis); }
.sc-grid { position: absolute; background: var(--grid); }
.sc-grid.h { left: 0; right: 0; height: 1px; }
.sc-grid.v { top: 0; bottom: 0; width: 1px; }
.sc-line { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--text-muted); }
.sc-line span { position: absolute; right: 6px; bottom: 3px; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.sc-pt { position: absolute; z-index: 2; width: 10px; height: 10px; margin: 0 0 -5px -5px; border-radius: 50%; background: var(--s1);
  box-shadow: 0 0 0 2px var(--surface); transition: transform .15s ease-out; }
.sc-pt::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; }
.sc-pt.s2 { background: var(--s2); }
.sc-pt.s3 { background: var(--s3); }
.sc-pt.so { background: #a3abb6; }
.sc-pt.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.sc-pt:hover { transform: scale(1.3); }
.sc-pt:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.sc-lbl { position: absolute; z-index: 1; font-size: 12px; line-height: 16px; white-space: nowrap; color: var(--text);
  pointer-events: none; transform: translate(10px, 50%); }
.sc-lbl.placed { transform: none; }
.sc-lbl.crowded { visibility: hidden; }
.sc-lbl.on { font-weight: 600; }
.sc-x { position: relative; height: 22px; margin-left: 44px; }
.sc-x > span { top: 5px; transform: translateX(-50%); }

/* model routing on How it works */
.routing h4 { margin-top: 20px; }
.tiles.proofs.route-tiles { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 18px; }
.routing .chart { margin: 0; }
table.models { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 6px; font-variant-numeric: tabular-nums; }
table.models th { text-align: left; font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--border); padding: 8px 10px; }
table.models td { padding: 8px 10px; border-bottom: 1px solid var(--grid); vertical-align: top; }
table.models th.r, table.models td.r { text-align: right; }
table.models tr:last-child td { border-bottom: 0; }
table.models td:first-child { white-space: nowrap; font-weight: 600; }
table.models .sw { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; background: var(--s1); }
table.models .sw.s2 { background: var(--s2); }
table.models .sw.s3 { background: var(--s3); }
table.models .sw.so { background: #a3abb6; }
table.models .sub { display: block; font-size: 12px; color: var(--bad-text); }
table.models .mid { display: block; margin: 2px 0 0 18px; font: 400 12px "JetBrains Mono", ui-monospace, Menlo, monospace;
  color: var(--text-muted); }
/* the blended morning: each model's share, the blend in bold, then each model alone for comparison */
table.blend { margin-bottom: 4px; }
table.models th { white-space: nowrap; }
table.blend tr.total td { font-weight: 600; border-top: 1px solid var(--border); }
table.blend tr.alone td { color: var(--text-muted); font-weight: 400; }

@media print {
  body.print-deck header.top, body.print-deck footer, body.print-deck .controls, body.print-deck .deck-head,
  body.print-deck [data-tab-panel="portfolio"], body.print-deck [data-tab-panel="deal"], body.print-deck details.tableview {
    display: none !important; }
  body.print-deck [data-tab-panel="board"] { display: block !important; }
  body.print-deck .slide { break-after: page; width: 100%; box-shadow: none; border: 0; }
}

/* ------------------------------------------------------------------ Hours and How it works */
.page-head { margin: 4px 0 14px; }
.page-head h2 { font-size: 24px; }
.page-head p { margin: 6px 0 0; color: var(--text-muted); }
.note-small { font-size: 14px; margin: 12px 0 0; }
.tile.lead { border-color: rgba(15, 118, 110, .45); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 70%); }
.tile.lead .tile-value { color: var(--accent); font-size: 48px; line-height: 1.1; }
.tile p.tile-foot { margin: 0; line-height: 1.4; }
table.hours { width: 100%; border-collapse: collapse; font-size: 16px; font-variant-numeric: tabular-nums; }
table.hours th { text-align: left; font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--border); padding: 8px 10px;
  vertical-align: bottom; }
table.hours td { padding: 8px 10px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
table.hours .r { text-align: right; white-space: nowrap; }
table.hours tfoot td { border-bottom: 0; border-top: 2px solid var(--border); font-weight: 600; padding-top: 10px; }
table.hours tfoot strong { font-size: 20px; color: var(--accent); }
table.hours input { width: 92px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; background: #fff;
  font: inherit; font-variant-numeric: tabular-nums; text-align: right; color: #0000FF; }
table.hours input:hover { border-color: var(--axis); }
table.hours input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.hbars { display: grid; gap: 16px; margin-top: 12px; }
.hrow { display: grid; grid-template-columns: minmax(180px, 240px) 1fr minmax(96px, auto); gap: 16px; align-items: center; }
.hl { font-size: 16px; }
.hpair { display: grid; gap: 4px; }
.hline { display: flex; align-items: center; min-height: 16px; }
.hb { display: block; height: 16px; border-radius: 0 4px 4px 0; min-width: 2px; transition: width .2s ease-out, filter .15s ease-out; }
.hb:hover { filter: brightness(.88); }
.hb.manual, .legend .sw.manual { background: #a3abb6; }
.hb.auto, .legend .sw.auto { background: var(--accent); }
.hback { font-size: 14px; color: var(--text-muted); white-space: nowrap; text-align: right; }
.hback span { color: var(--text); font-weight: 600; font-size: 16px; }

.arch { display: grid; grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr) 30px minmax(0, 1.05fr) 30px minmax(0, .9fr) 30px
  minmax(0, 1.1fr); align-items: stretch; margin-top: 12px; }
.acol { display: flex; flex-direction: column; justify-content: center; gap: 10px; min-width: 0; }
.acol.core .abox, .acol.gatecol .abox { flex: 1; display: flex; flex-direction: column; justify-content: center; }
/* the two input columns as one grid of two equal rows so all four boxes take the tallest one's size and keep their text
   at the top. The rows are sized to their content so nothing shrinks or clips. */
.apair { grid-column: 1 / 4; display: grid; grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr);
  grid-template-rows: 1fr 1fr; row-gap: 10px; align-self: center; min-width: 0; }
.apair > .acol { display: contents; }
.apair .src > .abox { grid-column: 1; }
.apair .in > .abox { grid-column: 3; }
.apair .abox:first-child { grid-row: 1; }
.apair .abox:last-child { grid-row: 2; }
.apair > .aflow { grid-column: 2; grid-row: 1 / 3; }
.abox { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--surface); }
.abox-t { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 16px; line-height: 1.3; }
.abox-s { font-size: 14px; color: var(--text-muted); margin: 4px 0 0; line-height: 1.4; }
.abox.agentic { border-color: rgba(15, 118, 110, .4); background: var(--accent-soft); }
.abox.agentic .icon { color: var(--accent); }
.abox.core { background: var(--accent); border-color: var(--accent); color: #fff; padding: 18px; }
.abox.core .abox-t { font-size: 20px; }
.abox.core .abox-s, .abox.core .abox-n { color: rgba(255, 255, 255, .88); }
.abox-n { font-size: 14px; margin: 10px 0 0; line-height: 1.45; }
.abox.gatebox { background: #1f2a37; border-color: #1f2a37; color: #fff; }
.abox.gatebox .abox-s { color: rgba(255, 255, 255, .8); }
.aflow { display: grid; place-items: center; color: var(--axis); }
.aflow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.arch-legend { display: flex; align-items: flex-start; gap: 6px; margin: 14px 0 0; font-size: 14px; color: var(--text-muted); }
.arch-legend .icon { color: var(--accent); margin-top: 3px; }
table.agents { width: 100%; border-collapse: collapse; font-size: 16px; margin-top: 6px; }
table.agents th { text-align: left; font-weight: 600; color: var(--text-muted); border-bottom: 1px solid var(--border); padding: 8px 10px; }
table.agents td { padding: 10px; border-bottom: 1px solid var(--grid); vertical-align: top; line-height: 1.45; }
table.agents tr:last-child td { border-bottom: 0; }
table.agents td.who { width: 17%; white-space: nowrap; }
table.agents td.who strong { display: inline-flex; align-items: center; gap: 6px; }
table.agents td.who .icon { color: var(--accent); }
table.agents td:last-child { width: 34%; }
/* the agents' roles: fixed columns, so each cell's copy is sized to a known width at every desktop size */
table.agents.roles { table-layout: fixed; }
table.roles th:nth-child(1) { width: 17%; }
table.roles th:nth-child(2) { width: 29%; }
table.roles th:nth-child(3) { width: 20%; }
table.roles th:nth-child(4) { width: 34%; }
.abox[data-code] { cursor: pointer; transition: box-shadow .15s ease-out; }
.abox[data-code]:hover, .abox[data-code]:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.code-featured { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 12px 0; }
.cfeat { display: grid; gap: 2px; text-align: left; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); }
.cfeat strong { font-size: 14px; }
.cfeat code { font-size: 12px; color: var(--text-muted); }
.cfeat:hover, .cfeat.on { border-color: var(--accent); background: var(--accent-soft); }
.code-view { display: grid; grid-template-columns: 250px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden; height: max(360px, min(580px, calc(100vh - 200px))); }
.code-tree { min-height: 0; overflow-y: auto; background: var(--surface-2); padding: 6px 0 12px; border-right: 1px solid var(--border); }
.code-folder { margin: 10px 12px 2px; font-size: 12px; font-weight: 600; color: var(--text-muted);
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; }
.code-file { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 3px 12px 3px 22px;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: 12px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.code-file:hover { background: rgba(15, 20, 25, .05); }
.code-file.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.code-pane { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0; background: #fbfbfc; }
.code-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 8px 16px; border-bottom: 1px solid var(--border);
  background: var(--surface); }
.code-head code { font-weight: 600; font-size: 13px; }
.code-head .muted { font-size: 14px; }
pre.code { margin: 0; overflow: auto; padding: 10px 16px 16px 0; line-height: 1.6; tab-size: 4; }
pre.code code { font-size: 12px; display: block; }
pre.code .ln { display: inline-block; width: 48px; padding-right: 14px; text-align: right; color: #a3abb6; user-select: none; }
.hl-k { color: #0f766e; font-weight: 600; }
.hl-s { color: #9a3412; }
.hl-c { color: #6b7280; font-style: italic; }
.hl-n { color: #1d4ed8; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.mode { border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; }
.mode.live { border-color: rgba(15, 118, 110, .4); background: var(--accent-soft); }
.mode h4 { display: flex; align-items: center; gap: 6px; font-size: 16px; color: var(--text); margin: 0 0 4px; }
.mode h4 .icon { color: var(--accent); }
.mode p { margin: 0; }
.mode .mode-cost { margin-top: 8px; font-size: 14px; color: var(--text-muted); }
.tiles.proofs { margin: 12px 0 0; }
.tile.proof .tile-value { font-size: 32px; }
.plan-line { list-style: none; margin: 14px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  position: relative; }
.plan-line::before { content: ""; position: absolute; left: 8px; right: 8px; top: 8px; height: 2px; background: var(--border); }
.plan-line li { position: relative; padding-top: 28px; }
.plan-dot { position: absolute; top: 0; left: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--surface);
  border: 4px solid var(--accent); }
.plan-line h4 { font-size: 16px; color: var(--text); margin: 0 0 6px; }
.plan-line p { font-size: 16px; margin: 0; }

/* the hours back today, which appears in the header once the morning has run */
.bar-right .hours-today { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 14px; animation: rise .2s ease-out; }
.hours-today .icon { width: 14px; height: 14px; }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* presenter mode: which step is showing and a one-line caption for it, for a few seconds after each step, and the
   control each step pressed */
.presenter { position: fixed; left: 16px; bottom: 16px; z-index: 75; display: inline-flex; flex-wrap: wrap;
  align-items: baseline; gap: 4px 10px; max-width: min(760px, calc(100vw - 32px)); padding: 10px 16px;
  border-radius: 12px; background: rgba(15, 20, 25, .9); color: #fff; font-size: 14px;
  box-shadow: var(--shadow); pointer-events: none; transition: opacity .2s ease-out; }
.presenter .pn { color: rgba(255, 255, 255, .72); font-variant-numeric: tabular-nums; }
.presenter .pl { font-weight: 600; }
.presenter .pc { flex-basis: 100%; color: rgba(255, 255, 255, .88); }
.presenter .pc:empty { display: none; }
.presenter.fade { opacity: 0; }
.pressed { animation: press 1s ease-out; }
@keyframes press { 0% { box-shadow: 0 0 0 0 rgba(15, 118, 110, .6); } 60% { box-shadow: 0 0 0 10px rgba(15, 118, 110, 0); }
  100% { box-shadow: none; } }

/* ------------------------------------------------------------------ the trace drawer */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: var(--drawer-w); z-index: 60; background: var(--surface);
  border-left: 1px solid var(--border); box-shadow: var(--shadow); display: flex; flex-direction: column;
  animation: slide .18s ease-out; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer > header { display: flex; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; border-bottom: 1px solid var(--border); }
.drawer .kicker { margin: 0 0 4px; font-size: 12px; font-weight: 600; color: var(--accent); }
.drawer h2 { font-size: 20px; }
.drawer-value { font-size: 32px; font-weight: 600; margin: 6px 0 0; }
.drawer-body { overflow-y: auto; padding: 14px 20px 28px; }
.drawer section { margin-bottom: 18px; }
.drawer h3 { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.drawer dl { display: grid; grid-template-columns: 110px 1fr; gap: 4px 12px; margin: 0; font-size: 16px; }
.drawer dt { color: var(--text-muted); }
.drawer dd { margin: 0; word-break: break-word; }
.drawer .crumbs { display: flex; flex-wrap: wrap; gap: 4px; font-size: 12px; margin-bottom: 8px; }
.drawer .crumbs button { border: 0; background: var(--surface-2); border-radius: 999px; padding: 2px 10px; }
.drawer ol.steps-list { margin: 0; padding-left: 20px; font-size: 16px; }
.drawer ul.inputs { list-style: none; margin: 0; padding: 0; font-size: 16px; }
.drawer ul.inputs li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--grid); }
.drawer ul.inputs li span:first-child { color: var(--text-muted); }
.excerpt { overflow-x: auto; border: 1px solid var(--border); border-radius: 6px; }
.excerpt table { border-collapse: collapse; font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: 12px; }
.excerpt th, .excerpt td { padding: 4px 8px; border-bottom: 1px solid var(--grid); white-space: nowrap; text-align: left; }
.excerpt th { background: var(--surface-2); font-weight: 600; }
.excerpt .rn { color: var(--text-muted); text-align: right; }
.excerpt tr.hit td { background: rgba(250, 178, 25, .14); }
.excerpt td.hit { background: rgba(250, 178, 25, .38) !important; font-weight: 700; }
.excerpt pre { margin: 0; padding: 8px 10px; font-size: 12px; line-height: 1.5; }
.excerpt pre .hit { background: rgba(250, 178, 25, .38); font-weight: 700; display: block; }
.excerpt .gap td { color: var(--text-muted); text-align: center; }
.quarantine { color: var(--bad-text); font-weight: 600; }

/* tooltip */
.tip { position: fixed; z-index: 70; background: var(--text); color: #fff; font-size: 14px; padding: 6px 9px; border-radius: 6px;
  pointer-events: none; max-width: 320px; }

footer { border-top: 1px solid var(--border); padding: 18px 0 28px; font-size: 14px; color: var(--text-muted); }
footer p { margin: 0 0 4px; }
footer a { color: var(--text); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px;
  transition: color .15s ease-out, text-decoration-color .15s ease-out; }
footer a:hover, footer a:focus-visible { color: var(--accent); text-decoration-color: var(--accent); }

/* ------------------------------------------------------------------ narrower screens
   The demo runs full screen on a laptop. These keep every tab readable down to a phone. */
.tabs ul { overflow-x: auto; scrollbar-width: none; }
.tabs button { white-space: nowrap; }
.menu-list { min-width: min(340px, calc(100vw - 32px)); }
@media (max-width: 1180px) {
  .tiles.six { grid-template-columns: repeat(3, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  table.agents.roles { table-layout: auto; }
}
@media (max-width: 1040px) {
  .steps { display: flex; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
  .step { flex: 0 0 200px; }
  .arch { grid-template-columns: 1fr; gap: 0; }
  .apair { display: contents; }
  .apair > .acol { display: flex; }
  .apair > .aflow { grid-column: auto; grid-row: auto; }
  .acol { flex-direction: row; flex-wrap: wrap; }
  .acol > .abox { flex: 1 1 200px; }
  .aflow { height: 30px; }
  .aflow svg { transform: rotate(90deg); }
  .intake-grid { grid-template-columns: 1fr; }
  .slide { aspect-ratio: auto; }
}
@media (max-width: 900px) {
  .tiles, .hours-tiles, .tiles.proofs { grid-template-columns: repeat(2, 1fr); }
  .prerun .files { grid-template-columns: repeat(2, 1fr); }
  .dataroom .files { grid-template-columns: 1fr; }
  .slide-body { grid-template-columns: 1fr; }
  .slide-h { font-size: 20px; }
  /* the agents, the routes and the model comparison read as cards on a tablet or a phone */
  table.agents thead { display: none; }
  table.agents, table.agents tbody, table.agents tr, table.agents td { display: block; width: auto; }
  table.agents tr { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
  table.agents td { border: 0; padding: 4px 0; white-space: normal; }
  table.agents td.who { width: auto; }
  table.agents td:last-child { width: auto; }
  table.agents td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600;
    color: var(--text-muted); }
  table.models thead { display: none; }
  table.models, table.models tbody, table.models tr, table.models td { display: block; width: auto; }
  table.models tr { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
  table.models td, table.models td.r { border: 0; padding: 3px 0; text-align: left; }
  table.models td:not(:first-child)::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600;
    color: var(--text-muted); }
  table.blend td:empty { display: none; }
}
@media (max-width: 760px) {
  .bar { flex-wrap: wrap; gap: 8px; }
  .bar-right { text-align: left; }
  .cards { grid-template-columns: 1fr; }
  .plan-line { grid-template-columns: 1fr; gap: 18px; }
  .plan-line::before { left: 8px; right: auto; top: 8px; bottom: 8px; width: 2px; height: auto; }
  .plan-line li { padding: 0 0 0 32px; }
  .modes { grid-template-columns: 1fr; }
  .code-view { grid-template-columns: 1fr; grid-template-rows: auto auto; height: auto; }
  .code-tree { max-height: 200px; border-right: 0; border-bottom: 1px solid var(--border); }
  pre.code { max-height: 460px; }
  .sc-y, .sc-plot { height: 260px; }
  .sc-x > span.minor { visibility: hidden; }
  .hrow { grid-template-columns: 1fr; gap: 6px; }
  .fbar { flex-wrap: wrap; }
  .memo-section p, .memo-section li { font-size: 16px; }
}
@media (max-width: 560px) {
  .bar, .tabs ul, main, footer .wrap { padding-left: 14px; padding-right: 14px; }
  .brand .line { font-size: 14px; }
  .tiles.six { grid-template-columns: repeat(2, 1fr); }
  .tile-value { font-size: 24px; }
  .tiles.six .tile-value, .tile.proof .tile-value { font-size: 24px; }
  .prerun .files { grid-template-columns: 1fr; }
  .controls .spacer { display: none; }
  .panel { padding: 14px; }
  .slide { padding: 16px; }
  .slide-top > span:nth-child(2) { display: none; }   /* the deck's heading above the slides names the meeting */
  .slide-h { font-size: 20px; }
  .slide-bullets { font-size: 14px; }
  .presenter { left: 8px; right: 8px; bottom: 8px; justify-content: center; }
  #how-code { display: none; }      /* the code excerpts need a wider screen than a phone */
}

/* ------------------------------------------------------------------ phones and touch screens (11/11)
   Everything below applies only to a phone-sized window or a touch screen, so a desktop with a mouse looks and works
   exactly as it did. */
/* iPhone Safari enlarges the text of a phone turned on its side unless the page asks it not to. Desktop browsers
   ignore this. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.presenter .pctl { display: none; }
.linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer;
  text-decoration: underline; text-decoration-color: rgba(15, 118, 110, .45); text-underline-offset: 3px; }
@media (max-width: 640px) {
  /* All five tabs fit across a phone, so none is cut off at the edge. */
  .tabs ul { justify-content: space-between; gap: 0; padding-left: 6px; padding-right: 6px; }
  .tabs button { padding: 11px 7px; min-width: 44px; }
  /* The morning's five steps in two columns, so all five show without scrolling sideways. A step that hasn't run
     yet is a single line. */
  .steps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; overflow: visible; padding-bottom: 0; }
  .step:last-child { grid-column: 1 / -1; }
  .step.idle .sd { display: none; }
  /* Hours back reads as one card per workflow, each figure on its own line beside its column's name. */
  table.hours thead { display: none; }
  table.hours, table.hours tbody, table.hours tfoot, table.hours tr { display: block; }
  table.hours tbody tr { border: 1px solid var(--border); border-radius: 10px; padding: 6px 12px; margin-bottom: 10px; }
  table.hours td { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 0;
    padding: 5px 0; }
  table.hours td::before { content: attr(data-label); color: var(--text-muted); font-size: 14px; text-align: left;
    white-space: normal; }
  table.hours tbody td:first-child { display: block; font-weight: 600; padding-top: 6px; }
  table.hours tbody td:first-child::before, table.hours tfoot td::before { content: none; }
  table.hours tfoot tr { display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    border-top: 2px solid var(--border); padding: 10px 2px 0; }
  table.hours tfoot td { display: block; border: 0; padding: 0; }
}
@media (max-width: 370px) {
  .tabs button { padding-left: 4px; padding-right: 4px; font-size: 15px; }
}
@media (max-width: 960px) and (max-height: 500px) {
  /* A phone on its side: the morning's five steps in one row. */
  .steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; overflow: visible; padding-bottom: 0; }
  .step.idle .sd { display: none; }
}
@media (hover: none) and (pointer: coarse) {
  /* Touch targets: every control is at least 44px tall, and a figure inside a sentence also takes a tap a little
     above and below it. */
  .btn { min-height: 44px; }
  .btn.icon { width: 44px; height: 44px; }
  .menu-list button { min-height: 44px; }
  .sheet-tab { min-height: 40px; padding: 8px 12px; }
  button.num { position: relative; }
  /* Even a one-digit figure takes a tap at least 28px wide. */
  button.num::after { content: ""; position: absolute; left: min(-3px, calc(50% - 14px)); right: min(-3px, calc(50% - 14px));
    top: -9px; bottom: -9px; }
  footer a { display: inline-block; padding: 12px 2px; margin: -12px -2px; }
  details.tableview > summary { padding: 10px 0; font-size: 14px; }
  table.hours input { min-height: 40px; }
  /* The tour on a touch screen. The step box takes taps and holds Back, Next and End, and it stays up until the
     tour ends (app.js touchTour). */
  .presenter { pointer-events: auto; }
  .presenter .pctl { display: flex; flex-basis: 100%; align-items: center; gap: 8px; margin-top: 6px; }
  .presenter .pctl [data-tour="next"] { margin-right: auto; }
  .presenter .pctl .btn { min-height: 40px; }
  .presenter .pctl .btn:disabled { opacity: .45; cursor: default; }
  .presenter .pctl .btn.icon { width: 40px; height: 40px; background: transparent; border-color: rgba(255, 255, 255, .35);
    color: #fff; }
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ------------------------------------------------------------------ print: today's report on one page */
@media print {
  @page { size: letter landscape; margin: 0.45in; }
  body { font-size: 11px; background: #fff; }
  header.top { position: static; border: 0; background: #fff; }
  .tabs, .controls, .drawer, .tip, .skip, .kspark, .commentary .ai-label .icon, .presenter, .hours-today { display: none !important; }
  .bar, .strip, main, footer .wrap { max-width: none; padding: 0; }
  .steps { gap: 4px; }
  .step { padding: 4px 6px; }
  .tile-value { font-size: 20px; }
  .cards { gap: 8px; }
  .card, .tile, .panel { break-inside: avoid; padding: 8px 10px; }
  .num { text-decoration: none; }
}
