:root {
  color-scheme: light;
  --ink: #1f2430;
  --muted: #626b7c;
  --line: #d9dee8;
  --surface: #ffffff;
  --soft: #f4f7fb;
  --brand: #146c67;
  --brand-dark: #0e4d49;
  --accent: #b9432e;
  --gold: #c7922b;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

nav a {
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.nav-menu {
  position: relative;
}

.nav-menu button {
  min-height: 36px;
  padding: 8px 28px 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.nav-menu button::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 16px;
  border: 5px solid transparent;
  border-top-color: currentColor;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 30;
  display: none;
  min-width: 190px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(31, 36, 48, 0.16);
}

.nav-dropdown a {
  display: block;
  padding: 9px 10px;
  white-space: nowrap;
}

.nav-menu:hover .nav-dropdown,
.nav-menu:focus-within .nav-dropdown {
  display: block;
}

nav a.active,
nav a:hover,
.nav-menu button.active,
.nav-menu button:hover,
.nav-menu:focus-within button {
  background: var(--soft);
  color: var(--ink);
}

.session-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 14px;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
  flex: 1 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: stretch;
  padding: 46px 0 24px;
}

.hero h1,
.page-heading h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: 0;
}

.lead,
.page-heading p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

.eyebrow {
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-panel,
.panel,
.flash,
details,
.stats div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero-panel {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 110px, rgba(255, 255, 255, 0.14), transparent 180px),
    linear-gradient(145deg, var(--brand-dark), #092f2c);
  border: 1px solid rgba(199, 146, 43, 0.58);
  border-top: 7px solid var(--gold);
  box-shadow: 0 24px 55px rgba(14, 77, 73, 0.22);
  color: #fff;
  text-align: center;
}

.hero-panel strong {
  display: block;
  margin-bottom: 8px;
  font-size: 24px;
}

.hero-headshot {
  width: 168px;
  height: 168px;
  margin: 0 auto 16px;
  object-fit: cover;
  object-position: center top;
  background: #fff;
  border: 5px solid #fff;
  border-radius: 8px;
  outline: 3px solid var(--gold);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.hero-person {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-person strong {
  margin-bottom: 0;
}

.hero-person span {
  color: var(--gold);
  font-weight: 700;
}

.hero-panel > span {
  color: rgba(255, 255, 255, 0.8);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  border-color: var(--accent);
  background: var(--accent);
}

.button.ghost {
  background: transparent;
  color: var(--brand-dark);
}

.button:disabled,
.button[disabled] {
  border-color: var(--line);
  background: #d7dce5;
  color: #7b8494;
  cursor: not-allowed;
  opacity: 0.78;
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

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

.panel {
  padding: 18px;
}

.section-public .panel {
  position: relative;
  min-height: 190px;
  padding: 24px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92)),
    var(--surface);
  border-color: rgba(20, 108, 103, 0.16);
  box-shadow: 0 16px 38px rgba(31, 36, 48, 0.08);
}

.section-public .panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--brand), var(--gold));
}

.section-public .panel::after {
  content: "";
  position: absolute;
  right: -46px;
  top: -46px;
  width: 110px;
  height: 110px;
  border: 1px solid rgba(199, 146, 43, 0.22);
  border-radius: 50%;
}

.section-public .panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 46px rgba(31, 36, 48, 0.12);
}

.panel h3,
.band h2 {
  margin: 0 0 8px;
}

.section-public .panel h3 {
  color: var(--brand-dark);
  font-size: 22px;
  line-height: 1.25;
}

.section-public .panel p {
  color: var(--muted);
  font-size: 16px;
}

.panel p {
  margin-bottom: 0;
}

.legal-content {
  display: grid;
  gap: 14px;
  max-width: 980px;
}

.legal-page {
  max-width: 860px;
}

.legal-content .panel {
  min-height: 0;
}

.legal-content .panel p + p {
  margin-top: 12px;
}

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

