:root {
  --brand-primary: #165524;
  --brand-dark: #0b2f17;
  --brand-navy: #102965;
  --brand-light: #26332A;
  --surface: #19221C;
  --surface-raised: #222D25;
  --white: #FFFFFF;
  --text-main: #F1F5F1;
  --muted: #C0CBC2;
  --link-color: #AFCFFF;
  --border-color: #536158;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  --radius: 6px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: #101711; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #101711;
  color: var(--text-main);
  line-height: 1.6;
}

a { color: var(--link-color); }
a:hover { color: #D3E2FF; }
img { max-width: 100%; display: block; }

.container {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  background: var(--brand-primary);
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

a.site-brand { text-decoration: none; color: var(--white); display: inline-flex; align-items: center; gap: 0.9rem; }
.site-brand img { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.12); }
.site-brand__name {
  display: flex; flex-direction: column; font-weight: 700; letter-spacing: 0.02em;
}
.site-brand__name small { font-size: 0.72rem; opacity: .9; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 92px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.main-nav a {
  color: var(--white);
  text-decoration: none;
  padding: 0.6rem 0.8rem;
  border-radius: 999px;
  font-size: 0.95rem;
}
.main-nav a.is-current,
.main-nav a:hover {
  background: rgba(255,255,255,0.12);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.header-search {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
}
.header-search input {
  border: 0;
  background: transparent;
  color: var(--white);
  width: 180px;
  outline: none;
}
.header-search input::placeholder { color: rgba(255,255,255,0.7); }
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 44px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--white);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}
.nav-toggle__icon { display: grid; gap: 3px; }
.nav-toggle__icon span { width: 17px; height: 2px; border-radius: 1px; background: currentColor; }

.page-hero {
  background: linear-gradient(115deg, rgba(22,85,36,0.24), rgba(16,41,101,0.32));
  border-bottom: 1px solid var(--border-color);
  padding: 4rem 0 3rem;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  align-items: center;
  gap: 2rem;
}
.hero-inner h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  margin: 0 0 1rem;
  line-height: 1.1;
}
.hero-copy {
  color: var(--muted);
  max-width: 60ch;
  font-size: 1.06rem;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
}
.btn--primary {
  background: var(--brand-primary);
  color: var(--white);
}
.btn--secondary {
  background: var(--brand-navy);
  color: var(--white);
}
.hero-panel {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}
.panel-title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 700;
}
.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.meta-label {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}
.status-note { color: var(--muted); margin: 1rem 0 0; }

main {
  padding: 2rem 0 4rem;
}
.section {
  padding: 2.5rem 0;
}
.section-header {
  margin-bottom: 1.5rem;
}
.section-header h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}
.section-header p {
  margin: 0;
  color: var(--muted);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
}
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
.bar-row { margin-bottom: 0.9rem; }
.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
  font-weight: 600;
}
.bar-track {
  background: var(--brand-light);
  border-radius: 999px;
  overflow: hidden;
  height: 12px;
}
.bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.news-list, .documents-list {
  display: grid;
  gap: 1rem;
}
.news-card, .result-card, .search-result, .group-card, .profile-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
.news-card h3, .result-card h3, .search-result h3 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.news-meta, .meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.news-category, .tag {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: var(--brand-light);
  color: #D2DEFA;
  font-weight: 700;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tag--muted { background: rgba(16,41,101,0.62); }

.document-list-item {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 0;
}
.doc-status { color: var(--muted); }

.filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.filters[hidden] { display: none; }
.filters input, .filters select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--surface);
  color: var(--text-main);
}
.inline-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--surface);
}
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  vertical-align: top;
}
th { background: var(--surface-raised); }

.member-cell { min-width: 220px; }
.member-name-stack { display: flex; flex-direction: column; gap: 0.28rem; }
.member-title {
  color: #D0E7D4;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.group-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  border: 1px solid rgba(0,0,0,0.08);
}
.group-badge--neutral {
  background: #DCE4DD;
  color: #172019;
}

.group-directory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.group-card ul { padding-left: 1.1rem; margin-bottom: 0; }

.profile-card h2 { margin-top: 0; }
.profile-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; margin: 1rem 0; }
.profile-list div { border-left: 3px solid var(--brand-primary); padding-left: 0.75rem; }
.profile-list dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.profile-list dd { margin: 0.3rem 0 0; font-weight: 600; }

.member-records {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border-color);
}
.member-records h2 {
  margin: 1.2rem 0 0.7rem;
  font-size: 1.2rem;
}
.info-list {
  margin: 0;
  padding-left: 1.2rem;
}
.info-list li + li { margin-top: 0.5rem; }

.directory-note { color: var(--muted); margin-top: 1.25rem; }
.roster-status { color: var(--muted); font-size: 0.88em; }
.member-profile { display: grid; grid-template-columns: minmax(190px, 260px) minmax(0, 1fr); gap: 2rem; align-items: start; }
.member-portrait { aspect-ratio: 3 / 4; width: 100%; max-width: 260px; object-fit: cover; background: var(--surface); border: 1px solid var(--border-color); }
.member-profile__details h1 { font: 700 clamp(2rem, 4vw, 3rem) system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.1; margin: 0.15rem 0 1.5rem; overflow-wrap: anywhere; }
.profile-kicker { color: #D0E7D4; margin: 0; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.profile-status { margin: 0.35rem 0 0; color: var(--muted); }
.historical-notice { background: #4D3D0A; border: 2px solid #F2C811; color: #FFFFFF; padding: 1rem 1.2rem; margin-bottom: 1.5rem; }
.historical-notice strong { color: #FFE66B; }
.historical-notice p { margin: 0.35rem 0 0; }
.back-link { display: inline-flex; min-height: 44px; align-items: center; }

.search-result { margin-bottom: 1rem; }
.search-type { margin: 0 0 0.35rem; color: #B7CCF5; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; }

.site-footer {
  background: #0A100C;
  color: #eef3f8;
  padding: 2rem 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.footer-inner h3 { margin: 0 0 0.35rem; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-nav a, .site-footer a { color: #eef3f8; text-decoration: none; }
.site-footer p { margin: 0; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #f7be00;
  outline-offset: 3px;
}

@media (max-width: 860px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 0.9rem 0;
  }
  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    background: rgba(11,47,23,0.95);
    border-radius: 12px;
    padding: 0.5rem;
  }
  .main-nav.is-open { display: flex; }
  .hero-inner, .grid-2, .grid-3, .filters, .profile-list, .group-directory { grid-template-columns: 1fr; }
  .member-profile { grid-template-columns: minmax(0, 1fr); }
  .member-portrait { max-width: 220px; }
  .status-grid { grid-template-columns: 1fr; }
  .header-tools { width: 100%; justify-content: space-between; }
  .header-search { flex: 1; }
}

@media (min-width: 600px) and (max-width: 860px) {
  .filters, .group-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
