:root {
  color-scheme: light;
  --theme-nav: #064b37;
  --theme-primary: #17664a;
  --theme-accent: #bfd6c5;
  --page: #f7f6f0;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --ink: #173c2e;
  --muted: #53655c;
  --border: #cedbd2;
  --danger: #922f35;
  --danger-soft: #fff0f0;
  --warning: #6c4d0b;
  --warning-soft: #fff3d2;
  --success: #155f42;
  --success-soft: #e9f5ed;
  --nav-text: #ffffff;
  --primary-text: #ffffff;
  --link: #126044;
  --focus: #0b66d6;
  --shadow: 0 14px 34px rgb(13 49 36 / 9%);
  --radius: 0.55rem;
  --shell: 74rem;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, system-ui, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 20rem;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-size: 1rem;
  line-height: 1.58;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
select,
input[type="checkbox"],
input[type="color"],
input[type="file"] {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

a {
  color: var(--link);
}

a:hover {
  text-decoration-thickness: 0.14em;
}

:focus-visible {
  outline: 0.2rem solid var(--focus);
  outline-offset: 0.2rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.14;
  text-wrap: balance;
}

h1 {
  margin-bottom: 0.75rem;
  font-family: "Arial Narrow", "Roboto Condensed", "Segoe UI", sans-serif;
  font-size: clamp(2.55rem, 6vw, 4.9rem);
  font-stretch: condensed;
  letter-spacing: -0.025em;
}

h2 {
  margin-bottom: 0.7rem;
  font-family: "Arial Narrow", "Roboto Condensed", "Segoe UI", sans-serif;
  font-size: clamp(1.75rem, 3.7vw, 2.8rem);
  font-stretch: condensed;
}

h3 {
  margin-bottom: 0.45rem;
  font-size: 1.12rem;
}

img,
iframe {
  max-width: 100%;
}

.shell {
  width: min(var(--shell), calc(100% - 2.75rem));
  margin-inline: auto;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: -8rem;
  left: 1rem;
  padding: 0.8rem 1rem;
  color: #102019;
  background: #ffffff;
  border: 2px solid #102019;
  border-radius: 0.3rem;
  font-weight: 800;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  z-index: 40;
  top: 0;
  color: var(--nav-text);
  background: var(--theme-nav);
  border-bottom: 0.24rem solid var(--theme-accent);
  box-shadow: 0 0.35rem 1.2rem rgb(7 32 23 / 18%);
}

.header-inner {
  position: relative;
  display: flex;
  min-height: 5.45rem;
  align-items: center;
  gap: 1rem;
}

.wordmark {
  display: inline-flex;
  flex: 0 0 auto;
  flex-direction: column;
  color: var(--nav-text);
  text-decoration: none;
}

.wordmark strong {
  font-family: "Arial Narrow", "Roboto Condensed", "Segoe UI", sans-serif;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: 0.07em;
}

.wordmark strong span {
  color: var(--theme-accent);
}

.wordmark small {
  margin-top: 0.35rem;
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.12rem;
  margin-left: auto;
}

.nav-link,
.nav-action {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.68rem;
  color: var(--nav-text);
  background: transparent;
  border: 0;
  border-radius: 0.3rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-link:hover,
.nav-action:hover,
.nav-link[aria-current="page"] {
  color: var(--nav-text);
  background: rgb(255 255 255 / 17%);
  text-decoration: none;
}

.nav-link.member-entry {
  border: 1px solid currentColor;
}

.nav-group {
  position: relative;
}

.nav-group-summary {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  padding: 0.6rem 0.68rem;
  color: var(--nav-text);
  border-radius: 0.3rem;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  list-style: none;
  text-transform: uppercase;
}

.nav-group-summary::-webkit-details-marker {
  display: none;
}

.nav-group-summary::after {
  margin-left: 0.35rem;
  content: "▾";
}

.nav-group-summary:hover,
.nav-group-summary[aria-current="page"] {
  background: rgb(255 255 255 / 17%);
}

.nav-submenu {
  position: absolute;
  z-index: 5;
  top: calc(100% + 0.25rem);
  right: 0;
  display: grid;
  min-width: 14rem;
  padding: 0.45rem;
  background: var(--theme-nav);
  border: 1px solid var(--theme-accent);
  box-shadow: 0 0.7rem 1.2rem rgb(0 0 0 / 22%);
}

.nav-submenu .nav-link {
  justify-content: flex-start;
  text-align: left;
}

.nav-mode-toggle {
  display: none;
}

.header-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.45rem;
}

.mode-toggle,
.menu-button {
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
  color: var(--nav-text);
  background: rgb(255 255 255 / 11%);
  border: 1px solid rgb(255 255 255 / 45%);
  border-radius: 0.35rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.mode-toggle:hover,
.menu-button:hover {
  background: rgb(255 255 255 / 20%);
}

.mode-icon {
  margin-right: 0.25rem;
  font-size: 1.2rem;
  line-height: 1;
}

.menu-button {
  display: none;
}

main {
  min-height: calc(100vh - 12rem);
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(120deg, var(--page) 0%, var(--surface) 63%, color-mix(in srgb, var(--theme-primary) 11%, var(--page)) 100%);
  border-bottom: 1px solid var(--border);
}

.hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 0.34rem;
  background: linear-gradient(90deg, var(--theme-primary) 0 42%, var(--theme-accent) 42% 62%, transparent 62%);
  content: "";
}

.hero-inner {
  padding-block: clamp(3.5rem, 9vw, 6.8rem);
}

.hero-wordmark {
  margin-bottom: 2.2rem;
  color: var(--ink);
  font-family: "Arial Narrow", "Roboto Condensed", "Segoe UI", sans-serif;
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 900;
  letter-spacing: 0.07em;
  line-height: 0.95;
}

.hero-wordmark span {
  color: var(--link);
}

.hero-wordmark small {
  display: block;
  margin-top: 0.75rem;
  color: var(--muted);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.hero h1 {
  max-width: 52rem;
}

.lead {
  max-width: 46rem;
  color: var(--muted);
  font-size: clamp(1.03rem, 2.1vw, 1.2rem);
  line-height: 1.7;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
  color: var(--link);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 1.35rem;
  height: 0.2rem;
  background: var(--theme-accent);
  content: "";
}

.hero-actions,
.actions,
.form-actions,
.toolbar,
.flex-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.hero-actions {
  margin-top: 1.8rem;
}

.btn {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.58rem 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.36rem;
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
}

.btn:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--theme-primary) 7%, var(--surface));
  border-color: color-mix(in srgb, var(--theme-primary) 45%, var(--border));
  text-decoration: none;
}

