@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Newsreader:opsz,wght@6..72,600;6..72,700&display=swap");

:root {
  --ink: #17322f;
  --ink-soft: #536764;
  --forest: #173f3a;
  --forest-2: #245c53;
  --coral: #e76f51;
  --coral-soft: #ffe2d8;
  --gold: #e9b85c;
  --cream: #f7f2e8;
  --cream-2: #fffaf2;
  --paper: #ffffff;
  --line: #dedbd1;
  --line-strong: #c8c5ba;
  --success: #277a58;
  --success-soft: #e4f4eb;
  --warning: #9a5c12;
  --warning-soft: #fff1d7;
  --danger: #a13a38;
  --danger-soft: #fae6e4;
  --shadow-sm: 0 1px 2px rgba(23, 50, 47, 0.06);
  --shadow: 0 14px 35px rgba(23, 50, 47, 0.1);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --sidebar: 248px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--cream);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 92% 4%, rgba(231, 111, 81, 0.13), transparent 28rem),
    var(--cream);
}

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

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

button {
  color: inherit;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -100px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--paper);
  color: var(--forest);
  box-shadow: var(--shadow);
}

.skip-link:focus {
  top: 12px;
}

.loading-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  color: var(--ink-soft);
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px 4px 14px 4px;
  background: var(--forest);
  color: white;
  font-family: "Newsreader", Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  transform: rotate(-3deg);
}

.brand-mark.small {
  width: 38px;
  height: 38px;
  border-radius: 12px 4px 12px 4px;
  font-size: 23px;
}

.demo-banner {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 16px;
  background: var(--warning-soft);
  border-bottom: 1px solid #efd7aa;
  color: #714411;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  background: var(--forest);
  color: #f7f2e8;
}

.sidebar-brand,
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.sidebar-brand strong,
.topbar-brand strong {
  display: block;
  font-family: "Newsreader", Georgia, serif;
  font-size: 18px;
  line-height: 1.05;
}

.sidebar-brand span,
.topbar-brand span {
  color: rgba(255,255,255,.68);
  font-size: 11px;
}

.sidebar .brand-mark,
.topbar .brand-mark {
  background: var(--coral);
}

.nav-list {
  display: grid;
  flex: 1;
  align-content: start;
  gap: 6px;
  min-height: 0;
  margin: 38px 0 16px;
  padding-right: 2px;
  overflow-y: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 14px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: rgba(255, 255, 255, 0.73);
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.nav-link-copy {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.nav-badge {
  display: inline-grid;
  flex: 0 0 auto;
  min-width: 22px;
  height: 22px;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
}

.nav-link svg,
.mobile-nav svg,
.icon-button svg,
.button svg,
.stat-icon svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.sidebar-footer {
  margin-top: auto;
  min-width: 0;
  padding: 16px 12px 0;
  border-top: 1px solid rgba(255,255,255,.14);
  overflow: hidden;
}

.user-mini {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.user-mini-copy {
  min-width: 0;
  overflow: hidden;
}

.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--coral-soft);
  color: var(--danger);
  font-weight: 800;
  text-transform: uppercase;
}

.user-mini strong,
.user-mini span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-mini strong {
  font-size: 13px;
}

.user-mini span {
  margin-top: 2px;
  color: rgba(255,255,255,.6);
  font-size: 11px;
}

.sidebar-footer .text-button {
  margin-top: 13px;
  color: rgba(255,255,255,.72);
}

.main-column {
  min-height: 100vh;
  margin-left: var(--sidebar);
  padding-bottom: 40px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 24;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 76px;
  padding: 12px 4vw;
  border-bottom: 1px solid rgba(200, 197, 186, 0.7);
  background: rgba(247, 242, 232, 0.92);
  backdrop-filter: blur(14px);
}

.topbar-brand {
  display: none;
}

.topbar-title {
  font-family: "Newsreader", Georgia, serif;
  font-size: 23px;
}

.page {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 38px 0 60px;
}

.page.narrow {
  width: min(780px, calc(100% - 40px));
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  color: var(--ink);
}

h1,
.display-title {
  margin-bottom: 8px;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(34px, 4vw, 52px);
  line-height: .98;
  letter-spacing: -.025em;
}

h2 {
  margin-bottom: 6px;
  font-family: "Newsreader", Georgia, serif;
  font-size: 25px;
  line-height: 1.1;
}

h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

.lede,
.muted {
  color: var(--ink-soft);
}

.lede {
  max-width: 660px;
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.65;
}

.muted {
  font-size: 13px;
  line-height: 1.55;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button,
.icon-button,
.text-button {
  border: 0;
  cursor: pointer;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  min-height: 45px;
  padding: 0 18px;
  border-radius: 13px;
  background: var(--forest);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  line-height: 1;
}

.button:hover {
  background: var(--forest-2);
}

.button:focus-visible,
.nav-link:focus-visible,
.icon-button:focus-visible,
.text-button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.class-choice:focus-within,
.class-group-choice:focus-within,
.class-request-option:focus-within {
  outline: 3px solid rgba(231, 111, 81, .28);
  outline-offset: 2px;
}

.button.secondary {
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
}

.button.secondary:hover {
  background: var(--cream-2);
}

.button.coral {
  background: var(--coral);
}

.button.danger {
  background: var(--danger);
}

.button.small {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 10px;
  font-size: 13px;
}

.button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.text-button {
  padding: 0;
  background: transparent;
  color: var(--forest-2);
  font-weight: 700;
  line-height: 1.35;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

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

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

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

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}

.card-pad {
  padding: 20px;
}

.welcome-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.4fr .6fr;
  gap: 20px;
  align-items: center;
  padding: clamp(24px, 4vw, 42px);
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--forest);
  color: white;
}

.welcome-card::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -38px;
  width: 210px;
  height: 210px;
  border: 36px solid rgba(255,255,255,.08);
  border-radius: 50%;
}

.welcome-card h1,
.welcome-card .lede {
  color: white;
}

.welcome-card .lede {
  color: rgba(255,255,255,.73);
}

.welcome-art {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 74px);
  justify-content: center;
  gap: 12px;
  transform: rotate(-5deg);
}

.art-tile {
  aspect-ratio: 1;
  border-radius: 22px 6px 22px 6px;
  background: var(--coral);
}

.art-tile:nth-child(2) {
  border-radius: 50%;
  background: var(--gold);
}

.art-tile:nth-child(3) {
  border-radius: 50% 8px 8px 50%;
  background: #a9d2c8;
}

.art-tile:nth-child(4) {
  border: 13px solid var(--coral-soft);
  background: transparent;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  border-radius: 13px;
  background: var(--coral-soft);
  color: var(--coral);
}

.stat-value {
  display: block;
  font-family: "Newsreader", Georgia, serif;
  font-size: 28px;
  line-height: 1;
}

.stat-label {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 30px 0 13px;
}

.section-heading h2 {
  margin: 0;
}

.child-card {
  padding: 20px;
}

.child-class-list {
  margin-top: 15px;
}

.child-card-actions {
  margin-top: 18px;
}

