:root {
  --ink: #13212a;
  --muted: #61717b;
  --line: #d9e2e6;
  --paper: #f6f3ed;
  --surface: #ffffff;
  --surface-strong: #fffaf2;
  --ocean: #006d83;
  --ocean-dark: #06495a;
  --ocean-soft: #dff3f4;
  --coral: #e35d48;
  --gold: #d8a642;
  --green: #2e8b6d;
  --shadow: 0 18px 45px rgba(19, 33, 42, 0.12);
  --shadow-soft: 0 12px 30px rgba(19, 33, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 4%, rgba(216, 166, 66, 0.2), transparent 26rem),
    radial-gradient(circle at 96% 10%, rgba(0, 109, 131, 0.14), transparent 28rem),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

main {
  flex: 1;
  min-width: 0;
  width: 100%;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

.disabled-link {
  opacity: 0.55;
  cursor: not-allowed;
}

button,
input,
select,
textarea {
  font: inherit;
  touch-action: manipulation;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(255, 250, 242, 0.9);
  border-bottom: 1px solid rgba(19, 33, 42, 0.08);
  box-shadow: 0 8px 30px rgba(19, 33, 42, 0.06);
  backdrop-filter: blur(18px);
}

.brand,
.header-actions,
.main-nav,
.hero-actions,
.results-toolbar,
.view-toggle,
.trust-strip,
.map-legend,
.site-footer,
.site-footer nav {
  display: flex;
  align-items: center;
}

.brand {
  min-width: max-content;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
}

.brand-logo {
  display: block;
  width: 100%;
  height: 100%;
}

.main-nav {
  justify-content: center;
  gap: 26px;
  color: #354750;
  font-size: 15px;
}

.main-nav a:hover {
  color: var(--ocean);
}

.main-nav a.active,
.main-nav a[aria-current="page"] {
  color: var(--ocean-dark);
  font-weight: 850;
  text-decoration: underline;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 3px;
  text-underline-offset: 10px;
}

.master-nav-link {
  color: var(--coral);
  font-weight: 850;
}

.header-actions {
  gap: 10px;
}

.account-widget {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  max-width: 240px;
  padding: 0 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.account-chip span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  background: var(--ocean-dark);
  color: white;
  border-radius: 50%;
  font-size: 12px;
}

.solid-button,
.ghost-button,
.glass-button,
.quiet-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 750;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.solid-button {
  padding: 0 18px;
  background: linear-gradient(135deg, var(--coral), #c83f32);
  color: white;
  box-shadow: 0 12px 26px rgba(227, 93, 72, 0.24);
}

.solid-button:hover,
.ghost-button:hover,
.glass-button:hover,
.quiet-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.ghost-button {
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.86);
  border-color: var(--line);
}

.solid-button:active,
.ghost-button:active,
.glass-button:active,
.quiet-button:active,
.icon-button:active,
.view-toggle button:active {
  transform: translateY(0) scale(0.98);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(0, 109, 131, 0.28);
  outline-offset: 3px;
}

.quiet-button {
  padding: 0 16px;
  background: #eef1f2;
  border-color: #d7dee2;
  color: #5c6a72;
  box-shadow: none;
}

.glass-button {
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.42);
  color: white;
}

.icon-button {
  width: 42px;
  background: white;
  border-color: var(--line);
}

.icon-button svg,
.view-toggle svg {
  width: 18px;
  height: 18px;
}

.large {
  min-height: 52px;
  padding: 0 22px;
}

.full {
  width: 100%;
}

.hero {
  position: relative;
  min-height: 690px;
  display: grid;
  align-content: end;
  padding: 120px clamp(18px, 5vw, 72px) 32px;
  color: white;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("/assets/images/sailing/hero-sailing.jpg") center / cover;
}

.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 16% 20%, rgba(216, 166, 66, 0.32), transparent 21rem),
    radial-gradient(circle at 78% 10%, rgba(227, 93, 72, 0.28), transparent 24rem),
    linear-gradient(90deg, rgba(6, 73, 90, 0.9), rgba(6, 73, 90, 0.46) 56%, rgba(19, 33, 42, 0.24));
}

.hero-media::after {
  position: absolute;
  inset: auto 0 0;
  height: 180px;
  content: "";
  background: linear-gradient(0deg, var(--paper), rgba(246, 243, 237, 0));
}

