/* ==========================================================================
   Martial Arts Authority — design system
   Black / white / bone, one red. Calm whitespace, fierce type.
   ========================================================================== */

:root {
  --ink: #0b0b0b;
  --ink-2: #1a1a1a;
  --paper: #ffffff;
  --bone: #f1efea;
  --line: #e3e0d9;
  --line-dark: #2a2a2a;
  --muted: #6d6b66;
  --muted-dark: #9a978f;
  --red: #d62718;
  --red-deep: #a51c10;

  --font-display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --font-body: "Ubuntu", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Ubuntu", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 4px;
  --radius-lg: 10px;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1360px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Type ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: .005em;
  line-height: .9;
  margin: 0;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 2px;
  background: var(--red);
}
.red { color: var(--red); }
.h-section {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: .95;
  margin: 10px 0 0;
  font-weight: 400;
}

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 12px; }
.logo-seal {
  width: 34px; height: 34px;
  background: var(--red);
  border-radius: 3px;
  display: grid; place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: .02em;
  flex: none;
}
.logo-word {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: .88;
  letter-spacing: .01em;
}
.logo-word span { display: block; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 247, .92);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  height: 72px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-links { display: flex; gap: 28px; font-size: 14px; font-weight: 500; }
.nav-links a { position: relative; padding: 6px 0; color: var(--ink-2); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--red); transition: right .3s var(--ease);
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { right: 0; }
.nav-actions { display: flex; gap: 10px; align-items: center; }

.nav.on-dark { background: transparent; border-color: transparent; position: absolute; left: 0; right: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
.nav.on-dark, .nav.on-dark .nav-links a { color: #fff; }
.nav.on-dark .btn-ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.nav.on-dark .icon-btn { background: transparent; border-color: rgba(255,255,255,.35); color: #fff; }
.nav.on-dark .btn-ghost:hover { background: #fff; color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border-radius: 999px;
  font-size: 14px; font-weight: 600;
  white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.btn-ghost { border: 1px solid var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--red); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-deep); }
.btn-white { background: #fff; color: var(--ink); }
.btn-white:hover { background: var(--red); color: #fff; }
.btn svg { width: 16px; height: 16px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 999px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line); background: #fff;
  transition: background .2s, color .2s, border-color .2s;
}
.icon-btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(880px, 100vh);
  display: flex; align-items: center;
  background: var(--ink);
  color: #fff;
  text-align: center;
}
.hero-media {
  position: absolute; inset: 0;
  background: url("img/grapple-hero.jpg") center 40% / cover no-repeat;
  filter: grayscale(1) contrast(1.15) brightness(.5);
  animation: heroIn 1.6s var(--ease) both;
}
@keyframes heroIn { from { opacity: 0; } to { opacity: 1; } }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,11,11,.5) 0%, rgba(11,11,11,.15) 40%, rgba(11,11,11,.75) 100%);
}
.hero-content { position: relative; z-index: 2; width: 100%; padding-top: 140px; padding-bottom: 96px; }
.hero h1 { font-size: clamp(60px, 10vw, 160px); margin: 0 auto; max-width: none; }
.hero-sub { margin: 18px auto 0; font-size: 19px; color: rgba(255,255,255,.82); font-weight: 300; }

