@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter/Inter-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Oswald";
  src: url("../assets/fonts/oswald/Oswald-Variable.ttf") format("truetype");
  font-weight: 200 700;
  font-display: swap;
}

:root {
  --navy: #002b6f;
  --navy-deep: #001b4d;
  --blue: #003b8f;
  --gold: #ffd23f;
  --gold-deep: #f2b705;
  --ink: #101828;
  --muted: #667085;
  --line: #d9e1ec;
  --paper: #f7f9fc;
  --white: #fff;
  --green: #067647;
  --red: #b42318;
  --orange: #b54708;
  --shadow: 0 18px 50px rgba(0, 27, 77, 0.12);
  --radius: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Inter", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

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

button,
summary,
a {
  -webkit-tap-highlight-color: transparent;
}

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

img {
  max-width: 100%;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: var(--white);
  background: var(--blue);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: 0 20px;
  border: 0;
  border-radius: 7px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-gold {
  color: var(--navy-deep);
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  box-shadow: 0 8px 20px rgba(242, 183, 5, 0.22);
}

.button-blue {
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--navy-deep));
  box-shadow: 0 8px 20px rgba(0, 59, 143, 0.18);
}

.button-danger {
  color: #fff;
  background: #b42318;
  box-shadow: 0 8px 20px rgba(180, 35, 24, 0.16);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

code {
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--navy);
  background: #edf2f9;
  font: 0.88em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Sign-in */

.login-page {
  min-height: 100vh;
  color: var(--white);
  background:
    radial-gradient(circle at 78% 15%, rgba(0, 91, 211, 0.48), transparent 30%),
    linear-gradient(125deg, #00133a, var(--navy-deep) 55%, #003477);
}

.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.13;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(90deg, #000, transparent 75%);
}

.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(350px, 480px);
  align-items: center;
  gap: clamp(50px, 10vw, 150px);
  width: min(1180px, calc(100% - 48px));
  min-height: 100vh;
  margin: auto;
  padding: 50px 0;
}

.brand-mark {
  margin: 0;
  font-family: "Oswald", Impact, sans-serif;
  font-size: clamp(4rem, 9vw, 7rem);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.brand-mark span,
.admin-brand span {
  color: var(--gold);
}

.login-brand > p:nth-child(2) {
  margin: 14px 0 70px;
  color: #d8e6ff;
  font-size: 1.08rem;
  letter-spacing: 0.03em;
}

.login-brand h1 {
  max-width: 650px;
  margin: 0 0 20px;
  font-family: "Oswald", Impact, sans-serif;
  font-size: clamp(3rem, 6vw, 5.4rem);
  font-weight: 580;
  letter-spacing: -0.025em;
  line-height: 0.98;
  text-transform: uppercase;
}

.login-intro {
  max-width: 600px;
  color: #cddaf0;
  font-size: 1.05rem;
}

.login-card {
  padding: clamp(28px, 5vw, 50px);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 22px;
  box-shadow: 0 35px 80px rgba(0, 8, 30, 0.36);
}

.login-card h2 {
  margin: 0 0 28px;
  color: var(--navy-deep);
  font-family: "Oswald", Impact, sans-serif;
  font-size: 2.35rem;
  font-weight: 560;
  text-transform: uppercase;
}

.stack-form {
  display: grid;
  gap: 17px;
}

.stack-form label,
.editor-form label {
  display: grid;
  gap: 7px;
}

.stack-form label > span,
.editor-form label > span {
  color: #344054;
  font-size: 0.82rem;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #c8d1df;
  border-radius: 7px;
  background: var(--white);
  transition: border 150ms ease, box-shadow 150ms ease;
}

input,
select {
  min-height: 44px;
  padding: 8px 11px;
}

textarea {
  min-height: 100px;
  padding: 11px;
  line-height: 1.55;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 59, 143, 0.12);
}

.security-note {
  margin: 22px 0 14px;
  color: var(--muted);
  font-size: 0.78rem;
}

.back-link {
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.notice {
  padding: 12px 14px;
  border-left: 4px solid;
  border-radius: 5px;
  font-size: 0.86rem;
}

.notice-error {
  color: #7a271a;
  border-color: #f04438;
  background: #fef3f2;
}

.notice-success {
  color: #05603a;
  border-color: #12b76a;
  background: #ecfdf3;
}

.notice-warning {
  color: #7a2e0e;
  border-color: #f79009;
  background: #fffaeb;
}

.notice-info {
  color: #1849a9;
  border-color: #2e90fa;
  background: #eff8ff;
}

.login-card .notice {
  margin: -10px 0 20px;
}

/* Dashboard shell */

.admin-header {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 28px;
  color: var(--white);
  background: linear-gradient(100deg, var(--navy-deep), var(--navy));
  box-shadow: 0 3px 20px rgba(0, 27, 77, 0.18);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  color: inherit;
  text-decoration: none;
}

.admin-brand strong {
  font-family: "Oswald", Impact, sans-serif;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.admin-brand small {
  padding-left: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  color: #cddaf0;
  font-size: 0.77rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-user,
.admin-user form {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.admin-user a,
.admin-user button {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  color: var(--white);
  background: transparent;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.admin-user button:hover,
.admin-user a:hover {
  border-color: var(--gold);
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: calc(100vh - 72px);
}

.admin-nav {
  position: sticky;
  top: 72px;
  align-self: start;
  display: grid;
  align-content: start;
  width: 100%;
  height: calc(100vh - 72px);
  height: calc(100dvh - 72px);
  min-height: 0;
  max-height: calc(100vh - 72px);
  max-height: calc(100dvh - 72px);
  padding: 26px 16px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-color: #aebed3 transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  border-right: 1px solid var(--line);
  background: var(--white);
}

.admin-nav::-webkit-scrollbar {
  width: 8px;
}

.admin-nav::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #aebed3;
  background-clip: padding-box;
}

.admin-nav-group {
  margin: 18px 12px 5px;
  color: #667085;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  line-height: 1.25;
  text-transform: uppercase;
}

.admin-nav-group:first-child {
  margin-top: 0;
}

.admin-nav a {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 7px;
  color: #344054;
  font-size: 0.86rem;
  font-weight: 720;
  text-decoration: none;
}

.admin-nav a span {
  color: #98a2b3;
  font: 0.66rem ui-monospace, monospace;
}

.admin-nav a b {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  color: #7a2e0e;
  background: var(--gold);
  font-size: 0.65rem;
}

.admin-nav a:hover,
.admin-nav a.is-active {
  color: var(--blue);
  background: #eef4fc;
}

.admin-nav a.is-active {
  box-shadow: inset 3px 0 0 var(--blue);
}

.dashboard-content {
  min-width: 0;
  padding: clamp(24px, 4vw, 54px);
}

.admin-back-to-top {
  position: fixed;
  z-index: 80;
  right: 22px;
  bottom: 22px;
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--navy-deep);
  background: var(--gold);
  box-shadow: var(--shadow);
  font-size: 1.25rem;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(15px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
}

.admin-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
}

.admin-back-to-top:hover {
  background: var(--gold-deep);
  transform: translateY(-2px);
}

.dashboard-collapse-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 16px;
}

.dashboard-collapse-controls span {
  margin-right: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dashboard-collapse-controls button {
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid #bac7d8;
  border-radius: 5px;
  color: var(--navy);
  background: var(--white);
  font-size: 0.74rem;
  font-weight: 750;
  cursor: pointer;
}

.dashboard-collapse-controls button:hover:not(:disabled),
.section-collapse-button:hover {
  border-color: var(--blue);
  background: #eef4fc;
}

.dashboard-collapse-controls button:disabled {
  opacity: 0.45;
  cursor: default;
}

.dashboard-flash {
  position: fixed;
  z-index: 50;
  top: 88px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: min(500px, calc(100% - 48px));
  box-shadow: var(--shadow);
}

.dashboard-flash button {
  border: 0;
  color: inherit;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
}

.security-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto 26px;
  padding: 24px 28px;
  border: 2px solid #f79009;
  border-radius: 12px;
  background: #fffaeb;
  box-shadow: 0 12px 30px rgba(181, 71, 8, 0.12);
}

.security-alert strong {
  color: #7a2e0e;
  font-size: 1.18rem;
}

.security-alert p {
  margin: 2px 0 0;
  color: #93370d;
  max-width: 860px;
  margin-top: 7px;
  font-size: 0.94rem;
  line-height: 1.55;
}

.security-alert a {
  flex: 0 0 auto;
  color: #7a2e0e;
  padding: 11px 15px;
  border: 1px solid #f79009;
  border-radius: 6px;
  background: #fff;
  font-size: 0.86rem;
  font-weight: 800;
}

.admin-section {
  max-width: 1280px;
  margin: 0 auto 34px;
  padding: clamp(25px, 4vw, 46px);
  scroll-margin-top: 92px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 5px 25px rgba(0, 27, 77, 0.045);
}

.password-change-required .admin-nav a:not([href="#overview"]):not([href="#settings"]),
.password-change-required .admin-section:not(#overview):not(#settings),
.password-change-required #overview .stats-grid,
.password-change-required #overview .api-note {
  display: none;
}

.hero-section {
  position: relative;
  overflow: hidden;
  color: var(--white);
  border: 0;
  background:
    radial-gradient(circle at 88% 10%, rgba(0, 92, 210, 0.7), transparent 27%),
    linear-gradient(125deg, var(--navy-deep), var(--navy));
  box-shadow: var(--shadow);
}

.hero-section::after {
  content: "EAF";
  position: absolute;
  top: -35px;
  right: 50px;
  color: transparent;
  font-family: "Oswald", Impact, sans-serif;
  font-size: 13rem;
  font-weight: 700;
  line-height: 1;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.07);
  pointer-events: none;
}

.hero-section > div:first-child {
  position: relative;
  z-index: 1;
  max-width: 730px;
}

.hero-section .eyebrow {
  color: var(--gold);
}

.hero-section h1 {
  margin: 0;
  font-family: "Oswald", Impact, sans-serif;
  font-size: clamp(2.7rem, 5vw, 4.5rem);
  font-weight: 560;
  letter-spacing: -0.025em;
  line-height: 1;
  text-transform: uppercase;
}

.hero-section > div:first-child > p:last-child {
  max-width: 680px;
  color: #d2ddf0;
}

.status-pill {
  position: absolute;
  z-index: 2;
  top: 42px;
  right: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 20px;
  color: #d7e4f7;
  background: rgba(0, 20, 58, 0.32);
  font-size: 0.73rem;
  font-weight: 700;
}

.status-pill span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.14);
}

.stats-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin-top: 38px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.17);
}

.stats-grid article {
  display: grid;
  min-height: 140px;
  padding: 20px;
  background: rgba(0, 28, 78, 0.7);
}

.stats-grid article.attention {
  background: rgba(101, 72, 0, 0.55);
}

.stats-grid span {
  color: #cbd9ee;
  font-size: 0.75rem;
  font-weight: 650;
}

