/* MiniStage - single stylesheet, matched to the school website's identity. */

:root {
  /* Palette of the school website (stvincentstdenis.org): Material blue grey neutrals,
     steel blue from the header banner, sky blue of the logo for titles and rules. */
  --bg: #eceff1;
  --surface: #ffffff;
  --sand: #f3f6f7;
  --sand-2: #f6f8f9;
  --sand-3: #eef2f4;

  --ink: #263238;
  --ink-2: #37474f;
  --ink-3: #455a64;
  --muted: #546e7a;
  --muted-2: #607d8b;
  --muted-3: #6b818c;
  --faint: #90a4ae;

  --line: #cfd8dc;
  --line-2: #b0bec5;
  --line-3: #e3e9ec;

  --navy: #275d81;
  --navy-dark: #1d4a69;
  --navy-hover: #004e82;
  --navy-soft: #b5cde0;
  --sky: #0693e3;
  --bordeaux: #7b2233;
  --green: #2e6b5e;
  --green-dark: #255649;
  --gold: #8a6212;

  --section: var(--navy);

  --radius: 0px;
  --radius-sm: 2px;
  --display: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 10px 28px rgba(38, 50, 56, 0.14);
}

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

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.2; margin: 0; }

a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--navy-hover); }

img { max-width: 100%; }
table { border-collapse: collapse; }

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

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

/* ------------------------------------------------------------------ layout */

.container { max-width: 960px; margin: 0 auto; padding: 26px 18px 70px; }
.container--wide { max-width: 1320px; padding: 24px 22px 70px; }
.container--narrow { max-width: 640px; }

