/* dashboard/brand.css — The Market Formula shared chrome + components.
   Loaded after theme.css on every page. Owns the header (.tm-nav), the
   footer (.tm-footer), the header controls (theme / sound / shortcuts / live
   badge / sign-in) and a small component kit modelled on
   theracingformula.com. Pages must NOT restyle these selectors in their own
   <style>: a page rule loads later and silently wins. */

/* ── Skip link ─────────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  padding: 0.5rem 0.9rem;
  background: var(--accent-fill);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.skip-link:focus { top: 0.5rem; }

/* ── Header ────────────────────────────────────────────────────────────── */
.tm-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 58px;
  padding: env(safe-area-inset-top) calc(1.25rem + env(safe-area-inset-right)) 0 calc(1.25rem + env(safe-area-inset-left));
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--header-border);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
  font-family: var(--font-body);
}

/* Lockup: badge + italic display wordmark, mirroring the TRF header mark
   ("THE RACING FORMULA" with RACING in Formula Green). */
.tm-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--text-strong);
}
.tm-nav__brand:hover { text-decoration: none; }
.tm-nav__brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tm-wordmark {
  font-family: var(--font-headline);
  font-style: italic;
  font-weight: 600;
  font-stretch: 62.5%;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--brand-navy);
}
:root[data-theme="dark"] .tm-wordmark { color: #ffffff; }
/* Large display type, so the exact brand green is allowed on white. */
.tm-wordmark__accent { color: var(--brand-green); }

.tm-nav__links {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  flex: 1;
  min-width: 0;
}
.tm-nav__link {
  position: relative;
  padding: 0.4rem 0.42rem;
  border-radius: var(--radius-sm);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: none;
  color: var(--text);
  transition: color 0.15s, background 0.15s;
}
.tm-nav__link:hover {
  color: var(--accent);
  background: var(--accent-dim);
  text-decoration: none;
}
.tm-nav__link[aria-current="page"] {
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
:root[data-theme="dark"] .tm-nav__link[aria-current="page"] {
  background: var(--accent-dim);
  box-shadow: none;
  border-radius: var(--radius-sm);
}

/* Telegram call to action — TRF primary button, header size. */
.tm-nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--accent-fill);
  color: var(--on-accent);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.15s, filter 0.15s;
}
.tm-nav__cta:hover {
  color: var(--on-accent);
  text-decoration: none;
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.tm-nav__cta svg { width: 14px; height: 14px; fill: currentColor; }

.tm-nav__extra {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

/* Header control button (shortcuts) — TRF's neutral outline button. Sound
   and theme live in the More menu (desktop) / the collapsed menu (phone). */
.shortcut-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  height: 32px;
  padding: 0 0.6rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.shortcut-hint { width: 32px; padding: 0; font-family: var(--font-mono); font-weight: 700; }
.shortcut-hint:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* Theme toggle row. Icon and label set by brand.js. */
.theme-btn-mobile svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Live / connection badge */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-green);
  flex-shrink: 0;
  animation: tmf-pulse 2s ease-in-out infinite;
}
.pulse-dot.dead { background: var(--red); animation: none; }
@keyframes tmf-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 166, 106, 0.45); }
  50% { opacity: 0.75; box-shadow: 0 0 0 5px rgba(0, 166, 106, 0); }
}

/* Sign in (inserted by clerk-nav.js into .tm-nav__extra) */
.clerk-signin-link {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 0.65rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s;
}
.clerk-signin-link:hover { background: var(--accent-dim); text-decoration: none; }

/* Hamburger */
.tm-nav__toggle {
  display: none;
  order: 3;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 4px;
  width: 40px;
  height: 40px;
  padding: 0.6rem 0.45rem;
  background: transparent;
  border: none;
  cursor: pointer;
}
.tm-nav__toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--text-strong);
  transition: transform 0.2s, opacity 0.2s;
}
.tm-nav--open .tm-nav__toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.tm-nav--open .tm-nav__toggle-bar:nth-child(2) { opacity: 0; }
.tm-nav--open .tm-nav__toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Menu-only rows (shown inside the collapsed menu) */
.theme-btn-mobile,
.sound-btn-mobile {
  display: none;
  align-items: center;
  gap: 0.55em;
  width: 100%;
  padding: 0.8rem 0;
  border: none;
  border-bottom: 1px solid var(--border);
  background: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
}
.theme-btn-mobile:hover,
.sound-btn-mobile:hover { color: var(--accent); }

/* Desktop squeeze: drop the least-used header extras before collapsing. */
@media (max-width: 1500px) {
  .tm-nav__extra .shortcut-hint { display: none; }
  .tm-nav__extra .live-badge span { display: none; }
}

