:root {
  --bg: #000000;
  --panel: #0b0b0b;
  --panel-2: #111111;
  --blue: #003A9C;
  --blue-hover: #084bbf;
  --text: #ffffff;
  --muted: rgba(255,255,255,.53);
  --faint: rgba(255,255,255,.11);
  --line: rgba(255,255,255,.14);
  --max: 1180px;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--text);
  font-family: "Arimo", Arial, sans-serif;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 50% -20%, rgba(0,58,156,.13), transparent 36rem),
    #000;
  color: var(--text);
}

button, input { font: inherit; }
a { color: inherit; text-decoration: none; }

button {
  border: 0;
  color: inherit;
}

.bg-glow {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(100px);
  pointer-events: none;
  opacity: .22;
}

.bg-glow-a {
  width: 340px;
  height: 340px;
  top: 12vh;
  left: -220px;
  background: #003A9C;
}

.bg-glow-b {
  width: 280px;
  height: 280px;
  right: -210px;
  bottom: 10vh;
  background: #003A9C;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: min(calc(100% - 32px), var(--max));
  min-height: 66px;
  margin: 14px auto 0;
  padding: 0 18px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  background: rgba(4,4,4,.80);
  backdrop-filter: blur(18px);
}

.brand-mini {
  justify-self: start;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  background: #080808;
  font-family: "League Spartan", sans-serif;
  font-size: 15px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.desktop-nav a {
  position: relative;
  padding: 8px 0;
  color: rgba(255,255,255,.55);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .10em;
  transition: color .18s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
  color: #fff;
}

.desktop-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  background: var(--blue);
}

.search-open {
  justify-self: end;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.search-open svg,
.global-search svg,
.search-field svg,
.utility-button svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-open svg { width: 16px; height: 16px; }

#app {
  width: 100%;
}

.page {
  display: none;
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
  min-height: calc(100vh - 160px);
}

.page.is-active {
  display: block;
  animation: pageIn .22s ease both;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

.hero {
  width: 100%;
  max-width: 990px;
  margin: 0 auto;
  padding: 72px 0 66px;
  text-align: center;
}

.logo-wrap {
  width: 120px;
  height: 120px;
  margin: 0 auto 28px;
  padding: 4px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
}

.hero-logo {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #080808;
}

.hero h1 {
  margin: 0;
  font-family: "League Spartan", "Arimo", sans-serif;
  font-size: clamp(64px, 10vw, 128px);
  font-weight: 900;
  line-height: .78;
  letter-spacing: -.055em;
}

.hero-tagline {
  margin: 22px 0 0;
  color: rgba(255,255,255,.67);
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 400;
}

.utility-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.utility-button {
  width: 56px;
  min-height: 54px;
  padding: 8px 5px 6px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 9px;
  background: rgba(255,255,255,.02);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.utility-button:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.25);
  background: rgba(255,255,255,.05);
}

.utility-button svg { width: 17px; height: 17px; }

.utility-button span {
  color: rgba(255,255,255,.45);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
}

.hero-rule {
  width: min(760px, 76%);
  height: 1px;
  margin: 40px auto;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
}

.hero-kicker {
  margin: 0 0 22px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  text-align: left;
}

.nav-card {
  position: relative;
  min-height: 150px;
  padding: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.008));
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.nav-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,.22);
  background:
    linear-gradient(145deg, rgba(0,58,156,.18), rgba(255,255,255,.015));
}

.nav-card-number {
  margin-bottom: 22px;
  color: rgba(255,255,255,.24);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
}

.nav-card strong {
  margin-bottom: 7px;
  font-size: 14px;
  letter-spacing: .04em;
}

.nav-card > span:last-of-type {
  max-width: 240px;
  color: rgba(255,255,255,.43);
  font-size: 11px;
  line-height: 1.45;
}

.nav-card i {
  position: absolute;
  right: 18px;
  bottom: 16px;
  color: rgba(255,255,255,.35);
  font-style: normal;
  font-size: 16px;
}

.global-search {
  width: min(100%, 620px);
  min-height: 54px;
  margin: 22px auto 0;
  padding: 0 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px;
  background: #080808;
  color: rgba(255,255,255,.62);
  cursor: pointer;
  text-align: left;
}

.global-search:hover {
  border-color: rgba(255,255,255,.22);
}

.global-search svg { width: 17px; height: 17px; }
.global-search span { font-size: 10px; font-weight: 700; letter-spacing: .09em; }

kbd {
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 5px;
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.38);
  font-family: inherit;
  font-size: 10px;
}

.section-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 96px 0 120px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
}

.section-shell h2 {
  margin: 0;
  font-family: "League Spartan", "Arimo", sans-serif;
  font-size: clamp(52px, 8vw, 92px);
  font-weight: 900;
  line-height: .9;
  letter-spacing: -.035em;
}