/* ---------- Search bar ---------- */
.search {
  display: grid;
  grid-template-columns: 1.3fr 1.2fr 1fr auto;
  align-items: center;
  background: #fff; color: var(--ink);
  border-radius: 999px;
  padding: 8px;
  margin: 44px auto 0;
  max-width: 1040px;
  text-align: left;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.55);
}
.search-field {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 20px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.search-field:nth-child(3) { border-right: 0; }
.search-field svg { width: 20px; height: 20px; flex: none; color: var(--muted); }
.search-field label { display: block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0; color: var(--muted); }
.search-field input, .search-field select {
  width: 100%; border: 0; outline: 0; background: transparent; padding: 2px 0 0;
  font-size: 15px; font-weight: 500;
  appearance: none; -webkit-appearance: none;
  text-overflow: ellipsis;
}
.search-field input::placeholder { color: #9b988f; }
.search .btn-red { height: 56px; padding: 0 30px; font-size: 15px; }

/* ---------- Ticker ---------- */
.ticker {
  background: var(--ink); color: #fff;
  border-top: 1px solid var(--line-dark);
}
.ticker .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.ticker-stats { display: flex; gap: clamp(20px, 4vw, 56px); flex-wrap: wrap; }
.stat { display: flex; align-items: baseline; gap: 10px; font-size: 14px; color: rgba(255,255,255,.65); }
.stat b { font-family: var(--font-display); font-weight: 400; font-size: 28px; color: #fff; letter-spacing: .02em; }
.live { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0; color: rgba(255,255,255,.65); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(214,39,24,.7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(214,39,24,0); } 100% { box-shadow: 0 0 0 0 rgba(214,39,24,0); } }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-tight { padding: clamp(48px, 6vw, 80px) 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.section-head p { margin: 14px 0 0; color: var(--muted); max-width: 520px; }
.carousel-nav { display: flex; gap: 8px; flex: none; }
.link-arrow { white-space: nowrap; flex: none; font-size: 15px; font-weight: 500; display: inline-flex; gap: 8px; align-items: center; }
.link-arrow:hover { color: var(--red); }

/* ---------- Discipline tiles (marks on ink) ---------- */
.disciplines {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 1fr);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 4px 4px 4px 0;
}
.disciplines::-webkit-scrollbar { display: none; }
.disc { text-align: left; scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px; }
.disc-tile {
  position: relative; display: grid; place-items: center;
  aspect-ratio: 1; width: 100%;
  background: var(--ink);
  margin-bottom: 10px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.disc-tile::before { content: ""; position: absolute; left: 0; top: 0; width: 18%; height: 4px; background: var(--red); }
.disc-tile svg { width: 46%; height: auto; transition: transform .45s var(--ease); }
.disc:hover .disc-tile { transform: translateY(-3px); box-shadow: 0 18px 36px -22px rgba(0,0,0,.6); }
.disc:hover .disc-tile svg { transform: scale(1.08) rotate(-3deg); }
.disc-name { font-family: var(--font-display); text-transform: uppercase; font-size: 24px; line-height: 1; }
.disc-meta { font-size: 13px; color: var(--muted); }
.disc-check {
  position: absolute; top: 10px; right: 10px;
  width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.4);
  display: grid; place-items: center;
  transition: background .2s, border-color .2s;
}
.disc-check svg { width: 12px !important; opacity: 0; }
.disc[aria-pressed="true"] .disc-check { background: var(--red); border-color: var(--red); }
.disc[aria-pressed="true"] .disc-check svg { opacity: 1; }
.disc[aria-pressed="true"] .disc-tile { outline: 2px solid var(--red); outline-offset: 3px; }

/* ---------- Mark helpers ---------- */
.field-mark { display: grid; place-items: center; width: 20px; height: 20px; flex: none; color: var(--muted); }
.field-mark svg { width: 20px; height: 20px; }
.field-mark.has-mark, .field-mark.has-mark svg { width: 32px; height: 32px; }
.tag svg { width: 16px; height: 16px; margin: -2px 5px -3px -3px; vertical-align: middle; }
.chip svg.mk { width: 20px; height: 20px; margin-left: -4px; }

/* ---------- Discipline picker ---------- */
.chev { display: grid; place-items: center; flex: none; color: #a9a69e; transition: transform .25s var(--ease), color .2s; pointer-events: none; }
.chev svg { width: 16px; height: 16px; }
.search-field:hover .chev { color: var(--ink); }
.picker.open .chev { transform: rotate(180deg); color: var(--ink); }
.picker { cursor: pointer; }
.search-field select { cursor: pointer; }
.search { position: relative; }
.picker { position: static; }
.picker-btn {
  display: block; width: 100%; text-align: left; padding: 2px 0 0;
  font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.picker-panel {
  position: absolute; left: 0; top: calc(100% + 10px); z-index: 30;
  width: min(560px, 100%);
  background: #fff; color: var(--ink);
  border-radius: 18px;
  padding: 10px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.45);
}
.picker-panel[hidden] { display: none; }
.picker-opt {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; border-radius: 10px;
  font-size: 15px; font-weight: 500; text-align: left;
}
.picker-opt:hover { background: var(--bone); }
.opt-mark { width: 36px; height: 36px; display: grid; place-items: center; flex: none; color: var(--muted); }
.opt-mark svg { width: 34px; height: 34px; }
.opt-mark svg:not([viewBox="0 0 128 128"]) { width: 20px; height: 20px; }

/* ---------- Gym cards ---------- */
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 3 * 20px) / 4);
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.card {
  position: relative;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .25s, transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(0,0,0,.35); }
.card-media { display: block; position: relative; aspect-ratio: 16 / 10.5; overflow: hidden; background: var(--bone); }
.card-media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: filter .6s var(--ease), transform .8s var(--ease); }
.card:hover .card-media img { filter: grayscale(0) contrast(1.05); transform: scale(1.04); }
.badge {
  position: absolute; left: 12px; top: 12px;
  background: var(--red); color: #fff;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0;
  padding: 6px 9px; border-radius: 3px;
}
.badge.ink { background: var(--ink); }
.save {
  position: absolute; right: 12px; top: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(11,11,11,.55); color: #fff;
  display: grid; place-items: center;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background .2s;
}
.save svg { width: 17px; height: 17px; }
.save:hover, .save[aria-pressed="true"] { background: var(--red); }
.save[aria-pressed="true"] svg { fill: currentColor; }
.price-tag {
  position: absolute; right: 12px; bottom: 12px;
  background: var(--ink); color: #fff;
  padding: 7px 11px; border-radius: 3px;
  font-size: 13px;
}
.price-tag b { font-size: 16px; }
.card-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-size: 17px; font-weight: 650; line-height: 1.25; margin: 0; letter-spacing: -.01em; }
.rating { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.rating b { font-weight: 650; }
.rating .star { color: var(--red); width: 14px; height: 14px; }
.rating span { color: var(--muted); }
.card-loc { font-size: 14px; color: var(--muted); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tag {
  font-size: 12.5px; font-weight: 500;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 10px; background: var(--paper);
}
.tag.hot { border-color: var(--red); color: var(--red); background: #fff; }

/* ---------- Open mats ---------- */
.mats { border-top: 1px solid var(--line); }
.mat-row {
  display: grid;
  grid-template-columns: 110px 130px 1fr 170px 130px 44px;
  align-items: center; gap: 20px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--line);
  transition: background .2s, padding .3s var(--ease);
}
.mat-row:hover { background: #fff; padding-left: 14px; }
.mat-day { font-family: var(--font-display); font-size: 30px; line-height: 1; }
.mat-day small { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: 0; margin-top: 4px; }
.mat-time { font-family: var(--font-mono); font-size: 14px; }
.mat-gym b { display: block; font-weight: 650; }
.mat-gym span { font-size: 14px; color: var(--muted); }
.mat-row .icon-btn { width: 40px; height: 40px; }
.mat-row:hover .icon-btn { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- Dark band / rankings ---------- */
.dark { background: var(--ink); color: #fff; }
.dark .eyebrow { color: var(--muted-dark); }
.dark .section-head p { color: var(--muted-dark); }
.rankings { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: start; }
.rank-feature { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/5; background: var(--ink-2); }
.rank-feature img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.2) brightness(.75); }
.rank-feature::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.9), transparent 55%); }
.rank-feature-body { position: absolute; z-index: 2; left: 28px; right: 28px; bottom: 28px; }
.rank-feature-body .big-num { font-family: var(--font-display); font-size: 140px; line-height: .8; color: var(--red); }
.rank-feature-body h3 { font-family: var(--font-display); font-weight: 400; font-size: 44px; margin: 10px 0 4px; line-height: .95; }
.rank-feature-body p { margin: 0; color: rgba(255,255,255,.7); font-size: 14px; }
.rank-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.rank-tab { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-dark); font-size: 13px; font-weight: 600; color: rgba(255,255,255,.75); }
.rank-tab[aria-selected="true"] { background: #fff; color: var(--ink); border-color: #fff; }
.rank-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-dark); }
.rank-list li {
  display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 16px;
  padding: 18px 0; border-bottom: 1px solid var(--line-dark);
}
.rank-list .n { font-family: var(--font-display); font-size: 32px; color: rgba(255,255,255,.35); }
.rank-list li:first-child .n { color: var(--red); }
.rank-list b { display: block; font-size: 17px; font-weight: 600; }
.rank-list span { font-size: 13px; color: var(--muted-dark); }
.rank-list .pts { font-family: var(--font-mono); font-size: 13px; color: rgba(255,255,255,.8); text-align: right; }
.trend { color: var(--red); font-size: 12px; }

