:where(a,button,select,input,textarea,[tabindex]):focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.drawer-backdrop {
  display: none;
}

.drawer-close {
  display: none;
}

.quick-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  width: auto;
  height: 44px;
  font-size: 12px;
  text-decoration: none;
}

.quick-button__icon {
  flex: 0 0 auto;
  font-size: 16px;
  line-height: 1;
}

.quick-button__label {
  min-width: 0;
}

@media (max-width: 1100px) {
  .topbar {
    height: auto;
    min-height: 86px;
    gap: 10px;
    flex-wrap: wrap;
    padding-block: 12px;
  }

  .page-title {
    flex: 1;
    min-width: 0;
  }

  .top-actions {
    width: 100%;
    justify-content: flex-end;
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .drawer-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--panel);
    color: var(--text);
    font-size: 24px;
    cursor: pointer;
  }

  .brand {
    padding-right: 50px;
  }

  .drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 19;
    display: block;
    border: 0;
    background: rgba(7, 16, 14, 0.42);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  .app-shell.menu-open .drawer-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .menu-button,
  .nav-link,
  .athlete-subnav a,
  .pc-controls button,
  .pc-controls select,
  .pc-actions button {
    min-height: 44px;
  }

  .pc-controls button,
  .pc-actions button {
    min-width: 44px;
  }

  .menu-button {
    width: 44px;
    height: 44px;
  }

  .nav-link,
  .athlete-subnav a {
    height: auto;
    display: inline-flex;
    align-items: center;
  }
}

@media (max-width: 620px) {
  .top-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .top-actions .quick-button,
  .top-actions .quick-button.alert-action {
    display: inline-flex;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    height: 44px;
    padding: 0 6px;
    font-size: 10px;
    line-height: 1.15;
  }

  .top-actions .athlete-selector {
    grid-column: 1 / -1;
    justify-self: end;
    min-height: 44px;
    height: 44px;
  }
}

/* IMP-28: keyboard access uses the existing sticky shell geometry. */
.aa-skip-link { position: fixed; top: var(--aa-safe-top, 0px); left: 8px; z-index: 1000; transform: translateY(-180%); padding: 12px 16px; background: var(--bg, #fff); color: var(--text, #111); border: 2px solid currentColor; }
.aa-skip-link:focus { transform: translateY(0); }
.athlete-app :focus { scroll-margin-top: calc(54px + var(--aa-safe-top, 0px) + 12px); scroll-margin-bottom: calc(var(--aa-nav-h, 66px) + var(--aa-safe-bottom, 0px) + 12px); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Keep the current page title out of the brand/sign-out hit areas on narrow screens. */
.aa-top { display: flex; gap: 8px; height: auto; min-height: calc(54px + var(--aa-safe-top, 0px)); }
.aa-top > span { position: static; left: auto; transform: none; flex: 1; min-width: 0; overflow-wrap: anywhere; white-space: normal; text-align: center; }
.aa-top .aa-brand, .aa-top .aa-coach-switch { flex-shrink: 0; }