.section-intro {
  max-width: 620px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.placeholder-grid {
  margin-top: 38px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.placeholder-grid > * {
  min-height: 66px;
  padding: 0 16px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 8px;
  background: rgba(255,255,255,.025);
  color: rgba(255,255,255,.72);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
}

.placeholder-grid button {
  cursor: pointer;
}

.site-footer {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
  padding: 34px 0 48px;
  border-top: 1px solid rgba(255,255,255,.09);
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a,
.footer-links button {
  padding: 0;
  background: none;
  color: rgba(255,255,255,.61);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .07em;
  cursor: pointer;
}

.footer-links.secondary {
  margin-top: 12px;
}

.footer-note {
  max-width: 760px;
  margin: 16px auto 0;
  color: rgba(255,255,255,.27);
  font-size: 9px;
  line-height: 1.55;
}

.footer-note + .footer-note {
  margin-top: 3px;
}

/* MODALS */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  padding: 20px;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.78);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .14s ease, visibility 0s linear .14s;
}

.overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .14s ease;
}

.modal {
  width: min(100%, 620px);
  max-height: 84vh;
  overflow: auto;
  padding: 26px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 30px 90px rgba(0,0,0,.60);
}

.search-modal { width: min(100%, 720px); }

.modal-head {
  padding-bottom: 18px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.modal-eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .13em;
}

.modal h3 {
  margin: 0;
  font-size: 17px;
  letter-spacing: .05em;
}

.modal-close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 7px;
  background: transparent;
  color: rgba(255,255,255,.62);
  font-size: 20px;
  cursor: pointer;
}

.search-field {
  height: 54px;
  margin-top: 20px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 9px;
  background: #080808;
}

.search-field svg {
  width: 17px;
  height: 17px;
  color: rgba(255,255,255,.50);
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 13px;
}

.search-field input::placeholder {
  color: rgba(255,255,255,.30);
}

.search-results { margin-top: 12px; }

.search-empty,
.tool-content {
  padding: 22px 4px 4px;
  color: rgba(255,255,255,.46);
  font-size: 12px;
  line-height: 1.65;
}

.tool-content strong {
  color: #fff;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 880px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .desktop-nav { display: none; }

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

@media (max-width: 600px) {
  .site-header {
    width: calc(100% - 20px);
    margin-top: 10px;
    padding: 0 13px;
    min-height: 58px;
  }

  .page,
  .site-footer {
    width: calc(100% - 24px);
  }

  .hero {
    padding: 54px 0 54px;
  }

  .logo-wrap {
    width: 96px;
    height: 96px;
    margin-bottom: 24px;
  }

  .hero h1 {
    font-size: clamp(58px, 22vw, 90px);
  }

  .hero-tagline {
    margin-top: 18px;
    font-size: 15px;
  }

  .hero-rule {
    margin: 34px auto;
  }

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

  .nav-card {
    min-height: 118px;
  }

  .nav-card-number {
    margin-bottom: 15px;
  }

  .section-shell {
    padding: 70px 0 90px;
  }

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

  .modal {
    padding: 20px;
  }
}


/* =========================================================
   GRIDLY V1.2 — CLEAN HOME
   ========================================================= */

.site-header-clean {
  grid-template-columns: 1fr auto;
}

.top-search {
  justify-self: end;
  min-width: 168px;
  height: 38px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 7px;
  background: rgba(5,5,5,.54);
  color: rgba(255,255,255,.74);
  cursor: pointer;
  transition:
    transform .18s ease,
    border-color .18s ease,
    background .18s ease,
    color .18s ease;
}

.top-search:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.31);
  background: rgba(255,255,255,.05);
  color: #fff;
}

.top-search svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.top-search span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
}

.utility-row {
  gap: 17px;
  margin-top: 34px;
}

.utility-button.icon-only {
  width: 52px;
  min-height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255,255,255,.90);
}

.utility-button.icon-only:hover {
  transform: translateY(-3px) scale(1.04);
  border-color: transparent;
  background: rgba(255,255,255,.035);
  color: #fff;
}

.utility-button.icon-only svg {
  width: 30px;
  height: 30px;
  stroke-width: 1.55;
}

.home-menu {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 28px;
}

.home-menu-button {
  min-width: 126px;
  min-height: 42px;
  padding: 0 18px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 1px solid rgba(255,255,255,.40);
  border-radius: 0;
  background: rgba(0,0,0,.10);
  color: rgba(255,255,255,.92);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .01em;
  transition:
    transform .18s ease,
    border-color .18s ease,
    background .18s ease,
    color .18s ease;
}

