:root {
  color-scheme: light;
  /* Matches the LunchMade homepage palette: sage ground, forest accent, terracotta highlight. */
  --portal-ink: #1c251f;
  --portal-muted: #5e6a63;
  --portal-surface: #ffffff;
  --portal-ground: #f4f7f2;
  --portal-line: #dee6df;
  --portal-accent: #23523b;
  --portal-accent-dark: #183927;
  --portal-highlight: #c85d3d;
  --portal-tint: #e7efe8;
  --portal-radius: 1.25rem;
  --portal-serif: Georgia, "Times New Roman", serif;
  --report-line: #d3dbd2;
  --report-padding: clamp(.9rem, 1.55vw, 1.25rem);
  --report-radius: .7rem;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--portal-ground); color: var(--portal-ink); }
body { margin: 0; min-width: 20rem; background: var(--portal-ground); }
button, input, select, textarea { font: inherit; }
button, input, select, textarea, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--portal-accent-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #1458a7; outline-offset: 3px; }
button { min-height: 2.75rem; cursor: pointer; }
.portal-skip-link { position: fixed; z-index: 20; left: 1rem; top: -5rem; padding: .7rem 1rem; color: #fff; background: var(--portal-ink); border-radius: .35rem; }
.portal-skip-link:focus { top: 1rem; }
.portal-header { background: var(--portal-surface); border-bottom: 1px solid var(--portal-line); }
.portal-header-inner { display: flex; gap: 1rem; align-items: center; justify-content: space-between; width: min(100% - 2rem, 72rem); min-height: 4.25rem; margin: 0 auto; }
.portal-brand { color: var(--portal-ink); font-weight: 800; letter-spacing: -.02em; text-decoration: none; }
.portal-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .25rem; }
.language-selector select {
  width: auto;
  min-height: 2.75rem;
  max-width: 100%;
  border: 1px solid var(--portal-line);
  border-radius: .5rem;
  padding: .35rem .5rem;
  background: var(--portal-surface);
  color: var(--portal-ink);
  font: inherit;
  font-size: .875rem;
}
.parent-redesign .language-selector select,
.coordinator-redesign .language-selector select { border-color: #648477; }
.portal-nav-link { display: inline-flex; min-height: 2.75rem; align-items: center; padding: .6rem .75rem; border-radius: .4rem; color: var(--portal-ink); font-size: .95rem; font-weight: 650; text-decoration: none; }
.portal-nav-link[aria-current="page"], .portal-nav-link:hover { background: var(--portal-tint); color: var(--portal-accent-dark); }
.portal-main { width: min(100% - 2rem, 72rem); min-height: calc(100vh - 4.25rem); margin: 0 auto; padding: clamp(1.5rem, 4vw, 3.5rem) 0; }
.portal-status { width: min(100% - 2rem, 72rem); min-height: 1.25rem; margin: 0 auto; color: var(--portal-muted); font-size: .925rem; }
.portal-status:empty { display: none; }
.portal-status-error { margin-top: 1rem; padding: .8rem 1rem; color: #7e1b29; background: #fff1f2; border: 1px solid #f4c9cf; border-radius: var(--portal-radius); }
.portal-status:focus-visible, .portal__alert:focus-visible { outline: 3px solid #1458a7; outline-offset: 3px; }
.portal-main h1, .portal-main h2 { color: var(--portal-ink); letter-spacing: -.03em; }
.portal-main h1 { margin: 0 0 1rem; font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.08; }
.portal-main h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); line-height: 1.2; }
.portal-main p { max-width: 70ch; line-height: 1.55; }
.portal-card { display: grid; gap: 1rem; padding: clamp(1rem, 3vw, 1.5rem); background: var(--portal-surface); border: 1px solid var(--portal-line); border-radius: var(--portal-radius); box-shadow: 0 2px 7px rgb(24 52 44 / 5%); }
.portal-button[hidden] { display: none; }
.portal-button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .65rem 1rem; color: #fff; background: var(--portal-accent); border: 1px solid var(--portal-accent); border-radius: .45rem; font-weight: 700; text-decoration: none; }
.portal-button:hover { background: var(--portal-accent-dark); }
.portal-button-secondary { color: var(--portal-ink); background: var(--portal-surface); border-color: var(--portal-line); }
.portal-button-secondary:hover { background: var(--portal-tint); }
.portal-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.25rem; }
.portal { display: grid; gap: 1.25rem; min-width: 0; }
.portal__header { max-width: 46rem; }
.portal__eyebrow { margin: 0 0 .35rem; color: var(--portal-accent-dark); font-size: .875rem; font-weight: 750; }
.portal__card { display: grid; min-width: 0; gap: 1rem; padding: clamp(1rem, 3vw, 1.5rem); background: var(--portal-surface); border: 1px solid var(--portal-line); border-radius: var(--portal-radius); box-shadow: 0 2px 7px rgb(24 52 44 / 5%); }
.portal__create-school, .portal__detail, .portal__school-list, .portal__exports, .portal__results, .portal__summary { display: grid; gap: 1rem; min-width: 0; }
.portal__card, .portal__create-school, .portal__detail, .portal__school-list, .portal__exports, .portal__results { padding: 1.25rem; background: var(--portal-surface); border: 1px solid var(--portal-line); border-radius: var(--portal-radius); }
.portal__summary { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
.portal__stat { padding: 1rem; background: var(--portal-surface); border: 1px solid var(--portal-line); border-radius: .55rem; }
.portal__stat dt { color: var(--portal-muted); font-size: .875rem; }
.portal__stat dd { margin: .35rem 0 0; font-size: 1.3rem; font-weight: 750; }
.portal__actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.weekly-report h3, .weekly-report-range { margin: 0; }
.weekly-report-options { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem 1.35rem; }
.weekly-report-options > label:first-child { width: min(100%, 18rem); }
.weekly-report-options .portal__checkbox { min-height: 2.75rem; }
.report-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 23rem), 1fr));
  gap: .9rem;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}
