/* ==========================================================================
   antislop pass
   Readability, target size, focus, honest media, reduced motion.
   ========================================================================== */

html {
  scroll-padding-top: 84px;
}

body {
  font-size: 15px;
  line-height: 1.55;
}

a,
button,
select,
input[type="checkbox"],
input[type="radio"],
summary {
  cursor: pointer;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--green-2);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 500;
  padding: 11px 15px;
  border-radius: 6px;
  color: #f7f8ef;
  background: var(--green);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.boot-state,
.state-page {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  min-height: 65vh;
  width: min(620px, calc(100% - 40px));
  margin: 0 auto;
  color: var(--muted);
}

.boot-state {
  align-items: center;
  text-align: center;
}

.boot-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 4px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 18px;
  color: var(--ink);
  background: var(--lime);
}

.boot-state b {
  font-size: 16px;
  color: var(--ink);
}

.state-page h1 {
  margin: 4px 0 2px;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.state-page p {
  margin-bottom: 12px;
  font-size: 14px;
}

.state-kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--amber);
}

.search-trigger,
.mobile-toggle,
.icon-btn,
.btn-secondary {
  border-color: #6f7b72;
}

.field input,
.field select {
  border-color: #6f7b72;
}

.criterion-check {
  border-color: #6f7b72;
}

.btn:active,
.icon-btn:active,
.search-trigger:active,
.mobile-toggle:active {
  transform: translateY(1px);
}

.btn:disabled,
.icon-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

/* Header */

.site-header {
  background: var(--surface);
  backdrop-filter: none;
}

.header-inner {
  gap: 28px;
}

.brand {
  min-height: 44px;
}

.brand-type span {
  font-size: 10px;
}

.nav-link {
  min-height: 44px;
  padding: 0 14px;
  font-size: 13px;
}

.search-trigger {
  min-height: 44px;
  height: 44px;
  padding: 0 12px;
}

.search-trigger span {
  font-size: 12px;
}

.search-trigger kbd {
  font-size: 9px;
}

.demo-label {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: var(--surface-2);
  white-space: nowrap;
}

.mobile-toggle {
  width: auto;
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  display: none;
  align-items: center;
  gap: 6px;
}

.mobile-toggle span {
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .mobile-toggle {
    display: flex;
    width: 84px;
    justify-content: center;
  }
}

/* Page heading and actions */

.page {
  padding-top: 34px;
}

.page-head {
  margin-bottom: 20px;
}

.page-head h1 {
  font-size: 36px;
}

.page-desc {
  max-width: 720px;
  margin-top: 9px;
  font-size: 13.5px;
  line-height: 1.6;
}

.btn {
  height: auto;
  min-height: 44px;
  padding: 10px 15px;
  font-size: 12.5px;
}

.btn-sm {
  min-height: 44px;
  padding: 0 13px;
  font-size: 11.5px;
}

.icon-btn {
  width: 44px;
  height: 44px;
}