.hero-content {
  max-width: 760px;
  padding-bottom: 110px;
}

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

.hero .eyebrow {
  color: #ffd2c9;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(46px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 22px;
  line-height: 1.2;
}

.hero-content p {
  max-width: 610px;
  font-size: 19px;
  color: rgba(255, 255, 255, 0.86);
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
}

.hero-search {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  max-width: 900px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-search label,
.filters label,
.filter-group {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.filters input[type="checkbox"] {
  width: auto;
  min-height: 0;
  padding: 0;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
}

textarea {
  min-height: 110px;
  padding: 12px;
  resize: vertical;
}

.trust-strip {
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 32px;
  padding: 20px clamp(18px, 5vw, 72px);
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.trust-strip span {
  color: var(--muted);
  font-size: 14px;
}

.trust-strip strong {
  font-size: 15px;
}

.section {
  padding: 86px clamp(18px, 5vw, 72px);
}

.section-heading,
.split,
.guide-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: start;
}

.section-heading {
  margin-bottom: 30px;
}

.section-heading > p,
.split > div > p,
.guide-copy p {
  color: var(--muted);
  font-size: 18px;
}

.quiz-panel,
.filters,
.results-shell,
.pathway-table,
.cta,
.admin-login,
.admin-panel,
.auth-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.quiz-panel {
  padding: 24px;
}

.quiz-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}

.quiz-progress span {
  padding: 9px 8px;
  background: #eaf4f0;
  color: var(--green);
  border-radius: 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.choice-grid button {
  min-height: 76px;
  padding: 12px;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 750;
  text-align: left;
}

.choice-grid button:hover,
.choice-grid button.selected {
  border-color: var(--ocean);
  background: #e7f3f5;
}

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

.filters {
  position: sticky;
  top: 92px;
  display: grid;
  align-self: start;
  gap: 18px;
  padding: 18px;
  overflow: visible;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: -18px -18px 0;
  padding: 16px 18px;
  background: linear-gradient(135deg, #f8fbfb, #eef6f3);
  border-bottom: 1px solid var(--line);
}

.filter-header h3 {
  margin: 0;
}

.filter-header button {
  min-height: 34px;
  padding: 0 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--coral);
  cursor: pointer;
  font-weight: 800;
}

.filter-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.filter-title {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.country-filter,
.course-type-filter {
  position: relative;
}

.multi-select-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  text-align: left;
}

.multi-select-toggle svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: var(--muted);
  transition: transform 160ms ease;
}

.multi-select-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.filter-label span:first-child {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-label span:last-child {
  flex: 0 0 auto;
  padding: 3px 8px;
  background: #eaf4f0;
  border-radius: 999px;
  color: var(--green);
  font-size: 11px;
  font-weight: 850;
}

.country-options,
.filter-options {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 15;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 330px;
  overflow: auto;
  padding: 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(19, 33, 42, 0.16);
  scrollbar-width: thin;
}

.country-options[hidden],
.filter-options[hidden] {
  display: none;
}

.filter-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: auto;
  gap: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.filter-chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.filter-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  background: #f7faf9;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #42545d;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.filter-chip input:checked + span {
  background: var(--ocean-dark);
  border-color: var(--ocean-dark);
  color: white;
  box-shadow: 0 8px 18px rgba(6, 73, 90, 0.16);
}

.filter-chip input:focus-visible + span {
  outline: 3px solid rgba(0, 109, 131, 0.22);
  outline-offset: 2px;
}

.filter-chip.primary input:checked + span {
  background: var(--coral);
  border-color: var(--coral);
  box-shadow: 0 8px 18px rgba(227, 93, 72, 0.18);
}

fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

fieldset label {
  font-size: 13px;
}

.results-shell {
  padding: 16px;
  min-width: 0;
  overflow: hidden;
}

.results-toolbar {
  justify-content: space-between;
  margin-bottom: 14px;
}

.view-toggle {
  gap: 4px;
  padding: 4px;
  background: #edf2f3;
  border-radius: 8px;
}

.view-toggle button {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
}

.view-toggle .active {
  background: white;
  box-shadow: 0 4px 10px rgba(19, 33, 42, 0.08);
}

.results-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38%;
  gap: 16px;
}

.listing-grid {
  display: grid;
  gap: 14px;
}