/* ---------- Calm statement ---------- */
.statement { text-align: center; padding: clamp(80px, 12vw, 160px) 0; }
.statement .kanji { font-size: 15px; letter-spacing: 0; color: var(--red); font-weight: 500; }
.statement h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(44px, 7vw, 104px); line-height: .92; margin: 22px auto 0; max-width: 14ch;
}
.statement p { max-width: 520px; margin: 24px auto 0; color: var(--muted); font-size: 17px; }

/* ---------- Learn ---------- */
.learn { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 20px; }
.article { display: flex; flex-direction: column; gap: 14px; }
.article-media { display: block; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--bone); }
.article:first-child .article-media { display: block; aspect-ratio: 16 / 11; }
.article-media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: transform .8s var(--ease), filter .5s; }
.article:hover .article-media img { transform: scale(1.04); filter: grayscale(0); }
.article h3 { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 650; letter-spacing: -.015em; }
.article:first-child h3 { font-size: 30px; }
.article p { margin: 0; color: var(--muted); font-size: 15px; }
.article .eyebrow { font-size: 11px; }

/* ---------- Quiz band ---------- */
.quiz {
  display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 48px);
  background: #fff;
  position: relative; overflow: hidden;
}

.quiz h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(32px, 4vw, 52px); line-height: .95; margin: 10px 0 8px; }
.quiz p { margin: 0; color: var(--muted); max-width: 560px; }

