/* Automation scenarios page: layout and the parts only this page has.
   Colors, type and the shared surfaces (cards, tiles, controls, tables) come from /css/page.css and
   /future-of-work/app.css, which also sets this page's tokens (--ink, --bg, --acc, the three data colors). */
* { box-sizing: border-box; margin: 0; padding: 0; }
.hidden { display: none !important; }

main { display: grid; grid-template-columns: 318px minmax(0, 1fr); gap: var(--space-lg); max-width: var(--container); margin-inline: auto; padding: var(--space-sm) var(--gutter) var(--space-xl); }
aside { position: sticky; top: var(--nav-clear); align-self: start; max-height: calc(100vh - var(--nav-clear) - var(--space-sm)); overflow: auto; }
#content { min-width: 0; }
@media (max-width: 860px) { main { grid-template-columns: minmax(0, 1fr); } aside { position: static; max-height: none; } }

.card h3 { margin: 12px 0 5px; }
.card h3 .meta { margin-left: 4px; font-family: var(--font-body); }
.card > h3:first-of-type { margin-top: 4px; }
.panel .lede { color: var(--mute); font-size: var(--text-sm); margin: -2px 0 8px; max-width: 860px; }

.opts { display: grid; gap: 4px; }
.app .opts button { text-align: left; }
.opts button small { display: block; }
.steps { display: flex; gap: 4px; flex-wrap: wrap; }
.app .steps button { flex: 1 1 0; min-width: 44px; text-align: center; padding: 6px 2px; font-variant-numeric: tabular-nums; }
.app .steps.scope button { font-weight: 600; }

.pick { margin-top: 10px; position: relative; }
.pick label { display: block; margin: 8px 0 3px; color: var(--ink); font: 600 var(--text-xs)/1.3 var(--font-display); }
select, input[type=text] { width: 100%; }
.suggest { list-style: none; position: absolute; left: 0; right: 0; z-index: 15; max-height: 300px; overflow: auto; background: var(--color-tile); border: var(--rule-hair) solid var(--color-ink); border-radius: var(--radius-pill); }
.suggest li { padding: 5px 9px; cursor: pointer; font-size: var(--text-sm); }
.suggest li small { color: var(--mute); margin-left: 6px; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--accbg); }

.meterbar { display: flex; gap: 2px; height: 14px; overflow: hidden; background: var(--track); box-shadow: inset 0 0 0 1px var(--line); margin: 6px 0 6px; }
.meterbar span { display: block; height: 100%; min-width: 0; }
.keys { display: flex; gap: 4px 12px; flex-wrap: wrap; font-size: var(--text-xs); color: var(--mute); }
.key i { display: inline-block; width: 10px; height: 10px; margin-right: 4px; vertical-align: -1px; }
.key b { color: var(--ink); font: 500 0.75rem/1 var(--font-outlier); font-variant-numeric: tabular-nums; }
.big { font: 500 1.25rem/1.25 var(--font-outlier); font-variant-numeric: tabular-nums; letter-spacing: -0.04em; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-xs); margin: 0 0 var(--space-sm); }
.tile.wide { grid-column: span 2; }
.head h2 { font-size: var(--text-xl); letter-spacing: var(--tracking-display); }
.head { margin-bottom: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: var(--space-sm); }
.grid2 > .card { margin-bottom: 0; }
.stack > * + * { margin-top: var(--space-sm); }

main svg { display: block; width: 100%; height: auto; overflow: visible; }
main svg text { font-family: var(--font-display); font-weight: 500; font-size: 11px; fill: var(--mute); }
main svg text.lab { fill: var(--ink); font-size: 11.5px; }
main svg .grid { stroke: var(--grid); stroke-width: 1; }
main svg .axis { stroke: var(--line2); stroke-width: 1; }
main svg .zero { stroke: var(--ctx2); stroke-width: 1; }
.legend { display: flex; gap: 4px 14px; flex-wrap: wrap; width: auto; margin: 2px 0 6px; align-items: center; color: var(--mute); font-size: var(--text-xs); }
.legend svg { display: inline-block; width: 26px; height: 10px; vertical-align: middle; margin-right: 4px; }