.text-link {
  min-height: 44px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-link svg {
  display: none;
}

.back-link {
  min-height: 44px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

.tag {
  height: 22px;
  padding: 0 7px;
  font-size: 10px;
  letter-spacing: 0.02em;
}

.tag-medical {
  color: var(--ink-2);
  background: var(--blue-soft);
}

/* Summary strip, not a row of stat cards */

.summary-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.summary-item {
  min-width: 0;
  padding: 14px 16px;
  border-left: 1px solid var(--line);
}

.summary-item:first-child {
  border-left: 0;
}

.summary-item span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.summary-item b {
  display: block;
  margin: 4px 0 2px;
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.summary-item small {
  display: block;
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--muted-2);
}

/* Department cards */

.dept-card {
  min-height: 230px;
  padding: 18px;
}

.dept-card h2 {
  font-size: 18px;
}

.dept-card > p {
  font-size: 12px;
  line-height: 1.55;
}

.dept-medical {
  border-top-color: var(--muted-2);
}

.dept-medical .dept-icon {
  color: var(--muted);
}

.dept-metrics b {
  font-size: 20px;
}

.dept-metrics span {
  font-size: 10px;
}

.dept-link {
  min-height: 44px;
  align-items: center;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Cards and tables */

.card-head {
  padding: 17px 18px 15px;
}

.card-head h2 {
  font-size: 16px;
}

.card-head p {
  font-size: 11.5px;
}

.legend {
  font-size: 9.5px;
}

.data-table th {
  padding: 9px 12px;
  font-size: 10px;
  letter-spacing: 0.02em;
}

.data-table th span {
  font-size: 9px;
}

.data-table td {
  padding: 11px 12px;
  font-size: 11.5px;
}

.player-cell {
  min-width: 150px;
  min-height: 44px;
  gap: 9px;
}

.player-cell b {
  font-size: 12px;
}

.player-cell small {
  font-size: 9.5px;
}

.avatar-tile {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--green);
  border-radius: 6px;
  color: #f7f8ef;
  background: var(--green);
  line-height: 1;
}

.avatar-tile b {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #f7f8ef;
}

.cell-main {
  font-size: 11.5px;
}

.cell-sub {
  max-width: 260px;
  font-size: 10px;
}

.lsi-pill b {
  font-size: 12px;
}

.status,
.clearance {
  padding: 4px 7px;
  font-size: 9.5px;
}

.table-foot {
  font-size: 9.5px;
}

.lr-cell b.involved {
  color: var(--orange);
}

.involved-mark {
  margin-left: 2px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  color: var(--orange);
}

.phase-avatars {
  gap: 4px;
  margin-top: 9px;
}

.phase-avatars span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #dce4bd;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 8px;
  color: var(--ink);
  background: var(--lime-soft);
}

.phase-empty {
  font-size: 10px;
}

/* S&C */

.test-summary {
  padding: 16px;
}

.test-summary h3 {
  font-size: 14px;
}

.test-summary-value b {
  font-size: 30px;
}

.test-summary-value span {
  font-size: 10px;
}

.test-summary-lr span {
  font-size: 10px;
}

.test-summary-lr b {
  font-size: 12px;
}

.test-summary-foot {
  font-size: 9.5px;
}

.lr-label {
  font-size: 9px;
}

.lr-cell {
  font-size: 12px;
}

.gym-slot {
  min-height: 48px;
}

.gym-time {
  width: 42px;
  font-size: 10px;
}

.gym-slot b {
  font-size: 11px;
}

.gym-slot small {
  font-size: 9.5px;
}

.protocol-list li {
  font-size: 11px;
}

.protocol-list b {
  font-size: 9px;
}

/* Rehab */

.phase-card {
  min-height: 126px;
  padding: 12px;
}

.phase-card-top {
  font-size: 9px;
}

.phase-card-top b {
  font-size: 15px;
}

.phase-card p {
  margin-top: 8px;
  font-size: 11px;
}

.phase-card small {
  font-size: 9px;
}

.criteria-mini b,
.readiness b {
  font-size: 11px;
}

.gate-row {
  min-height: 48px;
}

.gate-body b {
  font-size: 11px;
}

.gate-body small {
  font-size: 9.5px;
}

.gate-score {
  font-size: 11px;
}

.callout {
  background: var(--green);
}

.callout h3 {
  font-size: 18px;
}

.callout p {
  font-size: 11.5px;
  color: #d5dfd2;
}

.callout-rehab {
  background: var(--green);
}

/* Medical */

.scan-icon {
  color: var(--green-2);
  background: var(--surface-2);
}

.note-dot {
  background: var(--green-2);
}

.note-row,
.scan-row {
  min-height: 48px;
}

.note-body b,
.scan-row b {
  font-size: 11px;
}

.note-body span,
.scan-row small {
  font-size: 10px;
  line-height: 1.45;
}

.note-body small {
  font-size: 9px;
}

.dot-medical {
  background: var(--muted-2);
}

/* Player profile */

.player-banner {
  padding: 17px 20px 19px;
}

.player-banner-main {
  gap: 20px;
}

.player-photo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 112px;
  border: 1px solid var(--green);
  border-radius: 8px;
  color: #f7f8ef;
  background: var(--green);
  object-fit: initial;
  filter: none;
  line-height: 1;
}

.player-photo b {
  font-family: var(--mono);
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.08em;
  color: #f7f8ef;
}