.course-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  min-height: 156px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff, #fbfcfb);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(19, 33, 42, 0.055);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.course-card:hover {
  border-color: rgba(0, 109, 131, 0.25);
  box-shadow: 0 14px 30px rgba(19, 33, 42, 0.09);
  transform: translateY(-2px);
}

.course-card img {
  width: 132px;
  height: 132px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 7px;
}

.card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  background: #e8f2f4;
  color: var(--ocean-dark);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.tag.warm {
  background: #fff2dc;
  color: #8b5d00;
}

.tag.seats {
  background: #eaf4f0;
  color: var(--green);
}

.tag.discount {
  background: #ffe8e2;
  color: var(--coral);
}

.old-price {
  color: var(--muted);
  text-decoration: line-through;
}

.course-card h3 {
  margin-bottom: 6px;
  font-size: 19px;
}

.course-card p {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #455963;
  font-size: 13px;
  font-weight: 700;
}

.course-apply {
  min-height: 36px;
  margin-top: 12px;
  padding-inline: 12px;
}

.seat-quantity {
  display: grid;
  grid-template-columns: auto minmax(120px, 180px);
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.seat-quantity select {
  min-height: 42px;
  background: white;
}

.detail-seat-quantity {
  max-width: 360px;
  margin: 20px 0 8px;
}

.reservation-modal[hidden] {
  display: none;
}

.reservation-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
}

.reservation-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(19, 33, 42, 0.54);
  backdrop-filter: blur(8px);
}

.reservation-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  max-height: min(720px, calc(100dvh - 36px));
  overflow: auto;
  padding: 28px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(19, 33, 42, 0.28);
}

.reservation-dialog h2 {
  margin-bottom: 10px;
  font-size: clamp(28px, 5vw, 38px);
}

.reservation-close {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 24px;
  line-height: 1;
}

.reservation-terms {
  margin: 18px 0;
  padding: 16px;
  background: #fff7e8;
  border: 1px solid #f0d7a7;
  border-radius: 8px;
}

.reservation-terms p {
  margin: 8px 0 0;
  color: #5f4b24;
}

.reservation-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink);
  font-weight: 750;
}

.reservation-check input {
  width: 20px;
  min-width: 20px;
  min-height: 20px;
  margin-top: 2px;
}

.location-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
}

.location-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(19, 33, 42, 0.58);
  backdrop-filter: blur(8px);
}

.location-picker-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  width: min(100%, 900px);
  max-height: min(760px, calc(100dvh - 36px));
  padding: 24px;
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(19, 33, 42, 0.28);
}

.location-picker-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.location-picker-header h2 {
  margin: 0;
  font-size: clamp(28px, 5vw, 40px);
}

.location-picker-close {
  font-size: 24px;
  line-height: 1;
}

.location-picker-map {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  background: #cde8e9;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.location-picker-coordinates {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.location-picker-coordinates span {
  padding: 6px 10px;
  background: #eef1f2;
  border-radius: 8px;
}

.map-panel {
  position: sticky;
  top: 92px;
  height: 640px;
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #cde8e9;
  box-shadow: 0 10px 28px rgba(19, 33, 42, 0.1);
  isolation: isolate;
  touch-action: pan-x pan-y;
}

#courseMap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Local fallback for Leaflet's layout rules if the CDN stylesheet is slow or blocked. */
.leaflet-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #cde8e9;
  outline: 0;
}

.leaflet-pane,
.leaflet-map-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
  position: absolute;
  left: 0;
  top: 0;
}

.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
  user-select: none;
  -webkit-user-drag: none;
}

.leaflet-container img.leaflet-tile {
  display: block;
  max-width: none !important;
  max-height: none !important;
}

.leaflet-tile-pane {
  z-index: 200;
}

.leaflet-overlay-pane {
  z-index: 400;
}

.leaflet-shadow-pane {
  z-index: 500;
}

.leaflet-marker-pane {
  z-index: 600;
}

.leaflet-tooltip-pane {
  z-index: 650;
}

.leaflet-popup-pane {
  z-index: 700;
}

.leaflet-control-container {
  position: absolute;
  inset: 0;
  z-index: 800;
  pointer-events: none;
}

.leaflet-control {
  pointer-events: auto;
}

.leaflet-popup-content {
  margin: 12px 14px;
}

.leaflet-control-attribution {
  padding: 3px 6px;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 6px;
  color: #546771;
  font-size: 10px;
  line-height: 1.2;
}

.leaflet-control-attribution a {
  color: #355763;
}