.home-menu-button:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,.72);
  background: rgba(255,255,255,.055);
  color: #fff;
}

.footer-clean-links {
  margin-top: 0 !important;
}

.site-footer {
  padding-top: 28px;
}

@media (max-width: 600px) {
  .brand-mini > span:last-child {
    display: none;
  }

  .top-search {
    min-width: 0;
    width: 42px;
    padding: 0;
  }

  .top-search span {
    display: none;
  }

  .home-menu {
    gap: 8px;
  }

  .home-menu-button {
    min-width: calc(50% - 5px);
    min-height: 42px;
  }

  .utility-button.icon-only {
    width: 48px;
    min-height: 48px;
  }

  .utility-button.icon-only svg {
    width: 28px;
    height: 28px;
  }
}


/* =========================================================
   GRIDLY V1.3 — SUBPAGE NAV + CLEANER HOME
   ========================================================= */

/* Header is hidden on HOME and appears only on internal pages */
.subpage-header {
  display: none;
  grid-template-columns: 1fr auto 1fr;
}

.subpage-header.is-visible {
  display: grid;
}

/* BACK replaces the old logo position */
.back-button {
  justify-self: start;
  min-width: 74px;
  height: 36px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 7px;
  background: transparent;
  color: rgba(255,255,255,.65);
  cursor: pointer;
  transition:
    transform .18s ease,
    border-color .18s ease,
    background .18s ease,
    color .18s ease;
}

.back-button:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.30);
  background: rgba(255,255,255,.045);
  color: #fff;
}

.back-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.back-button span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
}

/* Internal navigation only */
.subpage-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 19px;
  white-space: nowrap;
}

.subpage-nav a {
  position: relative;
  padding: 8px 0;
  color: rgba(255,255,255,.55);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
  transition: color .18s ease;
}

.subpage-nav a:hover,
.subpage-nav a.is-active {
  color: #fff;
}

.subpage-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  background: #003A9C;
}

/* Search: icon only */
.top-search.icon-search {
  min-width: 0;
  width: 38px;
  height: 38px;
  padding: 0;
}

/* HOME vertical spacing */
.page-home .hero {
  padding-top: 83px; /* ~15% farther from the top than the previous 72px */
}

.page-home .logo-wrap {
  width: 126px;  /* +5% */
  height: 126px; /* +5% */
}

.page-home .utility-row {
  margin-top: 52px; /* more separation from logo/tagline */
}

/* Home section buttons: clean, gently rounded, slightly larger type */
.home-menu-button {
  border-radius: 7px;
  font-size: 12.6px; /* +5% */
}

/* EVENTS category tabs: one horizontal row, no ALL EVENTS */
.event-tabs {
  margin-top: 38px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: 9px;
}

.event-tabs button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 7px;
  background: rgba(255,255,255,.025);
  color: rgba(255,255,255,.76);
  font-size: 10.5px; /* +5% from 10px */
  font-weight: 700;
  letter-spacing: .06em;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform .18s ease,
    border-color .18s ease,
    background .18s ease,
    color .18s ease;
}

.event-tabs button:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.28);
  background: rgba(255,255,255,.05);
  color: #fff;
}

/* Footer/legal text: +5% */
.footer-links a,
.footer-links button {
  font-size: 9.45px;
}

.footer-note {
  font-size: 9.45px;
}

@media (max-width: 900px) {
  .subpage-header.is-visible {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
  }

  .subpage-nav {
    gap: 12px;
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
  }

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

@media (max-width: 700px) {
  .back-button {
    width: 38px;
    min-width: 38px;
    padding: 0;
  }

  .back-button span {
    display: none;
  }

  .subpage-nav {
    gap: 11px;
  }

  .subpage-nav a {
    font-size: 9px;
  }

  .page-home .hero {
    padding-top: 68px;
  }

  .page-home .logo-wrap {
    width: 101px;
    height: 101px;
  }

  .page-home .utility-row {
    margin-top: 44px;
  }

  .event-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
  }

  .event-tabs::-webkit-scrollbar {
    display: none;
  }
}


/* =========================================================
   GRIDLY V1.4 — MORE PRESENCE + BETTER SPACING
   ========================================================= */

/* 1) TOP RETURN BAR — 10% larger overall */
.subpage-header {
  min-height: 73px; /* previous 66px, ~10% */
}

.back-button {
  min-width: 81px;
  height: 40px;
}

.back-button svg {
  width: 15.5px;
  height: 15.5px;
}

.back-button span {
  font-size: 9.9px;
}

.subpage-nav {
  gap: 21px;
}

.subpage-nav a {
  font-size: 11px; /* ~10% */
  padding: 9px 0;
}

/* HOME gets extra visual hierarchy */
.subpage-nav a[data-route="/"] {
  font-size: 13px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: .10em;
}

