/* ---------------------------------------------------------------
   Mobile and tablet polish for the Elementor build.
   Loaded last, so it refines site.css without changing desktop.
   --------------------------------------------------------------- */

/* Section labels: keep the accent dash on the same line as the text */
.label > .elementor-heading-title,
.label > .elementor-widget-container,
.label > .elementor-widget-container > .elementor-heading-title { display: inline; }

/* Menu button is hidden on desktop */
.nav-toggle { display: none; }

/* ---------- header and menu (phones and small tablets) ---------- */
@media (max-width: 46rem) {
  .topbar-inner { position: static; flex-wrap: nowrap; gap: 1rem; padding-block: .8rem; }
  .wordmark { font-size: 1.3rem; white-space: nowrap; min-width: 0; }
  .wordmark span { font-size: .92em; }

  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; align-items: center;
    gap: 7px; width: 44px; height: 44px; margin-right: -10px; padding: 0;
    background: none; border: 0; cursor: pointer; flex: none; color: var(--ink);
    -webkit-tap-highlight-color: transparent; box-shadow: none; border-radius: 0; transform: none;
  }
  .nav-toggle:hover, .nav-toggle:active, .nav-toggle:focus { background: none; transform: none; box-shadow: none; color: var(--ink); }
  .nav-toggle span { display: block; width: 22px; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform .35s var(--ease); }
  .nav-open .nav-toggle span:first-child { transform: translateY(4.25px) rotate(45deg); }
  .nav-open .nav-toggle span:last-child  { transform: translateY(-4.25px) rotate(-45deg); }

  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; flex-wrap: nowrap; gap: 0;
    padding: .25rem var(--gutter) 1.5rem;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 24px 40px -24px rgba(0,0,0,.25);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s linear .3s;
  }
  .nav-open .nav { opacity: 1; visibility: visible; transform: none; transition: opacity .3s var(--ease), transform .3s var(--ease); }
  .nav a {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.05rem 0; font-size: .875rem; border-bottom: 1px solid var(--rule); background: none;
  }
  .nav a::after { content: "\2192"; color: var(--ink-3); transition: transform .3s var(--ease); }
  .nav a:hover::after { transform: translateX(4px); color: var(--accent); }
  .nav a[aria-current="page"] { color: var(--accent); }
  .nav a[aria-current="page"]::after { color: var(--accent); }
  html.nav-locked, html.nav-locked body { overflow: hidden; }
}
@media (max-width: 34rem) { .wordmark span { display: none; } }

/* ---------- hero (tablets and phones) ---------- */
@media (max-width: 54rem) {
  .hero .hero-portrait,
  .hero .hero-portrait.elementor-widget {
    position: relative; top: auto; right: auto; bottom: auto;
    width: 100%; max-width: 22rem; height: auto; min-height: 0;
    aspect-ratio: 1 / 1; margin: 1.25rem auto 0; overflow: hidden;
    pointer-events: none;
  }
  .hero .hero-portrait img,
  .hero .hero-portrait .elementor-widget-container img {
    position: absolute; inset: 0; right: auto; bottom: auto;
    width: 100% !important; height: 100% !important; max-width: 100% !important;
    object-fit: cover; object-position: 50% 100%;
    -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
  }
  .hero .hero-portrait::before { inset: 20% 0 0 0; }
  .hero-foot { gap: 1.25rem 2rem; }
}
@media (max-width: 30rem) {
  .hero .hero-portrait, .hero .hero-portrait.elementor-widget { max-width: 18rem; }
  .hero-stats { gap: 1.25rem 1rem; }
}

/* ---------- tables become stacked rows on phones ---------- */
@media (max-width: 40rem) {
  .table-scroll { overflow: visible; }
  .table-scroll table, .table-scroll thead, .table-scroll tbody, .table-scroll tr, .table-scroll td,
  .sk-html table, .sk-html tbody, .sk-html tr, .sk-html td { display: block; width: 100%; }
  .table-scroll thead, .sk-html thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .table-scroll tbody, .sk-html tbody { border-top: 1px solid var(--ink); }
  .table-scroll tr, .sk-html tr { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
  .table-scroll td, .sk-html td { padding: 0; border: 0; white-space: normal; background: none !important; }
  .table-scroll td:first-child, .sk-html td:first-child { margin-bottom: .3rem; white-space: normal; }
  .table-scroll td + td, .sk-html td + td { color: var(--ink-2); font-size: 1rem; line-height: 1.55; }

  /* account roster: name on top, platform · market · metric underneath */
  .roster td:not(:first-child) { display: inline; font-family: var(--font-mono); font-size: .8125rem; }
  .roster td:nth-child(2)::after, .roster td:nth-child(3)::after { content: "\00A0\00B7\00A0"; color: var(--ink-3); padding: 0 .15rem; }
  .roster td:last-child { color: var(--accent); font-weight: 500; }
}

/* tablets: let the four-column roster fit without sideways scrolling */
@media (min-width: 40.01rem) and (max-width: 54rem) {
  .roster td, .roster th { white-space: normal; padding-right: 1rem; font-size: .9375rem; }
  .roster td:first-child { width: 38%; }
}
