:root {
  --ink: #1d2329; --muted: #5a6572; --line: #d9dde2; --bg: #fff; --soft: #f5f6f8;
  --accent: #1f4e79; --accent-ink: #fff; --ok: #1d6b3a; --warn: #8a5a00; --bad: #a12626;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --serif: Georgia, "Times New Roman", serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.25; margin: 1.4em 0 .5em; }
h1 { font-size: 1.6rem; margin-top: .3em; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
a { color: var(--accent); } a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }
code, .code { font-family: var(--mono); font-size: .92em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: #fff; padding: .5rem; z-index: 10; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .ok { color: var(--ok); font-weight: 600; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.brand { font-family: var(--serif); font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: .02em; }
.account { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; font-size: .92rem; }
main { max-width: 1180px; margin: 0 auto; padding: 1rem; }
.narrow { max-width: 460px; margin: 2rem auto; }
form.inline, .inline-form { display: inline; }
.stack { display: grid; gap: .5rem; } .stack label { font-weight: 600; font-size: .92rem; }
.form-grid { max-width: 520px; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; } .between { justify-content: space-between; }
input, select, textarea { font: inherit; padding: .5rem .6rem; border: 1px solid #aab2bb; border-radius: 4px; background: #fff; color: var(--ink); max-width: 100%; }
textarea { width: 100%; }
.btn, button.btn { display: inline-block; font: inherit; font-size: .92rem; padding: .45rem .9rem; border: 1px solid var(--accent); color: var(--accent); background: #fff; border-radius: 4px; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn:hover { background: var(--soft); } .btn.primary:hover { background: #17415f; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.danger { color: var(--bad) !important; }
.check { font-weight: 400 !important; display: flex; gap: .5rem; align-items: center; }
.field-error { color: var(--bad); font-size: .9rem; }
.flash { margin: 0; padding: .7rem 1rem; border-bottom: 1px solid var(--line); background: var(--soft); }
.flash-success { background: #eaf5ee; color: var(--ok); } .flash-error { background: #fbeaea; color: var(--bad); }
.callout { border-left: 4px solid var(--accent); background: var(--soft); padding: .6rem .9rem; margin: .8rem 0; }
.aside { color: #333; background: var(--soft); padding: .5rem .8rem; border-radius: 4px; }
.cards { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { border: 1px solid var(--line); border-radius: 6px; padding: 1rem; } .card h2, .card h3 { margin: 0 0 .3rem; font-size: 1.1rem; }
.crumb { margin: 0; font-size: .88rem; color: var(--muted); }
.tabs { display: flex; gap: .25rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-top: .8rem; }
.tab { padding: .5rem .9rem; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; }
.tab.current { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
progress { width: 100%; height: .7rem; accent-color: var(--accent); }
.summary { display: grid; gap: .8rem; margin: 1rem 0; } .meter > div { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .92rem; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0; }
.chip { display: inline-block; padding: .15rem .6rem; border: 1px solid var(--line); border-radius: 99px; text-decoration: none; font-size: .85rem; color: var(--ink); }
.badge { display: inline-block; padding: .05rem .5rem; border: 1px solid var(--line); border-radius: 3px; font-size: .78rem; font-weight: 600; background: #fff; white-space: nowrap; }
.pr-key { border-color: var(--accent); color: var(--accent); } .pr-nice { color: var(--muted); }
.st-accepted { border-color: var(--ok); color: var(--ok); } .st-needs_more { border-color: var(--bad); color: var(--bad); }
.st-submitted { border-color: var(--accent); color: var(--accent); } .st-partial { border-color: var(--warn); color: var(--warn); }
.st-pending, .st-not_applicable, .st-see_other { color: var(--muted); }
.panel { border: 1px solid var(--line); border-radius: 6px; margin: 1rem 0; } .panel summary { padding: .6rem 1rem; cursor: pointer; font-weight: 600; } .panel-body { padding: 0 1rem 1rem; }
.split { display: grid; grid-template-columns: 240px 1fr; gap: 1.5rem; align-items: start; }
.cats ul { list-style: none; margin: 0; padding: 0; position: sticky; top: .5rem; }
.cats a { display: flex; justify-content: space-between; gap: .5rem; padding: .4rem .6rem; text-decoration: none; color: var(--ink); border-left: 3px solid transparent; font-size: .9rem; }
.cats a[aria-current="true"] { border-left-color: var(--accent); background: var(--soft); font-weight: 600; } .cats a:hover { background: var(--soft); }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin-bottom: .5rem; }
.filters label { display: grid; font-size: .8rem; color: var(--muted); gap: .15rem; } .filters input, .filters select { font-size: .9rem; padding: .35rem .5rem; }
table { width: 100%; border-collapse: collapse; } th, td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); } .num { text-align: right; } td.actions { text-align: right; white-space: nowrap; }
.dropzone { border: 2px dashed #aab2bb; border-radius: 6px; padding: 1rem; text-align: center; margin-bottom: 1rem; }
.dropzone.over { background: #eef4fa; border-color: var(--accent); } .dropzone p { margin: .3rem 0; }
.staged { list-style: none; padding: 0; margin: .8rem 0 0; text-align: left; display: grid; gap: .5rem; }
.staged li { border: 1px solid var(--line); border-radius: 4px; padding: .5rem .7rem; display: grid; gap: .3rem; }
.staged .bar { height: .5rem; width: 100%; } .staged .err { color: var(--bad); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .2rem 1rem; margin: .8rem 0; } .facts dt { color: var(--muted); } .facts dd { margin: 0; }
.actions-grid { display: grid; gap: .5rem; margin: .8rem 0; } .actions-grid details, .queue details { border: 1px solid var(--line); border-radius: 4px; padding: .4rem .7rem; } summary { cursor: pointer; }
.review-box { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: .5rem; }
.thread { list-style: none; padding: 0; } .thread li { border-bottom: 1px solid var(--line); padding: .4rem 0; } .thread li.internal { background: #fffaf0; } .thread p { margin: .2rem 0; }
.history { font-size: .9rem; padding-left: 1.2rem; }
.pager { display: flex; justify-content: space-between; margin: 2rem 0; padding-top: 1rem; border-top: 1px solid var(--line); }
.queue { list-style: none; padding: 0; display: grid; gap: .8rem; }
@media (max-width: 800px) {
  .split { grid-template-columns: 1fr; } .cats ul { position: static; display: flex; overflow-x: auto; } .cats a { white-space: nowrap; }
  table.list thead, table.files thead { position: absolute; left: -9999px; }
  table.list tr, table.files tr { display: block; border-bottom: 1px solid var(--line); padding: .5rem 0; }
  table.list td, table.files td { display: flex; justify-content: space-between; gap: 1rem; border: 0; padding: .2rem 0; text-align: right; }
  table.list td::before, table.files td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; text-align: left; }
  table.list td.actions, table.files td.actions { justify-content: flex-end; } .num { text-align: right; }
}
.group { margin-top: 2rem; padding-bottom: .3rem; border-bottom: 2px solid var(--line); }
.item { border: 1px solid var(--line); border-radius: 6px; padding: .8rem 1rem; margin: .8rem 0; }
.item-head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; flex-wrap: wrap; }
.item-head h3 { margin: 0; font-size: 1.05rem; } .badges { display: flex; gap: .4rem; }
.desc { margin: .4rem 0; color: #333; font-size: .95rem; }
.badge.tag { border-color: var(--accent); color: var(--accent); } .st-sent { border-color: var(--ok); color: var(--ok); } .st-pending { color: var(--muted); }
.intro { background: var(--soft); border-radius: 6px; padding: .5rem 1rem; margin: 1rem 0; }
.note-form { margin-top: .6rem; } .note-form label { font-size: .85rem; color: var(--muted); display: block; }
.dropzone { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; text-align: left; padding: .6rem; margin: .6rem 0; }
.dropzone .staged { flex-basis: 100%; }

.divider { display: flex; align-items: center; gap: .75rem; margin: 1.25rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid currentColor; opacity: .3; }
