:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #182536;
  background: #f3f6f9;
  line-height: 1.55;
  --brand: #174e93;
  --brand-dark: #103d75;
  --border: #d8e0e8;
  --muted: #5b6c7d;
  --success: #17653b;
  --danger: #9b2525;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
h1, h2, h3 { line-height: 1.2; }
h1 { margin: .2rem 0 1rem; font-size: clamp(1.8rem, 4vw, 2.5rem); }
h2 { font-size: 1.25rem; }
small, .hint, .empty { color: var(--muted); }
.site-header { background: #fff; border-bottom: 1px solid var(--border); padding: .85rem max(1.25rem, calc((100vw - 1180px) / 2)); display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.brand { font-weight: 850; font-size: 1.35rem; text-decoration: none; }
.main-nav { display: flex; gap: 1rem; align-items: center; flex: 1; flex-wrap: wrap; }
.main-nav a { text-decoration: none; font-weight: 650; }
.account { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.account form { margin: 0; }
.organization-switcher { display: flex; gap: .4rem; align-items: center; }
.organization-switcher label { margin: 0; font-size: .8rem; color: var(--muted); }
.organization-switcher select { width: auto; padding: .45rem 2rem .45rem .6rem; }
main { max-width: 1180px; margin: 2.5rem auto; padding: 0 1.25rem 3rem; }
.eyebrow { margin: 0; font-size: .82rem; font-weight: 800; color: #435d77; text-transform: uppercase; letter-spacing: .08em; }
.panel, .metric { background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 5px 18px rgba(20, 47, 75, .04); padding: 1.5rem; }
.page-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.page-heading { margin-bottom: 1.5rem; }
.page-heading p, .section-heading h2 { margin-bottom: 0; }
.heading-actions, .row-actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.heading-actions form, .row-actions form { margin: 0; }
.metric-grid, .card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.metric { display: flex; flex-direction: column; }
.metric strong { font-size: 2rem; color: var(--brand-dark); }
.metric span { color: var(--muted); }
.card-grid .panel { min-height: 170px; }
.two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.button, button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid var(--brand); border-radius: 8px; background: var(--brand); color: #fff; padding: .6rem 1rem; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.button:hover, button:hover { background: var(--brand-dark); color: #fff; }
.button.secondary { background: #fff; color: var(--brand); }
.button.compact { min-height: 36px; padding: .35rem .75rem; font-size: .9rem; }
.link-button { min-height: auto; border: 0; border-radius: 0; background: transparent; color: var(--brand); padding: 0; font-weight: 650; }
.link-button:hover { background: transparent; color: var(--brand-dark); text-decoration: underline; }
.link-button.danger { color: var(--danger); }
.actions { display: flex; gap: .75rem; margin-top: 1.5rem; flex-wrap: wrap; }
.list { display: flex; flex-direction: column; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid #e7ecf1; text-decoration: none; }
.list-row:last-child { border-bottom: 0; }
.status { display: inline-flex; border: 1px solid #8996a3; border-radius: 999px; padding: .15rem .55rem; color: #4f5f6e; font-size: .8rem; font-weight: 750; }
.status.active { border-color: var(--success); color: var(--success); }
.status.published { border-color: var(--success); color: var(--success); }
.status.draft { border-color: #a35b00; color: #884b00; }
.status.under_review { border-color: var(--brand); color: var(--brand); }
.status.archived { color: var(--muted); }
.overdue { color: var(--danger); font-size: .82rem; font-weight: 750; }
.form-card { max-width: 850px; }
.form-card > div { margin-bottom: 1rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.field { min-width: 0; }
.field.full-width { grid-column: 1 / -1; }
.field > div { display: grid; gap: .45rem; }
.field > div label { font-weight: 500; }
label { display: block; margin: 0 0 .35rem; font-weight: 700; }
input, select, textarea { width: 100%; padding: .72rem; border: 1px solid #72869a; border-radius: 7px; background: #fff; color: inherit; font: inherit; }
input[type="checkbox"] { width: auto; margin-right: .4rem; }
.errorlist, .form-errors { color: var(--danger); }
.errorlist { margin: .35rem 0 0; padding-left: 1.2rem; }
.has-error input, .has-error select { border-color: var(--danger); }
.hint { border-left: 3px solid #7a92ad; padding-left: .8rem; }
.table-wrap { overflow-x: auto; padding: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .9rem 1rem; text-align: left; border-bottom: 1px solid #e7ecf1; vertical-align: middle; }
th { color: #3d5165; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.actions-cell { white-space: nowrap; }
.details dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.details dl div { border-bottom: 1px solid #e7ecf1; padding-bottom: .8rem; }
.details dt { color: var(--muted); font-size: .8rem; text-transform: uppercase; }
.details dd { margin: .25rem 0 0; font-weight: 700; }
.messages { max-width: 1180px; margin: 1rem auto 0; padding: 0 1.25rem; }
.message { padding: .8rem 1rem; border-left: 4px solid var(--brand); border-radius: 6px; background: #eaf2fb; }
.message.success { border-color: var(--success); background: #eaf7ef; }
.message.error { border-color: var(--danger); background: #fbecec; color: #721c1c; }
.message.warning { border-color: #a35b00; background: #fff5e6; color: #6d3d00; }
.auth-card { max-width: 460px; margin: 2rem auto; }
.auth-card form { display: grid; gap: 1rem; }
.top-spaced { margin-top: 2rem; }
.notice-panel { margin-bottom: 1.25rem; border-left: 4px solid var(--brand); }
.notice-panel p:last-child { margin-bottom: 0; }
.compact-panel { max-width: 850px; }
.template-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-top: 1.25rem; }
.template-card h2 { margin-top: 0; }
.tag-list, .version-summary { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.tag { border-radius: 999px; background: #eaf1f8; color: #294b6d; padding: .2rem .55rem; font-size: .82rem; }
.tag.muted { background: #f0f2f4; color: var(--muted); }
.version-summary a { text-decoration: none; }
.category-list { display: grid; gap: 1.25rem; }
.category-card > .section-heading { align-items: flex-start; border-bottom: 1px solid var(--border); padding-bottom: 1rem; }
.category-card h2, .competency-card h3 { margin: .2rem 0 .45rem; }
.competency-list { display: grid; gap: 1rem; margin: 1.25rem 0; }
.competency-card { border: 1px solid var(--border); border-radius: 10px; padding: 1.1rem; }
.competency-card > .section-heading { align-items: flex-start; }
.competency-card > .section-heading > div:first-child { max-width: 850px; }
.score-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 1rem 0; }
.score-option { border-left: 3px solid #91a8be; background: #f7f9fb; padding: .85rem; }
.score-option p { font-size: .92rem; }
.score-heading { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.score-value { display: inline-flex; min-width: 2rem; min-height: 2rem; align-items: center; justify-content: center; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; }
.inline-action { display: inline-block; margin-top: .25rem; font-weight: 650; }
.empty-state { grid-column: 1 / -1; text-align: center; }
.inline-form { display: inline; margin-left: .4rem; }
.response-list { display: grid; gap: 1rem; }
.response-card h2 { margin: .25rem 0 .5rem; }
.score-choices ul { display: grid; gap: .65rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.score-choices label { display: flex; align-items: flex-start; gap: .7rem; border: 1px solid var(--border); border-radius: 8px; padding: .75rem; font-weight: 500; cursor: pointer; }
.score-choices label:hover { border-color: var(--brand); background: #f7faff; }
.score-choices input[type="radio"] { width: auto; margin-top: .3rem; flex: 0 0 auto; }
.assessment-notes { max-width: none; margin-top: 1.25rem; }
.assessment-notes > .field { margin-bottom: 1rem; }
.assessment-notes dl { display: grid; gap: 1rem; }
.assessment-notes dt { color: var(--muted); font-size: .82rem; font-weight: 800; text-transform: uppercase; }
.assessment-notes dd { margin: .3rem 0 0; }
.sticky-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: .75rem; margin-top: 1rem; padding: 1rem; border: 1px solid var(--border); border-radius: 10px; background: rgba(255, 255, 255, .96); box-shadow: 0 -4px 18px rgba(20, 47, 75, .08); }
.return-notice { border-left: 4px solid #a35b00; margin-bottom: 1.25rem; }
.selected-score { display: flex; align-items: flex-start; gap: .85rem; margin-top: 1rem; padding: .85rem; border-radius: 8px; background: #f1f7f4; }
.selected-score p { margin: .25rem 0 0; }
.review-actions form { padding: 1rem; border: 1px solid var(--border); border-radius: 9px; }
.acknowledgement { border-left: 4px solid var(--success); }
.timeline { display: grid; gap: 0; }
.timeline-item { position: relative; display: grid; padding: .25rem 0 1rem 1.25rem; border-left: 2px solid var(--border); }
.timeline-item::before { content: ""; position: absolute; width: .65rem; height: .65rem; left: -.4rem; top: .35rem; border-radius: 50%; background: var(--brand); }
.timeline-item span { color: var(--muted); font-size: .85rem; }
.timeline-item p { margin: .35rem 0 0; }
.filter-bar { display: flex; align-items: end; gap: 1rem; flex-wrap: wrap; }
.filter-bar > div { flex: 1 1 220px; }
.filter-bar button { flex: 0 0 auto; }
.request-list { display: grid; gap: 1.25rem; }
.reopening-card h2 { margin: .2rem 0 0; }
.request-reason { margin: 1rem 0; padding: 1rem; border-left: 3px solid var(--brand); background: #f7f9fb; }
.request-reason p { margin-bottom: 0; }
.decision-actions form { padding: 1rem; border: 1px solid var(--border); border-radius: 9px; }
.logo-preview { display: flex; align-items: center; justify-content: center; min-height: 120px; margin-bottom: 1rem; padding: 1rem; border: 1px dashed var(--border); border-radius: 10px; }
.logo-preview img { max-width: 260px; max-height: 120px; object-fit: contain; }
.historical-items { display: grid; gap: 1rem; }
.historical-item { margin-top: 1rem; }
.historical-item > div { margin-bottom: .8rem; }
.historical-item input[type="checkbox"][name$="-DELETE"], .historical-item label[for$="-DELETE"] { display: none; }
.filter-actions { display: flex; gap: .6rem; align-items: center; flex: 0 0 auto !important; }
.compact-metrics .metric { padding: 1rem 1.5rem; }
.compact-metrics .metric strong { font-size: 1.5rem; }
.bar-chart { display: grid; gap: 1rem; margin-top: 1.25rem; }
.bar-row { display: grid; grid-template-columns: minmax(190px, 1.4fr) minmax(220px, 3fr) 80px; align-items: center; gap: .75rem 1rem; padding-bottom: 1rem; border-bottom: 1px solid #e7ecf1; }
.bar-label { display: flex; flex-direction: column; }
.bar-label span, .bar-meta { color: var(--muted); font-size: .82rem; }
.bar-track { height: 18px; overflow: hidden; border-radius: 999px; background: #e3e9ef; }
.bar-track > span { display: block; height: 100%; border-radius: inherit; background: #174e93; }
.bar-track.incomplete > span { width: 100%; background: repeating-linear-gradient(135deg, #d8e0e8, #d8e0e8 8px, #eef1f4 8px, #eef1f4 16px); }
.bar-value { text-align: right; }
.bar-meta { grid-column: 1 / -1; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.scale-warning { border-left: 3px solid #a35b00; padding-left: .45rem; color: #7a4300; font-weight: 700; }
.mini-chart { display: grid; gap: 1rem; }
.mini-chart > div > span { display: block; margin-bottom: .35rem; font-size: .9rem; }
.trend-list { display: grid; gap: 1.25rem; }
.trend-group { padding-bottom: 1rem; border-bottom: 1px solid #e7ecf1; }
.trend-group:last-child { border-bottom: 0; }
.trend-group h3, .trend-group p { margin: 0 0 .35rem; }
.trend-group p, .trend-point span { color: var(--muted); font-size: .82rem; }
.trend-point { display: grid; gap: .3rem; margin-top: .65rem; }
.padded-heading { padding: 1.25rem 1.5rem 0; }
:focus-visible { outline: 3px solid #b85500; outline-offset: 3px; }
@media (max-width: 850px) { .metric-grid, .card-grid, .template-grid, .score-grid { grid-template-columns: 1fr; } .two-columns, .form-grid, .details dl { grid-template-columns: 1fr; } .field.full-width { grid-column: auto; } .main-nav { order: 3; width: 100%; } }
@media (max-width: 600px) { main { margin: 1.5rem auto; } .panel { padding: 1.1rem; } .page-heading { align-items: flex-start; flex-direction: column; } .account { width: 100%; justify-content: space-between; } .organization-switcher { width: 100%; } .organization-switcher select { flex: 1; } }
@media (max-width: 750px) { .bar-row { grid-template-columns: 1fr 70px; } .bar-label, .bar-meta { grid-column: 1 / -1; } }