.stats-grid strong {
  align-self: center;
  color: var(--white);
  font-family: "Oswald", Impact, sans-serif;
  font-size: 2.8rem;
  font-weight: 560;
  line-height: 1;
}

.stats-grid a {
  align-self: end;
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 750;
  text-decoration: none;
}

.api-note {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  color: #d4e0f2;
  font-size: 0.75rem;
}

.api-note strong {
  color: var(--white);
}

.api-note p {
  margin: 0;
}

.api-note code {
  color: #fff1b7;
  background: rgba(0, 0, 0, 0.18);
}

.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.section-title h2 {
  margin: 0;
  color: var(--navy-deep);
  font-family: "Oswald", Impact, sans-serif;
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  font-weight: 570;
  line-height: 1.1;
  text-transform: uppercase;
}

.section-title p:last-child {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
}

.section-title-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.audit-meta {
  max-width: none !important;
  margin-top: 10px !important;
  color: #52657e !important;
  font-size: 0.72rem !important;
  font-weight: 650;
}

.section-collapse-button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid #bac7d8;
  border-radius: 5px;
  color: var(--navy);
  background: #fff;
  font-size: 0.74rem;
  font-weight: 750;
  cursor: pointer;
}

.admin-section.is-collapsed .section-title,
.dashboard-section.is-collapsed .section-heading {
  align-items: center;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.admin-section.is-collapsed .section-title > :first-child,
.dashboard-section.is-collapsed .section-heading > :first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.admin-section.is-collapsed .section-title h2,
.dashboard-section.is-collapsed .section-heading h2 {
  font-size: clamp(1.55rem, 3vw, 2.15rem);
}

.admin-section.is-collapsed .section-title p:not(.eyebrow):not(.audit-meta),
.dashboard-section.is-collapsed .section-heading p:not(.eyebrow):not(.audit-meta) {
  max-width: 760px;
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.admin-section.is-collapsed {
  min-height: 0;
  padding-block: 18px;
}

.admin-section.is-collapsed > :not(.section-title),
.dashboard-section.is-collapsed > :not(.section-heading) {
  display: none !important;
}

.admin-section.is-collapsed .section-title > :not(:first-child):not(.section-collapse-button),
.dashboard-section.is-collapsed .section-heading > :not(:first-child):not(.section-collapse-button),
.admin-section.is-collapsed .section-title .audit-meta,
.dashboard-section.is-collapsed .section-heading .audit-meta {
  display: none !important;
}

.count-chip {
  flex: 0 0 auto;
  padding: 10px 15px;
  border-radius: 8px;
  color: var(--muted);
  background: var(--paper);
  font-size: 0.75rem;
}

.count-chip strong {
  color: var(--blue);
  font-size: 1.1rem;
}

/* Editors and records */

.editor-panel {
  margin: -8px 0 28px;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid #b6c9e4;
  border-radius: 12px;
  background: #f4f8fd;
  box-shadow: inset 4px 0 0 var(--blue);
}

.editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.editor-heading h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.15rem;
}

.editor-heading button {
  width: 34px;
  height: 34px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.recurrence-fieldset {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px 18px;
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid #c5d3e5;
  border-radius: 8px;
  background: #fff;
}

.recurrence-fieldset legend {
  padding: 0 6px;
  color: var(--navy);
  font-size: 0.83rem;
  font-weight: 850;
}

.recurrence-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.65fr);
  gap: 14px;
  padding-top: 4px;
}

.recurrence-check {
  display: flex !important;
  align-items: center;
  gap: 7px !important;
}

.recurrence-check input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--blue);
}

.recurrence-check span,
.recurrence-until span {
  color: var(--ink) !important;
  font-size: 0.8rem !important;
}

.recurrence-until {
  display: grid;
  gap: 5px;
}

.recurrence-until input:disabled {
  opacity: 0.55;
  background: #eef2f7;
}

.recurrence-fieldset > small {
  grid-column: 1;
}

.editor-form small {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 500;
}

.file-label input {
  padding: 7px;
  background: #f9fafb;
}

.file-label input::file-selector-button {
  margin-right: 10px;
  padding: 7px 11px;
  border: 0;
  border-radius: 4px;
  color: var(--navy);
  background: #e4ecf7;
  font-weight: 750;
  cursor: pointer;
}

.toggle-line {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px !important;
  min-height: 44px;
}

.toggle-line input {
  width: 19px;
  min-height: 19px;
  accent-color: var(--blue);
}

.toggle-line span {
  color: var(--ink) !important;
  font-size: 0.85rem !important;
}

.record-list {
  display: grid;
  gap: 10px;
}

.record-card {
  overflow: clip;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.record-card[open] {
  border-color: #9fb5d4;
  box-shadow: 0 12px 32px rgba(0, 43, 111, 0.08);
}

.record-card.record-pending {
  border-color: #f6c44a;
}

.record-card summary {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto auto 24px;
  align-items: center;
  gap: 16px;
  min-height: 78px;
  padding: 10px 16px;
  list-style: none;
  cursor: pointer;
}

.record-edit-label {
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
}

.record-card summary::-webkit-details-marker {
  display: none;
}

.record-card summary:hover {
  background: #fafcff;
}

.record-media,
.date-tile {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  overflow: hidden;
  border-radius: 7px;
  color: var(--blue);
  background: #eaf1fa;
  font: 700 0.66rem "Inter", sans-serif;
}

.record-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.date-tile {
  align-content: center;
  color: var(--white);
  background: var(--blue);
}

.date-tile b {
  font: 600 1.35rem/1 "Oswald", sans-serif;
}

.date-tile small {
  color: var(--gold);
  font-size: 0.58rem;
  font-weight: 800;
}

.record-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.record-main b {
  overflow: hidden;
  color: var(--navy-deep);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-main small {
  color: var(--muted);
  font-size: 0.74rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 800;
  white-space: nowrap;
}

.news-record summary {
  grid-template-columns: 56px minmax(0, 1fr) max-content max-content 24px;
}

.news-record .badge-homepage {
  justify-self: end;
}

.badge-live {
  color: var(--green);
  background: #ecfdf3;
}

.badge-homepage {
  gap: 6px;
  color: #05603a;
  border: 1px solid #86d7aa;
  background: #dcfae6;
}

.badge-homepage > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #079455;
  box-shadow: 0 0 0 3px rgba(7, 148, 85, 0.13);
}

.badge-draft {
  color: #475467;
  background: #f2f4f7;
}

.badge-pending {
  color: #93370d;
  background: #fffaeb;
}

.badge-danger {
  color: #fff;
  background: #b42318;
}

.badge-alert-yellow {
  color: #2d2400;
  background: #f5c518;
  border: 1px solid #d9a600;
}

.badge-alert-green {
  color: #fff;
  background: #067647;
  border: 1px solid #055f3a;
}

.contact-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.contact-stat-grid article {
  display: grid;
  gap: 8px;
  min-height: 108px;
  padding: 18px;
  border: 1px solid #d6e0ee;
  border-radius: 9px;
  background: linear-gradient(145deg, #f8fbff, #eef4fb);
}

.contact-stat-grid span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
}

.contact-stat-grid strong {
  align-self: end;
  color: var(--navy-deep);
  font: 570 2.25rem/1 "Oswald", Impact, sans-serif;
}

.contact-stat-note {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.75rem;
}

.contact-settings-form {
  max-width: 920px;
}

.contact-settings-form .toggle-line {
  align-items: flex-start;
  padding: 14px;
  border: 1px solid #d6e0ee;
  border-radius: 8px;
  background: #f8fbff;
}

.contact-settings-form .toggle-line input {
  flex: 0 0 auto;
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
  accent-color: var(--blue);
}

.contact-settings-form .toggle-line span {
  display: grid;
  gap: 3px;
}

.contact-settings-form code,
.contact-mail-actions code {
  font-size: 0.72rem;
}

.language-visibility-form {
  display: grid;
  gap: 20px;
}

.language-visibility-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding: 12px;
  border: 1px solid #d6e0ee;
  border-radius: 9px;
  background: #f8fbff;
}

.language-visibility-tools .button {
  min-height: 38px;
}

.language-visibility-tools [role="status"] {
  flex: 1 1 260px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.45;
}

.language-visibility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.language-visibility-option {
  align-items: flex-start;
  padding: 13px 14px;
  background: #f8fbff;
  border: 1px solid #d6e0ee;
  border-radius: 8px;
}

.language-visibility-option input {
  flex: 0 0 auto;
  margin-top: 2px;
}

.language-visibility-option > span {
  display: grid;
  gap: 3px;
}

.language-visibility-option small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
}

.contact-mail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 920px;
  margin-top: 26px;
}

.contact-mail-actions > div {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfe;
}

.contact-mail-actions h3 {
  margin: 0 0 7px;
  color: var(--navy);
}

.contact-mail-actions p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.contact-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.contact-mail-actions .button {
  min-height: 38px;
  padding: 8px 13px;
  font-size: 0.72rem;
}

.chevron {
  grid-column: -2 / -1;
  justify-self: end;
  color: var(--blue);
  font-size: 1.2rem;
  transition: transform 160ms ease;
}

.record-card[open] .chevron {
  transform: rotate(180deg);
}

.record-editor {
  position: relative;
  padding: 26px;
  border-top: 1px solid var(--line);
  background: #fafcff;
}

.record-editor .editor-form {
  max-width: 920px;
}

.submission-meta {
  display: grid;
  gap: 2px;
  margin: -5px 0 22px;
  padding: 12px 14px;
  border-left: 3px solid var(--gold-deep);
  color: #7a2e0e;
  background: #fffaeb;
  font-size: 0.78rem;
}

.submission-meta span {
  color: #93370d;
}

.news-format-preview {
  max-width: 920px;
  margin: 0 0 24px;
  overflow: hidden;
  border: 1px solid #cbd8e8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 43, 111, 0.06);
}

.news-format-preview-heading {
  padding: 16px 20px 14px;
  border-bottom: 1px solid #dce5f0;
  background: linear-gradient(115deg, #edf4fc, #f9fbfe);
}

.news-format-preview-heading .eyebrow {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 0.64rem;
}

.news-format-preview-heading h3 {
  margin: 0;
  color: var(--navy-deep);
  font: 570 1.35rem/1.2 "Oswald", Impact, sans-serif;
  text-transform: uppercase;
}

.news-format-preview-body {
  max-height: 380px;
  padding: 20px;
  overflow: auto;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.65;
}

.news-format-preview-body > :first-child {
  margin-top: 0;
}

.news-format-preview-body > :last-child {
  margin-bottom: 0;
}

.news-format-preview-note {
  margin: 0;
  padding: 12px 20px;
  border-top: 1px solid #e2e8f0;
  color: #52657e;
  background: #f8fafc;
  font-size: 0.72rem;
  line-height: 1.5;
}

.editor-actions {
  display: flex;
  gap: 10px;
}

.delete-form {
  margin: 14px 0 0;
}

.delete-form button {
  padding: 0;
  border: 0;
  color: var(--red);
  background: transparent;
  font-size: 0.75rem;
  font-weight: 750;
  text-decoration: underline;
  cursor: pointer;
}

.moderation-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
  padding: 13px 16px;
  border: 1px solid #fedf89;
  border-radius: 8px;
  color: #7a2e0e;
  background: #fffaeb;
  font-size: 0.78rem;
}