.enrollment-chip {
  min-height: 34px;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  white-space: normal;
  line-height: 1.25;
  padding: 7px 11px;
}

.enrollment-chip small {
  color: var(--ink-soft);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.child-head,
.submission-head,
.family-head,
.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.row-between > svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.quick-action-card {
  min-height: 96px;
  padding: 18px 20px;
  color: inherit;
  text-decoration: none;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.quick-action-card:hover {
  border-color: #aebbb7;
  box-shadow: 0 8px 22px rgba(23, 50, 47, .08);
  transform: translateY(-1px);
}

.quick-action-card h3 {
  margin-bottom: 4px;
}

.child-person {
  display: flex;
  align-items: center;
  gap: 12px;
}

.child-person .avatar {
  width: 44px;
  height: 44px;
  background: #deeee9;
  color: var(--forest-2);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #edf3f1;
  color: var(--forest-2);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-list,
.submission-list,
.family-list {
  display: grid;
  gap: 12px;
}

.schedule-calendar {
  overflow: hidden;
}

.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--cream-2);
}

.calendar-toolbar strong {
  display: block;
  margin-top: 4px;
}

.calendar-prev svg {
  transform: rotate(180deg);
}

.calendar-scroll {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scrollbar-color: var(--line-strong) transparent;
}

.calendar-grid {
  min-width: 980px;
  display: grid;
  grid-template-columns: repeat(7, minmax(140px, 1fr));
}

.calendar-day {
  min-width: 0;
  min-height: 250px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, .62);
  scroll-snap-align: start;
}

.calendar-day:last-child {
  border-right: 0;
}

.calendar-day > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 50px;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.calendar-day > header strong {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  color: var(--ink);
  font-size: 13px;
}

.calendar-day.today > header {
  color: var(--coral);
}

.calendar-day.today > header strong {
  background: var(--coral);
  color: white;
}

.calendar-day-events {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 8px;
}

.calendar-event {
  width: 100%;
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid #cfe1dc;
  border-left: 4px solid var(--forest-2);
  border-radius: 10px;
  background: #f0f7f5;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.calendar-event:hover,
.calendar-event:focus-visible {
  border-color: var(--forest-2);
  background: #e8f3f0;
  outline: none;
}

.calendar-event-time {
  color: var(--forest-2);
  font-size: 10px;
  font-weight: 800;
}

.calendar-event strong {
  font-size: 12px;
  line-height: 1.3;
}

.calendar-event > span:not(.calendar-event-time):not(.calendar-event-status) {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event-status {
  width: max-content;
  margin-top: 3px;
  color: var(--warning);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.calendar-empty-day {
  padding: 11px 4px;
  color: #8c9996;
  font-size: 10px;
  text-align: center;
}

.calendar-unscheduled {
  display: grid;
  gap: 10px;
  padding: 15px 20px 19px;
  border-top: 1px solid var(--line);
  background: var(--cream-2);
  font-size: 12px;
}

.chip-button {
  border: 0;
  cursor: pointer;
}

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

.detail-list > div {
  min-width: 0;
}

.detail-list strong {
  display: block;
  margin-top: 5px;
  line-height: 1.4;
}

.compact-modal {
  width: min(560px, 100%);
}

.schedule-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.day-box {
  padding: 7px 4px;
  border-radius: 10px;
  background: var(--cream);
  color: var(--forest);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 11px;
  font-weight: 800;
  text-transform: capitalize;
  line-height: 1;
  white-space: nowrap;
}

.status.approved,
.status.active,
.status.complete {
  background: var(--success-soft);
  color: var(--success);
}

.status.declined,
.status.inactive {
  background: var(--danger-soft);
  color: var(--danger);
}

.status.waitlisted {
  background: #e7ecfb;
  color: #405a98;
}

.status.announcement {
  background: #e7ecfb;
  color: #405a98;
}

.status.withdrawn,
.status.unavailable {
  background: #eceeeb;
  color: #65716e;
}

.participant-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.participant-selector-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .76);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.participant-selector-card:hover,
.participant-selector-card.active {
  border-color: var(--forest-2);
  background: #eef6f3;
  box-shadow: inset 0 0 0 1px var(--forest-2);
}

.participant-selector-card .avatar {
  width: 40px;
  height: 40px;
}

.participant-selector-card strong,
.participant-selector-card small {
  display: block;
  min-width: 0;
}

.participant-selector-card small {
  margin-top: 3px;
  color: var(--ink-soft);
  text-transform: capitalize;
}

.enrollment-workspace {
  margin-top: 32px;
}

.enrollment-student-heading {
  margin-top: 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.enrollment-student-heading p {
  margin: 4px 0 0;
}

.notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 12px;
  margin: 14px 0;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  font-size: 13px;
}

.notice span {
  color: var(--ink-soft);
}

.notice .text-button {
  margin-left: auto;
}

.notice.success {
  border-color: #b8ddca;
  background: var(--success-soft);
}

.notice.warning {
  border-color: #ead2a5;
  background: var(--warning-soft);
}

.enrollment-history-list,
.profile-history {
  display: grid;
  gap: 9px;
}

.enrollment-history-card,
.profile-history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 14px 16px;
}

.enrollment-history-card > div:first-child,
.profile-history-row > div,
.profile-history-row > span:first-child {
  min-width: 0;
}

.enrollment-history-card strong,
.enrollment-history-card > div:first-child > span,
.profile-history-row strong,
.profile-history-row small {
  display: block;
}

.enrollment-history-card > div:first-child > span,
.profile-history-row small {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.4;
}

.enrollment-history-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}

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

.class-request-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
}

.class-request-card h3 {
  margin: 3px 0 12px;
}

.class-request-options {
  display: grid;
  gap: 8px;
}

.class-request-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--cream-2);
  cursor: pointer;
}

.class-request-option:hover,
.class-request-option.selected,
.class-request-option:has(input:checked) {
  border-color: var(--forest-2);
  background: #edf5f2;
}

.class-request-option.blocked {
  opacity: .66;
  cursor: not-allowed;
}

.class-request-option input {
  width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--forest-2);
}

.class-request-option > span,
.class-request-option strong,
.class-request-option small {
  display: block;
  min-width: 0;
}

.class-request-option small {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.4;
}

.class-request-option .status {
  width: fit-content;
  margin-top: 7px;
}

.disabled-requests {
  opacity: .65;
  pointer-events: none;
}

.compact-empty {
  padding-block: 22px;
}

.empty-state {
  padding: 36px 22px;
  text-align: center;
}

.empty-state .empty-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 15px;
  background: var(--coral-soft);
  color: var(--coral);
}

.empty-state .empty-icon svg {
  display: block;
  width: 24px;
  height: 24px;
}

.empty-state h3 {
  margin: 0;
}

.empty-state > p {
  max-width: 38ch;
  margin: 8px auto 18px;
}

.form-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-bottom: 22px;
}

.progress-segment {
  height: 5px;
  border-radius: 999px;
  background: var(--line);
}

.progress-segment.active {
  background: var(--coral);
}

.form-card {
  padding: clamp(21px, 5vw, 36px);
}

.form-section {
  display: none;
}