/* "More" — the personal and help pages plus the sound and theme rows, so the
   bar fits a laptop (every link + controls needed 1410px; 2026-11-08).
   Disclosure pattern: a button with aria-expanded over plain links, opened
   and closed by brand.js. Below the collapse point the wrapper and panel are
   display:contents, so their items sit in the hamburger list as before. */
.tm-nav__more { position: relative; }
.tm-nav__more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.4rem 0.42rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: inherit;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.tm-nav__more-btn svg {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.15s;
}
.tm-nav__more-btn:hover,
.tm-nav__more-btn[aria-expanded="true"] {
  color: var(--accent);
  background: var(--accent-dim);
}
.tm-nav__more-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
/* The current page is one of the More pages: mark the button as current. */
.tm-nav__more:has([aria-current="page"]) > .tm-nav__more-btn {
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
:root[data-theme="dark"] .tm-nav__more:has([aria-current="page"]) > .tm-nav__more-btn {
  background: var(--accent-dim);
  box-shadow: none;
  border-radius: var(--radius-sm);
}
/* The dropdown panel — desktop only, so none of it leaks into the
   hamburger list below the collapse point. */
@media (min-width: 1024px) {
  .tm-nav__more-menu {
    position: absolute;
    top: calc(100% + 0.55rem);
    left: 0;
    z-index: 110;
    display: none;
    flex-direction: column;
    min-width: 12.5rem;
    padding: 0.35rem;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-pop);
  }
  .tm-nav__more--open .tm-nav__more-menu { display: flex; }
  .tm-nav__more-menu .tm-nav__link {
    padding: 0.55rem 0.65rem;
    font-size: 0.7rem;
  }
  .tm-nav__more-menu .tm-nav__link[aria-current="page"],
  :root[data-theme="dark"] .tm-nav__more-menu .tm-nav__link[aria-current="page"] {
    background: var(--accent-dim);
    box-shadow: inset 3px 0 0 var(--accent);
    border-radius: var(--radius-sm);
  }
  .tm-nav__more-menu .sound-btn-mobile,
  .tm-nav__more-menu .theme-btn-mobile {
    display: inline-flex;
    padding: 0.55rem 0.65rem;
    border-bottom: none;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
  }
  .tm-nav__more-menu .sound-btn-mobile:hover,
  .tm-nav__more-menu .theme-btn-mobile:hover { background: var(--accent-dim); }
  /* A rule between the pages and the two settings rows. */
  .tm-nav__more-menu .tm-nav__link + button {
    margin-top: 0.3rem;
    border-top: 1px solid var(--border);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    padding-top: 0.8rem;
  }
}

/* Collapse point: the bar holds down to 1024px (iPad landscape, small
   laptops), using the compact tier further down this file below 1180px, and
   folds into the hamburger below that. */
@media (max-width: 1023px) {
  .tm-nav { gap: 0.6rem; }
  .tm-nav__toggle { display: inline-flex; }
  .tm-nav__extra { order: 2; margin-left: auto; }
  .tm-nav__extra .shortcut-hint { display: none; }
  .tm-nav__more,
  .tm-nav__more-menu { display: contents; }
  .tm-nav__more-btn { display: none; }
  /* Keep today's phone order: pages, Telegram, then Sound / Dark mode. */
  .sound-btn-mobile,
  .theme-btn-mobile { order: 1; }
  .tm-nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100vh - 58px);
    overflow-y: auto;
    padding: 0.4rem 1.25rem 1.1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-pop);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
  }
  .tm-nav--open .tm-nav__links {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .tm-nav__link {
    padding: 0.8rem 0;
    font-size: 0.78rem;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
  }
  .tm-nav__link:hover { background: transparent; }
  .tm-nav__link[aria-current="page"],
  :root[data-theme="dark"] .tm-nav__link[aria-current="page"] {
    box-shadow: inset 3px 0 0 var(--accent);
    padding-left: 0.75rem;
    background: transparent;
    border-radius: 0;
  }
  .tm-nav__cta { margin: 0.85rem 0 0; justify-content: center; padding: 0.7rem 1rem; }
  .theme-btn-mobile,
  .sound-btn-mobile { display: inline-flex; }
}
@media (max-width: 480px) {
  .tm-nav { padding-left: calc(0.85rem + env(safe-area-inset-left)); padding-right: calc(0.6rem + env(safe-area-inset-right)); }
  .tm-nav__brand img { width: 34px; height: 34px; }
  .tm-wordmark { font-size: 1.32rem; }
  .live-badge span { display: none; }
}
@media (max-width: 360px) {
  .tm-wordmark { font-size: 1.14rem; }
}

