/* ================= ADAM LEWIS RACING — design tokens ================= */
:root{
  --white: #FFFFFF;
  --surface: #F5F9F9;
  --surface-alt: #ECF3F3;
  --ink: #10171C;
  --ink-soft: #4A5760;
  --navy: #0E2A3E;
  --teal: #4FB3AE;
  --teal-dark: #357C79;
  --teal-pale: #E3F3F2;
  --line: #DCE6E6;
  --win: #1A7A4C;
  --win-bg: #E3F4EA;
  --loss: #C23B3B;
  --loss-bg: #FBE7E7;
  --place: #C98A1F;
  --place-bg: #FBF0DD;

  --font-display: "Space Grotesk", "Archivo", sans-serif;
  --font-body: "Inter", sans-serif;

  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(14,42,62,0.06), 0 1px 1px rgba(14,42,62,0.04);
  --shadow-md: 0 8px 24px rgba(14,42,62,0.08);
  --max: 1200px;
}

@media (min-width: 1800px){ :root{ --max: 1440px; } }
@media (min-width: 2400px){ :root{ --max: 1680px; } }

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a{ color: inherit; text-decoration:none; }
img{ max-width:100%; display:block; }

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

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Top bar ---------- */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner{
  display:flex;
  align-items:center;
  justify-content: space-between;
  height: 76px;
  max-width: none;
  margin: 0;
  /* left padding aligns the logo with the page content; right padding keeps the
     nav tucked into the corner instead of leaving an empty gutter on wide screens */
  padding-left: max(28px, calc((100% - var(--max)) / 2 + 28px));
  padding-right: 28px;
}
.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.brand img{ height: 38px; width:auto; }
/* logo swaps to the dark-background lockup in dark mode */
.brand-logo-dark{ display:none; }
[data-theme="dark"] .brand-logo-light{ display:none; }
[data-theme="dark"] .brand-logo-dark{ display:block; }
.brand .page-tag{
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 1rem;
}
.brand .divider{
  color: var(--line);
  font-weight: 400;
}

.top-actions{
  display:flex;
  align-items:center;
  gap: 12px;
}