.top-search.icon-search {
  width: 42px;
  height: 42px;
}

.top-search.icon-search svg {
  width: 16.5px;
  height: 16.5px;
}

/* 2) HOME buttons — larger, closer to old Carrd presence */
.home-menu {
  gap: 13px;
  margin-top: 38px;
}

.home-menu-button {
  min-width: 154px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 7px;
  font-size: 13.2px;
  font-weight: 600;
}

/* 3) Internal-page button areas — move toward visual center */
.section-shell {
  min-height: calc(100vh - 150px);
  padding: 84px 0 82px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-shell .section-intro {
  margin-bottom: 0;
}

/* Push action/category controls down to use the page space */
.section-shell .event-tabs,
.section-shell .placeholder-grid {
  margin-top: clamp(82px, 15vh, 160px);
}

/* Events controls with more presence */
.event-tabs {
  gap: 11px;
}

.event-tabs button {
  min-height: 50px;
  padding: 0 23px;
  font-size: 11.2px;
}

/* Generic internal buttons also stronger */
.placeholder-grid {
  width: 100%;
  max-width: 820px;
  gap: 11px;
}

.placeholder-grid > * {
  min-height: 74px;
  padding: 0 20px;
  border-radius: 8px;
  font-size: 10.8px;
}

/* 4) HOME composition — use more of the vertical space, like old Carrd */
.page-home .hero {
  min-height: calc(100vh - 32px);
  padding-top: 125px;
  padding-bottom: 76px;
}

.page-home .logo-wrap {
  margin-bottom: 34px;
}

/* Keep logo and GRIDLY sizes unchanged; only move composition lower */
.page-home .hero-tagline {
  margin-top: 26px;
}

.page-home .utility-row {
  margin-top: 64px;
}

.page-home .hero-rule {
  margin-top: 46px;
  margin-bottom: 46px;
}

.page-home .hero-kicker {
  margin-bottom: 30px;
}

/* Footer text remains slightly larger as requested earlier */
.footer-links a,
.footer-links button {
  font-size: 9.45px;
}

.footer-note {
  font-size: 9.45px;
}

@media (max-width: 900px) {
  .subpage-nav {
    gap: 14px;
  }

  .subpage-nav a {
    font-size: 10px;
  }

  .subpage-nav a[data-route="/"] {
    font-size: 11.5px;
  }

  .home-menu-button {
    min-width: 142px;
  }
}

@media (max-width: 700px) {
  .subpage-header {
    min-height: 62px;
  }

  .subpage-nav a {
    font-size: 9.3px;
  }

  .subpage-nav a[data-route="/"] {
    font-size: 10.8px;
  }

  .page-home .hero {
    min-height: auto;
    padding-top: 92px;
    padding-bottom: 60px;
  }

  .page-home .utility-row {
    margin-top: 54px;
  }

  .home-menu {
    margin-top: 32px;
  }

  .home-menu-button {
    min-width: calc(50% - 6px);
    min-height: 48px;
    font-size: 12.5px;
  }

  .section-shell {
    min-height: calc(100vh - 120px);
    padding: 66px 0 72px;
  }

  .section-shell .event-tabs,
  .section-shell .placeholder-grid {
    margin-top: 80px;
  }
}


/* =========================================================
   GRIDLY V1.5 — HOME LOWER + UNIFIED BUTTONS + FOOTER VISIBLE
   ========================================================= */

:root {
  --gridly-button-height: 55px;
  --gridly-button-font: 14.5px;
  --gridly-button-radius: 7px;
  --gridly-button-x: 24px;
}

/* 1) HOME — move the whole composition farther down */
.page-home .hero {
  padding-top: 158px;
}

/* Keep logo and GRIDLY sizes unchanged */
.page-home .logo-wrap {
  margin-bottom: 34px;
}

/* Bring the 3 utility icons a little closer to the divider line */
.page-home .utility-row {
  margin-top: 58px;
  margin-bottom: -8px;
}

.page-home .hero-rule {
  margin-top: 38px;
  margin-bottom: 46px;
}

/* 2) ONE BUTTON STANDARD FOR THE SITE */
/* Home main navigation */
.home-menu-button,
/* Events category buttons */
.event-tabs button,
/* Generic buttons / future category buttons */
.placeholder-grid > * {
  min-height: var(--gridly-button-height) !important;
  padding-left: var(--gridly-button-x) !important;
  padding-right: var(--gridly-button-x) !important;
  border-radius: var(--gridly-button-radius) !important;

  font-size: var(--gridly-button-font) !important;
  font-weight: 600 !important;
  letter-spacing: .01em !important;

  border: 1px solid rgba(255,255,255,.40) !important;
  background: rgba(0,0,0,.10) !important;
  color: rgba(255,255,255,.94) !important;

  transition:
    transform .18s ease,
    border-color .18s ease,
    background .18s ease,
    color .18s ease !important;
}

.home-menu-button:hover,
.event-tabs button:hover,
.placeholder-grid > *:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,.72) !important;
  background: rgba(255,255,255,.055) !important;
  color: #fff !important;
}