.moderation-note span {
  color: #93370d;
}

.event-bulk-controls {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) max-content minmax(360px, 1.2fr);
  align-items: end;
  gap: 14px;
  margin: 0 0 20px;
  padding: 16px;
  border: 1px solid #b9cce4;
  border-left: 4px solid var(--blue);
  border-radius: 9px;
  background: #f3f7fc;
}

.event-bulk-controls > div,
.event-bulk-controls > div span {
  display: grid;
  gap: 3px;
}

.event-bulk-controls > div strong {
  color: var(--navy-deep);
  font-size: 0.82rem;
}

.event-bulk-controls > div span {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.event-bulk-controls form {
  margin: 0;
}

.event-category-publish {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) max-content;
  align-items: end;
  gap: 9px;
}

.event-category-publish label {
  display: grid;
  gap: 5px;
  color: #344054;
  font-size: 0.7rem;
  font-weight: 750;
}

.event-category-publish select {
  width: 100%;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid #b9c5d6;
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
}

.empty-card {
  grid-column: 1 / -1;
  padding: 30px;
  border: 1px dashed #b8c4d4;
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
}

.empty-card strong {
  color: var(--navy);
}

.empty-card p {
  margin: 4px 0 0;
}

/* Members */

.table-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.table-tools label {
  width: min(360px, 100%);
}

.table-tools span {
  color: var(--muted);
  font-size: 0.72rem;
}

.member-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.member-row {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(170px, 0.9fr) minmax(160px, 0.72fr) minmax(140px, 0.64fr) minmax(190px, 1fr) minmax(120px, 0.5fr) 148px;
  align-items: center;
  min-height: 64px;
  border-top: 1px solid #e6ebf2;
}

.member-row .sr-only {
  top: 0;
  left: 0;
}

.member-row:first-child {
  border-top: 0;
}

.member-row > span {
  min-width: 0;
  padding: 9px 12px;
}

.member-head {
  min-height: 42px;
  color: #475467;
  background: #f2f5f9;
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.country-cell {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 8px;
}

.country-cell > b {
  font-size: 1.45rem;
  font-weight: 400;
}

.country-cell > strong {
  overflow: hidden;
  color: var(--navy-deep);
  font-size: 0.83rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-cell > small {
  color: #98a2b3;
  font-size: 0.63rem;
  font-weight: 750;
}

.member-row input {
  min-height: 38px;
  font-size: 0.78rem;
}

.member-membership-select,
.member-contribution-select {
  width: 100%;
  min-height: 38px;
  padding: 7px 28px 7px 9px;
  border-width: 1px;
  font-size: 0.73rem;
  font-weight: 800;
}

.member-membership-select[data-status="none"] {
  color: #667085;
  border-color: #d0d5dd;
  background-color: #f2f4f7;
}

.member-membership-select[data-status="member_applicant"] {
  color: #174a72;
  border-color: #9ecceb;
  background-color: #e8f4fc;
}

.member-membership-select[data-status="member_candidate"] {
  color: #ffffff;
  border-color: #235f9a;
  background-color: #286fae;
}

.member-membership-select[data-status="provisional_member"] {
  color: #6e3f00;
  border-color: #e6a23c;
  background-color: #fff0d5;
}

.member-membership-select[data-status="active_member"] {
  color: #14532d;
  border-color: #69b487;
  background-color: #e2f5e8;
}

.member-membership-select[data-status="suspended_member"] {
  color: #8b1320;
  border-color: #e28b95;
  background-color: #fde8eb;
}

.member-contribution-select[data-status="to_be_updated"] {
  color: #667085;
  border-color: #d0d5dd;
  background-color: #f2f4f7;
}

.member-contribution-select[data-status="paid"] {
  color: #126235;
  border-color: #42a86b;
  background-color: #e9f8ef;
}

.member-contribution-select[data-status="due"] {
  color: #9f1f25;
  border-color: #dc5058;
  background-color: #fff0f1;
}

.member-contribution-select[data-status="pending"] {
  color: #874300;
  border-color: #e58a2d;
  background-color: #fff4e5;
}

.member-contribution-select[data-status="temporarily_exempt"] {
  color: #475467;
  border-color: #98a2b3;
  background-color: #f2f4f7;
}

.switch {
  position: relative;
  display: inline-flex;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch > span {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 15px;
  background: #cbd5e1;
  cursor: pointer;
  transition: background 160ms ease;
}

.switch > span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: transform 160ms ease;
}

.switch input:checked + span {
  background: var(--blue);
}

.switch input:checked + span::after {
  transform: translateX(16px);
}

.switch input:focus-visible + span {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.sticky-save {
  position: sticky;
  z-index: 10;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: var(--white);
  background: rgba(0, 27, 77, 0.96);
  box-shadow: 0 15px 35px rgba(0, 27, 77, 0.23);
  backdrop-filter: blur(8px);
}

.sticky-save p {
  display: grid;
  gap: 1px;
  margin: 0;
}

.sticky-save span {
  color: #cbd9eb;
  font-size: 0.72rem;
}

/* Sponsors and settings */

.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 18px;
}

.sponsor-card {
  overflow: clip;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.sponsor-card[open] {
  border-color: #9fb5d4;
  box-shadow: 0 12px 32px rgba(0, 43, 111, 0.08);
}

.sponsor-card-summary {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 15px;
  min-height: 106px;
  padding: 14px 16px;
  list-style: none;
  cursor: pointer;
}

.sponsor-card-summary::-webkit-details-marker {
  display: none;
}

.sponsor-card-summary::after {
  content: "⌄";
  color: var(--blue);
  font-size: 1.2rem;
  line-height: 1;
  text-align: center;
  transition: transform 160ms ease;
}

.sponsor-card[open] > .sponsor-card-summary::after {
  transform: rotate(180deg);
}

.sponsor-card-summary:hover {
  background: #fafcff;
}

.sponsor-card-summary:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: -3px;
}

.sponsor-logo {
  display: grid;
  width: 88px;
  height: 76px;
  place-items: center;
  border-radius: 7px;
  background: #f5f7fa;
}

.sponsor-logo img {
  max-width: 78px;
  max-height: 66px;
  object-fit: contain;
}

.sponsor-card-title {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--navy);
  font-size: 1rem;
}

.sponsor-card-body {
  padding: 0 18px 18px;
  border-top: 1px solid var(--line);
}

.sponsor-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding-top: 16px;
}

.sponsor-placement-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: right;
}

.gallery-upload-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.gallery-upload-feedback {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid #c7d7ee;
  border-radius: 8px;
  background: #f3f7fd;
}

.gallery-upload-feedback[hidden] {
  display: none;
}

.gallery-upload-feedback progress {
  width: 100%;
  height: 13px;
  accent-color: var(--blue);
}

.admin-generic-upload-progress {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.85rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid #b9cbe4;
  border-radius: 12px;
  background: #f3f7fc;
  color: #043574;
}

.admin-generic-upload-progress[hidden] {
  display: none;
}

.admin-generic-upload-progress progress {
  width: 100%;
  height: 0.55rem;
  accent-color: #0756a4;
}

.gallery-upload-feedback p {
  margin: 0;
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 700;
}

.gallery-upload-feedback ul {
  max-height: 150px;
  margin: 0;
  padding: 10px 10px 10px 30px;
  overflow: auto;
  border-left: 3px solid #b42318;
  color: #7a271a;
  background: #fff4f2;
  font-size: 0.76rem;
}

.gallery-admin-list {
  overflow: clip;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
}

.gallery-admin-list > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 62px;
  padding: 14px 18px;
  color: var(--navy);
  background: #f5f8fc;
  cursor: pointer;
  list-style: none;
}

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

.gallery-admin-list > summary::after {
  content: "+";
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #afbdd0;
  border-radius: 5px;
  font-size: 1.1rem;
  font-weight: 800;
}

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

.gallery-admin-list > summary:hover,
.gallery-admin-list > summary:focus-visible {
  color: var(--blue);
  background: #edf4fc;
}

.gallery-admin-list > summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 35%, transparent);
  outline-offset: -3px;
}

.gallery-admin-list > summary > span:first-child {
  display: grid;
  gap: 2px;
}

.gallery-admin-list > summary strong {
  font-size: 0.95rem;
}

.gallery-admin-list > summary small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.gallery-list-toggle-label {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.gallery-admin-table-wrap {
  max-width: 100%;
  max-height: 582px;
  padding: 8px;
  overflow: auto;
  overscroll-behavior-inline: contain;
  overscroll-behavior-block: contain;
  scrollbar-gutter: stable;
  border-top: 1px solid var(--line);
}

.gallery-admin-table-wrap:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: -3px;
}

.gallery-admin-table {
  width: 100%;
  min-width: 1320px;
  table-layout: fixed;
  border-spacing: 0;
  border-collapse: separate;
  color: var(--ink);
  font-size: 0.74rem;
}

.gallery-admin-table th,
.gallery-admin-table td {
  height: 44px;
  padding: 3px 5px;
  vertical-align: middle;
  border-right: 1px solid #e5ebf3;
  border-bottom: 1px solid #dce5f0;
  background: var(--white);
}

.gallery-admin-table th:first-child,
.gallery-admin-table td:first-child {
  border-left: 1px solid #dce5f0;
}