/* ── Footer ────────────────────────────────────────────────────────────── */
.tm-footer {
  margin-top: 3rem;
  padding: 2.6rem calc(1.3rem + env(safe-area-inset-right)) calc(1.8rem + env(safe-area-inset-bottom)) calc(1.3rem + env(safe-area-inset-left));
  background: var(--bg-deep);
  color: var(--text-dim);
  font-family: var(--font-body);
}
:root[data-theme="dark"] .tm-footer { border-top: 1px solid var(--border); }
.tm-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 2rem;
}
.tm-footer__brand { display: flex; flex-direction: column; gap: 0.6rem; }
.tm-footer__brand-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text);
}
.tm-footer__brand-row img { width: 32px; height: 32px; border-radius: 50%; }
.tm-footer__motto {
  margin: 0;
  font-family: var(--font-headline);
  font-style: italic;
  font-weight: 600;
  font-stretch: 62.5%;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}
.tm-footer__tagline {
  margin: 0;
  max-width: 300px;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text-dim);
}
.tm-footer__col h3,
.tm-footer__col h4 {
  margin: 0 0 0.8rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}
.tm-footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.tm-footer__col a,
.tm-footer__bottom a {
  color: var(--text-dim);
  font-size: 0.8rem;
  text-decoration: none;
  transition: color 0.15s;
}
.tm-footer__col a:hover,
.tm-footer__bottom a:hover { color: var(--accent); text-decoration: none; }
.tm-footer__bottom {
  max-width: 1200px;
  margin: 2.2rem auto 0;
  padding-top: 1.3rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  font-size: 0.72rem;
  color: var(--text-dim);
}
.tm-footer__bottom a { font-size: inherit; }
@media (max-width: 900px) {
  .tm-footer__inner { grid-template-columns: 1fr 1fr; gap: 1.75rem; }
  .tm-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .tm-footer__bottom { flex-direction: column; text-align: center; }
}

/* ── Component kit (opt-in classes for page content) ───────────────────── */

/* Mono eyebrow above a title: "// LIVE MARKET" */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
}
.section-label {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Page title in the TRF headline face. Uppercase display only. */
.page-title {
  margin: 0;
  font-family: var(--font-headline);
  font-style: italic;
  font-weight: 600;
  font-stretch: 62.5%;
  font-size: clamp(2.1rem, 5vw, 3.3rem);
  line-height: 0.98;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-strong);
}
.page-title .accent { color: var(--accent); }
.page-sub {
  margin: 0.55rem 0 0;
  max-width: 640px;
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.55;
  color: var(--text);
}

/* Section title: Inter 700 uppercase, like "EVERYTHING YOU NEED TO READ A RACE" */
.section-title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  color: var(--text-strong);
}

/* Buttons */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, color 0.15s, border-color 0.15s, filter 0.15s;
}
.btn-primary {
  background: var(--accent-fill);
  color: var(--on-accent);
  border: 1px solid var(--accent-fill);
}
.btn-primary:hover { color: var(--on-accent); transform: translateY(-1px); filter: brightness(1.08); text-decoration: none; }
.btn-secondary {
  background: transparent;
  color: var(--text-strong);
  border: 1px solid var(--accent);
}
.btn-secondary:hover { color: var(--accent); background: var(--accent-dim); text-decoration: none; }

/* Card */
.tmf-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

/* Chips / badges — TRF's mono uppercase tag */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.18rem 0.5rem;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: var(--surface-hover);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
}
.chip--green { background: var(--green-dim); color: var(--green); border-color: var(--green-border); }
.chip--red { background: var(--red-dim); color: var(--red); border-color: var(--red-border); }
.chip--gold { background: var(--gold-dim); color: var(--gold); border-color: var(--gold-border); }
.chip--drift { background: var(--drift-dim); color: var(--drift); border-color: var(--drift-border); }
.chip--solid { background: var(--accent-fill); color: var(--on-accent); border-color: var(--accent-fill); }