.player-photo small {
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(247, 248, 239, 0.7);
}

.player-title h1 {
  font-size: 30px;
}

.player-meta {
  font-size: 10px;
}

.player-injury {
  font-size: 12.5px;
}

.player-tags {
  flex-wrap: wrap;
  gap: 6px;
}

.sample-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted);
  background: var(--surface-2);
}

.player-quick a {
  min-height: 64px;
}

.player-quick b {
  font-size: 16px;
}

.player-quick b.quick-clearance {
  font-size: 13px;
}

.player-quick small {
  font-size: 9.5px;
}

.profile-tab {
  min-height: 44px;
  padding: 10px 13px;
  font-size: 12px;
}

.summary-card {
  min-height: 142px;
  padding: 16px;
}

.summary-medical {
  border-top-color: var(--muted-2);
}

.summary-card > b {
  font-size: 26px;
}

.summary-card > span {
  font-size: 11px;
}

.summary-card > small {
  font-size: 10px;
}

.detail {
  min-height: 70px;
  padding: 10px 11px;
}

.detail > span {
  font-size: 9.5px;
}

.detail > b {
  font-size: 11.5px;
}

.detail > small {
  font-size: 9.5px;
}

.gym-block-meta span {
  font-size: 9px;
}

.gym-block-meta b {
  font-size: 10.5px;
}

.test-info h3 {
  font-size: 13px;
}

.test-info p {
  font-size: 10px;
}

.leg-head span {
  font-size: 9.5px;
}

.leg-value {
  font-size: 22px;
}

.leg-value small {
  font-size: 8px;
}

.test-lsi > span,
.test-lsi small {
  font-size: 9px;
}

.test-lsi b {
  font-size: 17px;
}

.insight-line p {
  font-size: 10.5px;
}

.rehab-summary p {
  font-size: 12.5px;
}

.focus-tags span {
  font-size: 10px;
}

.phase-line {
  min-height: 44px;
}

.phase-line b {
  font-size: 11px;
}

.phase-line small {
  font-size: 9.5px;
}

.phase-state {
  font-size: 9px;
}

.target-line {
  font-size: 9px;
}

.criterion {
  min-height: 44px;
  padding: 8px 0;
}

.criterion > span:last-child {
  font-size: 11px;
}

.criteria-foot {
  font-size: 9.5px;
}

.week-row {
  min-height: 94px;
  padding: 11px;
}

.week-row > span:first-child {
  font-size: 9px;
}

.week-row b {
  font-size: 10.5px;
}

.week-row small {
  font-size: 9px;
}

.scan-detail b {
  font-size: 11.5px;
}

.scan-detail p {
  font-size: 10.5px;
}

.mini-detail-row span {
  font-size: 9px;
}

.mini-detail-row b {
  font-size: 10px;
}

/* Events */

.event-row {
  min-height: 48px;
}

.event-date {
  width: 96px;
  font-size: 9.5px;
}

.event-body b {
  font-size: 11px;
}

.event-body small {
  font-size: 9.5px;
}

/* Search and modal */

.search-trigger kbd,
.search-field kbd {
  font-size: 9px;
}

.search-field input {
  min-height: 32px;
  font-size: 16px;
}

.search-close {
  flex: 0 0 auto;
  border-radius: 6px;
}

.search-label {
  font-size: 9.5px;
}

.search-result {
  min-height: 48px;
  padding: 9px 8px;
}

.search-result b {
  font-size: 12px;
}

.search-result small {
  font-size: 10px;
}

.search-status {
  font-size: 9px;
}

.search-empty {
  font-size: 12px;
}

.modal-head h2 {
  font-size: 24px;
}

.modal-head p {
  font-size: 11px;
}

.modal-foot p {
  font-size: 9.5px;
}

.field label {
  font-size: 10px;
}

.field input,
.field select {
  min-height: 44px;
  height: 44px;
  font-size: 16px;
}

.input-group {
  padding: 11px;
}

.input-group-title {
  display: block;
  margin: 0 0 7px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-2);
}

.input-pair .field label {
  font-size: 9.5px;
}

.live-lsi {
  font-size: 9.5px;
}