.form-section.active {
  display: block;
  animation: rise .22s ease-out;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

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

.participant-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
  border: 0;
}

.participant-choice legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.participant-choice-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--paper);
  cursor: pointer;
}

.participant-choice-card:has(input:checked) {
  border-color: var(--forest-2);
  background: #edf5f2;
  box-shadow: inset 0 0 0 1px var(--forest-2);
}

.participant-choice-card input {
  width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  padding: 0;
  flex: 0 0 18px;
  accent-color: var(--forest-2);
}

.participant-choice-card span,
.participant-choice-card strong,
.participant-choice-card small {
  display: block;
  min-width: 0;
}

.participant-choice-card small {
  margin-top: 4px;
  color: var(--ink-soft);
  line-height: 1.45;
}

.self-participant-summary {
  padding: 14px 15px;
  border-radius: 13px;
  background: var(--cream-2);
}

.self-participant-summary strong,
.self-participant-summary small {
  display: block;
}

.self-participant-summary strong {
  margin-top: 5px;
}

.self-participant-summary small {
  margin-top: 3px;
}

.field label,
.field-label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.required {
  color: var(--coral);
}

.field small {
  color: var(--ink-soft);
  font-size: 11px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--paper);
  color: var(--ink);
}

select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='m1 1 6 6 6-6' fill='none' stroke='%2317322f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 12px 7px;
}

select::-ms-expand {
  display: none;
}

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

input::placeholder,
textarea::placeholder {
  color: #8b9895;
}

.password-input {
  position: relative;
}

.password-input input {
  padding-right: 70px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  min-width: 52px;
  min-height: 34px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--forest-2);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle:hover {
  background: #edf3f1;
}

.password-toggle:focus-visible {
  outline: 3px solid rgba(231, 111, 81, .28);
  outline-offset: 1px;
}

.account-email {
  min-width: 0;
  overflow-wrap: anywhere;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.submission-actions,
.table-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.submission-actions {
  margin-top: 16px;
}

.submission-actions > :first-child {
  margin-right: auto;
}

.submission-details > div {
  min-width: 0;
}

.submission-details p {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
}

.submission-details .full-detail {
  grid-column: 1 / -1;
}

.submission-modal-actions {
  align-items: center;
}

.long-value,
.family-contact {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.typed-delete-modal .field {
  margin-top: 18px;
}

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

.class-choice {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 11px;
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
  cursor: pointer;
}

.class-choice:has(input:checked),
.class-choice.selected {
  border-color: var(--forest-2);
  background: #f1f7f5;
  box-shadow: inset 0 0 0 1px var(--forest-2);
}

.class-choice input {
  width: 19px;
  min-height: 19px;
  margin: 1px 0 0;
  padding: 0;
  flex: 0 0 19px;
  accent-color: var(--forest);
}

.class-choice-copy {
  display: block;
  min-width: 0;
}

.class-choice-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.class-choice-heading strong {
  font-size: 14px;
}

.offering-level {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: max-content;
  max-width: 180px;
  min-height: 27px;
  margin: 0;
  padding: 5px 10px;
  border: 1px solid rgba(23, 63, 58, .12);
  border-radius: 999px;
  background: #e7f2ee;
  color: var(--forest-2);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: anywhere;
}

.offering-level.neutral {
  border-color: var(--line);
  background: var(--cream-2);
  color: var(--ink-soft);
}

.class-choice .offering-period,
.class-choice .offering-schedule {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.4;
}

.class-choice .offering-period {
  color: var(--forest-2);
  font-weight: 700;
}

.class-grid-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: var(--cream-2);
}

.registration-categories {
  display: grid;
  gap: 24px;
  margin-top: 24px;
}

.registration-category {
  display: grid;
  gap: 10px;
}

.registration-category-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 2px;
}

.registration-category-heading span {
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.registration-category-heading small {
  color: var(--ink-soft);
  font-size: 11px;
}

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

.class-group-choice {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
  box-shadow: 0 1px 0 rgba(23, 50, 47, .02);
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.class-group-choice.selected {
  border-color: var(--forest-2);
  background: #f1f7f5;
  box-shadow: inset 0 0 0 1px var(--forest-2);
}

.class-group-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.class-group-heading h3 {
  margin: 3px 0 0;
  font-size: 17px;
  line-height: 1.25;
}

.offering-count {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--cream-2);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
}

.class-group-choice.selected .offering-count {
  background: #dceee8;
  color: var(--forest-2);
}

.class-offering-checklist {
  display: grid;
  gap: 8px;
}

.class-group-help {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.4;
}

.waiver-box {
  max-height: 330px;
  overflow-y: auto;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--cream-2);
  font-size: 12px;
  line-height: 1.65;
}

.waiver-box h3 {
  font-size: 14px;
  text-align: center;
}

.waiver-section-title {
  margin: 24px 0 10px;
  color: var(--forest);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.35;
}

.waiver-box h3 + .waiver-section-title {
  margin-top: 18px;
}

.waiver-subheading {
  margin: 18px 0 8px;
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  line-height: 1.4;
}

.waiver-list {
  display: grid;
  gap: 7px;
  margin: 8px 0 14px;
  padding-left: 22px;
}

.waiver-emphasis,
.waiver-acknowledgement {
  padding: 11px 12px;
  border-left: 3px solid var(--forest-2);
  background: rgba(23, 63, 58, .05);
}

.waiver-certification {
  font-weight: 800;
  letter-spacing: .035em;
}

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

.signature-block {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.signature-pad {
  position: relative;
  overflow: hidden;
  height: 150px;
  margin: 11px 0;
  border: 1px dashed #a6aaa1;
  border-radius: 11px;
  background:
    linear-gradient(to bottom, transparent 78%, #dde0d7 79%, transparent 80%),
    #fff;
  touch-action: none;
}

.signature-pad canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.signature-hint {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #9aa39f;
  font-size: 13px;
  pointer-events: none;
}

.signature-pad.has-ink .signature-hint {
  display: none;
}

.signature-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.signature-actions .text-button:disabled {
  color: var(--ink-soft);
  opacity: .45;
  cursor: not-allowed;
}

.signature-preview {
  width: 100%;
  height: 112px;
  display: block;
  margin-top: 8px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.check-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 9px;
  align-items: start;
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.5;
}

.check-row input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  display: grid;
  place-content: center;
  width: 20px;
  height: 20px;
  min-height: 20px;
  padding: 0;
  margin: 1px 0 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 6px;
  background: var(--paper);
  cursor: pointer;
}

.check-row input[type="checkbox"]::before {
  content: "";
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg) scale(0);
  transform-origin: center;
  transition: transform .12s ease;
}

.check-row input[type="checkbox"]:checked {
  border-color: var(--forest);
  background: var(--forest);
}

.check-row input[type="checkbox"]:checked::before {
  transform: translateY(-1px) rotate(45deg) scale(1);
}

.form-section[data-step="4"] > .check-row {
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--cream-2);
}

.form-actions .button[type="submit"] svg {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.offering-open-row {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--cream-2);
}

.class-status-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  margin: 16px 0 14px;
  padding: 0;
}