.gallery-admin-table thead th {
  position: sticky;
  z-index: 1;
  top: 0;
  height: 38px;
  padding-block: 6px;
  color: #455b75;
  background: #eef3f9;
  font-size: 0.68rem;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

.gallery-admin-table thead th:first-child {
  border-top-left-radius: 6px;
}

.gallery-admin-table thead th:last-child {
  border-top-right-radius: 6px;
}

.gallery-admin-table th small {
  display: block;
  font: inherit;
  font-weight: 650;
  text-transform: none;
}

.gallery-admin-table tbody tr:hover td {
  background: #f9fbfe;
}

.gallery-admin-table tbody tr.is-selected td {
  background: #fff8d8;
}

.gallery-admin-table label {
  margin: 0;
}

.gallery-admin-table input,
.gallery-admin-table select {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  padding: 4px 6px;
  font-size: 0.75rem;
}

.gallery-admin-table th:nth-child(4),
.gallery-admin-table td:nth-child(4) {
  width: 94px;
}

.gallery-admin-table th:nth-child(5),
.gallery-admin-table td:nth-child(5) {
  width: 68px;
}

.gallery-admin-table th:nth-child(6),
.gallery-admin-table td:nth-child(6) {
  width: 164px;
}

.gallery-admin-table th:nth-child(7),
.gallery-admin-table th:nth-child(8),
.gallery-admin-table td:nth-child(7),
.gallery-admin-table td:nth-child(8) {
  width: 154px;
}

.gallery-admin-table th:nth-child(9),
.gallery-admin-table td:nth-child(9) {
  width: 190px;
}

.gallery-admin-table th:nth-child(10),
.gallery-admin-table td:nth-child(10) {
  width: 72px;
  white-space: nowrap;
}

.gallery-admin-table th:nth-child(11),
.gallery-admin-table th:nth-child(12),
.gallery-admin-table td:nth-child(11),
.gallery-admin-table td:nth-child(12) {
  width: 68px;
  padding-inline: 4px;
  text-align: center;
}

.gallery-admin-table td:nth-child(4) select {
  padding-inline: 4px;
}

.gallery-select-cell {
  width: 42px;
  text-align: center;
}

.gallery-row-select {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
}

.gallery-row-select input {
  width: 17px;
  min-height: 0;
  height: 17px;
  margin: 0;
  accent-color: var(--blue);
}

.gallery-publish-cell {
  width: 58px;
  text-align: center;
}

.gallery-publish-check {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 5px;
  background: #f0f4f9;
}

.gallery-publish-check input {
  width: 18px;
  min-height: 0;
  height: 18px;
  margin: 0;
  accent-color: var(--blue);
}

.gallery-preview-cell {
  width: 58px;
}

.gallery-admin-preview {
  position: relative;
  display: grid;
  width: 46px;
  height: 34px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d2dce9;
  border-radius: 5px;
  color: var(--navy);
  background: #f0f4f9;
  font-size: 0.64rem;
  text-align: center;
}

.gallery-admin-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-admin-video-preview {
  gap: 1px;
  align-content: center;
}

.gallery-admin-video-preview span {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--blue);
  font-size: 0.65rem;
}

.gallery-replace-control {
  position: absolute;
  inset: auto 2px 2px;
  display: block;
  padding: 2px 3px;
  overflow: hidden;
  border-radius: 3px;
  color: var(--white);
  background: rgba(0, 31, 73, 0.88);
  font-size: 0.52rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  cursor: pointer;
}

.gallery-replace-control input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.gallery-replace-control:focus-within {
  outline: 3px solid var(--gold);
  outline-offset: 1px;
}

.gallery-order-input {
  min-width: 62px;
}

.gallery-not-applicable,
.gallery-size-cell {
  color: var(--muted);
  font-weight: 700;
}

.gallery-row-action {
  width: 100%;
  min-height: 30px;
  padding: 4px 5px;
  font-size: 0.7rem;
}

.delete-form.gallery-row-delete {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.delete-form.gallery-row-delete button {
  width: 100%;
  min-height: 30px;
  padding: 4px 5px;
  font-size: 0.7rem;
  white-space: nowrap;
}

.gallery-batch-tools {
  display: grid;
  gap: 9px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: #fbfcfe;
}

.gallery-selection-filters,
.gallery-batch-form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 7px;
}

.gallery-selection-filters label {
  display: grid;
  gap: 3px;
  margin: 0;
}

.gallery-selection-filters label > span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

.gallery-selection-filters input,
.gallery-batch-form input,
.gallery-batch-form select {
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid #b9c6d8;
  border-radius: 6px;
  font: inherit;
}

.gallery-name-selector {
  flex: 1 1 220px;
  max-width: 340px;
}

.gallery-selected-count {
  margin-left: auto;
  padding: 7px 10px;
  border-radius: 5px;
  color: var(--navy);
  background: #e9f0f9;
  font-size: 0.75rem;
  white-space: nowrap;
}

.gallery-batch-form {
  padding-top: 9px;
  border-top: 1px dashed #c7d2e0;
}

.gallery-batch-form > input[type="text"] {
  flex: 1 1 240px;
}

.gallery-batch-option {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  margin: 0;
  padding: 4px 7px;
  border-radius: 5px;
  color: var(--navy);
  background: #edf2f8;
  font-size: 0.72rem;
  font-weight: 750;
}

.gallery-batch-option input {
  width: 16px;
  min-height: 0;
  height: 16px;
  margin: 0;
  padding: 0;
}

.gallery-batch-form .button,
.gallery-selection-filters .button {
  min-height: 34px;
  padding: 5px 10px;
  font-size: 0.7rem;
}

.gallery-batch-form :disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.federation-contact-form {
  max-width: 980px;
}

.federation-contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.editor-form.compact {
  display: grid;
  gap: 12px;
}

.editor-form.compact .form-grid {
  margin-bottom: 0;
}

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

.settings-card {
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
}

.settings-card h3 {
  margin: 0 0 5px;
  color: var(--navy);
}

.settings-card > p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.82rem;
}

.settings-card form {
  display: grid;
  gap: 14px;
}

.settings-card .button {
  justify-self: start;
}

.theme-settings-card {
  display: grid;
  gap: 10px;
  max-width: 720px;
}

.theme-settings-card label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 750;
}

.theme-settings-card select {
  width: 100%;
  max-width: 440px;
  padding-inline: 11px;
  font: inherit;
}

