/* Self-hosted Google Fonts - Optimized for performance */
/* Place this file at /static/fonts.css */

/* Roboto - Primary font */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/roboto-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/static/fonts/roboto-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/static/fonts/roboto-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}



/* Roboto Mono */
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/roboto-mono-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/static/fonts/roboto-mono-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/static/fonts/roboto-mono-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --page-width: 1600px;
  --space: 40px;
  --quarter-space: calc(var(--space) * 0.25);
  --half-space: calc(var(--space) * 0.5);
  --double-space: calc(var(--space) * 2);
  --triple-space: calc(var(--space) * 3);
  --xl-space: calc(var(--space) * 4);
  --facet-size: 50px;
}

@media screen and (max-width: 915px) {
    :root {
        --space: 16px;
        --facet-size: 25px;
    }
}

body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
}

body.mobile-menu-open {
  overflow: hidden;
  position: relative;
  height: 100vh;
  width: 100vw;
}

main {
    display: flex;
    flex-direction: column;
}

.color-scheme--darkest {
    --color-bg: #1B2941;
    --color-headings: #F2EADB;
    --color-body: #FFFFFF;
    --color-accent: #60949F;
    background-color: var(--color-bg);
}

.color-scheme--lightest {
    --color-bg: #FFFFFF;
    --color-headings: #1B2941;
    --color-body: #1B2941;
    --color-accent: #F2EADB;
    background-color: var(--color-bg);
}

.color-scheme--light {
    --color-bg: #F2EADB;
    --color-headings: #1B2941;
    --color-body: #1B2941;
    --color-accent: #60949F;
    background-color: var(--color-bg);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-headings);
    font-family: 'Roboto', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
   word-wrap: normal;
   margin: 0;
}

h1, .h1 {
    font-size: 32px;
}

@media screen and (max-width: 989px) {
    h1, .h1 {
        font-size: 24px;
    }
}

h2 {
    font-size: 22px;
}

.color-scheme--darkest h1 {
    color: white;
}



p {
    color: var(--color-body);
    margin: 0;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.4;
}

.primary-button {
    padding: 12px 24px;
    border: none;
    font-size: 18px;
  font-family: 'Roboto', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  word-wrap: normal;
  width: fit-content;
}

.primary-button {
    background: var(--color-headings);
    color: var(--color-bg);
    transition: 0.4s ease;
}

.primary-button:hover {
  background: var(--color-accent);
  color: var(--color-bg);
  transition: 0.4s ease;
}

.primary-button svg path {
  fill: var(--color-bg);
  transition: 0.4s ease;
}

.primary-button:hover svg path {
  fill: var(--color-bg);
  transition: 0.4s ease;
}

section.page-width {
    margin-left: var(--space);
  margin-right: var(--space);
  position: relative;
}

section.page-width.add-bottom-space {
  margin-bottom: var(--space);
}

section.page-width.add-top-space {
    margin-top: var(--space);
}

section > .content-wrapper {
  max-width: var(--page-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space);
  padding-right: var(--space);
  position: relative;
  z-index: 1;
}


.add-facets::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: var(--facet-size);
  height: var(--facet-size);
  background: linear-gradient(135deg, white 50%, transparent 50%);
  z-index: 2;
}

.add-facets::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: var(--facet-size);
  height: var(--facet-size);
  background: linear-gradient(135deg, transparent 50%, white 50%);
  z-index: 2;
}

.content-wrapper {
    display: flex;
  flex-direction: column;
  gap: var(--space);
}

.content-wrapper.medium-height {
  min-height: 500px;
  padding: var(--space)
}

@media screen and (max-width: 915px) {
    .content-wrapper.medium-height {
        min-height: 400px;
        padding-top: var(--triple-space);
  padding-bottom: var(--triple-space);
    }
}

.content-position--center-center {
  justify-content: center;
  align-items: center;
}

.content-position--center-center * {
    text-align: center;
}

.background-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  background-color:var(--color-bg);
}

.background-image img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transform: translate(-50%, -50%);
}

.background-image.overlay img {
  opacity: 0.55;
}

.relative {
  position: relative;
}


/**********************************************
*
* Multicolumn Section
*
**********************************************/
.content-multicolumn {
    padding: var(--space);
    display: flex;
    gap:var(--space);
    align-items: center;
}


/* Custom styles for multicolumn variations */
.content-multicolumn .c-allchalk-benefits {
    max-width: 123px;
}

.multicolumn-items {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: var(--half-space);
    flex-grow: 1;
    width: 100%;
}

@media screen and (max-width: 915px) {
    .content-multicolumn {
        flex-direction: column;
        align-items: center;
    }

    .multicolumn-items {
        grid-template-columns: 1fr;
    }
}

.multicol-item {
        display: flex;
    flex-direction: column;
    height: 100%;
    flex-grow: 1;
}

.multicol-item-content {
    background-color: var(--color-accent);
    margin-top: -2px;
    margin-bottom: -2px;
    padding: var(--half-space) var(--space);
    gap: var(--half-space);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

@media screen and (max-width: 915px) {
    .multicol-item-content {
        padding-bottom: var(--space);
        padding-top: var(--space);
    }
}

.multicol-item-content > img {
    /* All four benefit icons share this SVG viewBox; reserve their space before download. */
    aspect-ratio: 39.33 / 45.4;
    width: 42px;
    height: auto;
    max-width: 42px;
    margin: 0 auto;
}

.multicol-item-content * {
    text-align: center;
}

.multicol-item > img {
    width: 100%;
    height: auto;
}

@media screen and (max-width: 915px) {
    .content-multicolumn .c-allchalk-benefits {
        max-width: 227px;
        text-align: center;
        margin: 0 auto;
        width: 100%;
    } 
}

/**********************************************
*
* Split Content Section
*
**********************************************/
section .split-content {
    display: grid;
}

@media screen and (min-width: 750px) {
    section .split-content {
        grid-template-columns: 1fr 1fr;
    }
}

section .split-content .content-wrapper {
    padding: var(--triple-space) var(--space);
    max-width: 636px;
    margin: 0 auto;
}

.icon-with-text-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
}

.icon-with-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
      gap: var(--half-space);
    padding-top: var(--half-space);
    padding-bottom: var(--half-space);
    max-width: 175px;
    margin: 0 auto;
}

section .split-content .c-max-width-340 {
max-width: 340px;
}

@media screen and (max-width: 915px) {
    section .split-content .split-content--image {
        order: -1;
        min-height: 20rem;;
    }

    section .split-content .content-wrapper {
        padding: var(--triple-space) var(--double-space);
    }

    .icon-with-text-columns {
        grid-template-columns: 1fr;
        gap: var(--space);
        max-width: 175px;
        padding-top: var(--space);
        padding-bottom: var(--space);
    }
}