/* Tables */
.tmf-table th {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Numbers */
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* First-visit guidance and a keyboard/touch accessible market glossary. */
.tm-start { margin: 0 0 1.25rem; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text-strong); }
.tm-start__steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: .8rem 0; }
.tm-start a { color: var(--green); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.tm-start__steps span { display: block; margin-top: .3rem; color: var(--text-dim); font-size: .82rem; font-weight: 400; }
.tm-start__help { font-size: .8rem; }
.tm-glossary { max-width: 900px; margin: .5rem 0 1rem; font-size: .8rem; color: var(--text-dim); }
.tm-glossary summary { cursor: pointer; color: var(--green); font-weight: 600; padding: .5rem 0; }
.tm-glossary dl { margin: .5rem 0; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.tm-glossary dt { color: var(--text-strong); font-weight: 700; margin-bottom: .2rem; }
.tm-glossary dd { margin: 0; line-height: 1.5; }
.tm-glossary summary:focus-visible, .tm-start a:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
@media (max-width: 900px) { .tm-start__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .tm-start__steps, .tm-glossary dl { grid-template-columns: 1fr; } }

.tm-start { margin-left: 24px; margin-right: 24px; }
@media (max-width: 600px) { .tm-start { margin-left: 16px; margin-right: 16px; } }

/* Help controls remain usable on touch screens and inside scrolling tables. */
.tm-help { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 28px; margin-left: 3px; padding: 2px; border: 0; border-radius: 50%; background: transparent; color: var(--green, #08775b); font: 16px/1 sans-serif; cursor: help; vertical-align: middle; touch-action: manipulation; }
.tm-help:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.tm-help:hover, .tm-help[aria-expanded="true"] { background: var(--green-dim, #dcefe8); }
.tm-tooltip { position: fixed; z-index: 10000; box-sizing: border-box; width: max-content; max-width: min(320px, calc(100vw - 16px)); padding: 12px 14px; border: 1px solid var(--border, #ccc); border-radius: 8px; background: var(--surface, #fff); color: var(--text-strong, #142333); box-shadow: 0 5px 24px #0003; font: 400 13px/1.5 var(--font-sans, sans-serif); text-align: left; white-space: normal; }
.tm-tooltip[hidden] { display: none; }
@media (pointer: coarse) { .tm-help { min-width: 44px; min-height: 44px; } }

/* Desktop bar matched to The Racing Formula's header (measured 2026-11-20): a 77px bar with a
   ~62px mark, and nav text that steps up on wide screens (TRF: 11.52px from 1600px, 12.8px from
   1800px). Below 1600px we keep our own 0.66rem, a touch larger than TRF's 9.7-10.1px. */
@media (min-width: 1024px) {
  .tm-nav { min-height: 77px; }
  .tm-nav__brand img { width: 58px; height: 58px; }
  .tm-wordmark { font-size: 1.75rem; }
}
/* Compact tier, 1024-1179px: the bar holds eight links + More (the Tape, All Steamers and Search
   joined it 2026-12-03) and at full size needs about 1137px. Here the Telegram button is its icon
   alone (the link text stays for screen readers), the mark is the phone-size one and the links sit
   closer, so iPad landscape and small laptops keep the bar instead of the hamburger. */
@media (min-width: 1024px) and (max-width: 1179px) {
  .tm-nav { gap: 0.5rem; }
  .tm-nav__brand img { width: 44px; height: 44px; }
  .tm-wordmark { font-size: 1.5rem; }
  .tm-nav__link, .tm-nav__more-btn { padding-left: 0.3rem; padding-right: 0.3rem; }
  .tm-nav__more-menu .tm-nav__link { padding-left: 0.65rem; padding-right: 0.65rem; }
  .tm-nav__cta { gap: 0; padding: 0.5rem; font-size: 0; letter-spacing: 0; }
  .tm-nav__cta svg { width: 16px; height: 16px; }
}
@media (min-width: 1600px) {
  .tm-nav__link, .tm-nav__more-btn { font-size: 11.52px; padding: 4.8px 6.08px; }
  .clerk-signin-link { font-size: 12.8px; height: 30px; }
  .tm-nav__cta { font-size: 11.52px; }
}
@media (min-width: 1800px) {
  .tm-nav__link, .tm-nav__more-btn { font-size: 12.8px; }
}

/* ── Cookie choice (consent.js) ──────────────────────────────────────────
   A bar at the foot of the page. The two buttons are the same size and
   weight on purpose: saying no has to be as easy as saying yes. */
.tm-footer__btn {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.8rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.15s;
}
.tm-footer__btn:hover { color: var(--accent); }
.sm-consent {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 1000;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  padding: 0.9rem 1rem calc(0.9rem + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 24px rgb(0 0 0 / 0.18);
  font-family: var(--font-body);
}
.sm-consent__text {
  margin: 0;
  max-width: 46rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text);
}
.sm-consent__text a { color: var(--accent); text-decoration: underline; }
.sm-consent__actions { display: flex; gap: 0.6rem; }
.sm-consent__btn {
  min-width: 7.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
.sm-consent__btn:hover { background: var(--accent-dim); }