/* Home buttons get enough width to feel substantial */
.home-menu-button {
  min-width: 170px;
}

/* Events buttons use the same visual standard */
.event-tabs button {
  min-width: 145px;
  white-space: nowrap;
}

/* Other page button blocks also follow the same proportions */
.placeholder-grid {
  width: 100%;
  max-width: 900px;
  gap: 13px;
}

.placeholder-grid > * {
  min-width: 145px;
}

/* Keep event/category controls centered lower on the screen */
.section-shell .event-tabs,
.section-shell .placeholder-grid {
  margin-top: clamp(95px, 17vh, 175px);
}

/* 3) Bring PRIVACY / ACCESSIBILITY + legal notice upward */
/* Internal pages should reveal the footer on first view more reliably */
.page:not(.page-home) .section-shell {
  min-height: calc(100vh - 265px);
  padding-top: 76px;
  padding-bottom: 24px;
}

/* Home also gives footer a little more breathing room */
.page-home .hero {
  min-height: calc(100vh - 155px);
  padding-bottom: 54px;
}

.site-footer {
  margin-top: -10px;
  padding-top: 20px;
  padding-bottom: 28px;
}

/* Keep requested 5% larger footer type */
.footer-links a,
.footer-links button,
.footer-note {
  font-size: 9.45px;
}

/* Tablet */
@media (max-width: 900px) {
  :root {
    --gridly-button-height: 52px;
    --gridly-button-font: 13.5px;
    --gridly-button-x: 20px;
  }

  .home-menu-button {
    min-width: 155px;
  }

  .event-tabs button,
  .placeholder-grid > * {
    min-width: 132px;
  }

  .page:not(.page-home) .section-shell {
    min-height: calc(100vh - 235px);
  }
}

/* Mobile */
@media (max-width: 700px) {
  :root {
    --gridly-button-height: 50px;
    --gridly-button-font: 12.8px;
    --gridly-button-x: 16px;
  }

  .page-home .hero {
    padding-top: 108px;
    min-height: auto;
  }

  .page-home .utility-row {
    margin-top: 48px;
    margin-bottom: -5px;
  }

  .page-home .hero-rule {
    margin-top: 34px;
  }

  .home-menu-button {
    min-width: calc(50% - 6px);
  }

  .event-tabs {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .event-tabs button {
    min-width: 130px;
  }

  .section-shell .event-tabs,
  .section-shell .placeholder-grid {
    margin-top: 76px;
  }

  .page:not(.page-home) .section-shell {
    min-height: calc(100vh - 210px);
    padding-top: 58px;
    padding-bottom: 18px;
  }

  .site-footer {
    margin-top: -4px;
    padding-top: 18px;
    padding-bottom: 22px;
  }
}


/* =========================================================
   GRIDLY V1.6 — CLEAN ROWS + BACK AT PAGE BOTTOM
   ========================================================= */

/* Top internal bar: no BACK button. Keep nav centered. */
.subpage-header {
  grid-template-columns: 1fr auto 1fr;
}

.header-spacer {
  justify-self: start;
  width: 42px;
  height: 42px;
}

/* Search stays on the right */
.top-search.icon-search {
  justify-self: end;
}

/* Hide old top-back styling if cached anywhere */
.back-button {
  display: none !important;
}

/* Internal descriptions: always one centered line */
.section-intro {
  width: max-content;
  max-width: none;
  white-space: nowrap;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  overflow: visible;
}

/* Keep all main HOME buttons in a single row */
.home-menu {
  width: min(1180px, calc(100vw - 40px));
  margin-left: 50%;
  transform: translateX(-50%);
  flex-wrap: nowrap;
  justify-content: center;
  gap: 12px;
}

.home-menu-button {
  flex: 1 1 0;
  min-width: 0;
  max-width: 180px;
  white-space: nowrap;
}

/* BACK now lives at the bottom of every internal page */
.page-bottom-nav {
  width: 100%;
  margin-top: auto;
  padding-top: 52px;
  display: flex;
  justify-content: center;
}

.page-back-button {
  min-width: 112px;
  min-height: 44px;
  padding: 0 18px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;

  border: 1px solid rgba(255,255,255,.28);
  border-radius: 7px;

  background: rgba(0,0,0,.10);
  color: rgba(255,255,255,.84);

  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;

  cursor: pointer;

  transition:
    transform .18s ease,
    border-color .18s ease,
    background .18s ease,
    color .18s ease;
}

.page-back-button:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,.60);
  background: rgba(255,255,255,.05);
  color: #fff;
}