/**********************************************
*
* Main Navigation Styles
*
**********************************************/
.main-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-content: space-between;
  padding: 30px var(--space);
  background: var(--color-bg, #fff);
  position: sticky;
  top: 0;
  z-index: 100; /* Lower than overlay */
}

.main-nav.gradient-nav {
  background: linear-gradient(90deg, #8EADB6 -17.18%, #EFE8DA 51.83%, #8EADB6 113.31%);
  box-shadow: 0 5px 35px 0 rgba(27, 41, 65, 0.25);
}
.nav-section {
  display: flex;
  align-items: center;
}
.nav-link,
.mobile-menu .nav-link {
  margin-right: var(--half-space);
  color: var(--color-headings, #222);
  text-decoration: none;
  font-family: 'Roboto', sans-serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  text-transform: uppercase
}

.nav-left .nav-link:last-child {
  margin-right: 0;
}
.nav-link:hover {
  /* Remove color change on hover */
  color: var(--color-headings, #222);
}
.nav-logo img {
  display: block;
  height: 40px;
  width: auto;
  aspect-ratio: 236 / 46;
}
.nav-right {
  gap: var(--half-space);
  justify-content: flex-end;
  display: flex;
  align-items: center;
}
.nav-right .nav-link, .mobile-nav-actions .nav-link {
  font-family: 'Roboto Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  font-size: 16px;
  margin-right: 12px;
}

.mobile-nav-actions .mobile-socials {
    display: flex;
    gap: var(--space);
    width: 100%;
}

.mobile-nav-actions {
    display: flex;
    row-gap: var(--triple-space);
    flex-wrap: wrap;
    margin-top: var(--double-space);
    column-gap: var(--space);
}

.nav-right .nav-link:last-child {
  margin-right: 0;
}
.nav-social img {
  display: block;
  height: 18px;
  width: 18px;
}
.nav-socials-flex {
  display: flex;
  gap: 16px;
  align-items: center;
}
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: var(--half-space);
}
.hamburger span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--color-headings, #222);
  margin: 3px 0;
  border-radius: 2px;
  transition: 0.3s;
}
.mobile-menu {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: calc(100% - var(--double-space)); /* Full width */
  max-width: none; /* Remove max-width */
  background: var(--color-bg, #fff);
  box-shadow: 2px 0 16px rgba(0,0,0,0.12);
  padding: var(--double-space) var(--double-space) var(--double-space) var(--double-space);
  z-index: 2000; /* Ensure mobile menu overlays hamburger icon */
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}

/* Remove overlay */
body.mobile-menu-open::after {
  display: none !important;
}

/* Close button styles */
.mobile-menu .close-mobile-menu {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  font-size: 2.5rem;
  color: var(--color-headings, #222);
  cursor: pointer;
  z-index: 1101;
  line-height: 1;
  padding: 0;
}

@media (max-width: 915px) {
  .mobile-menu {
    width: auto;
    max-width: none;
    left: 0;
    right: 0;
  }
}

.mobile-nav-links {
    display: grid;
    gap: var(--half-space);
    margin-bottom: var(--space);
}

 .mobile-nav-links .nav-link {
    font-size: 200%;
 }

.mobile-menu.open {
  transform: translateX(0);
}

/* Overlay for mobile menu (optional, for dimming background) */
body.mobile-menu-open::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.3);
  z-index: 9999; /* Overlay above nav bar */
}

.nav-left .nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-left .button-arrows {
  width: 11px;
  height: 13px;
  margin-left: 2px;
  vertical-align: middle;
}

.nav-left .button-arrows path {
  fill: var(--color-headings, #222);
  transition: fill 0.4s;
}

.nav-left .nav-link:hover .button-arrows path {
  fill: var(--color-headings, #222);
}

.nav-left .button-arrows {
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-left .nav-link:hover .button-arrows,
.nav-left .nav-link:focus .button-arrows {
  opacity: 1;
}

.nav-left .nav-link.active .button-arrows {
  opacity: 1;
}

@media (max-width: 900px) {
  .main-nav {
    padding: 0 var(--half-space);
  }
  .nav-left, .nav-right {
    flex: 1;
  }
  .nav-center {
    flex: 0 0 auto;
    justify-content: center;
    display: flex;
  }
}
@media (max-width: 915px) {
  .main-nav {
    height: 56px;
  }
  .nav-left, .nav-right {
    display: none;
  }
  .nav-center {
    flex: 1;
    justify-content: center;
  }
  .nav-logo img {
    max-width: 165px;
    height: auto;
  }
  .hamburger {
    display: flex;
    position: absolute;
    right: var(--half-space);
    top: 8px;
    z-index: 1000; /* Lower than .mobile-menu */
  }
  .mobile-menu {
    display: flex;
  }
}

/* The desktop nav is a 1fr auto 1fr grid, so each side gets (viewport - padding - logo) / 2. Between the
   hamburger breakpoint and ~1150px that share is too small for the full link set and "Stakes Races" wraps
   onto a second line. Tighten type and spacing across that band -- the arrows are invisible until hover
   anyway, so dropping them there buys back the width the Pricing link needs. */
@media (min-width: 916px) and (max-width: 1150px) {
  .main-nav {
    padding-left: var(--half-space);
    padding-right: var(--half-space);
  }
  .nav-left .nav-link,
  .nav-right .nav-link {
    font-size: 15px;
    margin-right: 14px;
  }
  .nav-left .button-arrows {
    display: none;
  }
  .nav-right {
    gap: 10px;
  }
  .nav-socials-flex {
    gap: 10px;
  }
}

/* At the very bottom of the desktop range even that is not enough and the logo's "AI" collides with the
   first right-hand link. The social icons are the one nav item duplicated in both the footer and the
   mobile menu, so they are what gets dropped. */
@media (min-width: 916px) and (max-width: 1080px) {
  .nav-right .nav-socials-flex {
    display: none;
  }
}

/* Never let a nav item wrap mid-label; the grid columns shrink before the labels do. */
.nav-link {
  white-space: nowrap;
}

/* Pricing Table Styles */
.pricing-container {
    display: flex;
    /* Four tiers (free / daily / monthly / yearly) plus three dividers need 1289px of wrapper at full tile
       width, which is why the gap is half-space and why the column breakpoint below is 1280px rather than
       915px -- at --space they would not reach full size until a ~1570px viewport. */
    gap: var(--half-space);
    justify-content: center;
    align-items: stretch;
}

.pricing-container .price-info {
    /* Equal widths that shrink together rather than overflowing between the 915px column breakpoint and ~1100px. */
    flex: 1 1 0;
    max-width: 250px;
    min-width: 0;
    padding: var(--half-space);
    display: flex;
    flex-direction: column;
    gap: var(--quarter-space);
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    align-items: center;
    text-align: center;
}

.gradient-divider-line {
    display: flex;
    align-items: center;
    justify-content: center;
}
.gradient-divider-line span {
    width: 3px;
    min-width: 3px;
    height: 100%;
    min-height: 80px;
    display: block;
    background: linear-gradient(0deg, rgba(242, 234, 219, 0) 6%, #F2EADB 50%, rgba(242, 234, 219, 0) 94%);
}

/* Below this the four tiles would squeeze past the point where "$149.99/year" fits its heading on one
   line, so stack instead. At 1281px each tile still gets 248px, just under its 250px cap. */
@media (max-width: 1280px) {
  .pricing-container {
    flex-direction: column;
    gap: var(--space);
    align-items: center;
  }
  .gradient-divider-line {
    width: 100%;
    justify-content: center;
    margin: 16px 0;
  }
  .gradient-divider-line span {
    width: 80px;
    min-width: 80px;
    height: 3px;
    min-height: 3px;
    background: linear-gradient(90deg, rgba(242, 234, 219, 0) 6%, #F2EADB 50%, rgba(242, 234, 219, 0) 94%);
  }
  .pricing-container .price-info {
    /* Column layout: the flex basis above would apply to height here, so hand sizing back to the content. */
    flex: 0 1 auto;
    max-width: 100%;
    width: 100%;
    min-width: 0;
    padding: var(--half-space) 0;
    border-radius: 10px;
  }
}

.background-image.overlay.pricing-section img {
    opacity: 0.25;
}

/**********************************************
*
* App Layout Styles (Interesting Horses, etc.)
*
**********************************************/

h5 {
    font-size: 16px;
    letter-spacing: 0.04em;
    color: var(--color-body);
    align-self: center;
}

h6 {
    font-size: 14px;
    letter-spacing: 0.04em;
    color: var(--color-body);
    text-transform: uppercase;
    font-style: italic;
    font-weight: 500;
}

hr {
    height: 3px;
    min-height: 3px;
    border: none;
    padding: 0;
    margin: 0;
    display: block;
    width: 100%;
    flex-shrink: 0;
}

.color-scheme--darkest hr {
    background: linear-gradient(90deg, rgba(27, 41, 65, 0.20) 0%, rgba(242, 234, 219, 0.20) 48.56%, rgba(27, 41, 65, 0.20) 100%);
}

button {
    border: none;
    background-color: rgba(0,0,0,0);
}

.text-medium {
    font-weight: 500;
}

/* Time badges */
.time-badge {
    padding: 6px 10px;
    border-radius: 50px;
    width: fit-content;
}

.time-badge p {
    line-height: 1;
}

[data-color*="Green"] {
    background: rgba(26,213,152,0.15);
}

[data-color*="Green"] p {
    color: #0EBD84;
}

[data-color*="Yellow"] {
    background: rgba(250,202,74,0.15);
}

[data-color*="Yellow"] p {
    color: #FACA4A;
}

[data-color*="Red"] {
    background: rgba(244,9,56,0.15);
}

[data-color*="Red"] p {
    color: #F40938;
}

[data-color*="Gray"] {
    background: rgba(128,128,128,0.15);
}

[data-color*="Gray"] p {
    color: #888888;
}

/* App Main Layout */
@media screen and (min-width: 990px) {
    main#app-main {
        display: grid;
        grid-template-columns: 350px 1fr;
    }

    main#app-main.race-details {
        grid-template-columns: 1fr;
    }
}

/* Sidebar */
main#app-main .app-sidebar {
    height: 100%;
    max-height: 100vh;
    position: sticky;
    top: 0;
    padding: calc(var(--half-space) + var(--quarter-space));
    display: flex;
    flex-direction: column;
    gap: calc(var(--half-space) + var(--quarter-space));
    overflow-y: auto;
    border-right: 5px solid #fafafa;
}

@media screen and (max-width: 989px) {
    main#app-main .app-sidebar {
        display: none;
    }
}

main#app-main .app-sidebar .sidebar--date-time {
    display: flex;
    justify-content: space-between;
    gap: var(--space);
    color: var(--color-headings);
}

.sidebar--date-time span {
    font-family: 'Roboto Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
    font-size: 16px;
    color: var(--color-headings);
}

.sidebar--items-group, .sidebar--item.has-children .sidebar--item-children {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar--item.has-children .sidebar--item-children {
    padding: 0 var(--half-space);
    padding-bottom: var(--half-space);
}

.sidebar--item.has-children:not([open]) .sidebar--item-children {
    max-height: 0%;
    transition: 0.4s ease;
    overflow: hidden;
}

.sidebar--item.has-children .accordion-icon img {
    transition: 0.4s ease;
    transform: rotate(180deg);
}

.sidebar--item.has-children[open] .accordion-icon img {
    transition: 0.4s ease;
    transform: rotate(0deg);
}

.sidebar--item {
    background: rgba(242, 234, 219, 0.10);
    position: relative;
    transition: 0.5s ease;
    border: none;
    width: 100%;
    text-decoration: none;
    display: block;
}

.sidebar--item-children .sidebar--item {
    background: rgba(242, 234, 219, 0.0);
}

.sidebar--item .sidebar--item-label h5 {
    flex-grow: 1;
    text-align: left;
}

.sidebar--item-children .sidebar--item .sidebar--item-label {
    padding: var(--quarter-space) 15px;
    padding-right: 0;
}

.sidebar--item-children .sidebar--item:after {
    display: none;
}

.sidebar--item.has-children .sidebar--item-parent {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 15px;
    cursor: pointer;
}

.sidebar--item:not(.has-children):hover, .sidebar--item-children .sidebar--item:hover {
    background: rgba(242, 234, 219, 0.15);
    transition: 0.5s ease;
}

.sidebar--item::after {
    content: '';
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, rgba(27, 41, 65, 0.00) 50%, var(--color-bg) 50%);
    position: absolute;
    top: 100%;
    left: 100%;
    transform: translate(-100%, -100%);
}

.sidebar--item-label {
    display: flex;
    gap: var(--quarter-space);
    padding: var(--half-space) 15px;
    row-gap: calc(0.5 * var(--quarter-space));
    align-items: center;
}

.sidebar--item-icon {
    width: 19px;
    height: 22px;
}

.sidebar--item-icon img {
    width: 100%;
    height: 100%;
}

.sidebar--item.sidebar--upcoming-race .sidebar--item-label {
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 15px;
}

.sidebar--item.sidebar--upcoming-race .sidebar--item-label * {
    text-align: left;
}

/* Main Content Area */
main#app-main .app-content {
    padding: var(--space);
    display: flex;
    flex-direction: column;
    gap: calc(2 * var(--space));
    border-left: 1px solid #ededed;
}

