.menu-toggle,
.nav-heading,
.nav-backdrop {
  display: none;
}

:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
}

.page {
  padding-top: var(--space-6);
  padding-bottom: calc(var(--space-6) * 2);
}

.page-heading {
  margin-bottom: var(--space-5);
}

.error-page {
  min-height: calc(100vh - 68px);
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.error-panel {
  width: min(100%, 560px);
  padding: 32px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--green);
}

.error-code {
  margin-bottom: 8px;
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 72px;
  font-weight: 700;
  line-height: 1;
}

.error-panel h1 {
  margin-bottom: 12px;
  font-size: 30px;
}

.error-panel > p:not(.eyebrow) {
  max-width: 440px;
  margin: 0 auto 24px;
  color: var(--muted);
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.section-heading {
  margin-bottom: var(--space-4);
}

.page-heading > div > :last-child,
.section-heading > div > :last-child {
  margin-bottom: 0;
}

.form-stack,
.form-grid {
  gap: var(--space-4);
}

.form-stack label,
.form-grid label,
.filter-bar label,
.toolbar-form label,
.officer-date-filter label,
.birth-date-fields label {
  gap: var(--space-2);
}

.filter-bar {
  gap: var(--space-3);
}

.stats {
  margin-bottom: var(--space-6);
}

fieldset {
  border: 1px solid var(--line);
  padding: 14px;
}

legend {
  font-weight: 800;
}

.birth-date-field {
  min-width: 0;
  margin: 0;
}

.birth-date-fields {
  display: grid;
  grid-template-columns: minmax(72px, .7fr) minmax(120px, 1.4fr) minmax(90px, 1fr);
  gap: 8px;
}

.birth-date-fields label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.birth-date-fields select {
  width: 100%;
  min-width: 0;
}

.session-fields {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.recurring .check {
  display: flex;
  grid-template-columns: auto 1fr;
  align-items: center;
}

.check input {
  width: auto;
}

.weekday-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.settings-section {
  background: white;
  border-top: 3px solid var(--green);
  padding: var(--space-5);
}

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

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 42px;
}

.tag-list span {
  background: #edf5f1;
  padding: 5px 8px;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: var(--space-4);
}

.no-pad {
  padding: 0;
}

.officer-list small {
  display: block;
  color: var(--muted);
}

.officer-page {
  padding-top: var(--space-5);
}

.officer-page .page-heading {
  align-items: center;
  margin-bottom: var(--space-3);
}

.officer-page .page-heading h1 {
  font-size: 32px;
  line-height: 1.1;
}

.officer-page .page-heading .eyebrow {
  margin-bottom: var(--space-1);
}

.officer-page .settings-section {
  padding: var(--space-4);
}

.officer-session .section-heading {
  align-items: center;
  margin-bottom: var(--space-2);
}

.officer-session .section-heading h2 {
  margin-bottom: 2px;
  font-size: 20px;
  line-height: 1.2;
}

.officer-sessions {
  display: grid;
  gap: var(--space-3);
}

.officer-session-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-3);
  padding: var(--space-2);
  background: #fff;
  border: 1px solid var(--line);
}