.live-lsi b {
  font-size: 10px;
}

.form-section-head {
  font-size: 10px;
}

.form-section-head small {
  font-size: 9px;
}

.toast {
  font-size: 12px;
}

.empty-state {
  font-size: 12px;
}

.empty-state b {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
  color: var(--ink);
}

.site-footer {
  font-size: 10px;
  line-height: 1.5;
}

/* Keep the mobile register separate from desktop */

@media (max-width: 1020px) {
  .summary-bar {
    grid-template-columns: 1fr 1fr;
  }
  .summary-item:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .summary-item:nth-child(4) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 1180px) {
  .content-grid,
  .profile-two-col {
    grid-template-columns: 1fr;
  }
  .content-grid > .side-stack,
  .profile-two-col > .side-stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .content-grid > .side-stack > .callout,
  .profile-two-col > .side-stack > .callout {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .header-inner {
    gap: 10px;
  }
  .demo-label {
    display: none;
  }
  .page {
    padding-top: 22px;
  }
  .page-head h1 {
    font-size: 30px;
  }
  .page-desc {
    font-size: 13px;
  }
  .summary-item {
    padding: 12px;
  }
  .summary-item b {
    font-size: 21px;
  }
  .summary-item small {
    font-size: 9.5px;
  }
  .dept-card {
    min-height: 200px;
  }
  .player-photo {
    width: 82px;
    height: 96px;
  }
  .player-photo b {
    font-size: 30px;
  }
  .player-title h1 {
    font-size: 26px;
  }
  .profile-tab {
    min-height: 44px;
  }
  .data-table th {
    font-size: 9.5px;
  }
  .data-table td {
    font-size: 11px;
  }
  .cell-sub {
    max-width: 220px;
  }
  .btn {
    font-size: 12px;
  }
  .search-trigger {
    width: 44px;
    padding: 0;
    justify-content: center;
  }
  .search-trigger span,
  .search-trigger kbd {
    display: none;
  }
  .mobile-toggle {
    width: 84px;
    height: 44px;
  }
  .field input,
  .field select {
    font-size: 16px;
  }
  .content-grid > .side-stack,
  .profile-two-col > .side-stack {
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .player-quick b {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* One readable label size floor. Microtype below 11px is not readable. */

.brand-type span,
.demo-label,
.summary-item small,
.tag,
.dept-metrics span,
.data-table th,
.data-table th span,
.player-cell small,
.cell-sub,
.status,
.clearance,
.table-foot,
.legend,
.event-date,
.event-body small,
.sample-tag,
.detail > span,
.detail > small,
.gym-block-meta span,
.gym-block-meta b,
.test-info p,
.leg-head span,
.phase-card-top,
.phase-card small,
.phase-line small,
.phase-state,
.target-line,
.criteria-foot,
.week-row > span:first-child,
.week-row b,
.week-row small,
.mini-detail-row span,
.mini-detail-row b,
.search-label,
.search-status,
.modal-foot p,
.field label,
.input-pair .field label,
.live-lsi,
.form-section-head small,
.site-footer {
  font-size: 11px;
}

.test-summary-lr span,
.test-summary-foot,
.protocol-list b,
.phase-avatars span,
.test-lsi > span,
.test-lsi small {
  font-size: 10px;
}

/* Remaining microtype that carries content rather than a shortcut hint. */

.search-trigger kbd,
.search-field kbd,
.test-index,
.test-summary-value b small,
.test-summary-value span,
.test-summary-lr span,
.test-summary-foot,
.phase-empty,
.phase-avatars span,
.player-meta,
.player-quick small,
.summary-card > small,
.leg-value small,
.leg-head em,
.test-lsi > span,
.test-lsi small,
.insight-icon,
.insight-line p,
.insight-line b,
.history-table .pair,
.note-cell,
.note-body span,
.note-body small,
.protocol-list b,
.lr-label,
.gym-time,
.gym-slot small,
.gate-avatar,
.gate-body small,
.scan-row small,
.focus-tags span,
.scan-detail p,
.phase-dot {
  font-size: 11px;
}

.phase-dot {
  width: 20px;
  height: 20px;
}

.target-line b {
  font-size: 11px;
}