#app-main .app-content section.app--heading {
    display: flex;
    flex-direction: column;
    gap: var(--half-space);
}

#app-main .app-content section.app--heading h1 {
    display: flex;
    align-items: center;
    gap: var(--half-space);
}

#app-main .app-content section.app--heading .heading-icon {
    height: 1.5em;
    width: auto;
    vertical-align: middle;
}

#app-main .heading-icon[src$="/shield-icon-trophy.svg"] {
    aspect-ratio: 43 / 50;
}

.accordion-arrow[src$="/double-arrows-teal.svg"] {
    width: auto;
    aspect-ratio: 11 / 10;
}

/* Tables */
.app--table .entry-column-header {
    background-color: var(--color-accent);
    border-bottom: 1px solid;
    padding: var(--quarter-space);
    text-align: left;
    display: flex;
    align-items: center;
    height: 70px;
}

/* Hide inline labels (h6) - same layout on mobile and desktop */
.app--table h6 {
    display: none;
}

.app--table > button {
    border-bottom: 1px solid #809FB8;
}

/* Horse number colors */
[data-number="1"] {
    background: #E53935;
    color: white;
    align-items: center;
}

[data-number="2"] {
    background: #F5F5F5;
    color: black;
    align-items: center;
}

[data-number="3"] {
    background: #1E88E5;
    color: white;
    align-items: center;
}

