:root {
  color-scheme: light;
  --primary: #93c0a4;
  --secondary: #4c230a;
  --surface: #ffffff;
  --surface-muted: #f3f6f4;
  --text: #1e1e1e;
  --muted: #5c625f;
  --border: #d6ded9;
  --danger: #9f1d20;
  --radius: 5px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--surface-muted); color: var(--text); line-height: 1.5; }
a { color: var(--secondary); text-underline-offset: 0.2em; }
button, input, select, textarea { font: inherit; }
button, a { outline-offset: 3px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--secondary); }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 10; background: white; padding: .75rem; }
.site-header { min-height: 4.5rem; padding: 1rem clamp(1rem, 4vw, 3rem); background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { color: var(--text); font-size: 1.25rem; font-weight: 800; text-decoration: none; }
nav { display: flex; align-items: center; gap: 1.25rem; }
nav form { margin: 0; }
.link-button { border: 0; padding: 0; background: transparent; color: var(--secondary); text-decoration: underline; cursor: pointer; }
.container { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; padding: 3rem 0; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 2.5rem 0 1rem; }
.section-heading h2 { margin-bottom: 0; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.05; }
.eyebrow { margin-bottom: .4rem; color: var(--secondary); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.button { display: inline-block; border: 1px solid var(--secondary); border-radius: var(--radius); padding: .7rem 1rem; background: var(--secondary); color: white; font-weight: 700; text-decoration: none; cursor: pointer; }
.button.secondary { background: white; color: var(--secondary); }
.button.danger { border-color: var(--danger); background: var(--danger); }
.search, .form-card, .auth-card, .details, .danger-zone, .empty-state, .table-wrap { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.search { padding: 1rem; margin-bottom: 1.5rem; }
.search label { display: block; margin-bottom: .4rem; font-weight: 700; }
.search-row { display: flex; gap: .75rem; }
.search-row input { flex: 1; }
input, select, textarea { width: 100%; border: 1px solid #919b95; border-radius: var(--radius); padding: .7rem .75rem; background: white; color: var(--text); }
textarea { min-height: 8rem; resize: vertical; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .9rem 1rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
.status { display: inline-block; border-radius: 999px; padding: .2rem .55rem; background: var(--primary); color: var(--text); font-size: .85rem; font-weight: 700; }
.form-card, .auth-card { padding: clamp(1.25rem, 4vw, 2rem); }
.auth-card { width: min(440px, 100%); margin: 4rem auto; }
.form-grid, .details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.field label, dt { display: block; margin-bottom: .35rem; font-weight: 700; }
.searchable-select { display: grid; gap: .45rem; }
.searchable-select label + select { margin-top: -.15rem; }
.searchable-select.is-enhanced select { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.select-options { max-height: 16rem; overflow-y: auto; border: 1px solid #919b95; border-radius: var(--radius); background: white; }
.select-option { display: block; width: 100%; border: 0; border-bottom: 1px solid var(--border); padding: .7rem .75rem; background: white; color: var(--text); text-align: left; cursor: pointer; }
.select-option:last-child { border-bottom: 0; }
.select-option:hover { background: var(--surface-muted); }
.select-option[aria-selected="true"] { background: var(--primary); font-weight: 700; }
.select-option:focus-visible { position: relative; z-index: 1; outline-offset: -3px; }
.select-options-empty { margin: 0; padding: 1rem; color: var(--muted); }
.checkbox-field { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.checkbox-field input { width: auto; }
.checkbox-field label { margin: 0; }
.checkbox-field small, .checkbox-field .field-error { flex-basis: 100%; }
.wide { grid-column: 1 / -1; }
.actions { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.details { padding: 1.5rem; }
.details div { min-width: 0; }
dd { margin: 0; }
.danger-zone { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 1.5rem; margin-top: 2rem; border-color: #e2b4b5; }
.danger-zone p { margin-bottom: 0; color: var(--muted); }
.empty-state { padding: 3rem; text-align: center; }
.message { padding: .85rem 1rem; border-left: 4px solid var(--primary); border-radius: var(--radius); background: white; }
.message.error, .field-error { color: #7d1114; }
.message.error { border-left-color: var(--danger); }
.field-error { margin: .3rem 0 0; font-size: .9rem; }
.stack { display: grid; gap: 1rem; }
.inline-action { color: var(--muted); font-size: .9rem; }
.related-section { margin-top: 2.5rem; }
.related-section .section-heading { margin-top: 0; }
.related-empty { color: var(--muted); }
.disclosure, .form-details { margin-top: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.disclosure summary, .form-details summary { padding: 1rem 1.25rem; cursor: pointer; font-weight: 700; }
.disclosure-content { padding: 0 1.25rem 1.25rem; }
.form-details-content { padding: .5rem 1.25rem 1.25rem; }
@media (max-width: 700px) {
  .site-header, .page-heading, .section-heading, .danger-zone { align-items: stretch; flex-direction: column; }
  nav { flex-wrap: wrap; }
  .form-grid, .details { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
}
