/*
 * Yarnstock design system
 * ----------------------
 * This file is the single source of truth for the shared visual language.
 * It intentionally comes after legacy styles while those pages are migrated,
 * so one set of tokens, spacing, form and responsive rules wins everywhere.
 */
:root {
  --ys-ink: #332136;
  --ys-ink-soft: #564a58;
  --ys-muted: #746b76;
  --ys-line: #e4dfe6;
  --ys-surface: #ffffff;
  --ys-page: #f7f5f2;
  --ys-brand: #6f3c86;
  --ys-brand-strong: #563069;
  --ys-brand-soft: #f0e9f4;
  --ys-teal: #278e83;
  --ys-teal-strong: #1e7169;
  --ys-gold: #efb32b;
  --ys-gold-soft: #fff2cf;
  --ys-danger: #b44948;
  --ys-success: #277448;
  --ys-radius-sm: 10px;
  --ys-radius: 16px;
  --ys-radius-lg: 22px;
  --ys-shadow: 0 10px 28px rgba(51, 33, 54, 0.08);
  --ys-shadow-raised: 0 16px 34px rgba(51, 33, 54, 0.14);
  --ys-gutter: clamp(16px, 3vw, 32px);
  --ys-section-space: clamp(36px, 6vw, 76px);
  --ys-control-height: 46px;
}

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  background: var(--ys-page);
  color: var(--ys-ink);
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body, button, input, select, textarea { font-family: "Poppins", sans-serif; }

img, svg, video, canvas { max-width: 100%; height: auto; }

button, input, select, textarea { font-size: max(16px, 1em); }

button, [type="button"], [type="submit"], [type="reset"], select { -webkit-tap-highlight-color: transparent; }

a { color: var(--ys-brand); text-underline-offset: 0.16em; text-decoration-thickness: 1px; }
a:hover { color: var(--ys-brand-strong); }

:focus-visible {
  outline: 3px solid rgba(239, 179, 43, 0.92) !important;
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: min(100% - (var(--ys-gutter) * 2), 1200px);
  margin-inline: auto;
  padding-inline: 0;
}

/* Shared navigation -------------------------------------------------------- */
.nav-container {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0;
  background: rgba(60, 36, 21, 0.98);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1), 0 7px 24px rgba(30, 18, 12, 0.16);
  backdrop-filter: blur(12px);
}

.nav-content { min-height: 64px; gap: 18px; }