.class-status-legend-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 16px;
}

.class-status-legend-item + .class-status-legend-item {
  border-left: 1px solid var(--line);
}

.class-status-legend-item .status,
.legend-delete-label {
  justify-self: start;
}

.legend-delete-label {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 10px;
  font-weight: 800;
}

.class-status-legend-item p {
  display: grid;
  gap: 3px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.45;
}

.class-status-legend-item p strong {
  color: var(--ink);
}

.class-status-legend-item p span {
  display: block;
}

.class-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 12px;
  min-width: 150px;
}

.class-offering-groups {
  display: grid;
  gap: 18px;
}

.class-offering-group {
  overflow: hidden;
  padding: 0;
}

.class-offering-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--cream-2);
}

.class-offering-group-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.class-offering-group-title h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
}

.class-group-category {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
}

.class-offering-group-header p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.class-offering-group-controls,
.group-counts {
  display: flex;
  align-items: center;
  gap: 8px;
}

.class-offering-group-controls {
  flex: 0 0 auto;
}

.group-count {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.group-count.open {
  background: #e4f3ec;
  color: #177a51;
}

.group-count.archived {
  background: var(--danger-soft);
  color: var(--danger);
}

.class-offering-group .table-wrap {
  overflow-x: auto;
}

.class-offering-group table {
  min-width: 780px;
}

.class-offering-group th:first-child,
.class-offering-group td:first-child {
  width: 190px;
}

.class-offering-group tbody tr:last-child td {
  border-bottom: 0;
}

.danger-text {
  color: var(--danger);
}

.class-editor-actions {
  align-items: flex-end;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
}

.auth-art {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(32px, 6vw, 72px);
  background: var(--forest);
  color: white;
}

.auth-art h1 {
  max-width: 620px;
  color: white;
  font-size: clamp(48px, 6vw, 82px);
}

.auth-art p {
  max-width: 540px;
  color: rgba(255,255,255,.7);
  font-size: 17px;
  line-height: 1.7;
}

.auth-shapes {
  position: absolute;
  right: -30px;
  bottom: 36px;
  width: 290px;
  height: 290px;
  border: 65px solid rgba(231,111,81,.82);
  border-radius: 50%;
}

.auth-shapes::after {
  content: "";
  position: absolute;
  left: -160px;
  top: 70px;
  width: 105px;
  height: 105px;
  border-radius: 26px 7px 26px 7px;
  background: var(--gold);
  transform: rotate(15deg);
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 36px;
  background: var(--cream);
}

.auth-card {
  width: min(430px, 100%);
  padding: 34px;
}

.auth-card h2 {
  font-size: 34px;
}

.auth-card .field {
  margin-top: 15px;
}

.auth-card .button {
  width: 100%;
  margin-top: 20px;
}

.auth-card [data-action="forgot"] {
  display: block;
  margin: 13px auto 0;
  text-align: center;
}

.auth-switch {
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  text-align: center;
}

.demo-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.demo-actions p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  text-align: center;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  align-items: center;
}

.toolbar-summary {
  min-height: 30px;
  padding: 0 11px;
  align-self: center;
}

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

.inbox-summary-card {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--shadow-sm);
}

.inbox-summary-card strong {
  color: var(--forest);
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(29px, 4vw, 38px);
  line-height: 1;
}

.inbox-summary-card span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.inbox-list {
  display: grid;
  gap: 11px;
}

.inbox-alert {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  min-width: 0;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--forest-2);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.inbox-alert.urgent {
  border-left-color: var(--danger);
}

.inbox-alert.warning {
  border-left-color: var(--warning);
}

.inbox-alert.info {
  border-left-color: var(--forest-2);
}

.inbox-alert-icon,
.inbox-clear-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 13px;
  background: var(--success-soft);
  color: var(--forest-2);
}

.inbox-alert.urgent .inbox-alert-icon {
  background: var(--danger-soft);
  color: var(--danger);
}

.inbox-alert.warning .inbox-alert-icon {
  background: var(--warning-soft);
  color: var(--warning);
}

.inbox-alert-icon svg,
.inbox-clear-icon svg {
  width: 21px;
  height: 21px;
}

.inbox-alert-copy {
  min-width: 0;
}

.inbox-alert-title {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.inbox-alert-title h2 {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.35;
}

.inbox-alert-count {
  display: inline-grid;
  flex: 0 0 auto;
  min-width: 24px;
  height: 24px;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.inbox-alert-copy > p {
  margin: 3px 0 9px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.inbox-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.inbox-preview-chip,
.inbox-preview-more {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 25px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf3f0;
  color: var(--forest);
  font-size: 10px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.inbox-preview-more {
  background: var(--cream);
  color: var(--ink-soft);
}

.inbox-review-button {
  min-width: 146px;
  white-space: nowrap;
}

.inbox-clear {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 24px;
}

.inbox-clear h2,
.inbox-clear p {
  margin: 0;
}

.inbox-clear p {
  margin-top: 3px;
}

.parent-inbox-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 620px;
}

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

.family-message-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 16px 18px;
  border-left: 4px solid transparent;
}

.family-message-card.unread {
  border-left-color: var(--coral);
  background: #fffdf9;
}

.family-message-indicator {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: var(--success-soft);
  color: var(--forest-2);
}

.family-message-card.unread .family-message-indicator {
  background: var(--coral-soft);
  color: var(--danger);
}

.family-message-indicator svg {
  width: 20px;
  height: 20px;
}

.family-message-copy {
  min-width: 0;
}

.family-message-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.family-message-heading h2 {
  min-width: 0;
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 11px;
}

.message-meta span + span::before {
  content: "•";
  margin-right: 12px;
  color: var(--line-strong);
}

.family-message-copy > p {
  display: -webkit-box;
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.family-message-open {
  min-width: 106px;
  white-space: nowrap;
}

.parent-submission-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.parent-submission-name h3 {
  margin: 0;
}

.admin-sent-section {
  margin-top: 34px;
}

.admin-sent-section .section-heading {
  align-items: end;
}

.admin-sent-section .section-heading p {
  margin: 4px 0 0;
}

.parent-message-body {
  margin-top: 18px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--cream-2);
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.admin-message-composer > .muted {
  margin: -5px 0 16px;
}

.admin-message-composer textarea {
  min-height: 150px;
  resize: vertical;
}

.announcement-recipient-summary {
  align-items: flex-start;
  flex-direction: column;
  margin: 0 0 18px;
}

.announcement-confirm {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--cream-2);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  cursor: pointer;
}

.announcement-confirm input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--forest-2);
}

.announcement-progress {
  height: 8px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6e8e4;
}

.announcement-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--success);
}

.announcement-read-copy {
  margin: 7px 0 0;
  font-size: 11px;
}

.admin-filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  align-items: end;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, .72);
}

.enrollment-filters {
  grid-template-columns: minmax(210px, 1.4fr) repeat(5, minmax(120px, .8fr)) auto;
}

.submission-filters {
  grid-template-columns: minmax(240px, 1.6fr) repeat(3, minmax(135px, .8fr)) auto;
}

