:root {
  --black: #050505;
  --ink: #111111;
  --white: #ffffff;
  --lime: #c7ff2e;
  --lime-soft: #efffbb;
  --gray-100: #f3f4f1;
  --gray-200: #dedfd9;
  --gray-500: #777b72;
  --gray-800: #262825;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.16);
  --anchor-offset: 150px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body.site-is-locked {
  overflow: hidden;
}

.site-content.is-blurred {
  min-height: 100vh;
  filter: blur(9px);
  transform: scale(1.01);
  pointer-events: none;
  user-select: none;
}

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

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

.site-header,
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  min-height: 96px;
  padding: 10px clamp(18px, 4vw, 56px);
  background: rgba(5, 5, 5, 0.92);
  color: var(--white);
  backdrop-filter: blur(18px);
}

.site-header {
  position: sticky;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-content: initial;
  height: 110px;
  min-height: 110px;
  padding: 0 clamp(18px, 4vw, 56px);
  --header-optical-shift: -8px;
}

.admin-topbar {
  justify-content: space-between;
}

.header-logo {
  position: static;
  display: grid;
  place-items: center;
  width: 558px;
  height: 128px;
  transform: none;
  background: transparent;
  border: 0;
  padding: 0;
  overflow: visible;
  grid-column: 2;
  align-self: center;
  justify-self: center;
  margin-top: var(--header-optical-shift);
}

.header-logo img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 558px;
  max-height: 128px;
  object-fit: contain;
  background: transparent;
}

.brand {
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.site-nav,
.admin-topbar nav,
.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.site-nav {
  position: static;
  grid-column: 3;
  justify-content: flex-end;
  align-self: center;
  margin-top: var(--header-optical-shift);
}

.site-nav a,
.admin-topbar a,
.footer-links a {
  font-size: 0.94rem;
  color: rgba(255, 255, 255, 0.82);
}

.site-nav a:hover,
.admin-topbar a:hover,
.footer-links a:hover {
  color: var(--lime);
}

.nav-cta {
  padding: 9px 14px;
  border: 1px solid var(--lime);
  color: var(--lime) !important;
}

.hero {
  min-height: 465px;
  display: grid;
  place-items: center;
  padding: clamp(72px, 10vw, 128px) clamp(18px, 5vw, 72px);
  background:
    linear-gradient(rgba(5, 5, 5, 0.6), rgba(5, 5, 5, 0.62)),
    var(--hero-image) center/cover;
  color: var(--white);
  text-align: center;
}

.hero-content {
  width: min(760px, 100%);
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  margin: 0 0 14px;
  color: var(--lime);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3rem, 7vw, 5.6rem);
  line-height: 0.9;
}

.motto {
  margin: 18px 0 8px;
  color: var(--lime);
  font-size: clamp(1.35rem, 3vw, 2.4rem);
  font-weight: 800;
}

.hero-text {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero-actions,
.form-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.admin-form .form-actions,
.login-panel .form-actions {
  justify-content: flex-start;
}

.button,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.button:hover,
.small-button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--lime);
  color: var(--black);
}

.button-secondary {
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--white);
}

.button-card {
  width: 100%;
  background: var(--black);
  color: var(--lime);
}

.countdown-band {
  display: grid;
  place-items: center;
  gap: 18px;
  padding: clamp(26px, 4vw, 44px) clamp(18px, 5vw, 72px);
  background: var(--lime);
  color: var(--black);
  text-align: center;
}

.countdown-band h2,
.section-heading h2,
.why-section h2,
.admin-heading h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.05;
}

.countdown-band .section-kicker {
  color: var(--black);
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(72px, 1fr));
  gap: 10px;
  width: min(720px, 100%);
}

.countdown-grid div {
  min-width: 72px;
  padding: 10px 12px;
  border: 0;
  text-align: center;
}

.countdown-grid strong {
  display: block;
  font-size: clamp(1.6rem, 4vw, 3rem);
  line-height: 1;
}

.countdown-grid span {
  color: rgba(0, 0, 0, 0.7);
  font-size: 1rem;
  font-weight: 900;
}

