/* ============================================================================
   gym.css — GymFinder India site layer. Loads after styles.css + data.css.
   Pure CSS. No images, no webfonts beyond the shared Inter, no JS libraries —
   the target device is a mid-range Android phone on a patchy 4G connection.
   ========================================================================== */

body[data-site="gym"] { --accent: #4338ca; --accent-2: #3730a3; --accent-3: #818cf8; --accent-soft: #eef0ff; }
:root[data-theme="dark"] body[data-site="gym"] { --accent: #a5b4fc; --accent-2: #c7d2fe; --accent-3: #818cf8; --accent-soft: rgba(129, 140, 248, .14); }

/* ------------------------------------------------------------------ 3D hero
   A dumbbell and a plate rack rendered as stacked SVG ellipses and rects with
   a light sweep. ~5 KB of markup, GPU-cheap, and it stops dead for anyone who
   asked their OS to reduce motion. */
.gym-scene {
  position: relative;
  max-width: 460px;
  margin: 26px auto 0;
  --bar: #94a3b8; --bar-2: #64748b; --bar-3: #cbd5e1;
  --plate: #4338ca; --plate-2: #3730a3; --plate-3: #6366f1;
}
:root[data-theme="dark"] .gym-scene { --bar: #64748b; --bar-2: #475569; --bar-3: #94a3b8; --plate: #6366f1; --plate-2: #4338ca; --plate-3: #818cf8; }
.gym-scene svg { width: 100%; height: auto; display: block; overflow: visible; }
.gym-scene .lift { transform-origin: 210px 170px; animation: gs-lift 5.4s ease-in-out infinite; }
.gym-scene .glow { animation: gs-glow 5.4s ease-in-out infinite; }
.gym-scene .sweep { animation: gs-sweep 7s linear infinite; }
@keyframes gs-lift { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-13px) } }
@keyframes gs-glow { 0%, 100% { opacity: .22 } 50% { opacity: .46 } }
@keyframes gs-sweep { 0% { transform: translateX(-260px) } 100% { transform: translateX(460px) } }
@media (prefers-reduced-motion: reduce) {
  .gym-scene .lift, .gym-scene .glow, .gym-scene .sweep { animation: none }
}

/* ------------------------------------------------------------- fee tables */
.fee-table th[scope="row"] { min-width: 190px; line-height: 1.35; }
.fee-table thead th { min-width: 132px; line-height: 1.3; }
.fee-table td.rng { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); white-space: nowrap; }
:root[data-theme="dark"] .fee-table td.rng { color: #e8ecf7; }
.fee-note {
  margin: 14px 0 0; padding: 13px 15px; border-radius: 12px;
  background: var(--accent-soft); border: 1px solid var(--line);
  font-size: .87rem; line-height: 1.6; color: var(--ink-2);
}
.fee-note b { color: var(--ink); }

.tiercards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); margin-top: 18px; }
.tiercard {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px;
  background: var(--surface); position: relative; overflow: hidden;
}
.tiercard::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--accent); opacity: .85; }
.tiercard h3 { margin: 4px 0 6px; font-size: 1.02rem; }
.tiercard .price { font-size: 1.28rem; font-weight: 800; color: var(--accent-2); font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] .tiercard .price { color: var(--accent); }
.tiercard .price span { font-size: .78rem; font-weight: 600; color: var(--muted); display: block; margin-top: 2px; }
.tiercard p { margin: 9px 0 0; font-size: .88rem; line-height: 1.62; color: var(--ink-2); }
.tiercard ul { margin: 10px 0 0; padding-left: 17px; font-size: .86rem; line-height: 1.6; color: var(--ink-2); }
.tiercard .watch { margin-top: 10px; font-size: .82rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 9px; }