.enrollment-filters .admin-search-filter,
.submission-filters .admin-search-filter {
  grid-column: auto;
}

.search-box.admin-search-filter {
  grid-column: span 2;
  width: 100%;
  min-width: 0;
  max-width: none;
}

.admin-filter,
.admin-search-filter {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.admin-filter > span,
.admin-search-filter > span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.admin-filter select,
.admin-search-filter input {
  min-height: 42px;
  padding-top: 9px;
  padding-bottom: 9px;
  font-size: 12px;
}

.filter-clear {
  min-height: 42px;
  white-space: nowrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 430px;
}

.search-box input {
  padding-left: 40px;
}

.search-box svg {
  position: absolute;
  left: 13px;
  top: 13px;
  width: 19px;
  height: 19px;
  color: var(--ink-soft);
}

.search-box.admin-search-filter svg {
  top: auto;
  bottom: 11px;
}

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

.submission-table-wrap table {
  min-width: 790px;
}

.selection-cell {
  width: 44px;
  padding: 12px 7px 12px 13px;
  text-align: center;
}

.selection-checkbox {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  border-radius: 4px;
  accent-color: var(--forest-2);
  cursor: pointer;
}

.submission-row {
  transition: background-color .12s ease, box-shadow .12s ease;
}

.submission-row.selected,
.submission-row.selected:hover {
  background: #eaf3f0;
  box-shadow: inset 3px 0 0 var(--forest-2);
}

.is-row-selecting,
.is-row-selecting * {
  cursor: crosshair !important;
  user-select: none !important;
}

.bulk-action-bar {
  position: sticky;
  top: 82px;
  z-index: 8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.bulk-selection-copy {
  min-width: 0;
}

.bulk-selection-copy strong,
.bulk-selection-copy span {
  display: block;
}

.bulk-selection-copy span {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 11px;
}

.bulk-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.bulk-approve {
  background: var(--success);
}

.bulk-decline {
  border-color: #e5b2ae !important;
  color: var(--danger) !important;
}

.status-select {
  min-width: 128px;
}

.enrollment-table-wrap table {
  min-width: 910px;
}

.enrollment-table-wrap th:nth-child(2),
.enrollment-table-wrap td:nth-child(2) {
  width: 190px;
}

.enrollment-table-wrap th:nth-child(3),
.enrollment-table-wrap td:nth-child(3) {
  width: 230px;
}

.enrollment-table-wrap th:nth-child(4),
.enrollment-table-wrap td:nth-child(4) {
  width: 175px;
}

.enrollment-table-wrap th:nth-child(5),
.enrollment-table-wrap td:nth-child(5) {
  width: 105px;
}

.table-primary {
  display: grid;
  justify-items: start;
  gap: 3px;
  min-width: 0;
}

.table-name-line,
.inline-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.inline-row-actions {
  margin-top: 3px;
}

.inline-table-action {
  min-height: 27px;
  padding: 3px 0;
  font-size: 11px;
}

.status.duplicate {
  border: 1px solid #edb8b1;
  background: #fce5e1;
  color: #8c3129;
}

.filtered-empty-row td {
  padding: 28px 16px;
  color: var(--ink-soft);
  text-align: center;
}

.selectable-row {
  transition: background-color .12s ease, box-shadow .12s ease;
}

.selectable-row.selected,
.selectable-row.selected:hover {
  background: #eaf3f0;
  box-shadow: inset 3px 0 0 var(--forest-2);
}

.enrollment-bulk-buttons {
  max-width: 610px;
}

.class-admin-tabs {
  width: fit-content;
  min-width: min(100%, 360px);
}

.account-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.account-filters {
  grid-template-columns: minmax(260px, 1.6fr) minmax(160px, .7fr) auto;
}

.account-filters .admin-search-filter {
  grid-column: auto;
}

.account-list-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  margin: 18px 2px 10px;
}

.account-list-heading > span {
  text-align: right;
}

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

.account-admin-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 17px 18px;
}

.account-admin-row[hidden] {
  display: none;
}

.account-admin-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--forest-2);
  font-size: 14px;
  font-weight: 800;
}

.account-admin-copy {
  min-width: 0;
}

.account-admin-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.account-admin-heading h2 {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.25;
}

.account-admin-email {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--forest-2);
  font-size: 13px;
}

.account-admin-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 11px;
}

.account-admin-meta span {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
}

.account-admin-meta strong {
  color: var(--ink);
}

.account-admin-actions {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.roster-programs,
.roster-offerings {
  display: grid;
  gap: 12px;
}

.roster-programs {
  gap: 28px;
}

.roster-program-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 11px;
}

.roster-program-heading h2,
.roster-program-heading p {
  margin: 0;
}

.roster-program-heading h2 {
  margin-top: 3px;
}

.roster-offering {
  overflow: hidden;
}

.roster-offering > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  min-height: 76px;
  padding: 14px 18px;
  background: var(--paper);
  cursor: pointer;
  list-style: none;
}

.roster-offering > summary::-webkit-details-marker {
  display: none;
}

.roster-offering[open] > summary {
  border-bottom: 1px solid var(--line);
  background: var(--cream-2);
}

.roster-offering-copy {
  min-width: 0;
}

.roster-offering-copy strong,
.roster-offering-copy span {
  display: block;
}

.roster-offering-copy span {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

.roster-summary-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.roster-chevron {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--forest-2);
  transition: transform .16s ease;
}

.roster-chevron svg {
  width: 18px;
  height: 18px;
}

.roster-offering[open] .roster-chevron {
  transform: rotate(90deg);
}

.roster-table table {
  min-width: 860px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

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

th {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #fbfaf6;
}

.family-card {
  overflow: hidden;
}

.family-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--cream-2);
}

.family-head > :first-child {
  min-width: 0;
}

.family-head-actions {
  flex: 0 0 auto;
}

.sibling-list {
  display: grid;
}

