:root {
  color-scheme: light;
  --ink: #162c40;
  --muted: #627080;
  --paper: #f2f3f1;
  --surface: #ffffff;
  --line: #d7dde0;
  --navy: #142f45;
  --navy-deep: #0d2538;
  --orange: #e65d24;
  --orange-light: #f07b43;
  --orange-wash: #fff0e8;
  --red: #a8443d;
  --red-wash: #fff3f0;
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}

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

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

a {
  color: var(--navy);
}

.wrap {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.brand-ribbon {
  min-height: 30px;
  background: var(--navy-deep);
  color: #f3f2ec;
}

.brand-ribbon-inner {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.brand-ribbon a {
  color: inherit;
  text-decoration: none;
}

.nav-shell {
  min-height: 98px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 8px;
}

.brand-block {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  width: 184px;
  height: 92px;
  flex: 0 0 auto;
  object-fit: cover;
  object-position: center;
  background: #fff;
}

.brand-block .eyebrow,
.eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.brand-block .eyebrow {
  color: #637080;
}

.brand-block h1 {
  margin: 0;
  color: var(--navy);
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
}

.top-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.top-links a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 4px;
  color: var(--navy);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
}

.top-links a:hover,
.top-links a:focus-visible {
  background: #f0f2f2;
  outline: 2px solid #8ba0ae;
  outline-offset: 1px;
}

.top-links a[href="#attendance"] {
  padding-inline: 16px;
  background: var(--orange);
  color: #fff;
}

.top-links a[href="#attendance"]:hover,
.top-links a[href="#attendance"]:focus-visible {
  background: #cf4d19;
  outline-color: #cf4d19;
}

.page-shell {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 18px;
  padding-block: 28px 52px;
}

.card,
.panel {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}

.hero,
#announcement,
#mockNotice,
#schedule,
#roster {
  grid-column: 1 / -1;
}

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 510px;
  display: flex;
  align-items: center;
  padding: 48px 47% 155px 42px;
  border: 0;
  border-radius: 0;
  background: var(--navy);
  color: #f5f3ed;
}

.hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 42px;
  right: 28px;
  width: 44%;
  height: 300px;
  border: 1px solid #f07b438c;
  background:
    linear-gradient(90deg, transparent 49.7%, #f07b4366 50%, transparent 50.3%),
    radial-gradient(ellipse at center, transparent 0 31%, #f07b438c 31.4% 31.8%, transparent 32.2%),
    radial-gradient(ellipse at left center, transparent 0 25%, #f07b438c 25.4% 25.8%, transparent 26.2%),
    radial-gradient(ellipse at right center, transparent 0 25%, #f07b438c 25.4% 25.8%, transparent 26.2%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  top: 92px;
  right: 17%;
  width: 154px;
  aspect-ratio: 1;
  border: 5px solid var(--navy-deep);
  border-radius: 50%;
  background:
    radial-gradient(ellipse 38% 72% at center, transparent 53%, var(--navy-deep) 55% 59%, transparent 61%),
    radial-gradient(ellipse 74% 35% at center, transparent 53%, var(--navy-deep) 55% 59%, transparent 61%),
    linear-gradient(90deg, transparent 48%, var(--navy-deep) 49% 52%, transparent 53%),
    #df5c28;
  box-shadow: 0 8px 24px #071a2b80;
  pointer-events: none;
}

.eyebrow.accent {
  color: var(--orange-light);
}

.hero h2,
.section-head h3,
.admin-card h4 {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-weight: 700;
}

.hero h2 {
  max-width: 590px;
  margin: 8px 0 14px;
  color: #f5f3ed;
  font-size: 5rem;
  line-height: 0.86;
  text-transform: uppercase;
}

.hero h2 span {
  color: var(--orange-light);
}

.lead {
  max-width: 500px;
  margin: 0;
  color: #dce6eb;
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-actions .primary-btn {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
  text-decoration: none;
}

.hero-actions .primary-btn:hover {
  border-color: var(--orange-light);
  background: var(--orange-light);
}

.hero-secondary-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 8px 15px;
  border: 1px solid #e5edf0;
  border-radius: 4px;
  color: #f5f3ed;
  font-weight: 700;
  text-decoration: none;
}

.hero-secondary-btn:hover {
  background: #f5f3ed;
  color: var(--navy);
}

.hero-meta {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(470px, 45%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 22px;
  padding: 20px 26px;
  border-left: 4px solid var(--orange);
  background: var(--navy-deep);
  color: #f5f3ed;
}

.hero-meta div {
  display: grid;
  gap: 3px;
}

.hero-meta strong,
.meta-item strong {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-meta strong {
  color: var(--orange-light);
}

.hero-meta span {
  color: #e2e9ed;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head h3 {
  margin: 2px 0 0;
  font-size: 1.9rem;
  line-height: 1;
}

.filters {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f4f5f4;
}

.filter-btn {
  min-height: 36px;
  padding: 6px 12px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.filter-btn.active {
  background: var(--orange);
  color: #fff;
}

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

.event-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--navy);
  border-radius: 4px;
  background: #fff;
}

.event-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.36fr);
  align-items: stretch;
  gap: 18px;
}

.event-details,
.event-out {
  min-width: 0;
}

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

.event-type {
  display: inline-block;
  color: var(--orange);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.event-title {
  margin: 2px 0 0;
  color: var(--navy);
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.1;
}

.badge,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge.success {
  background: #e4f2ed;
  color: #17644d;
}

.badge.muted,
.tag {
  background: #edf0f2;
  color: #4d5a69;
}

.event-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

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

.event-extra-grid {
  margin-top: 8px;
}

.meta-item {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border-left: 2px solid var(--orange-light);
  background: #f6f5f1;
}

.meta-item span {
  overflow-wrap: anywhere;
}

.meta-item strong {
  color: var(--muted);
}

.event-section-label {
  margin: 4px 0 8px;
  color: var(--navy);
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
}

.event-notes {
  margin: 10px 0 0;
  color: var(--muted);
}

.event-map {
  width: 100%;
  height: 230px;
  display: block;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #f0f1ef;
}

.event-out {
  padding: 13px 15px;
  border-left: 3px solid var(--orange);
  border-radius: 2px;
  background: #faf2ec;
}

.event-out h5 {
  margin: 0 0 7px;
  color: var(--navy);
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.event-out-list {
  margin: 0;
  padding-left: 19px;
}

.event-out-empty {
  margin-left: -19px;
  color: var(--muted);
  list-style: none;
}

.event-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.directions-link,
.download-ics {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border: 1px solid var(--navy);
  border-radius: 3px;
  background: #fff;
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.directions-link:hover,
.download-ics:hover {
  background: #f2f1ed;
}

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

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

.stack-form label,
.organizer-login label {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: var(--ink);
  font-size: 0.93rem;
  font-weight: 600;
}

.stack-form input,
.stack-form select,
.stack-form textarea,
.organizer-login input {
  width: 100%;
  min-height: 43px;
  padding: 9px 11px;
  border: 1px solid #c8d0d2;
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
}

.stack-form textarea {
  min-height: 88px;
  resize: vertical;
}

.stack-form input:focus,
.stack-form select:focus,
.stack-form textarea:focus,
.organizer-login input:focus {
  border-color: var(--orange);
  outline: 3px solid #e65d2426;
}

.primary-btn,
.secondary-btn,
.tiny-btn {
  min-height: 41px;
  justify-self: start;
  padding: 8px 15px;
  border: 1px solid var(--orange);
  border-radius: 3px;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.primary-btn:hover,
.tiny-btn:hover {
  background: #c94d1d;
}

.secondary-btn {
  border-color: var(--navy);
  background: var(--navy);
}

.organizer-login {
  display: flex;
  align-items: end;
  gap: 12px;
  max-width: 560px;
}

.organizer-login label {
  flex: 1;
}

.organizer-area {
  display: grid;
  gap: 20px;
  margin-top: 22px;
}

.admin-card {
  min-width: 0;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.admin-card h4 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 1.45rem;
}

.admin-note,
.form-hint {
  color: var(--muted);
}

.response-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.response-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
}

.response-item > div:first-child {
  min-width: 0;
  display: grid;
}

.response-item > div:last-child {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
}

.tiny-btn {
  min-height: 32px;
  padding: 4px 9px;
  border-color: var(--red);
  background: #fff;
  color: #87342e;
  font-size: 0.84rem;
}

.tiny-btn:hover {
  background: var(--red-wash);
  color: #70251f;
}

.announcement {
  border-left: 4px solid var(--orange);
  background: #fff9f4;
}

.mock-notice {
  padding: 12px 16px;
  border: 1px solid #ddbc69;
  border-left: 4px solid #bd8d1e;
  border-radius: 3px;
  background: #fff8e8;
  color: #4f411d;
  font-weight: 600;
}

.schedule-kicker {
  margin: -6px 0 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.empty-state {
  margin: 0;
  padding: 18px;
  border: 1px dashed #bac4c8;
  border-radius: 3px;
  color: var(--muted);
  text-align: center;
}

.hidden {
  display: none !important;
}

@media (max-width: 820px) {
  .wrap {
    width: min(100% - 30px, 680px);
  }

  .nav-shell {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding-block: 10px;
  }

  .top-links {
    width: 100%;
    justify-content: flex-start;
    gap: 3px;
  }

  .top-links a {
    padding: 7px 9px;
  }

  .page-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding-block: 17px 36px;
  }

  .hero,
  #announcement,
  #mockNotice,
  #schedule,
  #roster {
    grid-column: auto;
  }

  .hero {
    min-height: 560px;
    align-items: flex-start;
    padding: 34px 24px 174px;
  }

  .hero::before {
    display: none;
  }

  .hero::after {
    top: auto;
    right: 22px;
    bottom: 116px;
    width: 82px;
  }

  .hero-meta {
    width: 100%;
    gap: 8px 14px;
    padding: 15px 18px;
  }

  .event-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
}

@media (max-width: 540px) {
  .wrap {
    width: min(100% - 24px, 480px);
  }

  .brand-ribbon-inner {
    font-size: 0.62rem;
  }

  .brand-ribbon-inner span:last-child {
    text-align: right;
  }

  .nav-shell {
    gap: 5px;
  }

  .brand-block {
    gap: 8px;
  }

  .brand-logo {
    width: 145px;
    height: 78px;
  }

  .brand-block h1 {
    font-size: 1.8rem;
  }

  .brand-block .eyebrow {
    font-size: 0.65rem;
  }

  .top-links {
    justify-content: space-between;
    gap: 2px;
  }

  .top-links a {
    min-height: 36px;
    padding: 6px 7px;
    font-size: 0.83rem;
  }

  .card,
  .panel {
    padding: 16px;
  }

  .hero {
    min-height: 530px;
    padding: 28px 18px 170px;
  }

  .hero h2 {
    font-size: 3.5rem;
  }

  .lead {
    font-size: 1rem;
  }

  .hero-meta {
    gap: 8px;
    padding: 13px 15px;
    font-size: 0.9rem;
  }

  .hero-actions {
    gap: 8px;
  }

  .hero-secondary-btn,
  .hero-actions .primary-btn {
    min-height: 40px;
    padding-inline: 11px;
    font-size: 0.9rem;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .filters {
    width: 100%;
  }

  .filter-btn {
    flex: 1;
    padding-inline: 7px;
  }

  .event-summary,
  .meta-grid,
  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .event-map {
    height: 180px;
  }

  .organizer-login {
    align-items: stretch;
    flex-direction: column;
  }

  .response-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .response-item > div:last-child {
    justify-content: flex-start;
  }
}
