:root {
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: #16201e;
  background: #eef1ea;
  font-synthesis: none;
  --muted: #52635d;
  --brand: #133f3a;
  --line: #dce1d9;
  --surface: #fff;
  --danger: #922a25;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
}
a {
  color: var(--brand);
}
button,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled,
button[aria-disabled="true"] {
  cursor: wait;
  opacity: 0.65;
}
a:focus-visible,
button:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #327b6b;
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -0.7px;
  margin-bottom: 8px;
  line-height: 1.2;
}
h2 {
  font-size: 18px;
  line-height: 1.4;
  margin-bottom: 16px;
}
p {
  line-height: 1.65;
}
small {
  line-height: 1.5;
}
code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
  font-size: 12px;
}
.shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--brand);
  color: #ecf2ed;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  margin: 0 12px 42px;
}
.brand strong {
  font-size: 23px;
  letter-spacing: 2px;
  display: block;
}
.brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 2px;
  margin-top: 3px;
  color: #c0d4c9;
}
.brand-symbol {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #789c8e;
  border-radius: 10px;
  background: #24675e;
  font-size: 24px;
  font-weight: 650;
}
.nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: #c0d4c9;
  margin: 0 12px 12px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 12px;
  border-radius: 7px;
  color: #e3eee6;
  text-decoration: none;
}
.sidebar nav a:hover {
  background: #24584e;
}
.sidebar nav a[aria-current="page"] {
  background: #d4ef62;
  color: #18382f;
  font-weight: 650;
}
.sidebar-footer {
  margin-top: auto;
  padding: 30px 12px 0;
  color: #c0d4c9;
}
.sidebar-footer strong {
  color: #e3eee6;
  font-size: 12px;
}
.sidebar-footer p {
  font-size: 12px;
  margin: 8px 0 0;
}
.workspace {
  min-width: 0;
}
.topbar {
  min-height: 64px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
}
.topbar strong {
  color: #283c34;
}
.topbar span[aria-hidden] {
  margin: 0 10px;
  color: #6c7c73;
}
.badge {
  border: 1px solid #bccbbf;
  color: #344d41;
  background: #f1f5ed;
  border-radius: 20px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge.warning {
  background: #fff4d9;
  color: #77521c;
  border-color: #d8c795;
}
.badge.error {
  background: #fff0ee;
  color: #922a25;
  border-color: #d8ada8;
}
main {
  padding: 36px 32px 28px;
  max-width: 1500px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 28px;
}
.page-heading p:last-child {
  color: var(--muted);
  margin-bottom: 0;
  max-width: 720px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  color: #52635d;
  margin-bottom: 10px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid #bbcbbf;
  border-radius: 6px;
  background: #fff;
  color: #23473a;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.button:hover:enabled {
  background: #eef4e8;
}
.button.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}
.button.primary:hover {
  background: #24675e;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.panel-head h2 {
  margin: 0;
}
.panel-head + .helper {
  margin: 12px 0 22px;
}
.helper {
  font-size: 12px;
  color: var(--muted);
}
.notice {
  border-left: 3px solid #9b7b32;
  background: #fff8e6;
  padding: 16px 20px;
  margin: 16px 0;
  color: #654b22;
}
.notice.error {
  background: #fff1ee;
  border-color: #b5463a;
  color: #922a25;
}
.notice p:last-child {
  margin-bottom: 0;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 20px 0;
}
.metric {
  padding: 18px 16px;
  border-right: 1px solid var(--line);
}
.metric:first-child {
  padding-left: 0;
}
.metric:last-child {
  border: 0;
}
.metric strong {
  font-size: 22px;
  display: block;
  margin: 8px 0;
}
.metric span {
  font-size: 12px;
  color: var(--muted);
}
.fields {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  margin: 0;
}
.fields dt,
.fields dd {
  margin: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
  line-height: 1.6;
}
.fields dt {
  color: var(--muted);
  font-size: 12px;
}
.fields dd {
  font-size: 13px;
}
.fields dt:last-of-type,
.fields dd:last-of-type {
  border: 0;
}
.context-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}
.context-picker label {
  font-size: 12px;
  font-weight: 600;
}
select {
  min-height: 42px;
  border: 1px solid #a5b9ac;
  border-radius: 6px;
  padding: 8px 34px 8px 12px;
  max-width: 100%;
  background: white;
  color: #23473a;
}
.table-scroll {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}
caption {
  text-align: left;
  padding: 16px;
  background: #fafbf8;
  font-weight: 600;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  line-height: 1.5;
}
thead th {
  background: #f5f7f1;
  color: #3c5147;
  font-size: 11px;
  font-weight: 650;
}
tbody th {
  font-weight: 600;
  width: 24%;
}
td small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}
details {
  margin-top: 10px;
}
summary {
  cursor: pointer;
  min-height: 32px;
  line-height: 2.2;
  color: var(--brand);
}
.fact-list {
  margin: 8px 0;
  padding-left: 20px;
  max-width: 500px;
}
.fact-list li {
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}
.footer {
  font-size: 11px;
  color: var(--muted);
  padding: 12px 32px 24px;
}
.loading {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.loading-bars span {
  display: block;
  max-width: 600px;
  height: 12px;
  margin: 16px 0;
  background: #e7eee2;
  border-radius: 4px;
}
.loading-bars span:nth-child(2) {
  width: 75%;
}
.loading-bars span:nth-child(3) {
  width: 50%;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 10;
  background: #fff;
  padding: 12px;
  border: 2px solid var(--brand);
}
.skip-link:focus {
  top: 12px;
}
.audit-detail {
  overflow-wrap: anywhere;
}
.audit-detail .detail-grid {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(0, 3fr);
  gap: 10px 18px;
  margin: 0 0 20px;
  line-height: 1.65;
}
.audit-detail dt {
  font-weight: 600;
}
.audit-detail dd {
  margin: 0;
  min-width: 0;
}
@media (max-width: 900px) {
  .shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .sidebar {
    padding: 24px 12px;
  }
  .brand {
    margin-bottom: 28px;
  }
  main {
    padding: 28px 22px;
  }
  .topbar {
    padding: 16px 22px;
  }
  .fields {
    grid-template-columns: 130px minmax(0, 1fr);
  }
}
@media (max-width: 650px) {
  .audit-detail .detail-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .audit-detail dd {
    margin-bottom: 12px;
  }
  .shell {
    display: block;
  }
  .sidebar {
    padding: 18px 16px;
  }
  .brand {
    margin: 0 0 16px;
    gap: 10px;
  }
  .brand-symbol {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
  .brand strong {
    font-size: 18px;
  }
  .brand small {
    font-size: 8px;
  }
  .nav-label,
  .sidebar-footer {
    display: none;
  }
  .sidebar nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }
  .sidebar nav a {
    font-size: 12px;
    padding: 10px;
    min-height: 44px;
  }
  .topbar {
    padding: 14px 18px;
    flex-wrap: wrap;
  }
  .topbar span[aria-hidden] {
    margin: 0 5px;
  }
  main {
    padding: 24px 16px;
  }
  h1 {
    font-size: 25px;
  }
  .page-heading {
    align-items: flex-start;
    gap: 12px;
  }
  .page-heading p:last-child {
    font-size: 12px;
  }
  .button {
    font-size: 12px;
    padding: 10px 12px;
  }
  .panel {
    padding: 18px;
  }
  .metrics {
    grid-template-columns: 1fr;
  }
  .metric {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
  }
  .metric strong {
    font-size: 20px;
  }
  .fields {
    display: block;
  }
  .fields dt {
    border: 0;
    padding: 14px 0 4px;
  }
  .fields dd {
    padding: 0 0 12px;
  }
  .table-scroll {
    overflow: visible;
    border: 0;
  }
  table,
  tbody,
  tr,
  td,
  tbody th {
    display: block;
    width: 100%;
  }
  thead {
    display: none;
  }
  caption {
    display: block;
    padding: 12px 0;
  }
  tbody tr {
    border: 1px solid var(--line);
    border-radius: 6px;
    margin-bottom: 12px;
  }
  tbody th {
    background: #f5f7f1;
    border-top: 0;
  }
  td {
    border-top: 0;
    padding-top: 4px;
    overflow-wrap: anywhere;
  }
  td:before {
    content: attr(data-label);
    display: block;
    font-size: 10px;
    color: var(--muted);
    font-weight: 600;
    margin: 4px 0;
  }
  .footer {
    padding: 8px 16px 24px;
  }
  .context-picker {
    display: block;
  }
  .context-picker label {
    display: block;
    margin-bottom: 8px;
  }
  select {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Keep the app reference legible and the unfocused skip link fully off screen. */
tbody th small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  margin-top: 5px;
}
.skip-link {
  top: 12px;
  transform: translateY(calc(-100% - 20px));
}
.skip-link:focus {
  transform: none;
}
.page-heading > div {
  min-width: 0;
}
input,
textarea {
  font: inherit;
}
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #327b6b;
  outline-offset: 3px;
}
.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: end;
  margin: 20px 0;
}
.form-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.form-field label {
  font-weight: 600;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 9px;
  border: 1px solid #83968b;
  border-radius: 6px;
  background: white;
  color: inherit;
}
.admin-table th strong,
.admin-table th code,
.admin-table th small {
  display: block;
  overflow-wrap: anywhere;
}
.admin-table th small {
  font-weight: 400;
}
.admin-editor {
  margin: 20px 0 0;
  display: grid;
  gap: 16px;
}
.admin-editor textarea {
  min-height: 90px;
  resize: vertical;
}
.admin-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}
.confirmation {
  display: flex;
  align-items: start;
  gap: 10px;
  line-height: 1.6;
}
.confirmation input {
  margin-top: 5px;
  flex: none;
}
.form-error {
  color: #922a25;
  margin: 0;
}
.admin-filters .form-field {
  flex: 1 1 200px;
}
.admin-editor .button {
  max-width: 100%;
  white-space: normal;
}
.session-security .button {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.session-security > .form-field {
  margin: 16px 0;
}
.legal-document {
  max-width: 76ch;
  margin: 2rem auto;
  padding: 0 1rem;
  line-height: 1.6;
}

.legal-document pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
}