.theme-settings-card small,
.theme-settings-card [data-eaf-theme-status] {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.setup-card {
  grid-column: 1 / -1;
  color: var(--white);
  background: linear-gradient(120deg, var(--navy-deep), var(--navy));
}

.setup-card h3,
.setup-card > p {
  color: inherit;
}

.setup-card > p {
  color: #d2ddef;
}

.setup-card code {
  color: #fff3bc;
  background: rgba(0, 0, 0, 0.17);
}

.setup-card a {
  color: var(--gold);
  font-weight: 750;
}

@media (max-width: 1080px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .admin-nav {
    position: sticky;
    z-index: 25;
    top: 72px;
    display: flex;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 8px 16px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: auto;
    scrollbar-gutter: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-nav a {
    flex: 0 0 auto;
    grid-template-columns: auto 1fr auto;
    gap: 7px;
  }

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

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

}

@media (max-width: 820px) {
  .login-shell {
    grid-template-columns: 1fr;
    gap: 30px;
    width: min(580px, calc(100% - 32px));
  }

  .login-brand > p:nth-child(2) {
    margin-bottom: 25px;
  }

  .login-brand h1 {
    font-size: 3rem;
  }

  .dashboard-content {
    padding: 20px 14px;
  }

  .admin-back-to-top {
    right: 14px;
    bottom: 14px;
    width: 44px;
    height: 44px;
  }

  .admin-section {
    padding: 24px 18px;
  }

  .status-pill {
    position: static;
    width: fit-content;
    margin-top: 20px;
  }

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

  .api-note,
  .moderation-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .member-table {
    overflow-x: auto;
  }

  .member-row {
    width: 1320px;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .setup-card {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .admin-header {
    padding: 0 14px;
  }

  .admin-brand small,
  .admin-user a {
    display: none;
  }

  .section-title,
  .security-alert,
  .sticky-save {
    align-items: stretch;
    flex-direction: column;
  }

  .section-title-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .section-title .button,
  .sticky-save .button {
    width: 100%;
  }

  .section-collapse-button {
    width: 100%;
  }

  .dashboard-collapse-controls {
    align-items: stretch;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .dashboard-collapse-controls span {
    width: 100%;
  }

  .gallery-list-toggle-label {
    display: none;
  }

  .gallery-admin-table-wrap {
    padding: 8px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .wide {
    grid-column: auto;
  }

  .recurrence-fieldset {
    grid-template-columns: 1fr;
  }

  .recurrence-controls {
    grid-template-columns: 1fr;
  }

  .recurrence-fieldset > small {
    grid-column: auto;
  }

  .record-card summary {
    grid-template-columns: 48px minmax(0, 1fr) 20px;
    gap: 10px;
    padding: 10px;
  }

  .record-card summary .badge {
    grid-column: 2;
    justify-self: start;
  }

  .record-card summary .chevron {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .news-record summary .chevron {
    grid-row: 1 / 4;
  }

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

  .record-edit-label {
    display: none;
  }

  .record-media,
  .date-tile {
    width: 46px;
    height: 46px;
  }

  .record-editor {
    padding: 20px 14px;
  }

  .sponsor-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid article {
    grid-template-columns: 1fr auto;
    min-height: 100px;
  }

  .stats-grid strong {
    grid-row: 1 / 3;
    grid-column: 2;
  }

  .table-tools {
    align-items: stretch;
    flex-direction: column;
  }
}

/* V14.7a high-volume news moderation. The composition deliberately reuses
   the V14.6 Media Gallery disclosure and record-card language while keeping
   selection outside the fixed five-cell news summary contract. */
.news-admin-list {
  margin-top: 24px;
}

.news-admin-tools {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #f8faff;
  border-bottom: 1px solid var(--line);
}

.news-filter-form {
  display: grid;
  grid-template-columns: minmax(260px, 1.8fr) repeat(2, minmax(145px, .7fr)) minmax(170px, .8fr) auto;
  align-items: end;
  gap: 10px;
}

.news-filter-form label,
.news-bulk-action-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.news-filter-form input,
.news-filter-form select,
.news-bulk-action-row select {
  min-height: 42px;
  padding: 8px 10px;
  color: var(--navy-deep);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
}

.news-filter-actions,
.news-selection-row,
.news-bulk-action-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.news-selection-row {
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.news-selection-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 7px 11px;
  color: var(--navy-deep);
  background: var(--paper);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.news-selection-row strong {
  min-width: 96px;
  padding: 9px 12px;
  margin-left: auto;
  color: var(--navy-deep);
  background: #eaf1fb;
  border-radius: 8px;
  font-size: 12px;
  text-align: center;
}

.news-bulk-action-row label {
  grid-template-columns: auto minmax(190px, 260px);
  align-items: center;
}

.news-bulk-list {
  max-height: 680px;
  padding: 12px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: var(--white);
}

.news-bulk-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 4px;
  border-radius: 12px;
}

.news-bulk-row.is-selected {
  background: rgba(255, 199, 0, .16);
}

.news-row-selector {
  display: grid;
  place-items: center;
  min-height: 70px;
  cursor: pointer;
}

.news-row-selector input {
  width: 19px;
  height: 19px;
  accent-color: var(--blue);
}

.news-bulk-row .record-card {
  width: 100%;
}

.record-home-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
}

.news-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.news-pagination span {
  color: var(--muted);
  font-size: 12px;
}

.news-pagination .is-disabled {
  opacity: .45;
  pointer-events: none;
}

/* Bounded editor lists reuse the V14.6 fields, buttons and record cards; only
   the compact filter/pager frame is new. */
.event-admin-tools {
  margin: 18px 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.event-filter-form {
  grid-template-columns: minmax(260px, 1.6fr) minmax(190px, .8fr) minmax(160px, .65fr) auto;
}

.bounded-result-count {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

#events > .content-pagination {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
}

.gallery-admin-filters {
  display: grid;
  gap: 8px;
  padding: 11px 12px;
  border-top: 1px solid var(--line);
  background: #f8faff;
}

.gallery-filter-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(160px, 220px) auto;
  align-items: end;
  gap: 8px;
}

.gallery-filter-form label {
  display: grid;
  gap: 4px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.gallery-filter-form input {
  min-height: 36px;
  padding: 6px 8px;
  color: var(--navy-deep);
  background: var(--white);
  border: 1px solid #b9c6d8;
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
}

.gallery-filter-form > div {
  display: flex;
  gap: 7px;
}

.gallery-filter-form .button {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 11px;
}

@media (max-width: 980px) {
  .news-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-filter-form > label:first-child,
  .news-filter-actions {
    grid-column: 1 / -1;
  }

  .news-selection-row,
  .news-bulk-action-row {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .news-selection-row strong {
    margin-left: 0;
  }

  .event-filter-form,
  .gallery-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .event-filter-form .news-filter-actions,
  .gallery-filter-form > div {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .news-filter-form {
    grid-template-columns: 1fr;
  }

  .news-filter-form > label:first-child,
  .news-filter-actions {
    grid-column: auto;
  }

  .event-filter-form,
  .gallery-filter-form {
    grid-template-columns: 1fr;
  }

  .event-filter-form .news-filter-actions,
  .gallery-filter-form > div {
    grid-column: auto;
  }

  .news-bulk-row {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .news-row-selector {
    min-height: 58px;
  }

  .record-home-badges {
    justify-content: flex-start;
  }
}

/* V14 governed publishing, discoverability and revision summaries */
.lifecycle-fieldset {
  border: 1px solid #cbd8eb;
  border-radius: 14px;
  margin: 6px 0 0;
  padding: 16px;
}

.lifecycle-fieldset legend {
  color: #08265f;
  font-weight: 800;
  padding: 0 8px;
}

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

.lifecycle-details {
  border: 1px solid #dbe4f1;
  border-radius: 12px;
  background: #f7faff;
  padding: 0;
}

.lifecycle-details > summary {
  color: #08265f;
  cursor: pointer;
  font-weight: 800;
  list-style-position: inside;
  padding: 14px 16px;
}

.lifecycle-details-body,
.revision-list {
  border-top: 1px solid #dbe4f1;
  padding: 16px;
}

.lifecycle-quality {
  border-left: 4px solid #1f8f55;
  color: #164d32;
  margin: 0;
  padding: 9px 12px;
}

.lifecycle-quality.has-errors {
  border-left-color: #bd2734;
  color: #8d1c27;
}

.revision-list {
  display: grid;
  gap: 9px;
}

.revision-list article {
  background: #fff;
  border: 1px solid #dbe4f1;
  border-radius: 9px;
  padding: 10px 12px;
}

.revision-list article small {
  display: block;
  margin-top: 3px;
}

.revision-restore-note {
  color: #51627c;
  font-size: .83rem;
  margin: 4px 0 0;
}

@media (max-width: 820px) {
  .lifecycle-grid {
    grid-template-columns: 1fr;
  }
}

/* Privacy-conscious first-party metrics */
.metrics-toggle-form {
  display: grid;
  flex: 0 0 min(350px, 100%);
  gap: 10px;
  padding: 16px;
  border: 1px solid #cbd7e6;
  border-radius: 10px;
  background: #f7faff;
}

.metrics-toggle-form .toggle-line {
  margin: 0;
}

.metrics-notice {
  margin-bottom: 18px;
}

.metrics-diagnostics {
  margin: 0;
  padding: 20px;
  background: linear-gradient(145deg, #fbfdff, #f2f7fd);
}

.metrics-diagnostics-shell {
  border-color: #c7d4e4;
}

.metrics-diagnostics-shell > .metrics-subsection-content {
  padding: 0;
}

.metrics-diagnostics-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.metrics-diagnostics-heading h3 {
  margin: 1px 0 6px;
  color: var(--navy-deep);
  font-size: 1.22rem;
}

.metrics-diagnostics-heading p:not(.eyebrow) {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.metrics-readiness {
  flex: 0 0 auto;
  max-width: 280px;
  padding: 8px 11px;
  border: 1px solid #f0a36a;
  border-radius: 999px;
  color: #8a3510;
  background: #fff4ea;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.metrics-readiness.is-ready {
  border-color: #70c692;
  color: #17643a;
  background: #eaf8f0;
}

.metrics-diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.metrics-diagnostic-grid article {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #d8e1ed;
  border-radius: 9px;
  background: #fff;
}

.metrics-diagnostic-grid article > span {
  display: grid;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: #8a3510;
  background: #ffeadb;
  font-size: 0.72rem;
  font-weight: 900;
}

.metrics-diagnostic-grid article[data-diagnostic-state="pass"] > span {
  color: #17643a;
  background: #dff4e8;
}

.metrics-diagnostic-grid strong,
.metrics-diagnostic-grid small {
  display: block;
  overflow-wrap: anywhere;
}

.metrics-diagnostic-grid strong {
  color: var(--navy-deep);
  font-size: 0.72rem;
}

.metrics-diagnostic-grid small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.35;
}

.metrics-diagnostic-explanation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.metrics-diagnostic-explanation > div {
  padding: 12px 14px;
  border-left: 3px solid var(--blue);
  background: rgba(255, 255, 255, 0.82);
  color: #52657e;
  font-size: 0.74rem;
  line-height: 1.5;
}

.metrics-diagnostic-explanation strong {
  color: var(--navy-deep);
}

.metrics-diagnostic-explanation ul,
.metrics-diagnostic-explanation p {
  margin: 6px 0 0;
}

.metrics-diagnostic-explanation ul {
  padding-left: 18px;
}

.metrics-diagnostic-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}

.metrics-diagnostic-actions p,
.metrics-diagnostic-result,
.metrics-admin-exclusion {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.metrics-diagnostic-result:not(:empty) {
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 7px;
  color: var(--navy-deep);
  background: #eaf1fb;
  font-weight: 700;
}

.metrics-admin-exclusion {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #d8e1ed;
}

.metrics-toolbar,
.metrics-filter-form,
.metrics-custom-dates {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.metrics-toolbar {
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.metrics-filter-form label {
  display: grid;
  gap: 5px;
  color: var(--navy);
  font-size: 0.77rem;
  font-weight: 750;
}

.metrics-filter-form select,
.metrics-filter-form input {
  min-height: 42px;
  padding: 7px 10px;
  border: 1px solid #bac7d8;
  border-radius: 6px;
  background: #fff;
}

.metrics-range-label {
  margin: 8px 0 20px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.metrics-subsection {
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
  overflow: hidden;
}

.metrics-subsection > summary {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 20px;
  padding: 17px 52px 17px 20px;
  color: var(--navy-deep);
  background: #f3f7fc;
  cursor: pointer;
  list-style: none;
}

.metrics-subsection > summary::-webkit-details-marker {
  display: none;
}

.metrics-subsection > summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  color: var(--blue);
  font-size: 1.45rem;
  font-weight: 700;
}

.metrics-subsection[open] > summary::after {
  content: "−";
}

.metrics-subsection > summary span {
  font-family: "Oswald", Impact, sans-serif;
  font-size: 1.25rem;
  font-weight: 580;
  text-transform: uppercase;
}

.metrics-subsection > summary small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
}

.metrics-subsection-content {
  padding: 18px;
}

.metrics-subsection-content.metrics-table-grid,
.metrics-subsection-content.metrics-chart-grid {
  margin-bottom: 0;
}

.metrics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 26px;
}

.metrics-kpi-grid article {
  min-width: 0;
  padding: 18px;
  border: 1px solid #d5deea;
  border-radius: 10px;
  background: linear-gradient(145deg, #fff, #f3f7fc);
}

.metrics-kpi-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.metrics-kpi-grid strong {
  display: block;
  margin-top: 6px;
  color: var(--navy-deep);
  font-family: "Oswald", Impact, sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 580;
  line-height: 1;
}

.metrics-chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.metrics-chart-card,
.metrics-map-card,
.metrics-table-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.metrics-chart-card > div:first-child,
.metrics-map-card > div:first-child,
.metrics-table-card > h3 {
  margin: 0;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #f8faff;
}

.metrics-chart-card h3,
.metrics-map-card h3,
.metrics-table-card h3 {
  margin: 0;
  color: var(--navy-deep);
  font-size: 0.94rem;
}

.metrics-chart-card p,
.metrics-map-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.metrics-chart {
  min-height: 210px;
  padding: 12px;
}

.metrics-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.metrics-grid-line {
  stroke: #dce4ef;
  stroke-width: 1;
}

.metrics-axis-label,
.metrics-legend-label {
  fill: #667085;
  font-family: "Inter", Arial, sans-serif;
  font-size: 10px;
}

.metrics-map-card {
  display: grid;
  grid-template-columns: minmax(210px, 0.34fr) minmax(0, 1fr);
  margin-bottom: 20px;
}

.metrics-map-card > div:first-child {
  border-right: 1px solid var(--line);
  border-bottom: 0;
}

.metrics-country-map {
  position: relative;
  min-height: 360px;
  background: #f7faff;
  overflow: hidden;
}

.metrics-country-map svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
}

.metrics-map-countries path {
  transition: filter 140ms ease, stroke-width 140ms ease;
}

.metrics-map-countries path:hover {
  filter: brightness(0.92);
  stroke: #f2b705;
  stroke-width: 2;
}

.metrics-map-unknown {
  position: absolute;
  right: 10px;
  bottom: 8px;
  margin: 0 !important;
  padding: 5px 8px;
  border-radius: 5px;
  color: var(--navy) !important;
  background: rgba(255, 255, 255, 0.92);
  font-weight: 750;
}

.metrics-table-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

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

.metrics-table-card .metrics-empty {
  padding: 18px;
}

.metrics-table-scroll {
  max-height: 360px;
  overflow: auto;
}

.metrics-table-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.metrics-table-card th,
.metrics-table-card td {
  padding: 10px 13px;
  border-bottom: 1px solid #edf1f6;
  text-align: left;
  vertical-align: top;
}

.metrics-table-card thead th {
  position: sticky;
  z-index: 1;
  top: 0;
  color: #52657e;
  background: #fff;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.metrics-table-card td,
.metrics-table-card thead th:last-child {
  width: 72px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.metrics-table-card tbody th {
  color: var(--navy-deep);
  overflow-wrap: anywhere;
}

.metrics-table-card tbody th span,
.metrics-table-card tbody th small {
  display: block;
}

.metrics-table-card tbody th small {
  margin-top: 2px;
  color: var(--muted);
  font-weight: 500;
}

.metrics-empty,
.metrics-privacy-note {
  color: var(--muted);
  font-size: 0.78rem;
}

.metrics-privacy-note {
  margin: 0;
  padding: 14px 16px;
  border-left: 3px solid var(--blue);
  background: #f2f6fc;
}

@media (max-width: 1100px) {
  .metrics-diagnostic-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

@media (max-width: 760px) {
  .metrics-diagnostics-heading,
  .metrics-diagnostic-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .metrics-readiness {
    max-width: none;
  }

  .metrics-diagnostic-grid,
  .metrics-diagnostic-explanation {
    grid-template-columns: 1fr;
  }

  .metrics-toggle-form,
  .metrics-toolbar,
  .metrics-filter-form,
  .metrics-custom-dates {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .metrics-chart-grid,
  .metrics-table-grid,
  .metrics-breakdowns,
  .metrics-map-card {
    grid-template-columns: 1fr;
  }

  .metrics-map-card > div:first-child {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

.setup-page-shell {
  width: min(900px, calc(100% - 32px));
  margin: 48px auto;
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.setup-page-shell h1 {
  margin: 0;
  color: var(--navy-deep);
  font-family: "Oswald", Impact, sans-serif;
  font-size: clamp(2.7rem, 6vw, 4.6rem);
  font-weight: 570;
  line-height: 1;
  text-transform: uppercase;
}

.setup-lead {
  margin: 14px 0 34px;
  color: var(--muted);
  font-size: 1.02rem;
}

.setup-page-shell section {
  margin: 0 0 26px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--line);
}

.setup-page-shell h2 {
  color: var(--navy);
  font-family: "Oswald", Impact, sans-serif;
  font-size: 1.7rem;
  font-weight: 570;
  text-transform: uppercase;
}

.setup-page-shell li + li {
  margin-top: 8px;
}

/* Role-based administration and page builder */

.signed-in-as {
  display: grid;
  line-height: 1.2;
  text-align: right;
}

.signed-in-as b {
  font-size: 0.82rem;
}

.signed-in-as small {
  color: #bcd0ec;
  font-size: 0.7rem;
}

.builder-note {
  margin: 0 0 22px;
  padding: 15px 18px;
  border: 1px solid #c7d7ee;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #f3f7fd;
}

.builder-note p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.homepage-builder-card {
  margin-bottom: 22px;
  border-color: #9db7dc;
  box-shadow: inset 4px 0 0 var(--gold);
}

.homepage-record-media {
  color: var(--navy-deep);
  background: linear-gradient(135deg, #ffdf73, var(--gold));
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.homepage-record-editor {
  padding: clamp(20px, 3vw, 32px);
}

.homepage-builder-note {
  margin-bottom: 26px;
}

.homepage-builder-form {
  display: grid;
  gap: 26px;
}

.homepage-builder-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 20px;
  border: 1px solid #c5d3e5;
  border-radius: 10px;
  background: #fff;
}

.homepage-builder-form legend {
  padding: 0 8px;
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 850;
}

.homepage-builder-form label {
  display: grid;
  gap: 7px;
}

.homepage-builder-form label > span {
  color: #344054;
  font-size: 0.78rem;
  font-weight: 750;
}

.homepage-builder-form small,
.homepage-builder-form .field-help {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.homepage-builder-form .field-help {
  margin: 0 0 16px;
}

.homepage-carousel-settings {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  align-items: end;
  gap: 24px;
  margin-bottom: 18px;
}

.homepage-carousel-settings .field-help {
  margin: 0;
  padding: 12px 14px;
  border-left: 3px solid var(--gold);
  background: #f7faff;
}

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

.homepage-slide-card {
  display: grid;
  align-content: start;
  gap: 13px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #d7e0ec;
  border-radius: 9px;
  background: #f7faff;
}

.homepage-slide-preview {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 7;
  color: #fff;
  background: var(--navy-deep);
  border-radius: 7px;
}

.homepage-slide-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.homepage-slide-preview > span {
  display: grid;
  place-items: center;
  height: 100%;
  color: #c9d8ef;
  font-size: 0.75rem;
  font-weight: 750;
}

.homepage-slide-preview b {
  position: absolute;
  top: 8px;
  left: 8px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--navy-deep);
  background: var(--gold);
  border-radius: 50%;
  font-size: 0.78rem;
}

.homepage-slide-card > p {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  color: var(--navy);
}

.homepage-slide-card > p span {
  color: var(--muted);
  font-size: 0.68rem;
}

.homepage-slide-order {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.homepage-slide-order .button,
.homepage-slide-footer .button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 0.7rem;
}

.homepage-slide-order .button-secondary,
.homepage-slide-footer .button-secondary {
  color: var(--navy);
  background: #e9f0fa;
  border: 1px solid #bdcce0;
  box-shadow: none;
}

.homepage-slide-order .button-danger {
  margin-left: auto;
  box-shadow: none;
}

.homepage-slide-order .button:disabled,
.homepage-slide-footer .button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.homepage-slide-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}

.homepage-slide-footer output {
  color: var(--muted);
  font-size: 0.72rem;
  text-align: right;
}

.homepage-slide-statuses {
  display: grid;
  gap: 3px;
  max-width: 560px;
}

.homepage-slide-footer .homepage-upload-status.is-error {
  color: #b42318;
  font-weight: 800;
}

.homepage-facts-editor {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.homepage-facts-editor article {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #d7e0ec;
  border-radius: 9px;
  background: #f7faff;
}

.homepage-facts-editor output {
  color: var(--blue);
  font-family: "Oswald", Impact, sans-serif;
  font-size: 2rem;
  font-weight: 600;
}

.homepage-builder-form .form-actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .homepage-facts-editor {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .homepage-carousel-settings {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .homepage-slide-grid {
    grid-template-columns: 1fr;
  }

  .homepage-slide-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .homepage-slide-footer output {
    text-align: left;
  }

  .homepage-slide-statuses {
    max-width: none;
  }

  .homepage-builder-form fieldset {
    padding: 14px;
  }
}

.wysiwyg-field {
  display: grid;
  gap: 7px;
}

.wysiwyg-field > span {
  color: #344054;
  font-size: 0.82rem;
  font-weight: 750;
}

.wysiwyg-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 7px;
  border: 1px solid #c8d1df;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  background: #edf2f9;
}

.wysiwyg-toolbar button {
  min-height: 34px;
  padding: 5px 10px;
  color: var(--navy);
  border: 1px solid #c8d1df;
  border-radius: 4px;
  background: var(--white);
  font-size: 0.77rem;
  font-weight: 700;
  cursor: pointer;
}

.wysiwyg-toolbar button:hover {
  border-color: var(--blue);
  background: #f7faff;
}

.toolbar-divider {
  width: 1px;
  margin: 2px 3px;
  background: #b9c6d8;
}

.wysiwyg-editor {
  min-height: 340px;
  max-height: 700px;
  overflow-y: auto;
  padding: 24px;
  border: 1px solid #c8d1df;
  border-radius: 0 0 7px 7px;
  background: var(--white);
  line-height: 1.7;
}

.wysiwyg-editor:focus {
  outline: 0;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 59, 143, 0.12);
}

.wysiwyg-editor h2,
.wysiwyg-editor h3 {
  color: var(--navy-deep);
  font-family: "Oswald", Impact, sans-serif;
}

.wysiwyg-editor img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 22px auto;
  border-radius: 9px;
}

.wysiwyg-editor img.is-selected {
  outline: 4px solid rgba(0, 59, 143, 0.35);
  outline-offset: 3px;
}

.country-information-status,
.country-information-picker,
.country-information-editor-shell {
  margin-top: 22px;
  background: #f7f9fc;
  border: 1px solid #dce4ef;
  border-radius: 14px;
}

.country-information-status,
.country-information-picker {
  padding: 20px;
}

.country-information-editor-shell {
  overflow: hidden;
}

.country-information-editor-shell > summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 54px 15px 20px;
  color: var(--navy-deep);
  background: #edf3fa;
  cursor: pointer;
  list-style: none;
}

.country-information-editor-shell > summary::-webkit-details-marker {
  display: none;
}

.country-information-editor-shell > summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  color: var(--blue);
  font-size: 1.45rem;
  font-weight: 800;
}

.country-information-editor-shell[open] > summary::after {
  content: "−";
}

.country-information-editor-content {
  padding: 20px;
  border-top: 1px solid #dce4ef;
}

.country-information-editor {
  margin: 0;
}

.country-information-status .editor-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.country-information-status .toggle-line {
  margin: 0;
}

.country-information-picker {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.country-information-picker label {
  flex: 1;
  max-width: 520px;
}

.country-information-picker label > span,
.country-information-fields label > span {
  display: block;
  margin-bottom: 7px;
  color: #243b5c;
  font-size: 12px;
  font-weight: 850;
}

.country-information-picker select,
.country-information-fields textarea {
  width: 100%;
}

.country-information-editor-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.country-information-editor-heading img {
  width: 48px;
  height: 36px;
  object-fit: cover;
  border: 1px solid #d6dfeb;
  border-radius: 5px;
  box-shadow: 0 4px 12px rgba(0, 35, 84, 0.12);
}

.country-information-editor-heading > span {
  display: grid;
  gap: 2px;
}

.country-information-editor-heading small {
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.country-information-editor-heading strong {
  color: #002b6f;
  font-family: "Oswald", Impact, sans-serif;
  font-size: 1.3rem;
  font-weight: 580;
  text-transform: uppercase;
}

.country-information-editor-heading em {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 650;
  text-transform: none;
}

.country-information-editor-state {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.country-information-fields textarea {
  min-height: 86px;
  resize: vertical;
}

.country-information-batch-shell {
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid #c9d7e8;
  border-radius: 14px;
  background: #f7f9fc;
}

.country-information-batch-shell > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 20px;
  color: var(--navy-deep);
  background: #edf3fa;
  cursor: pointer;
  list-style: none;
}

.country-information-batch-shell > summary::-webkit-details-marker {
  display: none;
}

.country-information-batch-shell > summary > span:first-child {
  display: grid;
  gap: 3px;
}

.country-information-batch-shell > summary strong {
  font-size: 0.96rem;
}

.country-information-batch-shell > summary small {
  color: var(--muted);
  font-size: 0.72rem;
}

.country-information-batch-content {
  display: grid;
  gap: 18px;
  padding: 20px;
  border-top: 1px solid #dce4ef;
}

.country-information-batch-downloads {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.country-information-import-form {
  padding: 18px;
  border: 1px dashed #a9bad0;
  border-radius: 10px;
  background: #fff;
}

.country-information-preview {
  padding: 18px;
  border: 1px solid #9eb8d8;
  border-left: 5px solid var(--blue);
  border-radius: 10px;
  background: #fff;
}

.country-information-preview h3 {
  margin: 0 0 13px;
  color: var(--navy-deep);
}

.country-information-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 16px;
}

.country-information-preview-grid span {
  display: grid;
  gap: 2px;
  padding: 11px;
  border-radius: 8px;
  color: var(--muted);
  background: #edf3fa;
  font-size: 0.72rem;
}

.country-information-preview-grid strong {
  color: var(--navy-deep);
  font-size: 1.2rem;
}

.country-information-apply-form {
  padding-top: 14px;
  border-top: 1px solid #dce4ef;
}

.legal-policy-review-note {
  margin: 22px 0;
  padding: 15px 18px;
  color: #4a3100;
  background: #fff7dc;
  border: 1px solid #e6bd3e;
  border-left: 5px solid #d89c00;
  border-radius: 10px;
}

.legal-policy-review-note strong {
  display: block;
  margin-bottom: 4px;
}

.legal-policy-review-note p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.legal-policy-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.legal-policy-admin-card {
  min-width: 0;
  padding: 22px;
  background: #f7f9fc;
  border: 1px solid #dce4ef;
  border-radius: 14px;
}

.legal-policy-admin-card > div:first-child h3,
.legal-policy-admin-card > div:first-child p {
  margin-top: 0;
}

.legal-policy-admin-card .legal-policy-editor {
  min-height: 520px;
  max-height: 760px;
  overflow: auto;
}

.legal-policy-admin-card .delete-form {
  display: inline-flex;
  margin: 12px 8px 0 0;
}

.legal-policy-admin-card > .button {
  margin-top: 12px;
}

.legal-policy-history {
  margin-top: 16px;
  padding: 12px 14px;
  background: #edf3fa;
  border: 1px solid #d3deec;
  border-radius: 9px;
}

.legal-policy-history summary {
  color: var(--navy);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.legal-policy-history ol {
  display: grid;
  gap: 8px;
  padding-left: 22px;
}

.legal-policy-history li span,
.legal-policy-history li code {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .country-information-status .editor-form,
  .country-information-picker {
    align-items: stretch;
    flex-direction: column;
  }

  .country-information-editor-state {
    display: none;
  }

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

  .legal-policy-admin-grid {
    grid-template-columns: 1fr;
  }
}

.protected-page-note {
  padding: 15px 17px;
  border: 1px solid #b6c9e4;
  border-left: 4px solid var(--blue);
  border-radius: 7px;
  background: #f4f8fd;
}

.protected-page-note p {
  margin: 3px 0 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

.current-hero {
  overflow: hidden;
  height: 180px;
  border-radius: 9px;
  background: var(--navy-deep);
}

.current-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.button-quiet {
  color: var(--navy);
  border: 1px solid #b9c6d8;
  background: var(--white);
}

.role-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.role-selector legend {
  padding: 0 6px;
  color: #344054;
  font-size: 0.82rem;
  font-weight: 750;
}

.role-selector label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid #d8e0eb;
  border-radius: 7px;
  background: #fbfcfe;
}

.role-selector input {
  flex: 0 0 auto;
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.role-selector span,
.role-selector b,
.role-selector small {
  display: inline;
}

.role-selector label > span {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
}

.role-selector small {
  margin-top: 0;
  color: var(--muted);
  line-height: 1.35;
}

.generated-password-line {
  display: block;
  padding: 9px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: var(--navy);
  background: #f7faff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.password-with-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.password-with-button input {
  border-radius: 7px 0 0 7px;
}

.password-with-button button {
  padding: 0 16px;
  color: var(--white);
  border: 0;
  border-radius: 0 7px 7px 0;
  background: var(--blue);
  font-weight: 750;
  cursor: pointer;
}

.admin-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  box-sizing: border-box;
  color: var(--white);
  border: 3px solid var(--blue);
  border-radius: 50%;
  background: linear-gradient(145deg, var(--blue), var(--navy-deep));
  font-family: Arial, sans-serif;
  font-size: 1.55rem;
  line-height: 1;
}

.admin-role-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: -10px 0 24px;
  padding: 12px;
  border: 1px solid #d6e0ee;
  border-radius: 9px;
  background: #f8fbff;
}

.admin-role-key {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 31px;
  padding: 4px 10px;
  border: 2px solid;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
}

.admin-role-key b {
  font-family: Arial, sans-serif;
  font-size: 1rem;
  line-height: 1;
}

.admin-role-legend > small {
  flex: 1 1 240px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.admin-role-eaf-administrator {
  color: #fff;
  border-color: #f7c600;
  background: #002b6f;
}

.admin-role-eaf-director,
.admin-role-eaf-staff {
  color: #fff;
  border-color: #003b82;
  background: #002b6f;
}

.admin-role-event-coordinator {
  color: #002b6f;
  border-color: #9bd1f4;
  background: #9bd1f4;
}

.admin-role-news-coordinator {
  color: #111827;
  border-color: #f7c600;
  background: #f7c600;
}

.admin-role-eaf-author {
  color: #344054;
  border-color: #667085;
  background: #eef2f6;
}

.leadership-thumb img {
  object-position: center top;
}

.current-portrait {
  width: min(240px, 100%);
  height: 280px;
}

.current-portrait img {
  object-position: center top;
}

.emergency-admin-section {
  border-color: #f2b8b5;
}

.emergency-editor {
  min-height: 180px;
  max-height: 360px;
}

.alert-type-field small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.45;
}

.alert-toggle {
  padding: 12px;
  border: 1px solid #f4c7c3;
  border-radius: 7px;
  background: #fff4f3;
}

.social-profile-note {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 18px;
  padding: 15px 18px;
  color: #184a76;
  border: 1px solid #b8d7f2;
  border-radius: 8px;
  background: #edf6ff;
  font-size: 0.8rem;
}

.social-profile-form {
  display: grid;
  gap: 18px;
}

.social-profile-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
}

.social-profile-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.65fr) minmax(280px, 1.8fr) minmax(90px, 0.45fr) minmax(180px, 0.8fr);
  align-items: center;
  gap: 14px;
  min-width: 840px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
}

.social-profile-row:last-child {
  border-bottom: 0;
}

.social-profile-head {
  min-height: 42px;
  padding-block: 9px;
  color: #52657e;
  background: #edf2f9;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.social-platform-name,
.social-profile-audit {
  display: grid;
  gap: 2px;
}

.social-platform-name strong {
  color: var(--navy-deep);
  font-size: 0.82rem;
}

.social-platform-name small,
.social-profile-audit small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-profile-row input[type="text"] {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  border: 1px solid #b9c5d6;
  border-radius: 7px;
  background: #fff;
}

.social-display-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #d5deea;
  border-radius: 7px;
  background: #f7f9fc;
  cursor: pointer;
}

.social-display-toggle input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--blue);
}

.social-display-toggle span {
  color: #344054;
  font-size: 0.76rem;
  font-weight: 750;
}

.social-profile-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
  border: 1px solid #c9d7e8;
  border-radius: 9px;
  background: #f7faff;
}

.social-profile-actions p,
.social-profile-actions span {
  display: grid;
  margin: 0;
}

.social-profile-actions span {
  color: var(--muted);
  font-size: 0.74rem;
}

#member-access {
  margin-top: 52px;
  border-top: 5px solid #b8cae2;
}

#member-access .record-list,
#administrators .record-list {
  margin-top: 22px;
}

.section-title-actions form {
  margin: 0;
}

.associate-home-visibility-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.associate-home-visibility-form .toggle-line {
  max-width: 390px;
  padding: 8px 10px;
  border: 1px solid #d6e0ee;
  border-radius: 7px;
  background: #f8fbff;
}

.associate-home-visibility-form .toggle-line span {
  display: grid;
  gap: 2px;
}

.associate-home-visibility-form .toggle-line small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
}

.associate-home-visibility-form .button {
  flex: 0 0 auto;
}

/* Compact record grids. Open editors span the full width for usable forms. */
#events .record-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

#pages .record-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

#events .record-card[open],
#pages .record-card[open] {
  grid-column: 1 / -1;
}

#events .record-card:not([open]) summary {
  grid-template-columns: 40px minmax(0, 1fr) 18px;
  grid-template-rows: auto auto;
  gap: 3px 9px;
  min-height: 62px;
  padding: 7px 9px;
}

#events .record-card:not([open]) .date-tile {
  grid-row: 1 / 3;
  width: 40px;
  height: 40px;
}

#events .record-card:not([open]) .date-tile b {
  font-size: 1.02rem;
}

#events .record-card:not([open]) .record-main {
  grid-column: 2;
  grid-row: 1;
  gap: 1px;
}

#events .record-card:not([open]) .record-main b {
  font-size: 0.78rem;
}

#events .record-card:not([open]) .record-main small {
  overflow: hidden;
  font-size: 0.61rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#events .record-card:not([open]) .badge {
  grid-column: 2;
  grid-row: 2;
  justify-self: start;
  min-height: 18px;
  padding: 1px 7px;
  font-size: 0.54rem;
}