.page-back-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Preserve centered action areas while allowing BACK to sit lower */
.page:not(.page-home) .section-shell {
  min-height: calc(100vh - 230px);
}

/* Tablet: maintain one-row HOME nav; permit horizontal scroll only if necessary */
@media (max-width: 1050px) {
  .home-menu {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
  }

  .home-menu::-webkit-scrollbar {
    display: none;
  }

  .home-menu-button {
    flex: 0 0 150px;
  }

  .section-intro {
    font-size: 13px;
  }
}

/* Mobile: user asked to keep text/buttons on one line, so scroll instead of stacking */
@media (max-width: 700px) {
  .subpage-header {
    grid-template-columns: 1fr auto;
  }

  .header-spacer {
    display: none;
  }

  .subpage-nav {
    order: 1;
  }

  .top-search.icon-search {
    order: 2;
  }

  .home-menu {
    width: calc(100vw - 24px);
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .home-menu-button {
    min-width: 145px !important;
    flex: 0 0 145px;
  }

  .section-intro {
    font-size: 12px;
  }

  .page-bottom-nav {
    padding-top: 42px;
  }
}


/* =========================================================
   GRIDLY V1.7 — VERTICAL ALIGNMENT + LARGER BUTTON STANDARD
   ========================================================= */

/*
  One shared vertical baseline:
  - HOME footer sits lower.
  - Internal pages use the same footer baseline.
  - BACK remains above Privacy / Accessibility instead of touching it.
*/

/* HOME: push the footer area about 5% lower */
.page-home {
  min-height: 100vh;
}

.page-home .hero {
  min-height: calc(100vh - 70px);
  padding-bottom: 42px;
}

/* Internal pages: account for the visible top navigation,
   then fill the remaining viewport to the same footer baseline. */
.page:not(.page-home).is-active {
  min-height: calc(100vh - 87px);
  display: flex;
  flex-direction: column;
}

.page:not(.page-home) .section-shell {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  padding-top: 76px;
  padding-bottom: 18px;
}

/* Footer position / spacing consistent across pages */
.site-footer {
  margin-top: 0;
  padding-top: 24px;
  padding-bottom: 30px;
}

/* 2) BACK: lift it away from Privacy / Accessibility */
.page-bottom-nav {
  width: 100%;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 52px;
  display: flex;
  justify-content: center;
}

/* 3) Button standard: +10% everywhere to keep one visual system */
:root {
  --gridly-button-height: 61px;
  --gridly-button-font: 16px;
  --gridly-button-radius: 7px;
  --gridly-button-x: 26px;
}

.home-menu-button,
.event-tabs button,
.placeholder-grid > * {
  min-height: var(--gridly-button-height) !important;
  padding-left: var(--gridly-button-x) !important;
  padding-right: var(--gridly-button-x) !important;
  border-radius: var(--gridly-button-radius) !important;
  font-size: var(--gridly-button-font) !important;
}

/* Keep the HOME row in a single line with the larger standard */
.home-menu-button {
  min-width: 0 !important;
  max-width: none;
  flex: 1 1 0;
}

/* Events: move the row farther down into the page */
.section-shell .event-tabs {
  margin-top: clamp(135px, 21vh, 205px);
}

.event-tabs {
  width: 100%;
  justify-content: center;
  gap: 13px;
}

.event-tabs button {
  min-width: 160px;
}

/* Generic future page buttons keep the same size standard */
.placeholder-grid {
  max-width: 980px;
}

.placeholder-grid > * {
  min-width: 160px;
}

/* 4) HOME utility row: move clock / keyboard / ? farther down (~5%) */
.page-home .utility-row {
  margin-top: calc(58px + 5vh);
  margin-bottom: -8px;
}

/* Keep the utility icons relatively close to the divider */
.page-home .hero-rule {
  margin-top: 34px;
  margin-bottom: 46px;
}

/* Desktop home row stays one line */
.home-menu {
  width: min(1260px, calc(100vw - 40px));
  gap: 13px;
}

/* Footer text unchanged from the requested enlarged version */
.footer-links a,
.footer-links button,
.footer-note {
  font-size: 9.45px;
}

@media (max-width: 1100px) {
  :root {
    --gridly-button-height: 56px;
    --gridly-button-font: 14px;
    --gridly-button-x: 20px;
  }

  .home-menu {
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
  }

  .home-menu::-webkit-scrollbar {
    display: none;
  }

  .home-menu-button {
    min-width: 154px !important;
    flex: 0 0 154px;
  }

  .event-tabs {
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
  }

  .event-tabs::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 700px) {
  :root {
    --gridly-button-height: 52px;
    --gridly-button-font: 13px;
    --gridly-button-x: 16px;
  }

  .page-home {
    min-height: auto;
  }

  .page-home .hero {
    min-height: auto;
    padding-bottom: 50px;
  }

  .page-home .utility-row {
    margin-top: 68px;
  }

  .page:not(.page-home).is-active {
    min-height: calc(100vh - 72px);
  }

  .page:not(.page-home) .section-shell {
    padding-top: 58px;
    padding-bottom: 14px;
  }

  .section-shell .event-tabs {
    margin-top: 95px;
  }

  .event-tabs button {
    min-width: 145px;
  }

  .page-bottom-nav {
    padding-bottom: 42px;
  }

  .site-footer {
    padding-top: 20px;
    padding-bottom: 24px;
  }
}


/* =========================================================
   GRIDLY V1.8 — EVENTS + AVATAR MATCH
   ========================================================= */

/* EVENTS and AVATAR now share exactly the same row geometry */
.event-tabs,
.avatar-tabs {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: 14px;

  /* roughly 10% lower than the previous position */
  margin-top: clamp(155px, 23vh, 225px);
}

/* Same button size on both pages */
.event-tabs button,
.avatar-tabs button {
  min-width: 178px !important;
  min-height: 67px !important;
  padding: 0 29px !important;

  border: 1px solid rgba(255,255,255,.40) !important;
  border-radius: 7px !important;

  background: rgba(0,0,0,.10) !important;
  color: rgba(255,255,255,.94) !important;

  font-size: 17.5px !important;
  font-weight: 600 !important;
  letter-spacing: .01em !important;

  white-space: nowrap;
  cursor: pointer;

  transition:
    transform .18s ease,
    border-color .18s ease,
    background .18s ease,
    color .18s ease !important;
}

.event-tabs button:hover,
.avatar-tabs button:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,.72) !important;
  background: rgba(255,255,255,.055) !important;
  color: #fff !important;
}