.section,
.why-section {
  padding: clamp(42px, 7vw, 82px) clamp(18px, 5vw, 72px);
}

#races,
#why,
#gallery,
#partners,
#contact-form {
  scroll-margin-top: var(--anchor-offset);
}

.section-heading {
  display: grid;
  place-items: center;
  margin-bottom: 48px;
  text-align: center;
}

.section-heading .section-kicker {
  color: var(--gray-500);
}

.race-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(22px, 4vw, 44px);
}

.race-card {
  overflow: hidden;
  border: 1px solid var(--gray-200);
  border-radius: 7px;
  background: var(--white);
  box-shadow: none;
}

.race-image {
  aspect-ratio: 16 / 10;
  background: var(--black);
}

.race-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-placeholder {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(rgba(5, 5, 5, 0.08), rgba(5, 5, 5, 0.08)),
    url("https://images.unsplash.com/photo-1502904550040-7534597429ae?auto=format&fit=crop&w=900&q=80") center/cover;
  color: transparent;
}

.race-content {
  display: grid;
  gap: 12px;
  padding: 11px 10px 10px;
}

.race-date {
  color: var(--gray-500);
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
}

.race-card h3,
.why-grid h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.1;
}

.race-card p,
.why-grid p,
.empty-state p {
  margin: 0;
  color: var(--gray-500);
}

.race-meta {
  display: grid;
  gap: 0;
  margin: 0;
}

.race-meta div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
  border-top: 1px solid var(--gray-200);
}

.race-meta dt {
  color: var(--gray-500);
  font-size: 0.82rem;
}

.race-meta dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.race-card .button-card {
  min-height: 30px;
  margin-top: 6px;
  border-radius: 7px;
  font-size: 0.9rem;
}

.why-section {
  background: var(--black);
  color: var(--white);
  min-height: 360px;
}

.why-section .section-heading {
  justify-items: start;
  margin-bottom: 72px;
  text-align: left;
}

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

.why-grid > div {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
}

.strava-club-section {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 390px;
  padding: clamp(54px, 8vw, 96px) clamp(18px, 5vw, 72px);
  background: var(--lime);
  color: var(--black);
  text-align: center;
}

.strava-club-content {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 18px;
  width: min(720px, 100%);
}

.strava-club-content .section-kicker {
  margin: 0;
  color: var(--black);
}

.strava-club-content h2 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.98;
}

.strava-club-content p {
  max-width: 620px;
  margin: 0;
  color: rgba(0, 0, 0, 0.72);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 750;
}

.strava-club-content .button-primary {
  background: var(--black);
  color: var(--lime);
}

.strava-mark {
  position: absolute;
  z-index: 1;
  width: clamp(150px, 18vw, 280px);
  color: rgba(0, 0, 0, 0.12);
}

.strava-mark svg {
  width: 100%;
  height: auto;
  fill: currentColor;
}

.strava-chevron {
  opacity: 0.68;
}

.strava-mark-left {
  left: clamp(-58px, -4vw, -22px);
  top: 38px;
  transform: rotate(-8deg);
}

.strava-mark-right {
  right: clamp(-58px, -4vw, -22px);
  bottom: 20px;
  transform: rotate(8deg);
}

.strava-pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.pattern-icon {
  position: absolute;
  width: clamp(46px, 6vw, 84px);
  height: clamp(46px, 6vw, 84px);
  fill: none;
  stroke: rgba(0, 0, 0, 0.18);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.runner-icon {
  left: 22%;
  top: 22%;
  transform: rotate(-10deg);
}

.watch-icon {
  right: 24%;
  top: 18%;
  transform: rotate(8deg);
}

.timer-icon {
  left: 28%;
  bottom: 18%;
  transform: rotate(7deg);
}

.route-icon {
  right: 30%;
  bottom: 20%;
  transform: rotate(-8deg);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(18px, 5vw, 72px);
  background: var(--black);
  color: var(--white);
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: var(--lime);
}

.social-icon:hover {
  background: var(--lime);
  color: var(--black);
}

.social-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.strava-social .strava-icon {
  width: 25px;
  height: 25px;
  fill: currentColor;
  stroke: none;
}

.flickr-social svg {
  fill: currentColor;
  stroke: none;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(199, 255, 46, 0.65);
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.86);
  color: var(--lime);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease, color 0.2s ease;
  backdrop-filter: blur(14px);
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--lime);
  color: var(--black);
}

