:root { color-scheme: dark; font-family: system-ui, sans-serif; background: #0d1219; color: #e9edf1; font-size: 14px; --muted: #a5b2c1; --line: #2c3949; --accent: #ffba79; }
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 9px 13px; background: #233243; border: 1px solid #465a70; border-radius: 6px; color: #f3f5f7; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
button:hover, .button:hover { background: #2d4055; }
button:disabled { opacity: .45; cursor: not-allowed; }
.primary { background: #f4b272; border-color: #f4b272; color: #191b1f; }
.primary:hover { background: #ffc38a; }
.danger { background: #55303a; border-color: #a05a67; color: #ffd9df; }
.danger:hover { background: #73404d; }
.quiet { background: transparent; }
:is(button,a,input,select,textarea,summary,[tabindex]):focus-visible { outline: 3px solid #ffba79; outline-offset: 3px; }
.skip-link { position: absolute; top: -70px; left: 20px; padding: 12px; background: #172330; z-index: 10; }
.skip-link:focus { top: 12px; }
.site-header { height: 88px; display: flex; align-items: center; gap: 24px; padding: 20px 32px; border-bottom: 1px solid var(--line); background: #121b26; }
.ops-brand { display: flex; align-items: center; gap: 13px; color: #f9ecde; text-decoration: none; font-weight: 750; letter-spacing: .08em; }
.ops-brand small { display: block; color: var(--muted); font-size: 12px; letter-spacing: 0; font-weight: 400; margin-top: 5px; }
.brand-mark { color: var(--accent); font: 700 30px Georgia, serif; border: 1px solid #6a513c; border-radius: 7px; padding: 5px 13px; }
.private-label { color: #c8a98b; font-size: 11px; letter-spacing: .12em; }
.back-link { margin-left: auto; }
main { max-width: 1740px; margin: auto; padding: 0 28px 40px; }
h1 { font-size: clamp(1.7rem, 3vw, 2.2rem); letter-spacing: -.035em; margin: 6px 0 10px; line-height: 1.2; }
h2 { margin: 0 0 14px; font-size: 1.16rem; } h3 { margin: 24px 0 12px; font-size: 1.02rem; }
p { line-height: 1.55; }
.eyebrow { margin: 0; color: #be9672; font-size: 10px; font-weight: 700; letter-spacing: .15em; }
.muted { color: var(--muted); } .small { font-size: 12px; }
.feedback { margin: 14px 0; min-height: 24px; color: #c9dbc9; overflow-wrap: anywhere; }
.feedback:empty { margin: 8px 0; min-height: 8px; }
.feedback[data-tone="error"] { background: #40252d; border-left: 3px solid #f38d9c; padding: 12px 14px; color: #ffd5dc; }
.feedback[data-tone="success"] { background: #18372e; border-left: 3px solid #68c8a3; padding: 12px 14px; }
.login-card { max-width: 560px; margin: 80px auto; padding: 32px; border: 1px solid var(--line); border-radius: 10px; background: #141e29; }
.login-card .button { margin: 12px 0; }
.workspace { display: grid; grid-template-columns: 205px minmax(0,1fr); gap: 28px; align-items: start; }
.sidebar { position: sticky; top: 20px; padding: 20px 14px 20px 0; border-right: 1px solid var(--line); }
nav { display: grid; gap: 6px; margin: 16px 0 35px; }
nav button { display: block; width: 100%; text-align: left; border-color: transparent; background: transparent; padding: 13px 12px; }
nav button span { display: block; }
nav button small { display: block; color: var(--muted); font-size: 10px; margin-top: 5px; font-weight: 400; }
nav button[aria-current="page"] { background: #28303a; border-color: #735740; color: #ffcc9a; }
.staff-card { border-top: 1px solid var(--line); padding: 22px 8px 0; }
.staff-card strong { display: block; overflow-wrap: anywhere; margin-bottom: 9px; }
.staff-card p { font-size: 11px; }
.staff-card button { width: 100%; margin-top: 7px; }
.content { min-width: 0; }
.workspace-toolbar, .page-heading, .panel-heading, .pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.workspace-toolbar { min-height: 58px; font-size: 12px; }
.workspace-toolbar > div { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.page-heading { margin: 20px 0 14px; }
.panel { padding: 22px; border: 1px solid var(--line); border-radius: 9px; background: #141e29; margin: 20px 0; min-width: 0; }
.panel-heading { margin-bottom: 15px; } .panel-heading h2 { margin: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; }
.metric { padding: 20px; border: 1px solid var(--line); background: #172431; border-radius: 8px; min-width: 0; }
.metric-label { display: block; color: var(--muted); font-size: 12px; }
.metric-value { display: block; margin: 9px 0; font-size: clamp(21px,2.6vw,32px); font-weight: 650; letter-spacing: -.025em; }
.metric-note { display: block; color: #91a3b4; font-size: 11px; }
.compact .metric { padding: 14px; background: #101a24; }
.compact .metric-value { font-size: 22px; }
.badge { display: inline-block; padding: 4px 8px; border-radius: 5px; background: #29394a; color: #ccd9e9; font-size: 11px; font-weight: 650; white-space: nowrap; }
.badge[data-tone="good"] { background: #1c3c32; color: #89ddba; }
.badge[data-tone="warning"] { background: #473824; color: #ffd38a; }
.badge[data-tone="danger"] { background: #4b2b36; color: #ffabbc; }
.badge + .badge { margin-left: 5px; }
.table-panel { padding: 0; overflow: hidden; }
.table-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; padding: 18px; background: #172431; border-bottom: 1px solid var(--line); }
.table-toolbar label { min-width: 130px; margin: 0; font-size: 11px; color: var(--muted); }
.table-toolbar .search-field { flex: 1 1 235px; }
.table-toolbar input, .table-toolbar select { margin-top: 6px; min-height: 38px; }
.table-wrap { width: 100%; max-height: 660px; overflow: auto; overscroll-behavior: contain; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 12px; }
caption { padding: 14px 18px; text-align: left; color: var(--muted); font-size: 11px; }
th, td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { position: sticky; top: 0; background: #1c2937; color: #b9c9d9; white-space: nowrap; font-size: 11px; z-index: 1; }
th[scope="row"] { font-weight: 500; }
tbody tr:nth-child(even) { background: #17222e; }
tbody tr:hover { background: #203043; }
tr[data-selected="true"] { background: #32342f !important; box-shadow: inset 3px 0 #ffba79; }
.sort-button { padding: 0; min-height: 24px; background: transparent; color: inherit; border: 0; font-size: inherit; border-radius: 2px; }
.sort-button:hover { background: transparent; color: #fff; }
.sort-indicator { color: #ffca98; min-width: 12px; }
.cell-secondary { display: block; color: var(--muted); font-size: 10px; margin-top: 5px; }
.cell-summary { min-width: 150px; max-width: 310px; overflow-wrap: anywhere; }
.cell-actions { white-space: nowrap; } .cell-actions button { padding: 6px 10px; min-height: 30px; font-size: 11px; }
.cell-actions button + button { margin-left: 6px; }
.id-value { font-family: ui-monospace, monospace; overflow-wrap: anywhere; color: #a7b7c7; font-size: 11px; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-state strong { display: block; color: #d5dfe8; margin-bottom: 8px; font-size: 14px; }
.pagination { padding: 14px 18px; font-size: 11px; }
.pagination > span:first-child { margin-right: auto; color: var(--muted); }
.pagination label { display: flex; align-items: center; gap: 8px; margin: 0; }
.pagination select { width: 66px; min-height: 30px; padding: 4px 7px; margin: 0; }
.pagination button { min-height: 30px; padding: 6px 10px; font-size: 11px; }
.detail-panel { border-color: #5b625a; scroll-margin-top: 18px; }
.facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 22px; }
.facts > div { min-width: 0; }
dt { color: var(--muted); font-size: 11px; margin-bottom: 5px; }
dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.prose-block { padding: 16px; background: #0f1822; border: 1px solid var(--line); border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.notes-list { display: grid; gap: 10px; }
.notes-list article { background: #182635; border-left: 3px solid #7391b2; padding: 13px 16px; }
.notes-list article p { margin: 7px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
label { display: block; margin: 16px 0; }
input:not([type="checkbox"]), select, textarea { display: block; width: 100%; margin-top: 7px; min-height: 40px; padding: 9px 11px; color: inherit; background: #0e1823; border: 1px solid #496076; border-radius: 5px; font: inherit; }
input[type="checkbox"] { accent-color: #f4b272; width: 17px; height: 17px; flex: 0 0 auto; }
textarea { min-height: 100px; resize: vertical; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 5px 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 20px; }
.toggle-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 14px 0; }
.toggle { display: flex; gap: 10px; align-items: start; background: #1b2836; border: 1px solid var(--line); padding: 14px; border-radius: 6px; margin: 0; }
.toggle small { display: block; color: var(--muted); font-size: 11px; margin-top: 6px; }
summary { cursor: pointer; font-weight: 600; }
summary .muted { font-size: 11px; margin-left: 10px; font-weight: 400; }
details[open] > summary { margin-bottom: 20px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #0f1822; font-size: 11px; padding: 16px; max-height: 360px; overflow: auto; border-radius: 5px; }
.audit-diff { min-width: 240px; }
.audit-diff pre { margin: 8px 0; padding: 10px; }
dialog { max-width: min(580px,calc(100vw - 30px)); width: 580px; max-height: calc(100dvh - 40px); overflow: auto; padding: 28px; color: #e9edf1; background: #17232f; border: 1px solid #5c6f82; border-radius: 12px; box-shadow: 0 30px 100px #0008; }
dialog::backdrop { background: #050b12c9; }
.dialog-actions { display: flex; justify-content: end; gap: 12px; margin-top: 24px; }
.rating-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.rating-tabs button[aria-pressed="true"] { background: #704820; border-color: #ce955c; }
.rating-tools label { margin-top: 0; }
.rating-summary { margin: 20px 0; }
.rating-note { border-left: 3px solid #d3a66e; padding: 13px 16px; background: #302a24; }
.chat-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-tabs button[aria-pressed="true"] { background: #704820; border-color: #ce955c; }
.chat-ladder { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 14px; }
.chat-ladder label { margin: 0; font-size: 12px; }
.chat-text-cell { min-width: 220px; max-width: 430px; }
.chat-sanitized { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; line-height: 1.6; }
.chat-row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-row-actions button { margin-left: 0 !important; white-space: normal; }
.chat-evidence-cell { min-width: 265px; max-width: 480px; }
.chat-evidence summary { color: #d8b492; font-size: 11px; line-height: 1.6; }
.chat-evidence-content { min-width: 0; }
.chat-evidence-content pre { max-height: 260px; font-size: 12px; user-select: text; }
.chat-evidence-content .facts { grid-template-columns: 1fr; }
.chat-original { border: 1px solid #a677515f; }
#global-map-error { margin: 18px; }
#chat-strike-window { max-width: 320px; }
[hidden] { display: none !important; }
@media (max-width: 1100px) {
  .workspace { grid-template-columns: 175px minmax(0,1fr); gap: 18px; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .table-toolbar label { flex: 1 1 130px; }
}
@media (max-width: 760px) {
  .site-header { padding: 15px; height: 78px; gap: 12px; }
  .private-label { display: none; }
  main { padding: 0 14px 24px; }
  .workspace { display: block; }
  .sidebar { position: static; border: 0; padding: 0; }
  .sidebar > .eyebrow { display: none; }
  nav { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); margin: 5px 0 14px; gap: 5px; }
  nav button { padding: 10px 4px; text-align: center; font-size: 11px; }
  nav button small { display: none; }
  .staff-card { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .staff-card strong { margin: 0; font-size: 12px; } .staff-card p { margin: 0; }
  .staff-card button { width: auto; margin: 0 0 0 auto; font-size: 11px; min-height: 30px; }
  .workspace-toolbar { gap: 6px; } .workspace-toolbar > div { width: 100%; justify-content: space-between; }
  .panel { padding: 15px; } .table-panel { padding: 0; }
  .table-toolbar { padding: 13px; } .table-toolbar .search-field { flex-basis: 100%; }
  .metric { padding: 15px; } .metric-grid { gap: 10px; }
  .form-grid, .facts, .toggle-grid { grid-template-columns: 1fr; }
  .pagination { padding: 12px; gap: 9px; } .pagination > span:first-child { flex-basis: 100%; }
  .page-heading { margin-top: 18px; }
  .login-card { margin: 35px auto; padding: 23px; }
  .chat-ladder { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .chat-tabs button { flex: 1 1 120px; }
  nav { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