.school-pin-wrap {
  background: transparent;
  border: 0;
}

.school-pin {
  position: relative;
  display: block;
  width: 28px;
  height: 28px;
  background: var(--ocean);
  border: 3px solid white;
  border-radius: 50% 50% 50% 0;
  box-shadow: 0 10px 20px rgba(19, 33, 42, 0.28);
  transform: rotate(-45deg);
}

.school-pin::before {
  position: absolute;
  inset: 6px;
  content: "";
  background: white;
  border-radius: 50%;
}

.school-pin::after {
  position: absolute;
  left: -7px;
  bottom: -8px;
  width: 34px;
  height: 10px;
  content: "";
  background: rgba(19, 33, 42, 0.18);
  border-radius: 50%;
  filter: blur(3px);
  transform: rotate(45deg);
}

.pin-skipper {
  background: var(--green);
}

.pin-advanced {
  background: var(--coral);
}

.map-panel::after {
  position: absolute;
  left: 50%;
  top: 14px;
  z-index: 801;
  padding: 8px 12px;
  content: "Drag to move";
  background: rgba(19, 33, 42, 0.82);
  color: white;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 750;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity 160ms ease;
}

.popup-title {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
}

.popup-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.map-water {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 58%, rgba(255, 255, 255, 0.45) 0 9%, transparent 10%),
    radial-gradient(circle at 67% 63%, rgba(255, 255, 255, 0.42) 0 12%, transparent 13%),
    linear-gradient(135deg, #b7e1e5, #5fb0be);
}

.map-water::before,
.map-water::after {
  position: absolute;
  content: "";
  background: rgba(255, 255, 255, 0.34);
  border-radius: 50%;
}

.map-water::before {
  width: 190px;
  height: 120px;
  left: 34%;
  top: 23%;
  transform: rotate(-22deg);
}

.map-water::after {
  width: 150px;
  height: 80px;
  right: 8%;
  top: 12%;
  transform: rotate(18deg);
}

.marker {
  position: absolute;
  z-index: 2;
  min-width: 44px;
  height: 34px;
  border: 2px solid white;
  border-radius: 999px;
  color: white;
  box-shadow: 0 8px 18px rgba(19, 33, 42, 0.24);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.marker.rya,
.dot.rya {
  background: var(--ocean);
}

.marker.asa,
.dot.asa {
  background: var(--coral);
}

.marker.iyt,
.dot.iyt {
  background: var(--green);
}

.marker.cluster {
  background: var(--gold);
  color: var(--ink);
}

.map-legend {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 402;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 50%;
}

.pathway-table {
  overflow: hidden;
}

.table-row {
  display: grid;
  grid-template-columns: 0.8fr repeat(3, 1fr);
  gap: 1px;
  border-top: 1px solid var(--line);
}

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

.table-row > * {
  padding: 18px;
  background: white;
}

.table-head > * {
  background: var(--ocean-dark);
  color: white;
  font-weight: 850;
}

.guide-section {
  align-items: center;
  background: var(--ocean-dark);
  color: white;
}

.guide-section .eyebrow {
  color: #ffd2c9;
}

.guide-copy p {
  color: rgba(255, 255, 255, 0.78);
}

.guide-section img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: 8px;
}

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

.image-card-grid article {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.image-card-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.image-card-grid h3,
.image-card-grid p {
  margin: 0;
  padding: 0 18px 18px;
}

.image-card-grid h3 {
  padding-top: 18px;
}

.image-card-grid p {
  color: var(--muted);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 28px;
}

.metrics span {
  display: grid;
  gap: 3px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
}

.metrics strong {
  font-size: 24px;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.article-grid article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.article-grid article a {
  display: grid;
  height: 100%;
}

.article-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.article-grid span,
.article-grid h3 {
  display: block;
  padding-inline: 16px;
}

.article-grid span {
  padding-top: 16px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 850;
}

.article-grid h3 {
  padding-bottom: 18px;
  font-size: 21px;
}

.article-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.75fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  padding: 86px clamp(18px, 5vw, 72px) 40px;
}

.article-hero h1 {
  color: var(--ink);
  font-size: clamp(42px, 6vw, 76px);
}

.article-hero p {
  max-width: 680px;
  color: var(--muted);
  font-size: 19px;
}

.article-hero img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.article-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 70px);
  padding-top: 34px;
}