[data-number="4"] {
    background: #FDD835;
    color: black;
    align-items: center;
}

[data-number="5"] {
    background: #43A047;
    color: white;
    align-items: center;
}

[data-number="6"] {
    background: #212121;
    color: white;
    align-items: center;
}

[data-number="7"] {
    background: #FF9800;
    color: white;
    align-items: center;
}

[data-number="8"] {
    background: #F48FB1;
    color: black;
    align-items: center;
}

[data-number="9"] {
    background: #26C6DA;
    color: black;
    align-items: center;
}

[data-number="10"] {
    background: #7E57C2;
    color: white;
    align-items: center;
}

[data-number="11"] {
    background: #8D6E63;
    color: white;
    align-items: center;
}

[data-number="12"] {
    background: #66BB6A;
    color: white;
    align-items: center;
}

/* Filters */
.filter {
    margin-bottom: var(--space);
}

.filter label[for="track-filter"] {
    display: none;
}

.filter select {
    border: none;
    min-width: 200px;
    border-bottom: 1px solid;
    padding: var(--quarter-space) 0;
    color: var(--color-body);
    font-family: 'Roboto';
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: var(--half-space);
    background: transparent;
    cursor: pointer;
}

.filter__tags {
    list-style: none;
    display: flex;
    gap: var(--half-space);
    padding: 0;
    margin: 0;
}