/* AVATAR no longer uses the generic grid layout */
.avatar-tabs {
  max-width: 760px;
}

/* Keep both rows usable on narrower screens without stacking */
@media (max-width: 1100px) {
  .event-tabs,
  .avatar-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .event-tabs::-webkit-scrollbar,
  .avatar-tabs::-webkit-scrollbar {
    display: none;
  }

  .event-tabs button,
  .avatar-tabs button {
    min-width: 165px !important;
    min-height: 62px !important;
    font-size: 16px !important;
    flex: 0 0 auto;
  }
}

@media (max-width: 700px) {
  .event-tabs,
  .avatar-tabs {
    margin-top: 105px;
  }

  .event-tabs button,
  .avatar-tabs button {
    min-width: 150px !important;
    min-height: 56px !important;
    font-size: 14px !important;
    padding: 0 18px !important;
  }
}

/* Monthly Events: the category screen keeps its approved button geometry. */
.event-detail-shell {
  width: min(calc(100% - 36px), 900px);
  min-height: calc(100vh - 150px);
  margin: 0 auto;
  padding: 82px 0 90px;
  text-align: center;
}

.event-detail-shell h2 {
  margin: 0;
  font-family: "League Spartan", "Arimo", sans-serif;
  font-size: clamp(48px, 8vw, 82px);
  font-weight: 900;
  line-height: 1;
}

.event-detail-intro {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.event-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 56px auto 40px;
  text-align: left;
}

.event-card {
  min-width: 0;
  padding: 26px;
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(0,58,156,.13), rgba(255,255,255,.025) 62%);
}

.event-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.event-card h3 {
  margin: 0;
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 700;
}

