:root { font-family: system-ui, -apple-system, sans-serif; color: #20352e; background: #f5f7f6; font-size: 16px; }
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; background: #205c46; color: white; border: 1px solid #205c46; border-radius: 6px; padding: .7rem 1rem; font-weight: 600; }
button:hover { background: #174734; }
.secondary { background: white; color: #20352e; border-color: #b9c8c0; }
.secondary:hover { background: #edf3ef; }
:focus-visible { outline: 3px solid #28795b; outline-offset: 3px; }
.skip-link { position: absolute; top: -5rem; left: 1rem; z-index: 2; background: white; padding: .8rem; }
.skip-link:focus { top: .5rem; }
.app-header { min-height: 88px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 2rem; border-bottom: 1px solid #dce4df; background: white; }
.brand { display: inline-block; text-decoration: none; font-size: 1.35rem; font-weight: 750; letter-spacing: -.04em; }
.brand span { display: block; font-size: .75rem; font-weight: 400; letter-spacing: 0; color: #5c6d64; margin-top: .2rem; }
.workspace { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: calc(100vh - 88px); }
nav { background: white; border-right: 1px solid #dce4df; padding: 1.5rem 1rem; }
nav a { display: block; text-decoration: none; padding: .8rem 1rem; margin-bottom: .25rem; border-radius: 6px; font-size: .9rem; }
nav a:hover { background: #f0f4f1; }
nav a[aria-current] { background: #e7f0ea; color: #184e38; font-weight: 650; }
.content { padding: 2rem; min-width: 0; }
h1 { font-size: 1.65rem; letter-spacing: -.035em; margin: 0 0 1.4rem; }
h2 { font-size: 1.05rem; margin: 0 0 .65rem; }
p { line-height: 1.6; }
.muted { color: #5c6d64; }
.panel { padding: 1.75rem; border: 1px solid #dce4df; border-radius: 8px; background: white; }
.empty-state p { max-width: 42rem; margin-bottom: 0; }
.login { width: min(100% - 2rem, 420px); margin: 8vh auto; }
.login > .brand { margin-bottom: 1.75rem; }
.login h1 { margin-bottom: .5rem; }
.login-form { display: grid; gap: .65rem; margin-top: 1.5rem; }
.login-form label { font-size: .9rem; font-weight: 600; }
input { width: 100%; min-height: 44px; border: 1px solid #a5b5ac; border-radius: 5px; padding: .65rem; margin-bottom: .6rem; background: white; color: #20352e; }
.error { padding: .6rem .9rem; background: #fff1ef; color: #8d271f; border: 1px solid #efc0b9; border-radius: 5px; }
.error p { margin: .3rem 0; font-size: .9rem; }
.button { display: inline-block; text-decoration: none; background: #205c46; color: white; border: 1px solid #205c46; border-radius: 6px; padding: .7rem 1rem; font-weight: 600; text-align: center; }
.button:hover { background: #174734; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-heading h1 { margin-bottom: .5rem; overflow-wrap: anywhere; }
.actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.notice { padding: .8rem 1rem; background: #e7f0ea; border: 1px solid #b5cebe; border-radius: 6px; }
.badge { display: inline-block; border-radius: 4px; padding: .25rem .55rem; background: #e7eeea; font-size: .8rem; font-weight: 600; }
.table-wrap { overflow-x: auto; border: 1px solid #dce4df; border-radius: 8px; background: white; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
th, td { padding: 1rem; border-bottom: 1px solid #dce4df; vertical-align: top; overflow-wrap: anywhere; min-width: 110px; }
thead { background: #edf2ee; }
tbody th { min-width: 180px; }
tbody tr:last-child > * { border-bottom: 0; }
.nowrap { white-space: nowrap; }
.pagination { display: flex; gap: 1.5rem; justify-content: flex-end; margin-top: 1rem; font-size: .9rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.campaign-form { max-width: 900px; margin-top: 1rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1.75rem; min-width: 0; }
legend { font-weight: 700; font-size: 1.1rem; margin-bottom: 1rem; }
.campaign-form label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .4rem; }
textarea, select { font: inherit; width: 100%; padding: .65rem; border: 1px solid #a5b5ac; border-radius: 5px; background: white; color: #20352e; margin-bottom: 1rem; }
textarea { resize: vertical; min-height: 90px; }
.campaign-form input { margin-bottom: 1rem; }
.help { color: #5c6d64; font-size: .8rem; margin: .2rem 0 .55rem; }
.form-grid, .metadata { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 2rem; }
.check, .campaign-form .check { display: flex; align-items: flex-start; gap: .6rem; margin: .8rem 0 1rem; font-size: .9rem; font-weight: 400; }
.check input { width: 18px; height: 18px; min-height: 0; flex: 0 0 18px; margin: .2rem 0 0; }
dl { margin: 0; }
dt { font-weight: 650; font-size: .9rem; margin-bottom: .5rem; }
dd { margin: 0 0 1.5rem; overflow-wrap: anywhere; line-height: 1.6; }
.prose { white-space: pre-wrap; }
.metadata { border-top: 1px solid #dce4df; padding-top: 1.5rem; }
.archive-panel { margin-top: 1.5rem; }
.filter-form { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 1.5rem; }
.filter-form > div { flex: 1 1 150px; min-width: 0; }
.filter-form label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .4rem; }
.filter-form input, .filter-form select { margin-bottom: 0; }
.section-heading { margin-top: 1.5rem; }
@media (max-width: 700px) { .form-grid, .metadata { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
    .app-header { padding: 1rem; }
    .workspace { grid-template-columns: 1fr; }
    nav { display: flex; flex-wrap: wrap; gap: .2rem; padding: .6rem; border-right: 0; border-bottom: 1px solid #dce4df; }
    nav a { margin: 0; padding: .7rem; }
    .content { padding: 1.5rem 1rem; }
    .panel { padding: 1.25rem; }
}