.portal .report-card-grid > .portal__card {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  min-width: 0;
  padding: var(--report-padding);
  border: 1px solid var(--report-line);
  border-radius: var(--report-radius);
  background: var(--portal-surface);
  box-shadow: none;
}
.portal .report-card-grid > .portal__card :is(h2, h3) {
  margin: 0;
  color: var(--portal-accent-dark);
  font-family: inherit;
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.025em;
}
.portal .report-card-grid > .portal__card > .portal__actions { margin: auto 0 0; padding-top: .15rem; gap: .42rem; }
.report-card-grid :is(.weekly-report-options, .report-download-fields) > label:first-child { width: min(100%, 13rem); }
.report-card-grid .weekly-report-options { gap: .4rem .85rem; }
.report-card-grid .portal__checkbox input { padding: 0; margin-inline: 0; accent-color: var(--portal-accent); }
.portal .report-card-grid > .portal__card label { color: var(--portal-muted); font-size: .84rem; }
.portal .report-card-grid > .portal__card :is(input, select):not([type="checkbox"]) {
  min-height: 2.75rem;
  padding: .5rem .65rem;
  border-color: #87998b;
  border-radius: .45rem;
  font-size: .94rem;
  font-weight: 550;
}
.portal .report-card-grid > .portal__card .portal__hint { font-size: .875rem; }
.portal .report-card-grid > .portal__card button {
  min-height: 2.75rem;
  padding: .49rem .78rem;
  border-radius: .45rem;
  font-size: .875rem;
  font-weight: 650;
}
.portal .report-card-grid > .portal__card .portal__button-quiet { border-color: #a7b6aa; color: var(--portal-accent-dark); }
@media (max-width: 28rem) {
  .report-card-grid .weekly-report > .portal__actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .portal .report-card-grid .weekly-report .portal__actions button { padding-inline: .25rem; font-size: .8rem; }
}
.portal__school { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; padding: 1rem 0; border-top: 1px solid var(--portal-line); }
.portal__school-list ul, .portal__evidence-list { padding: 0; margin: 0; list-style: none; }
.portal__detail-header { min-width: 0; }
.portal__badges { display: block; max-width: 100%; overflow-wrap: anywhere; color: var(--portal-muted); font-size: .875rem; }
.portal__filters { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.portal__filters h2, .portal__filters .portal__actions { grid-column: 1 / -1; }
.portal__filters label, .portal__card label, .portal__create-school label { display: grid; gap: .35rem; color: var(--portal-ink); font-size: .925rem; font-weight: 650; }
input, select, textarea { width: 100%; min-width: 0; min-height: 2.75rem; padding: .6rem .7rem; color: var(--portal-ink); background: #fff; border: 1px solid #aebfb7; border-radius: .4rem; }
textarea { min-height: 7rem; resize: vertical; }
.portal-card form { display: grid; gap: .8rem; max-width: 42rem; }
.portal-card form > label { display: grid; gap: .35rem; }
.portal-card article { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem 1rem; align-items: center; padding: 1rem 0; border-top: 1px solid var(--portal-line); }
.portal-card article > span { color: var(--portal-muted); }
.portal-card article .portal-actions { grid-column: 1 / -1; margin: 0; }
.portal-card fieldset { display: grid; gap: .55rem; min-width: 0; padding: 1rem; border: 1px solid var(--portal-line); border-radius: .55rem; }
.portal-card legend { padding: 0 .3rem; color: var(--portal-ink); font-weight: 750; }
.portal-card fieldset label { display: flex; gap: .65rem; align-items: flex-start; min-height: 2.75rem; padding: .65rem .7rem; background: #f7faf8; border: 1px solid transparent; border-radius: .4rem; cursor: pointer; }
.portal-card fieldset label:has(input:checked) { background: var(--portal-tint); border-color: #9fcdb4; }
.portal-card fieldset label span { display: block; color: var(--portal-muted); font-size: .9rem; font-weight: 400; }
.portal-card fieldset input[type="checkbox"], .portal-card fieldset input[type="radio"] { width: 1.15rem; min-width: 1.15rem; min-height: 1.15rem; margin: .15rem 0 0; accent-color: var(--portal-accent); }
.portal-card > div:not(.portal-actions) > section { margin-top: .75rem; padding: 1rem; background: #f7faf8; border-radius: .55rem; }
.portal-child-static { padding: .65rem .7rem; background: #f7faf8; border-radius: .4rem; font-weight: 650; }
.portal__child-status { color: var(--portal-muted); font-weight: 600; }
.portal__child-status.is-complete { color: var(--portal-accent-dark); }
.parent-order-deadline { width: fit-content; max-width: 100%; margin: 0; padding: .4rem .9rem; background: #f3bd55; color: #18241e; border: 2px solid #a8680a; border-radius: .65rem; font-size: 1.1rem; font-weight: 750; line-height: 1.3; }
.parent-date-meal-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .75rem; padding: .55rem .75rem; background: #f7faf8; border: 1px solid var(--portal-line); border-radius: .65rem; }
.parent-date-meal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.parent-date-meal-actions[hidden], .parent-clear-child-button[hidden], .parent-skip-date-button[hidden] { display: none; }
.parent-date-meal-progress { color: var(--portal-muted); font-size: .925rem; font-weight: 650; }
.parent-date-meal-progress.is-complete { color: var(--portal-accent-dark); }
.portal__date-status { font-weight: 600; color: var(--portal-muted); }
.portal > section[aria-live] { display: grid; gap: 1.25rem; min-width: 0; }
.portal button:not(.portal-button), .portal__create-school button, .portal__card button { min-height: 2.75rem; padding: .6rem 1rem; color: #fff; background: var(--portal-accent); border: 1px solid var(--portal-accent); border-radius: .45rem; font-weight: 700; }
.portal button:not(.portal-button):hover:not(:disabled), .portal__create-school button:hover:not(:disabled), .portal__card button:hover:not(:disabled) { background: var(--portal-accent-dark); }
.portal button:disabled, .portal-button:disabled { cursor: not-allowed; opacity: .55; }
.portal__checkbox { display: flex !important; align-items: center; gap: .55rem; }
.portal__checkbox input { width: 1.2rem; min-height: 1.2rem; }
.portal__table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--portal-line); border-radius: .45rem; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: .7rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--portal-line); }
th { color: var(--portal-muted); background: #f7faf8; font-size: .8rem; }
.portal__pagination { display: flex; gap: .75rem; align-items: center; }
.portal__alert { padding: .8rem 1rem; color: var(--portal-ink); background: var(--portal-tint); border: 1px solid var(--portal-line); border-radius: .45rem; }
.portal__alert:empty, .portal__alert[hidden] { display: none; }
.portal__error-summary { padding: .8rem 1rem; color: #7e1b29; background: #fff1f2; border: 1px solid #f4c9cf; border-radius: .45rem; }
.portal__error-summary:focus-visible { outline: 3px solid #1458a7; outline-offset: 3px; }
.portal__error-summary p, .portal__error-summary ul, .portal__field-error { margin: 0; }
.portal__error-summary ul { padding-left: 1.25rem; }
.portal__field-error { color: #7e1b29; font-size: .875rem; font-weight: 600; }
[aria-invalid="true"] { border-color: #a3152d; }
.portal__secret { overflow-wrap: anywhere; padding: .85rem; background: #f7faf8; border: 1px solid var(--portal-line); border-radius: .45rem; }
.portal__empty, .portal__loading { margin: 0; padding: 1rem; color: var(--portal-muted); background: #f7faf8; border-radius: .45rem; }
.portal__imports { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.portal__imports > h3, .portal__imports > p { grid-column: 1 / -1; }
.portal__imports fieldset { min-width: 0; padding: 0; border: 0; }
.portal__imports legend { font-weight: 750; }
.portal__imports textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.portal__program-readback { overflow-wrap: anywhere; }
.portal__program-readback ul { padding-inline-start: 1rem; }
.portal-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 38rem) {
  .portal-header-inner { align-items: flex-start; flex-direction: column; justify-content: center; padding: .75rem 0; }
  .portal-nav { justify-content: flex-start; }
  .portal-main { width: min(100% - 1.25rem, 72rem); padding-top: 1.25rem; }
  .portal-status { width: min(100% - 1.25rem, 72rem); }
  .portal__filters { grid-template-columns: 1fr; }
  .portal-card article { grid-template-columns: 1fr; }
  .portal-card article .portal-actions { grid-column: auto; }
  .portal__school { align-items: flex-start; flex-direction: column; }
  .portal__pagination { justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
/* Long support references and forms must remain usable on narrow screens. */
.portal--ops .portal__card { min-width: 0; overflow-wrap: anywhere; }
.portal--ops fieldset { min-width: 0; }
.portal--ops .portal__support-row { padding-block: .5rem; border-bottom: 1px solid #d8e0db; }
.portal--ops [aria-label="Order support"] article { padding-block: .75rem; border-bottom: 1px solid #d8e0db; }
.portal--ops [aria-label="Order support"] button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.portal__hint { grid-column: 1 / -1; margin: 0; color: var(--portal-muted); font-size: .875rem; }
/* School staff print the filtered list as a class or kitchen sheet. */
@media print {
  .portal-skip-link, .portal-header, .portal-status, .portal__alert, .portal__filters, .portal__order-filters, .portal__summary-section, .portal__exports, .portal__pagination, button { display: none !important; }
  .portal-main { width: 100%; padding: 0; }
  .portal__table-wrap { overflow: visible; border: 0; }
  table { font-size: 10pt; }
  th, td { padding: .3rem .4rem; }
  tr { break-inside: avoid; }
}

/* Visual refresh: editorial serif headings, pill buttons and calmer cards. */
.portal-brand { font-family: var(--portal-serif); font-size: 1.45rem; font-weight: 700; letter-spacing: -.01em; }
.portal-brand::before { content: ""; display: inline-block; width: .7rem; height: .7rem; margin-right: .5rem; background: var(--portal-highlight); border-radius: 50%; vertical-align: .1em; }
.portal-header .portal-brand.lm-full-brand { display: inline-flex; align-items: center; max-width: 100%; min-height: 44px; }
.portal-header .portal-brand.lm-full-brand::before { content: none; }
.portal-header .portal-brand .lm-portal-wordmark { display: block; width: clamp(132px, 11.8vw, 168px); max-width: 100%; height: auto; border-radius: .45rem; }
@media (max-width: 47rem) {
  .portal-header .portal-brand .lm-portal-wordmark { width: clamp(113px, 34vw, 133px); }
}
.portal-main h1, .portal-main h2, .portal-main h3 { font-family: var(--portal-serif); font-weight: 600; letter-spacing: -.01em; }
.portal-main h1 { font-size: clamp(2rem, 5vw, 3rem); }
.portal-main h2 { font-size: clamp(1.3rem, 3vw, 1.65rem); margin: 0 0 .25rem; }
.portal-main > section > p:first-of-type, .portal__header p:last-child { color: var(--portal-muted); font-size: 1.05rem; }
.portal__eyebrow { color: var(--portal-highlight); letter-spacing: .06em; text-transform: uppercase; font-size: .78rem; }
.portal-card, .portal__card, .portal__create-school, .portal__detail, .portal__school-list, .portal__exports, .portal__results, .portal__filters, .portal__summary-section { border-color: var(--portal-line); border-radius: var(--portal-radius); box-shadow: 0 1px 2px rgb(28 37 31 / 4%), 0 8px 24px rgb(28 37 31 / 5%); }
.portal__filters, .portal__summary-section { padding: 1.25rem; background: var(--portal-surface); border: 1px solid var(--portal-line); }
.portal-button, .portal button:not(.portal-button), .portal__create-school button, .portal__card button { min-height: 3rem; padding: .7rem 1.35rem; border-radius: 999px; transition: background-color .15s ease, border-color .15s ease; }
.portal-button-secondary, .portal button[data-clear-filters], .portal button[data-range-today], .portal button[data-range-week], .portal button[data-print-list] { color: var(--portal-accent-dark); background: var(--portal-surface); border: 1px solid var(--portal-accent); }
.portal-button-secondary:hover, .portal button[data-clear-filters]:hover:not(:disabled), .portal button[data-range-today]:hover:not(:disabled), .portal button[data-range-week]:hover:not(:disabled), .portal button[data-print-list]:hover:not(:disabled) { background: var(--portal-tint); }
input, select, textarea { min-height: 3rem; border-color: #c9d5cc; border-radius: .75rem; }
input:hover, select:hover, textarea:hover { border-color: var(--portal-accent); }
.portal-card fieldset { border-radius: 1rem; }
.portal-card fieldset label { border-radius: .85rem; padding: .8rem .9rem; }
.portal-card fieldset label:has(input:checked) { background: var(--portal-tint); border-color: var(--portal-accent); }
.portal-card fieldset label:has(input:disabled) { cursor: not-allowed; opacity: .7; }
.portal__dates { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.portal__dates li { padding: .8rem .9rem; background: var(--portal-tint); border: 1px solid var(--portal-accent); border-radius: .85rem; }
.portal__dates li:has(> .portal__date-button) { padding: 0; background: none; border: 0; }
.portal__date-button {
  width: 100%;
  min-height: 2.75rem;
  padding: .75rem .95rem;
  color: var(--portal-ink);
  background: var(--portal-surface);
  border: 1.5px solid var(--portal-line);
  border-radius: .85rem;
  font: inherit;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}
.portal__date-button:hover:not(:disabled) { border-color: var(--portal-accent); }
.portal__date-button.is-complete { background: var(--portal-tint); border-color: #84ae95; }
.portal__date-button[aria-pressed="true"] { border-color: var(--portal-accent); box-shadow: 0 0 0 2px rgb(35 82 59 / 18%); }
.portal__date-button.is-complete .portal__date-status { color: var(--portal-accent-dark); }
/* Filters keep their own widths and wrap, instead of stretching across the card. */
.portal__order-filters { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: end; }
.portal__filter { display: grid; gap: .35rem; flex: 0 1 15rem; min-width: 0; }
.portal__filter--wide { flex-basis: 22rem; }
/* The sign-in and invite forms stay a readable width with space between fields. */
.portal__sign-in form, .portal__invite { display: grid; gap: .9rem; }
.portal__sign-in form { max-width: 26rem; }
.portal__sign-in label, .portal__invite label { display: grid; gap: .35rem; }
.portal__invite input, .portal__invite > p { max-width: 40rem; }
/* The invitation is shown as it will look in an email: always dark on white, whatever the page around it. */
.invite-message-field { display: grid; gap: .35rem; max-width: 44rem; }
.invite-message-label { color: var(--portal-ink); font-weight: 700; }
.invite-message { min-height: 12rem; padding: clamp(1rem, 3vw, 1.75rem); overflow-wrap: anywhere; border: 1px solid var(--portal-line); border-radius: var(--portal-radius, .75rem); background: #fff; }
.invite-message:focus-visible { outline: 3px solid var(--portal-accent); outline-offset: 2px; }
.portal__field-error:empty { display: none; }
@media (max-width: 40rem) { .portal__filter, .portal__filter--wide { flex-basis: 100%; } }
.portal__payment { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .85rem; font-weight: 700; white-space: nowrap; }
.portal__payment--paid { color: var(--portal-accent-dark); background: var(--portal-tint); }
.portal__payment--unpaid { color: #7a3b00; background: #fdebd3; }
/* On phones each lunch becomes a small card instead of a wide table. */
@media (max-width: 40rem) {
  .portal__orders .portal__table-wrap { border: 0; }
  .portal__orders thead { display: none; }
  .portal__orders tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .75rem; padding: .75rem 0; border-bottom: 1px solid var(--portal-line); }
  .portal__orders td { padding: 0; border: 0; background: none !important; }
  .portal__orders td[data-column="child"] { font-weight: 700; }
  .portal__orders td[data-column="payment"] { grid-column: 2; grid-row: 1; }
  .portal__orders td[data-column="class"], .portal__orders td[data-column="lunch"] { grid-column: 1 / -1; color: var(--portal-muted); }
}
.portal__stat { border-radius: 1rem; background: var(--portal-ground); border-color: transparent; }
.portal__stat dd { font-family: var(--portal-serif); font-size: 1.6rem; color: var(--portal-accent-dark); }
.portal__table-wrap { border-radius: 1rem; }
th { text-transform: uppercase; letter-spacing: .04em; font-size: .72rem; }
tbody tr:nth-child(even) td { background: #fafcf9; }
.portal__alert, .portal-status-error, .portal__error-summary { border-radius: 1rem; }
.portal-card article { padding: 1rem 0; }
.portal-card article > strong { font-size: 1.05rem; }
.portal__exports label { display: grid; gap: .35rem; font-size: .925rem; font-weight: 650; }

.portal-footer { max-width: 72rem; margin: 2rem auto 1.5rem; padding: 1rem 1rem 0; border-top: 1px solid #d6d6d6; color: #444; font-size: 0.9rem; }
.portal-footer p { margin: 0.35rem 0; }
.portal-legal { max-width: 46rem; line-height: 1.55; }
.portal-legal h2 { margin-top: 1.6rem; }

/* Coordinator Families and Classes: compact cards, fields with fixed widths, quiet row buttons. */
.portal__manage > p { margin: 0; }
.portal__search { display: grid; gap: .35rem; }
.portal__search-row { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: end; }
.portal__field { display: grid; gap: .35rem; width: min(100%, 20rem); }
.portal__field--short { width: min(100%, 9rem); }
.portal__field--wide { width: min(100%, 28rem); }
.portal__field--long { width: min(100%, 36rem); }
.portal__result-count { margin: 0; color: var(--portal-muted); font-weight: 650; }
.portal__result-count:empty { display: none; }
.portal__manage .portal__alert[role="alert"] { color: #7e1b29; background: #fff1f2; border-color: #f4c9cf; }
.portal__manage .portal__alert button { margin-left: .5rem; }
.portal__family-list, .portal__class-list, .portal__children { display: grid; gap: .75rem; margin: 0; padding: 0; list-style: none; }
.portal__family, .portal__class { display: grid; gap: .6rem; align-content: start; min-width: 0; padding: 1rem; overflow-wrap: anywhere; background: var(--portal-surface); border: 1px solid var(--portal-line); border-radius: 1rem; }
.portal__family-head, .portal__child { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; }
.portal__family-who { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; min-width: 0; margin: 0; }
.portal__family-who strong { font-size: 1.05rem; }
.portal__children { gap: 0; border-top: 1px solid var(--portal-line); }
.portal__child { padding: .75rem 0 0; }
.portal__child + .portal__child { margin-top: .75rem; border-top: 1px solid var(--portal-line); }
.portal__child-info { display: grid; gap: .15rem; flex: 1 1 15rem; min-width: 0; }
.portal__muted { color: var(--portal-muted); font-size: .925rem; }
p.portal__muted { margin: 0; }
.portal__row-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.portal__panel-slot { flex: 1 1 100%; min-width: 0; }
.portal__panel-slot:empty { display: none; }
.portal__class-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); align-items: start; }
.portal__badge { display: inline-block; padding: .1rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.portal__badge--active { color: var(--portal-accent-dark); background: var(--portal-tint); }
.portal__badge--invited { color: #7a3b00; background: #fdebd3; }
.portal__panel { display: grid; gap: .8rem; justify-items: start; min-width: 0; padding: 1rem; background: #f7faf8; border: 1px solid var(--portal-line); border-radius: 1rem; }
.portal__panel--danger { background: #fff7f5; border-color: #f1c7bb; }
.portal-main .portal__panel h3 { margin: 0; font-size: 1.15rem; }
.portal__panel p, .portal__panel ul { max-width: 60ch; margin: 0; }
.portal__panel ul { padding-left: 1.25rem; line-height: 1.5; }
.portal__panel .portal__alert { max-width: 40rem; }
.portal__panel textarea { min-height: 5rem; }
.portal__consent { align-items: flex-start !important; max-width: 40rem; font-weight: 600; }
.portal__consent[hidden] { display: none !important; }
/* The page-wide input padding would squash a checkbox to a dot. */
.portal__consent input { flex: none; width: 1.25rem; min-width: 1.25rem; height: 1.25rem; min-height: 1.25rem; margin: .15rem 0 0; padding: 0; accent-color: var(--portal-accent); }
.portal button.portal__button-quiet { min-height: 2.75rem; padding: .45rem 1rem; color: var(--portal-accent-dark); background: var(--portal-surface); border: 1px solid var(--portal-accent); font-size: .925rem; }
.portal button.portal__button-quiet:hover:not(:disabled) { background: var(--portal-tint); }
.portal button.portal__button-danger { color: #fff; background: #a3152d; border-color: #a3152d; }
.portal button.portal__button-danger:hover:not(:disabled) { background: #7e1b29; }
.portal button.portal__more { justify-self: start; }
@media (max-width: 40rem) {
  .portal__family, .portal__class { padding: .85rem; }
  .portal__panel { padding: .85rem; }
  .portal button.portal__button-quiet { padding-inline: .8rem; font-size: .875rem; }
  .portal__panel .portal__actions button:not(.portal__button-quiet) { padding-inline: 1rem; }
}

/* How-to videos: the link on the sign-in cards and the public watch pages. */
.how-to-inline { display: grid; gap: .65rem; min-width: 0; margin-top: .25rem; padding-top: 1.1rem; border-top: 1px solid var(--portal-line); }
.portal-main .how-to-inline h3 { margin: 0; color: var(--portal-ink); font-family: inherit; font-size: 1rem; font-weight: 700; letter-spacing: 0; }
.how-to-block { display: grid; gap: .65rem; min-width: 0; }
.how-to-card, .parent-redesign .parent-content > .how-to-card { max-width: 60rem; }
.how-to-language-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.how-to-language-buttons .portal-button[aria-pressed="true"] { color: #fff; background: var(--portal-accent); border-color: var(--portal-accent); }
.how-to-video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #1f3d2f; border-radius: .75rem; }
.how-to-card .portal-actions { margin-top: 0; }
.coordinator-redesign .how-to-inline .portal-button, .coordinator-redesign .how-to-card .portal-button { border-radius: .6rem; }

/* Classic layout multi-item support */
.portal__date-prior { color: var(--portal-accent-dark); font-size: .875rem; font-weight: 600; }
.portal__date-prior[hidden], .portal-selected-bar[hidden] { display: none !important; }
.portal-multi-prior-banner { padding: .65rem .85rem; background: #f7faf8; border: 1px solid var(--portal-line); border-left: 4px solid var(--portal-accent); border-radius: .65rem; color: var(--portal-accent-dark); font-weight: 600; }
.portal-multi-prior-banner p { margin: 0; }
.portal-selected-bar { display: grid; gap: .45rem; padding: .65rem .85rem; background: #f7faf8; border: 1px solid var(--portal-line); border-radius: .65rem; }
.portal-meal-stepper-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .65rem; padding: .75rem .85rem; background: #f7faf8; border: 1px solid var(--portal-line); border-radius: .75rem; }
.portal-meal-stepper-row.is-selected { background: var(--portal-tint); border-color: var(--portal-accent); }
.portal-meal-stepper-info { display: grid; gap: .15rem; min-width: 0; flex: 1 1 12rem; }
.portal-meal-stepper-info span { color: var(--portal-muted); font-size: .9rem; }
.portal-card button.parent-selected-pill-remove { min-height: 1.85rem; min-width: 1.85rem; padding: 0; border-radius: 50%; border: 0; background: transparent; color: var(--portal-accent-dark); }
.portal-card button.parent-selected-pill-remove:hover:not(:disabled) { background: var(--portal-accent); color: #fff; }
.portal-card button.parent-v1-step-btn { min-height: 2.75rem; min-width: 2.55rem; padding: 0 .5rem; border-radius: 0; border: 0; border-left: 1px solid rgb(255 255 255 / 26%); background: transparent; color: #fff; }
.portal-card button.parent-meal-add-btn { min-height: 2.75rem; padding: .42rem .95rem; color: var(--portal-accent-dark); background: var(--portal-surface); border-color: var(--portal-accent); }