.nav-logo {
  flex: 0 0 auto;
  color: #fff8e6;
  font-family: "Cabin Sketch", cursive;
  font-size: clamp(1.45rem, 2vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.nav-logo:hover, .nav-logo:focus-visible { color: #fff8e6; text-decoration: none; }

.nav-links {
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.nav-links a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 8px 10px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.925rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, 0.13); }
.nav-links a.active, .nav-links a[aria-current="page"] { color: var(--ys-ink); background: var(--ys-gold); }
.nav-links .nav-user-icon { justify-content: center; min-width: 38px; padding-inline: 9px; }
.nav-links a > i,
.mobile-menu-btn > i { margin: 0 !important; line-height: 1; }

.mobile-menu-btn {
  width: 44px;
  min-height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  color: #fff;
  font-size: 1.2rem;
}
.mobile-menu-btn:hover { background: rgba(255, 255, 255, 0.12); }

/* Admin account impersonation --------------------------------------------- */
.impersonation-bar {
  position: sticky;
  top: 0;
  z-index: 1200;
  height: 52px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  background: #25152d;
  color: #fff;
  box-shadow: 0 8px 24px rgba(25, 12, 31, 0.2);
}

.impersonation-bar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.impersonation-bar__status {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  white-space: nowrap;
}

.impersonation-bar__status > i { flex: 0 0 auto; color: var(--ys-gold); }
.impersonation-bar__status strong { overflow: hidden; text-overflow: ellipsis; }
.impersonation-bar__status small { color: rgba(255, 255, 255, 0.72); }
.impersonation-bar form { flex: 0 0 auto; margin: 0; }
.impersonation-bar button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 9px;
  background: #fff;
  color: var(--ys-ink);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}
.impersonation-bar button:hover { background: var(--ys-gold-soft); }
body.ys-impersonating .nav-container { top: 52px; }

/* Shared page framing ------------------------------------------------------ */
.page-header {
  min-height: 0;
  padding-block: clamp(36px, 7vw, 72px) clamp(32px, 6vw, 60px);
  background: linear-gradient(120deg, #332418 0%, #3c2415 42%, #275f59 100%);
}

.page-header::before {
  height: 11px;
  background: linear-gradient(90deg, #efb32b, #e48662 35%, #57a69b 66%, #efb32b);
}

.page-header h1 {
  max-width: 20ch;
  margin: 0 auto 10px;
  color: var(--ys-gold);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.06;
  text-wrap: balance;
}

.page-header h1:has(> i) {
  display: block;
}

.page-header h1 > i {
  display: inline-block;
  margin: 0 0.34em 0 0 !important;
  font-size: 0.82em;
  line-height: 1;
  vertical-align: -0.08em;
}

.page-header p {
  max-width: 62ch;
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(1rem, 1.8vw, 1.16rem);
  line-height: 1.55;
  text-wrap: balance;
}

.page-header .admin-breadcrumb { margin-top: 14px; }

/* Home is the only full festival landing view. Keep its distinctive event
   lock-up, but reserve the oversized splash treatment for neither tablets nor
   ordinary laptop windows. The mobile and short-landscape variants below
   refine this shared composition further. */
.hero { padding-block: 30px 38px; }
.hero h1 { font-size: 3.4rem; margin-bottom: 3px; }
.hero h2 { font-size: 1.75rem; margin-bottom: 7px; }
.hero .hero-subtitle { font-size: 1.2rem; margin-bottom: 12px; }
.hero .logo { max-width: 230px; margin-bottom: 12px; }
.date-location { padding: 7px 20px; font-size: 1.1rem; margin-bottom: 14px; }
.hero .countdown-heading { margin: 16px 0 6px; font-size: 1.05rem; }
.hero .countdown { gap: 16px; margin: 12px 0 0; }
.hero .countdown-item { min-width: 74px; padding: 12px; }
.hero .countdown-number { font-size: 1.75rem; }
.hero + .rainbow { margin-block: 24px; }

.social-section {
  padding-block: clamp(42px, 6vw, 68px);
  background: linear-gradient(135deg, #237d73, #2e9c91);
}

.social-section h2 { margin-bottom: 10px; font-size: clamp(2rem, 4vw, 2.7rem); line-height: 1.1; }
.social-section p { max-width: 56ch; margin: 0 auto; }
.social-links { gap: 10px; margin-top: 24px; }
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 46px;
  min-width: min(100%, 224px);
  padding: 11px 20px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 999px;
  box-shadow: none;
}
.social-links a > i { margin: 0 !important; line-height: 1; }
.social-links a:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(10, 63, 57, 0.2); }

footer { padding-block: 32px; }
.footer-links { gap: 10px 18px; margin-bottom: 14px; }
.footer-links a, .cookie-settings-link { min-height: 28px; display: inline-flex; align-items: center; }
.copyright { margin-top: 14px; }

/* Shared cards, controls and content -------------------------------------- */
.venue-info-card, .map-card, .directions-card, .accommodation-card,
.booking-card, .contact-info, .contact-form-container, .thank-you-card,
.login-info, .login-form-container, .register-info, .register-form-container,
.account-info-card, .account-features-card, .logout-confirm-card,
.coming-soon-card, .privacy-container, .camping-info-card, .payment-info-card,
.extras-info-card, .booking-form-card, .intro-card, .host-info-card,
.booking-fees-card, .host-form-card, .guideline-card, .admin-section-card,
.quick-actions-section, .recent-activity-section {
  border: 1px solid var(--ys-line);
  border-radius: var(--ys-radius);
  box-shadow: var(--ys-shadow);
}

.venue-info-content, .map-content, .directions-content, .accommodation-content,
.booking-content, .contact-info-content, .contact-form-content, .login-info-content,
.login-form-content, .register-info-content, .register-form-content,
.account-info-content, .account-features-content, .privacy-content,
.camping-info-content, .payment-info-content, .extras-info-content,
.booking-form-content, .intro-content, .host-info-content, .booking-fees-content,
.host-form-content, .guideline-content, .admin-section-content { padding: clamp(20px, 3vw, 32px); }

.form-group { margin-bottom: 18px; }
.form-group label, label { color: var(--ys-ink); font-weight: 650; }

.form-group input, .form-group select, .form-group textarea,
.admin-form-input, .admin-form-select, .admin-form-textarea,
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="hidden"]):not([type="file"]), select, textarea {
  min-height: var(--ys-control-height);
  padding: 10px 12px;
  border: 1px solid #d5cfd8;
  border-radius: 10px;
  background: var(--ys-surface);
  color: var(--ys-ink);
  box-shadow: 0 1px 0 rgba(51, 33, 54, 0.02);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

select { padding-right: 38px; }
textarea { min-height: 112px; resize: vertical; }
.form-group input::placeholder,
.form-group textarea::placeholder,
.contact-form ::placeholder,
input::placeholder,
textarea::placeholder { color: #766d78; opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: #bdb1c2; }
input:focus, select:focus, textarea:focus {
  border-color: var(--ys-brand);
  box-shadow: 0 0 0 4px rgba(111, 60, 134, 0.13);
  outline: 0;
}

button, .submit-btn, .booking-btn, .register-btn, .account-btn, .quick-action-btn,
.guidelines-btn, .thank-you-btn, .logout-btn, .coming-soon-btn, .accommodation-link,
.feature-link, .admin-btn, .admin-form-btn, .settings-button, .programme-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 44px;
  border-radius: 10px;
  font-weight: 700;
  line-height: 1.2;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.submit-btn > i, .booking-btn > i, .register-btn > i, .account-btn > i,
.quick-action-btn > i, .guidelines-btn > i, .thank-you-btn > i, .logout-btn > i,
.coming-soon-btn > i, .accommodation-link > i, .feature-link > i, .admin-btn > i,
.admin-form-btn > i, .settings-button > i, .programme-button > i {
  margin: 0 !important;
}

/* One dependable wait state for every server-backed action and page change. */
.ys-wait-feedback {
  position: fixed;
  z-index: 12000;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  max-width: min(calc(100vw - 28px), 460px);
  min-height: 48px;
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(52, 31, 20, 0.96);
  color: #fff;
  box-shadow: 0 12px 34px rgba(27, 16, 10, 0.28);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.35;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 140ms ease, transform 140ms ease;
  pointer-events: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ys-wait-feedback[hidden] { display: none !important; }
.ys-wait-feedback.is-visible { opacity: 1; transform: translate(-50%, 0); }
.ys-wait-feedback > i { flex: 0 0 auto; color: #f2b323; }
.ys-is-waiting { cursor: progress; }
.ys-submit-busy {
  cursor: progress !important;
  pointer-events: none;
  transform: none !important;
  opacity: 0.86;
}

.ys-inline-wait {
  flex: 1 0 100%;
  width: 100%;
  margin: 10px 0 0;
  color: var(--ys-muted, #655d67);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}

.ys-inline-wait[hidden] { display: none !important; }

@media (max-width: 560px) {
  .ys-wait-feedback {
    bottom: max(12px, env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
    justify-content: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ys-wait-feedback { transition: none; }
}

/* Icon-plus-label controls and ordinary prose follow one optical rhythm. */
.booking-header h3,
.venue-info-header h3,
.map-header h3,
.camping-info-header h3,
.payment-info-header h3,
.extras-info-header h3,
.availability-header h3,
.booking-form-header h3,
.contact-info-header h3,
.contact-form-header h3,
.login-info-header h3,
.login-form-header h3,
.register-info-header h3,
.register-form-header h3,
.account-info-header h3,
.account-features-header h3,
.host-info-header h3,
.booking-fees-header h3,
.host-form-header h3,
.guideline-header h3,
.my-new-card-header h3,
.intro-header h2,
.transport-option h3,
.admin-section-header h3,
.quick-actions-section h3,
.recent-activity-section h3,
.admin-form-title,
.error-message h3,
.success-message h3,
.security-note h4,
.form-group label:has(> i),
.admin-breadcrumb,
.admin-breadcrumb > span,
.admin-breadcrumb a,
.compose-toolbar a,
.contacts-toolbar > a,
.labels-toolbar a,
.conversation-toolbar > a,
.contacts-mailbox-links a,
.contact-action a,
.contact-book-link,
.mailbox-compose,
.mailbox-folder,
.mailbox-address-book,
.account-security a,
.account-security button {
  align-items: center;
  gap: 0.5em;
}

.booking-header h3,
.venue-info-header h3,
.map-header h3,
.camping-info-header h3,
.payment-info-header h3,
.extras-info-header h3,
.availability-header h3,
.booking-form-header h3,
.contact-info-header h3,
.contact-form-header h3,
.login-info-header h3,
.login-form-header h3,
.register-info-header h3,
.register-form-header h3,
.account-info-header h3,
.account-features-header h3,
.host-info-header h3,
.booking-fees-header h3,
.host-form-header h3,
.guideline-header h3,
.my-new-card-header h3,
.intro-header h2 { display: flex; justify-content: center; }

.transport-option h3,
.admin-section-header h3,
.quick-actions-section h3,
.recent-activity-section h3,
.admin-form-title,
.error-message h3,
.success-message h3,
.security-note h4,
.form-group label:has(> i) { display: flex; }

.pitch-header h4,
.payment-terms h4,
.form-section h4,
.fee-label {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.admin-breadcrumb,
.admin-breadcrumb > span,
.admin-breadcrumb a,
.compose-toolbar a,
.contacts-toolbar > a,
.labels-toolbar a,
.conversation-toolbar > a,
.contacts-mailbox-links a,
.contact-action a,
.contact-book-link { display: inline-flex; }

.booking-header h3 > i,
.venue-info-header h3 > i,
.map-header h3 > i,
.camping-info-header h3 > i,
.payment-info-header h3 > i,
.extras-info-header h3 > i,
.availability-header h3 > i,
.booking-form-header h3 > i,
.contact-info-header h3 > i,
.contact-form-header h3 > i,
.login-info-header h3 > i,
.login-form-header h3 > i,
.register-info-header h3 > i,
.register-form-header h3 > i,
.account-info-header h3 > i,
.account-features-header h3 > i,
.host-info-header h3 > i,
.booking-fees-header h3 > i,
.host-form-header h3 > i,
.guideline-header h3 > i,
.my-new-card-header h3 > i,
.intro-header h2 > i,
.transport-option h3 > i,
.admin-section-header h3 > i,
.quick-actions-section h3 > i,
.recent-activity-section h3 > i,
.admin-form-title > i,
.error-message h3 > i,
.success-message h3 > i,
.security-note h4 > i,
.form-group label > i,
.pitch-header h4 > i,
.payment-terms h4 > i,
.form-section h4 > i,
.fee-label > i,
.admin-breadcrumb i,
.compose-toolbar a > i,
.contacts-toolbar > a > i,
.labels-toolbar a > i,
.conversation-toolbar > a > i,
.contacts-mailbox-links a > i,
.contact-action a > i,
.contact-book-link > i,
.mailbox-compose > i,
.mailbox-folder > i,
.mailbox-address-book > i,
.account-security a > i,
.account-security button > i { margin: 0 !important; line-height: 1; }

p > i:first-child:not(:only-child),
li > i:first-child:not(:only-child) {
  display: inline-block;
  min-width: 1.1em;
  margin-right: 0.45em;
  vertical-align: -0.125em;
}

button:not([disabled]):hover, .submit-btn:hover, .booking-btn:hover, .register-btn:hover,
.account-btn:hover, .quick-action-btn:hover, .guidelines-btn:hover, .thank-you-btn:hover,
.logout-btn:hover, .coming-soon-btn:hover, .accommodation-link:hover, .feature-link:hover,
.admin-btn:hover, .admin-form-btn:hover, .settings-button:hover, .programme-button:hover {
  transform: translateY(-1px);
}

button[disabled], input[disabled], select[disabled], textarea[disabled] { cursor: not-allowed; opacity: 0.58; }

.status-badge, .record-status, .payment-badge, .priority-badge {
  border-radius: 999px;
  font-weight: 750;
  letter-spacing: 0.01em;
  text-transform: none;
}

.table-wrap, .admin-table-container, .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Shared admin frame ------------------------------------------------------- */
.admin-header.page-header { padding-block: clamp(32px, 5vw, 56px); }
.admin-section, .settings-page, .mailbox-page, .labels-page { padding-block: clamp(24px, 4vw, 50px); }
.admin-table-container, .admin-form-container, .admin-search-container, .users-stats {
  border: 1px solid var(--ys-line);
  border-radius: var(--ys-radius);
  box-shadow: var(--ys-shadow);
}

/* Shared footer utilities moved out of the template ----------------------- */
.cookie-choice {
  position: fixed;
  z-index: 2000;
  inset: auto max(16px) 16px;
  max-width: 880px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--ys-radius);
  background: #332136;
  color: #fff;
  box-shadow: var(--ys-shadow-raised);
}
.cookie-choice strong { font-size: 1rem; }
.cookie-choice p { margin: 5px 0; line-height: 1.5; }
.cookie-choice a { color: #ffe39a; }
.cookie-choice-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.cookie-choice button { min-height: 42px; border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 9px; background: transparent; color: #fff; padding: 9px 13px; }
.cookie-choice button.accept { background: var(--ys-teal); border-color: var(--ys-teal); }
.cookie-settings-link { appearance: none; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

/* Responsive contract ------------------------------------------------------ */
@media (max-width: 1100px) {
  .nav-links a { padding-inline: 8px; font-size: 0.875rem; }
}

@media (max-width: 860px) {
  .nav-content { min-height: 58px; }
  .mobile-menu-btn { display: inline-flex; margin-left: auto; }
  .nav-links {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    max-height: min(72vh, 520px);
    overflow-y: auto;
    padding: 10px var(--ys-gutter) 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    background: #3c2415;
    box-shadow: 0 14px 24px rgba(30, 18, 12, 0.2);
  }
  .nav-links.active { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-links a { min-height: 44px; padding: 11px 12px; }
  .nav-links .nav-user-icon { justify-content: flex-start; }
  .page-header { padding-block: 32px 30px; }
  .admin-header.page-header { padding-block: 26px 24px; }
  .admin-header.page-header > .container > p { display: none; }
  .admin-header.page-header .admin-breadcrumb { margin-top: 9px; }
}

@media (max-width: 620px) {
  /*
   * Mobile density contract. These are deliberately kept here, after the
   * legacy stylesheet, so every public journey shares one spacing scale.
   * The home hero remains celebratory without consuming an entire phone
   * viewport before visitors can reach useful content.
   */
  .hero {
    padding-block: 26px 30px;
  }
  .hero h1 {
    font-size: clamp(2.35rem, 11vw, 2.7rem);
    margin-bottom: 3px;
    letter-spacing: 0.04em;
  }
  .hero h2 {
    font-size: 1.35rem;
    margin-bottom: 8px;
  }
  .hero p {
    padding-inline: 0;
  }
  .hero .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 12px;
  }
  .hero .logo {
    max-width: min(220px, 66vw);
    margin-bottom: 12px;
  }
  .date-location {
    padding: 6px 16px;
    font-size: 1rem;
    line-height: 1.35;
    margin-bottom: 14px;
  }
  .hero .countdown-heading {
    margin: 12px 0 6px;
  }
  .hero .countdown {
    gap: 8px;
    margin: 10px 0 0;
  }
  .hero .countdown-item {
    min-width: 0;
    flex: 1 1 0;
    padding: 8px 4px;
    border-radius: 9px;
  }
  .hero .countdown-number { font-size: 1.35rem; }
  .hero .countdown-label { font-size: 0.69rem; }
  .hero + .rainbow { margin-block: 16px; }
  .about-section { padding-block: 40px; }
  .about-section h2 {
    font-size: clamp(2rem, 10vw, 2.35rem);
    line-height: 1.1;
    margin-bottom: 18px;
  }
  .about-content p {
    margin-bottom: 16px;
    font-size: 1rem;
  }
  .features-list {
    margin-block: 22px;
    gap: 12px;
  }
  .features-list li { padding: 12px 14px; }
  /* Shared public-page rhythm: desktop sections used 60px top and bottom
     padding even when they contained a single card. On phones 40px preserves
     separation while bringing the next decision into reach sooner. */
  .venue-section,
  .directions-section,
  .booking-section,
  .contact-section,
  .login-section,
  .register-section,
  .logout-confirm-section,
  .coming-soon-section,
  .privacy-section,
  .host-class-section,
  .guidelines-section { padding-block: 40px; }
  .rainbow { margin-block: 24px; }
  .social-section { padding-block: 36px; }
  .nav-links.active { grid-template-columns: 1fr; }
  .page-header h1 { font-size: clamp(2rem, 10vw, 2.6rem); }
  .social-links { display: grid; grid-template-columns: 1fr; width: min(100%, 296px); margin-inline: auto; }
  .social-links a { width: 100%; }
  .cookie-choice { display: block; padding: 16px; }
  .cookie-choice-actions { margin-top: 14px; }
  .cookie-choice-actions button { flex: 1 1 0; }
  .impersonation-bar__status > span,
  .impersonation-bar__status small { display: none; }
  .impersonation-bar button { padding-inline: 10px; }
  .form-row, .form-actions, .admin-form-actions { grid-template-columns: 1fr; flex-direction: column; }
  .form-actions > *, .admin-form-actions > * { width: 100%; justify-content: center; }
}

@media (max-height: 540px) and (orientation: landscape) {
  .nav-content { min-height: 52px; }
  .nav-links { max-height: 70vh; }
  .page-header { padding-block: 28px 24px; }
  .page-header h1 { font-size: 2rem; }
  .page-header p { font-size: 0.97rem; }
  /* Short landscape screens need their own home-page composition. The full
     portrait hero used to extend to more than two viewports here. */
  .hero { padding-block: 18px 20px; }
  /* The navigation and event lock-up already identify Yarnstock. Keep the
     semantic H1 for assistive technology, but do not repeat the name a third
     time in the short landscape composition. */
  .hero h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .hero h2 { font-size: 1.3rem; margin-bottom: 4px; }
  .hero .hero-subtitle { font-size: 1rem; margin-bottom: 8px; }
  .hero p { padding-inline: 0; }
  .hero .logo { max-width: 150px; margin-bottom: 8px; }
  .date-location { padding: 5px 14px; font-size: 1rem; margin-bottom: 8px; }
  .hero .countdown-heading { margin: 8px 0 4px; font-size: 1rem; }
  .hero .countdown { gap: 10px; margin: 8px 0 0; }
  .hero .countdown-item { min-width: 64px; padding: 6px 10px; }
  .hero .countdown-number { font-size: 1.35rem; }
  .hero .countdown-label { font-size: 0.68rem; }
  /* The dates remain prominent; a live countdown is expendable when vertical
     room is at a premium and remains available in portrait. */
  .hero .countdown-heading,
  .hero .countdown { display: none; }
}

@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; }
}