.stack { display: flex; flex-direction: column; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row--tight { gap: 8px; }
.spacer { flex: 1; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.grid-auto--wide { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
/* Form grid: fields on the same row keep their labels aligned. */
.grid { display: grid; gap: 12px; align-items: start; }
.grid-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 20px; }
.mt-0 { margin-top: 0; }
.mt-l { margin-top: 34px; }
.mt-m { margin-top: 22px; }
.mt-s { margin-top: 12px; }
.text-muted { color: var(--muted); }
.text-small { font-size: 13px; }
.text-faint { color: var(--muted-3); font-size: 13px; }
.nowrap { white-space: nowrap; }

/* ------------------------------------------------------------------ landing page */

.gate {
  min-height: 100vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
}
.gate__body { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.gate__inner { width: 100%; max-width: 900px; }
.gate__head { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; margin-bottom: 40px; }
.gate__logo {
  width: 120px; height: 120px; object-fit: cover; border-radius: var(--radius);
  background: #fff; border: 1px solid rgba(255, 255, 255, 0.35);
}
.gate__kicker { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--navy-soft); }
.gate__title { font-size: 52px; line-height: 1.05; color: #fff; }
.gate__lead { margin: 0; max-width: 520px; color: #dbe5f1; font-size: 17px; }
.gate__foot {
  padding: 18px 20px; text-align: center; color: #8fa6c4; font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.gate-card {
  background: var(--surface); border: 1px solid var(--line-2); border-top: 4px solid var(--section);
  border-radius: var(--radius); padding: 30px 28px; display: flex; flex-direction: column; gap: 12px;
  text-decoration: none; color: inherit; transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gate-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(6, 20, 40, 0.35); color: inherit; }
.gate-card__eyebrow { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--section); font-weight: 700; }
.gate-card__title { font-family: var(--display); font-size: 28px; font-weight: 700; }
.gate-card p { margin: 0; color: var(--ink-3); font-size: 15px; }
.gate-card__cta { margin-top: 8px; font-weight: 600; color: var(--navy); }

/* ------------------------------------------------------------------ headers */

.site-header { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header__rule { height: 4px; background: var(--navy); }
.site-header__bar {
  max-width: 960px; margin: 0 auto; padding: 12px 18px; display: flex; align-items: center;
  gap: 12px; flex-wrap: wrap; row-gap: 4px;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; min-width: 0; }
.brand:hover { color: inherit; }
.brand img { width: 42px; height: 42px; object-fit: cover; border-radius: var(--radius); flex: none; }
/* The name/subtitle block must shrink with its flex parent, or the ellipsis below never
   kicks in and a long host school name overlaps the links that follow it. */
.brand > span { min-width: 0; }
.brand__name { display: block; font-family: var(--display); font-size: 21px; font-weight: 700; color: var(--navy); line-height: 1.1; }
.brand__sub {
  display: block; font-size: 11px; color: var(--muted-2); letter-spacing: 0.04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.header-link { font-size: 13px; color: var(--muted-2); text-decoration: none; white-space: nowrap; }
.header-link:hover { color: var(--navy-hover); }

.tabs { border-top: 1px solid var(--line-3); }
.tabs__inner { max-width: 960px; margin: 0 auto; padding: 0 18px; display: flex; gap: 22px; }
.tab {
  padding: 13px 4px 11px; font-size: 13px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 3px solid transparent; text-decoration: none; white-space: nowrap;
}
.tab:hover { color: var(--navy-hover); }
.tab.is-active { color: var(--ink); border-bottom-color: var(--sky); }

.admin-header { background: var(--navy); color: #fff; }
.admin-header__bar {
  max-width: 1320px; margin: 0 auto; padding: 12px 22px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.admin-header img { width: 38px; height: 38px; object-fit: cover; border-radius: var(--radius); }
.admin-header__name { display: block; font-family: var(--display); font-size: 19px; font-weight: 700; line-height: 1.1; }
.admin-header__sub { display: block; font-size: 11px; color: rgba(255, 255, 255, 0.72); }
.admin-header__who { text-align: right; font-size: 13px; line-height: 1.35; }
.admin-header__who span { color: rgba(255, 255, 255, 0.72); display: block; }
.admin-header a, .admin-header .brand, .admin-header .brand:hover { color: #fff; text-decoration: none; }
.admin-nav {
  background: var(--navy-dark); border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.admin-nav__inner { max-width: 1320px; margin: 0 auto; padding: 0 22px; display: flex; gap: 20px; flex-wrap: wrap; }
.admin-nav a {
  color: rgba(255, 255, 255, 0.8); text-decoration: none; font-size: 13px; padding: 11px 0 9px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 3px solid transparent;
}
.admin-nav a:hover { color: #fff; }
.admin-nav a.is-active { color: #fff; border-bottom-color: var(--sky); }
.btn-ghost-light {
  border: 1px solid rgba(255, 255, 255, 0.4); padding: 7px 14px; border-radius: var(--radius);
  font-size: 13px; background: none; color: #fff; cursor: pointer; text-decoration: none;
}
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* ------------------------------------------------------------------ blocks */

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
}
.card--accent { border-left: 4px solid var(--sky); }
.card--navy-accent { border-left: 4px solid var(--navy); }
.card--top { border-top: 4px solid var(--section); }
.card--flat { padding: 0; overflow: hidden; }
.card--sand { background: var(--sand); border: 1px solid var(--line); }
.card__head {
  padding: 16px 18px; border-bottom: 1px solid var(--line-3);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.card__body { padding: 18px; }
.card__foot { padding: 12px 18px; font-size: 13px; color: var(--muted-3); border-top: 1px solid var(--line-3); }

.eyebrow {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--navy-hover); font-weight: 700;
}
.eyebrow--muted { color: var(--muted-2); letter-spacing: 0.14em; }
.section-title {
  font-size: 23px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--sky);
  color: var(--sky);
}
.lead { font-size: 17px; color: var(--ink-2); }
.hero-title { font-size: 32px; margin-bottom: 12px; color: var(--sky); }

.steps__num {
  width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px;
  margin-bottom: 10px;
}

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: var(--radius); font-weight: 700; font-size: 14px;
  text-transform: uppercase; letter-spacing: 0.04em;
  cursor: pointer; border: 1px solid transparent; text-decoration: none; line-height: 1.2;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-hover); color: #fff; }
.btn--green { background: var(--green); color: #fff; }
.btn--green:hover { background: var(--green-dark); color: #fff; }
.btn--outline { background: var(--surface); border-color: var(--navy); color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: #fff; }
.btn--danger { background: var(--surface); border-color: var(--line-2); color: var(--bordeaux); }
.btn--danger:hover { background: #faf2f3; color: var(--bordeaux); }
.btn--section { background: var(--surface); border-color: var(--section); color: var(--section); }
.btn--section:hover { background: var(--section); color: #fff; }
.btn--sm { padding: 8px 14px; font-size: 12px; }
.btn--block { width: 100%; }
.btn-link {
  background: none; border: none; padding: 0; color: var(--muted); cursor: pointer;
  font-size: 14px; text-decoration: none;
}
.btn-link:hover { color: var(--navy-hover); }
.back-link { display: inline-block; margin-bottom: 12px; font-size: 14px; color: var(--muted-2); text-decoration: none; }
.back-link:hover { color: var(--navy-hover); }

/* ------------------------------------------------------------------ tags */

.tag {
  display: inline-block; background: var(--section); color: #fff; font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 9px;
  border-radius: var(--radius-sm); white-space: nowrap;
}
.tag--sm { font-size: 10px; }
.badge {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px;
  border-radius: var(--radius-sm); white-space: nowrap;
  color: var(--badge-ink); background: var(--badge-bg); border: 1px solid var(--badge-ink);
}
.chip {
  padding: 6px 12px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
  cursor: pointer; border: 1px solid var(--line-2); background: var(--surface);
  color: var(--ink-3); text-decoration: none; display: inline-block;
}
.chip:hover { border-color: var(--navy); color: var(--navy); }
.chip.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.date-chip {
  display: inline-flex; gap: 5px; align-items: baseline; font-size: 13px; padding: 5px 10px;
  border-radius: var(--radius-sm); border: 1px solid color-mix(in srgb, var(--section) 40%, transparent);
  background: color-mix(in srgb, var(--section) 6%, transparent); color: var(--ink);
}
.date-chip--full { border-color: var(--line); background: var(--sand-3); color: var(--faint); }
.date-chip span:last-child { opacity: 0.72; }

/* ------------------------------------------------------------------ program cards */

.section-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex;
}
.section-card__bar { width: 6px; background: var(--section); flex: none; }
.section-card__body { padding: 20px; flex: 1; min-width: 0; }
.section-pick {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-top: 4px solid var(--section); border-radius: var(--radius); padding: 18px;
  min-height: 170px; text-decoration: none; color: inherit;
}
.section-pick:hover { box-shadow: var(--shadow); color: inherit; }
.section-pick .tag { align-self: flex-start; }
.section-pick__title { font-family: var(--display); font-size: 18px; font-weight: 700; margin: 10px 0 6px; }
.section-pick__teaser { font-size: 14px; color: var(--muted); flex: 1; }
.section-pick__count { margin-top: 12px; font-size: 13px; color: var(--ink-2); font-weight: 600; }

/* ------------------------------------------------------------------ forms */

.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea {
  padding: 11px 12px; border: 1px solid var(--line-2); border-radius: var(--radius);
  font-weight: 400; color: var(--ink); background: #fff; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--navy); outline-offset: 1px; border-color: var(--navy);
}
.field textarea { resize: vertical; }
.field input[type="color"] { height: 42px; padding: 3px; }
.field--error input, .field--error select, .field--error textarea { border-color: var(--bordeaux); background: #fffafb; }
.field__hint { font-weight: 400; font-size: 12px; color: var(--muted-3); }
.field-error { color: var(--bordeaux); font-size: 13px; font-weight: 600; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-3); font-weight: 400; }
.check input { margin-top: 4px; width: 17px; height: 17px; flex: none; }
.form__actions {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  padding-top: 6px; border-top: 1px solid var(--line-3);
}
.fieldset-title { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; }

/* ------------------------------------------------------------------ stepper */

.stepper { display: flex; gap: 6px; margin-bottom: 24px; }
.stepper__item { flex: 1; min-width: 0; }
.stepper__bar { height: 4px; border-radius: var(--radius-sm); background: var(--line); margin-bottom: 7px; }
.stepper__label { font-size: 12px; font-weight: 500; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stepper__item.is-done .stepper__bar { background: var(--navy); }
.stepper__item.is-done .stepper__label { font-weight: 700; color: var(--navy); }

/* ------------------------------------------------------------------ calendar */

.calendar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.calendar__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.calendar__month { font-family: var(--display); font-size: 19px; font-weight: 700; }
.calendar__month::first-letter, .capital::first-letter { text-transform: uppercase; }
.capital { display: inline-block; }
/* inline-block is required by ::first-letter, but would break a table cell. */
td.capital, th.capital { display: table-cell; }
.calendar__nav {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-2); border-radius: var(--radius); font-size: 20px; line-height: 1;
  color: var(--navy); background: #fff; text-decoration: none;
}
.calendar__nav:hover { border-color: var(--navy); background: var(--sand-2); }
.calendar__dows { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 6px; }
.calendar__dow {
  text-align: center; font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--faint); text-transform: uppercase; padding-bottom: 4px;
}
.calendar__weeks { display: flex; flex-direction: column; gap: 5px; }
.calendar__week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-day {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 52px; border-radius: var(--radius); font-size: 15px; font-weight: 500;
  border: 1px solid var(--line-3); background: #f1f4f6; color: #a9b8bf;
  text-decoration: none; padding: 2px;
}
.cal-day--void { border-color: transparent; background: transparent; }
.cal-day__places { font-size: 10px; font-weight: 600; letter-spacing: 0.02em; color: var(--section); }
.cal-day.is-open {
  background: #fff; color: var(--ink); font-weight: 700; cursor: pointer;
  border: 1px solid var(--section); box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--section) 15%, transparent);
}
.cal-day.is-open:hover { background: color-mix(in srgb, var(--section) 8%, #fff); }
.cal-day.is-full {
  background: var(--sand-2); color: var(--faint); border: 1px dashed var(--line-2); cursor: not-allowed;
}
.cal-day.is-full .cal-day__places { color: var(--faint); }
/* An afternoon program the student may add to the slot (BPJEPS after a morning). */
.extra-tag {
  display: inline-block; padding: 1px 5px; border-radius: var(--radius-sm);
  background: var(--extra); color: #fff; font-size: 10px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; line-height: 1.5;
}
.cal-day.is-selected .extra-tag { box-shadow: 0 0 0 1px #fff; }
.calendar__legend .extra-tag { margin-right: 2px; }
.period-choice .extra-tag { font-size: 11px; }
.cal-day.is-selected {
  background: var(--section); color: #fff; border-color: var(--section); font-weight: 700;
}
.cal-day.is-selected .cal-day__places { color: rgba(255, 255, 255, 0.85); }
.cal-day.is-editable { cursor: pointer; }
.cal-day--past {
  /* Hatched, so a past day never reads like a free day still waiting to be opened. */
  background:
    repeating-linear-gradient(-45deg, transparent 0 4px, rgba(38, 50, 56, 0.05) 4px 8px),
    #e9eef1;
  border-color: transparent; color: #aab8bf; cursor: default;
}
.cal-day--past .cal-day__places { color: #aab8bf; }
.cal-day.is-editing { outline: 2px solid var(--navy); outline-offset: 1px; }
.cal-day.is-today { box-shadow: inset 0 0 0 1px var(--navy); }
.calendar__legend {
  display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--line-3); font-size: 13px; color: var(--muted-2);
}
.calendar__legend > div { display: flex; align-items: center; gap: 7px; }
.swatch { width: 14px; height: 14px; border-radius: var(--radius-sm); display: inline-block; }
.swatch--open { background: #fff; border: 1px solid var(--section); }
.swatch--none { background: var(--sand-3); border: 1px solid var(--line); }
.swatch--selected { background: var(--section); }

/* Availability calendar: every day spells out its slots. */
.calendar-detailed .cal-day { min-height: 74px; padding: 5px 2px; gap: 1px; }
.calendar-detailed .cal-day__places { font-size: 10px; line-height: 1.35; }
.calendar-detailed .cal-day.is-full .cal-day__places { color: var(--muted-2); }

.calendar--compact { padding: 14px; }
.calendar--compact .calendar__weeks, .calendar--compact .calendar__week { gap: 3px; }
.calendar--compact .calendar__dows { gap: 3px; }
.calendar--compact .cal-day { min-height: 28px; font-size: 11px; gap: 0; }
.calendar--compact .cal-day.is-open { background: var(--section); color: #fff; border-color: transparent; box-shadow: none; }
.calendar--compact .cal-day.is-full { background: #dde4e8; color: var(--faint); border-color: transparent; }
.calendar--compact .cal-day__places { display: none; }
.calendar--compact .calendar__dow { font-size: 9px; }

.periods { display: flex; flex-direction: column; gap: 8px; }
.period-choice {
  display: flex; align-items: center; gap: 12px; justify-content: space-between;
  border: 1px solid var(--line-2); border-radius: var(--radius); padding: 12px 14px;
  background: #fff; text-decoration: none; color: inherit;
}
.period-choice:hover { border-color: var(--section); color: inherit; }
.period-choice.is-selected { border-color: var(--section); box-shadow: inset 0 0 0 1px var(--section); }
.period-choice.is-disabled { opacity: 0.55; pointer-events: none; }
.period-choice__label { font-weight: 600; }

/* ------------------------------------------------------------------ tables */

.table-wrap { overflow-x: auto; }
.table { width: 100%; font-size: 14px; }
.table th {
  padding: 10px 14px; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted-2); border-bottom: 1px solid var(--line); background: var(--sand-2);
  text-align: left; white-space: nowrap;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-3); vertical-align: top; }
.table tbody tr:hover { background: var(--sand-2); }
.table__strong { font-weight: 600; white-space: nowrap; }
.table__sub { color: var(--muted-3); font-size: 13px; }
.table__motivation { color: var(--muted); font-size: 13px; max-width: 220px; min-width: 150px; }
.table--applications { min-width: 0; }
.table__break { overflow-wrap: anywhere; }
.table--admin { min-width: 940px; }
.empty {
  padding: 40px 18px; text-align: center; color: var(--muted-3); font-size: 15px;
}

/* ------------------------------------------------------------------ indicators */

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.kpi__label { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; }
.kpi__value { font-family: var(--display); font-size: 32px; font-weight: 700; line-height: 1.2; }
.kpi__note { font-size: 13px; color: var(--muted-3); }
.dot { width: 12px; height: 12px; border-radius: var(--radius-sm); background: var(--section); display: inline-block; }

/* ------------------------------------------------------------------ messages */

.view-banner {
  display: flex; gap: 14px; align-items: center; justify-content: center;
  padding: 8px 22px; font-size: 14px; font-weight: 600; background: var(--gold); color: #fff;
}
.flashes { position: relative; }
.flash {
  padding: 11px 22px; font-size: 14px; display: flex; gap: 10px; align-items: center;
  background: var(--green); color: #fff;
}
.flash--error { background: var(--bordeaux); }
.flash--info { background: var(--navy); }
.flash__inner { max-width: 1320px; margin: 0 auto; width: 100%; display: flex; gap: 10px; align-items: center; }
.flash__pastille {
  background: rgba(255, 255, 255, 0.2); border-radius: var(--radius-sm); padding: 2px 7px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
}
.notice {
  border: 1px solid var(--line); border-left: 4px solid var(--gold); background: #fdf8ee;
  padding: 14px 16px; border-radius: var(--radius); font-size: 15px; color: var(--ink-2);
}
.notice--error { border-left-color: var(--bordeaux); background: #f9eef0; }

/* Full day or half-days: a date receives one kind only, so the referent picks the kind
   first and only the fields of that kind show. */
.segmented {
  display: inline-flex; align-self: flex-start; max-width: 100%;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  overflow: hidden; background: var(--surface);
}
.segmented label {
  position: relative; padding: 7px 14px; font-size: 13px; font-weight: 700;
  color: var(--ink-3); cursor: pointer; white-space: nowrap;
}
.segmented label + label { border-left: 1px solid var(--line-2); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:has(input:checked) { background: var(--navy); color: #fff; }
.segmented label:has(input:focus-visible) { outline: 2px solid var(--navy-hover); outline-offset: -3px; }
.period-switch { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.period-switch__full, .period-switch__half { display: flex; flex-direction: column; gap: 10px; }
.period-switch:has(input[name="mode"][value="full"]:checked) .period-switch__half,
.period-switch:has(input[name="mode"][value="half"]:checked) .period-switch__full { display: none; }
.period-switch:not(:has(input[name="periods"][value="morning"]:checked)) .period-switch__option { display: none; }

/* The commitment alert only shows once the afternoon option is ticked. */
.combined-option { display: grid; gap: 10px; }
.combined-option__choice {
  padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--extra) 45%, transparent);
  border-left: 4px solid var(--extra); background: color-mix(in srgb, var(--extra) 7%, var(--surface));
  font-size: 15px; font-weight: 700; color: var(--ink); cursor: pointer;
}
.combined-option__choice input { accent-color: var(--extra); }
.combined-option:not(:has(input[name="afternoon_option"]:checked)) .combined-option__alert { display: none; }

.confirm {
  background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--green);
  border-radius: var(--radius); padding: 34px 26px; text-align: center; max-width: 620px; margin: 0 auto;
}
.confirm__mark {
  width: 56px; height: 56px; border-radius: 50%; background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 0 auto 18px;
}
.recap {
  text-align: left; background: var(--sand-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 8px; font-size: 15px;
}
.recap__line { display: flex; justify-content: space-between; gap: 14px; }
.recap__line span { color: var(--muted-2); }

.definition { display: grid; grid-template-columns: minmax(160px, 240px) 1fr; gap: 6px 18px; font-size: 15px; }
.definition dt { color: var(--muted-2); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.definition dd { margin: 0; }

.split { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 22px; align-items: start; }
.split--large { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.footer {
  border-top: 1px solid var(--line); padding: 18px; text-align: center;
  color: var(--muted-3); font-size: 13px; background: var(--surface);
}

/* ------------------------------------------------------------------ responsive */

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .definition { grid-template-columns: 1fr; }
  .definition dd { margin-bottom: 8px; }
}

@media (max-width: 620px) {
  .gate__title { font-size: 38px; }
  .hero-title { font-size: 26px; }
  .stepper__label { font-size: 10px; }
  .container { padding: 18px 14px 60px; }
  .container--wide { padding: 18px 14px 60px; }
  .cal-day { min-height: 44px; font-size: 13px; }
  /* Too narrow a cell for the label: the badge shrinks to a dot of the same color. */
  .cal-day .extra-tag, .calendar__legend .extra-tag {
    font-size: 0; width: 9px; height: 9px; padding: 0; border-radius: 50%;
  }
  /* The 420px-minimum columns of .grid-forms are wider than a phone screen: a single
     column keeps each card from overflowing the page. */
  .grid-forms { grid-template-columns: 1fr; }
}

@media print {
  .site-header, .admin-header, .admin-nav, .footer, .btn, .flash, .view-banner { display: none !important; }
}