.filter__tags li {
    padding: var(--quarter-space) var(--half-space);
    padding-right: calc(var(--half-space) + 20px);
    background-color: #F2EADB;
    position: relative;
    color: #1B2941;
    font-family: 'Roboto';
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

button.filter__tag-remove {
    width: 13px;
    height: 13px;
    background: #DCC9A5;
    position: absolute;
    top: 0;
    right: 0;
    line-height: 1.1;
    color: #FFFCF7;
    border: none;
    cursor: pointer;
    font-size: 12px;
}

@media screen and (max-width: 989px) {
    .filter__tags {
        flex-wrap: nowrap;
        overflow-x: scroll;
        padding-bottom: var(--quarter-space);
        gap: var(--half-space);
    }

    .filter__tags li {
        padding-right: calc(1.5 * var(--space));
        white-space: nowrap;
    }

    button.filter__tag-remove {
        width: 16px;
        height: 16px;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--half-space) 0;
    gap: var(--half-space);
}

.pagination ul.pagination-numbers {
    list-style: none;
    display: flex;
    gap: var(--quarter-space);
    padding: 0;
    margin: 0;
}

.pagination ul.pagination-numbers li .pagination-button.active,
.pagination ul.pagination-numbers li .pagination-button:hover {
    background-color: var(--color-accent);
    transition: 0.4s ease;
}

.pagination ul.pagination-numbers li .pagination-button {
    padding: 5px 10px;
    border-radius: 8px;
    transition: 0.4s ease;
    font-weight: 500;
    font-family: 'Roboto';
    font-size: 14px;
    cursor: pointer;
}

.pagination .pagination-button {
    cursor: pointer;
    padding: 5px;
    border: none;
    background: transparent;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination .pagination-button:hover {
    background-color: rgba(96, 148, 159, 0.15);
}

.pagination .pagination-button svg {
    width: 16px;
    height: 16px;
}

.pagination .pagination-button svg path {
    stroke: #1B2941;
}

/* Interesting Horses Table & Today's Races Table */
/* Interesting Horses Table - columns: Race, Proj Winner, ML, MTP */
.app--table.app--table-interesting-horses .row--interesting-horses {
    grid-template-columns: 1fr 1fr 60px 1fr;
    display: grid;
}

/* Today's Races Table - columns: Race, Proj Winner, ML, MTP */
.app--table.app--table-todays-races .row--todays-races {
    grid-template-columns: 1fr 1fr 60px 1fr;
    display: grid;
}

/* Blowouts Table - 4 columns: Race, Projected Winner, Lengths, MTP (no ML) */
.app--table.app--table-blowouts .row--blowouts {
    grid-template-columns: 1fr 1.2fr 140px 140px;
    display: grid;
}

@media screen and (max-width: 989px) {
    .app--table.app--table-blowouts .row--blowouts {
        grid-template-columns: 1fr 1.2fr 100px 100px;
    }
}

.app--table.app--table-blowouts button.row--blowouts {
    width: 100%;
    transition: 0.4s ease;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid rgba(27, 41, 65, 0.1);
}

.app--table.app--table-blowouts button.row--blowouts:hover {
    background-color: rgba(96, 148, 159, 0.075);
    transition: 0.4s ease;
    cursor: pointer;
}

.row--blowouts.row--header {
    border-bottom: 2px solid rgba(27, 41, 65, 0.15);
}

.row--blowouts .entry-lengths .lengths-value {
    font-weight: 600;
    font-size: 18px;
    color: #60949F;
}

/* Blowouts table mobile alignment fixes */
@media screen and (max-width: 989px) {
    /* Lengths column - center aligned */
    .row--blowouts .entry-lengths {
        justify-content: center;
    }

    /* MTP column - center aligned */
    .row--blowouts .entry-mtp {
        justify-content: center;
    }
}

/* MTP column - center aligned for todays-races tables (header and cells) */
.app--table.app--table-todays-races .row--todays-races .entry-mtp,
.app--table.app--table-todays-races .row--header .entry-column-header:nth-child(4) {
    justify-content: center;
    text-align: center;
}

/* General center-align utility class for table columns */
.center-align {
    justify-content: center;
    text-align: center;
}

/* Reduce header height for todays-races tables */
.app--table.app--table-todays-races .row--header .entry-column-header {
    height: 38px;
}

.app--table.app--table-interesting-horses button.row--interesting-horses,
.app--table.app--table-todays-races button.row--todays-races,
.app--table.app--table-todays-races a.row--todays-races {
    width: 100%;
    transition: 0.4s ease;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid rgba(27, 41, 65, 0.1);
}

.app--table.app--table-interesting-horses button.row--interesting-horses:hover,
.app--table.app--table-todays-races button.row--todays-races:hover,
.app--table.app--table-todays-races a.row--todays-races:hover {
    background-color: rgba(96, 148, 159, 0.075);
    transition: 0.4s ease;
    cursor: pointer;
}

.app--table .entry {
    height: 70px;
    display: flex;
    align-items: center;
    padding-left: var(--quarter-space);
    padding-right: var(--quarter-space);
    gap: 6px;
}

/* Mobile: smaller header and cell heights, smaller text */
@media screen and (max-width: 989px) {
    .app--table .entry-column-header {
        height: 50px;
    }

    .app--table .entry-column-header h5 {
        font-size: 14px;
    }

    .app--table .entry {
        height: 55px;
    }

    .app--table .entry h5 {
        font-size: 14px;
    }

    .app--table .entry p,
    .app--table .entry .text-medium {
        font-size: 14px;
    }
}

.app--table .entry.entry-track-race {
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    align-content: flex-start;
    gap: 5px;
}

.app--table .entry.entry-track-race h5 {
    align-self: flex-start;
    text-align: left;
}

@media screen and (min-width: 900px) {
    .app--table .entry.entry-ml h6,
    .app--table .entry.entry-projected-winner h6 {
        display: none;
    }
}

.app--table .entry.entry-ml > p {
    flex-grow: 1;
    text-align: left;
}

p.entry-number {
    width: 22px;
    min-width: 22px;
    text-align: center;
    height: 22px;
    min-height: 22px;
    line-height: 1.5;
    font-size: 14px;
    font-weight: 500;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Sortable table headers */
.entry-column-header.sortable {
    cursor: pointer;
    user-select: none;
}

.entry-column-header.sortable:hover {
    opacity: 0.8;
}

.entry-column-header.sortable h5 {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sort-indicator {
    font-size: 10px;
    opacity: 0.7;
}

/* Don't apply button styles to header row */
.row--interesting-horses.row--header {
    cursor: default;
}

.entry-badges {
    display: flex;
    gap: 6px;
    margin-left: 8px;
}

.entry-badges img {
    height: 34px;
    width: auto;
}

/* Badge tooltip styles */
.badge-tooltip {
    position: relative;
    display: inline-flex;
    cursor: pointer;
}

.badge-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1B2941;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease-out, visibility 0.15s;
    transition-delay: 0.15s;
    z-index: 1000;
    pointer-events: none;
    margin-bottom: 6px;
}

.badge-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1B2941;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease-out, visibility 0.15s;
    transition-delay: 0.15s;
    z-index: 1000;
    pointer-events: none;
}

.badge-tooltip:hover::after,
.badge-tooltip:hover::before {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

/* ============================================ */
/* Race Details Page Styles                     */
/* ============================================ */

/* Race page heading subheading (Race # + time badge inline) */
.app--race-subheading {
    display: flex;
    gap: var(--half-space);
    align-items: center;
}

.app--race-subheading * {
    align-self: center;
}

.app--race-subheading h4 {
    font-style: italic;
    margin: 0;
}

/* Projected winner callout */
.race-details--projected-winner, .race-details--projected-winner > span {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.race-details--projected-winner {
    margin-bottom: var(--half-space);
    padding: var(--half-space);
    background-color: rgba(96, 148, 159, 0.1);
    border-radius: 8px;
}

/* Race details table - uses shared .app--table styles with 3-column grid */
/* ML column is fixed width (5 chars max), other columns share remaining space */
.app--table.app--table-race-details .row--race-details {
    grid-template-columns: 1fr 1fr 60px;
    display: grid;
}

@media screen and (max-width: 989px) {
    .app--table.app--table-race-details .row--race-details {
        grid-template-columns: 1fr 70px 50px;
    }
}

/* Row styling - same pattern as todays-races and interesting-horses */
.app--table.app--table-race-details a.row--race-details {
    width: 100%;
    transition: 0.4s ease;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid rgba(27, 41, 65, 0.1);
}

.app--table.app--table-race-details a.row--race-details:hover {
    background-color: rgba(96, 148, 159, 0.075);
    transition: 0.4s ease;
    cursor: pointer;
}

/* Header row - don't apply hover styles */
.row--race-details.row--header {
    cursor: default;
}

/* ML column with badges - space between content and badges */
.row--race-details .entry-ml {
    justify-content: space-between;
}

/* Race navigation */
.race-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--quarter-space);
    margin-bottom: var(--half-space);
    align-items: center;
}

.race-nav .race-buttons {
    display: flex;
    gap: 4px;
}

.race-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 4px;
    text-decoration: none;
    color: var(--color-body);
    background-color: rgba(0, 0, 0, 0.05);
    font-size: 14px;
    transition: all 0.2s;
}

.race-nav a:hover {
    background-color: rgba(96, 148, 159, 0.2);
}

.race-nav a.active {
    background-color: #60949F;
    color: white;
    font-weight: 600;
}

.race-nav .next-race-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

.race-nav .separator {
    color: rgba(0, 0, 0, 0.3);
}

.race-nav .next-race {
    font-weight: 600;
    color: #60949F;
}

@media screen and (max-width: 989px) {
    .race-nav {
        flex-wrap: wrap;
    }

    .race-nav .race-buttons {
        flex-wrap: wrap;
    }

    /* Hide ML column on track page tables (3rd column after swap) */
    .app--table.app--table-todays-races .row--todays-races {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .app--table.app--table-todays-races .row--todays-races > div:nth-child(3) {
        display: none;
    }

    /* Hide ML column on interesting horses tables (3rd column after swap) */
    .app--table.app--table-interesting-horses .row--interesting-horses {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .app--table.app--table-interesting-horses .row--interesting-horses > div:nth-child(3) {
        display: none;
    }
}

/* Results available banner */
.results-available-banner {
    background-color: #dce1ee;
    border-left: 4px solid #5e6da0;
    padding: var(--quarter-space) var(--half-space);
    margin-bottom: var(--half-space);
    border-radius: 4px;
}

.results-available-banner a {
    color: #5e6da0;
    font-weight: 600;
    text-decoration: none;
}

.results-available-banner a:hover {
    text-decoration: underline;
}

/* Last updated timestamp */
.race-details-content .last-updated {
    text-align: center;
    color: var(--color-body);
    opacity: 0.6;
    font-size: 12px;
    margin-top: var(--half-space);
    padding-top: var(--half-space);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* Entries section */
.entries-section {
    margin-top: var(--space);
    padding: var(--half-space);
    background-color: rgba(242, 234, 219, 0.3);
    border-radius: 8px;
}

.entries-section h2 {
    margin: 0 0 var(--half-space) 0;
    font-size: 18px;
}

.entries-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--quarter-space);
}

.entries-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
}

.entries-list .horse-link {
    color: var(--color-body);
    text-decoration: none;
}

.entries-list .horse-link:hover {
    text-decoration: underline;
}

/* Paywall section */
.paywall-section {
    padding: var(--space);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    text-align: center;
    margin: var(--half-space) 0;
}

.paywall-section h2 {
    color: white;
    font-size: 24px;
    margin-bottom: var(--quarter-space);
}

.paywall-section p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 16px;
    margin-bottom: var(--half-space);
}