#events .record-card:not([open]) .chevron {
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
  font-size: 1rem;
}

#pages .record-card:not([open]) summary {
  grid-template-columns: 46px minmax(0, 1fr) auto 18px;
  gap: 10px;
  min-height: 68px;
  padding: 7px 11px;
}

#pages .record-card:not([open]) .record-media {
  width: 46px;
  height: 46px;
}

#pages .record-card:not([open]) .chevron {
  grid-column: 4;
}

@media (max-width: 900px) {
  #events .record-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #pages .record-list {
    grid-template-columns: 1fr;
  }

  .event-bulk-controls {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

@media (max-width: 760px) {
  .contact-mail-actions {
    grid-template-columns: 1fr;
  }

  .contact-action-row,
  .contact-action-row form,
  .contact-mail-actions .button {
    width: 100%;
  }

  .signed-in-as {
    display: none;
  }

  .role-selector {
    grid-template-columns: 1fr;
  }

  .wysiwyg-editor {
    min-height: 260px;
    padding: 16px;
  }

  .social-profile-note,
  .social-profile-actions {
    grid-template-columns: 1fr;
    align-items: stretch;
    flex-direction: column;
  }

  .social-profile-table {
    overflow-x: auto;
  }

  .social-profile-actions .button {
    width: 100%;
  }
}

@media (max-width: 620px) {
  #events .record-list {
    grid-template-columns: 1fr;
  }

  #pages .record-card:not([open]) summary {
    grid-template-columns: 44px minmax(0, 1fr) 18px;
    grid-template-rows: auto auto;
  }

  #pages .record-card:not([open]) .record-media {
    grid-row: 1 / 3;
    width: 44px;
    height: 44px;
  }

  #pages .record-card:not([open]) .badge {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
  }

  #pages .record-card:not([open]) .chevron {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .section-title-actions form,
  .section-title-actions form .button {
    width: 100%;
  }

  .admin-role-legend {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-role-key {
    justify-content: flex-start;
  }

  .event-category-publish {
    grid-template-columns: 1fr;
  }

  .event-bulk-controls .button {
    width: 100%;
  }
}