.back-to-top svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.maintenance-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 5, 5, 0.62);
  color: var(--white);
}

.maintenance-panel {
  display: grid;
  gap: 18px;
  width: min(520px, 100%);
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(5, 5, 5, 0.88);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.36);
  text-align: center;
}

.maintenance-panel h2,
.maintenance-panel p {
  margin: 0;
}

.maintenance-panel h2 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1;
}

.maintenance-panel p:not(.section-kicker):not(.alert) {
  color: rgba(255, 255, 255, 0.76);
  font-weight: 800;
}

.maintenance-panel .button {
  justify-self: center;
}

.maintenance-login {
  display: grid;
  gap: 12px;
  margin-top: 4px;
  text-align: left;
}

.maintenance-login[hidden] {
  display: none;
}

.maintenance-login label {
  color: rgba(255, 255, 255, 0.78);
}

.maintenance-login input {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.gallery-section {
  padding: clamp(52px, 8vw, 96px) clamp(18px, 5vw, 72px);
  background: var(--white);
  min-height: 300px;
}

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

.album-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  border-radius: 8px;
  background: var(--black);
  color: var(--white);
}

.album-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.74));
}

.album-image,
.album-image img {
  display: block;
  width: 100%;
  height: 100%;
}

.album-image img {
  object-fit: cover;
  transition: transform 0.28s ease;
}

.album-card:hover .album-image img {
  transform: scale(1.05);
}

.album-title {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 1;
  font-size: 1.05rem;
  font-weight: 950;
  line-height: 1.1;
}

.partners-section {
  overflow: hidden;
  padding: clamp(52px, 8vw, 96px) 0;
  background: var(--gray-100);
  min-height: 320px;
}

.partners-section .section-heading {
  padding: 0 clamp(18px, 5vw, 72px);
}

.partner-section-list {
  display: grid;
  gap: clamp(34px, 5vw, 58px);
}

.partner-tier {
  display: grid;
  gap: 18px;
}

.partner-tier h3 {
  margin: 0;
  padding: 0 clamp(18px, 5vw, 72px);
  font-size: clamp(1.35rem, 2.6vw, 2.3rem);
  line-height: 1.1;
  text-align: center;
}

.partner-marquee {
  position: relative;
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}

.partner-track {
  display: flex;
  width: max-content;
  gap: 18px;
  padding: 4px 18px;
  animation: partner-scroll var(--partner-duration, 28s) linear infinite;
}

.partner-marquee:hover .partner-track {
  animation-play-state: paused;
}

.partner-marquee.is-static {
  -webkit-mask-image: none;
  mask-image: none;
}

.partner-marquee.is-static .partner-track {
  justify-content: center;
  width: 100%;
  animation: none;
}

.partner-card {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  width: clamp(138px, 13vw, 190px);
  aspect-ratio: 1;
  padding: 18px;
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  background: var(--white);
  color: var(--black);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.08);
}

.partner-card:hover {
  border-color: var(--lime);
}

.partner-logo-wrap {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 0;
}

.partner-logo-wrap img {
  width: 100%;
  max-height: 92px;
  object-fit: contain;
}

.partner-logo-placeholder {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--black);
  font-size: 2rem;
  font-weight: 950;
}

.partner-name {
  display: block;
  max-width: 100%;
  color: var(--gray-800);
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
}

@keyframes partner-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(52px, 8vw, 96px) clamp(18px, 5vw, 72px);
  background: var(--gray-100);
}

.contact-copy .section-kicker {
  color: var(--gray-800);
}

.contact-form-column h2,
.contact-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1;
}

.contact-form-column p,
.contact-copy p {
  margin: 0;
  color: var(--gray-500);
  font-weight: 700;
}

.contact-form-column {
  display: grid;
  align-content: start;
  gap: 18px;
}