.rows { display: grid; gap: 2px; }
.rrow { display: grid; grid-template-columns: minmax(120px, 38%) 1fr 64px; gap: 8px; align-items: center; font-size: var(--text-xs); padding: 2px 4px; }
.rrow .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rrow .val { text-align: right; font: 400 0.75rem/1.6 var(--font-outlier); font-variant-numeric: tabular-nums; }
.rrow.sel { background: var(--accbg); font-weight: 500; }
.rrow.sel .val { font-weight: 500; }
button.rrow { font: inherit; font-size: var(--text-xs); color: inherit; background: none; border: 0; text-align: left; cursor: pointer; width: 100%; }
button.rrow:hover { background: var(--panel); }
.rrow.axisrow { color: var(--mute); font: 500 11px/1.3 var(--font-display); }
.scroll { max-height: 560px; overflow: auto; }
.widenames .rrow { grid-template-columns: minmax(150px, 50%) 1fr 64px; }
.chart { min-height: 40px; }
.chart svg { max-width: 760px; }
@media (max-width: 560px) {
  .rrow, .widenames .rrow { grid-template-columns: 1fr 64px; row-gap: 0; }
  .rrow .nm { grid-column: 1 / -1; white-space: normal; }
  .rrow.axisrow > span:first-child { display: none; }
  .tile.wide { grid-column: auto; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
}

tr.cur td { font-weight: 500; background: var(--accbg); }
details { margin-top: 10px; }
details summary { cursor: pointer; color: var(--ink); font-size: var(--text-sm); font-weight: 500; text-decoration: underline; text-decoration-color: var(--acc); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
details summary::marker { color: var(--acc); }
details .tw { overflow: auto; margin-top: 6px; }

/* Exposure indexes, exposure read as loss, and the simulated result. The read-as-loss column and bar take the accent, as the dashed line in the scatter does. */
.tiles.ix { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 0; }
.ixbar { height: 4px; margin: 5px 0 6px; background: var(--track); box-shadow: inset 0 0 0 1px var(--line); }
.ixbar span { display: block; height: 100%; }
.ixnotes { margin-top: 6px; padding-left: 18px; color: var(--color-ink-2); font-size: var(--text-sm); line-height: 1.45; }
.ixnotes li { max-width: 80ch; }
.ixnotes li + li { margin-top: 4px; }
.vs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: var(--space-sm) var(--space-lg); margin: var(--space-sm) 0; }
.vs > div { padding-top: var(--space-xs); border-top: var(--rule-bar) solid var(--color-rule-2); }
.vs > .vs-loss { border-top: var(--rule-bar) dashed var(--acc); }
.card .vs h3 { margin: 0 0 4px; }
.vs-text { margin-top: 6px; max-width: 72ch; color: var(--color-ink-2); font-size: var(--text-sm); line-height: 1.45; }
.vs-list { margin-top: 6px; list-style: none; color: var(--color-ink-2); font-size: var(--text-sm); line-height: 1.45; }
.vs-list li + li { margin-top: 2px; }
.vs-list b { color: var(--ink); font: 500 0.8125rem/1.45 var(--font-outlier); font-variant-numeric: tabular-nums; }
.vs-figs { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-lg); margin-top: 8px; }

.about { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: var(--space-md) var(--space-xl); max-width: var(--container); margin-inline: auto; padding: var(--space-lg) var(--gutter); }
.about > div { padding-top: var(--space-sm); border-top: var(--rule-bar) solid var(--color-rule-2); }
.about h2 { margin-bottom: var(--space-xs); color: var(--ink); font-size: var(--text-lg); }
.about p, .about li { max-width: 68ch; color: var(--color-ink-2); font-size: var(--text-md); line-height: 1.5; }
.about p + p { margin-top: var(--space-xs); }
.about ul { padding-left: 18px; }
.about li + li { margin-top: var(--space-2xs); }
.app-foot p + p { margin-top: var(--space-xs); }

#tip { position: fixed; z-index: 50; pointer-events: none; display: none; max-width: 300px; padding: 6px 9px; background: var(--ink); border-radius: var(--radius-pill); color: var(--color-sheet); font-size: var(--text-xs); line-height: 1.35; }
#tip b { display: block; font: 600 var(--text-xs)/1.3 var(--font-display); }
#tip span { display: block; font-variant-numeric: tabular-nums; }
