/* Neutral project portal. Avian Group palette, no logo. Light theme only. */
:root {
  --navy: #062f50;
  --navy-2: #1b2d3d;
  --slate: #536978;
  --teal: #248095;
  --teal-dark: #1b6576;
  --gold: #bf8c47;
  --soft: #d7dde1;
  --bg: #f3f5f7;
  --surface: #ffffff;
  --border: #d7dde1;
  --border-strong: #b9c3ca;
  --text: #1b2d3d;
  --muted: #536978;
  --faint: #8396a3;
  /* Status colors (validated together, always shown with a label). */
  --st-accepted: #2e8a4f;
  --st-returned_minor: #f2c08f;
  --st-in_review: #d9a520;
  --st-delivered: #9a6fd0;
  --st-in_progress: #00759c;
  --st-deferred: #7a6a58;
  --st-returned_major: #e07b39;
  --st-returned_blocker: #b8235a;
  --st-failed: #b8235a;
  --st-planned: #c3ccd3;
  --st-removed: #e3e7ea;
  --sev-blocker: #b8235a;
  --sev-major: #b07a2a;
  --sev-minor: #536978;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(6, 47, 80, .06), 0 4px 16px rgba(6, 47, 80, .06);
}

* { box-sizing: border-box; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif; line-height: 1.45;
}
a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--navy); margin: 0; line-height: 1.25; }
h1 { font-size: 1.55rem; font-weight: 650; }
h2 { font-size: 1.15rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 .6em; }
button, input, select, textarea { font: inherit; color: inherit; }
.noscript { padding: 2rem; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.shell.collapsed { grid-template-columns: 60px 1fr; }
.side {
  background: var(--navy); color: #dfe8ef; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side-head { position: relative; padding: 16px 40px 12px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.collapsed .side-head { padding: 12px 0; min-height: 44px; }
.platform { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); font-weight: 650; }
.proj-name { color: #fff; font-weight: 650; margin-top: 4px; font-size: .98rem; line-height: 1.3; }
.proj-list { display: flex; flex-direction: column; gap: 6px; }
.proj-pick { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--border, #d9dee3); border-radius: 8px; background: none; cursor: pointer; font: inherit; color: inherit; }
.proj-pick:hover, .proj-pick:focus-visible { background: rgba(0,0,0,.04); }
.proj-pick.current { border-color: currentColor; cursor: default; }
.proj-pick-name { font-weight: 600; }
.nav { padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px; color: #c8d6e0; padding: 8px 10px; border-radius: 6px; font-weight: 500;
  white-space: nowrap;
}
.nav a:hover { background: rgba(255,255,255,.07); text-decoration: none; color: #fff; }
.nav a.active { background: rgba(36,128,149,.35); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.nav .ico { width: 20px; text-align: center; flex: none; font-size: 1rem; opacity: .9; }
.nav-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #8fa6b6; padding: 12px 10px 4px; }
.side-foot { margin-top: auto; padding: 10px; border-top: 1px solid rgba(255,255,255,.08); font-size: .85rem; }
.side-foot .who { color: #fff; font-weight: 600; }
.side-foot .org { color: #9fb3c2; font-size: .78rem; }
.side-foot .row { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.side-foot button { background: transparent; border: 1px solid rgba(255,255,255,.2); color: #dfe8ef; border-radius: 6px; padding: 3px 8px; cursor: pointer; font-size: .8rem; }
.side-foot button:hover { background: rgba(255,255,255,.08); }
.collapse-btn { position: absolute; top: 10px; right: 8px; width: 26px; height: 26px; border-radius: 6px; background: none; border: 0; color: #9fb3c2; cursor: pointer; font-size: 1rem; line-height: 1; }
.collapse-btn:hover, .collapse-btn:focus-visible { background: rgba(255,255,255,.1); color: #fff; }
.collapsed .collapse-btn { right: 50%; transform: translateX(50%); }
.collapsed .side-head .proj-name, .collapsed .nav-text, .collapsed .nav-label,
.collapsed .side-foot .who, .collapsed .side-foot .org, .collapsed .side-foot .row, .collapsed .platform { display: none; }
.collapsed .nav a { justify-content: center; padding: 9px 0; }

.main { min-width: 0; padding: 22px 28px 60px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-strong); background: var(--surface);
  border-radius: 6px; padding: 6px 12px; cursor: pointer; font-weight: 550; color: var(--navy-2); white-space: nowrap;
}
.btn:hover { border-color: var(--slate); text-decoration: none; }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-dark); }
.btn.danger { color: #9b1c48; border-color: #e3b5c6; }
.btn.small { padding: 3px 8px; font-size: .85rem; }
.btn:disabled { opacity: .5; cursor: default; }
.link-btn { background: none; border: 0; color: var(--teal-dark); cursor: pointer; padding: 0; font-weight: 550; }
.link-btn:hover { text-decoration: underline; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=search], select, textarea {
  border: 1px solid var(--border-strong); border-radius: 6px; padding: 6px 8px; background: #fff; width: 100%; min-width: 0;
}
textarea { resize: vertical; min-height: 90px; line-height: 1.45; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
label.field, div.field { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); font-weight: 550; }
.field > .field-label { display: inline-flex; align-items: center; gap: 5px; }
.tip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%;
  border: 1px solid var(--border-strong); color: var(--muted); font-size: 10px; line-height: 1; cursor: help; flex: none; }
.tip::before { content: 'i'; font: italic 600 10px/1 Georgia, serif; }
.tip:hover, .tip:focus-visible { border-color: var(--teal); color: var(--teal); outline: none; }
.tip { text-transform: none; letter-spacing: normal; vertical-align: middle; margin-left: 4px; }
/* Fixed, so a table's scroll area or a card edge never clips it; tip() places it next to the icon and keeps it on screen. */
.tip-text { position: fixed; left: 0; top: 0; z-index: 1000; text-transform: none; letter-spacing: normal; width: max-content; max-width: 260px;
  background: var(--navy, #062f50); color: #fff; padding: 6px 9px; border-radius: 6px; font-weight: 400; font-size: .78rem; line-height: 1.4; font-family: inherit; font-style: normal;
  white-space: normal; text-align: left; box-shadow: 0 4px 14px rgba(6, 47, 80, .2); visibility: hidden; opacity: 0; transition: opacity .12s; pointer-events: none; }
.tip:hover .tip-text, .tip:focus .tip-text { visibility: visible; opacity: 1; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; cursor: pointer; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.span2 { grid-column: span 2; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filters select, .filters input { width: auto; min-width: 130px; }
.filters input[type=search] { min-width: 220px; }

/* ---------- cards & tables ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head .meta { color: var(--muted); font-size: .85rem; }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.cols-even { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: .92rem; }
.t th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650;
  padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; background: #fafbfc; position: sticky; top: 0; }
.t td { padding: 8px 10px; border-bottom: 1px solid #eef1f3; vertical-align: top; }
.t tr.click { cursor: pointer; }
.t tr.click:hover td { background: #f5f9fa; }
.t .num { text-align: right; font-variant-numeric: tabular-nums; }
.t .nowrap { white-space: nowrap; }
.t .title-cell { min-width: 260px; }
.empty { color: var(--muted); padding: 18px; text-align: center; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .85rem; }
.mono { font-family: Consolas, "Cascadia Mono", monospace; font-size: .88em; }
.key { font-family: Consolas, "Cascadia Mono", monospace; font-size: .85em; color: var(--slate); white-space: nowrap; }
.pre { white-space: pre-wrap; word-wrap: break-word; }
.divider { border: 0; border-top: 1px solid var(--border); margin: 14px 0; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 1px 9px; font-size: .78rem; font-weight: 600;
  background: #eef1f3; color: var(--navy-2); white-space: nowrap; border: 1px solid transparent; }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.badge.st { background: #fff; border-color: var(--border); }
.badge.type { background: #eaf3f5; color: #1b5664; }
.badge.side-client { background: #edf0f7; color: #2b3f73; }
.badge.side-vendor { background: #f6efe3; color: #7a5520; }
.badge.sev-blocker { background: #fbe8ef; color: #8f1a45; }
.badge.sev-major { background: #f8efe0; color: #7a5520; }
.badge.sev-minor { background: #eef1f3; color: #3f505c; }
.badge.warn { background: #fdf3e2; color: #7a5520; }
.badge.bad { background: #fbe8ef; color: #8f1a45; }
.badge.good { background: #e6f3ea; color: #1f6339; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* ---------- dashboard ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.kpi .label { font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi .value { font-size: 1.9rem; font-weight: 650; color: var(--navy); line-height: 1.15; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .note { font-size: .82rem; color: var(--muted); }
.kpi.alert .value { color: #8f1a45; }
a.kpi:hover { text-decoration: none; border-color: var(--teal); }

.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; color: var(--muted); margin: 6px 0 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

.module-block + .module-block { margin-top: 14px; }
.module-title { font-size: .82rem; font-weight: 650; color: var(--navy-2); margin-bottom: 6px; display: flex; justify-content: space-between; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 4px; }
.tile {
  border-radius: 6px; padding: 5px 4px 4px; text-align: center; font-size: .74rem; font-weight: 650; cursor: pointer; position: relative;
  border: 1px solid transparent; color: #fff; line-height: 1.15; min-height: 38px; display: flex; flex-direction: column; justify-content: center;
}
.tile small { display: block; font-weight: 500; font-size: .66rem; opacity: .92; }
.tile.light { color: var(--navy-2); }
.tile .flag { position: absolute; top: -5px; right: -5px; background: #fff; color: #8f1a45; border: 1px solid #e3b5c6; border-radius: 999px;
  font-size: .62rem; min-width: 16px; height: 16px; line-height: 14px; padding: 0 3px; }
.tile:hover { outline: 2px solid var(--navy); outline-offset: 1px; }

.stackbar { display: flex; height: 12px; border-radius: 4px; overflow: hidden; background: #eef1f3; gap: 2px; }
.stackbar > span { display: block; height: 100%; min-width: 3px; }
.rel-row { display: grid; grid-template-columns: 120px 1fr 190px; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid #eef1f3; }
.rel-row:last-child { border-bottom: 0; }
.rel-row .rel-name { font-weight: 650; color: var(--navy); }
.rel-row .rel-dates { font-size: .8rem; color: var(--muted); }
.rel-row .rel-flags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }

.timeline { width: 100%; overflow-x: auto; }
.timeline svg { display: block; min-width: 720px; }
.tl-label { font-size: 12px; fill: var(--navy-2); font-weight: 600; }
.tl-axis { font-size: 11px; fill: var(--muted); }
.tl-grid { stroke: #e6eaed; stroke-width: 1; }
.tl-today { stroke: var(--gold); stroke-width: 2; }
.tl-today-label { font-size: 11px; fill: #7a5520; font-weight: 650; }

.chart-tip { position: fixed; pointer-events: none; background: var(--navy); color: #fff; font-size: .8rem; padding: 6px 9px; border-radius: 6px;
  box-shadow: var(--shadow); z-index: 60; max-width: 300px; line-height: 1.35; }
.chart-tip b { color: #fff; }

.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: 7px 0; border-bottom: 1px solid #eef1f3; display: flex; gap: 8px; align-items: baseline; }
.list-plain li:last-child { border-bottom: 0; }
.activity li { display: block; font-size: .88rem; }
.activity .when { color: var(--faint); font-size: .78rem; }

/* ---------- detail ---------- */
.meta-grid { display: grid; grid-template-columns: 130px 1fr; gap: 8px 10px; font-size: .9rem; align-items: center; }
.meta-grid > .k { color: var(--muted); font-size: .82rem; font-weight: 600; }
.body-text { font-size: .95rem; line-height: 1.55; white-space: pre-wrap; word-wrap: break-word; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.tabs button { background: none; border: 0; padding: 8px 12px; cursor: pointer; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--navy); border-bottom-color: var(--teal); }
.comment { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: #fff; }
.comment + .comment { margin-top: 8px; }
.comment.mine { background: #f6fafb; }
.comment-head { display: flex; justify-content: space-between; gap: 8px; font-size: .82rem; color: var(--muted); margin-bottom: 4px; }
.comment-head b { color: var(--navy-2); }
.history-entry { padding: 8px 0; border-bottom: 1px solid #eef1f3; font-size: .88rem; }
.history-entry:last-child { border-bottom: 0; }
.history-entry .when { color: var(--faint); font-size: .78rem; }
.changes { margin: 4px 0 0; padding: 0; list-style: none; font-size: .82rem; }
.changes li { padding: 2px 0; }
.changes .f { color: var(--muted); font-weight: 600; }
.changes del { color: #8f1a45; text-decoration: line-through; background: #fbe8ef; padding: 0 3px; border-radius: 3px; }
.changes ins { color: #1f6339; text-decoration: none; background: #e6f3ea; padding: 0 3px; border-radius: 3px; }
.changes .long { display: block; white-space: pre-wrap; max-height: 160px; overflow: auto; margin-top: 2px; }
.files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.file { border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; font-size: .85rem; display: flex; gap: 8px; align-items: center; background: #fff; max-width: 100%; }
.file img { width: 64px; height: 48px; object-fit: cover; border-radius: 4px; display: block; }
.file .x { background: none; border: 0; color: var(--faint); cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { background: #eaf3f5; color: #1b5664; border-radius: 4px; padding: 0 6px; font-size: .78rem; font-family: Consolas, monospace; white-space: nowrap; }
a.chip:hover { text-decoration: none; background: #d6eaee; }
.version { border-left: 3px solid var(--soft); padding: 4px 0 4px 12px; margin-bottom: 12px; }
.version.current { border-left-color: var(--teal); }
.diff-del { background: #fbe8ef; color: #8f1a45; text-decoration: line-through; }
.diff-ins { background: #e6f3ea; color: #1f6339; }
.callout { border: 1px solid #e8d6b8; background: #fdf8ef; border-radius: 8px; padding: 10px 12px; font-size: .9rem; }
.callout.info { border-color: #c7dfe5; background: #f2f8fa; }
.callout.bad { border-color: #e3b5c6; background: #fcf1f5; }

/* ---------- req picker ---------- */
.picker { border: 1px solid var(--border-strong); border-radius: 6px; max-height: 220px; overflow-y: auto; padding: 4px; background: #fff; }
.picker label { display: flex; gap: 6px; align-items: baseline; padding: 3px 4px; font-size: .86rem; cursor: pointer; border-radius: 4px; }
.picker label:hover { background: #f3f7f8; }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(6, 47, 80, .35); display: flex; align-items: flex-start; justify-content: center; z-index: 50; padding: 5vh 16px; overflow-y: auto; }
.modal { background: #fff; border-radius: 10px; width: min(720px, 100%); box-shadow: 0 20px 60px rgba(6,47,80,.3); }
.modal.wide { width: min(980px, 100%); }
.modal-head { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 16px 18px; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
.x-btn { background: none; border: 0; font-size: 1.3rem; cursor: pointer; color: var(--muted); line-height: 1; }
.error { color: #8f1a45; font-size: .88rem; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 60%, #23465c 100%); }
.auth-card { background: #fff; border-radius: 12px; padding: 28px; width: min(400px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.auth-card .platform { margin-bottom: 4px; }
.auth-card h1 { margin-bottom: 16px; }
.auth-card .stack { gap: 14px; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 9px 16px;
  border-radius: 8px; box-shadow: var(--shadow); z-index: 70; font-size: .92rem; max-width: 90vw; }
.toast.bad { background: #8f1a45; }
.secret { font-family: Consolas, monospace; font-size: 1.15rem; background: #f3f5f7; border: 1px dashed var(--border-strong); padding: 8px 12px; border-radius: 6px; user-select: all; display: inline-block; }

.score-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.rating-pick { display: flex; gap: 4px; flex-wrap: wrap; }
.rating-pick button { border: 1px solid var(--border-strong); background: #fff; border-radius: 999px; padding: 2px 10px; cursor: pointer; font-size: .82rem; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.rating-pick button.on { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); background: #f3f7f8; }

@media (max-width: 1100px) {
  .cols, .cols-even { grid-template-columns: 1fr; }
  .rel-row { grid-template-columns: 100px 1fr; }
  .rel-row .rel-flags { grid-column: span 2; justify-content: flex-start; }
}
@media (max-width: 760px) {
  .shell, .shell.collapsed { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav-label, .collapse-btn { display: none; }
  .main { padding: 16px; }
  .grid2, .grid3, .grid4 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
}
@media print {
  .side, .actions, .filters, .btn { display: none !important; }
  .shell { grid-template-columns: 1fr; }
  .card { box-shadow: none; break-inside: avoid; }
}
.tl-row { cursor: pointer; }

/* multi-select dropdown */
.ms { position: relative; }
.ms-summary { list-style: none; cursor: pointer; border: 1px solid var(--border-strong); border-radius: 6px; padding: 6px 28px 6px 8px; background: #fff;
  color: var(--text); font-weight: 400; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
.ms-summary::-webkit-details-marker { display: none; }
.ms-summary::after { content: ''; position: absolute; right: 10px; top: 50%; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: translateY(-70%) rotate(45deg); }
.ms[open] > .ms-summary { outline: 2px solid var(--teal); outline-offset: 1px; }
.ms-menu { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; background: #fff; border: 1px solid var(--border-strong); border-radius: 6px;
  box-shadow: 0 6px 18px rgba(6, 47, 80, .14); padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.ms-option { padding: 6px 8px; border-radius: 4px; color: var(--text); font-weight: 400; }
.ms-option:hover { background: var(--bg); }

/* releases table on the status page */
.table-wrap { overflow-x: auto; }
.rel-table td { vertical-align: middle; }
.rel-table .rel-name { font-weight: 650; color: var(--navy); }
.rel-table .rel-title { margin-left: 26px; }
.rel-table .rel-flags { display: flex; gap: 4px; flex-wrap: wrap; }
.rel-table tr.open > td { background: #f5f9fa; border-bottom-color: transparent; }
.stackbar.short { width: 160px; height: 8px; }
.expander { width: 20px; height: 20px; margin-right: 6px; border: 0; background: none; cursor: pointer; vertical-align: middle; position: relative; }
.expander::before { content: ''; position: absolute; left: 6px; top: 6px; width: 6px; height: 6px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); transition: transform .12s; }
.expander[aria-expanded="true"]::before { transform: rotate(45deg); top: 4px; }
.expander:disabled { visibility: hidden; }
.rel-detail > td { background: #f5f9fa; padding: 0 10px 10px 36px; }
.req-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.req-item + .req-item { border-top: 1px solid #eef1f3; }
.req-item > summary { display: grid; grid-template-columns: 70px 1fr auto auto auto; gap: 10px; align-items: center; padding: 7px 10px; cursor: pointer; list-style: none; font-size: .88rem; }
.req-item > summary::-webkit-details-marker { display: none; }
.req-item > summary:hover { background: #f5f9fa; }
.req-item > summary .key { font-weight: 650; color: var(--navy); }
.req-item[open] > summary { background: #f5f9fa; }
.req-body { padding: 8px 12px 12px 90px; display: flex; flex-direction: column; gap: 8px; font-size: .88rem; }
@media (max-width: 760px) { .req-item > summary { grid-template-columns: 60px 1fr; } .req-body { padding-left: 12px; } }

.picker-group { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; padding: 8px 4px 2px; }
.nav a.child { padding-left: 34px; font-size: .88rem; }
.nav a.child .ico { opacity: .7; }

/* release page: requirement tree with linked test cases */
.req-tree { display: flex; flex-direction: column; }
.req-node { border-top: 1px solid #eef1f3; padding: 8px 0; }
.req-node:first-child { border-top: 0; }
.req-node-head { display: grid; grid-template-columns: 70px 1fr auto auto auto; gap: 10px; align-items: center; font-size: .9rem; }
.req-node-head .key, .case-row .key { font-weight: 650; color: var(--navy); }
.req-node-head .req-title { color: var(--text); font-weight: 550; }
.case-list { margin: 4px 0 0 34px; border-left: 2px solid var(--border); padding-left: 12px; display: flex; flex-direction: column; gap: 2px; }
.case-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .85rem; padding: 3px 0; }
.case-row .key { min-width: 42px; }
.case-row .case-title { flex: 1; min-width: 180px; }
@media (max-width: 760px) { .req-node-head { grid-template-columns: 60px 1fr; } }

.stack.skipped > *:not(:last-child) { opacity: .45; pointer-events: none; }
.card.is-skipped .card-head b { color: var(--muted); }
.t tr.current td { background: rgba(36,128,149,.07); }
.kpi-schedule .value { font-size: 1.15rem; font-weight: 600; display: flex; align-items: center; gap: 7px; margin-top: 8px; margin-bottom: 4px; }
.sched-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: #2f8a52; }
.sched-dot.behind { background: #c0561f; }
.sched-dot.ahead { background: #248095; }
.actions.end { justify-content: flex-end; }

/* Tracker */
.block-flag { display: flex; align-items: flex-start; gap: 8px; }
.block-flag input { margin-top: 3px; }
.bad-text { color: #8f1a45; }
.answer-card { border-left: 3px solid #2f7a4b; }
.card.card-alert { border-color: #e3b5c6; }
.card.card-alert h3 { color: #8f1a45; }

/* Sortable table headings */
.th-sort { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; text-align: left; }
.th-sort:hover { color: var(--text, inherit); text-decoration: underline; }
.th-sort .sort-mark { font-size: 10px; opacity: .35; }
.th-sort.on .sort-mark { opacity: 1; }

/* Table pages: search above the table, other filters in a collapsible panel on the right */
.table-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.table-toolbar .search-box { flex: 1 1 320px; max-width: 480px; }
.table-toolbar .search-box input { width: 100%; padding-left: 34px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='7' cy='7' r='5' fill='none' stroke='%238396a3' stroke-width='1.8'/%3E%3Cpath d='M11 11l3.5 3.5' stroke='%238396a3' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 11px center / 15px; }
.toolbar-spacer { flex: 1; }
.filter-toggle { display: inline-flex; align-items: center; gap: 6px; }
.filter-toggle::before { content: ''; width: 14px; height: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23536978' d='M1.5 2h13a.5.5 0 0 1 .4.8L10 8.6V13a.5.5 0 0 1-.3.5l-3 1.4A.5.5 0 0 1 6 14.4V8.6L1.1 2.8A.5.5 0 0 1 1.5 2z'/%3E%3C/svg%3E") no-repeat center / contain; }
.filter-toggle[aria-expanded=true] { background: var(--bg); border-color: var(--border-strong); }
.filter-count { background: var(--teal); color: #fff; border-radius: 999px; font-size: .72rem; font-weight: 650; line-height: 18px; min-width: 18px; padding: 0 6px; text-align: center; }
.filter-count[hidden] { display: none; }
.filter-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.filter-layout.open { grid-template-columns: minmax(0, 1fr) 250px; }
.filter-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 12px; }
.filter-panel[hidden] { display: none; }
.filter-panel-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.filter-field { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.filter-field.check { flex-direction: row; align-items: center; gap: 8px; }
.filter-field select, .filter-field input:not([type=checkbox]) { width: 100%; min-width: 0; }
@media (max-width: 900px) { .filter-layout.open { grid-template-columns: minmax(0, 1fr); } .filter-panel { order: -1; position: static; } }
@media print { .table-toolbar, .filter-panel { display: none !important; } .filter-layout.open { grid-template-columns: 1fr; } }

/* Attach buttons: thin line icon */
.btn-attach { display: inline-flex; align-items: center; gap: 6px; }
.btn-attach::before { content: ''; width: 13px; height: 13px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23536978' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.4 11.1l-9.2 9.2a6 6 0 0 1-8.5-8.5l9.2-9.2a4 4 0 0 1 5.7 5.7l-9.2 9.2a2 2 0 0 1-2.8-2.8l8.5-8.5'/%3E%3C/svg%3E") no-repeat center / contain; flex: none; }

/* Batch change: checkbox column and the bar that appears when rows are ticked */
th.sel-cell, td.sel-cell { width: 34px; padding-right: 0; text-align: center; }
td.sel-cell { cursor: default; }
.sel-cell input { margin: 0; width: 16px; height: 16px; cursor: pointer; }
tr.selected td { background: var(--teal-soft, #e7f4f3); }
.bulk-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 14px; margin-bottom: 10px;
  background: var(--surface); border: 1px solid var(--teal); border-radius: var(--radius); box-shadow: var(--shadow); position: sticky; top: 8px; z-index: 5; }
.bulk-bar[hidden] { display: none; }
.row-inline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
@media print { .bulk-bar, .sel-cell { display: none !important; } }

/* Formatted text: reading */
.rich-text { white-space: normal; }
.rich-text > :first-child, .rich-editor > :first-child { margin-top: 0; }
.rich-text > :last-child, .rich-editor > :last-child { margin-bottom: 0; }
.rich-text p, .rich-editor p { margin: 0 0 .6em; }
.rich-text h3, .rich-editor h3 { font-size: 1.05rem; margin: .9em 0 .35em; }
.rich-text h4, .rich-editor h4 { font-size: .98rem; margin: .8em 0 .3em; }
.rich-text h5, .rich-editor h5 { font-size: .9rem; margin: .7em 0 .3em; text-transform: none; letter-spacing: normal; }
.rich-text ul, .rich-text ol, .rich-editor ul, .rich-editor ol { margin: 0 0 .6em; padding-left: 1.5em; }
.rich-text li, .rich-editor li { margin: .15em 0; }
.rich-text li > ul, .rich-text li > ol, .rich-editor li > ul, .rich-editor li > ol, .rich-editor ul ul, .rich-editor ol ol { margin: .15em 0 0; }
.rich-text blockquote, .rich-editor blockquote { margin: 0 0 .6em; padding: 2px 0 2px 12px; border-left: 3px solid var(--border-strong); color: var(--muted); }
.rich-text code, .rich-editor code { font-family: ui-monospace, Consolas, monospace; font-size: .88em; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; }
.rich-text pre, .rich-editor pre { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; overflow: auto; margin: 0 0 .6em; white-space: pre; }
.rich-text pre code, .rich-editor pre code { border: 0; padding: 0; background: none; }
.rich-text a, .rich-editor a { word-break: break-word; }

/* Formatted text: editor */
.rich { position: relative; border: 1px solid var(--border-strong); border-radius: 6px; background: #fff; color: var(--text); font-weight: 400; font-size: .95rem; }
.rich.focus { outline: 2px solid var(--teal); outline-offset: 1px; }
.rich-bar { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 4px 6px; border-bottom: 1px solid var(--border); background: var(--bg); border-radius: 6px 6px 0 0; }
.rich-btn { min-width: 28px; height: 28px; padding: 0 6px; border: 1px solid transparent; border-radius: 5px; background: none; color: var(--slate); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font-size: .9rem; line-height: 1; }
.rich-btn:hover { background: var(--surface); border-color: var(--border); color: var(--text); }
.rich-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 0; }
.rich-btn.on { background: #fff; border-color: var(--border-strong); color: var(--teal-dark); }
.rb-bold { font-weight: 750; }
.rb-italic { font-style: italic; font-family: Georgia, serif; }
.rb-strike { text-decoration: line-through; }
.rb-h { font-weight: 700; }
.rich-btn::before { content: none; }
.rb-ul::before, .rb-ol::before, .rb-quote::before, .rb-link::before, .rb-clear::before { content: ''; width: 16px; height: 16px; background: currentColor; display: block;
  -webkit-mask: var(--ico) no-repeat center / contain; mask: var(--ico) no-repeat center / contain; }
.rb-ul { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='2.5' cy='4' r='1.3'/%3E%3Ccircle cx='2.5' cy='8' r='1.3'/%3E%3Ccircle cx='2.5' cy='12' r='1.3'/%3E%3Crect x='5.5' y='3.2' width='9' height='1.6' rx='.8'/%3E%3Crect x='5.5' y='7.2' width='9' height='1.6' rx='.8'/%3E%3Crect x='5.5' y='11.2' width='9' height='1.6' rx='.8'/%3E%3C/svg%3E"); }
.rb-ol { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ctext x='0' y='5.6' font-size='5.5' font-family='Arial' font-weight='700'%3E1%3C/text%3E%3Ctext x='0' y='9.6' font-size='5.5' font-family='Arial' font-weight='700'%3E2%3C/text%3E%3Ctext x='0' y='13.6' font-size='5.5' font-family='Arial' font-weight='700'%3E3%3C/text%3E%3Crect x='5.5' y='3.2' width='9' height='1.6' rx='.8'/%3E%3Crect x='5.5' y='7.2' width='9' height='1.6' rx='.8'/%3E%3Crect x='5.5' y='11.2' width='9' height='1.6' rx='.8'/%3E%3C/svg%3E"); }
.rb-quote { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1.5' y='2.5' width='2' height='11' rx='1'/%3E%3Crect x='5.5' y='4' width='9' height='1.6' rx='.8'/%3E%3Crect x='5.5' y='7.2' width='9' height='1.6' rx='.8'/%3E%3Crect x='5.5' y='10.4' width='6' height='1.6' rx='.8'/%3E%3C/svg%3E"); }
.rb-link { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M6.6 9.4a2.6 2.6 0 0 0 3.7 0l2.4-2.4a2.6 2.6 0 0 0-3.7-3.7l-.9.9'/%3E%3Cpath d='M9.4 6.6a2.6 2.6 0 0 0-3.7 0L3.3 9a2.6 2.6 0 0 0 3.7 3.7l.9-.9'/%3E%3C/svg%3E"); }
.rb-clear { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M3 3.5h8M7 3.5 5 12.5'/%3E%3Cpath d='M10 9.5l4 4M14 9.5l-4 4'/%3E%3C/svg%3E"); }
.rich-sep { width: 1px; height: 18px; background: var(--border-strong); margin: 0 4px; }
.rich-editor { padding: 8px 10px; line-height: 1.5; overflow-y: auto; max-height: 60vh; outline: none; word-wrap: break-word; cursor: text; }
.rich.empty .rich-editor::before { content: attr(data-placeholder); color: var(--faint); pointer-events: none; position: absolute; }
.rich-source { position: absolute; left: 12px; bottom: 0; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; opacity: 0; resize: none; pointer-events: none; }
@media print { .rich-bar { display: none; } }

/* Test suite description on the Testing page */
.suite-desc-wrap { margin: 0 0 12px; max-width: 920px; }
.suite-desc { font-size: .9rem; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; }
.suite-desc h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 1em 0 .35em; }
.suite-desc blockquote { background: var(--surface); border-left-color: var(--teal); color: var(--text); padding: 6px 12px; border-radius: 0 6px 6px 0; }
.suite-desc-wrap.folded .suite-desc { max-height: 11.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 65%, transparent); mask-image: linear-gradient(#000 65%, transparent); }
.suite-desc-wrap > .link-btn { margin-top: 4px; }

/* Test suite card: scores and case instructions */
.scored-on { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 12px; }
.crit-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 1px 10px; font-size: .8rem; color: var(--text); }
.crit-kind { font-size: .72rem; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 0 6px; }
.case-title { font-weight: 600; color: var(--navy-2); }
.case-more { margin-top: 2px; }
.case-more > summary { cursor: pointer; list-style: none; }
.case-more > summary::-webkit-details-marker { display: none; }
.case-more > summary::after { content: ' Show details'; font-size: .78rem; color: var(--teal-dark); font-weight: 600; white-space: nowrap; }
.case-more[open] > summary::after { content: ' Hide details'; }
.case-more-body { margin-top: 8px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; max-width: 760px; }
.case-more-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 4px; }
.case-more-body > .rich-text + .case-more-label { margin-top: 10px; }
.form-sub { font-size: .95rem; margin: 4px 0 2px; }