/* ---------- Owners CTA ---------- */
.owners { position: relative; overflow: hidden; }
.owners-media { position: absolute; inset: 0; background: url("img/pads-hero.jpg") center / cover; filter: grayscale(1) brightness(.35) contrast(1.2); }
.owners .wrap { position: relative; display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: end; padding-top: clamp(80px, 10vw, 140px); padding-bottom: clamp(80px, 10vw, 140px); }
.owners h2 { font-size: clamp(52px, 7vw, 108px); }
.owners ul { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 14px; }
.owners li { display: flex; gap: 12px; align-items: flex-start; color: rgba(255,255,255,.85); }


/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(255,255,255,.7); padding: 72px 0 32px; border-top: 1px solid var(--line-dark); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.footer .logo { color: #fff; }
.footer h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0; color: #fff; margin: 0 0 16px; font-weight: 500; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14px; }
.footer a:hover { color: #fff; }
.footer-blurb { font-size: 14px; max-width: 300px; margin: 18px 0 0; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line-dark); font-size: 13px; }
.footer-bottom .sister { color: #fff; }
.footer-bottom .sister b { color: var(--red); font-weight: 600; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-media { animation: none; transform: none; }
  * { scroll-behavior: auto !important; }
}

/* ==========================================================================
   Search page
   ========================================================================== */
.search-page { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.search-page .nav { position: relative; }
.nav-search {
  display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 16px; min-width: 0;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  font-size: 14px; font-weight: 500; flex: 0 1 420px;
}
.nav-search svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.nav-search span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-search i { width: 5px; height: 5px; border-radius: 50%; background: var(--red); flex: none; }

.filter-bar {
  display: flex; align-items: center;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  padding-right: var(--gutter);
}
.filters {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px 14px var(--gutter);
  overflow-x: auto; scrollbar-width: none;
  flex: 1; min-width: 0;
  mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
  font-size: 14px; font-weight: 600; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px;
  transition: border-color .2s, background .2s, color .2s;
}
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip svg { width: 16px; height: 16px; }
.chip .count { background: var(--red); color: #fff; font-size: 11px; min-width: 18px; height: 18px; border-radius: 9px; display: inline-grid; place-items: center; padding: 0 5px; }
.chip-select { padding-right: 10px; cursor: pointer; }
.chip-select select { border: 0; background: transparent; font-weight: 600; font-size: 14px; color: inherit; cursor: pointer; outline: 0; }
.chip-select.on select option { color: var(--ink); }
.filters .sep { width: 1px; height: 24px; background: var(--line); margin: 0 6px; flex: none; }
.toggle { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; padding-left: 16px; border-left: 1px solid var(--line); white-space: nowrap; flex: none; }
.switch { width: 46px; height: 26px; border-radius: 13px; background: var(--line); position: relative; transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch[aria-checked="true"] { background: var(--ink); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }

.split { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 46%); min-height: 0; }
.split.no-map { grid-template-columns: 1fr; }
.split.no-map .map-pane { display: none; }
.split.no-map .results-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.results { overflow-y: auto; padding: 24px var(--gutter) 64px; }
.results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.results-head h1 { font-size: 15px; font-weight: 500; margin: 0; color: var(--muted); }
.results-head h1 b { color: var(--ink); font-weight: 650; }
.sort { font-size: 14px; display: flex; gap: 6px; align-items: center; color: var(--muted); }
.sort select { border: 0; background: transparent; font-weight: 600; color: var(--ink); }
.notice {
  display: flex; gap: 14px; align-items: center;
  background: #fff; border: 1px solid var(--line);
  padding: 14px 16px; border-radius: var(--radius); margin-bottom: 22px; font-size: 14px;
}
.notice .badge { position: static; flex: none; }
.results-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.card .meta-row { display: flex; gap: 14px; align-items: center; font-size: 13px; color: var(--muted); margin-top: 4px; flex-wrap: wrap; }
.card .meta-row svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.card.hl { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.empty { padding: 60px 0; text-align: center; color: var(--muted); }
.empty b { display: block; font-family: var(--font-display); font-size: 36px; font-weight: 400; color: var(--ink); }

.map-pane { position: relative; border-left: 1px solid var(--line); background: #e9e8e4; }
#map { position: absolute; inset: 0; }
.leaflet-tile-pane { filter: grayscale(1) contrast(.92) brightness(1.04); }
.leaflet-container { font-family: var(--font-body); background: #e9e8e4; }
.pin {
  background: var(--ink); color: #fff;
  font-size: 13px; font-weight: 700;
  padding: 6px 10px; border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 6px 16px -6px rgba(0,0,0,.5);
  transform: translate(-50%, -50%);
  display: inline-block;
  border: 2px solid #fff;
  transition: background .2s, transform .2s var(--ease);
}
.pin.on { background: var(--red); transform: translate(-50%, -50%) scale(1.12); z-index: 1000; }
.leaflet-marker-icon.pin-wrap { background: none; border: 0; }
.leaflet-popup-content-wrapper { border-radius: var(--radius-lg); padding: 0; overflow: hidden; }
.leaflet-popup-content { margin: 0; width: 260px !important; }
.pop img { width: 100%; aspect-ratio: 16/9; object-fit: cover; filter: grayscale(1); }
.pop div { padding: 12px 14px 14px; }
.pop b { display: block; font-size: 15px; }
.pop span { font-size: 13px; color: var(--muted); }
.map-toggle-mobile { display: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .rail { grid-auto-columns: calc((100% - 2 * 20px) / 3); }
  .nav-links { gap: 20px; }
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 42%); }
  .results-grid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-grid; }
  .nav-actions .btn-ghost.hide-sm { display: none; }
  .search { grid-template-columns: 1fr 1fr; border-radius: 22px; gap: 4px; }
  .search-field { border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 14px; }
  .search-field:nth-child(1) { grid-column: 1 / -1; }
  .search-field:nth-child(3) { border-bottom: 1px solid var(--line); }
  .search .btn-red { grid-column: 1 / -1; width: 100%; height: 52px; margin-top: 4px; }
  .rail { grid-auto-columns: calc((100% - 20px) / 2.15); }
  .mat-row { grid-template-columns: 84px 1fr 44px; grid-template-areas: "day gym go" "day time go" "day tags go"; row-gap: 4px; }
  .mat-day { grid-area: day; }
  .mat-gym { grid-area: gym; }
  .mat-time { grid-area: time; font-size: 13px; color: var(--muted); }
  .mat-row .tags { grid-area: tags; margin-top: 4px; }
  .mat-row .mat-level { display: none; }
  .mat-row .icon-btn { grid-area: go; }
  .rankings, .owners .wrap { grid-template-columns: 1fr; }
  .rank-feature { aspect-ratio: 16/11; }
  .learn { grid-template-columns: 1fr 1fr; }
  .learn .article:first-child { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }

  .split { grid-template-columns: 1fr; }
  .map-pane { display: none; }
  .split.map-only .results { display: none; }
  .split.map-only .map-pane { display: block; }
  .results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-toggle-mobile {
    display: inline-flex; position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 1200;
    box-shadow: 0 12px 30px -10px rgba(0,0,0,.5);
  }
  .toggle { display: none; }
}
@media (max-width: 640px) {
  .nav-inner { height: 64px; }
  .logo-word { font-size: 16px; }
  .logo-seal { width: 30px; height: 30px; font-size: 13px; }
  .nav-actions .btn-ghost { display: none; }
  .hero { min-height: 100svh; }
  .hero-content { padding-top: 110px; padding-bottom: 32px; }
  .hero-sub { font-size: 16px; }
  .hero-foot { flex-direction: column; align-items: flex-start; }
  .hero-caption { text-align: left; }
  .search { grid-template-columns: 1fr; }
  .stat b { font-size: 22px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .carousel-nav { display: none; }
  .rail { grid-auto-columns: 82%; gap: 14px; }
  .disciplines { grid-auto-columns: 40%; gap: 12px; }
  .disc-name { font-size: 20px; }
  .learn { grid-template-columns: 1fr; }
  .quiz { grid-template-columns: 1fr; }
  .rank-feature-body .big-num { font-size: 96px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-search { flex: 1 1 auto; }
  .search-page .nav .logo-word { display: none; }
  .results-grid { grid-template-columns: 1fr; }
}

/* ---------- Type: Anton headlines, Ubuntu everything else ---------- */
.display, .h-section, .statement h2, .quiz h3, .rank-feature-body h3, .rank-feature-body .big-num {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .005em;
}
.display { line-height: .92; }
.h-section { font-size: clamp(34px, 4.2vw, 54px); line-height: .95; margin: 0; }
.statement h2 { font-size: clamp(44px, 7vw, 100px); line-height: .92; max-width: 14ch; }
.quiz h3 { font-size: clamp(32px, 4vw, 50px); line-height: .95; margin: 0 0 12px; }
.owners h2 { font-size: clamp(52px, 7vw, 104px); }
.rank-feature-body .big-num { font-size: 120px; line-height: .85; color: var(--red); }
.rank-feature-body h3 { font-size: 40px; line-height: .95; }

.mat-day, .empty b, .rank-list .n, .stat b, .logo-word {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: -.02em;
}
.mat-day { font-size: 22px; }
.mat-day small { font-size: 12px; font-weight: 400; letter-spacing: 0; }
.rank-list .n { font-size: 22px; }
.logo-word { font-size: 16px; line-height: 1; letter-spacing: -.01em; }
.logo-seal { font-family: var(--font-body); font-weight: 700; font-size: 14px; }
.badge, .search-field label, .footer h4 { font-weight: 500; }
.search-field label { font-size: 12px; }
.footer h4 { font-size: 14px; }
.card-title, .article h3 { font-weight: 500; }

/* ---------- City links ---------- */
.city-links { margin: 22px 0 0; font-size: 15px; color: var(--muted); }
.city-links a { color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
.city-links a:hover { color: var(--red); }