.band {
  margin-top: 28px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.section-public .band {
  margin-top: 34px;
  padding: 34px 0;
  border-top-color: rgba(20, 108, 103, 0.16);
}

.section-public .band h2 {
  font-size: 32px;
}

.page-heading {
  margin: 18px 0 24px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  list-style: none;
}

.timeline li {
  min-height: 110px;
  padding: 18px;
  border-left: 5px solid var(--brand);
  background: var(--surface);
  font-weight: 800;
}

.faq-list {
  display: grid;
  gap: 12px;
}

details {
  padding: 16px 18px;
}

summary {
  cursor: pointer;
  font-weight: 800;
}

.form-grid,
.filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.advanced-filters {
  padding: 0;
  border: 0;
  background: transparent;
}

.advanced-filters summary {
  color: var(--brand-dark);
}

.advanced-filters .mini-grid {
  margin-top: 12px;
}

.spam-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.turnstile-wrap {
  display: flex;
  align-items: center;
  min-height: 65px;
}

.inline-form {
  display: grid;
  gap: 10px;
  min-width: 260px;
}

.inline-form textarea {
  min-height: 74px;
}

.partner-edit-form {
  min-width: 420px;
  margin-top: 12px;
}

.partner-management {
  padding: 0;
  border: 0;
  background: transparent;
}

.partner-management summary {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  color: var(--brand-dark);
  font-weight: 800;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mini-grid label {
  font-size: 13px;
}

.mini-grid input,
.mini-grid select {
  min-height: 36px;
  padding: 7px 8px;
}

.compact-actions {
  margin-top: 0;
}

.compact-actions .button {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 13px;
}

.form-grid.compact {
  max-width: 560px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.span-two {
  grid-column: 1 / -1;
}

.checkbox {
  display: flex;
  flex-direction: row;
  gap: 9px;
  align-items: center;
}

.checkbox a {
  color: var(--brand-dark);
  font-weight: 800;
}

.checkbox input {
  width: 18px;
  min-height: 18px;
}

.stats {
  display: grid;
  gap: 12px;
}

.stats div {
  padding: 16px;
}

.stats strong {
  display: block;
  font-size: 28px;
}

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

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.application-answers {
  min-width: 360px;
}

.application-answers details {
  padding: 0;
  border: 0;
  background: transparent;
}

.answer-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.answer-block h4 {
  margin: 0 0 4px;
  color: var(--brand-dark);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.answer-block p {
  margin: 0;
  color: var(--muted);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
}

.pagination a {
  min-width: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
  text-decoration: none;
}

.pagination a.active,
.pagination a:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--soft);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.flash {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-left: 5px solid var(--brand);
}

.flash.warning {
  border-left-color: var(--gold);
}

code {
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 12px 0;
  padding: 7px 9px;
  overflow-wrap: anywhere;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.site-footer {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-top: 18px;
  padding: 28px 24px;
  background: var(--ink);
  color: #fff;
}

.site-footer p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.72);
}

.footer-brand {
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.site-footer nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.site-footer nav a {
  color: rgba(255, 255, 255, 0.76);
}

.site-footer nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.footer-legal {
  position: relative;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: rgba(255, 255, 255, 0.76);
}

.footer-legal summary {
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  list-style: none;
}

.footer-legal summary::-webkit-details-marker {
  display: none;
}

.footer-legal summary::after {
  content: " ▾";
}

.footer-legal[open] summary,
.footer-legal summary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.footer-legal-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 20;
  display: grid;
  min-width: 210px;
  padding: 8px;
  background: #202735;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}

.footer-legal-menu a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.82);
  text-align: left;
}

.footer-legal-menu a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.footer-meta {
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .site-header,
  .hero,
  .grid.two,
  .grid.three,
  .grid.four,
  .stats,
  .timeline,
  .form-grid,
  .filters {
    grid-template-columns: 1fr;
  }

  .site-header {
    position: static;
  }

  .session-actions {
    justify-content: flex-start;
  }

  .nav-menu {
    width: 100%;
  }

  .nav-menu button {
    width: 100%;
    text-align: left;
  }

  .nav-dropdown {
    position: static;
    display: grid;
    margin: 4px 0 8px;
    box-shadow: none;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer nav {
    justify-content: flex-start;
  }

  .footer-meta {
    text-align: left;
    white-space: normal;
  }
}