.officer-session-dates .date-box.active {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.officer-session-dates .date-box.active span {
  color: rgba(255, 255, 255, .78);
}

.officer-session-dates .date-box.not-open {
  color: #8a4b28;
  background: #f8e9df;
  border-color: #d69a76;
}

.officer-session-dates .date-box.not-open span {
  color: #8a4b28;
}

.officer-session-dates .date-box.not-open.active {
  box-shadow: inset 0 0 0 2px #8a4b28;
}

.officer-date-filter {
  display: flex;
  align-items: end;
  gap: 8px;
}

.officer-date-filter label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.roster-total {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.roster-tools {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 8px;
  padding: var(--space-2) 0;
}

.roster-tools label,
.roster-tools input {
  width: 100%;
}

.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 var(--space-3);
  color: var(--muted);
  font-size: 12px;
}

.legend-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-status strong {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: white;
  color: var(--ink);
}

.legend-status.status-1 strong { color: #0e644f; background: #e4f2ec; border-color: #66a58f; }
.legend-status.status-2 strong { color: #8a4b28; background: #f8e9df; border-color: #d69a76; }
.legend-status.status-3 strong { color: #245672; background: #e8f1f5; border-color: #88afc3; }
.legend-status.status-4 strong { color: #7a3e43; background: #f8ecec; border-color: #c98f94; }

.roster-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 220px minmax(160px, .85fr);
  gap: var(--space-3);
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 6px 0;
}

.quick-status {
  display: grid;
  grid-template-columns: repeat(4, minmax(44px, 1fr));
  gap: var(--space-1);
}

.status-option {
  position: relative;
  display: grid;
  min-height: 40px;
  place-content: center;
  text-align: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
}

.status-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.status-option span {
  font-size: 15px;
  font-weight: 900;
}

.status-option:has(input:focus-visible) {
  outline: 3px solid rgba(24, 112, 84, .25);
  outline-offset: 2px;
}

.status-option.status-1:has(input:checked) {
  color: #0e644f;
  background: #e4f2ec;
  border-color: #66a58f;
}

.status-option.status-2:has(input:checked) {
  color: #8a4b28;
  background: #f8e9df;
  border-color: #d69a76;
}

.status-option.status-3:has(input:checked) {
  color: #245672;
  background: #e8f1f5;
  border-color: #88afc3;
}

.status-option.status-4:has(input:checked) {
  color: #7a3e43;
  background: #f8ecec;
  border-color: #c98f94;
}

.roster-note,
.roster-note input {
  width: 100%;
}

.roster-note:has(input[hidden]) {
  display: none;
}

.roster-submit {
  position: sticky;
  z-index: 5;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.roster-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.roster-summary span {
  padding: 4px 7px;
  background: #edf1ef;
  border-radius: 3px;
  font-size: 11px;
}

.roster-summary .pending {
  color: #7a3e43;
  background: #f8ecec;
}

.chart-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.segmented-control {
  display: inline-flex;
  margin: 0;
  padding: 3px;
  background: #edf1ef;
  border: 0;
  border-radius: 5px;
}

.chart-figure {
  margin: 0;
}

.chart-status-legend {
  justify-content: center;
  margin: var(--space-2) 0 0;
}

.segmented-control button {
  min-height: 36px;
  padding: 6px 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.segmented-control button[aria-pressed="true"] {
  color: var(--green-dark);
  background: white;
  box-shadow: 0 1px 3px rgba(20, 47, 39, .12);
}

.segmented-control button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}

.segmented-control button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.chart-toolbar label {
  display: grid;
  gap: var(--space-1);
  min-width: 220px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.chart-toolbar label[hidden] {
  display: none;
}

.chart-toolbar select {
  min-height: 38px;
  padding: 7px 10px;
}

.chart-empty {
  display: grid;
  min-height: 280px;
  margin: 0;
  place-items: center;
  color: var(--muted);
}

.chart-empty[hidden] {
  display: none;
}

.report-table {
  min-width: 680px;
  table-layout: fixed;
}

.report-table th,
.report-table td {
  padding: var(--space-2) 10px;
  line-height: 1.3;
}

.report-table th {
  background: #f7f8f5;
  font-size: 10px;
}

.report-table th:first-child {
  width: 108px;
}

.report-table th:nth-child(2) {
  width: auto;
}

.report-table th:nth-child(n + 3):not(:last-child) {
  width: 60px;
}

.report-table th:last-child {
  width: 88px;
}

.report-table th:nth-child(n + 3),
.report-table td:nth-child(n + 3) {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.report-table tbody tr:hover td {
  background: #f7faf8;
}

.report-date {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.report-activity strong {
  display: block;
  font-size: 13px;
  line-height: 1.25;
}

.report-activity small {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.2;
}

.report-rate {
  color: var(--green-dark);
  font-size: 13px;
}

.self-contact {
  border-top: 1px solid var(--line);
  margin-top: var(--space-5);
  padding-top: var(--space-4);
}

.self-contact summary {
  cursor: pointer;
  font-weight: 800;
  margin-bottom: 16px;
}

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

.form-page {
  max-width: 980px;
}

.page-form {
  display: grid;
  gap: var(--space-4);
}

.form-section {
  padding: var(--space-5);
  background: white;
  border-top: 3px solid var(--green);
}

.form-section h2 {
  margin-bottom: var(--space-4);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 6px;
}

.date-field {
  display: grid;
  gap: 6px;
  max-width: 260px;
  font-size: 12px;
  font-weight: 800;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(300px, .8fr) minmax(360px, 1.2fr);
  gap: var(--space-4);
  align-items: start;
}

.assigned-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.assigned-list span {
  padding: 7px 10px;
  background: #edf5f1;
  border-radius: 3px;
}

.schedule-page {
  padding-top: 34px;
}

.schedule-page .page-heading {
  margin-bottom: 20px;
}

.period-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
}

.period-picker {
  position: relative;
  min-width: 150px;
  min-height: 39px;
}

.period-picker-trigger {
  width: 100%;
  min-height: 39px;
  display: grid;
  place-items: center;
  padding: 8px 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font: inherit;
}

.period-picker-trigger:hover,
.period-picker-trigger:focus-visible {
  border-color: var(--green);
  background: #f4f7f5;
}

.period-picker-trigger strong {
  min-width: 150px;
  text-align: center;
}

.period-picker-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 50%;
  width: 280px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 10px;
  padding: 12px;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 12px 30px rgba(24, 48, 42, .16);
}

.period-picker-panel[hidden] {
  display: none;
}

.period-picker-panel label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.period-picker-panel select,
.period-picker-panel input {
  width: 100%;
}

.period-picker-panel .button {
  grid-column: 1 / -1;
}

.schedule-group + .schedule-group {
  margin-top: 24px;
}

.schedule-month + .schedule-month {
  margin-top: 32px;
}

.schedule-month-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--green);
}

.schedule-month-heading h2 {
  margin: 0;
  font-size: 21px;
}

.schedule-month-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.schedule-group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  padding: 0 4px;
}

.schedule-group-heading h2,
.schedule-group-heading h3 {
  margin: 0;
  font-size: 18px;
}

.schedule-group-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.participant-table-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.participant-group-heading {
  align-items: center;
  min-height: 54px;
  margin-bottom: 0;
  padding: 10px 12px;
  background: white;
  border-left: 3px solid var(--green);
  cursor: pointer;
  list-style: none;
}

.participant-group-heading::-webkit-details-marker {
  display: none;
}

.participant-group-heading:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.participant-group-heading h2 {
  flex: 1;
  min-width: 0;
}

.participant-group[open] > .participant-group-heading {
  margin-bottom: 8px;
}

.participant-group-toggle {
  min-width: 88px;
  text-align: right;
}

.participant-group-toggle::after {
  content: " +";
  font-size: 16px;
}

.participant-group-toggle .hide-label,
.participant-group[open] .participant-group-toggle .show-label {
  display: none;
}

.participant-group[open] .participant-group-toggle .hide-label {
  display: inline;
}

.participant-group[open] .participant-group-toggle::after {
  content: " −";
}

.participant-counts {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
  margin-left: auto;
}

.participant-counts .participant-count {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  flex: 0 0 100px;
  gap: 4px;
  padding: 7px 10px;
  color: #315047;
  background: #edf2ef;
  border: 1px solid #d9e2dd;
  border-radius: 3px;
  font-size: 16px;
  line-height: 1;
}

.participant-counts .participant-count.total {
  color: white;
  background: var(--green);
  border-color: var(--green);
}

.participant-counts .participant-count.male {
  color: #245672;
  background: #e8f1f5;
  border-color: #cddfe8;
}

.participant-counts .participant-count.female {
  color: #7a3e43;
  background: #f8ecec;
  border-color: #ead2d4;
}

.participant-counts .participant-count span {
  color: inherit;
  font-size: 11px;
}

.compact-events .event-row {
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 10px 14px;
}

.compact-events .event-row time {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 48px;
}

.compact-events .event-row time strong {
  font-size: 22px;
  line-height: 1;
}

.compact-events .event-row time span {
  font-size: 10px;
  line-height: 1.2;
}

.compact-events .event-main h3 {
  margin-bottom: 4px;
  font-size: 15px;
  line-height: 1.25;
}

.event-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}

.event-place {
  color: var(--muted);
  font-size: 12px;
}

.series-period {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.assignment-status {
  padding: 3px 6px;
  color: #8a4b28;
  background: #f8e9df;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.assignment-status.assigned {
  color: #0e644f;
  background: #e4f2ec;
}

.compact-events .session-chip {
  margin: 0;
  padding: 3px 6px;
  font-size: 11px;
  line-height: 1.4;
}

.compact-events .event-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  align-self: center;
}

.attendance-links {
  grid-column: 2 / -1;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.attendance-links summary {
  width: fit-content;
  color: var(--green);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.attendance-links summary span {
  display: inline-grid;
  min-width: 20px;
  min-height: 20px;
  margin-left: 4px;
  place-items: center;
  color: var(--ink);
  background: #edf1ef;
  border-radius: 3px;
}

.attendance-link-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.attendance-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  background: #f4f7f5;
  border: 1px solid var(--line);
}

.attendance-link-row > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.attendance-link-row strong {
  font-size: 12px;
}

.attendance-link-row small {
  color: var(--muted);
}

.attendance-link-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.danger-section {
  border-top-color: var(--coral);
}

.series-dates {
  grid-column: 2 / 3;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 4px;
}

.date-box {
  width: 38px;
  min-height: 38px;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--ink);
  background: #f4f7f5;
  border: 1px solid var(--line);
  border-radius: 3px;
  text-decoration: none;
}

.date-box:hover,
.date-box:focus-visible {
  border-color: var(--green);
  background: #e7f2ed;
}

.date-box strong {
  font-size: 13px;
  line-height: 1;
}

.date-box span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1;
  text-transform: uppercase;
}

.compact-events .button.small {
  padding: 6px 10px;
  font-size: 12px;
}

.form-stack .check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #f4f7f5;
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
}