.btn-subscribe{
  background: var(--teal);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  padding: 10px 20px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn-subscribe:hover{ background: var(--teal-dark); }
.btn-subscribe:active{ transform: scale(0.98); }
.btn-subscribe:focus-visible{ outline: 2px solid var(--navy); outline-offset: 2px; }

.menu-wrap{ position:relative; }
.btn-menu{
  display:flex;
  align-items:center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 10px 16px;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-menu:hover{ background: var(--surface-alt); }
.btn-menu:focus-visible{ outline: 2px solid var(--navy); outline-offset: 2px; }
.btn-menu .chev{ transition: transform 0.2s ease; }
.btn-menu[aria-expanded="true"] .chev{ transform: rotate(180deg); }

.menu-panel{
  position:absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 240px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 10px;
  display:flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.menu-panel.open{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.menu-item{
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  transition: background 0.12s ease;
}
.menu-item:hover{ background: var(--surface); }
.menu-item.active{ color: var(--teal-dark); }
.menu-item svg{ flex-shrink:0; color: var(--ink-soft); }
.menu-item.active svg{ color: var(--teal-dark); }
.menu-divider{ height:1px; background: var(--line); margin: 6px 4px; }
.menu-tg{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  padding: 11px 12px;
  font-weight: 700;
  font-size: 0.9rem;
  background: #229ED9;
  color: var(--white);
  border-radius: 10px;
  text-align: center;
  margin-top: 2px;
  text-decoration: none;
  transition: background 0.15s ease;
}
.menu-tg:hover{ background: #1B87BA; }
.menu-tg .tg-ic{ flex-shrink:0; }

/* ---------- generic section ---------- */
section{ padding: 64px 0; }
.eyebrow{
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin: 0 0 12px;
}
h1,h2,h3{ font-family: var(--font-display); color: var(--navy); margin: 0; }
h1{ font-size: clamp(2.2rem, 4.2vw, 3.4rem); line-height: 1.05; font-weight: 700; }
h2{ font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 700; }
p{ margin: 0; color: var(--ink-soft); }

/* ---------- hero ---------- */
.hero{
  position: relative;
  padding: 84px 0 56px;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 20%, var(--teal-pale) 0%, transparent 55%);
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero-single{
  display:flex;
  flex-direction: column;
}
.hero-single .hero-copy{ max-width: 640px; }
.hero-copy p.lead{
  font-size: 1.08rem;
  margin-top: 18px;
  max-width: 480px;
}
.hero-stats{
  display:flex;
  gap: 28px;
  margin-top: 32px;
}
.hero-stat .num{
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--navy);
}
.hero-stat .num.win{ color: var(--win); }
.hero-stat .label{
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.hero-cta{
  display:flex;
  gap: 14px;
  margin-top: 32px;
}
.btn-primary{
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  padding: 13px 26px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}
.btn-primary:hover{ background:#163C56; }
.btn-ghost{
  background: transparent;
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 600;
  padding: 13px 22px;
  border-radius: 100px;
  border: 1.5px solid var(--line);
  cursor: pointer;
  font-size: 0.95rem;
}
.btn-ghost:hover{ border-color: var(--navy); }

/* Stride mark — signature linework motif derived from logo horse, sits at the end of the hero flow */
.stride-mark{
  position:relative;
  width: 100%;
  max-width: 760px;
  height: 90px;
  margin-top: 44px;
}
.stride-mark svg{ width:100%; height:100%; }
.stride-line{
  fill:none;
  stroke: var(--teal);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 6 10;
  opacity: 0.45;
}
.stride-line.solid{
  stroke-dasharray: none;
  stroke-width: 3;
  opacity: 0.85;
}

/* ---------- content card blocks (new member info / bankroll) ---------- */
.info-section{ background: var(--surface); }
.info-banner{
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 22px 26px;
  display:flex;
  align-items:center;
  gap: 14px;
  margin-bottom: 36px;
}
.info-banner .tag{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.info-banner .sub{ color: rgba(255,255,255,0.75); font-size: 0.9rem; margin-top:2px; }

.welcome-line{
  font-size: 1.15rem;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 8px;
}

.card-grid{
  display:grid;
  gap: 20px;
}
.info-card{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 30px;
  box-shadow: var(--shadow-sm);
}
.info-card h3{
  font-size: 1.2rem;
  display:flex;
  align-items:center;
  gap: 10px;
  margin-bottom: 14px;
}
.info-card p{ margin-bottom: 10px; }
.info-card ul{
  margin: 0 0 14px;
  padding-left: 0;
  list-style:none;
  display:flex;
  flex-direction:column;
  gap: 8px;
}
.info-card ul li{
  position:relative;
  padding-left: 22px;
  color: var(--ink-soft);
}
.info-card ul li::before{
  content:"";
  position:absolute;
  left:0; top: 9px;
  width: 7px; height:7px;
  border-radius:50%;
  background: var(--teal);
}
.info-card.highlight{
  border-color: var(--teal);
  background: var(--teal-pale);
}
.info-card .callout{
  background: var(--surface-alt);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.92rem;
  color: var(--ink);
  margin: 10px 0;
}
.info-card .example-row{
  display:flex;
  gap: 24px;
  flex-wrap:wrap;
  margin: 14px 0;
}
.example-pill{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--navy);
}
.do-dont{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.do-dont .col{ border-radius: 10px; padding: 16px 18px; }
.do-dont .do{ background: var(--win-bg); }
.do-dont .dont{ background: var(--loss-bg); }
.do-dont .col-title{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.do-dont .do .col-title{ color: var(--win); }
.do-dont .dont .col-title{ color: var(--loss); }
.do-dont ul li::before{ display:none; }
.do-dont ul li{ padding-left:0; font-size:0.92rem; }

.session-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.session-card{
  border-radius: 12px;
  padding: 20px 22px;
  background: var(--surface-alt);
}
.session-card .flag{ font-size: 1.3rem; margin-bottom: 6px; }
.session-card .window{
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
  font-size: 1.05rem;
  margin-bottom: 10px;
}

blockquote.marathon{
  border-left: 3px solid var(--teal);
  padding-left: 18px;
  margin: 18px 0;
  font-style: italic;
  color: var(--ink);
}

/* ---------- footer ---------- */
footer{
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 36px 0;
  font-size: 0.88rem;
}
.footer-inner{
  display:flex;
  justify-content: space-between;
  align-items:center;
  flex-wrap: wrap;
  gap: 16px;
}
footer .brand{ color: var(--white); }

/* ---------- tracker page ---------- */
.kpi-row{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.kpi-card{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}
.kpi-card .kpi-label{
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  font-weight: 600;
}
.kpi-card .kpi-value{
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--navy);
  margin-top: 6px;
}
.kpi-value.win{ color: var(--win); }
.kpi-value.loss{ color: var(--loss); }

.region-switch{
  display:inline-flex;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 24px;
}
.region-switch button{
  border:none;
  background: transparent;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 9px 20px;
  border-radius: 100px;
  cursor:pointer;
  color: var(--ink-soft);
}
.region-switch button.active{
  background: var(--navy);
  color: var(--white);
}

.panel{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
}
.panel-head{
  display:flex;
  justify-content: space-between;
  align-items:center;
  margin-bottom: 18px;
  flex-wrap:wrap;
  gap: 12px;
}
.panel-head h2{ font-size: 1.15rem; }
.panel-scope{
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 100px;
}

/* Fixed-size chart container — Chart.js sizes to this box (height locked),
   which stops the canvas from growing on every redraw. */
.chart-box{
  position: relative;
  width: 100%;
  height: 320px;
}
.chart-box canvas{
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}
@media (max-width: 600px){
  .chart-box{ height: 240px; }
}

.year-switch{
  display:flex;
  gap: 6px;
}
.year-switch button{
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 7px 14px;
  border-radius: 8px;
  cursor:pointer;
}
.year-switch button.active{
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}

table.month-table{
  width:100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
table.month-table th{
  text-align:left;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  padding: 10px 14px;
  border-bottom: 1.5px solid var(--line);
}
table.month-table td{
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
table.month-table td.num{ font-family: var(--font-display); font-weight:600; }
table.month-table td.pos{ color: var(--win); }
table.month-table td.neg{ color: var(--loss); }
table.month-table tbody tr:hover{ background: var(--surface); }

.loading-row{ color: var(--ink-soft); padding: 40px; text-align:center; }

.result-pill{
  display:inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
}
.result-pill.win{ background: var(--win-bg); color: var(--win); }
.result-pill.loss{ background: var(--loss-bg); color: var(--loss); }
.result-pill.place{ background: var(--place-bg); color: var(--place); }

/* ---------- responsive ---------- */
@media (max-width: 900px){
  .kpi-row{ grid-template-columns: repeat(2,1fr); }
  .do-dont{ grid-template-columns: 1fr; }
  .session-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 600px){
  .topbar-inner{ height: 64px; }
  .brand img{ height: 30px; }
  .brand{ font-size: 1rem; }
  .brand .page-tag{ display:none; }
  .btn-subscribe{ padding: 9px 14px; font-size: 0.85rem; }
  section{ padding: 44px 0; }
  .hero{ padding: 48px 0 36px; }
  .hero-stats{ flex-wrap: wrap; gap: 20px; }
  .kpi-row{ grid-template-columns: 1fr 1fr; }
  .panel{ padding: 18px; }
  .info-card{ padding: 20px; }
  table.month-table{ font-size: 0.82rem; }
  table.month-table th, table.month-table td{ padding: 9px 8px; }
}

/* ================= ADDED: brand name, hero stride, year card ================= */

/* Brand name text beside the logo — teal to match the logo, sized to the logo height */
.brand .brand-name{
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--teal);
  font-size: 32px;          /* matches the 38px logo cap-height visually */
  line-height: 1;
  letter-spacing: 0.005em;
  white-space: nowrap;
}
.brand .brand-name-racing{ color: var(--ink); }
@media (max-width: 760px){
  .brand .brand-name{ font-size: 22px; }
}
@media (max-width: 460px){
  .brand .brand-name{ display:none; }   /* logo only on very small screens */
}

/* ---------- hero right column ---------- */
.hero-right{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:center;
  gap: 22px;
  min-width: 0;
}

/* Stride pattern repositioned to the right of the hero copy */
.hero-right .stride-mark{
  margin-top: 0;
  max-width: 100%;
  height: 70px;
  opacity: 0.9;
}

/* ---------- Year results card (swipeable / rotating) ---------- */
.year-card-wrap{
  position: relative;
  width: 100%;
  perspective: 1400px;     /* gives the rotate-around depth */
}
.year-card-stage{
  position: relative;
  width: 100%;
  height: 300px;
  transform-style: preserve-3d;
}
.year-card{
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 30px 32px;
  background: linear-gradient(155deg, var(--navy) 0%, #123A54 60%, var(--teal-dark) 165%);
  color: var(--white);
  box-shadow: 0 18px 44px rgba(14,42,62,0.28);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform, opacity;
  overflow: hidden;
}
.year-card:active{ cursor: grabbing; }
.year-card::after{
  /* subtle stride echo in the card background */
  content:"";
  position:absolute;
  right:-40px; bottom:-30px;
  width: 240px; height: 240px;
  background:
    radial-gradient(circle at center, rgba(79,179,174,0.20) 0%, transparent 68%);
  pointer-events:none;
}
.year-card .yc-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.year-card .yc-eyebrow{
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.62);
}
.year-card .yc-year{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3.4rem;
  line-height: 1;
  color: var(--white);
  margin-top: 4px;
}
.year-card .yc-pill{
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 100px;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.18);
}
.year-card .yc-metrics{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.year-card .yc-metric .yc-label{
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255,255,255,0.6);
  font-weight: 600;
  margin-bottom: 4px;
}
.year-card .yc-metric .yc-value{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.1rem;
  line-height: 1.05;
}
.year-card .yc-value.pos{ color: #7FE0B6; }
.year-card .yc-value.neg{ color: #FF9B9B; }
.year-card .yc-sub{
  display:flex;
  gap: 18px;
  margin-top: 14px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.66);
}
.year-card .yc-sub b{ color: var(--white); font-weight: 600; }

/* controls */
.year-card-controls{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-top: 16px;
}
.yc-dots{ display:flex; gap: 7px; }
.yc-dot{
  width: 8px; height: 8px;
  border-radius:50%;
  background: var(--line);
  border:none; padding:0;
  cursor:pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}
.yc-dot.active{ background: var(--teal); transform: scale(1.25); }
.yc-arrows{ display:flex; gap: 8px; }
.yc-arrow{
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy);
  cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.yc-arrow:hover{ background: var(--surface); border-color: var(--teal); }
.yc-hint{
  font-size: 0.74rem;
  color: var(--ink-soft);
  text-align:center;
  margin-top: 10px;
  letter-spacing: 0.02em;
}

@media (max-width: 980px){
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-right{ margin-top: 8px; }
  .year-card-stage{ height: 280px; }
}
@media (max-width: 600px){
  .year-card .yc-year{ font-size: 2.8rem; }
  .year-card .yc-value{ font-size: 1.7rem; }
  .year-card-stage{ height: 270px; }
}

/* ---------- tracker: filter bar (region + year) and table totals ---------- */
.filter-bar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap: 12px 18px;
  margin-bottom: 24px;
}
.filter-bar .region-switch{ margin-bottom: 0; }

/* year filter reuses the pill-switch look; wraps if many years */
.region-switch.year-filter{ flex-wrap: wrap; }
.region-switch.year-filter button.active{
  background: var(--teal);
  color: var(--white);
}

/* monthly breakdown totals row */
table.month-table tfoot .total-row td{
  border-top: 2px solid var(--line);
  border-bottom: none;
  padding-top: 14px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
  background: var(--surface);
}
table.month-table tfoot .total-row td:first-child{
  border-bottom-left-radius: 10px;
}
table.month-table tfoot .total-row td:last-child{
  border-bottom-right-radius: 10px;
}
table.month-table tfoot .total-row td.pos{ color: var(--win); }
table.month-table tfoot .total-row td.neg{ color: var(--loss); }

@media (max-width: 600px){
  .filter-bar{ gap: 10px; }
}

/* monthly breakdown header controls (its own region + year switch) */
.month-controls{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap: 10px 14px;
}
.region-switch.month-region{ margin-bottom: 0; }
.region-switch.month-region button{ padding: 7px 14px; font-size: 0.82rem; }
@media (max-width: 600px){
  .month-controls{ width: 100%; }
  .region-switch.month-region{ width: 100%; justify-content: space-between; }
}

/* ================= ADDED: FAQ nav button + tracker download box ================= */

/* Subtle FAQ link — plain text + icon, no box */
.btn-faq{
  display:flex;
  align-items:center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 6px;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s ease;
}
.btn-faq:hover{ color: var(--teal-dark); }
.btn-faq:focus-visible{ outline: 2px solid var(--navy); outline-offset: 2px; border-radius: 6px; }
.btn-faq .faq-ic{ color: var(--ink-soft); }
.btn-faq:hover .faq-ic{ color: var(--teal-dark); }

/* ---- tracker: downloadable Excel tracker box ---- */
.download-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 26px;
  background: var(--teal-pale);
  border: 1px solid var(--teal);
  border-radius: var(--radius);
  padding: 26px 30px;
  margin-top: 4px;
}
.download-card .dl-left{
  display:flex;
  align-items:center;
  gap: 18px;
}
.download-card .dl-icon{
  flex-shrink:0;
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid var(--teal);
  display:flex; align-items:center; justify-content:center;
  font-size: 1.5rem;
}
.download-card .dl-copy h3{
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--navy);
  margin: 0 0 4px;
}
.download-card .dl-copy p{
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
  max-width: 520px;
  line-height: 1.5;
}
.download-card .dl-btn{
  flex-shrink:0;
  display:inline-flex;
  align-items:center;
  gap: 9px;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 24px;
  border-radius: 100px;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
}
.download-card .dl-btn:hover{ background: #163C56; }
.download-card .dl-btn:active{ transform: scale(0.98); }
.download-card .dl-btn:focus-visible{ outline: 2px solid var(--teal-dark); outline-offset: 2px; }

@media (max-width: 700px){
  .download-card{ flex-direction: column; align-items: flex-start; gap: 18px; padding: 22px; }
  .download-card .dl-btn{ width: 100%; justify-content: center; }
}
@media (max-width: 600px){
  /* keep the nav tight on phones — FAQ shows just its icon */
  .btn-faq{ padding: 8px 4px; }
  .btn-faq .btn-faq-label{ display:none; }
}

/* ================= FAQ (Help Centre) page ================= */
.faq-layout{
  display:grid;
  grid-template-columns: 220px 1fr;
  gap: 30px;
  align-items: start;
}
.faq-side{
  position: sticky;
  top: 96px;
  background: var(--navy);
  border-radius: var(--radius);
  padding: 24px 20px;
}
.faq-side h2{
  font-family: var(--font-display);
  color: var(--white);
  font-size: 1.05rem;
  margin: 0 0 4px;
}
.faq-side .faq-side-tag{
  color: rgba(255,255,255,0.55);
  font-size: 0.78rem;
  margin: 0 0 16px;
}
.faq-side a{
  display:block;
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 9px 12px;
  border-radius: 8px;
  margin-bottom: 2px;
  transition: background 0.15s ease, color 0.15s ease;
}
.faq-side a:hover, .faq-side a.on{
  background: rgba(79,179,174,0.22);
  color: var(--white);
}

.faq-search{
  display:flex;
  align-items:center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 12px 18px;
  margin-bottom: 26px;
}
.faq-search svg{ color: var(--ink-soft); flex-shrink:0; }
.faq-search input{
  border:none; outline:none; background:none; width:100%;
  font-family: var(--font-body); font-size: 0.98rem; color: var(--ink);
}
.faq-search input::placeholder{ color: var(--ink-soft); }

.faq-section{ scroll-margin-top: 96px; }
.faq-section + .faq-section{ margin-top: 30px; }
.faq-sec-title{
  font-family: var(--font-display);
  color: var(--navy);
  font-size: 1.25rem;
  margin: 0 0 4px;
}
.faq-sec-sub{
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 0 0 10px;
}
.faq-item{ border-bottom: 1px solid var(--line); }
.faq-q{
  cursor:pointer; user-select:none;
  background:none; border:none; width:100%; text-align:left;
  font-family: var(--font-display);
  display:flex; align-items:center; justify-content:space-between; gap: 14px;
  padding: 16px 2px;
  font-weight: 600; font-size: 1rem; color: var(--navy);
}
.faq-a{ max-height:0; overflow:hidden; transition: max-height 0.3s ease; }
.faq-item.open .faq-a{ max-height: 420px; }
.faq-a p{
  color: var(--ink-soft); margin: 0; padding: 0 2px 18px;
  font-size: 0.95rem; line-height: 1.6;
}
.faq-icon{
  transition: transform 0.25s ease; flex-shrink:0;
  color: var(--teal-dark); font-size: 1.3rem; line-height: 1;
}
.faq-item.open .faq-icon{ transform: rotate(45deg); }
.faq-nomatch{ color: var(--ink-soft); font-size: 0.95rem; padding: 12px 2px; display:none; }

@media (max-width: 760px){
  .faq-layout{ grid-template-columns: 1fr; gap: 20px; }
  .faq-side{ position: static; padding: 18px 20px; }
  .faq-side-links{ display:flex; flex-wrap:wrap; gap: 8px; }
  .faq-side a{ margin: 0; background: rgba(255,255,255,0.08); }
  .faq-side a:hover, .faq-side a.on{ background: rgba(79,179,174,0.30); }
}

/* ================= DARK MODE ================= */
/* Toggle switch in the menu */
.menu-toggle{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  width:100%; background:none; border:none; cursor:pointer;
  padding:11px 12px; border-radius:10px;
  font-family:var(--font-body); font-weight:600; font-size:0.95rem; color:var(--ink);
  transition: background 0.12s ease;
}
.menu-toggle:hover{ background: var(--surface); }
.menu-toggle .mt-left{ display:flex; align-items:center; gap:12px; }
.menu-toggle .mt-left svg{ color: var(--ink-soft); flex-shrink:0; }
.mt-switch{
  position:relative; width:40px; height:22px; border-radius:100px;
  background: var(--line); transition: background 0.18s ease; flex-shrink:0;
}
.mt-knob{
  position:absolute; top:2px; left:2px; width:18px; height:18px; border-radius:50%;
  background:#fff; box-shadow:0 1px 2px rgba(0,0,0,0.25);
  transition: transform 0.18s ease;
}
[data-theme="dark"] .mt-switch{ background: var(--teal); }
[data-theme="dark"] .mt-knob{ transform: translateX(18px); }

/* Dark palette — flips the safe semantic tokens; color-named tokens patched below */
[data-theme="dark"]{
  --surface: #1E2E38;
  --surface-alt: #26363F;
  --ink: #E6EDF1;
  --ink-soft: #9DB0B9;
  --line: #2A3A44;
  --teal-pale: #143430;
  --win: #45D08C;
  --loss: #F2787B;
  --win-bg: #123024;
  --loss-bg: #35201F;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.30), 0 1px 1px rgba(0,0,0,0.24);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.40);
}

/* base surfaces (were pure white) */
[data-theme="dark"] body{ background:#0F1B23; }
[data-theme="dark"] .info-section{ background:#0F1B23; }
[data-theme="dark"] .info-card,
[data-theme="dark"] .kpi-card,
[data-theme="dark"] .panel,
[data-theme="dark"] .menu-panel{ background:#18272F; border-color:var(--line); }

/* top bar */
[data-theme="dark"] .topbar{ background:rgba(15,27,35,0.92); border-bottom-color:var(--line); }

/* headings & brand text that used navy/ink */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3{ color:#F1F6F7; }
[data-theme="dark"] .brand-name-racing,
[data-theme="dark"] .hero-stat .num,
[data-theme="dark"] .kpi-value,
[data-theme="dark"] .session-card .window,
[data-theme="dark"] .faq-sec-title,
[data-theme="dark"] .faq-q,
[data-theme="dark"] table.month-table tfoot .total-row td{ color:#F1F6F7; }
[data-theme="dark"] .eyebrow{ color:var(--teal); }

/* nav buttons/menu */
[data-theme="dark"] .btn-menu{ background:var(--surface); border-color:var(--line); color:var(--ink); }
[data-theme="dark"] .btn-menu:hover{ background:var(--surface-alt); }
[data-theme="dark"] .btn-faq{ color:var(--ink); }
[data-theme="dark"] .btn-faq .faq-ic{ color:var(--ink-soft); }
[data-theme="dark"] .menu-item{ color:var(--ink); }
[data-theme="dark"] .menu-item:hover{ background:var(--surface-alt); }
[data-theme="dark"] .menu-item.active{ color:var(--teal); }
[data-theme="dark"] .menu-item svg{ color:var(--ink-soft); }
[data-theme="dark"] .menu-divider{ background:var(--line); }
[data-theme="dark"] .menu-toggle{ color:var(--ink); }
[data-theme="dark"] .menu-toggle:hover{ background:var(--surface-alt); }

/* hero + buttons */
[data-theme="dark"] .hero{ background:radial-gradient(circle at 85% 20%, rgba(79,179,174,0.10) 0%, transparent 55%); }
[data-theme="dark"] .btn-ghost{ color:#F1F6F7; border-color:var(--line); }
[data-theme="dark"] .btn-ghost:hover{ border-color:var(--teal); }
[data-theme="dark"] .example-pill{ color:#DCE7E9; background:var(--surface-alt); border-color:var(--line); }

/* tracker */
[data-theme="dark"] .region-switch button.active{ background:var(--teal); color:#0F1B23; }
[data-theme="dark"] .panel-scope{ background:var(--surface); border-color:var(--line); }
/* monthly-breakdown year switch — its buttons hard-coded a white background, so they stayed white in dark mode */
[data-theme="dark"] .year-switch button{ background:var(--surface); border-color:var(--line); color:var(--ink-soft); }
[data-theme="dark"] .year-switch button.active{ background:var(--teal); border-color:var(--teal); color:#0F1B23; }

/* year card (homepage) — add a border so the navy card reads against the dark bg */
[data-theme="dark"] .year-card{ border:1px solid #2A3A44; }
[data-theme="dark"] .yc-arrow{ background:var(--surface); border-color:var(--line); color:#F1F6F7; }
[data-theme="dark"] .yc-arrow:hover{ background:var(--surface-alt); }
[data-theme="dark"] .yc-dot{ background:var(--line); }

/* FAQ */
[data-theme="dark"] .faq-icon{ color:var(--teal); }
[data-theme="dark"] .faq-search{ background:var(--surface); border-color:var(--line); }

/* download card icon tile */
[data-theme="dark"] .download-card .dl-icon{ background:var(--surface-alt); border-color:var(--teal); }
