/* SPDX-License-Identifier: LicenseRef-Proprietary — DecisionSphere palette */
:root {
  --ds-navy: #0b2e4f; --ds-blue: #1565a8; --ds-sky: #3b8fd9; --ds-ice: #eaf2fa;
  --ink: #1d2733; --muted: #5d6b7a; --line: #d8e0e8; --bg: #f5f7fa; --card: #fff;
  --ok: #1f7a4d; --warn: #9a6400; --bad: #b3261e;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.45; }
a { color: var(--ds-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: .2rem 0 1rem; color: var(--ds-navy); }
h1 small, h2 small { color: var(--muted); font-weight: 400; font-size: .8em; }
h2 { font-size: 1.15rem; margin: 1.4rem 0 .6rem; color: var(--ds-navy); }
h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
.topbar { display: flex; align-items: center; gap: 1rem; padding: .55rem 1.2rem; background: var(--ds-navy); color: #fff; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .5rem; color: #fff; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.mainnav { display: flex; gap: .2rem; flex-wrap: wrap; flex: 1; }
.mainnav a { color: #cfe0f2; padding: .35rem .6rem; border-radius: 6px; }
.mainnav a:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.tools { display: flex; align-items: center; gap: .8rem; margin-left: auto; }
.tools a, .tools .link { color: #cfe0f2; }
.langs a { padding: 0 .25rem; font-size: .8rem; opacity: .7; }
.langs a.on { opacity: 1; font-weight: 700; color: #fff; }
main { max-width: 1320px; margin: 0 auto; padding: 1.2rem; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 1.5rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.2rem; margin-bottom: 1rem; }
.card.narrow, .login { max-width: 420px; margin: 3rem auto; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .grid { display: block; overflow-x: auto; } }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1rem; color: var(--ink); display: flex; flex-direction: column; }
.tile:hover { text-decoration: none; border-color: var(--ds-sky); }
.tile b { font-size: 1.7rem; color: var(--ds-blue); }
.tile span { color: var(--muted); font-size: .85rem; }
.tile.attn b { color: var(--warn); } .tile.bad b { color: var(--bad); }
table.grid { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.grid th, .grid td { padding: .5rem .6rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.grid th { background: var(--ds-ice); color: var(--ds-navy); font-weight: 600; font-size: .82rem; }
.grid tr:last-child td { border-bottom: 0; }
.small { font-size: .82rem; } .muted { color: var(--muted); } .nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; }
label { display: flex; flex-direction: column; gap: .25rem; font-weight: 500; margin-bottom: .7rem; }
label.inline { flex-direction: row; align-items: center; gap: .4rem; margin: 0; }
label.check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 400; }
input, select, textarea { font: inherit; padding: .45rem .55rem; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ds-sky); outline-offset: 0; border-color: var(--ds-sky); }
input.tiny { width: 4.5rem; }
.cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 1rem; }
.form.row { display: flex; gap: .8rem; align-items: flex-end; flex-wrap: wrap; padding: .7rem 1rem; }
.form.row label { margin: 0; } .form.row .wide { flex: 1; min-width: 260px; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
button, .btn { font: inherit; cursor: pointer; padding: .45rem .85rem; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--ds-navy); display: inline-block; }
button:hover, .btn:hover { border-color: var(--ds-sky); text-decoration: none; }
.primary, button.primary, .btn.primary { background: var(--ds-blue); border-color: var(--ds-blue); color: #fff; }
.primary:hover { background: var(--ds-navy); }
button.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.small, button.small { padding: .2rem .5rem; font-size: .8rem; }
button.link { background: none; border: 0; padding: 0; }
form.inline { display: inline-flex; gap: .3rem; align-items: center; margin: 0; }
.flash { padding: .6rem .9rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid; }
.flash.ok { background: #e8f5ee; border-color: #a9d7bd; color: var(--ok); }
.flash.warn { background: #fff6e0; border-color: #f0d38c; color: var(--warn); }
.flash.bad { background: #fdeceb; border-color: #f2b8b4; color: var(--bad); }
.badge { display: inline-block; padding: .05rem .45rem; border-radius: 999px; font-size: .74rem; background: #eef1f4; color: var(--muted); white-space: nowrap; }
.b-active, .b-done, .b-processed, .b-completed, .b-approved, .b-converted, .b-interaction_published, .b-fact, .b-published { background: #e3f3ea; color: var(--ok); }
.b-failed, .b-error, .b-rejected, .b-authentication_required, .b-collection_restricted { background: #fbe4e2; color: var(--bad); }
.b-pending_manual, .b-paused, .b-follow_up_required, .b-hypothesis, .b-under_review, .b-running, .b-processing { background: #fff1d6; color: var(--warn); }
.b-new, .b-queued, .b-pending, .b-pending_download, .b-interpretation, .b-available { background: var(--ds-ice); color: var(--ds-blue); }
.score { display: inline-block; min-width: 2rem; text-align: center; padding: .1rem .35rem; border-radius: 6px; font-weight: 700; background: #eef1f4; }
.score.s3, .score.s4, .score.s5 { background: var(--ds-blue); color: #fff; }
.score.s2 { background: var(--ds-ice); color: var(--ds-blue); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: .4rem 0; }
dl.facts dt { color: var(--muted); } dl.facts dd { margin: 0; }
blockquote { margin: .5rem 0; padding: .6rem .9rem; border-left: 4px solid var(--ds-sky); background: var(--ds-ice); border-radius: 0 8px 8px 0; white-space: pre-wrap; }
video, .thumb { width: 100%; max-height: 520px; background: #000; border-radius: 8px; }
.gallery { display: flex; gap: .4rem; overflow-x: auto; } .gallery img { height: 220px; border-radius: 6px; }
.frames { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.frames figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .3rem; }
.frames img { width: 100%; border-radius: 5px; }
.frames figcaption { font-size: .78rem; padding: .2rem; }
.transcript { max-height: 320px; overflow-y: auto; } .transcript p { margin: .2rem 0; }
.ts { color: var(--ds-blue); font-variant-numeric: tabular-nums; font-size: .8rem; }
.subnav { display: flex; gap: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line); padding-bottom: .5rem; }
.pager { display: flex; gap: 1rem; justify-content: center; margin: 1rem; }
details.danger summary { color: var(--bad); cursor: pointer; }
code { background: #eef1f4; padding: .05rem .3rem; border-radius: 4px; word-break: break-all; }