.article-sidebar {
  position: sticky;
  top: 94px;
  display: grid;
  align-self: start;
  gap: 8px;
}

.article-sidebar a {
  padding: 10px 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #42545d;
  font-size: 14px;
  font-weight: 800;
}

.article-body {
  display: grid;
  gap: 42px;
  max-width: 920px;
}

.article-body section {
  padding: 26px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.article-body p,
.article-body li {
  color: var(--muted);
  font-size: 17px;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.fact-grid span {
  display: grid;
  gap: 4px;
  padding: 14px;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.fact-grid strong {
  color: var(--ocean-dark);
}

.check-list {
  display: grid;
  gap: 10px;
  padding-left: 20px;
}

.compact-table .table-row {
  grid-template-columns: 0.7fr 1fr 1.2fr;
}

.cta {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  align-items: start;
  gap: clamp(28px, 5vw, 70px);
  text-align: left;
  margin: 0 clamp(18px, 5vw, 72px) 86px;
  padding: 36px;
}

.cta p {
  max-width: 620px;
  color: var(--muted);
}

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

.provider-form label,
.master-listing-form label,
.school-access-form label,
.profile-form label,
.admin-login label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  text-align: left;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-note {
  margin: 0;
  font-size: 14px;
}

.admin-section {
  padding-top: 0;
}

.admin-login {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: end;
  gap: 14px;
  padding: 18px;
  margin-bottom: 18px;
}

.admin-login .form-note {
  grid-column: 1 / -1;
}

.master-login {
  grid-template-columns: minmax(260px, 1fr) auto;
}

.master-login h3 {
  margin-bottom: 6px;
}

.master-login-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
}

.admin-panel {
  padding: 18px;
}

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

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

.admin-filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(120px, auto)) auto;
  gap: 10px;
  margin: 10px 0 12px;
  padding: 10px;
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-filter-bar input,
.admin-filter-bar select {
  min-width: 0;
}

.admin-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px;
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-card h3 {
  margin-bottom: 6px;
  font-size: 18px;
}

.admin-card p {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}

.admin-card code {
  overflow-wrap: anywhere;
  color: var(--ocean-dark);
}

.admin-role-form {
  display: grid;
  gap: 10px;
  min-width: min(100%, 340px);
}

.admin-role-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.master-listing-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.master-listing-form .solid-button {
  justify-self: start;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #fff2dc;
  color: #8b5d00;
  font-size: 12px;
  font-weight: 850;
}

.status-pill.approved {
  background: #eaf4f0;
  color: var(--green);
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-panel {
  display: grid;
  gap: 12px;
  padding: 22px;
}

.auth-page {
  position: relative;
}

.auth-signout-corner {
  justify-self: end;
  min-height: 32px;
  padding: 0 11px;
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  font-size: 12px;
  box-shadow: none;
}

.auth-signout-corner:hover {
  background: #eef1f2;
  border-color: var(--line);
  color: var(--ink);
  transform: none;
}

.auth-login-only[hidden],
.auth-signed-out-only[hidden] {
  display: none;
}

.account-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: 1180px;
  margin: 0 auto 18px;
}

.account-toolbar .quiet-button {
  min-height: 38px;
  padding: 0 14px;
}

.account-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 1180px;
  margin: 0 auto 18px;
  padding: 6px;
  background: #eef1f2;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.account-tabs button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 850;
}

.account-tabs button.active {
  background: white;
  border-color: var(--line);
  color: var(--ocean-dark);
  box-shadow: 0 6px 16px rgba(19, 33, 42, 0.08);
}

.account-tab-panel {
  max-width: 1180px;
  margin: 0 auto;
}

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

.panel-heading h3 {
  margin: 0;
}

body.is-signed-in .auth-page {
  grid-template-columns: minmax(0, 1fr);
  max-width: 980px;
}