.event-favorite {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  background: transparent;
  color: rgba(255,255,255,.7);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.event-favorite[aria-pressed="true"] { color: #fff; }
.event-favorite:hover { transform: scale(1.1); }

.event-date {
  margin: 12px 0 23px;
  color: rgba(255,255,255,.66);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .035em;
}

.event-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.event-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.event-actions a:hover { border-color: #fff; }
.event-actions .event-teleport { background: var(--blue); border-color: var(--blue); }
.event-actions .event-teleport:hover { background: var(--blue-hover); }

.event-return {
  display: inline-block;
  padding: 15px 22px;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
}

.event-return:hover { border-color: #fff; }
.event-empty {
  grid-column: 1 / -1;
  margin: 30px 0;
  padding: 50px 12px;
  color: var(--muted);
  text-align: center;
}

.event-favorite:focus-visible,
.event-actions a:focus-visible,
.event-return:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 700px) {
  .event-detail-shell { padding-top: 58px; }
  .event-list { grid-template-columns: 1fr; margin-top: 38px; }
  .event-card { padding: 21px; }
}


/* =========================================================
   GRIDLY V1.9 — EVENTS + AVATAR AT HOME BUTTON LEVEL
   ========================================================= */

/*
  Keep the approved EVENTS / AVATAR button size exactly as-is.
  Only move both rows down so they sit visually at the same
  vertical level as the main HOME section-button row.
*/
.event-tabs,
.avatar-tabs {
  margin-top: clamp(340px, 43vh, 480px) !important;
}

/* Preserve the exact approved button size from V1.8 */
.event-tabs button,
.avatar-tabs button {
  min-width: 178px !important;
  min-height: 67px !important;
  padding: 0 29px !important;
  font-size: 17.5px !important;
}

/* Give the internal page enough room for the lower row + BACK/footer */
.page[data-page="/events"] .section-shell,
.page[data-page="/avatar"] .section-shell {
  min-height: calc(100vh - 150px);
}

/* Smaller screens: maintain matching position without stacking */
@media (max-width: 1100px) {
  .event-tabs,
  .avatar-tabs {
    margin-top: clamp(260px, 36vh, 380px) !important;
  }

  .event-tabs button,
  .avatar-tabs button {
    min-width: 165px !important;
    min-height: 62px !important;
    font-size: 16px !important;
  }
}

@media (max-width: 700px) {
  .event-tabs,
  .avatar-tabs {
    margin-top: 150px !important;
  }

  .event-tabs button,
  .avatar-tabs button {
    min-width: 150px !important;
    min-height: 56px !important;
    font-size: 14px !important;
    padding: 0 18px !important;
  }
}

/* V2.2: wider event cards and the shared bottom navigation. */
.event-detail-shell {
  width: min(calc(100% - 36px), 1280px);
  flex: 1 1 auto;
  min-height: 0;
  padding-bottom: 18px;
}

.event-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: clamp(160px, 30vh, 300px);
  margin-bottom: 30px;
}

.event-card {
  position: relative;
  display: flex;
  flex: 1 0 calc((100% - 56px) / 5);
  flex-direction: column;
  min-width: 0;
  min-height: 238px;
  padding: 18px 18px 17px;
  text-align: center;
}

.event-card-head {
  display: block;
  width: 100%;
  padding-top: 26px;
}

.event-card-controls {
  position: absolute;
  top: 7px;
  right: 9px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.event-card h3 {
  font-size: 22.26px;
  line-height: 1.14;
}

.event-notification {
  display: inline-flex;
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  color: rgba(255,255,255,.55);
}

.event-notification svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.event-favorite {
  position: static;
  width: 30px;
  height: 30px;
  font-size: 25px;
}

.event-date {
  margin: 14px 0 22px;
  font-size: 15px;
  line-height: 1.5;
  white-space: nowrap;
}

.event-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 11px;
  width: 100%;
  margin-top: auto;
}

.event-socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.event-actions .event-social {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
}

.event-social svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.event-social .icon-dot { fill: currentColor; stroke: none; }

.event-actions .event-teleport {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 38px;
  font-size: 12px;
  letter-spacing: .035em;
}

@media (max-width: 980px) {
  .event-card { flex-basis: calc((100% - 14px) / 2); }
}

@media (max-width: 620px) {
  .event-card { flex-basis: calc((100% - 14px) / 2); }
  .event-list { margin-top: clamp(105px, 23vh, 200px); }
  .event-card { padding-inline: 12px; }
  .event-date { font-size: 12px; }
}

@media (max-width: 380px) {
  .event-card { flex-basis: 100%; }
}

/* V2.4: keep every EVENTS category label centered in an equal-width button. */
.event-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 178px;
  width: 178px;
  min-width: 178px !important;
  max-width: 178px;
  padding-left: 8px !important;
  padding-right: 8px !important;
  text-align: center;
}

@media (max-width: 1100px) {
  .event-tabs button {
    flex-basis: 165px;
    width: 165px;
    min-width: 165px !important;
    max-width: 165px;
  }
}

@media (max-width: 700px) {
  .event-tabs button {
    flex-basis: 150px;
    width: 150px;
    min-width: 150px !important;
    max-width: 150px;
  }
}

/* V2.5: Female events share the Male card design. */

.event-name-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 26px;
}

.event-adult-icon {
  display: inline-flex;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: #FF0000;
}

.event-adult-icon svg { width: 100%; height: 100%; fill: currentColor; }

/* V2.6: place events in order, five columns across on wide screens. */
.event-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
}

.event-card { width: 100%; }

@media (max-width: 1099px) {
  .event-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 749px) {
  .event-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 419px) {
  .event-list { grid-template-columns: minmax(0, 1fr); }
}