/* V14.7a canonical user administration. The surfaces intentionally reuse the
   V14.6 dashboard palette, radii and compact data-list rhythm. */
.v147a-user-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 22px;
}

.v147a-user-kpis article {
  background: #f4f8fd;
  border: 1px solid #d3e0ef;
  border-radius: 14px;
  padding: 16px 18px;
}

.v147a-user-kpis strong { color: #063878; display: block; font-family: Oswald, sans-serif; font-size: 2rem; line-height: 1; }
.v147a-user-kpis span { color: #5c6e87; display: block; font-size: .82rem; font-weight: 800; margin-top: 6px; text-transform: uppercase; }

.v147a-user-subpanel {
  border: 1px solid #cfdded;
  border-radius: 16px;
  margin-top: 18px;
  overflow: clip;
}

.v147a-user-subpanel > summary {
  align-items: center;
  background: #edf4fc;
  cursor: pointer;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  list-style: none;
  min-height: 78px;
  padding: 17px 22px;
}

.v147a-user-subpanel > summary::-webkit-details-marker { display: none; }
.v147a-user-subpanel > summary strong,
.v147a-user-subpanel > summary small { display: block; }
.v147a-user-subpanel > summary strong { color: #073575; font-size: 1.05rem; }
.v147a-user-subpanel > summary small { color: #61718a; margin-top: 3px; }
.v147a-user-subpanel-body { border-top: 1px solid #cfdded; padding: 18px; }

.v147a-user-compact-list,
.v147a-user-table-wrap {
  border: 1px solid #d6e1ef;
  border-radius: 12px;
  max-height: 620px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.v147a-user-compact-row {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #e1e9f3;
  display: grid;
  gap: 12px;
  grid-template-columns: auto 34px minmax(0, 1fr);
  padding: 12px 15px;
}
.v147a-user-compact-row:last-child { border-bottom: 0; }
.v147a-user-compact-row strong,
.v147a-user-compact-row small { display: block; }
.v147a-user-compact-row small { color: #65758e; margin-top: 2px; }
.v147a-user-flag { font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif; font-size: 1.4rem; }

.v147a-user-list-head,
.v147a-user-bulk-controls,
.v147a-user-pagination {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: space-between;
  margin: 0 0 13px;
}
.v147a-user-list-head > div { display: flex; flex-wrap: wrap; gap: 8px; }
.v147a-user-list-head output { background: #edf4fc; border-radius: 9px; color: #063878; font-weight: 800; padding: 9px 12px; }
.v147a-user-bulk-controls { background: #f5f8fc; border: 1px dashed #cbd9ea; border-radius: 12px; justify-content: flex-start; padding: 12px; }
.v147a-user-bulk-controls select,
.v147a-user-bulk-controls input { min-width: 190px; width: auto; }

.v147a-user-filters {
  align-items: end;
  display: grid;
  gap: 11px;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  margin-bottom: 18px;
}
.v147a-user-filters label span { color: #50627d; display: block; font-size: .72rem; font-weight: 900; margin-bottom: 5px; text-transform: uppercase; }
.v147a-user-filters .editor-actions { grid-column: 1 / -1; margin: 0; }

.v147a-user-table { border-collapse: separate; border-spacing: 0; min-width: 0; table-layout: fixed; width: 100%; }
.v147a-user-table th:first-child { width: 42px; }
.v147a-user-table th:nth-child(2) { width: 24%; }
.v147a-user-table th:nth-child(3) { width: 25%; }
.v147a-user-table th:nth-child(4) { width: 20%; }
.v147a-user-table th:nth-child(5) { width: 18%; }
.v147a-user-table th:last-child { width: 76px; }
.v147a-user-table th { background: #eaf2fb; color: #4c617d; font-size: .73rem; letter-spacing: .04em; padding: 12px 10px; position: sticky; text-align: left; text-transform: uppercase; top: 0; z-index: 2; }
.v147a-user-table td { background: #fff; border-top: 1px solid #dfe8f2; color: #14243c; padding: 10px; vertical-align: middle; }
.v147a-user-table td strong,
.v147a-user-table td small { display: block; }
.v147a-user-table td small { color: #65758e; margin-top: 3px; }
.v147a-user-table td { overflow-wrap: anywhere; }
.v147a-user-table td .button { max-width: 100%; padding-inline: 10px; }
.v147a-user-country-line { align-items: center; display: flex; gap: 6px; min-width: 0; }
.v147a-user-table .v147a-user-editor-row td { border-top: 0; padding: 0 10px; }
.v147a-user-table .v147a-user-editor-row .editor-panel { margin: 4px 0 16px; }

.v147a-user-group-legend { align-items: center; background: #f5f8fc; border: 1px solid #d4e0ee; border-radius: 14px; display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; padding: 14px; }
.v147a-user-group-badge { align-items: center; border: 2px solid transparent; border-radius: 999px; display: inline-flex; font-size: .72rem; font-weight: 900; gap: 6px; line-height: 1.1; padding: 7px 10px; }
.v147a-user-group-badge > b { align-items: center; display: inline-flex; justify-content: center; line-height: 0; }
.v147a-user-group-icon { display: block; fill: none; height: 1em; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 1em; }
.v147a-user-group-avatar { align-items: center; display: inline-flex; justify-content: center; }
.v147a-user-group-avatar .v147a-user-group-icon { height: 1.35rem; width: 1.35rem; }
.v147a-user-group-avatar .v147a-user-group-icon circle { vector-effect: non-scaling-stroke; }
.v147a-user-group-badge.is-administrator { background: #063b80; border-color: #ffc400; color: #fff; }
.v147a-user-group-badge.is-staff { background: #063b80; color: #fff; }
.v147a-user-group-badge.is-volunteer { background: #9ed9f5; color: #063878; }
.v147a-user-group-badge.is-representative,
.v147a-user-group-badge.is-associate { background: #ffc400; color: #111; }
.v147a-user-group-badge.is-registered { background: #e4e7eb; border-color: #65707e; color: #434b55; }
.v147a-user-group-avatar.is-administrator { background: #063b80; border: 3px solid #ffc400; color: #fff; }
.v147a-user-group-avatar.is-staff { background: #063b80; color: #fff; }
.v147a-user-group-avatar.is-volunteer { background: #9ed9f5; color: #063878; }
.v147a-user-group-avatar.is-representative,
.v147a-user-group-avatar.is-associate { background: #ffc400; color: #111; }
.v147a-user-group-avatar.is-registered { background: #e4e7eb; border: 2px solid #65707e; color: #434b55; }

@media (max-width: 1000px) {
  .v147a-user-kpis,
  .v147a-user-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
  .v147a-user-kpis,
  .v147a-user-filters { grid-template-columns: 1fr; }
  .v147a-user-subpanel-body { padding: 12px; }
  .v147a-user-list-head,
  .v147a-user-list-head > div,
  .v147a-user-bulk-controls { align-items: stretch; flex-direction: column; }
  .v147a-user-bulk-controls select,
  .v147a-user-bulk-controls input,
  .v147a-user-list-head .button { width: 100%; }
}

/* V14.9 Digital Voting — standard dashboard design language. */
.voting-summary-grid,
.voting-process-grid { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 18px; }
.voting-summary-grid article,
.voting-process-grid article { background: #f7faff; border: 1px solid #d8e4f2; border-radius: 16px; padding: 16px; }
.voting-summary-grid small,
.voting-process-grid small { color: #60718c; display: block; font-weight: 850; letter-spacing: .04em; margin-bottom: 5px; text-transform: uppercase; }
.voting-summary-grid strong,
.voting-process-grid strong { color: #062b65; display: block; font-size: clamp(1.5rem, 2.6vw, 2.4rem); line-height: .95; }
.voting-process-grid article span { color: #687895; display: block; margin-top: 6px; }
.voting-settings-card { margin-bottom: 20px; }
.inline-settings-form { align-items: end; display: grid; gap: 14px; grid-template-columns: minmax(260px, 1.5fr) minmax(220px, 1fr) auto; }
.inline-settings-form label span { display: block; }
.voting-editor-form .toggle-line { align-self: center; }
.voting-advanced-fields { background: #f7faff; border: 1px solid #d8e4f2; border-radius: 14px; margin: 16px 0; padding: 12px 16px; }
.voting-advanced-fields summary,
.voting-inner-details summary { color: #063878; cursor: pointer; font-weight: 900; }
.voting-record-icon { align-items: center; background: #063878; color: #fff; display: inline-flex; font-size: .85rem; justify-content: center; }
.voting-results-table { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: 14px 0; }
.voting-results-table span { align-items: center; background: #fff; border: 1px solid #dfe8f2; border-radius: 12px; display: flex; justify-content: space-between; padding: 10px 12px; }
.voting-results-table b { color: #0a2d64; }
.voting-results-table em { color: #063878; font-style: normal; font-weight: 900; }
.voting-inner-details { border-top: 1px solid #e1e9f4; margin-top: 16px; padding-top: 16px; }
.voting-ballot-list { display: grid; gap: 8px; margin-top: 12px; max-height: 420px; overflow: auto; }
.voting-ballot-list div { align-items: center; background: #f7faff; border: 1px solid #dfe8f2; border-radius: 12px; display: grid; gap: 8px; grid-template-columns: minmax(180px, 1fr) minmax(110px, auto) minmax(120px, auto); padding: 10px 12px; }
.voting-ballot-list small { color: #687895; }
.voting-document-list { display: grid; gap: 8px; margin-top: 12px; }
.voting-document-row { align-items: center; background: #fff; border: 1px solid #dfe8f2; border-radius: 12px; display: grid; gap: 10px; grid-template-columns: 48px minmax(0, 1fr) auto auto; padding: 10px; }
.voting-doc-badge { align-items: center; background: #064695; border-radius: 9px; color: #fff; display: inline-flex; font-size: .72rem; font-weight: 900; height: 42px; justify-content: center; width: 42px; }
.voting-document-row strong,
.voting-document-row small { display: block; min-width: 0; overflow-wrap: anywhere; }
.voting-document-row small { color: #687895; margin-top: 2px; }
.voting-document-row a { color: #063878; font-weight: 900; }
.voting-document-row form { margin: 0; }
.voting-document-row button { background: #f7e3e3; border: 1px solid #e3a1a1; border-radius: 9px; color: #8c1f1f; font-weight: 900; padding: 8px 10px; }
.inline-upload-form { align-items: end; display: grid; gap: 12px; grid-template-columns: minmax(260px, 1fr) auto; margin-top: 14px; }
.voting-audit-list { display: grid; gap: 8px; margin-top: 12px; max-height: 360px; overflow: auto; }
.voting-audit-list div { background: #f7faff; border: 1px solid #dfe8f2; border-radius: 10px; padding: 9px 11px; }
.voting-audit-list strong,
.voting-audit-list span { display: block; }
.voting-audit-list span { color: #687895; font-size: .9rem; }
.voting-bulk-card { margin-bottom: 18px; }
.voting-record-card > summary .record-select { flex: 0 0 auto; height: 22px; width: 22px; }
.voting-archive-list { background: #f7faff; border: 1px solid #d8e4f2; border-radius: 16px; margin-top: 18px; padding: 16px; }
.voting-archive-list > summary { font-size: 1.05rem; }
.voting-archived-card { align-items: center; display: grid; gap: 12px; grid-template-columns: auto minmax(0, 1fr) auto auto; margin-top: 12px; padding: 12px 14px; }
.voting-archived-card .record-select { height: 22px; width: 22px; }
.voting-archived-card form { margin: 0; }

@media (max-width: 1050px) {
  .voting-summary-grid,
  .voting-process-grid,
  .inline-settings-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inline-settings-form button { width: 100%; }
}
@media (max-width: 700px) {
  .voting-summary-grid,
  .voting-process-grid,
  .inline-settings-form,
  .inline-upload-form,
  .voting-ballot-list div,
  .voting-document-row { grid-template-columns: 1fr; }
  .voting-document-row { align-items: start; }
  .voting-archived-card { align-items: stretch; grid-template-columns: 1fr; }
}