.role-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.role-list div {
  display: grid;
  gap: 2px;
  padding: 12px;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.role-list strong {
  color: var(--ink);
}

.role-list span {
  color: var(--muted);
  font-size: 14px;
}

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

.about-section {
  display: grid;
  align-content: center;
  gap: 26px;
  min-height: min(680px, calc(100dvh - 156px));
}

.about-panel {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.about-panel p {
  color: var(--muted);
}

.about-panel .solid-button {
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
  text-align: center;
}

.google-button {
  gap: 10px;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  font-size: 14px;
}

.google-mark {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.school-dashboard {
  padding-top: 0;
}

.school-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 6px;
  background: #eef1f2;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.school-tabs button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 850;
}

.school-tabs button.active {
  background: white;
  border-color: var(--line);
  color: var(--ocean-dark);
  box-shadow: 0 6px 16px rgba(19, 33, 42, 0.08);
}

.tab-badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  background: var(--coral);
  color: white;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.school-tab-panel {
  display: grid;
  gap: 18px;
}

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

.profile-preview-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
}

.dashboard-panel {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.public-school-profile {
  padding: 0;
  overflow: hidden;
}

.school-profile-card {
  display: grid;
  gap: 26px;
}

.school-profile-cover {
  min-height: 250px;
  background: #cde8e9 center / cover no-repeat;
}

.school-profile-main {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  padding: 28px 30px 0;
}

.school-profile-logo {
  width: 128px;
  height: 128px;
  object-fit: cover;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(19, 33, 42, 0.1);
}

.school-profile-main h3 {
  margin: 8px 0 2px;
  font-size: clamp(28px, 4vw, 42px);
}

.school-profile-headline {
  color: var(--ink);
  font-weight: 800;
}

.school-profile-about {
  padding: 0 30px;
}

.school-profile-about p {
  color: var(--muted);
  white-space: pre-line;
}

.school-profile-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 30px;
}

.school-profile-facts div {
  min-width: 0;
  padding: 12px;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.school-profile-facts dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.school-profile-facts dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-weight: 800;
}

.school-profile-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 30px 30px;
}

.school-profile-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
}

.school-profile-empty {
  display: grid;
  gap: 8px;
  padding: 22px;
}

.school-profile-listings {
  display: grid;
  gap: 10px;
  padding: 0 30px;
}

.school-profile-listings h4 {
  margin: 0;
  font-size: 18px;
}

.school-profile-listings > p {
  margin: 0;
  color: var(--muted);
}

.school-profile-listings article {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.school-profile-listings img {
  width: 92px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 7px;
}

.school-profile-listings article div {
  display: grid;
  gap: 2px;
}

.school-profile-listings span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.school-listing-edit-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.school-filter-link {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ocean-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.listing-detail {
  max-width: 1180px;
  margin: 0 auto;
}

.listing-detail-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 48px);
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.listing-detail-card > img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  border-radius: 8px;
}

.listing-notice {
  margin: 20px 0;
  padding: 14px;
  background: #fff7e8;
  border: 1px solid #f0d7a4;
  border-radius: 8px;
  color: #6f4c08;
  font-weight: 800;
}

.compact-heading {
  margin-bottom: 18px;
}

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

.data-list {
  display: grid;
  gap: 12px;
}

.data-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.data-card h3 {
  margin-bottom: 0;
}

.data-card dl {
  display: grid;
  gap: 9px;
  margin: 0;
}

.data-card dl div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px;
}