.paywall-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.paywall-section .btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 16px;
    transition: transform 0.2s;
}

.paywall-section .btn-primary {
    background-color: #4CAF50;
    color: white;
}

.paywall-section .btn-secondary {
    background-color: white;
    color: #667eea;
}

.paywall-section .btn:hover {
    transform: translateY(-2px);
}


/* =====================================================
   MOBILE MENU WITH SIDEBAR CONTENT (Hamburger Menu)
   ===================================================== */

/* Dark theme mobile menu with sidebar content */
.mobile-menu.mobile-menu-with-sidebar {
    background: var(--color-bg-dark, #1B2941) !important;
    display: block !important; /* Not flex - let everything scroll together */
    padding: 0 !important; /* Remove padding, header will handle its own */
    overflow-y: auto !important;
    height: 100vh; /* Fallback */
    height: 100dvh; /* Use dynamic viewport height for mobile browsers */
}

/* Header with nav links at top of mobile menu - tan/brown like landing page */
.mobile-menu-header {
    display: flex !important;
    align-items: center;
    gap: 24px;
    padding: 14px 20px;
    padding-right: 50px; /* Space for close button */
    background: #F2EADB !important;
}

.mobile-menu-header .nav-link {
    display: inline-block !important;
    color: #1B2941 !important;
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    padding: 6px 0;
    white-space: nowrap;
    margin-right: 0 !important;
}

.mobile-menu-header .nav-link:hover {
    color: #60949F !important;
}

/* Close button styling for sidebar mobile menu - sits on tan header */
.mobile-menu.mobile-menu-with-sidebar .close-mobile-menu {
    color: #1B2941 !important;
    top: 10px;
    right: 12px;
}

/* Footer with socials at bottom of sidebar mobile menu */
.mobile-menu.mobile-menu-with-sidebar .mobile-menu-footer {
    padding: 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); /* Account for iOS safe area */
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: 16px;
    margin-bottom: 20px; /* Extra margin to ensure visibility */
}

.mobile-menu.mobile-menu-with-sidebar .mobile-menu-footer .mobile-socials {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.mobile-menu.mobile-menu-with-sidebar .mobile-menu-footer .nav-social img {
    height: 24px;
    opacity: 0.8;
    filter: brightness(0) invert(0.9);
}

.mobile-menu.mobile-menu-with-sidebar .mobile-menu-footer .nav-social:hover img {
    opacity: 1;
}

.mobile-menu-sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
}

/* Hide bottom bar when mobile menu is open */
body.mobile-menu-open .mobile-bottom-bar {
    display: none !important;
}

/* Mobile sidebar accordion items */
.mobile-sidebar-item {
    border: none;
    background: rgba(242, 234, 219, 0.08);
}

.mobile-sidebar-item.has-children {
    border-radius: 0;
}

.mobile-sidebar-parent {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--half-space) 15px;
    cursor: pointer;
    list-style: none;
}

.mobile-sidebar-parent::-webkit-details-marker {
    display: none;
}

.mobile-sidebar-label {
    display: flex;
    align-items: center;
    gap: var(--quarter-space);
}

.mobile-sidebar-label img {
    width: 22px;
    height: 22px;
}