.form-stack .check-row input {
  width: auto;
  margin: 0;
}

.secure-panel {
  max-width: 620px;
}

.revealed-contact {
  font: 2.2rem Georgia, serif;
  overflow-wrap: anywhere;
}

.inline-icon {
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}

.protected-contact {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.toolbar-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: var(--space-3);
  align-items: end;
  margin-bottom: var(--space-5);
  padding: var(--space-4);
  background: white;
  border-top: 3px solid var(--gold);
}

.toolbar-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}

.toolbar-form label[hidden] {
  display: none;
}

.place-form {
  grid-template-columns: 1.1fr 1.8fr .7fr .7fr auto;
}

.officer-form {
  grid-template-columns: repeat(7, minmax(140px, 1fr)) auto;
}

.officer-form .button {
  white-space: nowrap;
}

.settings-table td:nth-child(2) {
  color: var(--muted);
}

.table-action {
  text-align: right;
}

.order-input {
  width: 84px;
  min-height: 38px;
  text-align: center;
}

.class-order-form .form-actions {
  margin-top: 12px;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.scope-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scope-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.status-label {
  display: inline-block;
  padding: 4px 8px;
  background: #eceeeb;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
}

.status-label.active {
  color: #0e644f;
  background: #e4f2ec;
}

.attribute-labels { display: flex; flex-wrap: wrap; gap: .35rem; }
.attribute-labels .status-label { margin: 0; }
.attribute-labels .pendatang { background: #e7f2ea; color: #1e6037; }
.attribute-fieldset { margin: 0; }
.attribute-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.attribute-options .checkbox-row { align-self: auto; min-height: 44px; padding: 10px; border: 1px solid var(--line); }
.attribute-options small { display: block; color: var(--muted); }
.participant-attributes-form { margin-top: var(--space-4); }
.bulk-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
.bulk-toolbar select {
  flex: 0 1 360px;
  width: min(360px, 100%);
  min-width: 0;
}
.bulk-toolbar > label:not(.sr-only),
.form-grid .checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bulk-toolbar > label:not(.sr-only) {
  flex: 0 0 auto;
  white-space: nowrap;
}

input[type="checkbox"],
input[type="radio"] {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--green);
}

.form-grid .checkbox-row {
  align-self: end;
  min-height: 44px;
}

.form-grid .checkbox-row > span {
  display: grid;
  gap: 2px;
}

.form-grid .checkbox-row small {
  color: var(--muted);
}

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

.text-link {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover,
.text-link:focus-visible {
  text-decoration: underline;
}

.form-links {
  margin: var(--space-4) 0 0;
}

.dashboard-caption {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.section-label {
  margin: 32px 0 12px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

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

.kpi-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: var(--space-4);
}

.kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.kpi-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.kpi-value {
  margin: 0;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -.02em;
}

.kpi-value small {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  margin-left: 4px;
}

.kpi-sub {
  margin: var(--space-2) 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.kpi-sub strong {
  color: var(--ink);
}

.status-label.warn {
  color: #8a4b28;
  background: #f8e9df;
}

.notice-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: #fbf3df;
  border: 1px solid #e8d9ab;
  border-radius: 8px;
}

.notice-banner-left {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.notice-banner-icon {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--gold);
  color: white;
  font-weight: 900;
  font-size: 13px;
}

.notice-banner-body strong {
  display: block;
  font-size: 13px;
}

.notice-banner-body span {
  display: block;
  margin-top: 3px;
  color: #7d694f;
  font-size: 12px;
  line-height: 1.5;
}

.notice-banner-meta {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.notice-banner-meta strong {
  color: #8a4b28;
  font-size: 16px;
  margin-right: 3px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: var(--space-3);
  align-items: stretch;
}

.chart-panel h2 {
  margin: 0;
  font-size: 15px;
}

.panel-caption {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-panel {
  display: flex;
  flex-direction: column;
}

.dashboard-panel-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.chart-progress {
  height: 240px;
}

.chart-compare {
  height: 340px;
}

.chart-legend {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: var(--space-2);
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chart-legend .dot.green {
  background: var(--green);
}

.chart-legend .dot.gold {
  background: var(--gold);
}

.chart-legend .dot.gray {
  background: var(--line);
}

.chart-legend .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.class-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}

.class-tab {
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.class-tab:hover {
  border-color: #b9cdc3;
  color: var(--ink);
}

.class-tab.active {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: white;
}

.class-summary {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: var(--space-4);
}

.class-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.class-title-row h2 {
  margin: 0;
  font-size: 20px;
}

.class-title-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.data-status {
  font-size: 11px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f8e9df;
  color: #8a4b28;
  white-space: nowrap;
}

.data-status.complete {
  background: #e4f2ec;
  color: #0e644f;
}

.detail-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.detail-kpi {
  background: #f7f9f8;
  border: 1px solid #edf1ef;
  border-radius: 8px;
  padding: var(--space-3);
}

.detail-kpi span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 5px;
}

.detail-kpi b {
  font-size: 19px;
  font-weight: 900;
}

.detail-kpi b small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  margin-left: 3px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-3);
}

.detail-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: var(--space-3);
  min-width: 0;
}

.detail-box h3 {
  margin: 0;
  font-size: 13px;
}

.detail-box p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11.5px;
}

.detail-chart {
  height: 210px;
}

body,
button,
input,
select,
textarea,
h1,
h2,
h3,
.brand-mark,
.stats strong,
.event-row time strong,
.date-tile strong,
.revealed-contact {
  font-family: "Roboto", sans-serif;
}

@media (max-width: 760px) {
  .menu-toggle {
    display: grid;
    gap: 4px;
    width: 40px;
    height: 40px;
    padding: 10px 8px;
    margin-left: auto;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .menu-toggle span {
    display: block;
    height: 2px;
    background: white;
    border-radius: 1px;
    transition: transform 160ms ease, opacity 160ms ease;
  }

  .nav-open .menu-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .nav-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .nav-open .menu-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .topbar > form {
    margin-left: 0;
  }

  .topbar nav {
    position: fixed;
    z-index: 41;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: min(84vw, 320px);
    padding: 18px;
    background: var(--green-dark);
    box-shadow: -18px 0 45px rgba(8, 27, 21, .25);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 180ms ease, visibility 180ms;
  }

  .topbar nav a {
    padding: 13px 12px;
    font-size: 16px;
  }

  .nav-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 4px 8px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .16);
  }

  .nav-close {
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    color: white;
    font-size: 28px;
    cursor: pointer;
  }

  .nav-backdrop {
    position: fixed;
    z-index: 40;
    inset: 0;
    border: 0;
    background: rgba(8, 27, 21, .55);
  }

  .nav-open {
    overflow: hidden;
  }

  .nav-open .topbar nav {
    transform: translateX(0);
    visibility: visible;
  }

  .nav-open .nav-backdrop {
    display: block;
  }

  .session-fields {
    grid-template-columns: 1fr;
  }

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

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

  .roster-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .officer-date-filter {
    width: 100%;
  }

  .officer-date-filter label,
  .officer-date-filter input {
    width: 100%;
  }

  .officer-session .section-heading {
    gap: 8px;
  }

  .roster-tools {
    grid-template-columns: 1fr;
  }

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

  .roster-submit {
    align-items: stretch;
    flex-direction: column;
  }

  .roster-submit .button {
    width: 100%;
  }

  .split-layout {
    grid-template-columns: 1fr;
  }

  .form-section {
    padding: var(--space-4);
  }

  .settings-section {
    padding: var(--space-4);
  }

  .toolbar-form,
  .place-form,
  .officer-form {
    grid-template-columns: 1fr;
  }

  .toolbar-form .button {
    width: 100%;
  }

  .toolbar-form {
    padding: var(--space-3);
  }

  .settings-table {
    min-width: 0;
  }

  .report-table-wrap {
    margin-right: calc(var(--space-4) * -1);
  }

  .chart-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented-control,
  .chart-toolbar label {
    width: 100%;
  }

  .segmented-control button {
    flex: 1;
  }

  .report-table th:first-child,
  .report-table .report-date {
    position: sticky;
    left: 0;
    z-index: 1;
    background: white;
    box-shadow: 1px 0 var(--line);
  }

  .report-table th:first-child {
    z-index: 2;
    background: #f7f8f5;
  }

  .settings-table th:nth-child(2),
  .settings-table td:nth-child(2) {
    display: none;
  }

  .settings-table th,
  .settings-table td {
    padding: 12px 10px;
  }

  .schedule-page {
    padding-top: 28px;
  }

  .period-nav {
    display: grid;
    grid-template-columns: auto 1fr auto;
  }

  .period-picker,
  .period-picker input {
    width: 100%;
  }

  .participant-group-heading {
    flex-wrap: wrap;
  }

  .participant-group-heading h2 {
    flex: 1;
  }

  .participant-group-toggle {
    min-width: auto;
  }

  .participant-counts {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-end;
    width: 100%;
    margin-left: 0;
    gap: 4px;
  }

  .participant-counts .participant-count {
    flex: 1 1 0;
    min-width: 0;
    padding: 7px 4px;
    font-size: 14px;
  }

  .participant-counts .participant-count span {
    font-size: 10px;
  }

  .compact-events .event-row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px 10px;
  }

  .compact-events .event-row time {
    min-height: 44px;
  }

  .compact-events .event-main {
    grid-column: 2;
  }

  .compact-events .event-actions {
    grid-column: 3;
    grid-row: 1;
  }

  .compact-events .series-dates {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-top: 0;
  }

  .compact-events .attendance-links {
    grid-column: 1 / -1;
  }

  .attendance-link-row {
    align-items: stretch;
    flex-direction: column;
  }

  .attendance-link-actions .button {
    flex: 1 1 0;
    text-align: center;
  }

  .compact-events .button.small {
    padding: 6px 8px;
  }

  .kpi-grid,
  .detail-kpis,
  .detail-grid {
    grid-template-columns: 1fr;
  }

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

  .notice-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .chart-compare {
    height: 320px;
  }
}