.data-card dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.data-card dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.school-access-form {
  display: grid;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.profile-form {
  display: grid;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.site-footer {
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(18px, 5vw, 72px);
  background: var(--ink);
  color: white;
}

.site-footer span {
  font-weight: 850;
}

.site-footer nav {
  flex-wrap: wrap;
  gap: 18px;
  color: rgba(255, 255, 255, 0.72);
}

@media (max-width: 1050px) {
  .main-nav {
    justify-content: flex-start;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    white-space: nowrap;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .section-heading,
  .split,
  .guide-section,
  .image-card-grid,
  .cta,
  .article-hero,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .results-layout {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .filters,
  .map-panel,
  .article-sidebar {
    position: static;
  }

  .map-panel {
    height: 360px;
  }
}

@media (max-width: 720px) {
  .site-header {
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: auto;
    padding: 10px 14px 12px;
  }

  .brand {
    width: max-content;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .main-nav {
    margin-inline: -14px;
    padding: 2px 14px 8px;
    gap: 14px;
    font-size: 14px;
  }

  .main-nav a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }

  .main-nav a[href="/school-login.html"] {
    display: none;
  }

  .header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .header-actions .solid-button,
  .header-actions .ghost-button,
  .header-actions .quiet-button,
  .account-widget,
  .account-chip {
    width: 100%;
  }

  .header-actions .solid-button,
  .header-actions .ghost-button,
  .header-actions .quiet-button {
    padding-inline: 10px;
    font-size: 12px;
    line-height: 1.15;
    text-align: center;
  }

  .hero {
    min-height: min(780px, calc(100dvh - 24px));
    padding: 72px 16px 22px;
    align-content: end;
  }

  h1 {
    font-size: clamp(38px, 12vw, 48px);
    line-height: 1;
  }

  h2 {
    font-size: clamp(28px, 9vw, 38px);
  }

  .section {
    padding: 58px 16px;
  }

  .about-section {
    align-content: start;
    gap: 20px;
    min-height: auto;
    padding-block: 48px 64px;
  }

  .about-panel {
    padding: 20px;
  }

  .about-panel .solid-button {
    width: 100%;
    min-height: 44px;
    padding-inline: 10px;
  }

  .section-heading {
    gap: 14px;
  }

  .section-heading > p,
  .split > div > p,
  .guide-copy p {
    font-size: 16px;
  }

  .hero-search,
  .course-card,
  .listing-detail-card,
  .table-row,
  .metrics,
  .fact-grid,
  .compact-table .table-row,
  .article-grid,
  .about-grid,
  .choice-grid,
  .form-grid,
  .dashboard-grid,
  .data-card dl div,
  .admin-login,
  .admin-filter-bar,
  .admin-card {
    grid-template-columns: 1fr;
  }

  .hero-search {
    gap: 10px;
    padding: 12px;
  }

  .hero-search .solid-button {
    width: 100%;
  }

  .article-hero {
    gap: 22px;
    padding: 58px 16px 34px;
  }

  .article-hero p {
    font-size: 16px;
  }

  .article-hero img {
    max-height: 360px;
    aspect-ratio: 16 / 10;
  }

  .legal-page .article-body {
    order: 1;
  }

  .legal-page .article-sidebar {
    order: 2;
  }

  .marketplace {
    gap: 14px;
  }

  .filters {
    padding: 14px;
  }

  .filter-header {
    margin: -14px -14px 0;
    padding: 14px;
  }

  .country-options,
  .filter-options {
    position: fixed;
    inset: auto 12px 16px;
    z-index: 60;
    max-height: min(72dvh, 520px);
    padding: 12px;
    border-radius: 8px;
  }

  .filter-chip span {
    min-height: 40px;
  }

  .results-shell {
    padding: 12px;
  }

  .results-toolbar {
    align-items: center;
    gap: 12px;
  }

  .view-toggle {
    flex: 0 0 auto;
  }

  .results-shell[data-view="list"] .map-panel {
    display: none;
  }

  .results-shell[data-view="map"] .listing-grid {
    display: none;
  }

  .results-shell[data-view="map"] .map-panel {
    display: block;
  }

  .map-panel {
    height: min(62dvh, 480px);
    min-height: 360px;
  }

  .map-panel::after {
    top: 10px;
    content: "Drag map";
    font-size: 12px;
  }

  .map-legend {
    right: 10px;
    bottom: 10px;
    max-width: calc(100% - 20px);
  }

  .admin-actions,
  .admin-toolbar,
  .master-login-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-content {
    padding-bottom: 32px;
  }

  .course-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .listing-detail-card > img {
    height: auto;
    min-height: 220px;
    aspect-ratio: 16 / 10;
  }

  .course-card .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .seat-quantity {
    grid-template-columns: 1fr;
  }

  .course-apply {
    width: 100%;
    min-height: 46px;
  }

  .reservation-dialog {
    padding: 22px;
  }

  .location-picker-dialog {
    padding: 18px;
  }

  .location-picker-map {
    min-height: min(58dvh, 430px);
  }

  .reservation-dialog .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .school-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .account-toolbar,
  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .account-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .profile-preview-grid,
  .school-profile-facts,
  .school-profile-gallery {
    grid-template-columns: 1fr;
  }

  .school-profile-main {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
    padding: 18px 16px 0;
  }

  .school-profile-logo {
    width: 82px;
    height: 82px;
  }

  .school-profile-about,
  .school-profile-facts,
  .school-profile-gallery,
  .school-profile-listings {
    padding-inline: 16px;
  }

  .school-profile-listings article {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .school-profile-listings img {
    width: 76px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .header-actions {
    grid-template-columns: 1fr 1fr;
  }

  .header-actions .solid-button {
    grid-column: 1 / -1;
  }

  .trust-strip {
    justify-content: flex-start;
  }
}

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