.contact-details {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.contact-details h3 {
  margin: 14px 0 0;
  font-size: 1rem;
}

.contact-details hr {
  width: 100%;
  height: 1px;
  margin: 22px 0 4px;
  border: 0;
  background: var(--gray-200);
}

.contact-details a {
  color: var(--black);
  font-weight: 900;
}

.contact-form {
  display: grid;
  gap: 16px;
  margin-top: 12px;
  padding: 24px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.message-filters {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(260px, 1.3fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.message-filter-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.message-day-list {
  display: grid;
  gap: 28px;
}

.message-day {
  display: grid;
  gap: 14px;
}

.message-day h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
}

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

.message-row {
  overflow: hidden;
  border: 1px solid var(--gray-200);
  border-left: 6px solid var(--gray-200);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.07);
}

.message-row.is-unread {
  border-left-color: var(--lime);
}

.message-row-main {
  display: grid;
  grid-template-columns: 105px 64px minmax(90px, 0.65fr) minmax(185px, 1fr) 108px 350px;
  gap: 12px;
  align-items: start;
  padding: 16px 18px;
}

.message-card-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.message-card-field > span:first-child {
  color: var(--gray-500);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.message-card-field strong {
  overflow-wrap: anywhere;
  font-size: 1rem;
  line-height: 1.2;
}

.message-card-field .status {
  justify-self: start;
}

.message-actions {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: nowrap;
}

.message-actions.actions-cell {
  white-space: normal;
}

.message-actions .small-button {
  margin: 0;
  padding: 0 11px;
  font-size: 0.88rem;
}

.message-toggle {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-100);
  color: var(--black);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.message-toggle:hover {
  background: var(--lime-soft);
}

.message-detail {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-top: 1px solid var(--gray-200);
}

.message-detail[hidden] {
  display: none;
}

.message-detail p {
  margin: 0;
}

.message-text {
  padding: 14px;
  border-radius: 6px;
  background: var(--gray-100);
}

.empty-state {
  padding: 36px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: var(--gray-100);
}

.empty-state h3,
.empty-state h2 {
  margin: 0 0 8px;
}

.login-body,
.admin-body {
  min-height: 100vh;
  background: var(--gray-100);
}

.login-panel,
.admin-shell {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.login-panel {
  display: grid;
  gap: 20px;
  align-content: center;
  min-height: 100vh;
  max-width: 440px;
}

.login-panel .brand {
  color: var(--black);
  font-size: 1.3rem;
}

.login-panel h1 {
  margin: 0;
  font-size: 3rem;
}

.admin-shell {
  padding: 38px 0 72px;
}

.admin-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.form-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--gray-500);
  font-size: 0.88rem;
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  padding: 12px 13px;
  color: var(--ink);
  font: inherit;
}

textarea {
  resize: vertical;
}

.form-card h2,
.admin-section-block h2 {
  margin: 0;
}

.admin-two-column {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 28px;
}

.admin-section-block {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-metrics div {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: var(--white);
}

.admin-metrics span {
  color: var(--gray-500);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-metrics strong {
  font-size: 1.8rem;
  line-height: 1;
}

.admin-count-pill {
  display: inline-flex;
  min-width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--black);
  font-weight: 900;
}

.admin-logo-preview {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: var(--white);
}

.full-span {
  grid-column: 1 / -1;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.checkbox-label input {
  width: auto;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.admin-table th,
.admin-table td {
  padding: 16px;
  border-bottom: 1px solid var(--gray-200);
  text-align: left;
}

.admin-table th {
  color: var(--gray-500);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.admin-table tr.is-dragging {
  opacity: 0.48;
}

.admin-table tr.admin-color-row td:first-child {
  box-shadow: inset 6px 0 0 var(--section-color);
}

.admin-table tr.is-drop-before td {
  border-top: 4px solid var(--lime);
}

.admin-table tr.is-drop-after td {
  border-bottom: 4px solid var(--lime);
}

.drag-cell {
  width: 64px;
}

.drag-handle {
  position: relative;
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: var(--white);
  cursor: grab;
  appearance: none;
  padding: 0;
}

.drag-handle:active {
  cursor: grabbing;
}

.drag-handle::before,
.drag-handle::after,
.drag-handle span:first-child {
  content: "";
  display: block;
  position: absolute;
  left: 9px;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: var(--gray-500);
}

.drag-handle::before {
  top: 10px;
}

.drag-handle span:first-child {
  top: 16px;
}

.drag-handle::after {
  top: 22px;
}

.drag-handle span:not(:first-child) {
  display: none;
}

.drag-handle:hover {
  border-color: var(--lime);
  background: var(--lime-soft);
}

.drag-handle:hover::before,
.drag-handle:hover::after,
.drag-handle:hover span:first-child {
  background: var(--black);
}

.section-color-dot,
.admin-color-swatch {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 10px;
  border-radius: 999px;
  background: var(--section-color);
  vertical-align: -1px;
}

.admin-color-swatch {
  width: 28px;
  height: 28px;
  margin-right: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
}

.color-form {
  display: inline;
}

.admin-color-input {
  width: 34px;
  height: 34px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 3px;
  background: var(--white);
  cursor: pointer;
}

.status-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin: 0;
  border-radius: 999px;
  vertical-align: 0;
}

.admin-table td.status-cell {
  text-align: center;
}

.status-dot.active {
  background: #2ecc71;
}

.status-dot.hidden {
  background: #e53935;
}

.actions-cell {
  white-space: nowrap;
}

.actions-cell .small-button {
  margin: 0 8px 6px 0;
}

.actions-cell form,
.inline-form {
  display: inline;
}

.small-button,
.link-button {
  min-height: 34px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--black);
  font: inherit;
  font-weight: 800;
}

.link-button {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
}

.danger {
  color: #b00020;
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.status.active {
  background: var(--lime-soft);
  color: var(--black);
}

.status.hidden {
  background: var(--gray-200);
  color: var(--gray-500);
}

.alert {
  padding: 12px 14px;
  border-radius: 6px;
  font-weight: 800;
}

.alert.error {
  background: #ffe8e8;
  color: #8a0000;
}

.alert.success {
  background: var(--lime-soft);
  color: var(--black);
}

.current-image {
  margin: 0;
  color: var(--gray-500);
}

.current-image a {
  color: var(--black);
  font-weight: 800;
}

@media (max-width: 900px) {
  .admin-topbar,
  .site-footer,
  .admin-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-metrics {
    grid-template-columns: 1fr;
  }

  .message-filters,
  .message-row-main {
    grid-template-columns: 1fr;
  }

  .message-actions {
    justify-content: flex-start;
  }

  .race-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .album-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-section {
    grid-template-columns: 1fr;
  }

  .admin-two-column {
    grid-template-columns: 1fr;
  }

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

  .countdown-grid {
    width: 100%;
  }
}

@media (max-width: 640px) {
  :root {
    --anchor-offset: 170px;
  }

  .site-header {
    height: auto;
    min-height: 130px;
    padding: 12px 18px 14px;
    grid-template-columns: 1fr;
    gap: 12px;
    --header-optical-shift: 0;
  }

  .header-logo {
    width: 338px;
    height: 101px;
    grid-column: 1;
  }

  .header-logo img {
    width: 100%;
    height: 100%;
    max-width: 338px;
    max-height: 101px;
  }

  .site-nav {
    grid-column: 1;
    justify-content: center;
  }

  .site-nav,
  .admin-topbar nav {
    justify-content: center;
    gap: 12px;
  }

  .hero {
    min-height: 430px;
  }

  .countdown-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .form-card {
    padding: 18px;
  }

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

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

  .strava-mark {
    width: 150px;
  }

  .pattern-icon {
    width: 42px;
    height: 42px;
    stroke-width: 2;
  }

  .runner-icon {
    left: 8%;
    top: 18%;
  }

  .watch-icon {
    right: 9%;
    top: 16%;
  }

  .timer-icon {
    left: 10%;
    bottom: 18%;
  }

  .route-icon {
    right: 12%;
    bottom: 18%;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
    width: 46px;
    height: 46px;
  }
}