.sibling-row {
  display: grid;
  grid-template-columns: minmax(180px, .85fr) minmax(260px, 1.65fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 74px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}

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

.student-identity {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.student-identity > div {
  min-width: 0;
}

.student-identity strong,
.student-identity .muted {
  display: block;
}

.student-class-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.student-class-chip {
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-height: 40px;
  padding: 7px 11px;
  white-space: normal;
  line-height: 1.3;
}

.student-class-chip small {
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.25;
  text-transform: uppercase;
}

.student-identity-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.student-profile-modal {
  width: min(760px, 100%);
}

.profile-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 18px;
  border-radius: 15px;
  background: var(--cream-2);
}

.profile-summary-grid > div {
  min-width: 0;
}

.profile-summary-grid .field-label,
.profile-summary-grid strong {
  display: block;
}

.profile-summary-grid strong,
.profile-summary-grid p,
.profile-summary-grid .status {
  margin-top: 5px;
}

.profile-summary-grid p {
  margin-bottom: 0;
}

.profile-summary-grid .full-detail {
  grid-column: 1 / -1;
}

.student-family-contacts {
  display: grid;
  gap: 8px;
  margin-top: 7px;
}

.student-family-contact {
  display: grid;
  grid-template-columns: minmax(120px, .8fr) auto minmax(180px, 1.2fr) minmax(120px, .8fr) minmax(120px, .8fr);
  align-items: center;
  gap: 8px 12px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
  font-size: 12px;
}

.student-family-contact strong,
.student-family-contact .status {
  margin-top: 0;
}

.profile-history {
  margin-top: 22px;
}

.profile-history .section-heading {
  margin: 0 0 8px;
}

.profile-history-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.profile-history-button {
  width: 100%;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.profile-history-button:hover {
  border-color: var(--forest-2);
  background: #f4f8f6;
}

.waiver-renewal-modal {
  width: min(800px, 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;
}

.participant-pill {
  flex: 0 0 auto;
  background: var(--coral-soft);
  color: var(--danger);
}

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

.question-list.is-saving {
  pointer-events: none;
  opacity: .72;
}

.question-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) max-content 42px;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 12px 14px;
  transition: border-color .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.question-row.dragging {
  opacity: .48;
  border-color: var(--forest-2);
  box-shadow: var(--shadow);
}

.drag-handle {
  display: grid;
  place-items: center;
  width: 32px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #9aa39f;
  font-size: 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

/* Keeps the row aligned while an older cached app.js is being replaced. */
.question-row:has(> span.drag-handle) {
  grid-template-columns: 32px minmax(0, 1fr) minmax(70px, max-content) max-content 42px;
}

.drag-handle::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  box-shadow:
    0 -7px 0 currentColor,
    0 7px 0 currentColor,
    7px -7px 0 currentColor,
    7px 0 0 currentColor,
    7px 7px 0 currentColor;
  transform: translateX(-3.5px);
}

.drag-handle:hover,
.drag-handle:focus-visible {
  background: var(--cream);
  color: var(--forest-2);
}

.drag-handle:active {
  cursor: grabbing;
}

.question-row .status {
  justify-self: end;
  align-self: center;
  margin: 0;
}

.question-row .button-row {
  justify-content: flex-end;
}

.question-row .icon-button {
  width: 38px;
  height: 38px;
}

.question-row .icon-button svg {
  width: 18px;
  height: 18px;
}

.question-copy {
  min-width: 0;
}

.question-copy > strong {
  display: block;
}

.question-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  margin-top: 3px;
}

.question-meta > span {
  color: var(--ink-soft);
  font-size: 11px;
}

.question-type {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--cream);
  line-height: 1.25;
}

.activity-log-notice {
  margin-bottom: 18px;
}

.activity-summary-grid {
  margin-bottom: 18px;
}

.activity-filters {
  grid-template-columns: minmax(230px, 1.5fr) repeat(5, minmax(112px, .75fr)) auto;
}

.activity-filters .admin-search-filter {
  grid-column: auto;
}

.activity-log-panel {
  overflow: hidden;
}

.activity-log-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
}

.activity-log-panel-head h2,
.activity-log-panel-head p {
  margin: 0;
}

.activity-log-panel-head p {
  margin-top: 4px;
}

.activity-log-head,
.activity-log-row {
  display: grid;
  grid-template-columns: 156px minmax(165px, .85fr) minmax(280px, 1.7fr) minmax(160px, .8fr) auto;
  align-items: center;
  gap: 16px;
}

.activity-log-head {
  padding: 10px 22px;
  border-top: 1px solid var(--line);
  background: var(--cream-2);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.activity-log-row {
  min-width: 0;
  padding: 15px 22px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.activity-log-row:hover {
  background: #fffcf7;
}

.activity-time,
.activity-actor,
.activity-event,
.activity-record {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.activity-time > strong,
.activity-actor > strong,
.activity-event > strong,
.activity-record > strong {
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.4;
}

.activity-time > span,
.activity-actor > span,
.activity-event > span,
.activity-record > span {
  font-size: 10px;
}

.activity-log-row > .button {
  justify-self: end;
  white-space: nowrap;
}

.activity-role,
.activity-operation {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  width: fit-content;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .035em;
  line-height: 1;
  text-transform: uppercase;
}

.activity-role.parent {
  background: var(--success-soft);
  color: var(--success);
}

.activity-role.admin {
  background: var(--coral-soft);
  color: var(--danger);
}

.activity-role.system {
  background: var(--cream);
  color: var(--ink-soft);
}

.activity-operation.insert {
  background: var(--success-soft);
  color: var(--success);
}

.activity-operation.update {
  background: #e5efee;
  color: var(--forest-2);
}

.activity-operation.delete {
  background: var(--danger-soft);
  color: var(--danger);
}

.activity-operation.access {
  background: var(--warning-soft);
  color: var(--warning);
}

.activity-load-more {
  display: flex;
  justify-content: center;
  padding: 18px;
  border-top: 1px solid var(--line);
}

.activity-end {
  margin: 0;
  padding: 16px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.activity-filter-empty {
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.activity-detail-modal {
  width: min(920px, 100%);
}

.activity-detail-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--cream-2);
}

.activity-detail-summary > div,
.activity-related-grid > div {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 4px;
}

.activity-detail-summary .full-detail {
  grid-column: 1 / -1;
}

.activity-detail-summary code,
.activity-id {
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-size: 10px;
}

.activity-related,
.activity-changes,
.activity-snapshots {
  margin-top: 22px;
}

.activity-related h3,
.activity-changes h3,
.activity-snapshots h3 {
  margin: 0 0 10px;
}

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

.activity-related-grid > div {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.activity-change-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.activity-change-row {
  display: grid;
  grid-template-columns: minmax(130px, .7fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  padding: 11px 13px;
  background: var(--paper);
}

.activity-change-row + .activity-change-row {
  border-top: 1px solid var(--line);
}

.activity-change-row > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.activity-change-row span {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.activity-change-row code {
  overflow-wrap: anywhere;
  white-space: normal;
}

.activity-no-changes {
  margin: 0;
}

.activity-snapshot {
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--cream-2);
}

.activity-snapshot summary {
  padding: 11px 13px;
  font-weight: 700;
  cursor: pointer;
}

.activity-snapshot pre {
  max-height: 360px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border-top: 1px solid var(--line);
  background: #152b28;
  color: #f8f3e8;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.65);
}

.tab {
  display: inline-grid;
  place-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.tab.active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 37, 34, .58);
  backdrop-filter: blur(4px);
}

.modal {
  width: min(620px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 24px;
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 24px 80px rgba(17,37,34,.3);
}

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

.modal-header h2 {
  margin: 0;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  display: grid;
  gap: 9px;
  width: min(380px, calc(100vw - 36px));
}

.toast {
  padding: 13px 15px;
  border-radius: 12px;
  background: var(--forest);
  color: white;
  box-shadow: var(--shadow);
  font-size: 13px;
  animation: toast-in .2s ease-out;
}

.toast.error {
  background: var(--danger);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-nav {
  display: none;
}

.hide-mobile {
  display: initial;
}

.admin-inbox-header {
  align-items: flex-start;
  flex-direction: column;
}

.admin-inbox-actions {
  width: 100%;
  flex-wrap: nowrap;
}

.admin-inbox-actions .button {
  flex: 0 0 auto;
}

.registration-start-links {
  align-items: center;
  margin-top: 14px;
}

.family-page {
  display: grid;
  gap: 28px;
}

.family-page > .page-header {
  margin-bottom: 0;
}

.family-name-card,
.join-family-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr);
  align-items: end;
  gap: 24px;
}

.family-name-card h2,
.family-name-card p,
.join-family-card h2,
.join-family-card p {
  margin-bottom: 0;
}

.family-name-actions,
.join-family-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.family-name-actions .field,
.join-family-actions .field {
  margin: 0;
}

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

.family-member-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 16px 18px;
}

.family-member-avatar {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--forest-2);
  font-weight: 800;
}

.family-member-copy,
.family-member-heading,
.member-role-control,
.family-member-actions {
  min-width: 0;
}

.family-member-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.family-member-actions .button {
  white-space: nowrap;
}

.family-member-registration-choice {
  grid-template-columns: minmax(0, 1fr);
}

.family-member-registration-choice .participant-choice-card {
  cursor: default;
}

.family-member-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 3px;
}

.family-member-heading h3 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.member-role-control {
  margin-left: auto;
}

.member-role-control select {
  min-width: 112px;
}

.family-member-copy > .long-value {
  display: block;
  color: var(--ink-soft);
  font-size: 13px;
}

.family-member-copy .chip-row {
  margin-top: 8px;
}

.status.family-role {
  text-transform: capitalize;
}

.status.family-role.owner {
  background: var(--coral-soft);
  color: var(--danger);
}

.status.family-role.parent,
.status.direct {
  background: var(--success-soft);
  color: var(--forest-2);
}

.status.family-role.adult {
  background: #eef0f4;
  color: #4b5563;
}

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

.family-manage-grid .card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 16px;
}