.btn.primary {
  color: var(--primary-text);
  background: var(--theme-primary);
  border-color: var(--theme-primary);
}

.btn.primary:hover {
  color: var(--primary-text);
  background: color-mix(in srgb, var(--theme-primary) 84%, #000000);
}

.btn.danger {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: color-mix(in srgb, var(--danger) 45%, var(--border));
}

.btn.small {
  min-height: 2.45rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
}

.button-link {
  min-height: 2.75rem;
  padding: 0.55rem;
  color: var(--link);
  background: transparent;
  border: 0;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.section {
  padding-block: clamp(2.8rem, 6vw, 4.4rem);
}

.page-wrap {
  min-height: 37rem;
  padding-block: clamp(2.3rem, 6vw, 4.4rem);
}

.page-head,
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-head {
  padding-bottom: 1.35rem;
  border-bottom: 1px solid var(--border);
}

.page-head h1 {
  margin-bottom: 0.35rem;
}

.page-head p,
.section-head p {
  max-width: 45rem;
  margin-bottom: 0;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.columns-2 {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  gap: 1.25rem;
}

.stack {
  display: grid;
  min-width: 0;
  gap: 0.8rem;
}

.card,
.panel,
.record,
.stat,
.empty-state {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.card,
.panel {
  padding: clamp(1.2rem, 3vw, 1.6rem);
}

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.card h2 {
  margin-bottom: 0.45rem;
  font-family: inherit;
  font-size: 1.18rem;
}

.card p {
  flex: 1;
  color: var(--muted);
  font-size: 0.9rem;
}

.card a {
  font-size: 0.88rem;
  font-weight: 800;
}

.feature-symbol {
  display: grid;
  width: 2.55rem;
  height: 2.55rem;
  place-items: center;
  margin-bottom: 0.8rem;
  color: var(--primary-text);
  background: var(--theme-primary);
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 900;
}

.record {
  min-width: 0;
  max-width: 100%;
  padding: 1rem 1.25rem;
  border-left: 0.24rem solid var(--theme-accent);
}

.record h2,
.record h3 {
  font-family: inherit;
  font-size: 1.12rem;
}

.record p:last-child {
  margin-bottom: 0;
}

.note-record h2,
.note-record h3,
.note-record .record-meta,
.note-body {
  max-width: 100%;
  color: inherit;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.note-body {
  white-space: pre-wrap;
}

.note-preview {
  margin-top: 0.75rem;
}

.note-contrast-status {
  margin-top: 0.65rem;
  margin-bottom: 0.75rem;
}

.record-meta {
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.record-title,
.detail,
.admin-entry {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.record-title > :first-child,
.detail > :first-child,
.admin-entry > :first-child {
  min-width: 0;
}

.record-title .actions,
.detail .actions,
.admin-entry .actions {
  flex: 0 0 auto;
}

.document-folders {
  display: grid;
  gap: 0.85rem;
}

.document-folder {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.document-folder summary {
  display: flex;
  min-height: 4.5rem;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.2rem;
  cursor: pointer;
  list-style: none;
  font-weight: 800;
}

.document-folder summary::-webkit-details-marker {
  display: none;
}

.document-folder summary::after {
  margin-left: auto;
  content: "+";
  color: var(--muted);
  font-size: 1.45rem;
  line-height: 1;
}

.document-folder[open] summary::after {
  content: "−";
}

.folder-mark {
  position: relative;
  width: 2.25rem;
  height: 1.55rem;
  background: var(--theme-accent);
  border: 1px solid var(--theme-primary);
  border-radius: 0.22rem;
}

.folder-mark::before {
  position: absolute;
  top: -0.48rem;
  left: -1px;
  width: 1.05rem;
  height: 0.5rem;
  content: "";
  background: var(--theme-accent);
  border: 1px solid var(--theme-primary);
  border-bottom: 0;
  border-radius: 0.22rem 0.22rem 0 0;
}

.folder-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.folder-contents {
  display: grid;
  gap: 0.75rem;
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--border);
}

.folder-contents .record:first-child {
  margin-top: 1rem;
}

.callout {
  margin-top: 1.2rem;
  padding: clamp(1.4rem, 4vw, 2rem);
  color: var(--nav-text);
  background: var(--theme-nav);
  border-left: 0.34rem solid var(--theme-accent);
}

.callout h2 {
  color: var(--nav-text);
}

.callout p {
  max-width: 45rem;
  color: var(--nav-text);
  opacity: 0.9;
}

.callout .btn {
  margin-top: 0.4rem;
}

.alert {
  margin-bottom: 1.2rem;
  padding: 0.85rem 1rem;
  color: var(--warning);
  background: var(--warning-soft);
  border-left: 0.26rem solid #a77813;
}

.alert.info {
  color: var(--success);
  background: var(--success-soft);
  border-color: var(--success);
}

.alert.danger {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: var(--danger);
}

.alert p:last-child {
  margin-bottom: 0;
}

.empty-state {
  padding: 2.2rem 1.2rem;
  color: var(--muted);
  background: var(--surface);
  border-style: dashed;
  box-shadow: none;
  text-align: center;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.86rem;
}

.tiny {
  font-size: 0.75rem;
}

.pill,
.badge {
  display: inline-flex;
  min-height: 1.7rem;
  align-items: center;
  padding: 0.2rem 0.62rem;
  color: var(--link);
  background: color-mix(in srgb, var(--theme-primary) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--theme-primary) 32%, var(--border));
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 800;
}

.badge.neutral,
.pill.neutral {
  color: var(--muted);
  background: var(--page);
  border-color: var(--border);
}

.toolbar {
  justify-content: space-between;
  margin-bottom: 1rem;
}

.toolbar-group {
  display: flex;
  min-width: min(100%, 24rem);
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.search-input,
.select-input {
  min-height: 2.75rem;
  padding: 0.55rem 0.72rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.35rem;
}

.search-input {
  width: min(100%, 25rem);
}

.filters {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.filter-button {
  min-height: 2.5rem;
  padding: 0.45rem 0.75rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.filter-button[aria-pressed="true"] {
  color: var(--primary-text);
  background: var(--theme-primary);
  border-color: var(--theme-primary);
}

.result-summary {
  min-height: 1.75rem;
  margin-bottom: 0.75rem;
  text-align: right;
}

.location-section {
  margin-block: 1.6rem;
}

.location-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.65rem;
}

.location-header h2 {
  margin: 0;
  font-size: 1.65rem;
}

.table-wrap {
  overflow: auto;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
}

.data-table,
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.schedule-table {
  min-width: 66rem;
}

.data-table caption,
.schedule-table caption {
  padding: 0.65rem 0.75rem;
  color: var(--muted);
  background: var(--surface);
  font-weight: 800;
  text-align: left;
}

.data-table th,
.data-table td,
.schedule-table th,
.schedule-table td {
  padding: 0.7rem 0.62rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.data-table thead th,
.schedule-table thead th {
  color: var(--nav-text);
  background: var(--theme-nav);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.data-table tbody tr:nth-child(even),
.schedule-table tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--theme-primary) 4%, var(--surface));
}

.schedule-table tbody th[scope="row"] {
  color: var(--link);
  background: inherit;
  font-weight: 900;
  white-space: nowrap;
}

.schedule-table .off {
  color: var(--danger);
  background: var(--danger-soft);
  font-weight: 900;
}

.schedule-table .notes-cell {
  min-width: 17rem;
  white-space: normal;
}

.table-actions {
  display: flex;
  gap: 0.4rem;
  white-space: nowrap;
}

.field {
  display: block;
  min-width: 0;
  margin-bottom: 0.9rem;
}

fieldset.field {
  padding: 0.9rem;
  border: 1px solid var(--border);
}

fieldset.field legend {
  padding-inline: 0.35rem;
}

.field > span,
.field legend {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.58rem 0.68rem;
  color: var(--ink);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 0.34rem;
}

.field textarea {
  max-width: 100%;
  min-height: 7rem;
  overflow-wrap: anywhere;
  resize: vertical;
  white-space: pre-wrap;
  word-break: break-word;
}

.field input[type="checkbox"] {
  width: 1.2rem;
  min-height: 1.2rem;
  margin: 0;
}

.field input[type="color"] {
  width: 4rem;
  min-height: 2.6rem;
  padding: 0.18rem;
}

.field small {
  display: block;
  margin-top: 0.3rem;
  color: var(--muted);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 0.85rem;
}

.full {
  grid-column: 1 / -1;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  margin-bottom: 0.9rem;
  font-size: 0.86rem;
  font-weight: 700;
}

.form-actions {
  margin-top: 0.8rem;
}

.form-error {
  margin-bottom: 0.8rem;
  color: var(--danger);
  font-weight: 700;
}

.inline-status {
  min-height: 1.5rem;
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.quote-box {
  margin-block: 0.8rem;
  padding: 0.85rem 1rem;
  overflow-wrap: anywhere;
  color: var(--ink);
  background: color-mix(in srgb, var(--theme-primary) 7%, var(--surface));
  border-left: 0.22rem solid var(--theme-primary);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.admin-layout {
  display: grid;
  grid-template-columns: 14.5rem minmax(0, 1fr);
  gap: 1.25rem;
}

.admin-nav {
  position: sticky;
  top: 7rem;
  align-self: start;
  padding: 0.55rem;
  background: var(--surface);
  border: 1px solid var(--border);
}

.admin-nav-groups {
  display: grid;
  gap: 0.95rem;
}

.admin-nav-group,
.admin-nav-tabs {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.admin-nav-label {
  margin: 0 0 0.25rem;
  padding-inline: 0.7rem;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.admin-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  min-height: 2.65rem;
  padding: 0.55rem 0.7rem;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 0.28rem;
  font-size: 0.84rem;
  font-weight: 750;
  text-align: left;
}

.admin-tab-count {
  display: inline-grid;
  min-width: 1.5rem;
  min-height: 1.5rem;
  place-items: center;
  padding-inline: 0.35rem;
  color: var(--surface);
  background: var(--theme-primary);
  border-radius: 999px;
  font-size: 0.7rem;
  line-height: 1;
}

.admin-tab:hover,
.admin-tab[aria-selected="true"] {
  color: var(--link);
  background: color-mix(in srgb, var(--theme-primary) 10%, var(--surface));
}

.admin-mobile-nav {
  display: none;
}

.admin-nav-note {
  margin: 0.9rem 0.7rem 0.15rem;
  padding-top: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  line-height: 1.45;
}

.admin-content {
  min-width: 0;
}

.admin-content > * + * {
  margin-top: 1rem;
}

.admin-tools {
  overflow: clip;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.admin-tools.embedded {
  margin-top: 1rem;
  background: color-mix(in srgb, var(--theme-primary) 2%, var(--surface));
  box-shadow: none;
}

.admin-tools > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.6rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  list-style: none;
}

.admin-tools > summary::-webkit-details-marker {
  display: none;
}

.admin-tools > summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--link);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1;
}

.admin-tools[open] > summary::after {
  content: "−";
}

.admin-tools > summary:hover {
  background: color-mix(in srgb, var(--theme-primary) 7%, var(--surface));
}

.admin-tools > summary span {
  display: grid;
  gap: 0.12rem;
}

.admin-tools > summary strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.admin-tools > summary small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.admin-tools-body {
  padding: 1rem;
  border-top: 1px solid var(--border);
}

.admin-tools-body > :last-child {
  margin-bottom: 0;
}

.admin-entry {
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.admin-entry:last-child {
  border-bottom: 0;
}

.admin-entry p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.stat {
  padding: 1.1rem;
}

.stat strong {
  display: block;
  color: var(--link);
  font-family: "Arial Narrow", "Roboto Condensed", "Segoe UI", sans-serif;
  font-size: 2.2rem;
  line-height: 1;
}

.stat span {
  color: var(--muted);
  font-size: 0.75rem;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.theme-picker {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  background: var(--page);
  border: 1px solid var(--border);
  border-radius: 0.35rem;
}

.theme-picker label {
  font-size: 0.82rem;
  font-weight: 800;
}

.theme-picker code {
  color: var(--muted);
  font-size: 0.7rem;
}

.theme-picker input {
  width: 3rem;
  height: 2.35rem;
  padding: 0.15rem;
  background: transparent;
  border: 1px solid var(--border);
}

.theme-picker .hex-input {
  width: 6.5rem;
  height: 2.35rem;
  padding: 0.35rem 0.45rem;
  cursor: text;
}

.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain-list li {
  padding-block: 0.8rem;
  border-bottom: 1px solid var(--border);
}

.plain-list li:last-child {
  border-bottom: 0;
}

.plain-list p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.divider {
  margin-block: 1.4rem;
  border: 0;
  border-top: 1px solid var(--border);
}

.centered {
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
}

.centered .panel,
.centered.panel {
  text-align: left;
}

.lock-mark {
  display: grid;
  width: 3.5rem;
  height: 3.5rem;
  place-items: center;
  margin: 0 auto 0.8rem;
  color: var(--primary-text);
  background: var(--theme-primary);
  border-radius: 50%;
  font-size: 1.35rem;
  font-weight: 900;
}

.loading-panel {
  margin-top: 2rem;
}

.modal-cover {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  overflow-y: auto;
  place-items: center;
  padding: 1rem;
  background: rgb(3 18 13 / 74%);
}

.modal {
  width: min(46rem, 100%);
  min-width: 0;
  max-height: calc(100vh - 2rem);
  padding: clamp(1.2rem, 4vw, 1.8rem);
  overflow-y: auto;
  color: var(--ink);
  background: var(--surface);
  border-top: 0.3rem solid var(--theme-primary);
  box-shadow: 0 1.4rem 5rem rgb(0 0 0 / 42%);
}

.modal form {
  min-width: 0;
  max-width: 100%;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modal-header h2 {
  margin: 0;
}

.icon-button {
  display: inline-grid;
  width: 2.75rem;
  min-width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 1.2rem;
}

.toast {
  position: fixed;
  z-index: 120;
  right: 1rem;
  bottom: 1rem;
  width: min(25rem, calc(100% - 2rem));
  padding: 0;
  color: #ffffff;
  background: #173c2e;
  border-left: 0 solid #d6b65f;
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.5rem);
  transition: opacity 150ms ease, transform 150ms ease;
}

.toast.visible {
  padding: 0.8rem 1rem;
  border-left-width: 0.25rem;
  box-shadow: 0 0.5rem 1.7rem rgb(0 0 0 / 24%);
  opacity: 1;
  transform: translateY(0);
}

.site-footer {
  padding-block: 1.5rem;
  color: var(--nav-text);
  background: var(--theme-nav);
  border-top: 0.3rem solid var(--theme-accent);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-inner strong,
.footer-inner span {
  display: block;
}

.footer-inner strong {
  font-family: "Arial Narrow", "Roboto Condensed", "Segoe UI", sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.07em;
}

.footer-inner span,
.footer-inner p {
  margin: 0;
  color: var(--nav-text);
  font-size: 0.75rem;
  opacity: 0.88;
}

.footer-inner a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.noscript-notice {
  position: fixed;
  z-index: 200;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 0.8rem;
  color: #102019;
  background: #fff3d2;
  border-top: 2px solid #6c4d0b;
  text-align: center;
}

/* The signed-in navigation contains several member links. Collapse it before
   those links can crowd the appearance and menu controls. */
@media (max-width: 100rem) {
  .header-controls {
    margin-left: auto;
  }

  .menu-button {
    display: inline-flex;
    align-items: center;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    left: auto;
    display: none;
    width: min(22rem, calc(100vw - 1.7rem));
    max-height: calc(100vh - 6rem);
    padding: 0.55rem;
    overflow-y: auto;
    background: var(--theme-nav);
    border: 1px solid var(--theme-accent);
    border-radius: 0.45rem;
    box-shadow: 0 0.7rem 1.2rem rgb(0 0 0 / 18%);
  }

  .site-nav.open {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.12rem;
  }

  .nav-link,
  .nav-action {
    width: 100%;
    min-height: 2.45rem;
    justify-content: flex-start;
    padding-inline: 0.8rem;
    text-align: left;
  }

  .site-nav.authenticated ~ .header-controls .mode-toggle {
    display: none;
  }

  .nav-mode-toggle {
    display: inline-flex;
    margin-top: 0.35rem;
    border-top: 1px solid rgb(255 255 255 / 20%);
    border-radius: 0;
  }

  .nav-group-summary {
    width: 100%;
    min-height: 2.45rem;
    justify-content: space-between;
    padding-inline: 0.8rem;
  }

  .nav-submenu {
    position: static;
    min-width: 0;
    margin: 0.15rem 0 0.35rem 0.8rem;
    padding: 0.2rem 0 0.2rem 0.45rem;
    background: transparent;
    border: 0;
    border-left: 0.18rem solid var(--theme-accent);
    box-shadow: none;
  }

  .nav-submenu .nav-link {
    min-height: 2.25rem;
    padding-block: 0.45rem;
    font-size: 0.7rem;
  }
}

@media (max-width: 56rem) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .columns-2,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-nav {
    position: static;
    padding: 0.8rem;
  }

  .admin-nav-groups {
    display: none;
  }

  .admin-mobile-nav {
    display: grid;
    gap: 0.4rem;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
  }

  .admin-mobile-nav select {
    width: 100%;
    min-height: 2.8rem;
  }

  .admin-nav-note {
    margin-inline: 0;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 38rem) {
  .shell {
    width: calc(100% - 1.7rem);
  }

  .header-inner {
    min-height: 4.7rem;
    gap: 0.45rem;
  }

  .wordmark strong {
    font-size: 1.55rem;
  }

  .wordmark small {
    max-width: 9rem;
    font-size: 0.52rem;
  }

  .mode-label {
    display: none;
  }

  .mode-icon {
    margin: 0;
  }

  .mode-toggle,
  .menu-button {
    padding-inline: 0.65rem;
  }

  .grid,
  .field-row,
  .theme-grid,
  .stats {
    grid-template-columns: 1fr;
  }

  .page-head,
  .section-head,
  .toolbar,
  .record-title,
  .detail,
  .admin-entry {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-group,
  .search-input,
  .select-input {
    width: 100%;
  }

  .record-title .actions,
  .detail .actions,
  .admin-entry .actions {
    flex: 1 1 auto;
  }

  .result-summary {
    text-align: left;
  }

  .theme-picker {
    grid-template-columns: 1fr auto;
  }

  .theme-picker code {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (forced-colors: active) {
  .site-header,
  .site-footer,
  .callout,
  .btn.primary,
  .filter-button[aria-pressed="true"],
  .feature-symbol {
    border: 2px solid ButtonText;
  }

  .eyebrow::before,
  .hero::after {
    background: Highlight;
  }

  :focus-visible {
    outline-color: Highlight;
  }
}

@media print {
  .site-header,
  .site-footer,
  .hero-actions,
  .filters,
  .toolbar,
  .admin-nav,
  .toast,
  .btn {
    display: none !important;
  }

  body,
  .card,
  .panel,
  .record,
  .table-wrap {
    color: #000000;
    background: #ffffff;
    box-shadow: none;
  }

  .shell {
    width: 100%;
  }
}
