/* Shared look for every workspace page. Load it last: it retunes the older
   workspace.css/safety.css tokens and adds the common header. */
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/workspace/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
:root {
  --ink: #1e2227;
  --muted: #59626d;
  --line: #dcdfe3;
  --surface: #f4f5f6;
  --blue: #254f9b;
  --blue-deep: #1b3d7a;
  --pass: #1f6f47;
  --fail: #b3362c;
  --warn: #7f5600;
  --line-soft: #e9ebee;
  --fail-soft: #fbeeec;
  --fail-line: #e7c3bf;
  --pass-soft: #edf6f1;
  --pass-line: #bfdccb;
  --warn-soft: #fbf5e8;
  --warn-line: #e6d3a8;
  --night: #15181c;
  --night-text: #c9ced6;
  --night-dim: #8c95a1;
  font-family: "Schibsted Grotesk", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: #fff; color: var(--ink); line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { touch-action: manipulation; }
button { cursor: pointer; }
button, .button-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 9px 14px; border: 1px solid var(--line); font-size: 14px; text-decoration: none; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 10; padding: 10px 14px; background: var(--ink); color: #fff; }
.skip:focus { top: 12px; }
h1, h2, h3 { color: var(--ink); font-weight: 650; letter-spacing: -.025em; text-wrap: balance; }
::selection { background: #e8eef8; }
/* Code: the same dark blocks as the landing page. */
pre { background: var(--night); color: var(--night-text); border-radius: 10px; padding: 16px 18px; font: 13px/1.65 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--night-dim) transparent; }
.command { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; border-radius: 8px; background: var(--night); color: #fff; overflow: hidden; }
.command::before { content: "$"; padding-left: 14px; color: var(--night-dim); font-family: ui-monospace, Menlo, Consolas, monospace; }
.command code { padding: 0 12px 0 9px; font-size: 14px; white-space: nowrap; overflow-x: auto; scrollbar-width: none; background: none; color: inherit; }
.command button { align-self: stretch; min-height: 0; border: 0; border-left: 1px solid #3a4049; border-radius: 0; background: transparent; color: #dfe3e8; font-size: 13px; }
.command button:hover { background: #23272d; }
a { color: var(--blue); }
a:hover, summary:hover { color: var(--blue-deep); }
:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
button, .button-link { border-radius: 8px; font-weight: 600; transition: background-color .15s, border-color .15s; }
.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.primary:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }
.secondary { background: #fff; border-color: var(--line); color: var(--ink); }
.secondary:hover { background: var(--surface); }
button:disabled { cursor: not-allowed; opacity: .5; }
input, select, textarea { border-color: #c4c9cf; border-radius: 6px; color: var(--ink); }
.badge { display: inline-block; border-radius: 999px; padding: 2px 9px; font-weight: 600; font-size: 12px; white-space: nowrap; }
.badge::first-letter { text-transform: uppercase; }
.badge.approved, .badge.pass { background: #e3f1e9; color: var(--pass); }
.badge.rejected, .badge.fail { background: #f8e4e2; color: var(--fail); }
.badge.pending, .badge.inconclusive { background: #f6ecd6; color: var(--warn); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Header shared by every app page. */
.app-header { display: flex; align-items: center; gap: 28px; min-height: 60px; padding: 0 max(20px, 3vw); background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.app-brand { display: inline-flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.app-brand:hover { color: var(--ink); }
.app-brand svg { width: 22px; height: 22px; fill: none; stroke: var(--blue); stroke-width: 4.5; }
.app-nav { display: flex; align-items: stretch; gap: 4px; align-self: stretch; }
.app-nav a { display: flex; align-items: center; padding: 0 12px; font-size: 15px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.app-nav a:hover { color: var(--ink); }
.app-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.app-more { position: relative; font-size: 15px; border: 0; padding: 0; margin: 0; }
.app-more summary { list-style: none; color: var(--muted); padding: 8px 4px; font-size: 15px; font-weight: 400; line-height: 1.5; }
.app-more summary::-webkit-details-marker { display: none; }
.app-more summary::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-3px) rotate(45deg); }
.app-more[open] summary { color: var(--ink); }
.app-more div { position: absolute; top: calc(100% + 6px); left: 0; display: grid; min-width: 230px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgb(30 34 39 / 12%); }
.app-more a { padding: 9px 12px; border-radius: 5px; color: var(--ink); text-decoration: none; }
.app-more a span { display: block; font-size: 13px; color: var(--muted); }
.app-more a:hover { background: var(--surface); }
.app-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.app-actions [role="status"] { font-size: 13px; color: var(--muted); }
.app-tool { font-weight: 600; margin-right: 6px; }

/* Page heading used by the workspace pages. */
.page { max-width: 1240px; margin-inline: auto; padding: 32px max(20px, 3vw) 56px; }
.page-head { display: flex; justify-content: space-between; align-items: start; gap: 24px; }
.page-head h1 { font-size: clamp(28px, 3vw, 40px); margin: 0; line-height: 1.1; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.page-foot { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.page-foot p { margin: 0; }

/* "What to do now" card. */
.next-step { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 24px; padding: 20px 24px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 10px 24px -20px rgb(30 34 39 / 40%); }
.next-step.fail { border-color: var(--fail-line); background: var(--fail-soft); }
.next-step.pass { border-color: var(--pass-line); background: var(--pass-soft); }
.next-step.inconclusive { border-color: var(--warn-line); background: var(--warn-soft); }
.next-step h2 { display: flex; align-items: center; gap: 10px; font-size: 19px; margin: 0; }
.next-step h2::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--blue); }
.next-step.fail h2::before { background: var(--fail); }
.next-step.pass h2::before { background: var(--pass); }
.next-step.inconclusive h2::before { background: var(--warn); }
.next-step p { margin: 4px 0 0; color: var(--muted); }
.next-step-actions { display: flex; flex-wrap: wrap; gap: 10px; flex: none; }

/* Tabs (links that keep state in the URL). */
.run-options { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.run-options label { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.run-options input { width: auto; margin: 0; accent-color: var(--blue); }

.tabs { display: flex; gap: 4px; margin-top: 28px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); text-decoration: none; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--blue); }
.tabs .tab-count { margin-left: 6px; padding: 0 7px; border-radius: 999px; background: var(--surface); font-size: 12px; color: var(--muted); }

.code-block { position: relative; }
.code-block pre { margin: 0; }
.copy-block { position: absolute; top: 8px; right: 8px; min-height: 30px; padding: 4px 10px; border: 1px solid #3a4049; background: #23272d; color: #dfe3e8; font-size: 12px; opacity: 0; transition: opacity .15s; }
.code-block:hover .copy-block, .copy-block:focus-visible { opacity: 1; }
@media (hover: none) { .copy-block { opacity: 1; } }

/* Dashboard building blocks: verdict banner, stat strip, panels, history bars, tables. */
.status-banner { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; align-items: start; margin-top: 24px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.status-banner.pass { border-color: var(--pass-line); background: var(--pass-soft); }
.status-banner.fail { border-color: var(--fail-line); background: var(--fail-soft); }
.status-banner.inconclusive { border-color: var(--warn-line); background: var(--warn-soft); }
.status-icon { grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--muted); }
.status-banner.pass .status-icon { background: var(--pass); }
.status-banner.fail .status-icon { background: var(--fail); }
.status-banner.inconclusive .status-icon { background: var(--warn); }
.status-icon svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.status-banner h2 { margin: 0; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.2; }
.status-banner > p { margin: 0; color: var(--ink); }
.status-label { font-size: 13px; font-weight: 650; color: var(--muted); }
.status-banner.pass .status-label { color: var(--pass); }
.status-banner.fail .status-label { color: var(--fail); }
.status-banner.inconclusive .status-label { color: var(--warn); }
.identity { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.identity li { padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.identity code { color: var(--ink); font-size: 12px; }
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 16px 0 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.stat-strip > div { padding: 14px 18px; border-left: 1px solid var(--line-soft); margin-left: -1px; }
.stat-strip dt, .stat-strip > div > span { display: block; font-size: 13px; color: var(--muted); }
.stat-strip dd, .stat-strip > div > strong { display: block; margin: 2px 0 0; font-size: 24px; font-weight: 650; letter-spacing: -.02em; color: var(--ink); }
.stat-strip > div { border-top: 1px solid var(--line-soft); margin-top: -1px; }
.stat-strip a { color: inherit; text-decoration: none; }
.stat-strip a:hover { text-decoration: underline; }
.panel { margin-top: 20px; padding: 20px 24px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; }
.panel-head h2 { margin: 0; font-size: 18px; }
.panel-head p, .panel-head a { margin: 0; font-size: 13px; color: var(--muted); }
.panel > p.muted { margin: 10px 0 0; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--muted); }
.history-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.history-row:first-of-type { border-top: 0; }
.history-row .version { font: 13px ui-monospace, Menlo, Consolas, monospace; color: var(--ink); }
.history-row .version .tag { margin-left: 6px; font-family: inherit; }
.history-row .rate { font-size: 13px; color: var(--muted); white-space: nowrap; }
.bars { display: flex; flex-wrap: wrap; gap: 3px; min-width: 0; }
.bar { display: block; width: 10px; height: 30px; border-radius: 3px; background: #eda100; }
.bar.pass { background: var(--pass); }
.bar.fail { background: var(--fail); }
.bar.experimental { background: transparent; box-shadow: inset 0 0 0 2px #eda100; }
.bar.experimental.pass { box-shadow: inset 0 0 0 2px var(--pass); }
.bar.experimental.fail { box-shadow: inset 0 0 0 2px var(--fail); }
.bar:hover, .bar:focus-visible { transform: scaleY(1.15); }
.bar.onset { outline: 2px solid var(--ink); outline-offset: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 12px; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend .bar { width: 8px; height: 14px; transform: none; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
.data-table thead th { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface); border-bottom-color: var(--line); white-space: nowrap; }
.data-table td { font-variant-numeric: tabular-nums; }
.data-table tbody tr:last-child > * { border-bottom: 0; }
.data-table .num { text-align: right; }
.check-table { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: 14px; }
.check-table th { padding: 6px 12px 6px 0; text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); }
.check-table td { padding: 8px 12px 6px 0; font: 13px ui-monospace, Menlo, Consolas, monospace; }
.check-table tr.failed td:last-child { color: var(--fail); font-weight: 600; }
input[type="file"]::file-selector-button { margin-right: 12px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: 600 14px/1.2 inherit; cursor: pointer; }
input[type="file"]::file-selector-button:hover { background: var(--surface); }

@media (max-width: 760px) {
  .app-header { flex-wrap: wrap; gap: 0 16px; padding-block: 10px 0; }
  .app-nav { order: 3; width: 100%; margin-left: -12px; }
  .app-nav a { padding-block: 10px; }
  .app-more { margin-left: auto; }
  .app-actions { order: 4; width: 100%; padding: 10px 0; margin: 0; flex-wrap: wrap; }
  .app-more div { left: auto; right: 0; }
  .page-head, .next-step { flex-direction: column; align-items: start; }
  .history-row { grid-template-columns: minmax(0, 1fr) auto; }
  .history-row .bars { grid-column: 1 / -1; grid-row: 2; }
  .panel { padding: 16px; }
  .data-table.stack { min-width: 0; }
  .data-table.stack thead { display: none; }
  .data-table.stack tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
  .data-table.stack th, .data-table.stack td { padding: 0; border: 0; }
  .data-table.stack tbody th { grid-column: 1; }
  .data-table.stack td:last-child { grid-column: 2; grid-row: 1; align-self: start; }
  .data-table.stack td.num::before { content: attr(data-label) " "; color: var(--muted); font-size: 12px; }
  .data-table.stack td.num { grid-column: 1; text-align: left; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  button, .button-link { transition: none; }
}

#organization-picker { margin-bottom: 20px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
#organization-choice { max-width: 220px; min-width: 0; background: white; color: var(--ink); padding: 6px; }

/* Charts (web/charts.js), after infrastructure dashboards: hairline marks, dotted guides, mono
   figures, legend above the plot, dark tooltip. */
.chart { position: relative; margin: 14px 0 0; --chart-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-svg text { font-family: var(--chart-mono); font-size: 10.5px; fill: #7d8691; letter-spacing: -.01em; }
.chart-svg text.value { font-size: 11px; font-weight: 600; fill: var(--ink); }
.chart-svg text.row-label { font-family: inherit; font-size: 12px; fill: var(--muted); }
.chart-hit { outline: none; cursor: default; }
.chart-hit:focus-visible { stroke: var(--blue); stroke-width: 1.5; }
.chart-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 14px; margin: 0 0 6px; padding: 0; list-style: none; font-size: 12px; color: var(--muted); }
.chart-legend li { display: inline-flex; align-items: center; gap: 6px; }
.chart-swatch { display: inline-block; width: 8px; height: 8px; border-radius: 2px; }
.chart-tip { position: absolute; z-index: 3; min-width: 150px; padding: 9px 11px; border-radius: 8px; background: #141a22; box-shadow: 0 10px 28px rgb(15 20 28 / 22%); font-size: 12px; color: #aab3bf; pointer-events: none; }
.chart-tip strong { display: block; margin-bottom: 6px; color: #fff; font-weight: 600; }
.chart-tip div { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 8px; line-height: 1.6; }
.chart-tip b { color: #fff; font: 500 12px var(--chart-mono); text-align: right; }
.chart-key { display: inline-block; width: 8px; height: 8px; border-radius: 2px; }
.chart-table { margin-top: 6px; font-size: 12px; }
.chart-table summary { cursor: pointer; color: var(--muted); padding: 2px 0; }
.chart-table summary:hover { color: var(--ink); }
.chart-table table { margin-top: 8px; border-collapse: collapse; }
.chart-table th, .chart-table td { padding: 5px 14px 5px 0; border-bottom: 1px solid var(--line-soft, var(--line)); text-align: left; white-space: nowrap; }
.chart-table td { font-family: var(--chart-mono); font-size: 12px; }
.chart-table thead th { color: var(--muted); font-weight: 600; }
.chart-table tbody th { font-weight: 400; }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 32px; }
.chart-grid h3 { margin: 18px 0 0; font-size: 15px; }
.chart-grid p.small { margin: 2px 0 0; }
.bar-list { display: grid; gap: 9px; margin-top: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 160px) minmax(0, 1fr) auto; gap: 12px; align-items: center; font-size: 13px; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { display: block; height: 6px; border-radius: 3px; background: #eef1f4; }
.bar-fill { display: block; height: 100%; min-width: 3px; border-radius: 3px; }
.bar-value { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 12px; color: var(--ink); white-space: nowrap; }
.bar-note { font-family: "Schibsted Grotesk", system-ui, sans-serif; color: var(--muted); }
.sparkline { display: block; }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 32px; }
.chart-grid h3 { margin: 18px 0 0; font-size: 15px; }
.chart-grid p.small { margin: 2px 0 0; }
.delta { font-size: 13px; font-weight: 500; }
.delta.up { color: var(--pass); }
.delta.down { color: var(--fail); }
