/* GotiChoron — design tokens and components
   Five colour themes share one set of tokens, so every screen follows the chosen theme.
   Accent fills (--emerald) are for fills and marks only; text and links use --brand-ink (≥4.5:1 on the page ground). */

:root {
  --flag-red: #E03A3E;
  --run-1: #F26B1D;
  --run-2: #D9480F;
  --focus: #0A84FF;
  --font: "Noto Serif Bengali", "Hind Siliguri", "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-metric: "Barlow Condensed", "Noto Serif Bengali", "Hind Siliguri", system-ui, sans-serif;

  --r-panel: 20px;
  --r-ctl: 12px;
  --rail: 268px;
  --header-h: 60px;
  --bottom-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

/* Colour themes — the circle button in the top bar cycles through them in this order.
   Names in the code: white, green (dark deep green), marine (marine blue), sky (sky blue), orange.
   --emerald/--mint are the historical names of the accent fill and the page ground in every theme. */
:root, :root[data-theme="white"] {
  --emerald: #00B894;
  --emerald-2: #008F72;
  --brand-ink: #007A62;
  --brand-ink-strong: #006B56;
  --mint: #F6F9F8;
  --mint-2: #EAF1EE;
  --ink: #17252A;
  --muted: #5B6F6A;
  --line: #DCE6E2;
  --card: #FFFFFF;
  --ok-bg: #E3F6EE;
  --on-brand: #FFFFFF;
  --on-accent: #0E2A24;
  --btn-bg: #007A62;
  --btn-bg-hover: #006B56;
  --shadow-lift: 0 10px 24px -12px rgba(23, 37, 42, .28);
  --danger: #C62828;
  --danger-bg: #FDECEC;
  --warn: #8A5A00;
  --warn-bg: #FFF4D6;
  --series-run: #eb6834; --series-ride: #2a78d6; --series-walk: #1baf7a;
  color-scheme: light;
}
:root[data-theme="green"] {
  --emerald: #2ED3A0;
  --emerald-2: #1FB587;
  --brand-ink: #5BE3B8;
  --brand-ink-strong: #8AEDCD;
  --mint: #0A1F17;
  --mint-2: #0F2A1F;
  --ink: #E5F3EC;
  --muted: #9BBBAD;
  --line: #1F4232;
  --card: #11281E;
  --ok-bg: #144232;
  --on-brand: #062016;
  --on-accent: #062016;
  --btn-bg: #2ED3A0;
  --btn-bg-hover: #5BE3B8;
  --shadow-lift: 0 10px 24px -12px rgba(0, 0, 0, .6);
  --danger: #FF8A80;
  --danger-bg: #3A1D1D;
  --warn: #FFD27A;
  --warn-bg: #3A2F12;
  --series-run: #d95926; --series-ride: #3987e5; --series-walk: #199e70;
  color-scheme: dark;
}
:root[data-theme="marine"] {
  --emerald: #3DA9FC;
  --emerald-2: #2A8AD8;
  --brand-ink: #7CC4FF;
  --brand-ink-strong: #A8D8FF;
  --mint: #0A1628;
  --mint-2: #0F1F36;
  --ink: #E7EEF8;
  --muted: #9FB2CB;
  --line: #223A5C;
  --card: #12233D;
  --ok-bg: #15365A;
  --on-brand: #06142A;
  --on-accent: #06142A;
  --btn-bg: #3DA9FC;
  --btn-bg-hover: #6BBEFD;
  --shadow-lift: 0 10px 24px -12px rgba(0, 0, 0, .6);
  --danger: #FF8A80;
  --danger-bg: #3A1D1D;
  --warn: #FFD27A;
  --warn-bg: #3A2F12;
  --series-run: #d95926; --series-ride: #3987e5; --series-walk: #199e70;
  color-scheme: dark;
}
:root[data-theme="sky"] {
  --emerald: #2D9CDB;
  --emerald-2: #1B7FBF;
  --brand-ink: #0B64A3;
  --brand-ink-strong: #08518A;
  --mint: #EFF7FD;
  --mint-2: #DFEFFB;
  --ink: #10253A;
  --muted: #4C6379;
  --line: #CBE1F2;
  --card: #FFFFFF;
  --ok-bg: #DDEEFB;
  --on-brand: #FFFFFF;
  --on-accent: #06233A;
  --btn-bg: #0B64A3;
  --btn-bg-hover: #08518A;
  --shadow-lift: 0 10px 24px -12px rgba(16, 37, 58, .28);
  --danger: #C62828;
  --danger-bg: #FDECEC;
  --warn: #8A5A00;
  --warn-bg: #FFF4D6;
  color-scheme: light;
}
:root[data-theme="orange"] {
  --emerald: #F28A2E;
  --emerald-2: #D96F14;
  --brand-ink: #A44800;
  --brand-ink-strong: #873B00;
  --mint: #FFF6EE;
  --mint-2: #FDE9D8;
  --ink: #2B1A0F;
  --muted: #6E5444;
  --line: #F2D8C2;
  --card: #FFFFFF;
  --ok-bg: #FDE7D3;
  --on-brand: #FFFFFF;
  --on-accent: #2B1400;
  --btn-bg: #A44800;
  --btn-bg-hover: #873B00;
  --shadow-lift: 0 10px 24px -12px rgba(43, 26, 15, .28);
  --danger: #C62828;
  --danger-bg: #FDECEC;
  --warn: #8A5A00;
  --warn-bg: #FFF4D6;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--mint);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;   /* no grey/blue box over links and buttons on phones */
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand-ink); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.boot-message { max-width: 520px; margin: 15vh auto; padding: 24px; text-align: center; }
.splash { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--brand-ink); font-weight: 700; font-size: 22px; }
.splash img { border-radius: 0; filter: drop-shadow(0 4px 10px rgba(0,0,0,.18)); }

/* ---------- Shell ---------- */
.shell { min-height: 100vh; min-height: 100dvh; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  height: calc(var(--header-h) + var(--safe-t));
  padding: var(--safe-t) 8px 0;
  display: flex; align-items: center; gap: 4px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .title { font-weight: 700; font-size: 18px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand img { width: 36px; height: 36px; flex: none; }
.brand b { font-size: 20px; line-height: 1.1; color: var(--brand-ink); }
.brand small { display: block; font-size: 12px; color: var(--muted); line-height: 1.2; }

/* Inline icons inside text (links, paragraphs) take the text size unless a component sizes them. */
p svg, li svg, dd svg, label svg, h1 svg, h2 svg, h3 svg, summary svg, a:not([class]) svg { width: 1.1em; height: 1.1em; vertical-align: -0.18em; flex-shrink: 0; display: inline-block; }
.icon-btn {
  width: 44px; height: 44px; flex: none;
  display: inline-grid; place-items: center;
  border: 0; border-radius: 12px; background: transparent; color: var(--ink); cursor: pointer;
}
.icon-btn:hover { background: var(--mint-2); }
.icon-btn svg { width: 24px; height: 24px; }
.chip-btn {
  height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--mint-2); color: var(--brand-ink); font-weight: 600; cursor: pointer;
}

.rail { display: none; }
.content { padding: 16px 16px calc(var(--bottom-h) + var(--safe-b) + 28px); max-width: 1120px; margin: 0 auto; }

/* Drawer (mobile) */
.scrim { position: fixed; inset: 0; background: rgba(10, 20, 22, .45); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; inset: 0 auto 0 0; z-index: 50; width: min(86vw, 330px);
  background: var(--card); transform: translateX(-102%); transition: transform .22s ease;
  display: flex; flex-direction: column; padding-bottom: var(--safe-b);
  overflow-y: auto; overscroll-behavior: contain;
}
.drawer.open { transform: none; box-shadow: var(--shadow-lift); }
.drawer-head {
  padding: calc(20px + var(--safe-t)) 20px 18px;
  background: linear-gradient(135deg, var(--emerald), color-mix(in srgb, var(--emerald) 55%, var(--emerald-2)));
  color: var(--on-accent); display: flex; gap: 14px; align-items: center;
}
.drawer-head img { width: 56px; height: 56px; filter: drop-shadow(0 0 3px rgba(255,255,255,.7)); }
.drawer-head b { font-size: 24px; display: block; line-height: 1.15; }
.drawer-head small { font-size: 14px; font-weight: 500; }

.nav-group { padding: 8px 10px; }
.nav-group + .nav-group { border-top: 1px solid var(--line); }
.nav-group h3 { margin: 6px 12px 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.nav-item {
  display: flex; align-items: center; gap: 14px; width: 100%;
  min-height: 48px; padding: 8px 12px; border-radius: 12px;
  color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer; text-align: left; font-size: 16px;
}
.nav-item svg { width: 22px; height: 22px; flex: none; color: var(--muted); }
.nav-item:hover { background: var(--mint-2); }
.nav-item[aria-current="page"] { background: var(--ok-bg); color: var(--brand-ink); font-weight: 600; }
.nav-item[aria-current="page"] svg { color: var(--brand-ink); }
.nav-item .ext { margin-left: auto; width: 16px; height: 16px; opacity: .6; }
.nav-item .value { margin-left: auto; font-size: 14px; color: var(--brand-ink); font-weight: 600; }
.drawer-foot { margin-top: auto; padding: 16px 22px; font-size: 13px; color: var(--muted); }

/* Bottom navigation (mobile) */
.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--bottom-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--card); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: 100%; min-height: 44px; text-decoration: none; color: var(--muted); font-size: 13px; font-weight: 500;
}
.tab svg { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--brand-ink); font-weight: 700; }
.tab-run { position: relative; }
.run-disc {
  width: 66px; height: 66px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, #FF8A3D, var(--run-1) 45%, var(--run-2));
  color: #fff; font-weight: 700; font-size: 18px; letter-spacing: .2px;
  box-shadow: 0 8px 18px -6px rgba(217, 72, 15, .7), 0 0 0 5px var(--card);
  transform: translateY(-18px);
  text-decoration: none; border: 0; cursor: pointer;
}
/* Run buttons: a springy press with an orange glow and a ring that bursts outward (no box around them). */
.run-disc, .start-disc { position: relative; isolation: isolate; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
  transition: transform .22s cubic-bezier(.34, 1.56, .64, 1), box-shadow .22s ease, filter .22s ease; }
.run-disc::after, .start-disc::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; z-index: -1;
  background: radial-gradient(circle, rgba(255, 138, 61, .55) 0%, rgba(255, 138, 61, 0) 70%); opacity: 0; transform: scale(.6); }
.run-disc.burst::after, .start-disc.burst::after { animation: run-burst .6s cubic-bezier(.2, .7, .3, 1); }
@keyframes run-burst { 0% { opacity: .95; transform: scale(.7); } 100% { opacity: 0; transform: scale(1.9); } }
.tab-run:active .run-disc, .run-disc:active { transform: translateY(-15px) scale(.9); filter: brightness(1.08);
  box-shadow: 0 3px 10px -4px rgba(217, 72, 15, .8), 0 0 0 5px var(--card), 0 0 0 9px rgba(255, 138, 61, .25); }
.start-disc:not(:disabled):active { transform: scale(.9); filter: brightness(1.08); box-shadow: 0 4px 12px -6px rgba(217, 72, 15, .9), 0 0 0 8px rgba(255, 138, 61, .22); }
.tab-run:focus { outline: none; }
.tab-run:focus-visible .run-disc { box-shadow: 0 8px 18px -6px rgba(217, 72, 15, .7), 0 0 0 5px var(--card), 0 0 0 8px var(--focus); }
.start-disc:focus:not(:focus-visible) { outline: none; }
@media (prefers-reduced-motion: reduce) { .run-disc, .start-disc { transition: none; } .run-disc.burst::after, .start-disc.burst::after { animation: none; } }
.tab-run span.lbl { position: absolute; bottom: 6px; font-size: 13px; color: var(--muted); }
.tab-run[aria-current="page"] span.lbl { color: var(--run-2); font-weight: 700; }


/* ---------- Desktop ---------- */
@media (min-width: 1024px) {
  .shell { display: grid; grid-template-columns: var(--rail) 1fr; }
  .rail {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    background: var(--card); border-right: 1px solid var(--line);
  }
  .rail .brand { padding: 22px 22px 14px; }
  .rail .brand img { width: 44px; height: 44px; }
  .rail .brand b { font-size: 24px; }
  .drawer, .scrim, .bottombar, .topbar .menu-btn, .topbar .brand { display: none; }
  .topbar { padding: 0 24px 0 32px; height: 64px; }
  .content { padding: 28px 40px 64px; }
}

/* ---------- Common blocks ---------- */
.page-head { margin: 4px 0 18px; }
.page-head h1 { margin: 0; font-size: 28px; line-height: 1.25; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 20px; }
.panel + .panel { margin-top: 16px; }
.panel h2 { margin: 0 0 10px; font-size: 20px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 20px; border-radius: var(--r-ctl);
  border: 1px solid transparent; background: var(--btn-bg); color: var(--on-brand);
  font-weight: 600; font-size: 16px; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--btn-bg-hover); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 20px; height: 20px; }
.btn-quiet { background: transparent; color: var(--brand-ink); border-color: var(--line); }
.btn-quiet:hover { background: var(--mint-2); }
.btn-danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-run { background: linear-gradient(180deg, var(--run-1), var(--run-2)); color: #fff; }
.btn-run:hover { background: var(--run-2); }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-weight: 600; margin-bottom: 6px; font-size: 15px; }
.field .hint { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; font-weight: 400; }
.input, select.input, textarea.input {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--card);
  font-size: 16px;
}
textarea.input { min-height: 110px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--brand-ink); outline: 2px solid color-mix(in srgb, var(--brand-ink) 35%, transparent); outline-offset: 0; }
.field.invalid .input { border-color: var(--danger); }
.field .err { display: block; color: var(--danger); font-size: 14px; margin-top: 4px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 52px; }
.pw-wrap .icon-btn { position: absolute; right: 2px; top: 2px; }

.notice { padding: 12px 14px; border-radius: var(--r-ctl); background: var(--ok-bg); margin: 0 0 14px; }
.notice.error { background: var(--danger-bg); color: var(--danger); }
.notice.warn { background: var(--warn-bg); color: var(--warn); }

.toast-host { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bottom-h) + var(--safe-b) + 18px); z-index: 60; display: grid; gap: 8px; width: min(92vw, 440px); }
@media (min-width: 1024px) { .toast-host { bottom: 28px; } }
.toast { background: var(--ink); color: var(--mint); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lift); font-size: 15px; }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty h2 { color: var(--ink); font-size: 20px; margin: 0 0 6px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--card); }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-weight: 600; color: var(--muted); font-size: 14px; background: var(--mint-2); }
table.data tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 10px; border-radius: 999px; background: var(--mint-2); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--brand-ink); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }

.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; }
.tabs a { white-space: nowrap; text-decoration: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); background: var(--card); min-height: 40px; display: inline-flex; align-items: center; }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--mint); border-color: var(--ink); }

/* ---------- Auth ---------- */
.auth { max-width: 440px; margin: 8px auto 0; }
.auth-head { text-align: center; margin-bottom: 18px; }
.auth-head img { width: 64px; height: 64px; margin: 0 auto 8px; }
.auth-head h1 { margin: 0; font-size: 26px; }
.auth-head p { margin: 2px 0 0; color: var(--muted); }
.auth .switch { text-align: center; margin-top: 16px; }