.family-manage-grid .card > p,
.family-manage-grid .card > h2 {
  margin-bottom: 0;
}

.family-manage-grid .card > .button {
  align-self: flex-start;
}

.invite-code-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px dashed var(--forest);
  border-radius: 14px;
  background: var(--success-soft);
}

.invite-code-result strong,
.invite-code-result small {
  display: block;
}

.invite-code-result strong {
  margin: 4px 0;
  font-size: 24px;
  letter-spacing: .14em;
}

.invite-code-result small {
  color: var(--ink-soft);
}

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

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

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

  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-art {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;
  }

  .enrollment-filters,
  .submission-filters,
  .activity-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .enrollment-filters .admin-search-filter,
  .submission-filters .admin-search-filter,
  .activity-filters .admin-search-filter {
    grid-column: span 2;
  }

  .activity-log-head {
    display: none;
  }

  .activity-log-row {
    grid-template-columns: 145px 170px minmax(0, 1fr) auto;
    align-items: start;
  }

  .activity-record {
    grid-column: 3;
  }

  .family-name-card,
  .join-family-card,
  .family-manage-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body {
    background: var(--cream);
  }

  .sidebar {
    display: none;
  }

  .main-column {
    margin-left: 0;
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
  }

  .topbar {
    min-height: 64px;
    padding: 9px 16px;
  }

  .topbar-title {
    display: none;
  }

  .topbar-brand {
    display: flex;
  }

  .topbar-brand strong {
    color: var(--ink);
    font-size: 16px;
  }

  .topbar-brand span {
    color: var(--ink-soft);
  }

  .page,
  .page.narrow {
    width: min(100% - 28px, 700px);
    padding-top: 25px;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
  }

  h1,
  .display-title {
    font-size: 37px;
  }

  .welcome-card {
    grid-template-columns: 1fr;
    padding: 26px 22px;
  }

  .welcome-art {
    position: absolute;
    right: 14px;
    bottom: -20px;
    opacity: .38;
    transform: scale(.7) rotate(-5deg);
  }

  .welcome-card .button-row {
    position: relative;
    z-index: 2;
  }

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

  .stat-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
  }

  .grid.two,
  .grid.three,
  .field-grid,
  .class-grid {
    grid-template-columns: 1fr;
  }

  .schedule-item {
    grid-template-columns: 46px 1fr;
  }

  .schedule-item > :last-child {
    grid-column: 2;
  }

  .calendar-toolbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 15px;
  }

  .calendar-toolbar .button-row {
    width: 100%;
    justify-content: space-between;
  }

  .calendar-scroll {
    scroll-snap-type: x proximity;
  }

  .calendar-grid {
    min-width: 1085px;
    grid-template-columns: repeat(7, minmax(155px, 1fr));
  }

  .calendar-day {
    min-height: 235px;
  }

  .class-status-legend,
  .detail-list {
    grid-template-columns: 1fr;
  }

  .class-status-legend-item + .class-status-legend-item {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .class-group-grid {
    grid-template-columns: 1fr;
  }

  .class-offering-group-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
  }

  .class-offering-group-controls {
    justify-content: space-between;
    width: 100%;
  }

  .class-offering-group table {
    min-width: 720px;
  }

  .mobile-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255,255,255,.96);
    box-shadow: 0 -8px 22px rgba(23,50,47,.07);
    backdrop-filter: blur(14px);
  }

  .mobile-nav.parent-mobile-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .mobile-nav.admin-mobile-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .mobile-nav .nav-link {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 3px;
    min-height: 52px;
    padding: 5px 2px;
    color: var(--ink-soft);
    font-size: 10px;
    text-align: center;
  }

  .mobile-nav .nav-link-copy {
    display: block;
    flex: none;
  }

  .mobile-nav .nav-badge {
    position: absolute;
    top: 2px;
    left: calc(50% + 7px);
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border: 2px solid #fff;
    font-size: 8px;
  }

  .mobile-nav .nav-link.active {
    background: var(--coral-soft);
    color: var(--danger);
  }

  .mobile-nav .nav-link svg {
    width: 21px;
    height: 21px;
  }

  .form-card {
    margin-inline: -2px;
    padding: 22px 18px;
  }

  .card-pad {
    padding: 18px;
  }

  .admin-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
  }

  .activity-log-panel-head {
    align-items: flex-start;
    padding: 17px;
  }

  .activity-log-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px;
    padding: 15px 17px;
  }

  .activity-time {
    grid-column: 1;
  }

  .activity-log-row > .button {
    grid-column: 2;
    grid-row: 1;
  }

  .activity-actor,
  .activity-event,
  .activity-record {
    grid-column: 1 / -1;
  }

  .activity-actor {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .activity-actor .long-value {
    grid-column: 1 / -1;
  }

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

  .activity-change-row {
    grid-template-columns: 1fr;
  }

  .search-box.admin-search-filter {
    grid-column: 1 / -1;
  }

  .inbox-alert {
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 15px;
  }

  .inbox-alert-icon {
    width: 40px;
    height: 40px;
  }

  .inbox-review-button {
    grid-column: 2;
    justify-self: start;
    min-width: 0;
  }

  .family-message-card {
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 15px;
  }

  .family-message-indicator {
    width: 40px;
    height: 40px;
  }

  .family-message-open {
    grid-column: 2;
    justify-self: start;
    min-width: 0;
  }

  .family-head {
    align-items: flex-start;
    flex-direction: column;
    padding: 15px;
  }

  .family-head-actions {
    width: 100%;
    justify-content: space-between;
  }

  .admin-inbox-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-inbox-actions .button:last-child {
    grid-column: 1 / -1;
  }

  .family-member-card {
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: start;
    padding: 15px;
  }

  .family-member-actions {
    grid-column: 2;
    justify-content: flex-start;
    justify-self: start;
  }

  .family-member-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .member-role-control {
    width: 100%;
    margin-left: 0;
  }

  .member-role-control select {
    width: 100%;
  }

  .family-name-actions,
  .join-family-actions {
    grid-template-columns: 1fr;
  }

  .family-name-actions .button,
  .join-family-actions .button {
    width: 100%;
  }

  .filter-clear {
    width: 100%;
  }

  .form-actions .button {
    flex: 1;
  }

  .question-row {
    grid-template-columns: 32px minmax(0, 1fr) 40px;
    gap: 9px;
    min-height: 68px;
    padding: 11px 12px;
  }

  .question-row > .status {
    display: none;
  }

  .question-row:has(> span.drag-handle) {
    grid-template-columns: 32px minmax(0, 1fr) 40px;
  }

  .question-row:has(> span.drag-handle) > :nth-child(3),
  .question-row:has(> span.drag-handle) > :nth-child(4) {
    display: none;
  }

  .toolbar {
    align-items: stretch;
  }

  .toolbar .search-box {
    width: 100%;
    max-width: none;
  }

  .toolbar-summary {
    align-self: flex-start;
  }

  .bulk-action-bar {
    top: 70px;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .bulk-action-buttons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bulk-action-buttons .button {
    width: 100%;
    padding-inline: 8px;
  }

  .enrollment-bulk-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  .participant-selector,
  .class-request-grid,
  .profile-summary-grid {
    grid-template-columns: 1fr;
  }

  .profile-summary-grid .full-detail {
    grid-column: 1;
  }

  .student-family-contact {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 11px;
  }

  .student-family-contact .long-value,
  .student-family-contact > span:not(.status) {
    grid-column: 1 / -1;
  }

  .enrollment-student-heading,
  .enrollment-history-card,
  .profile-history-row {
    align-items: flex-start;
  }

  .enrollment-history-card {
    flex-direction: column;
  }

  .enrollment-history-actions {
    width: 100%;
    justify-content: space-between;
  }

  .notice .text-button {
    width: 100%;
    margin-left: 0;
    text-align: left;
  }

  .roster-program-heading {
    align-items: flex-start;
  }

  .roster-offering > summary {
    align-items: flex-start;
    padding: 14px;
  }

  .roster-summary-meta .status {
    display: none;
  }

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

  th,
  td {
    padding: 11px 12px;
  }

  .class-group-choice,
  .class-request-card {
    padding: 14px;
  }

  .sibling-row .student-class-list {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .sibling-row > .button {
    grid-column: 2;
    grid-row: 1;
  }

  .student-identity {
    align-items: flex-start;
    flex-direction: column;
  }

  .submission-head {
    align-items: flex-start;
  }

  .submission-actions > :first-child {
    width: 100%;
    margin-right: 0;
  }

  .participant-choice {
    grid-template-columns: 1fr;
  }

  .participant-choice legend {
    grid-column: 1;
  }

  .hide-mobile {
    display: none !important;
  }

  .toast-region {
    bottom: calc(82px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 430px) {
  .auth-panel {
    padding: 20px 14px;
  }

  .auth-card {
    padding: 25px 20px;
  }

  .admin-filter-bar {
    grid-template-columns: 1fr;
  }

  .search-box.admin-search-filter {
    grid-column: 1;
  }

  .mobile-nav.admin-mobile-nav .nav-link {
    font-size: 9px;
  }

  .activity-log-panel-head {
    flex-direction: column;
    gap: 10px;
  }

  .activity-detail-summary,
  .activity-related-grid {
    grid-template-columns: 1fr;
  }

  .card-pad {
    padding: 16px;
  }

  .demo-actions {
    grid-template-columns: 1fr;
  }

  .demo-actions p {
    grid-column: 1;
  }

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

  .inbox-summary-card {
    padding: 14px;
  }

  .inbox-alert {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    padding: 13px;
  }

  .inbox-alert-icon {
    width: 36px;
    height: 36px;
  }

  .inbox-review-button {
    width: 100%;
  }

  .family-message-card {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    padding: 13px;
  }

  .family-message-indicator {
    width: 36px;
    height: 36px;
  }

  .family-message-open {
    width: 100%;
  }

  .stat-icon {
    width: 38px;
    height: 38px;
  }

  .page-header .button-row,
  .page-header .button {
    width: 100%;
  }

  .form-actions {
    flex-direction: column;
  }

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

  .form-actions > .button-row {
    width: 100%;
    flex-direction: column;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal {
    max-height: 92vh;
    border-radius: 22px 22px 0 0;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 760px) {
  .account-filters .admin-search-filter {
    grid-column: 1 / -1;
  }

  .account-list-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .account-list-heading > span {
    text-align: left;
  }

  .account-admin-row {
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 15px;
  }

  .account-admin-avatar {
    width: 42px;
    height: 42px;
  }

  .account-admin-actions {
    grid-column: 1 / -1;
    justify-items: stretch;
  }

  .account-admin-actions .button {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .account-stats {
    grid-template-columns: 1fr;
  }

  .account-filters .admin-search-filter {
    grid-column: 1;
  }

  .account-admin-meta {
    display: grid;
    gap: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* Signed-form loading and permanent participant popup containment. */
.loading-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
}

.loading-inline p {
  margin: 0;
}

.spinner {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 3px solid var(--line);
  border-top-color: var(--forest);
  border-radius: 50%;
  animation: signed-form-spin .7s linear infinite;
}

@keyframes signed-form-spin {
  to { transform: rotate(360deg); }
}

.student-profile-modal {
  width: min(760px, calc(100vw - 40px));
  max-width: 100%;
  overflow-x: hidden;
}

.student-profile-modal .profile-summary-grid {
  overflow: hidden;
}

.student-family-contact {
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.student-family-contact > .long-value,
.student-family-contact > span:not(.status) {
  grid-column: 1 / -1;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.student-profile-modal .form-actions {
  align-items: center;
  flex-wrap: wrap;
}

.student-profile-modal .form-actions > .button-row {
  flex-wrap: wrap;
}

.student-profile-modal .form-actions .button {
  flex: 0 0 auto;
  width: auto;
}

@media (max-width: 760px) {
  .student-profile-modal {
    width: 100%;
  }

  .student-profile-modal .profile-summary-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 15px;
  }

  .student-profile-modal .profile-summary-grid .full-detail {
    grid-column: 1;
  }

  .student-profile-modal .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .student-profile-modal .form-actions > .button-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .student-profile-modal .form-actions .button {
    flex: none;
    width: 100%;
    min-height: 44px;
  }
}

@media (max-width: 430px) {
  .student-profile-modal .form-actions > .button-row {
    grid-template-columns: 1fr;
  }
}