/* --------------------------------------------------------------- listings */
.listing-list { display: grid; gap: 11px; margin-top: 16px; }
.listing {
  display: block; border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px;
  background: var(--surface); text-decoration: none; color: inherit; transition: border-color .16s, transform .16s;
}
.listing:hover { border-color: var(--accent); transform: translateY(-1px); }
.listing .ln { font-weight: 700; color: var(--ink); font-size: 1rem; line-height: 1.35; }
:root[data-theme="dark"] .listing .ln { color: #e8ecf7; }
.listing .lm { display: flex; flex-wrap: wrap; gap: 7px 12px; margin-top: 6px; font-size: .83rem; color: var(--muted); align-items: center; }
.listing .lm b { color: var(--ink-2); font-weight: 600; }

.tagpill {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .74rem;
  font-weight: 700; letter-spacing: .01em; background: var(--accent-soft); color: var(--accent-2);
  border: 1px solid var(--line);
}
:root[data-theme="dark"] .tagpill { color: var(--accent); }
.tagpill.chainpill { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
:root[data-theme="dark"] .tagpill.chainpill { background: rgba(251, 146, 60, .16); color: #fdba74; border-color: rgba(251, 146, 60, .3); }

/* ------------------------------------------------------------- fact table */
.facts { margin-top: 4px; }
.facts dl { display: grid; grid-template-columns: minmax(120px, 180px) 1fr; gap: 0; margin: 0; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.facts dt, .facts dd { padding: 11px 15px; margin: 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.facts dt { background: var(--surface-2); font-weight: 600; color: var(--ink-2); }
.facts dd { background: var(--surface); color: var(--ink); word-break: break-word; }
:root[data-theme="dark"] .facts dd { color: #e8ecf7; }
.facts dl > :nth-last-child(1), .facts dl > :nth-last-child(2) { border-bottom: 0; }
@media (max-width: 560px) {
  .facts dl { grid-template-columns: 1fr; }
  .facts dt { border-bottom: 0; padding-bottom: 2px; background: var(--surface); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
}

/* --------------------------------------------------------------- staleness */
.stale {
  display: flex; gap: 11px; align-items: flex-start;
  margin: 18px 0 0; padding: 14px 16px; border-radius: 13px;
  background: #fffbeb; border: 1px solid #fde68a; color: #78350f;
  font-size: .87rem; line-height: 1.6;
}
:root[data-theme="dark"] .stale { background: rgba(251, 191, 36, .1); border-color: rgba(251, 191, 36, .28); color: #fcd34d; }
.stale svg { width: 19px; height: 19px; flex: 0 0 19px; margin-top: 1px; }
.stale a { color: inherit; font-weight: 700; }

/* ------------------------------------------------------------- city extras */
.citystats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); margin-top: 18px; }
.citystat { border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px; background: var(--surface); }
.citystat b { display: block; font-size: 1.5rem; font-weight: 800; color: var(--accent-2); font-variant-numeric: tabular-nums; line-height: 1.15; }
:root[data-theme="dark"] .citystat b { color: var(--accent); }
.citystat span { display: block; margin-top: 3px; font-size: .8rem; color: var(--muted); line-height: 1.45; }

.barlist { margin-top: 16px; display: grid; gap: 8px; }
.barrow { display: grid; grid-template-columns: minmax(96px, 30%) 1fr auto; gap: 11px; align-items: center; font-size: .88rem; }
.barrow a, .barrow span.nm { color: var(--ink-2); text-decoration: none; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barrow a:hover { color: var(--accent); text-decoration: underline; }
.barrow .track { height: 9px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.barrow .fill { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-3), var(--accent)); }
.barrow .n { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .82rem; min-width: 2ch; text-align: right; }

/* ------------------------------------------------------------ region index */
.region-h { margin: 30px 0 2px; font-size: 1.05rem; font-weight: 800; color: var(--ink); }
:root[data-theme="dark"] .region-h { color: #e8ecf7; }
.region-h + p { margin: 3px 0 12px; font-size: .87rem; color: var(--muted); }

.citygrid { display: grid; gap: 9px; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); }
.citygrid a {
  display: block; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px;
  background: var(--surface); text-decoration: none; transition: border-color .16s;
}
.citygrid a:hover { border-color: var(--accent); }
.citygrid a b { display: block; font-size: .93rem; color: var(--ink); font-weight: 700; }
:root[data-theme="dark"] .citygrid a b { color: #e8ecf7; }
.citygrid a span { display: block; margin-top: 2px; font-size: .76rem; color: var(--muted); }

/* ------------------------------------------------------------------ search */
.gsearch { position: relative; max-width: 520px; margin: 20px auto 0; }
.gsearch input {
  width: 100%; padding: 14px 17px; font: inherit; font-size: 1rem;
  border: 1px solid var(--line-2); border-radius: 13px; background: var(--surface); color: var(--ink);
}
.gsearch input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
:root[data-theme="dark"] .gsearch input { color: #e8ecf7; }

/* --------------------------------------------------------------- submit box */
.submitbox {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  background: var(--surface-2); margin-top: 18px;
}
.submitbox ol { margin: 10px 0 0; padding-left: 20px; line-height: 1.75; }
.submitbox .mailbtn {
  display: inline-block; margin-top: 15px; padding: 12px 20px; border-radius: 11px;
  background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; font-size: .93rem;
}
.submitbox .mailbtn:hover { background: var(--accent-2); }
:root[data-theme="dark"] .submitbox .mailbtn { color: #0b1020; }

/* --------------------------------------------------------------- attribution */
.odbl { font-size: .82rem; color: var(--muted); line-height: 1.65; margin-top: 14px; }
.odbl a { color: var(--accent-2); }
:root[data-theme="dark"] .odbl a { color: var(--accent); }
