:root {
  --bg: #f5f6f8; --card: #fff; --ink: #1d2433; --muted: #667085; --line: #e3e6eb;
  --brand: #1f4e79; --brand-ink: #fff; --danger: #b42318; --warn: #b54708; --ok: #027a48;
  --high: #b42318; --medium: #c4320a; --low: #a07400; --conforms: #027a48;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.5; font-size: 15px; }
a { color: var(--brand); }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; } h2 { font-size: 1.2rem; margin: 0 0 .75rem; } h3 { font-size: 1rem; }
.topbar { display: flex; align-items: center; gap: 1rem; padding: .6rem 1.5rem; background: var(--brand); color: var(--brand-ink); }
.topbar a, .topbar .link { color: var(--brand-ink); text-decoration: none; }
.topbar nav { margin-left: auto; display: flex; gap: 1.25rem; align-items: center; }
.brand { font-weight: 700; font-size: 1.1rem; }
.container { max-width: 1200px; margin: 1.5rem auto; padding: 0 1.5rem; }
.footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 2rem 1rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; }
.narrow { max-width: 420px; margin: 3rem auto; } .narrow-wide { max-width: 760px; }
.card.danger { border-color: #f1b5ad; } .card.notes { white-space: pre-wrap; } .card.warn { border-color: #f5d49b; }
.empty { text-align: center; padding: 2.5rem; }
.page-head, .section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: .75rem; }
.muted { color: var(--muted); } .small { font-size: .8rem; }
.prewrap { white-space: pre-wrap; }
label { display: block; margin-bottom: .9rem; font-weight: 500; }
input, select, textarea { display: block; width: 100%; margin-top: .3rem; padding: .55rem .65rem; border: 1px solid #cfd4dc; border-radius: 6px; font: inherit; background: #fff; }
input[type=file] { padding: .4rem; }
input:focus, select:focus, textarea:focus { outline: 2px solid #9ec5ea; border-color: var(--brand); }
input.code { font-size: 1.6rem; letter-spacing: .4em; text-align: center; font-family: ui-monospace, monospace; }
.row { display: flex; gap: 1rem; } .row > label { flex: 1; }
.btn { display: inline-block; padding: .5rem 1rem; border: 1px solid #cfd4dc; border-radius: 6px; background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; font: inherit; font-weight: 500; }
.btn:hover { background: #f0f2f5; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; } .btn-primary:hover { background: #173d60; }
.btn-danger { color: var(--danger); border-color: #f1b5ad; } .btn-danger:hover { background: #fef3f2; }
.link { background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; font: inherit; text-decoration: underline; }
form.inline { display: inline; }
table { width: 100%; border-collapse: collapse; margin: .5rem 0 1rem; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; }
.flash { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid; }
.flash-info { background: #eff8ff; border-color: #b2ddff; } .flash-success { background: #ecfdf3; border-color: #abefc6; }
.flash-warning { background: #fffaeb; border-color: #fedf89; } .flash-error { background: #fef3f2; border-color: #fecdca; }
.badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 600; background: #eef0f3; color: #344054; text-transform: capitalize; white-space: nowrap; }
.badge-ready, .badge-active, .badge-complete, .badge-open, .badge-conforms { background: #dcfae6; color: var(--ok); }
.badge-pending, .badge-processing, .badge-queued, .badge-running, .badge-draft { background: #eff8ff; color: #175cd3; }
.badge-failed, .badge-no_text, .badge-high, .badge-non_conforming { background: #fee4e2; color: var(--high); }
.badge-medium, .badge-significant_issues { background: #ffead5; color: var(--medium); }
.badge-low, .badge-minor_issues { background: #fef7c3; color: var(--low); }
.badge-superseded, .badge-closed { background: #f2f4f7; color: #667085; }
.rating { font-size: 1.1rem; font-weight: 700; padding: .5rem 1rem; border-radius: 8px; display: inline-block; }
.rating-conforms { background: #dcfae6; color: var(--ok); } .rating-minor_issues { background: #fef7c3; color: var(--low); }
.rating-significant_issues { background: #ffead5; color: var(--medium); } .rating-non_conforming { background: #fee4e2; color: var(--high); }
.finding { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--muted); border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1rem; }
.finding.sev-high { border-left-color: var(--high); } .finding.sev-medium { border-left-color: var(--medium); }
.finding.sev-low { border-left-color: var(--low); } .finding.sev-conforms { border-left-color: var(--conforms); }
.finding header h3 { margin: .35rem 0 .1rem; }
.finding .cat { font-size: .8rem; color: var(--muted); margin-left: .5rem; text-transform: uppercase; letter-spacing: .03em; }
.finding .where { font-size: .8rem; }
blockquote { margin: .75rem 0; padding: .5rem .9rem; border-left: 3px solid #cfd4dc; background: #f9fafb; font-style: italic; }
.refs { margin-top: .75rem; font-size: .92rem; } .refs ul { margin: .25rem 0; }
details summary { cursor: pointer; }
pre.doctext, pre.excerpt { white-space: pre-wrap; word-wrap: break-word; font-family: ui-monospace, monospace; font-size: .82rem; background: #f9fafb; border: 1px solid var(--line); border-radius: 6px; padding: .75rem; max-height: 70vh; overflow: auto; }
pre.excerpt { max-height: 260px; }
.tally .badge { margin-right: .35rem; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid #b2ddff; border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; vertical-align: -2px; margin-right: .4rem; }
@keyframes spin { to { transform: rotate(360deg); } }
label.check { display: flex; align-items: center; gap: .5rem; font-weight: 400; margin-bottom: .25rem; }
label.check input { width: auto; margin: 0; }
.badge-admin { background: #e0eaff; color: #3538cd; }
.form-inline { display: flex; gap: .5rem; align-items: flex-end; flex-wrap: wrap; }
.form-inline label { margin-bottom: 0; }
.summary { max-width: 70ch; }
table.bulk td { padding: .35rem .4rem; }
table.bulk input, table.bulk select { margin-top: 0; padding: .35rem .45rem; font-size: .9rem; }
table.bulk .w-title { min-width: 16rem; } table.bulk .w-sm { width: 7rem; } table.bulk .w-date { width: 9.5rem; }
table.bulk tr.row-sub td { border-bottom: 2px solid var(--line); padding-top: 0; font-size: .85rem; color: var(--muted); }
table.bulk tr.row-main td { border-bottom: 0; }
.progress { height: 10px; background: #eef0f3; border-radius: 999px; overflow: hidden; margin: .5rem 0; }
.progress > span { display: block; height: 100%; background: var(--brand); }
.p0{width:0}.p1{width:10%}.p2{width:20%}.p3{width:30%}.p4{width:40%}.p5{width:50%}.p6{width:60%}.p7{width:70%}.p8{width:80%}.p9{width:90%}.p10{width:100%}
.ai-disclaimer { background: #fffaeb; border: 1px solid #fedf89; border-left: 6px solid #dc6803; border-radius: 8px; padding: .8rem 1.1rem; margin-bottom: 1.25rem; }
.ai-disclaimer strong { color: #93370d; display: block; margin-bottom: .2rem; }
.ai-disclaimer p { margin: 0; font-size: .9rem; color: #4e2a07; }
.ai-note { font-size: .82rem; color: #93370d; margin: .4rem 0 .8rem; }
@media print { .ai-disclaimer { break-inside: avoid; } }
[hidden] { display: none !important; }
fieldset.attach-picker { border: 1px solid var(--line); border-radius: 8px; padding: .6rem 1rem .4rem; margin: 0 0 1rem; }
fieldset.attach-picker legend { font-weight: 500; padding: 0 .3rem; }
.attach-list { max-height: 18rem; overflow: auto; border-top: 1px solid var(--line); padding-top: .4rem; }
.attach-item { align-items: baseline; flex-wrap: wrap; padding: .2rem 0; border-bottom: 1px dashed var(--line); }
.attach-item .attach-label { flex: 1; min-width: 12rem; }
.thread .exchange { border-left: 3px solid var(--line); padding: .25rem 0 .25rem .9rem; margin-bottom: .75rem; }

.meter { margin-bottom: .75rem; }
.meter-head { display: flex; justify-content: space-between; gap: 1rem; font-size: .92rem; }
.progress.near > span { background: var(--warn); } .progress.over > span { background: var(--danger); }
.chart { display: flex; align-items: flex-end; gap: 2px; height: 120px; border-bottom: 1px solid var(--line); margin-top: .5rem; }
.chart-col { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.chart .bar { display: block; width: 100%; background: var(--brand); border-radius: 2px 2px 0 0; min-height: 0; }
.chart-col:hover .bar { background: #3b7bbf; }
.chart-axis { display: flex; justify-content: space-between; margin-top: .25rem; }
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tabs a { padding: .3rem .8rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; background: #fff; }
.tabs a.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; }
.stat .v { font-size: 1.4rem; font-weight: 700; } .stat .k { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.chart .bar.h0{height:0%}.chart .bar.h1{height:5%}.chart .bar.h2{height:10%}.chart .bar.h3{height:15%}.chart .bar.h4{height:20%}.chart .bar.h5{height:25%}.chart .bar.h6{height:30%}.chart .bar.h7{height:35%}.chart .bar.h8{height:40%}.chart .bar.h9{height:45%}.chart .bar.h10{height:50%}.chart .bar.h11{height:55%}.chart .bar.h12{height:60%}.chart .bar.h13{height:65%}.chart .bar.h14{height:70%}.chart .bar.h15{height:75%}.chart .bar.h16{height:80%}.chart .bar.h17{height:85%}.chart .bar.h18{height:90%}.chart .bar.h19{height:95%}.chart .bar.h20{height:100%}
.guide { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 2rem; align-items: start; }
.guide-toc { position: sticky; top: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.1rem; font-size: .9rem; }
.guide-toc ol { margin: .5rem 0 0; padding-left: 1.2rem; } .guide-toc li { margin: .3rem 0; }
.guide-toc a { text-decoration: none; } .guide-toc a:hover { text-decoration: underline; }
.guide-body { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1.75rem 2.25rem; max-width: 860px; }
.guide-body section { scroll-margin-top: 1rem; border-top: 1px solid var(--line); padding-top: 1.25rem; margin-top: 1.5rem; }
.guide-body h2 { font-size: 1.3rem; color: var(--brand); } .guide-body h3 { margin: 1.1rem 0 .3rem; }
.guide-body p, .guide-body li, .guide-body dd { max-width: 72ch; } .guide-body li { margin: .25rem 0; }
.guide-body .lead { font-size: 1.05rem; color: var(--muted); }
.guide-body code { background: #f2f4f7; padding: .05rem .3rem; border-radius: 4px; font-size: .88em; }
.faq dt { font-weight: 600; margin-top: .9rem; } .faq dd { margin: .2rem 0 0 0; }
@media (max-width: 900px) { .guide { grid-template-columns: 1fr; } .guide-toc { position: static; } .guide-body { padding: 1.25rem; } }
.brand { display: inline-flex; align-items: center; gap: 0; }
.brand-name { display: inline-flex; align-items: center; align-self: stretch; padding: 0 1.25rem; line-height: 1.2; }
.brand-logo { display: inline-flex; background: #fff; border-radius: 8px; padding: 3px 8px; }
.brand-logo img { display: block; height: 69px; width: auto; }
@media (max-width: 600px) { .brand-name { display: none; } }
