/* HatchFLEA public mobile refinement | 2026-11-19
   Pages: public site, 2ZZ articles, race results and visitor replay.
   No race calculations, ECU controls, or owner screens are modified. */
.flea-public-dock { display: none; }
.flea-public-dock a:focus-visible { outline: 3px solid #0e7490; outline-offset: -3px; }
@media (max-width: 899px) {
  html { scroll-padding-bottom: 6rem; }
  body.flea-public-layout { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important; }
  .flea-public-dock {
    display: block !important; position: fixed; z-index: 110;
    left: 0; right: 0; bottom: 0; top: auto;
    padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px));
    background: rgba(255,255,255,.98);
    border-top: 1px solid #dbe4ee;
    box-shadow: 0 -6px 22px rgba(15,23,42,.12);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    font-family: system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  }
  .flea-public-dock .flea-dock-inner {
    width: min(100%, 650px); margin-inline: auto;
    display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 2px;
  }
  .flea-public-dock .flea-dock-inner > a {
    min-width:0; min-height:54px; display:flex; flex-direction:column;
    align-items:center; justify-content:center; gap:1px;
    border-radius:12px; padding: 5px 0; background:transparent;
    color:#334155; text-decoration:none;
    font-size:12px; line-height:1.15; font-weight:800;
    letter-spacing:0; text-transform:none;
  }
  .flea-public-dock .flea-dock-inner > a[aria-current="page"] {
    color:#065f86; background:#e5f6fb;
  }
  .flea-public-dock .flea-dock-inner > a .flea-dock-icon {
    display:block; font-size:19px; line-height:1.05; font-weight:800;
  }
  .flea-public-dock .flea-dock-inner > a .flea-dock-label {
    display:block; font:inherit; text-transform:none; font-size:12px;
  }
  .flea-public-layout :is(h1,h2,h3,p,li) { overflow-wrap:break-word; }
  /* Article buttons are comfortable to tap without altering desktop components. */
  .flea-public-layout .links a, .flea-public-layout .nav a,
  .flea-public-layout .link-group a { min-height:44px; }
}
@media (max-width: 640px) {
  /* The 2ZZ guide previously used 14px main copy; keep captions compact. */
  .flea-engine-page main p.text-sm:not(.font-race),
  .flea-engine-page main .spec-row.text-sm,
  .flea-engine-page main :is(ul,ol) li.text-sm {
    font-size:16px !important; line-height:1.55 !important;
  }
  .flea-engine-page main .spec-row { grid-template-columns:minmax(0,1fr) minmax(0,1.28fr); gap:10px; }
  .flea-engine-page main .spec-row > * { overflow-wrap:anywhere; }
  .flea-engine-page .flea-guide-toc .mobile-nav-grid {
    display:flex !important; flex-wrap:nowrap !important;
    grid-template-columns:none !important; align-items:stretch;
    gap:8px !important; padding:6px 2px !important;
    overflow-x:auto; scroll-snap-type:x proximity;
    scrollbar-width:thin; -webkit-overflow-scrolling:touch;
  }
  .flea-engine-page .flea-guide-toc .mobile-nav-grid a,
  .flea-engine-page .flea-guide-toc .mobile-nav-grid a:nth-child(5) {
    flex:0 0 auto !important; min-width:94px; min-height:44px !important;
    width:auto !important; grid-column:auto !important; scroll-snap-align:start;
    padding:9px 13px !important; font-size:14px !important;
  }
  .flea-engine-page .flea-swipe-hint {
    display:block; margin:0; padding:0 4px 4px;
    text-align:right; font-size:11px; font-weight:800; color:#475569;
  }
  .flea-engine-page .hero-title { font-size:clamp(2.35rem,11.5vw,3.65rem) !important; }
  /* Turn the C60 3- and 4-column gear tables into readable rows on phones. */
  .flea-gear-page .flea-mobile-cards { overflow:visible; }
  .flea-gear-page .flea-mobile-cards table,
  .flea-gear-page .flea-mobile-cards tbody,
  .flea-gear-page .flea-mobile-cards tr { display:block; width:100%; min-width:0; }
  .flea-gear-page .flea-mobile-cards thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  .flea-gear-page .flea-mobile-cards tbody { display:grid; gap:10px; }
  .flea-gear-page .flea-mobile-cards tr { border:1px solid #dbe4ee; border-radius:14px; background:#f8fafc; padding:9px 12px; }
  .flea-gear-page .flea-mobile-cards td {
    display:grid; grid-template-columns:minmax(88px,.43fr) minmax(0,1fr);
    align-items:start; gap:8px; border:0; border-bottom:1px solid #e2e8f0;
    padding:9px 2px; overflow-wrap:anywhere; line-height:1.4;
    font-size:15px;
  }
  .flea-gear-page .flea-mobile-cards td:last-child { border-bottom:0; }
  .flea-gear-page .flea-mobile-cards td::before {
    content:attr(data-label); color:#52647b; font-size:12px;
    font-weight:800; text-transform:uppercase; letter-spacing:.02em;
  }
  .flea-public-layout .hero-lede, .flea-public-layout .public-intro { font-size:16px; line-height:1.55; }
  /* Replay values stay in three columns; labels no longer drop to 8px. */
  .flea-replay-page .intro-copy > p { font-size:16px; line-height:1.55; }
  .flea-replay-page .engine-column .instrument-caption { font-size:11px; line-height:1.25; }
  .flea-replay-page .engine-column .instrument { min-height:94px; }
  .flea-replay-page .engine-column .rpm-footer { font-size:10px; }
  .flea-replay-page .live-race-layout .stage-hud small { font-size:10px; }
  .flea-replay-page .live-race-layout .stage-footer { font-size:11px; line-height:1.35; }
  .flea-replay-page .live-tile span, .flea-replay-page .live-tile small { font-size:10px; letter-spacing:0; }
  .flea-replay-page .checkpoint small { font-size:10px; }
  .flea-replay-page .checkpoint-head span { font-size:12px; }
  .flea-replay-page .slider-head label, .flea-replay-page .slider-head span { font-size:12px; }
  .flea-replay-page .site-head nav a { font-size:12px; }
}
@media (max-width: 360px) {
  .flea-public-dock .flea-dock-inner > a .flea-dock-label { font-size:11px; }
  .flea-replay-page .engine-column .instrument-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .flea-gear-page .flea-mobile-cards td { grid-template-columns:78px minmax(0,1fr); }
}
@media (min-width: 641px) { .flea-engine-page .flea-swipe-hint { display:none; } }
@media (prefers-reduced-motion: reduce) { .flea-engine-page .flea-guide-toc * { scroll-behavior:auto; } }