/* ---------- দৌড়শিক্ষা ---------- */
.learn { max-width: 760px; margin: 0 auto; }
.wordmark { text-align: center; margin: 10px 0 4px; font-weight: 700; line-height: 1.05; letter-spacing: -0.5px; font-size: clamp(44px, 12vw, 76px); }
.wordmark .a { color: var(--brand-ink); }
.wordmark .b { color: var(--ink); }
.tagline { text-align: center; color: var(--muted); margin: 0 0 18px; font-size: 16px; }
.ask-card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 14px; box-shadow: var(--shadow-lift); }
.ask-input {
  width: 100%; min-height: 56px; max-height: 180px; resize: none;
  border: 0; background: transparent; padding: 10px 8px; font-size: 18px; line-height: 1.5;
}
.ask-input:focus { outline: none; }
.ask-card:focus-within { border-color: var(--brand-ink); }
.ask-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; }
.voice-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 8px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--mint-2); cursor: pointer; font-weight: 600;
}
.voice-btn .dot { width: 32px; height: 32px; border-radius: 50%; background: var(--btn-bg); color: var(--on-brand); display: grid; place-items: center; }
.voice-btn .dot svg { width: 18px; height: 18px; }
.voice-btn.listening .dot { background: var(--flag-red); color: #fff; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--flag-red) 25%, transparent); } }
.ask-actions .btn { margin-left: auto; min-width: 112px; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 2px 0; align-items: center; }
.suggestions .lbl { color: var(--muted); font-size: 14px; margin-right: 2px; }
.sugg { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 14px; min-height: 40px; cursor: pointer; font-size: 15px; }
.sugg:hover { border-color: var(--brand-ink); color: var(--brand-ink); }

.answer-zone { margin-top: 24px; display: grid; gap: 16px; }
/* Answer first, then the related articles below it (as on the old দৌড়শিক্ষা page). */
@media (min-width: 1100px) {
  .learn.has-answer { max-width: 860px; }
}
.answer { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 20px 22px; }
.answer h2 { font-size: 18px; margin: 0 0 4px; }
.answer .mode { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.answer .body { max-width: 68ch; font-size: 17px; line-height: 1.75; }
.answer .body p { margin: 0 0 12px; }
.answer .cite { font-size: 12px; vertical-align: super; font-weight: 700; color: var(--brand-ink); text-decoration: none; padding: 0 2px; }
.passage { border-left: 3px solid var(--emerald); padding: 2px 0 2px 14px; margin: 0 0 18px; }
.passage .from { font-size: 14px; color: var(--muted); margin-top: 6px; }
.passage p { margin: 0 0 8px; white-space: pre-line; }
.answer .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.disclaimer { display: flex; gap: 10px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.disclaimer svg { width: 20px; height: 20px; flex: none; color: var(--warn); }

.sources { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 16px; }
.sources h2 { font-size: 16px; margin: 0 0 8px; display: flex; justify-content: space-between; gap: 8px; }
.sources h2 span { color: var(--muted); font-weight: 500; font-size: 14px; }
.source { display: block; padding: 10px; border-radius: 12px; text-decoration: none; color: var(--ink); }
.source:hover { background: var(--mint-2); }
.source b { display: block; font-weight: 600; line-height: 1.4; }
.source small { color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.source .bar { height: 4px; border-radius: 4px; background: var(--mint-2); margin-top: 8px; overflow: hidden; }
.source .bar i { display: block; height: 100%; background: var(--emerald); }

.article { max-width: 72ch; margin: 0 auto; }
.article h1 { font-size: 30px; line-height: 1.3; margin: 0 0 6px; }
.article .meta { color: var(--muted); font-size: 14px; margin-bottom: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.article .text { font-size: 18px; line-height: 1.8; }
.article .text p { margin: 0 0 16px; white-space: pre-line; }

.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* Profile */
.profile-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.avatar { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--emerald); color: var(--on-accent); font-size: 30px; font-weight: 700; flex: none; }
.profile-head h1 { margin: 0; font-size: 24px; }
.grid-2 { display: grid; gap: 16px; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.main-col { min-width: 0; }
#main:focus { outline: none; }
/* Everything on the page (maps use z-index 400–1000 inside) stays below the side menu, its shade, the top bar and
   the bottom bar: the page area is its own layer at the bottom. */
#main { position: relative; z-index: 0; isolation: isolate; }
.answer-zone > :only-child { grid-column: 1 / -1; }
.rail-run { display: flex; align-items: center; gap: 14px; margin: 4px 16px 10px; padding: 10px 12px; border-radius: 16px; text-decoration: none; color: var(--ink); font-weight: 600; background: var(--mint-2); }
.rail-run .run-disc { width: 52px; height: 52px; font-size: 15px; transform: none; box-shadow: 0 6px 14px -6px rgba(217, 72, 15, .7); }
.rail-run:hover { background: var(--ok-bg); }

/* ---------- Recording ---------- */
body.immersive .content { padding: 0; max-width: none; }
@media (max-width: 1023px) {
  body.immersive .topbar, body.immersive .bottombar { display: none; }
}
.rec {
  position: relative; height: 100vh; height: 100dvh;
  display: grid; grid-template-rows: minmax(34vh, 1fr) auto;
  background: var(--card); overflow: hidden;
}
.rec-map { position: relative; min-height: 0; }
.rec-map-canvas { position: absolute; inset: 0; background: var(--mint-2); }
.map-note {
  position: absolute; z-index: 500; left: 12px; right: 12px; bottom: 30px;
  background: var(--card); color: var(--ink); padding: 8px 12px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow-lift);
}
.map-locate { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--card); color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow-lift); cursor: pointer; }
.map-locate svg { width: 22px; height: 22px; }
.leaflet-container { font-family: var(--font); isolation: isolate; z-index: 0; }
.rec-panel {
  position: relative; z-index: 600; margin-top: -18px; padding: 10px 16px calc(14px + var(--safe-b));
  background: var(--card); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 24px -14px rgba(0, 0, 0, .35);
  max-height: 72dvh; overflow-y: auto;
}
.rec-head { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.rec-head .rec-view-btn { margin-left: auto; }
.gps-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: var(--mint-2); color: var(--muted); }
.gps-pill i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.gps-pill.good { background: var(--ok-bg); color: var(--brand-ink); }
.gps-pill.weak { background: var(--warn-bg); color: var(--warn); }
.gps-pill.lost { background: var(--danger-bg); color: var(--danger); }
.rec-head .gps-pill { margin: 0 auto; }
.rec-banner { margin: 8px 0; padding: 10px 14px; border-radius: 14px; background: var(--mint-2); }
.rec-banner p { margin: 4px 0; }
.rec-banner.paused { background: #FFC21A; color: #231B00; }
.rec-banner.paused b { font-size: 18px; }
.rec-banner.error { background: var(--danger-bg); color: var(--danger); }
.rec-banner.error .btn { margin-top: 8px; }
.metrics { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px 12px; margin: 8px 0 4px; text-align: center; }
.metric b { display: block; font-family: var(--font-metric); font-weight: 600; font-size: 34px; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: .3px; }
.metric span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.metric-time { grid-column: 1 / -1; }
.metric-time b { font-size: 60px; font-weight: 700; }
.metric-sub { text-align: center; font-size: 13px; color: var(--muted); min-height: 1em; }
.splits-bars { display: grid; gap: 4px; margin: 8px 0; }
.split { display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 8px; font-family: var(--font-metric); font-size: 17px; font-variant-numeric: tabular-nums; }
.split-track { height: 10px; border-radius: 6px; background: var(--mint-2); overflow: hidden; }
.split-track i { display: block; height: 100%; background: var(--emerald); border-radius: 6px; }
.split.partial .split-track i { background: var(--run-1); }
/* Split bars (recording screen and saved activity): label | pace or km | bar (longer = faster) */
.sb-list { display: grid; gap: 2px; }
.sb-row { display: grid; grid-template-columns: 64px 92px 1fr; align-items: center; gap: 10px; padding: 3px 0; font-family: var(--font-metric); font-size: 17px; font-variant-numeric: tabular-nums; }
.sb-head { font-family: var(--font); font-size: 12.5px; color: var(--muted); padding: 0 0 2px; }
.sb-value small { display: block; font-family: var(--font); font-size: 11.5px; color: var(--muted); line-height: 1.2; }
.sb-track { height: 16px; display: block; }
.sb-track i { display: block; height: 100%; background: #1E5BD8; border-radius: 3px; }
.sb-row.partial .sb-track i { background: color-mix(in srgb, #1E5BD8 55%, transparent); }
.sb-row.partial .sb-label { font-style: italic; }
.sb-list.compact { max-height: 132px; overflow-y: auto; margin: 6px 0; padding-right: 4px; }
.sb-list.compact .sb-row { font-size: 15px; grid-template-columns: 54px 84px 1fr; padding: 1px 0; }
.sb-list.compact .sb-track { height: 12px; }
.rec-kcal { text-align: center; font-size: 14px; color: var(--muted); margin: 2px 0 0; }
.rec-kcal b { font-family: var(--font-metric); font-size: 20px; color: var(--ink); }
.rec-kcal svg { width: 16px; height: 16px; vertical-align: -2px; color: var(--run-1); }
.rec-controls { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; margin: 12px 0 6px; }
.rec-controls .btn { flex: 1 1 140px; min-height: 60px; font-size: 19px; border-radius: 16px; }
.rec-controls .btn svg { width: 22px; height: 22px; }
.btn-wide { flex-basis: 100% !important; }
.btn-dark { background: var(--ink); color: var(--card); }
.btn-dark:hover { background: var(--ink); opacity: .9; }
.rec-intro { flex-basis: 100%; text-align: center; margin: 0 0 4px; }
.start-disc {
  width: 104px; height: 104px; border-radius: 50%; border: 0; cursor: pointer;
  background: radial-gradient(circle at 30% 25%, #FF8A3D, var(--run-1) 45%, var(--run-2)); color: #fff;
  display: grid; place-items: center; align-content: center; gap: 2px; font-weight: 700; font-size: 18px;
  box-shadow: 0 12px 24px -10px rgba(217, 72, 15, .8);
}
.start-disc svg { width: 34px; height: 34px; }
.start-disc:disabled { background: var(--mint-2); color: var(--muted); box-shadow: none; cursor: not-allowed; }
.spinner { display: inline-block; width: 16px; height: 16px; margin-right: 8px; vertical-align: -2px; border: 2px solid var(--line); border-top-color: var(--brand-ink); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.rec-note { font-size: 13px; color: var(--muted); margin: 8px 2px 0; }

/* Large-numbers view (map hidden) */
.rec[data-view="big"] { grid-template-rows: 0 1fr; }
.rec[data-view="big"] .rec-map { visibility: hidden; }
.rec[data-view="big"] .rec-panel { margin-top: 0; border-radius: 0; box-shadow: none; max-height: none; display: flex; flex-direction: column; padding-top: calc(10px + var(--safe-t)); }
.rec[data-view="big"] .metrics { grid-template-columns: 1fr; gap: 14px; flex: 1; align-content: center; }
.rec[data-view="big"] .metric b { font-size: clamp(64px, 22vw, 132px); font-weight: 700; }
.rec[data-view="big"] .metric-time b { font-size: clamp(56px, 18vw, 110px); }
.rec[data-view="big"] .metric span { font-size: 16px; }
.rec[data-view="big"][data-state="paused"] .rec-head { background: #FFC21A; color: #231B00; margin: -10px -16px 0; padding: calc(10px + var(--safe-t)) 16px 10px; }

/* Save sheet */
.rec[data-state="finishing"], .rec[data-state="saved"] { grid-template-rows: 0 1fr; }
.rec[data-state="finishing"] .rec-map, .rec[data-state="saved"] .rec-map { visibility: hidden; }
.save-sheet { overflow-y: auto; padding: calc(16px + var(--safe-t)) 16px calc(24px + var(--safe-b)); background: var(--mint); }
.save-form { max-width: 720px; margin: 0 auto; }
.save-form h1 { font-size: 24px; margin: 0 0 12px; }
.save-summary { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 14px; margin-bottom: 16px; }
.save-route { color: var(--run-2); background: var(--mint-2); border-radius: 14px; margin-bottom: 10px; }
.save-route svg { width: 100%; height: auto; max-height: 220px; }
.summary-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 0; }
.summary-stats dt { font-size: 13px; color: var(--muted); }
.summary-stats dd { margin: 0; font-family: var(--font-metric); font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 15px; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--card); border-color: var(--ink); }
.radios { display: grid; gap: 6px; margin-bottom: 10px; }
.radio, .check { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; }
.radio.disabled { opacity: .55; cursor: not-allowed; }
.radio input, .check input { width: 20px; height: 20px; accent-color: var(--brand-ink); }
fieldset.plain { border: 0; padding: 0; margin: 0 0 14px; }
fieldset.plain legend { font-weight: 600; margin-bottom: 6px; font-size: 15px; padding: 0; }
.photo-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.photo { position: relative; width: 84px; height: 84px; border-radius: 12px; overflow: hidden; background: var(--mint-2); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .icon-btn { position: absolute; top: 0; right: 0; width: 32px; height: 32px; background: rgba(0,0,0,.55); color: #fff; border-radius: 0 0 0 10px; }
.save-actions { display: grid; gap: 10px; margin-top: 8px; }
.save-actions .btn-run { min-height: 56px; font-size: 18px; }

@media (min-width: 1024px) {
  .rec { height: calc(100vh - 64px); grid-template-rows: 1fr; grid-template-columns: minmax(0, 1fr) 420px; }
  .rec-panel { margin-top: 0; border-radius: 0; max-height: none; box-shadow: none; border-left: 1px solid var(--line); padding: 16px 22px; }
  .rec[data-view="big"] { grid-template-rows: 1fr; grid-template-columns: 0 1fr; }
  .rec[data-view="big"] .rec-panel { border-left: 0; }
  .rec[data-view="big"][data-state="paused"] .rec-head { margin: -16px -22px 0; padding: 12px 22px; }
  .rec[data-state="finishing"], .rec[data-state="saved"] { grid-template-columns: 1fr; grid-template-rows: 1fr; }
  .rec[data-state="finishing"] .rec-map, .rec[data-state="saved"] .rec-map { display: none; }
  .save-sheet { padding: 24px 32px 40px; }
}

/* ---------- Activities ---------- */
.route-svg { display: block; }
.act-filters { display: grid; gap: 10px; margin-bottom: 14px; }
.act-filters .row { display: flex; gap: 8px; flex-wrap: wrap; }
.act-filters .row > * { flex: 1 1 140px; }
.act-list { display: grid; gap: 10px; }
.act-item {
  display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px; text-decoration: none; color: var(--ink);
}
.act-item:hover { border-color: var(--brand-ink); }
.act-thumb { width: 96px; height: 76px; border-radius: 12px; background: var(--mint-2); color: var(--run-2); display: grid; place-items: center; overflow: hidden; }
.act-thumb svg { width: 100%; height: 100%; }
.act-item h3 { margin: 0; font-size: 17px; line-height: 1.35; }
.act-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; color: var(--muted); }
.act-meta b { color: var(--ink); font-family: var(--font-metric); font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.act-detail-map { height: 340px; border-radius: var(--r-panel); overflow: hidden; border: 1px solid var(--line); background: var(--mint-2); margin-bottom: 16px; position: relative; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat-grid div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.stat-grid dt { font-size: 13px; color: var(--muted); }
.stat-grid dd { margin: 0; font-family: var(--font-metric); font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.photos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.photos-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.chart-12w { width: 100%; height: auto; }
.chart-12w .bar { fill: var(--emerald); }
.chart-12w .bar.now { fill: var(--run-1); }
.chart-12w text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart-12w .grid { stroke: var(--line); }

.notice > svg { width: 20px; height: 20px; flex: none; }
@media (max-width: 1023px) {
  .topbar:has(.title:not(:empty)) .brand b { display: none; }
}
@media (max-width: 1023px) { .map-note { bottom: 34px; } }
@media (min-width: 1024px) { .map-note { bottom: 28px; right: auto; max-width: 70%; } }

.demo-warning { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 16px; background: var(--warn-bg); color: var(--warn); font-size: 14px; border-bottom: 1px solid var(--line); }
.demo-warning svg { width: 18px; height: 18px; flex: none; }
.demo-warning a { font-weight: 700; color: inherit; }
body.immersive .demo-warning { display: none; }

/* ---------------- Sections: calculators ---------------- */
.tool-grid { display: grid; gap: 16px; align-items: start; }
@media (min-width: 900px) { .tool-grid { grid-template-columns: minmax(300px, 420px) 1fr; } }
.cards .tool-card { display: grid; gap: 6px; align-content: start; }
.tool-card { padding: 18px; border-radius: var(--r-panel); border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; transition: box-shadow .15s ease, transform .15s ease; }
.tool-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.tool-card b { font-size: 18px; }
.tool-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--ok-bg); color: var(--brand-ink); }
.tool-icon svg { width: 24px; height: 24px; }
.num-table td, .num-table th { font-variant-numeric: tabular-nums; }
.num-table tr.stop-row td { background: var(--warn-bg); color: var(--warn); font-weight: 600; }
.zone-list { display: grid; gap: 8px; }
.zone-row { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--mint-2); border-left: 6px solid var(--zc, var(--emerald)); }
.zone-1 { --zc: #74B9FF; } .zone-2 { --zc: #00B894; } .zone-3 { --zc: #F9CA24; } .zone-4 { --zc: #F0932B; } .zone-5 { --zc: #E03A3E; }
.zone-num { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--zc); color: #0E2A24; font-weight: 700; }
.zone-val { font-family: var(--font-metric); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.zone-val small { font-family: var(--font); font-size: 12px; color: var(--muted); }
.vo2-best { margin: 0 0 16px; }
.vo2-best:empty { display: none; }
.vo2-result { margin: 8px 0 0; min-height: 1.4em; }
.vo2-result b { font-family: var(--font-metric); font-size: 30px; color: var(--brand-ink); }
.vo2-result.warn { color: var(--warn); }

/* ---------------- Sections: events ---------------- */
.event-list { display: grid; gap: 10px; }
@media (min-width: 1100px) { .event-list { grid-template-columns: 1fr 1fr; } }
.event-card { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: var(--r-panel); border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; min-width: 0; }
.event-card:hover { box-shadow: var(--shadow-lift); }
.event-card.past { opacity: .78; }
.event-card h3 { margin: 0 0 6px; font-size: 17px; line-height: 1.35; }
.event-main { min-width: 0; flex: 1; display: grid; gap: 4px; }
.event-main .act-meta svg { width: 14px; height: 14px; vertical-align: -2px; }
.date-block { flex: none; width: 62px; text-align: center; border-radius: 14px; background: var(--ok-bg); color: var(--brand-ink); padding: 6px 4px; line-height: 1.1; }
.date-block b { display: block; font-family: var(--font-metric); font-size: 28px; }
.date-block span { display: block; font-size: 13px; font-weight: 600; }
.date-block small { display: block; font-size: 11px; color: var(--muted); }
.info-list { display: grid; gap: 0; margin: 0 0 18px; }
.info-list > div { display: grid; grid-template-columns: minmax(110px, 34%) 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.info-list > div:last-child { border-bottom: 0; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; overflow-wrap: anywhere; }
.cover { width: 100%; max-height: 360px; object-fit: cover; border-radius: var(--r-panel); margin-bottom: 14px; display: block; }

/* ---------------- Sections: blog / cycling / news ---------------- */
.content-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-bottom: 14px; }
.content-card { display: flex; flex-direction: column; border-radius: var(--r-panel); border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; overflow: hidden; }
.content-card:hover { box-shadow: var(--shadow-lift); }
.content-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.content-body { padding: 14px 16px; display: grid; gap: 6px; }
.content-body h3 { margin: 0; font-size: 17px; line-height: 1.4; }
.content-body p { margin: 0; font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.content-body .badge svg { width: 12px; height: 12px; vertical-align: -1px; }

/* ---------------- Sections: doctors & coaches ---------------- */
.pro-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--r-panel); border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; min-width: 0; }
.pro-card:hover { box-shadow: var(--shadow-lift); }
.pro-card > div { min-width: 0; display: grid; gap: 4px; }
.pro-card .badge svg, .pro-detail .badge svg { width: 12px; height: 12px; vertical-align: -1px; }
.pro-photo { border-radius: 50%; object-fit: cover; flex: none; }
.pro-detail .panel { margin-bottom: 16px; }
.btn-row .btn svg { width: 18px; height: 18px; }
.badge.req-pending { background: var(--warn-bg); color: var(--warn); }
.badge.req-confirmed, .badge.req-completed { background: var(--ok-bg); color: var(--brand-ink); }
.badge.req-rejected { background: var(--danger-bg); color: var(--danger); }
.badge.req-cancelled { background: var(--mint-2); color: var(--muted); }

/* ---------------- Sections: training plans ---------------- */
.plan-card { display: grid; gap: 6px; align-content: start; padding: 16px; border-radius: var(--r-panel); border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; }
.plan-card:hover { box-shadow: var(--shadow-lift); }
.plan-card.mine { border-color: var(--emerald); }
.plan-card b { font-size: 17px; }
/* Training plans: an icon in front of every plan, lists, bold titles and the references at the end. */
.plan-title { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.plan-title > b, .plan-title > h1 { min-width: 0; overflow-wrap: anywhere; }
.plan-title > h1 { margin: 0; }
.pl-ico { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.12); transition: transform .25s ease; }
.pl-ico svg { width: 21px; height: 21px; }
.pl-ico.big { width: 54px; height: 54px; border-radius: 16px; margin-top: 2px; }
.pl-ico.big svg { width: 27px; height: 27px; }
.pl-ico-0 { background: linear-gradient(135deg, #fbbf24, #ea580c); }
.pl-ico-1 { background: linear-gradient(135deg, #34d399, #047857); }
.pl-ico-2 { background: linear-gradient(135deg, #38bdf8, #1d4ed8); }
.pl-ico-3 { background: linear-gradient(135deg, #f472b6, #be123c); }
.pl-ico-4 { background: linear-gradient(135deg, #a78bfa, #6d28d9); }
.pl-ico-5 { background: linear-gradient(135deg, #2dd4bf, #0e7490); }
.plan-card:hover .pl-ico { transform: rotate(-8deg) scale(1.06); }
@media (prefers-reduced-motion: reduce) { .pl-ico { transition: none; } }
.plan-page .grid-2 > * { min-width: 0; }
.plan-text p { margin: 0 0 12px; line-height: 1.75; }
.plan-text p:last-child { margin-bottom: 0; }
.plan-text p > b:first-child, .plan-text li > b:first-child { color: var(--brand-ink); }
.plan-list { margin: 0 0 14px; padding-left: 22px; display: grid; gap: 8px; line-height: 1.7; }
.plan-list li::marker { color: var(--emerald); }
.plan-text a, .plan-refs a { overflow-wrap: anywhere; }
.plan-refs ol { margin: 0; padding-left: 22px; display: grid; gap: 10px; line-height: 1.6; }
.plan-refs { margin-top: 16px; }
.progress { height: 8px; border-radius: 999px; background: var(--mint-2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--emerald); border-radius: inherit; }
.today-box { padding: 8px 10px; border-radius: var(--r-ctl); background: var(--ok-bg); font-size: 14px; }
.week { margin-bottom: 16px; }
.week h3 { margin: 0 0 8px; font-size: 16px; }
.week-days { display: grid; gap: 6px; }
.day { border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--card); }
.day > summary { display: grid; grid-template-columns: 92px 1fr; gap: 2px 10px; padding: 10px 12px; cursor: pointer; list-style: none; min-height: 44px; align-items: center; }
.day > summary::-webkit-details-marker { display: none; }
.day > summary small { grid-column: 2; }
.day > summary .badge { grid-column: 2; justify-self: start; }
.day-n { font-weight: 600; color: var(--muted); font-size: 14px; grid-row: span 2; }
.day.rest { background: var(--mint); }
.day.rest > summary { color: var(--muted); }
.day.done { border-color: var(--emerald); }
.day.done .day-n { color: var(--brand-ink); }
.day.today { border-width: 2px; border-color: var(--brand-ink); }
.day[open] > summary { border-bottom: 1px solid var(--line); }
.wo-detail { padding: 10px 12px; display: grid; gap: 10px; }
.wo-block b { display: block; font-size: 14px; color: var(--muted); }
.wo-block p { margin: 2px 0 0; white-space: pre-line; }
.mark-box { padding: 10px 12px 12px; display: grid; gap: 8px; border-top: 1px dashed var(--line); }

/* ---------------- Forms & admin helpers ---------------- */
.grid-3 { display: grid; gap: 16px; }
@media (min-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr 1fr; } }
.check-list { display: grid; gap: 6px; margin: 4px 0 14px; }
.check-row { display: flex; gap: 10px; align-items: center; min-height: 40px; cursor: pointer; }
.check-row input { width: 20px; height: 20px; accent-color: var(--brand-ink); flex: none; }
.img-preview { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.img-preview:empty { display: none; }
.img-preview img { width: 160px; height: 100px; object-fit: cover; border-radius: var(--r-ctl); border: 1px solid var(--line); }
.plain-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.req-admin { display: grid; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.req-admin .field { margin: 0; }
.sched { display: grid; gap: 8px; }
.sched-week { border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--card); }
.sched-week > summary { padding: 12px 14px; cursor: pointer; min-height: 44px; }
.sched-body { padding: 0 12px 12px; display: grid; gap: 8px; }
.sched-day { display: grid; gap: 8px; padding: 10px; border-radius: var(--r-ctl); background: var(--mint); }
.sched-n { font-weight: 600; font-size: 14px; color: var(--muted); }
.sched-work { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }
.sched-work .input:disabled { opacity: .5; }
.day-more > summary { cursor: pointer; color: var(--brand-ink); font-size: 14px; min-height: 32px; }
.day-more .field { margin-top: 8px; }
@media (min-width: 900px) {
  .sched-day { grid-template-columns: 80px minmax(0, 1fr) auto minmax(260px, 1.1fr); align-items: center; }
  .day-more { grid-column: 2 / -1; }
}
.sched-save { position: sticky; bottom: calc(var(--safe-b) + 8px); margin-top: 12px; }
@media (max-width: 1023px) { .sched-save { bottom: calc(var(--bottom-h) + var(--safe-b) + 8px); } }
.act-meta > span:has(> svg) { display: inline-flex; align-items: center; gap: 3px; }
.req-admin > .btn { justify-self: start; }
.badge[class*="req-"] { align-self: flex-start; }

/* Theme button: a circle showing the current theme (page colour + accent). Each click moves to the next theme. */
.theme-swatch { width: 24px; height: 24px; border-radius: 50%; display: block; background: linear-gradient(135deg, var(--mint) 0 50%, var(--emerald) 50% 100%); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ink) 35%, transparent); }
.theme-pick { display: flex; flex-wrap: wrap; gap: 10px; }
.theme-pick button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; }
.theme-pick button[aria-pressed="true"] { border-color: var(--brand-ink); box-shadow: 0 0 0 2px var(--brand-ink); font-weight: 600; }
.theme-pick .theme-swatch { width: 28px; height: 28px; }
.nav-swatch { width: 22px; height: 22px; flex: none; display: grid; place-items: center; }
.nav-swatch .theme-swatch { width: 20px; height: 20px; }

/* দৌড়শিক্ষা answers: short answer from the matched article + expandable related articles */
.answer .short-label { font-weight: 700; margin: 0 0 4px; color: var(--brand-ink); }
.answer .from { font-size: 14px; color: var(--muted); }
.full-article { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.full-article > summary, .source > summary { cursor: pointer; list-style: none; }
.full-article > summary { color: var(--brand-ink); font-weight: 600; min-height: 40px; display: flex; align-items: center; }
.full-article > summary::-webkit-details-marker, .source > summary::-webkit-details-marker { display: none; }
.full-article .text p, .source-body .text p { white-space: pre-line; }
.badge[class*="match-"] { background: var(--ok-bg); color: var(--brand-ink); }
.badge.match-content { background: var(--mint-2); color: var(--muted); }
details.source { padding: 0; }
details.source > summary { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 12px; }
details.source > summary:hover { background: var(--mint-2); }
.source-head { flex: 1; min-width: 0; display: block; }
.source .expand { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); color: var(--brand-ink); font-weight: 700; }
details.source[open] .expand { transform: rotate(45deg); }
.source-body { padding: 0 10px 12px; font-size: 15px; }
.source-body .short { font-weight: 600; margin: 4px 0 8px; }
.stat-grid dd small { display: block; font-family: var(--font); font-size: 13px; font-weight: 500; color: var(--muted); line-height: 1.3; letter-spacing: 0; }
.meal-table td:first-child { min-width: 110px; }

/* Bangla / English switch in the top bar */
.lang-toggle { flex: none; border: 1px solid var(--btn-bg); border-radius: 999px; background: var(--btn-bg); color: var(--on-brand); font: inherit; font-size: 14px; font-weight: 700; padding: 0 14px; min-height: 36px; min-width: 64px; cursor: pointer; }
.lang-toggle:hover { filter: brightness(1.08); }
.lang-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Calculators (old pages' full texts) */
.time-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.time-field { display: grid; gap: 2px; }
.time-field > span { font-size: 12px; color: var(--muted); font-weight: 600; }
.segment-layout { display: grid; gap: 8px; grid-template-columns: minmax(80px, 1fr) 2fr; align-items: end; }
.seg-row { padding: 8px 10px; border-radius: var(--r-ctl); background: var(--mint-2); }
.table-cards { display: grid; gap: 14px; }
@media (min-width: 1200px) { .table-cards { grid-template-columns: 1fr 1fr; } }
.table-card h3 { margin: 0 0 6px; font-size: 15px; }
.hydration { color: var(--run-1); font-weight: 700; }
.num-table tr.lap-end td { font-style: italic; color: var(--muted); }
.learn-box { margin-top: 16px; line-height: 1.75; }
.learn-box ul { padding-left: 20px; display: grid; gap: 6px; }
.learn-box .formula { font-family: var(--font-metric); font-size: 20px; font-weight: 600; background: var(--mint-2); border-radius: var(--r-ctl); padding: 8px 12px; display: inline-block; }
.zone-table td { vertical-align: middle; }
.zone-table .zone-num { display: inline-grid; width: 26px; height: 26px; font-size: 14px; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vo2-result .big { font-family: var(--font-metric); font-size: 28px; color: var(--brand-ink); }
.group-title { font-size: 18px; margin: 0; }
.hero-tags { margin-top: 10px; }
@media print { .topbar, .rail, .bottombar, .drawer, .btn, .demo-warning { display: none !important; } .main-col { margin: 0 !important; } }

/* Training calendar */
.phase-pill { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--mint-2); color: var(--ink); border-left: 4px solid var(--pc, var(--emerald)); }
.phase-recovery_week { --pc: #74B9FF; } .phase-base_build { --pc: #00B894; } .phase-endurance_build { --pc: #F9CA24; }
.phase-ultra_specific_build { --pc: #F0932B; } .phase-peak_ultra_training { --pc: #E03A3E; } .phase-peak_simulation { --pc: #9B59B6; }
.phase-taper { --pc: #636E72; } .phase-race_week { --pc: #2D3436; }
.phase-foundation { --pc: #55EFC4; } .phase-build { --pc: #00B894; } .phase-consolidation { --pc: #0984E3; } .phase-endurance_development { --pc: #F9CA24; }
.phase-cutback { --pc: #74B9FF; } .phase-threshold_development { --pc: #F0932B; } .phase-strength_threshold { --pc: #E17055; } .phase-specific_preparation { --pc: #E03A3E; }
.type-pill { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 12.5px; background: var(--ok-bg); color: var(--brand-ink); white-space: nowrap; }
.type-pill.wt-rest { background: var(--mint-2); color: var(--muted); }
.type-pill.wt-strength, .type-pill.wt-cross { background: var(--warn-bg); color: var(--warn); }
.cal-table td { vertical-align: top; }
.cal-table tr.rest td { color: var(--muted); }
.cal-table tr.today td { background: var(--ok-bg); font-weight: 600; }
.nowrap { white-space: nowrap; }
.glossary { margin-top: 16px; }
.glossary > summary { cursor: pointer; min-height: 36px; }
.glossary h3 { margin: 14px 0 8px; font-size: 16px; }
.glossary-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.glossary-card { padding: 12px; border-radius: var(--r-ctl); background: var(--mint-2); border-left: 4px solid var(--pc, var(--emerald)); }
.glossary-card p { margin: 6px 0 0; font-size: 14.5px; }
.terms { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: 0; }
.terms > div { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); }
.terms dt { font-weight: 700; }
.terms dd { margin: 4px 0 0; font-size: 14.5px; }
.week-pick { max-width: 320px; }
.sched-grid { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.sched-f { display: grid; gap: 3px; min-width: 0; }
.sched-f > span { font-size: 12px; font-weight: 600; color: var(--muted); }
.sched-wide { grid-column: 1 / -1; }
.pick { display: grid; gap: 6px; }
.sched-day.rest { opacity: .85; }
@media (min-width: 900px) {
  .sched-day { grid-template-columns: 90px minmax(0, 1fr); align-items: start; }
  .sched-grid { grid-template-columns: 1.2fr 1fr 1.4fr .7fr; }
  .day-more { grid-column: 2 / -1; }
}
.sched-n { display: grid; gap: 2px; }
.week-phase { max-width: 220px; min-height: 36px; padding-top: 4px; padding-bottom: 4px; }
.import-box { margin-bottom: 12px; }
.import-box > summary { cursor: pointer; color: var(--brand-ink); font-weight: 600; min-height: 36px; }
.plan-import { padding: 10px 0; }

/* Events: runner submissions */
.head-actions { display: flex; gap: 12px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.narrow { max-width: 760px; }
.review-box { display: grid; gap: 6px; margin-top: 8px; max-width: 420px; }
.faq-box { display: flex; gap: 8px; align-items: center; }
/* Calendar table becomes stacked cards on phones (no sideways scrolling) */
@media (max-width: 640px) {
  .cal-table thead { display: none; }
  .cal-table, .cal-table tbody, .cal-table tr, .cal-table td { display: block; width: 100%; }
  .cal-table tr { border: 1px solid var(--line); border-radius: var(--r-ctl); margin-bottom: 8px; padding: 6px 10px; background: var(--card); }
  .cal-table td { border: 0; padding: 3px 0; display: grid; grid-template-columns: 100px 1fr; gap: 8px; text-align: left; white-space: normal; }
  .cal-table td::before { content: attr(data-label); color: var(--muted); font-size: 13px; font-weight: 600; }
  .schedule-table .table-wrap { overflow: visible; }
}
.sched-f textarea.input { min-height: 44px; height: 44px; resize: vertical; }
.tool-grid > * { min-width: 0; }
.chips .chip { max-width: 100%; white-space: normal; text-align: left; }
.field > .hint { overflow-wrap: anywhere; }


/* ===== Profile, profile card and Run Stat (Android-style layout) ===== */
.pf-hero { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 0 16px 18px; margin-bottom: 16px; overflow: hidden; text-align: center; }
.pf-cover { height: 96px; margin: 0 -16px; background: linear-gradient(120deg, var(--emerald-2), var(--emerald)); position: relative; }
.pf-cover::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 140% at 100% 0%, rgba(255,255,255,.25), transparent 55%); }
.pf-avatar { position: relative; width: 112px; height: 112px; margin: -56px auto 8px; border-radius: 50%; background: var(--emerald); color: var(--on-accent); display: grid; place-items: center; font-size: 42px; font-weight: 700; box-shadow: 0 0 0 5px var(--card); }
.pf-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.pf-cam { position: absolute; right: -2px; bottom: -2px; width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--card); background: var(--btn-bg); color: var(--on-brand); display: grid; place-items: center; cursor: pointer; padding: 0; }
.pf-cam svg { width: 20px; height: 20px; }
.pf-id h1 { margin: 0; font-size: 24px; line-height: 1.25; }
.pf-profession { margin-top: 4px; font-weight: 600; color: var(--brand-ink); }
.pf-chips { justify-content: center; margin-top: 10px; }
.pf-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.pf-actions .btn { width: 100%; justify-content: center; }
.fill-prompt { display: block; text-decoration: none; color: var(--ink); margin-bottom: 16px; }
.info-list-rows { display: grid; }
.info-row { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; min-height: 58px; padding: 6px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.info-row:last-child { border-bottom: 0; }
.info-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--brand-ink); }
.info-ic svg { width: 20px; height: 20px; }
.info-row small { display: block; font-size: 13px; }
.photo-edit { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.photo-edit .pf-avatar { margin: 0; width: 96px; height: 96px; font-size: 34px; box-shadow: none; }
@media (min-width: 900px) {
  .pf-hero { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 0 20px; text-align: left; padding: 0 24px 20px; }
  .pf-cover { grid-column: 1 / -1; margin: 0 -24px; height: 120px; }
  .pf-avatar { margin: -56px 0 0; width: 128px; height: 128px; }
  .pf-chips { justify-content: flex-start; }
  .pf-actions { grid-template-columns: repeat(2, minmax(170px, auto)); margin: 20px 0 0; align-self: end; }
}

.card-layout { display: grid; gap: 18px; }
.card-preview canvas { display: block; width: 100%; max-width: 440px; height: auto; margin: 0 auto; border-radius: 22px; box-shadow: var(--shadow-lift); }
.card-actions { justify-content: center; margin-top: 14px; }
.toggle-list { display: grid; }
.toggle-row { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: center; min-height: 56px; border-bottom: 1px solid var(--line); cursor: pointer; overflow-wrap: anywhere; }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row input { width: 22px; height: 22px; accent-color: var(--brand-ink); }
.toggle-row small { display: block; }
.toggle-row.missing { cursor: default; opacity: .75; }
.swatch { width: 26px; height: 26px; border-radius: 50%; display: inline-block; border: 1px solid var(--line); }
@media (min-width: 900px) { .card-layout { grid-template-columns: minmax(320px, 460px) 1fr; align-items: start; } .card-layout > div:first-child { position: sticky; top: 84px; } }

/* Stats screen */
.top-tabs { position: sticky; top: calc(var(--header-h) + var(--safe-t)); z-index: 20; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--mint); border-bottom: 1px solid var(--line); margin: 0 -16px 14px; padding: 0 8px; }
.top-tabs button { min-height: 48px; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; border-bottom: 3px solid transparent; }
.top-tabs button[aria-selected="true"] { color: var(--brand-ink); border-bottom-color: var(--brand-ink); }
@media (min-width: 1024px) { .top-tabs { top: 64px; margin: 0 0 18px; padding: 0; max-width: 560px; background: transparent; } }
.stats-controls { display: grid; gap: 10px; margin-bottom: 14px; }
.segmented { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--mint-2); border-radius: 999px; padding: 4px; gap: 2px; }
.segmented button { min-height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; padding: 0 4px; }
.segmented button[aria-pressed="true"] { background: var(--card); color: var(--brand-ink); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.stats-controls .chip { display: inline-flex; align-items: center; gap: 6px; }
.period-nav { display: grid; grid-template-columns: 44px 1fr 44px auto; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.period-nav .period-label { text-align: center; font-size: 17px; }
.period-nav .icon-btn { width: 44px; height: 44px; color: var(--brand-ink); }
.period-nav .icon-btn:disabled { opacity: .3; cursor: default; }
.period-nav .icon-btn[hidden] { display: block; visibility: hidden; }
.period-nav.solo { grid-template-columns: 1fr; padding: 10px 12px; }
.period-nav.solo .icon-btn { display: none; }
.period-nav.solo .period-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 16px; }
.stats-controls .segmented { grid-template-columns: repeat(4, 1fr) 46px; }
.segmented .seg-filter { display: grid; place-items: center; color: var(--brand-ink); padding: 0; }
.segmented .seg-filter svg { width: 17px; height: 17px; }
.range-box { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.range-box[hidden] { display: none; }
.range-box .field { margin: 0; }
.range-box .notice { grid-column: 1 / -1; }
@media (max-width: 420px) { .range-box { grid-template-columns: 1fr 1fr; } .range-box .btn { grid-column: 1 / -1; } }
.icon-btn.flip svg { transform: scaleX(-1); }
.btn-sm { min-height: 36px; padding: 2px 12px; font-size: 14px; }
.kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
@media (min-width: 700px) { .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; min-width: 0; }
.kpi dt { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi dd { margin: 2px 0 0; }
.kpi dd b { font-family: var(--font-metric); font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; }
.kpi dd small { color: var(--muted); font-size: 14px; }
.kpi-delta { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.kpi-delta.up, .kpi-delta.down { color: var(--ink); font-weight: 600; }
.chart-wrap { position: relative; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--muted); font-size: 12px; font-family: var(--font); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--muted); stroke-width: 1; opacity: .6; }
.chart .hit { fill: transparent; cursor: pointer; outline: none; }
.chart .hit:focus-visible { stroke: var(--brand-ink); stroke-width: 2; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { stroke: var(--card); stroke-width: 2; }
.chart .crosshair { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--ink); color: var(--card); border-radius: 10px; padding: 6px 10px; font-size: 13px; line-height: 1.4; white-space: nowrap; box-shadow: var(--shadow-lift); }
.chart-tip b { display: block; }
.chart-table { margin-top: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 8px; font-size: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sport-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; }
.sport-dot.run { background: var(--series-run); } .sport-dot.ride { background: var(--series-ride); } .sport-dot.walk { background: var(--series-walk); }
.sport-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.sport-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 2px; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; }
.sport-card > *:not(.sport-dot):not(b) { grid-column: 1 / -1; }
.sport-card strong { font-family: var(--font-metric); font-size: 24px; font-weight: 600; }
.stat-list { display: grid; }
.stat-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 64px; padding: 8px 2px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.stat-row:last-child { border-bottom: 0; }
.stat-row-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-row-main small { display: block; }
.stat-row-nums { text-align: right; }
.stat-row-nums b { display: block; font-family: var(--font-metric); font-size: 19px; font-weight: 600; }
.stat-row-nums small { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.dl-panel h2 { display: flex; align-items: center; gap: 8px; }
.dl-panel h2 svg { width: 22px; height: 22px; }
.rec-list { display: grid; margin: 0; }
.rec-item { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rec-item:last-child { border-bottom: 0; }
.rec-item dt { font-size: 14px; color: var(--muted); }
.rec-item dd { margin: 0; display: grid; }
.rec-item dd b { font-family: var(--font-metric); font-size: 22px; font-weight: 600; }
@media (min-width: 700px) { .rec-item { grid-template-columns: 1fr 1fr; align-items: center; } }
.goal-list { display: grid; gap: 12px; }
.goal { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.goal.done { border-color: var(--brand-ink); }
.goal-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.goal-head .icon-btn { width: 40px; height: 40px; color: var(--muted); }
.progress { height: 12px; background: var(--mint-2); border-radius: 999px; overflow: hidden; margin: 10px 0 6px; }
.progress span { display: block; height: 100%; background: var(--emerald); border-radius: 999px; }
.goal-nums { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.fab { position: fixed; right: 16px; bottom: calc(var(--bottom-h) + var(--safe-b) + 16px); z-index: 25; width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: var(--btn-bg); color: var(--on-brand); font-size: 32px; line-height: 1; text-decoration: none; box-shadow: 0 8px 20px -6px rgba(0,0,0,.45); }
@media (min-width: 1024px) { .fab { display: none; } }
.stats-screen { padding-bottom: 72px; }
@media (min-width: 1024px) { .stats-screen { padding-bottom: 0; } }

/* Hand-entered activity */
.narrow-page { max-width: 720px; }
.pace-preview { margin: -4px 0 12px; min-height: 1.2em; font-weight: 600; color: var(--brand-ink); }
.more-box { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin: 0 0 14px; }
.more-box > summary, .more-box > legend { font-weight: 600; cursor: pointer; padding: 4px 0; }
.more-box[open] > summary { margin-bottom: 10px; }
.act-thumb-icon { width: 96px; height: 76px; display: grid; place-items: center; border-radius: 12px; background: var(--mint-2); }
.act-thumb-icon svg { width: 34px; height: 34px; }
.act-thumb-icon.run { color: var(--series-run); } .act-thumb-icon.ride { color: var(--series-ride); } .act-thumb-icon.walk { color: var(--series-walk); }
.btn-block { width: 100%; justify-content: center; }
@media (max-width: 380px) { .pf-actions { grid-template-columns: 1fr; } .kpi dd b { font-size: 26px; } }

/* Long status badges and values in info lists wrap instead of running off a phone screen. */
.info-list dd { min-width: 0; overflow-wrap: anywhere; }
.info-list dd .badge { white-space: normal; line-height: 1.4; display: inline-block; max-width: 100%; }

/* Related articles list: title, relevance %, + to open */
.sources h2 { align-items: baseline; flex-wrap: wrap; }
.sources h2 .src-title { color: var(--ink); font-size: 16px; font-weight: 700; display: inline-flex; gap: 8px; align-items: center; }
.sources h2 .src-title svg { width: 18px; height: 18px; color: var(--brand-ink); }
details.source { border: 1px solid var(--line); border-radius: 12px; margin-top: 8px; }
details.source.is-best { border-color: var(--emerald); }
details.source > summary { align-items: center; }
.source .pct { flex: none; font-size: 13px; font-weight: 700; color: var(--brand-ink); background: var(--ok-bg); border-radius: 999px; padding: 3px 10px; font-variant-numeric: tabular-nums; }
.source .best-tag { color: var(--brand-ink); font-weight: 700; }
.source-body .relevance-line { font-weight: 700; color: var(--brand-ink); margin: 2px 0 10px; display: flex; gap: 10px; align-items: center; }
.source-body .relevance-line .bar { flex: 1; max-width: 160px; height: 6px; border-radius: 6px; background: var(--mint-2); overflow: hidden; margin: 0; }
.source-body .relevance-line .bar i { display: block; height: 100%; background: var(--emerald); }

/* Running news (like the old runnews page) */
.news-strip { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.news-strip .live { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--brand-ink); text-transform: uppercase; letter-spacing: .04em; }
.news-strip .live i { width: 8px; height: 8px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 4px rgba(229, 72, 77, .18); animation: news-pulse 1.6s ease-in-out infinite; }
@keyframes news-pulse { 50% { box-shadow: 0 0 0 8px rgba(229, 72, 77, 0); } }
.news-head { display: flex; gap: 12px; align-items: end; justify-content: space-between; flex-wrap: wrap; }
.news-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; margin: 4px 0 12px; }
.news-controls .news-count { grid-column: 1 / -1; font-size: 14px; color: var(--muted); }
@media (max-width: 640px) { .news-controls { grid-template-columns: 1fr 1fr; } .news-controls input { grid-column: 1 / -1; } }
.news-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.news-card { position: relative; display: flex; flex-direction: column; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 16px 16px 14px; overflow: hidden; min-width: 0; }
.news-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--emerald), var(--brand-ink)); }
.news-card.is-manual::before { background: linear-gradient(90deg, #f59e0b, #e4570f); }
.news-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.news-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.news-badges > span { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 9px; background: var(--mint-2); color: var(--ink); }
.news-badges .news-cat { background: var(--ok-bg); color: var(--brand-ink); }
.news-badges .news-manual { background: #fff1e6; color: #b4470a; }
.news-badges .news-pin { background: #fff7d6; color: #8a6100; }
.news-no { flex: none; min-width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); }
.news-headline { font-size: 18px; line-height: 1.45; margin: 0; overflow-wrap: anywhere; }
.news-headline a { color: inherit; text-decoration: none; }
.news-headline a:hover { color: var(--brand-ink); text-decoration: underline; }
.news-summary { margin: 0; color: var(--muted); font-size: 15px; }
.news-meta { font-size: 14px; display: grid; gap: 2px; }
.news-foot { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); }
.news-read { font-weight: 700; color: var(--brand-ink); text-decoration: none; display: inline-flex; min-height: 36px; align-items: center; }
.news-footer { text-align: center; margin-top: 18px; }
.news-admin-list { list-style: none; margin: 0; padding: 0; }
.news-admin-list li { padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.news-admin-list li:last-child { border-bottom: 0; }
.news-admin-list a { font-weight: 600; overflow-wrap: anywhere; }

/* "Result" label on every calculator output, with a lightly tinted first result card */
.result-zone:not(:empty)::before, .vo2-best:not(:empty)::before {
  content: attr(data-label); display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; letter-spacing: .03em;
  color: var(--on-brand); background: var(--btn-bg); border-radius: 10px 10px 0 0; padding: 5px 14px; margin: 0 0 -1px 14px; position: relative; z-index: 1;
}
.result-zone > :first-child, .vo2-best { background: color-mix(in srgb, var(--emerald) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--emerald) 45%, var(--line)); }
.vo2-best { border-radius: var(--r-panel); padding: 12px 16px; }
.vo2-best:not(:empty)::before { display: flex; width: max-content; margin: -12px 0 10px -16px; border-radius: var(--r-panel) 0 10px 0; }
.vo2-result.result-zone:not(:empty)::before { display: inline-flex; margin: 0 8px 4px 0; border-radius: 999px; padding: 2px 10px; font-size: 12px; }
.vo2-result.result-zone > :first-child { background: none; border: 0; }
.vo2-result.result-zone:not(:empty) { background: color-mix(in srgb, var(--emerald) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--emerald) 40%, var(--line)); border-radius: 12px; padding: 8px 12px; }
.usage-note { font-size: 13px; color: var(--muted); background: var(--mint-2); border-radius: 999px; padding: 4px 12px; display: inline-block; margin: 0 0 8px; }
.usage-note.low { background: #fff4e5; color: #8a4b00; }
.free-year { display: grid; gap: 4px; background: color-mix(in srgb, var(--emerald) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--emerald) 45%, var(--line)); border-radius: 14px; padding: 12px 14px; margin: 0 0 14px; }
.free-limit h2 { margin-top: 0; }

@media (max-width: 640px) {
  .ev-head { margin-bottom: 8px; }
  .ev-head p { margin-bottom: 8px; }
  .ev-head .btn-row { flex-wrap: wrap; gap: 8px; }
  .ev-head .btn-row .btn:first-child { flex-basis: 100%; }
  .ev-head .btn-row .btn { min-height: 40px; padding: 0 12px; font-size: 14px; flex: 1 1 auto; justify-content: center; }
  .ev-filters .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin-right: -16px; padding-right: 16px; }
  .ev-filters .chips::-webkit-scrollbar { display: none; }
  .ev-filters .chips .chip { flex: none; }
}

/* Event cards: date · name / organizer, place / days left, distances · flag + finished tick */
.event-card { position: relative; align-items: center; }
.event-card .ev-link { color: var(--ink); text-decoration: none; }
.event-card .ev-link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; } /* the whole card opens the event */
.ev-line { font-size: 14px; }
.ev-dist { font-weight: 600; color: var(--ink); }
.ev-marks { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 8px; align-self: center; }
.ev-mark { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; padding: 0; background: var(--card); color: var(--muted); border: 1.5px solid var(--line); }
.ev-mark svg { width: 20px; height: 20px; }
.ev-flag[aria-pressed="true"] { color: #e4570f; border-color: #f3b38f; background: #fff3ec; }
.ev-flag[aria-pressed="true"] svg { fill: currentColor; }
.ev-tick { color: #a7b4b6; border-color: #cfd8d9; }
.ev-tick[aria-pressed="true"] { background: #16a34a; border-color: #16a34a; color: #fff; }
.ev-tick[aria-pressed="true"] svg { stroke-width: 3; }
.ev-mark:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.event-card.is-done { border-color: #86d3a4; }

/* Answer card buttons: "পুরো লেখা পড়ুন" (Bootstrap Icons down arrow) next to "পড়ে শোনান" */
.answer .actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.read-full-btn svg.bi { width: 20px; height: 20px; flex: none; transition: transform .2s ease; }
.read-full-btn[aria-expanded="true"] svg.bi { transform: rotate(180deg); }
.full-article-text { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 17px; line-height: 1.75; }
.full-article-text p { white-space: pre-line; margin: 0 0 12px; }
.answer .actions { flex-wrap: nowrap; }
.answer .actions > * { flex: 1 1 0; min-width: 0; }
.answer .actions .btn { width: 100%; justify-content: center; padding: 0 10px; gap: 8px; white-space: nowrap; }
.answer .actions > span { display: flex !important; flex-direction: column; align-items: stretch !important; gap: 4px !important; }
@media (min-width: 640px) { .answer .actions > * { flex: 0 1 auto; } .answer .actions .btn { padding: 0 18px; } .answer .actions > .btn { width: auto; } }
.read-aloud-btn svg.bi { width: 20px; height: 20px; flex: none; }

/* ---------- PC account button (after the theme button; hidden on phone/tablet, where the drawer and "Me" tab do this) ---------- */
.acct { display: none; position: relative; flex: none; margin-left: 4px; }
.acct-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 2px solid var(--btn-bg); background: transparent; color: var(--btn-bg); padding: 0;
}
.acct-btn svg.bi { width: 22px; height: 22px; }
.acct-btn.is-in { background: var(--btn-bg); color: var(--on-brand); }
.acct-btn.has-pic { overflow: hidden; background: var(--card); }
.self-pic { display: block; border-radius: 50%; object-fit: cover; }
.acct-pic { width: 100%; height: 100%; }
.acct-avatar .self-pic { width: 100%; height: 100%; }
.tab-pic { width: 26px; height: 26px; border: 2px solid var(--line); }
.tab[aria-current="page"] .tab-pic { border-color: var(--brand-ink); }
.acct-btn:hover { filter: brightness(1.08); box-shadow: 0 0 0 4px var(--mint-2); }
.acct-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; min-width: 240px; padding: 6px;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
}
.acct-menu[hidden] { display: none; }
.acct-head { display: flex; gap: 10px; align-items: center; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.acct-avatar { width: 42px; height: 42px; border-radius: 50%; flex: none; overflow: hidden; display: grid; place-items: center; background: var(--btn-bg); color: var(--on-brand); }
.acct-avatar svg.bi { width: 24px; height: 24px; }
.acct-who { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.acct-who b { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-who small { color: var(--muted); font-size: 12px; }
.acct-role { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--mint-2); color: var(--brand-ink); }
.acct-role.role-admin { background: #fde68a; color: #7c2d12; }
.acct-note { margin: 6px 10px 8px; font-size: 13px; color: var(--muted); }
.acct-item {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 10px;
  background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.acct-item svg { width: 20px; height: 20px; flex: none; }
.acct-item:hover, .acct-item:focus-visible { background: var(--mint-2); outline: none; }
.acct-item.danger { color: #dc2626; }
.acct-sep { height: 1px; background: var(--line); margin: 6px 4px; }
@media (min-width: 1024px) { .acct { display: block; } }
.answer .actions > span > .small:empty { display: none; }

/* ---------- Admin → Articles: faq list and add form side by side ---------- */
.legacy-strip { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.legacy-strip .badge { vertical-align: 1px; }
.faq-admin { display: grid; gap: 16px; margin-top: 16px; align-items: start; }
@media (min-width: 900px) { .faq-admin { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.faq-admin .panel { margin: 0; }
.faq-admin h2 { display: flex; align-items: center; gap: 6px; }
.faq-list-panel > .input { margin-bottom: 10px; }
.faq-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 72vh; overflow-y: auto; }
.faq-item { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.faq-item.is-editing { border-color: var(--btn-bg); box-shadow: 0 0 0 2px var(--mint-2); }
.faq-item-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.faq-item-text b { line-height: 1.35; }
.faq-item-text .small.muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.faq-item-actions { display: flex; gap: 6px; flex: none; }
.faq-item-actions .btn svg { width: 16px; height: 16px; }
@media (max-width: 520px) { .faq-item { flex-direction: column; align-items: stretch; } .faq-item-actions .btn { flex: 1; justify-content: center; } }
@media (min-width: 900px) { .faq-form-panel { position: sticky; top: 76px; } }
.faq-form-panel.is-editing { border-color: var(--btn-bg); }
.faq-form textarea[name=content] { min-height: 220px; }
.req-star { color: #dc2626; font-weight: 700; }
.my-ev.is-rejected { border-color: color-mix(in srgb, #dc2626 35%, var(--line)); }

/* ---------- Runners' Blog: three columns of cards ---------- */
.bl-grid { display: grid; gap: 16px; align-items: start; }
@media (min-width: 760px) { .bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bl-grid .bl-curated { grid-column: 1 / -1; } }
@media (min-width: 1100px) { .bl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .bl-grid .bl-curated { grid-column: auto; } }
.bl-events-btn { display: inline-flex; margin-left: 4px; vertical-align: middle; white-space: nowrap; }
.bl-events-btn svg { width: 15px; height: 15px; }
.bl-col { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bl-col-head { display: flex; gap: 10px; align-items: flex-start; }
.bl-col-head h2 { margin: 0; font-size: 18px; line-height: 1.3; }
.bl-col-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.bl-col-icon { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; color: #fff; }
.bl-col-icon svg { width: 20px; height: 20px; }
.bl-events .bl-col-icon { background: #0891b2; }
.bl-mine .bl-col-icon { background: #0891b2; }
.bl-users .bl-col-icon { background: #0d9488; }
.bl-curated .bl-col-icon { background: #2563eb; }
.bl-list { display: grid; gap: 8px; }
.bl-events .event-list { gap: 8px; }
.bl-events .event-card { margin: 0; }
.bl-more { align-self: stretch; justify-content: center; }
.bl-card { position: relative; display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 12px; background: var(--mint); transition: border-color .15s, box-shadow .15s; }
.bl-card:hover { border-color: var(--btn-bg); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.bl-card-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: var(--ink); text-decoration: none; }
.bl-card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bl-card-title { font-weight: 600; line-height: 1.4; }
.bl-card-meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-card-meta svg { width: 12px; height: 12px; vertical-align: -1px; }
.bl-card .bl-del { width: 38px; height: auto; min-height: 38px; color: var(--muted); border-radius: 0 12px 12px 0; }
.bl-card .bl-del svg { width: 18px; height: 18px; }
.bl-card .bl-del:hover { color: #dc2626; }
.bl-add-btn { align-self: flex-start; }
.bl-add-form { border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; }
.bl-group { border: 1px solid var(--line); border-radius: 12px; padding: 0 10px; }
.bl-group[open] { padding-bottom: 10px; }
.bl-group > summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 2px; font-weight: 700; list-style: none; }
.bl-group > summary::-webkit-details-marker { display: none; }
.bl-group > summary::after { content: '+'; font-size: 18px; color: var(--muted); margin-left: 4px; }
.bl-group[open] > summary::after { content: '–'; }
.bl-group > summary .badge { margin-left: auto; }
.bl-admin-lists { display: grid; gap: 16px; min-width: 0; }
.bl-admin-lists .panel { margin: 0; }
.bl-admin-form.is-editing { border-color: var(--btn-bg); }
@media (min-width: 900px) { .bl-admin-form { position: sticky; top: 76px; } }
.share-panel h2 { display: flex; align-items: center; gap: 6px; }
.share-panel h2 svg { width: 20px; height: 20px; }
.share-panel.is-new { border-color: var(--btn-bg); box-shadow: 0 0 0 3px var(--mint-2); }
.share-url { font-size: 14px; direction: ltr; }
.bl-list > *, .bl-card, .bl-card-link { min-width: 0; }
.bl-card-meta svg { display: inline-block; }
.bl-events .event-list { grid-template-columns: minmax(0, 1fr) !important; }
.bl-events .event-card { padding: 10px 12px; gap: 10px; }
.bl-events .event-card h3 { font-size: 15px; }

/* ---------- Side menu dropdowns (My activities, Calculators, Articles) ---------- */
.nav-drop-btn { font-weight: 600; }
.nav-drop-btn .nav-chev { margin-left: auto; display: inline-flex; transition: transform .2s ease; }
.nav-drop-btn .nav-chev svg { width: 16px; height: 16px; }
.nav-drop-btn[aria-expanded="true"] .nav-chev { transform: rotate(180deg); }
.nav-drop-btn[aria-expanded="true"] { color: var(--brand-ink); }
.nav-drop-btn[aria-expanded="true"] > svg:first-child { color: var(--brand-ink); }
.nav-sub { margin: 2px 0 6px 23px; padding-left: 10px; border-left: 2px solid var(--line); }
.nav-sub[hidden] { display: none; }
.nav-sub .nav-item { min-height: 42px; font-size: 15px; gap: 12px; }
.nav-sub .nav-item svg { width: 20px; height: 20px; }
/* Bootstrap icons in the menu are drawn on a 16-unit grid: a little smaller than the 24-unit line icons so they look the same weight. */
.nav-item > svg.bi:first-child { width: 20px; height: 20px; margin: 0 1px; }
.tab > svg.bi { width: 22px; height: 22px; }

/* Blog card icons: 20 Bootstrap icons in turn, on 10 aqua / sea colours */
.bl-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  box-shadow: 0 3px 8px rgba(8, 80, 90, .18), inset 0 1px 0 rgba(255,255,255,.25); transition: transform .25s cubic-bezier(.3,1.5,.6,1); }
.bl-ico svg { width: 20px; height: 20px; }
.bl-ico-0 { background: linear-gradient(135deg, #22d3ee, #0891b2); }
.bl-ico-1 { background: linear-gradient(135deg, #2dd4bf, #0d9488); }
.bl-ico-2 { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.bl-ico-3 { background: linear-gradient(135deg, #34d399, #059669); }
.bl-ico-4 { background: linear-gradient(135deg, #5eead4, #14b8a6); }
.bl-ico-5 { background: linear-gradient(135deg, #67e8f9, #06b6d4); }
.bl-ico-6 { background: linear-gradient(135deg, #7dd3fc, #0ea5e9); }
.bl-ico-7 { background: linear-gradient(135deg, #4ade80, #16a34a); }
.bl-ico-8 { background: linear-gradient(135deg, #22d3ee, #0e7490); }
.bl-ico-9 { background: linear-gradient(135deg, #2dd4bf, #0f766e); }
.bl-card:hover .bl-ico { transform: rotate(-10deg) scale(1.08); }
.bl-card.is-new { animation: bl-new-card 1.6s ease-out; }
.bl-card.is-new .bl-ico { animation: bl-spin-in .9s cubic-bezier(.2,.9,.3,1.2); }
@keyframes bl-spin-in { from { transform: rotate(-360deg) scale(.3); opacity: 0; } to { transform: rotate(0) scale(1); opacity: 1; } }
@keyframes bl-new-card { 0% { box-shadow: 0 0 0 0 rgba(20, 184, 166, .55); } 100% { box-shadow: 0 0 0 14px rgba(20, 184, 166, 0); } }
@media (prefers-reduced-motion: reduce) { .bl-ico, .bl-card.is-new, .bl-card.is-new .bl-ico { animation: none; transition: none; } }
.bl-admin-row .faq-item-text { flex: 1; } .bl-admin-row .bl-ico { width: 34px; height: 34px; border-radius: 10px; } .bl-admin-row .bl-ico svg { width: 17px; height: 17px; }
@media (max-width: 520px) { .bl-admin-row .bl-ico { display: none; } }

/* ---------- Notification bell (top bar, phone and PC) ---------- */
.bell { position: relative; flex: none; }
.bell-btn { position: relative; }
.bell-btn.has-new svg { animation: bell-ring 1.2s ease-in-out 1; transform-origin: 50% 10%; }
@keyframes bell-ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } }
.bell-badge {
  position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: #E53935; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--card);
}
.bell-badge[hidden] { display: none; }
.notif-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 360px; max-height: min(70vh, 520px);
  display: flex; flex-direction: column; background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.18); overflow: hidden;
}
.notif-panel[hidden] { display: none; }
@media (max-width: 640px) { .notif-panel { position: fixed; left: 8px; right: 8px; width: auto; top: calc(var(--header-h) + var(--safe-t) + 6px); } }
.notif-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.notif-link { border: 0; background: none; color: var(--brand-ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px; }
.notif-list { overflow-y: auto; padding: 4px; }
.notif-empty { margin: 14px; color: var(--muted); font-size: 14px; text-align: center; }
.notif-foot { display: block; padding: 10px; text-align: center; border-top: 1px solid var(--line); font-weight: 600; font-size: 14px; color: var(--brand-ink); text-decoration: none; }
.notif-item {
  width: 100%; display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 0; border-radius: 10px;
  background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.notif-item:hover, .notif-item:focus-visible { background: var(--mint-2); outline: none; }
.notif-item.unread { background: color-mix(in srgb, var(--emerald) 9%, transparent); }
.notif-ico { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--mint-2); color: var(--brand-ink); }
.notif-ico svg { width: 18px; height: 18px; }
.notif-item.unread .notif-ico { background: var(--btn-bg); color: var(--on-brand); }
.notif-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; line-height: 1.45; }
.notif-item.unread .notif-text { font-weight: 600; }
.notif-note { color: var(--muted); font-size: 13px; }
.notif-time { color: var(--muted); font-size: 12px; display: flex; gap: 8px; align-items: center; }
.notif-dot { font-size: 11px; font-weight: 700; color: #E53935; }
.notif-page { display: grid; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel, 16px); padding: 6px; }

/* ---------- Appointment flow ---------- */
.badge.req-accepted, .badge.req-paid { background: #E0EEFF; color: #1D4F91; }
.badge.req-booked { background: var(--ok-bg); color: var(--brand-ink); }
:root[data-theme="green"] .badge.req-accepted, :root[data-theme="green"] .badge.req-paid,
:root[data-theme="marine"] .badge.req-accepted, :root[data-theme="marine"] .badge.req-paid { background: #1B2E4A; color: #9CC6FF; }
.chip.chip-alert:not([aria-pressed="true"]) { border-color: #E53935; color: #B71C1C; }
.req-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.req-msg { margin: 8px 0; white-space: pre-line; }
.req-card .act-meta { align-items: center; }
.mode-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--mint-2); color: var(--brand-ink); white-space: nowrap; }
.mode-chip svg { width: 13px; height: 13px; }
.req-steps { list-style: none; display: flex; gap: 0; margin: 12px 0 6px; padding: 0; counter-reset: s; }
.req-steps li { flex: 1; position: relative; text-align: center; font-size: 12px; color: var(--muted); padding-top: 20px; }
.req-steps li .dot { position: absolute; top: 2px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); z-index: 1; }
.req-steps li::before { content: ''; position: absolute; top: 8px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.req-steps li:first-child::before { display: none; }
.req-steps li.done .dot { background: var(--btn-bg); border-color: var(--btn-bg); }
.req-steps li.done::before, .req-steps li.now::before { background: var(--btn-bg); }
.req-steps li.now { color: var(--ink); font-weight: 700; }
.req-steps li.now .dot { border-color: var(--btn-bg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--emerald) 25%, transparent); }
.mode-field { border: 0; padding: 0; margin: 0 0 14px; }
.mode-field legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.mode-opts { display: grid; gap: 8px; margin-bottom: 4px; }
@media (min-width: 640px) { .mode-opts { grid-template-columns: 1fr 1fr; } }
.mode-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--card); }
.mode-opt:has(input:checked) { border-color: var(--btn-bg); background: color-mix(in srgb, var(--emerald) 8%, var(--card)); }
.mode-opt input { width: 20px; height: 20px; accent-color: var(--btn-bg); flex: none; }
.mode-ico svg { width: 20px; height: 20px; color: var(--brand-ink); }
.mode-field.invalid .mode-opt { border-color: var(--danger); }
.pay-box { margin-top: 12px; padding: 14px; border: 2px solid var(--btn-bg); border-radius: 14px; background: color-mix(in srgb, var(--emerald) 6%, var(--card)); }
.pay-box h3 { margin: 0 0 6px; font-size: 17px; }
.pay-box .pay-to { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--card); border: 1px dashed var(--btn-bg); font-size: 16px; }
.booked-box { margin: 12px 0 4px; padding: 12px 14px; border-radius: 14px; background: var(--ok-bg); display: grid; gap: 8px; }
.booked-box > b { color: var(--brand-ink); display: flex; align-items: center; gap: 6px; }
.booked-box > b svg { width: 20px; height: 20px; flex: none; }
.booked-box .info-list { margin: 0; }
.booked-box .info-list dd a { word-break: break-all; }
.booked-box .btn { justify-self: start; }
.btn-wa { background: #25D366; border-color: #25D366; color: #fff; }
.btn-wa:hover { background: #1EBE5A; }
.btn-wa svg { width: 18px; height: 18px; }
.wa-row { align-items: center; }
.pay-info-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.pay-info-form .field { flex: 1 1 320px; margin: 0; }
.login-panel h2 { margin-top: 0; }

/* ---------- Modal (doctor login shown once) ---------- */
.modal-scrim { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.45); display: grid; place-items: center; padding: 16px; }
.modal { max-height: calc(100dvh - 32px); overflow: auto; width: min(460px, 100%); background: var(--card); color: var(--ink); border-radius: 18px; padding: 20px; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.modal h2 { margin-top: 0; }
.cred-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; margin: 8px 0; border-radius: 10px; background: var(--mint-2); }
.cred-row code { font-size: 18px; font-weight: 700; letter-spacing: .04em; user-select: all; }

/* ---------- Ratings ---------- */
.stars-view { display: inline-flex; gap: 1px; color: #F5A623; vertical-align: -0.15em; }
.stars-view svg { width: var(--star, 16px); height: var(--star, 16px); }
.star-picks { display: flex; gap: 4px; }
.star-pick { width: 44px; height: 44px; border: 0; background: transparent; padding: 0; cursor: pointer; color: #C9CED6; display: grid; place-items: center; border-radius: 10px; }
.star-pick svg { width: 32px; height: 32px; }
.star-pick.on { color: #F5A623; }
.star-pick:hover { background: var(--mint-2); }
.star-pick:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.rating-box { margin-top: 16px; }
.rating-box h2 svg, .pro-ratings h2 svg { color: #F5A623; }
.rating-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rating-item { padding: 10px 0; border-top: 1px solid var(--line); }
.rating-item p { margin: 6px 0 0; white-space: pre-line; }
.pro-ratings { margin-top: 16px; }
.rating-card.rt-hidden { opacity: .7; }

/* ---------- About App ---------- */
.about-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.about-head img { flex: none; }
.about-head h1 { margin: 0 0 4px; }
.about-head p { margin: 0; color: var(--muted); }
.about-intro { margin: 4px 0 20px; }
.about-intro p { margin: 0 0 14px; color: var(--muted); line-height: 1.7; }
/* "Donate For Development": a warm gradient pill with a soft shine, after the intro. */
.donate-cta { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 8px 22px 8px 8px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 16px; color: #fff; background: linear-gradient(120deg, #f97316, #e11d48 55%, #be185d); box-shadow: 0 8px 22px rgba(225, 29, 72, .32); transition: transform .2s ease, box-shadow .2s ease; }
.donate-cta::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); animation: donate-shine 3.2s ease-in-out infinite; }
.donate-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(225, 29, 72, .4); }
.donate-cta:active { transform: scale(.97); }
.donate-cta-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.22); }
.donate-cta-ico svg { width: 19px; height: 19px; animation: donate-beat 1.6s ease-in-out infinite; }
.donate-cta-arrow { font-size: 18px; transition: transform .2s ease; }
.donate-cta:hover .donate-cta-arrow { transform: translateX(3px); }
@keyframes donate-shine { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes donate-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.18); } 30% { transform: scale(1); } 45% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .donate-cta::after, .donate-cta-ico svg { animation: none; } }
#donate { scroll-margin-top: 80px; }
.page-head > .btn { margin-top: 10px; }
.about-grid { display: grid; gap: 12px; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1fr 1fr; } }
.about-item { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 16px; }
.about-ico { width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--mint-2); color: var(--brand-ink); }
.about-ico svg { width: 22px; height: 22px; }
.about-item h2 { font-size: 17px; margin: 0 0 4px; }
.about-item p { margin: 0 0 6px; line-height: 1.6; }
.about-link { font-size: 14px; font-weight: 600; }
.about-foot { margin-top: 18px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- Fellow Runners ---------- */
.fr-grid { display: grid; gap: 12px; margin-top: 12px; }
@media (min-width: 760px) { .fr-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1200px) { .fr-grid { grid-template-columns: 1fr 1fr 1fr; } }
.fr-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; display: flex; flex-direction: column; }
.fr-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 12px 10px; }
.fr-head-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.fr-who { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: inherit; }
.fr-who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-who small { color: var(--muted); }
.fr-avatar { border-radius: 50%; object-fit: cover; flex: none; background: var(--mint-2); }
.fr-initials { display: grid; place-items: center; color: var(--brand-ink); font-weight: 700; }
.fr-follow { min-height: 34px; padding: 2px 12px; }
.fr-follow svg { width: 16px; height: 16px; }
.fr-follow.on { background: transparent; color: var(--brand-ink); border-color: var(--btn-bg); }
.fr-act { display: block; text-decoration: none; color: inherit; border-top: 1px solid var(--line); }
.fr-act:hover { background: color-mix(in srgb, var(--emerald) 5%, var(--card)); }
.fr-map { height: 130px; background: var(--mint-2); display: grid; place-items: center; }
.fr-map svg { width: 100%; height: 100%; }
.fr-act-body { padding: 10px 12px 12px; }
.fr-act-body h3 { margin: 4px 0 6px; font-size: 16px; }
.fr-stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; }
.fr-type { font-weight: 700; color: var(--brand-ink); }
.fr-type.t-ride { color: #2a78d6; }
.fr-type.t-trail_run { color: #8a5a00; }
.fr-empty { padding: 0 12px 12px; margin: 0; }
.fr-profile-head { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.fr-profile-head h1 { margin: 0; }
.fr-profile-head .fr-follow { margin-top: 6px; }
.fr-compare td.fr-win b { color: var(--brand-ink); }
.fr-compare td.fr-win b::after { content: ' ▲'; font-size: 11px; }
.fr-compare th[scope="row"] { text-align: left; }

/* ---------- Recording: mode choice, live bar, too-short pop-up ---------- */
.rec-head .gps-pill { margin: 0 0 0 auto; }
.rec-head .rec-view-btn { margin-left: 0; }
.mode-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--mint-2); color: var(--ink); }
.mode-pill svg, .mode-pill .bi { width: 16px; height: 16px; }
.mode-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin: 10px 0 2px; }
.mode-label { width: 100%; text-align: center; font-size: 14px; color: var(--muted); font-weight: 600; }
.mode-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.mode-chip svg, .mode-chip .bi { width: 20px; height: 20px; }
.mode-chip[aria-checked="true"] { border-color: var(--emerald); background: var(--mint-2); color: var(--emerald-ink, var(--ink)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--emerald) 25%, transparent); }
.mode-chip:focus-visible { outline: 3px solid var(--emerald); outline-offset: 2px; }
.live-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 16px; background: #C62828; color: #fff; text-decoration: none; font-size: 15px; position: sticky; top: calc(var(--header-h) + var(--safe-t)); z-index: 29; }
.live-bar[hidden] { display: none; }
.live-bar[data-state="paused"] { background: #FFC21A; color: #231B00; }
.live-bar[data-state="finishing"] { background: var(--emerald); color: #fff; }
.live-bar .live-dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; animation: live-blink 1.2s infinite; }
.live-bar[data-state="paused"] .live-dot, .live-bar[data-state="finishing"] .live-dot { animation: none; }
.live-bar .live-num { font-variant-numeric: tabular-nums; font-weight: 700; }
.live-bar .live-open { margin-left: auto; font-weight: 700; text-decoration: underline; }
@keyframes live-blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .live-bar .live-dot { animation: none; } }

/* ---------- My shoes & bikes ---------- */
.gear-panel { margin-top: 16px; }
.gear-group h3 { margin: 4px 0 8px; font-size: 16px; }
.gear-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.gear-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.gear-row.retired { opacity: .7; }
.gear-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--mint-2); flex: none; }
.gear-ic svg, .gear-ic .bi { width: 20px; height: 20px; }
.gear-main { flex: 1 1 140px; min-width: 0; }
.gear-main .badge { margin-left: 6px; }
.gear-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.gear-form { width: 100%; }
.chip.bl-sec { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 16px; font-weight: 700; }
.chip.bl-sec svg { width: 20px; height: 20px; flex: none; }

/* Blog columns fold on a phone (+ / – in each heading); on wider screens they are always open. */
.bl-col-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bl-col-title { flex: 1; min-width: 0; }
.bl-col-toggle { flex: none; width: 36px; height: 36px; margin: 1px -4px 0 0; border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--ink); font: inherit; font-size: 22px; font-weight: 700; line-height: 1; display: grid; place-items: center; cursor: pointer; }
.bl-col-toggle:focus-visible { outline: 3px solid var(--btn-bg); outline-offset: 2px; }
@media (max-width: 759px) {
  .bl-col-title { cursor: pointer; }
  .bl-col.is-folded { gap: 0; }
  .bl-col.is-folded .bl-col-body { display: none; }
}
@media (min-width: 760px) { .bl-col-toggle { display: none; } }

/* Admin panel: the section buttons as boxes side by side (they wrap onto more rows) */
.tabs.admin-tabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; overflow: visible; padding-bottom: 0; }
.tabs.admin-tabs a { justify-content: center; text-align: center; white-space: normal; line-height: 1.3; border-radius: 10px; padding: 8px 10px; min-height: 46px; font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.tabs.admin-tabs a:hover { border-color: var(--btn-bg); }
.tabs.admin-tabs a:focus-visible { outline: 3px solid var(--btn-bg); outline-offset: 2px; }
.tabs.admin-tabs a[aria-current="page"] { background: var(--btn-bg); color: var(--on-brand); border-color: var(--btn-bg); }
@media (max-width: 420px) { .tabs.admin-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); } .tabs.admin-tabs a { font-size: 14px; padding: 6px; } }

/* ---------- Menu badge (Inbox) ---------- */
.nav-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.nav-badge[hidden] { display: none; }
.input.bad { border-color: #dc2626; box-shadow: 0 0 0 2px color-mix(in srgb, #dc2626 25%, transparent); }

/* ---------- Admin → User Stats ---------- */
.us-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.us-kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.us-kpi-label { font-size: 13px; color: var(--muted); }
.us-kpi b { font-family: var(--font-metric); font-size: 28px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.us-kpi-sub { font-size: 12px; color: var(--muted); }
.us-charts { display: grid; gap: 16px; margin-bottom: 16px; align-items: stretch; }
@media (min-width: 900px) { .us-charts { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); } }
.us-charts .panel { margin: 0; min-width: 0; }
.us-pie-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.us-pie { width: 180px; height: 180px; flex: none; }
.us-slice { stroke: var(--card); stroke-width: 2; }
.us-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.us-legend li { display: flex; align-items: center; gap: 8px; }
.us-legend i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.us-legend b { font-variant-numeric: tabular-nums; }
.us-gicon { width: 16px; height: 16px; color: var(--muted); }
.us-search { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 4px 0 12px; }
.us-search .input { flex: 1 1 260px; max-width: 460px; }
.us-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.us-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.us-card.is-off { opacity: .7; }
.us-top { display: flex; gap: 10px; align-items: center; }
.us-av { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: none; }
.us-initials { display: grid; place-items: center; background: var(--mint-2); color: var(--ink); font-weight: 700; }
.us-id { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.us-id b { display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.us-id .badge { margin-left: 6px; }
.us-g { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; flex: none; }
.us-g svg { width: 15px; height: 15px; }
.us-g.male { color: var(--series-ride); background: color-mix(in srgb, var(--series-ride) 14%, transparent); }
.us-g.female { color: var(--series-run); background: color-mix(in srgb, var(--series-run) 14%, transparent); }
.us-km { text-align: right; flex: none; }
.us-km b { display: block; font-family: var(--font-metric); font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.us-km span { font-size: 12px; color: var(--muted); }
.us-contact { display: flex; flex-direction: column; gap: 2px; font-size: 14px; min-width: 0; }
.us-contact a { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; display: inline-flex; align-items: center; gap: 4px; }
.us-contact a:hover { text-decoration: underline; }
.us-contact svg { width: 15px; height: 15px; flex: none; color: var(--muted); }
.us-contact a.is-blocked { color: #b91c1c; text-decoration: line-through; }
.us-meta { margin: 0; }
.us-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.us-spacer { flex: 1; }
.us-ibtn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: grid; place-items: center; cursor: pointer; text-decoration: none; }
.us-ibtn svg { width: 19px; height: 19px; }
.us-ibtn:hover { border-color: var(--btn-bg); }
.us-ibtn:focus-visible { outline: 3px solid var(--btn-bg); outline-offset: 2px; }
.us-ibtn.call { color: #0d9488; } .us-ibtn.wa { color: #16a34a; } .us-ibtn.mail { color: #dc2626; } .us-ibtn.inbox { color: var(--series-ride); }
.us-more > summary { cursor: pointer; list-style: none; width: 40px; text-align: center; border-radius: 10px; color: var(--muted); font-size: 20px; line-height: 1; padding: 2px 0 6px; }
.us-more > summary::-webkit-details-marker { display: none; }
.us-more[open] > summary { color: var(--ink); }
.us-blocks > summary { cursor: pointer; }
.us-block-form { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.us-block-form .input { flex: 1 1 200px; }
.us-block-form select.input { flex: 0 0 120px; }
.us-block-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.us-block-list li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; }
.us-block-list li span { flex: 1; overflow-wrap: anywhere; }
.us-block-list svg { width: 16px; height: 16px; color: var(--muted); }
.us-plan-list { padding-left: 18px; }

/* ---------- Inbox ---------- */
.ib-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.ib-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); text-decoration: none; }
.ib-row:hover { border-color: var(--btn-bg); }
.ib-row.unread { border-color: var(--btn-bg); background: color-mix(in srgb, var(--btn-bg) 6%, var(--card)); }
.ib-row.unread .ib-last { color: var(--ink); font-weight: 600; }
.ib-av { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.ib-initials { display: grid; place-items: center; background: var(--mint-2); font-weight: 700; }
.ib-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ib-row-main .badge { margin-left: 6px; }
.ib-last { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.ib-count { min-width: 22px; height: 22px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; padding: 0 6px; }
.ib-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ib-head h1 { margin: 0; font-size: 22px; }
.ib-head > div { flex: 1; min-width: 0; }
.ib-thread { display: flex; flex-direction: column; gap: 8px; max-height: 58vh; overflow-y: auto; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--mint); margin-bottom: 10px; }
.ib-msg { max-width: 82%; align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 8px 12px; }
.ib-msg.mine { align-self: flex-end; background: color-mix(in srgb, var(--btn-bg) 14%, var(--card)); border-color: color-mix(in srgb, var(--btn-bg) 35%, var(--line)); border-radius: 16px 16px 4px 16px; }
.ib-msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ib-msg small { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
.ib-empty { text-align: center; margin: 20px 0; }
.ib-compose { display: flex; gap: 8px; align-items: flex-end; }
.ib-compose textarea { flex: 1; min-height: 48px; resize: vertical; }

/* ---------- My own training plans ---------- */
.mp-panel { margin-top: 16px; }
.mp-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mp-panel-head h2 { margin: 0; display: flex; align-items: center; gap: 6px; }
.mp-panel-head h2 svg { width: 20px; height: 20px; }
.mp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mp-item { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; background: var(--card); }
.mp-item:hover { border-color: var(--btn-bg); }
.mp-bar { display: block; height: 6px; border-radius: 999px; background: var(--mint-2); overflow: hidden; }
.mp-bar i { display: block; height: 100%; background: var(--btn-bg); border-radius: 999px; }
.mp-progress { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.mp-progress .mp-bar { width: min(260px, 100%); }
.mp-table td.mp-tick { width: 44px; text-align: center; }
.mp-table input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--btn-bg); }
.mp-table tr.is-done td:not(.mp-tick) { color: var(--muted); }
.mp-table tr.is-done b { text-decoration: line-through; }
.mp-table tr.is-today { background: color-mix(in srgb, var(--btn-bg) 8%, transparent); }
.mp-table .mp-date { white-space: nowrap; }
.mp-table .mp-date .badge { margin-left: 6px; }
.mp-edit td { padding: 4px; vertical-align: top; }
.mp-edit .input { min-width: 0; }
.mp-edit td:nth-child(1) .input { min-width: 140px; }
.mp-edit td:nth-child(2) .input { min-width: 150px; }
.mp-edit td:nth-child(3) .input { width: 90px; }
.mp-edit td:nth-child(4) .input { min-width: 160px; }

/* ---------- More calculators (cards on the Calculators page) ---------- */
.more-calcs { margin-top: 24px; }
.more-calcs h2 { margin-bottom: 4px; }
/* Calculator cards: all the same — icon and name on one line, a short description below. */
.calc-cards { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .calc-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .calc-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.calc-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.calc-card-head { display: flex; align-items: center; gap: 12px; }
.calc-card-head .tool-icon { flex: none; width: 42px; height: 42px; }
.calc-card-head b { font-size: 17px; line-height: 1.3; }
.calc-card:focus-visible { outline: 3px solid var(--btn-bg); outline-offset: 3px; }
.more-calcs { margin-top: 24px; }

/* "How to use" tutorial on calculator pages */
.tutorial { margin: 10px 0 4px; }
.tutorial > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.tutorial > summary::-webkit-details-marker { display: none; }
.tutorial > summary svg { width: 16px; height: 16px; }
.tutorial[open] > summary { background: var(--mint-2); }
.tutorial-body { margin-top: 10px; padding: 12px 16px; border: 1px solid var(--line); border-left: 4px solid var(--btn-bg); border-radius: var(--r-ctl); background: var(--card); line-height: 1.7; }
.tutorial-body h3 { margin: 8px 0 2px; font-size: 15px; } .tutorial-body h3:first-child { margin-top: 0; }
.tutorial-body p { margin: 0 0 4px; } .tutorial-body ul { margin: 0 0 4px; padding-left: 20px; }

/* Health & nutrition */
.hl-layout { display: grid; gap: 16px; align-items: start; }
@media (min-width: 900px) { .hl-layout { grid-template-columns: minmax(280px, 360px) 1fr; } .hl-side { position: sticky; top: 76px; } }
.hl-cards { display: grid; gap: 16px; min-width: 0; }
.hl-card h2 { margin-top: 0; }
.hl-card.hl-focus { box-shadow: 0 0 0 3px var(--btn-bg); }
.hl-ftin { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hl-ftin[hidden] { display: none; }
.hl-out { margin-top: 8px; }
.hl-big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 6px 0 8px; }
.hl-big small { width: 100%; color: var(--muted); font-size: 13px; }
.hl-big b { font-family: var(--font-metric); font-size: 44px; line-height: 1; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.hl-unit { color: var(--muted); font-weight: 600; }
.hl-pill { display: inline-block; padding: 2px 12px; border-radius: 999px; font-weight: 700; font-size: 14px; background: var(--mint-2); color: var(--ink); border-left: 4px solid var(--pc, var(--emerald)); }
.bmi-thin { --pc: #74B9FF; } .bmi-normal { --pc: #00B894; } .bmi-over { --pc: #F0932B; } .bmi-ob { --pc: #E03A3E; }
.bf-essential { --pc: #74B9FF; } .bf-athlete { --pc: #00B894; } .bf-fitness { --pc: #55EFC4; } .bf-average { --pc: #F0932B; } .bf-obese { --pc: #E03A3E; }
.hl-stats { margin: 8px 0; }
.hl-stats dd .hl-range { font-family: var(--font); font-size: 16px; font-weight: 600; line-height: 1.4; display: block; }
.hl-src { color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; margin-bottom: 4px; }
.hl-disclaimer { margin-top: 16px; }
.en-target b { font-size: 52px; }
.more-tool h3 { margin: 12px 0 6px; font-size: 16px; }
.split-table tr.partial td { font-style: italic; }
@media print {
  .topbar, .rail, .bottombar, .drawer, .scrim, .live-bar, .db-update, .demo-warning, .usage-note, .no-print, .toast-host, .page-head a { display: none !important; }
  .content { padding: 0 !important; }
  .tool-grid { display: block !important; }
  .result-zone::before { display: none !important; }
  .panel { border: 0 !important; box-shadow: none !important; }
}

/* About → Support GotiChoron (donations) */
.donate { margin-top: 16px; border-color: color-mix(in srgb, var(--btn-bg) 40%, var(--line)); background: color-mix(in srgb, var(--btn-bg) 5%, var(--card)); }
.donate h2 { display: flex; align-items: center; gap: 8px; margin-top: 0; }
.donate h2 svg { width: 22px; height: 22px; color: var(--btn-bg); }
.donate-number { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1px dashed var(--btn-bg); border-radius: 14px; background: var(--card); margin: 8px 0 12px; }
.donate-number small { display: block; }
.donate-digits { font-family: var(--font-metric); font-size: 30px; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.donate-thanks { margin-bottom: 0; font-weight: 600; color: var(--btn-bg); }
.donate-admin { margin-top: 12px; }
.donate-accounts { display: grid; gap: 8px; margin: 8px 0 12px; }
.donate-accounts .donate-number { margin: 0; }
.donate-accounts .donate-digits { font-size: 26px; display: block; }
.pay-badge { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 1px 10px; border-radius: 999px; color: #fff; background: #636E72; margin-bottom: 2px; }
.pay-bkash { background: #E2136E; } .pay-nagad { background: #EC1C24; } .pay-rocket { background: #8C3494; } .pay-upay { background: #0A4A9E; }
.donate-trx { border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 12px; }
.donate-trx h3 { margin: 0 0 8px; }
.donate-trx #dn-trx { text-transform: uppercase; letter-spacing: .5px; max-width: 280px; }
.dn-rows { display: grid; gap: 8px; margin-bottom: 8px; }
.dn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dn-row select { flex: 0 0 130px; } .dn-row input { flex: 1 1 120px; min-width: 0; } .dn-row input[inputmode="tel"] { flex: 2 1 160px; }
.dn-row input[hidden] { display: none; } .dn-row .icon-btn { flex: none; }
.contact-admin { margin-top: 16px; }
.contact-admin h2 { display: flex; align-items: center; gap: 8px; margin-top: 0; }
.contact-admin h2 svg { width: 22px; height: 22px; color: var(--btn-bg); }
.donate-admin h3 { margin-top: 0; }

/* ---------- Events: four action tiles ---------- */
.ev-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 4px 0 16px; }
.ev-action { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); text-decoration: none; font-weight: 600; line-height: 1.25; transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease; min-width: 0; }
.ev-action:hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); border-color: color-mix(in srgb, var(--btn-bg) 40%, var(--line)); }
.ev-action.on { border-color: var(--btn-bg); background: color-mix(in srgb, var(--btn-bg) 8%, var(--card)); }
.ev-action-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--ok-bg); color: var(--brand-ink); }
.ev-action-ic svg { width: 20px; height: 20px; }
.ev-action:first-child .ev-action-ic { background: var(--btn-bg); color: var(--on-brand); }
@media (max-width: 760px) { .ev-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .ev-action { padding: 10px; font-size: 14px; } .ev-action-ic { width: 34px; height: 34px; } }

/* ---------- Events: month calendar ---------- */
.evc-panel { padding: 18px; }
.evc-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.evc-titlebox h1 { margin: 0 0 6px; }
.evc-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.evc-year { font-family: var(--font-metric); font-size: 20px; font-weight: 700; color: var(--muted); margin-right: 14px; }
.evc-month { font-size: 20px; min-width: 6.5em; text-align: center; }
.evc-nav .icon-btn { width: 34px; height: 34px; }
.evc-nav .icon-btn svg { width: 16px; height: 16px; }
.evc-prev svg { transform: rotate(90deg); } .evc-next svg { transform: rotate(-90deg); }
.evc-spark { display: flex; align-items: flex-end; gap: 8px; margin-top: 10px; }
.evc-bars { display: flex; align-items: flex-end; gap: 2px; height: 40px; width: min(232px, 60vw); border-bottom: 2px solid #1E88E5; }
.evc-bars i { flex: 1; background: transparent; border-radius: 2px 2px 0 0; }
.evc-bars i.on { background: #1E88E5; }
.evc-spark small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .4px; }
.evc-stats { display: flex; gap: 22px; margin: 0; }
.evc-stats div { text-align: center; }
.evc-stats dd { margin: 0; font-family: var(--font-metric); font-size: 34px; font-weight: 500; line-height: 1; }
.evc-stats .hi dd { color: #1E88E5; }
.evc-stats dt { font-size: 12px; color: var(--muted); margin-top: 4px; }
.evc-grid { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); display: grid; gap: 1px; }
.evc-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; }
.evc-head div { background: color-mix(in srgb, var(--btn-bg) 8%, var(--card)); text-align: center; font-size: 13px; font-weight: 700; letter-spacing: .3px; padding: 8px 2px; text-transform: uppercase; }
.evc-cell { background: var(--card); min-height: 104px; padding: 6px 6px 8px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; position: relative; min-width: 0; outline: none; }
.evc-cell.out { background: color-mix(in srgb, var(--line) 35%, var(--card)); cursor: default; }
.evc-cell.out .evc-date { color: var(--muted); opacity: .6; }
.evc-cell:hover:not(.out) { background: color-mix(in srgb, var(--btn-bg) 5%, var(--card)); }
.evc-cell:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }
.evc-cell.sel { box-shadow: inset 0 0 0 2px var(--btn-bg); }
.evc-date { align-self: flex-end; font-family: var(--font-metric); font-size: 15px; font-weight: 600; line-height: 1; }
.evc-cell.today .evc-date { background: var(--btn-bg); color: var(--on-brand); border-radius: 999px; padding: 3px 7px; }
.evc-evs { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.evc-ev { display: flex; align-items: center; gap: 3px; border-left: 3px solid var(--c, #1E88E5); padding: 1px 4px 1px 5px; font-size: 12.5px; font-weight: 600; line-height: 1.3;
  color: color-mix(in srgb, var(--c, #1E88E5) 75%, var(--ink)); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 0 4px 4px 0;
  background: color-mix(in srgb, var(--c, #1E88E5) 9%, transparent); }
.evc-ev span { overflow: hidden; text-overflow: ellipsis; }
.evc-ev svg { flex: none; width: 11px; height: 11px; }
.evc-ev:hover { background: color-mix(in srgb, var(--c, #1E88E5) 18%, transparent); }
.evc-ev.past { opacity: .62; }
.evc-ev.done span { text-decoration: line-through; text-decoration-thickness: 1px; }
.evc-more { font-size: 11.5px; color: var(--muted); padding-left: 6px; }
.evc-dots { display: none; }
.evc-more.m { display: none; }
.evc-legend { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 10px; }
.evc-cat { font-size: 12.5px; padding: 1px 8px; border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 9%, transparent); border-radius: 0 4px 4px 0; }
.evc-agenda { margin-top: 16px; }
.evc-agenda h2 { font-size: 18px; margin: 0 0 10px; }
@media (max-width: 700px) {
  .evc-panel { padding: 12px 10px; }
  .evc-top { align-items: flex-start; }
  .evc-stats { gap: 14px; width: 100%; justify-content: space-between; }
  .evc-stats dd { font-size: 26px; }
  .evc-year { font-size: 16px; margin-right: 4px; } .evc-month { font-size: 17px; min-width: 5.5em; }
  .evc-cell { min-height: 64px; padding: 4px 3px 5px; gap: 2px; }
  .evc-date { font-size: 13px; }
  .evc-head div { font-size: 11px; padding: 6px 0; letter-spacing: 0; }
  .evc-ev { font-size: 10.5px; padding: 0 2px 0 3px; border-left-width: 2px; }
  .evc-ev svg { display: none; }
  .evc-evs .evc-ev:nth-child(n+3) { display: none; }
  .evc-more { font-size: 10px; padding-left: 2px; }
  .evc-more.pc { display: none; } .evc-more.m { display: block; }
}
@media (max-width: 380px) {
  .evc-evs { display: none; }
  .evc-dots { display: flex; gap: 2px; justify-content: center; margin-top: auto; }
  .evc-dots i { width: 6px; height: 6px; border-radius: 50%; }
}

/* Privacy policy / account deletion */
.legal { max-width: 820px; margin-inline: auto; line-height: 1.7; }
.legal h1 { margin: 0 0 4px; }
.legal h2 { font-size: 1.08rem; margin: 22px 0 6px; }
.legal ul, .legal ol { padding-inline-start: 22px; margin: 6px 0; }
.legal li { margin: 4px 0; }
.legal-links a { font-weight: 600; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 40%, var(--line, transparent)); }
.danger-zone h2 { color: var(--danger); }

/* Live position: blue dot with a white ring, a soft pulse, and a light beam toward the direction of travel. */
.me-pos { position: relative; pointer-events: none; }
.me-pos .me-dot { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
  background: #0A6CFF; border: 3px solid #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .35); }
.me-pos .me-halo { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
  background: rgba(10, 108, 255, .35); animation: me-pulse 2.2s ease-out infinite; }
@keyframes me-pulse { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(3.2); opacity: 0; } }
.me-pos .me-beam { position: absolute; left: 50%; top: 50%; width: 64px; height: 56px; margin: -56px 0 0 -32px;
  transform-origin: 50% 100%; transition: transform .35s ease-out;
  background: linear-gradient(to top, rgba(10, 108, 255, .7), rgba(10, 108, 255, 0) 92%);
  clip-path: polygon(50% 100%, 12% 0, 88% 0); filter: blur(.4px); }
@media (prefers-reduced-motion: reduce) { .me-pos .me-halo { animation: none; } .me-pos .me-beam { transition: none; } }

/* ---------------- Clubs ---------------- */
.clubs .cl-tabs { grid-template-columns: 1fr 1fr; }
.clubs .cl-tabs3 { grid-template-columns: repeat(3, 1fr); }
.cl-create { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-panel); padding: 12px 16px; margin-bottom: 12px; font-weight: 600; }
.cl-list { display: grid; gap: 10px; }
@media (min-width: 900px) { .cl-list { grid-template-columns: 1fr 1fr; } }
.cl-list-head { font-size: 1.05rem; margin: 6px 0 10px; }
.cl-row { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel);
  padding: 12px; text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
.cl-row:hover { transform: translateY(-1px); box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .35); }
.cl-row-body { flex: 1; min-width: 0; }
.cl-row-body h3 { margin: 0 0 2px; font-size: 1.06rem; line-height: 1.3; }
.cl-row-right { flex: none; }
.cl-logo { border-radius: 16px; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--mint-2); }
.cl-logo-txt { color: #fff; font-weight: 800; letter-spacing: .5px; background: linear-gradient(135deg, var(--run-1), var(--run-2)); }
.cl-logo-txt.ride { background: linear-gradient(135deg, #2D8CFF, #1B4FB8); }
.cl-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 13.5px; }
.cl-meta span { display: inline-flex; align-items: center; gap: 4px; }
.cl-meta svg { width: 15px; height: 15px; }
.cl-invites .cl-row { border: 0; padding: 6px 0; }
.cl-inv-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.cl-inv-actions .small { margin-right: auto; }
/* club page */
.cl-hero { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; margin-bottom: 12px; }
.cl-cover { height: 120px; display: grid; place-items: end; padding: 12px 16px; color: rgba(255, 255, 255, .35);
  background: radial-gradient(120% 140% at 0% 0%, #FFB37A 0%, var(--run-1) 40%, var(--run-2) 100%); }
.cl-hero.ride .cl-cover { background: radial-gradient(120% 140% at 0% 0%, #8EC5FF 0%, #2D8CFF 45%, #1B4FB8 100%); }
.cl-cover svg { width: 64px; height: 64px; }
.cl-hero-body { padding: 0 16px 16px; }
.cl-hero-body .cl-logo { margin-top: -44px; border: 4px solid var(--card); box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .5); }
.cl-hero-body h1 { margin: 8px 0 4px; font-size: 1.6rem; line-height: 1.25; }
.cl-desc { margin: 8px 0 0; white-space: pre-line; }
.cl-join { margin-top: 12px; display: grid; gap: 6px; justify-items: start; }
.cl-circles { display: flex; flex-wrap: wrap; gap: 10px 14px; padding: 4px 2px 12px; }
.cl-circle { flex: none; display: grid; justify-items: center; gap: 6px; background: none; border: 0; cursor: pointer; color: var(--ink); font: inherit; min-width: 72px; -webkit-tap-highlight-color: transparent; }
.cl-circle-ico { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); transition: transform .18s cubic-bezier(.34, 1.56, .64, 1), background .18s; }
.cl-circle-ico svg { width: 24px; height: 24px; }
.cl-circle:active .cl-circle-ico { transform: scale(.9); background: var(--mint-2); }
.cl-circle small { font-size: 13px; }
.cl-circle.danger { color: var(--danger); }
/* ladder */
.cl-month { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 10px; }
.cl-month .icon-btn { width: 40px; height: 40px; font-size: 24px; color: var(--brand-ink); }
.cl-month .icon-btn:disabled { opacity: .3; }
.cl-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
@media (max-width: 520px) { .cl-tiles { grid-template-columns: 1fr 1fr; } }
.cl-tiles > div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; min-width: 0; }
.cl-tiles small { display: block; color: var(--muted); font-size: 12.5px; }
.cl-tiles b { font-size: 1.15rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-ladder { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; }
.cl-ladder-head { display: grid; grid-template-columns: 34px 44px 1fr auto; gap: 10px; padding: 8px 14px; font-size: 12.5px; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); background: var(--mint-2); }
.cl-ladder-row { position: relative; display: grid; grid-template-columns: 34px 44px 1fr auto; align-items: center; gap: 10px; padding: 10px 14px;
  border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.cl-ladder-row.me { background: color-mix(in srgb, var(--run-1) 8%, transparent); }
.cl-ladder-row.me::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--run-1); }
.cl-ladder-row.zero { opacity: .6; }
.cl-rank { font-weight: 700; text-align: center; font-size: 1.05rem; color: var(--muted); }
.cl-ladder-row.top1 .cl-rank, .cl-ladder-row.top2 .cl-rank, .cl-ladder-row.top3 .cl-rank { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: .95rem; }
.cl-ladder-row.top1 .cl-rank { background: linear-gradient(135deg, #F7C948, #D99A00); }
.cl-ladder-row.top2 .cl-rank { background: linear-gradient(135deg, #C9D1D9, #8D99A6); }
.cl-ladder-row.top3 .cl-rank { background: linear-gradient(135deg, #E3A27A, #B5652F); }
.cl-ladder-name { min-width: 0; display: grid; gap: 1px; }
.cl-ladder-name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-ladder-name small { font-size: 12.5px; }
.cl-bar { display: block; height: 4px; border-radius: 4px; margin-top: 4px; background: linear-gradient(90deg, var(--run-1), var(--run-2)); }
.cl-ladder-km { font-weight: 800; font-size: 1.05rem; white-space: nowrap; }
/* members */
.cl-members { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); }
.cl-member { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.cl-member:first-child { border-top: 0; }
.cl-member-name { flex: 1; min-width: 140px; display: grid; text-decoration: none; color: inherit; }
.cl-waiting { margin-bottom: 12px; }
.cl-waiting .cl-member { padding: 10px 0; }
/* form */
.cl-form { max-width: 640px; }
.cl-form h1 { font-size: 1.4rem; margin-top: 0; }
.cl-logo-row { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.cl-logo-row b { display: block; margin-bottom: 6px; }
.cl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cl-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-weight: 600; }
.cl-chip input { position: absolute; opacity: 0; pointer-events: none; }
.cl-chip svg { width: 18px; height: 18px; }
.cl-chip:has(input:checked) { border-color: var(--run-1); background: color-mix(in srgb, var(--run-1) 12%, var(--card)); color: var(--run-2); }
.cl-chip:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
/* invite dialog */
.cl-modal { width: min(520px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.cl-inv-list { margin-top: 10px; overflow-y: auto; max-height: 50vh; display: grid; gap: 2px; }
.cl-inv-item { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 12px; cursor: pointer; }
.cl-inv-item:hover { background: var(--mint-2); }
.cl-inv-item input { width: 20px; height: 20px; accent-color: var(--run-1); }
.cl-inv-item > span:not(.fr-avatar) { flex: 1; display: grid; }
.cl-inv-item.is-member { opacity: .6; cursor: default; }

/* Stats: 4 tabs, best efforts, lifetime map */
.stats-screen .top-tabs { grid-template-columns: repeat(4, 1fr); }
@media (min-width: 1024px) { .stats-screen .top-tabs { max-width: 680px; } }
.ef-list { display: grid; gap: 8px; }
@media (min-width: 760px) { .ef-list { grid-template-columns: 1fr 1fr; } }
.ef-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 14px; border-radius: 14px; text-decoration: none; color: inherit;
  background: linear-gradient(135deg, color-mix(in srgb, var(--run-1) 10%, var(--card)), var(--card)); border: 1px solid var(--line); }
.ef-item:hover { border-color: var(--run-1); }
.ef-dist { font-weight: 700; }
.ef-time { grid-row: span 2; text-align: right; display: grid; align-content: center; }
.ef-time b { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.ef-time small { color: var(--muted); }
.ef-act { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.life-map { height: min(68vh, 560px); border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--mint-2); }
.life-legend { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.life-legend i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #22C55E; border: 2px solid #E53935; }

.cl-ladder-head span:nth-child(2) { grid-column: 2 / 4; }
.cl-hero-body .small svg, .cl-row-body .small svg { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; }
.cl-member-name b, .cl-inv-item b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-inv-item > span.badge { flex: none; display: inline-block; }
.badge svg { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; }

/* Standard OpenStreetMap tiles: calmer colours, so main roads are pale instead of bright orange (until a CARTO key is set). */
.map-soft .leaflet-tile-pane { filter: saturate(.42) brightness(1.04) contrast(.97); }
.map-soft .leaflet-overlay-pane, .map-soft .leaflet-marker-pane { filter: none; }

/* No internet: a small badge at the top; recording still works and uploads later. */
.offline-pill { position: fixed; z-index: 60; top: calc(var(--header-h, 56px) + var(--safe-t, 0px) + 6px); left: 50%; transform: translateX(-50%);
  padding: 3px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #fff; background: #5B6B63;
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .4); pointer-events: none; }
.offline-pill::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #FFB020; margin-right: 6px; vertical-align: 1px; }

/* Admin → one user, activity dialog, Event Timing */
.modal.modal-wide { width: min(720px, 100%); }
.us-name { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--btn-bg) 45%, transparent); text-underline-offset: 3px; }
.us-name:hover { color: var(--brand-ink); }
.ap-head { display: grid; grid-template-columns: auto 1fr; gap: 14px 16px; align-items: center; }
.ap-head .ap-kpis, .ap-head .btn-row { grid-column: 1 / -1; }
.ap-head h1 { margin: 0; font-size: 24px; }
.ap-av { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.ap-initials { display: grid; place-items: center; background: var(--mint-2); font-weight: 700; font-size: 22px; }
.ap-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ap-kpis > div { background: var(--mint-2); border-radius: 12px; padding: 8px 10px; text-align: center; }
.ap-kpis b { display: block; font-family: var(--font-metric); font-size: 22px; }
.ap-kpis span { font-size: 13px; color: var(--muted); }
.ap-form { display: grid; gap: 10px; }
.ap-form .field { margin: 0; }
@media (min-width: 640px) { .ap-form .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.ap-acts td { vertical-align: top; }
.ap-row-btns { gap: 4px; flex-wrap: nowrap; }
.ap-row-btns .icon-btn { width: 36px; height: 36px; }
.ap-del { color: var(--danger, #c0392b); }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--brand-ink); text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ap-map { height: 240px; border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.ap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 14px; margin: 0 0 10px; }
.ap-grid dt { font-size: 12px; color: var(--muted); }
.ap-grid dd { margin: 0; font-weight: 600; }
.ap-splits { columns: 2; font-size: 14px; }
.et-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.et-filters select { flex: 1 1 260px; max-width: 520px; }
.et-filters select[hidden] { display: none; }
.et-summary h2 { margin: 0 0 4px; }
.et-table .et-row { cursor: pointer; }
.et-table .et-row:hover, .et-table .et-row:focus { background: color-mix(in srgb, var(--btn-bg) 8%, transparent); outline: none; }
.et-group td { background: var(--mint-2); font-weight: 700; }
.et-place { width: 56px; text-align: center; font-weight: 700; }
.et-medal { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; font-weight: 700; }
.et-medal.m1 { background: linear-gradient(135deg, #fbbf24, #d97706); }
.et-medal.m2 { background: linear-gradient(135deg, #cbd5e1, #64748b); }
.et-medal.m3 { background: linear-gradient(135deg, #f0a46b, #b45309); }
/* Event form: distance picker */
.dist-picker { position: relative; }
.dist-picker > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dist-picker > summary::-webkit-details-marker { display: none; }
.dist-picker > summary::after { content: '▾'; color: var(--muted); }
.dp-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-menu { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.18); padding: 6px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; max-height: 320px; overflow: auto; }
.dp-opt { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.dp-opt:hover { background: var(--mint-2); }
.dp-opt input { width: 18px; height: 18px; accent-color: var(--btn-bg); }
.dp-other { grid-column: 1 / -1; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; }
.field .dist-picker + .input { margin-top: 8px; }