.mobile-sidebar-label span,
.mobile-sidebar-parent span {
    color: var(--color-headings-light, #F2EADB);
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.mobile-sidebar-parent .accordion-arrow {
    transition: transform 0.3s ease;
    transform: rotate(180deg);
}

.mobile-sidebar-item[open] .accordion-arrow {
    transform: rotate(0deg);
}

/* Mobile sidebar children (accordion content) */
.mobile-sidebar-children {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 var(--half-space) var(--half-space);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-sidebar-item[open] .mobile-sidebar-children {
    max-height: 5000px;
}

/* Mobile sidebar links */
.mobile-sidebar-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    text-decoration: none;
    background: rgba(242, 234, 219, 0.05);
    transition: background 0.2s ease;
}

.mobile-sidebar-link:hover {
    background: rgba(242, 234, 219, 0.12);
}

.mobile-sidebar-link.active {
    background: rgba(96, 148, 159, 0.25);
}

.mobile-sidebar-link span {
    color: var(--color-headings-light, #F2EADB);
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
}

.mobile-sidebar-link .count {
    font-family: 'Roboto Mono', monospace;
    font-size: 13px;
    opacity: 0.7;
}

/* Standalone link (Yesterday's Results) */
.mobile-sidebar-link.standalone {
    margin-top: 8px;
    background: rgba(242, 234, 219, 0.08);
}

.mobile-sidebar-link.standalone .mobile-sidebar-label {
    flex: 1;
}

/* Mobile menu footer */
.mobile-menu-footer {
    display: flex;
    flex-direction: column;
    gap: var(--half-space);
    padding-top: var(--space);
    border-top: 1px solid rgba(242, 234, 219, 0.15);
    margin-top: auto;
}

.mobile-menu-footer .mobile-logout {
    color: var(--color-headings-light, #F2EADB);
    text-decoration: none;
    font-size: 16px;
    padding: var(--quarter-space) 0;
}

.mobile-menu-footer .mobile-socials {
    display: flex;
    gap: 16px;
    padding: var(--quarter-space) 0;
}

.mobile-menu-footer .mobile-socials img {
    filter: brightness(0) invert(0.9);
}

/* =====================================================
   MOBILE HOME NAVIGATION (Home Page Mobile Content)
   ===================================================== */

/* Show mobile home nav only on mobile */
.mobile-home-nav {
    display: none;
}

@media screen and (max-width: 989px) {
    .mobile-home-nav {
        display: flex;
        flex-direction: column;
        gap: var(--half-space);
        padding: 0;
    }

    /* Hide desktop content on mobile */
    .desktop-only {
        display: none !important;
    }
}

/* Show desktop content only on desktop */
@media screen and (min-width: 990px) {
    .mobile-home-nav {
        display: none !important;
    }
}

/* Mobile home navigation sections */
.mobile-home-section {
    background: var(--color-bg-dark, #1B2941);
    border: none;
}

.mobile-home-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--half-space) var(--space);
    cursor: pointer;
    list-style: none;
}

.mobile-home-header::-webkit-details-marker {
    display: none;
}

.mobile-home-header-content {
    display: flex;
    align-items: center;
    gap: var(--quarter-space);
}

.mobile-home-header-content img {
    width: 24px;
    height: 24px;
}

.mobile-home-header-content h3 {
    color: var(--color-headings-light, #F2EADB);
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
}

.mobile-home-header .accordion-arrow {
    transition: transform 0.3s ease;
    transform: rotate(180deg);
}

.mobile-home-section[open] .accordion-arrow {
    transform: rotate(0deg);
}

/* Mobile home items container */
.mobile-home-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 var(--half-space) var(--half-space);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-home-section[open] .mobile-home-items {
    max-height: 5000px;
}

/* Individual navigation items */
.mobile-home-item {
    display: flex;
    align-items: center;
    gap: var(--quarter-space);
    padding: 12px var(--half-space);
    text-decoration: none;
    background: rgba(242, 234, 219, 0.08);
    transition: background 0.2s ease;
}

.mobile-home-item:hover,
.mobile-home-item:active {
    background: rgba(242, 234, 219, 0.15);
}

.mobile-home-item img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.mobile-home-item .item-label {
    flex: 1;
    color: var(--color-headings-light, #F2EADB);
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    font-weight: 500;
}

.mobile-home-item .item-count {
    color: var(--color-headings-light, #F2EADB);
    font-family: 'Roboto Mono', monospace;
    font-size: 13px;
    opacity: 0.7;
}

/* Standalone link (Yesterday's Results) */
.mobile-home-standalone {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--half-space) var(--space);
    text-decoration: none;
    background: var(--color-bg-dark, #1B2941);
    transition: background 0.2s ease;
}

.mobile-home-standalone:hover,
.mobile-home-standalone:active {
    background: rgba(27, 41, 65, 0.9);
}

.mobile-home-standalone .item-count {
    color: var(--color-headings-light, #F2EADB);
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    opacity: 0.7;
}

/* =====================================================
   MOBILE BOTTOM BAR (Quick Navigation)
   ===================================================== */

/* Hide on desktop and on home page */
.mobile-bottom-bar {
    display: none;
}

@media screen and (max-width: 989px) {
    .mobile-bottom-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--color-bg-dark, #1B2941);
        justify-content: space-around;
        align-items: center;
        padding: 8px 0;
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
        z-index: 1000;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    }

    /* Add padding to main content to avoid bottom bar overlap */
    main#app-main {
        padding-bottom: 70px;
    }

    footer.footer {
        padding-bottom: calc(70px + var(--space));
    }
}

/* Bottom bar buttons */
.bottom-bar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 16px;
    transition: opacity 0.2s ease;
}

.bottom-bar-btn:active {
    opacity: 0.7;
}

.bottom-bar-btn img {
    width: 24px;
    height: 24px;
}

.bottom-bar-btn span {
    color: var(--color-headings-light, #F2EADB);
    font-family: 'Roboto', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =====================================================
   BOTTOM SHEET POPUP
   ===================================================== */

/* Overlay */
.bottom-sheet-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bottom-sheet-overlay.active {
    display: block;
    opacity: 1;
}

/* Popup container */
.bottom-sheet-popup {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-bg, #fff);
    border-radius: 16px 16px 0 0;
    z-index: 1002;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 70vh;
    overflow: hidden;
}

.bottom-sheet-popup.active {
    display: block;
    transform: translateY(0);
}

/* Popup header */
.bottom-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--half-space) var(--space);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: var(--color-bg-dark, #1B2941);
}

.bottom-sheet-header h4 {
    color: var(--color-headings-light, #F2EADB);
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
}

.bottom-sheet-close {
    background: none;
    border: none;
    color: var(--color-headings-light, #F2EADB);
    font-size: 28px;
    cursor: pointer;
    padding: 0 8px;
    line-height: 1;
}

/* Popup content */
.bottom-sheet-content {
    padding: var(--half-space) 0;
    overflow-y: auto;
    max-height: calc(70vh - 60px);
    padding-bottom: calc(var(--half-space) + env(safe-area-inset-bottom, 0px));
}

/* Popup items */
.bottom-sheet-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px var(--space);
    text-decoration: none;
    transition: background 0.2s ease;
}

.bottom-sheet-item:hover,
.bottom-sheet-item:active {
    background: rgba(0, 0, 0, 0.05);
}

.bottom-sheet-item span {
    color: var(--color-headings, #1B2941);
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
}

.bottom-sheet-item .count {
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    opacity: 0.6;
}

/* CTA style item */
.bottom-sheet-item.bottom-sheet-cta {
    background: var(--color-accent, #60949F);
    margin: var(--quarter-space) var(--half-space);
    border-radius: 8px;
    justify-content: center;
}

.bottom-sheet-item.bottom-sheet-cta span {
    color: white;
    font-weight: 600;
}

.bottom-sheet-item.bottom-sheet-cta:hover,
.bottom-sheet-item.bottom-sheet-cta:active {
    background: var(--color-accent-hover, #4d7a84);
}

/* Empty state */
.bottom-sheet-empty {
    text-align: center;
    padding: var(--space);
    color: var(--color-body);
    opacity: 0.7;
}

/* ============================================================================
   Simple Page Layout (Header/Footer Only - No Sidebar)
   Used for login, logout, accounts, JoinNow, and other non-app pages
   ============================================================================ */

.simple-page-main {
    padding: var(--space);
    min-height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.simple-page-main .simple-page-container {
    max-width: 480px;
    width: 100%;
    padding: var(--space);
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: var(--space) 0;
}

.simple-page-main .simple-page-logo {
    color: var(--color-headings);
    font-size: 24px;
    margin-bottom: var(--space);
    font-weight: bold;
    text-align: center;
}

.simple-page-main .simple-page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-headings);
    margin-bottom: var(--half-space);
    text-align: center;
}

.simple-page-main .simple-page-subtitle {
    font-size: 16px;
    color: var(--color-body);
    margin-bottom: var(--space);
    text-align: center;
}

/* Form styles for simple pages */
.simple-page-main .form-tabs {
    display: flex;
    margin-bottom: var(--space);
    border-bottom: 1px solid #ddd;
}

.simple-page-main .form-tab {
    flex: 1;
    padding: 10px;
    cursor: pointer;
    text-align: center;
    color: var(--color-body);
    transition: all 0.2s;
}

.simple-page-main .form-tab.active {
    font-weight: bold;
    border-bottom: 2px solid #1B2941;
    color: #1B2941;
}

.simple-page-main .form-group {
    margin-bottom: var(--half-space);
    text-align: left;
}

.simple-page-main .form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: var(--color-headings);
}

.simple-page-main .form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
    font-family: inherit;
}

.simple-page-main .form-input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.simple-page-main .form-btn {
    background-color: #003399;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    margin-top: var(--half-space);
    transition: background-color 0.2s;
}

.simple-page-main .form-btn:hover {
    background-color: #002277;
}

/* Outlined variant for the destructive choice on a two-button page, e.g. cancelling a membership.
   Same size and weight as .form-btn on purpose: the way out of the cancellation offer has to be as
   easy to find as the offer itself. */
.simple-page-main .form-btn-secondary {
    background-color: transparent;
    color: #a33;
    border: 1px solid #a33;
}

.simple-page-main .form-btn-secondary:hover {
    background-color: #a33;
    color: white;
}

.simple-page-main .form-error {
    color: #d9534f;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.simple-page-main .form-divider {
    margin: var(--space) 0;
    color: var(--color-body);
    font-size: 14px;
    position: relative;
    text-align: center;
}

.simple-page-main .form-divider::before,
.simple-page-main .form-divider::after {
    content: "";
    display: inline-block;
    width: 40%;
    height: 1px;
    background-color: #ddd;
    position: absolute;
    top: 50%;
}

.simple-page-main .form-divider::before {
    left: 0;
}

.simple-page-main .form-divider::after {
    right: 0;
}

.simple-page-main .google-signin-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: var(--space) 0;
    min-height: 40px;
}

.simple-page-main .form-footer {
    margin-top: var(--space);
    font-size: 13px;
    color: var(--color-body);
    text-align: center;
}

.simple-page-main .form-footer a {
    color: #1B2941;
    text-decoration: underline;
}

.simple-page-main .form-footer a:hover {
    text-decoration: underline;
}

/* Success/info message styles */
.simple-page-main .success-message {
    background-color: #d4edda;
    color: #155724;
    padding: var(--space);
    border-radius: 4px;
    margin-bottom: var(--space);
    text-align: center;
}

.simple-page-main .info-message {
    background-color: #d1ecf1;
    color: #0c5460;
    padding: var(--space);
    border-radius: 4px;
    margin-bottom: var(--space);
    text-align: center;
}

/* Mobile adjustments */
@media screen and (max-width: 480px) {
    .simple-page-main .simple-page-container {
        padding: var(--half-space);
        margin: var(--half-space) 0;
    }

    .simple-page-main .form-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Track Profile Section */
.track-profile-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.track-profile-content {
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

.track-profile-text {
    flex: 1;
    padding: 25px;
}

.track-blurb {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin: 0 0 15px 0;
}

.track-website-link {
    display: inline-block;
    color: #1a365d;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.track-website-link:hover {
    text-decoration: underline;
}

.track-profile-image {
    width: 300px;
    min-height: 200px;
    overflow: hidden;
}

.track-profile-image img {

    width: 100%;

    height: 100%;

    object-fit: cover;

    display: block;

}



@media screen and (max-width: 768px) {

    .track-profile-content {

        flex-direction: column-reverse;

    }

    

    .track-profile-image {

        width: 100%;

        height: 200px;

    }

}

/* =====================================================
   SUPPORT CHAT WIDGET (A/B test "chat", anonymous only)
   ===================================================== */

.ac-chat-launcher {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--color-bg-dark, #1B2941);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    z-index: 1100;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.ac-chat-launcher:hover {
    transform: scale(1.06);
}

.ac-chat-launcher--hidden {
    opacity: 0;
    pointer-events: none;
}

.ac-chat-panel {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 360px;
    max-width: calc(100vw - 40px);
    height: 520px;
    max-height: calc(100vh - 40px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1101;
    font-family: 'Roboto', sans-serif;
}

.ac-chat-panel[hidden] {
    display: none;
}

.ac-chat-header {
    background: var(--color-bg-dark, #1B2941);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.ac-chat-header-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.ac-chat-header-text strong {
    font-size: 16px;
}

.ac-chat-header-text span {
    font-size: 12px;
    opacity: 0.75;
}

.ac-chat-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0.8;
}

.ac-chat-close:hover {
    opacity: 1;
}

.ac-chat-log {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f7f8fa;
}

.ac-chat-msg {
    max-width: 85%;
    padding: 10px 13px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.ac-chat-msg--bot {
    align-self: flex-start;
    background: #fff;
    color: #333;
    border: 1px solid #e1e4e8;
    border-bottom-left-radius: 4px;
}

.ac-chat-msg--user {
    align-self: flex-end;
    background: #60949F;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.ac-chat-msg a {
    color: #60949F;
    text-decoration: underline;
}

.ac-chat-msg--user a {
    color: #fff;
}

.ac-chat-typing {
    display: flex;
    gap: 4px;
    align-items: center;
}

.ac-chat-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #b6bcc4;
    animation: ac-chat-blink 1.3s infinite ease-in-out;
}

.ac-chat-typing span:nth-child(2) { animation-delay: 0.18s; }
.ac-chat-typing span:nth-child(3) { animation-delay: 0.36s; }

@keyframes ac-chat-blink {
    0%, 80%, 100% { opacity: 0.3; }
    40% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .ac-chat-typing span { animation: none; opacity: 0.6; }
    .ac-chat-launcher { transition: none; }
}

.ac-chat-form {
    display: flex;
    gap: 8px;
    padding: 10px 12px 6px;
    border-top: 1px solid #e1e4e8;
    background: #fff;
    flex-shrink: 0;
}

.ac-chat-input {
    flex: 1;
    resize: none;
    border: 1px solid #d7dbe0;
    border-radius: 8px;
    padding: 9px 11px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    max-height: 96px;
    color: #333;
}

.ac-chat-input:focus {
    outline: 2px solid #60949F;
    outline-offset: -1px;
    border-color: #60949F;
}

.ac-chat-send {
    background: #60949F;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    align-self: flex-end;
    height: 38px;
}

.ac-chat-send:disabled {
    opacity: 0.55;
    cursor: default;
}

.ac-chat-footer {
    padding: 0 12px 10px;
    background: #fff;
    flex-shrink: 0;
}

.ac-chat-counter {
    font-size: 11px;
    color: #8a9099;
    text-align: right;
}

.ac-chat-counter--warn {
    color: #c0392b;
}

/* Clear the fixed mobile bottom bar on app pages (it appears at <= 989px, ~70px tall) */
@media screen and (max-width: 989px) {
    .ac-chat-launcher--above-bar {
        bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    }
}

/* Full-height sheet on phones */
@media screen and (max-width: 749px) {
    .ac-chat-panel {
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    /* The sheet covers the whole viewport, so the bottom bar offset does not apply to it */
    .ac-chat-panel--above-bar {
        bottom: 0;
    }

    /* Keep the page from scrolling behind the open sheet */
    body.ac-chat-open {
        overflow: hidden;
    }
}
