/* ==========================================================================
   ZIKA RTP — Rehab intelligence mockup
   ========================================================================== */

:root {
  --bone: #f2efe5;
  --bone-deep: #e9e5d8;
  --paper: #fbfaf5;
  --paper-2: #f6f3ea;
  --ink: #132018;
  --ink-2: #26362c;
  --muted: #6c776e;
  --muted-2: #8d958d;
  --line: #d9d5c6;
  --line-dark: rgba(255, 255, 255, 0.13);
  --green: #123f2c;
  --green-2: #1a5a40;
  --green-3: #2b7354;
  --lime: #d9f56b;
  --lime-2: #e9fbb2;
  --lime-ink: #26380a;
  --orange: #e95d33;
  --orange-soft: #fbe2d7;
  --amber: #d89a30;
  --amber-soft: #f8ebcf;
  --red: #c8442c;
  --red-soft: #f7ddd5;
  --blue: #4f6f8f;
  --radius: 20px;
  --radius-sm: 12px;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
  --shadow: 0 24px 60px -28px rgba(19, 32, 24, 0.25);
  --sidebar-w: 252px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

::selection {
  background: var(--lime);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

svg {
  display: block;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* ---------- Shared type ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow .idx {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 9px;
  color: var(--ink);
  background: var(--paper);
}

.eyebrow.on-dark {
  color: rgba(255, 255, 255, 0.56);
}

.eyebrow.on-dark .idx {
  color: var(--lime);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

.mono {
  font-family: var(--mono);
}

/* ---------- Shell ---------- */

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-w);
  padding: 26px 16px 18px;
  color: #eef1e6;
  background:
    radial-gradient(80% 45% at 12% 0%, rgba(71, 129, 80, 0.28), transparent 70%),
    linear-gradient(170deg, #11291d 0%, #0d2017 55%, #0a1911 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  overflow-y: auto;
  scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 28px;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  color: var(--ink);
  background: var(--lime);
  border-radius: 11px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(19, 32, 24, 0.24);
  border-radius: 7px;
}

.brand-mark svg {
  width: 17px;
  height: 17px;
}

.brand-type {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1;
}

.brand-type b {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.brand-type small {
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(238, 241, 230, 0.44);
}

.nav-label {
  padding: 20px 12px 9px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(238, 241, 230, 0.34);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 10px 12px;
  margin: 2px 0;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(238, 241, 230, 0.67);
  transition: color 0.18s ease, background 0.18s ease;
}

.nav-item svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  opacity: 0.7;
}

.nav-item .nav-count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9px;
  color: rgba(238, 241, 230, 0.38);
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.055);
}

.nav-item.active {
  color: var(--ink);
  background: var(--lime);
}

.nav-item.active svg {
  opacity: 1;
}

.nav-item.active .nav-count {
  color: rgba(19, 32, 24, 0.55);
}

.profile-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  color: rgba(238, 241, 230, 0.63);
  transition: background 0.18s ease, color 0.18s ease;
}

.profile-nav:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.profile-nav.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.075);
}

.profile-nav .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--orange);
}

.profile-nav .dot.rtp {
  background: var(--lime);
}

.profile-nav .dot.amber {
  background: var(--amber);
}

.profile-nav span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.profile-nav small {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9px;
  color: rgba(238, 241, 230, 0.32);
}

.sidebar-spacer {
  flex: 1;
  min-height: 26px;
}

.gate-card {
  margin: 8px 4px 16px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.gate-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 11px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(238, 241, 230, 0.42);
}

.gate-card-top b {
  color: var(--lime);
  font-size: 10px;
}

.gate-card h4 {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}

.gate-card p {
  margin-top: 3px;
  font-size: 11px;
  color: rgba(238, 241, 230, 0.44);
}

.gate-progress {
  display: flex;
  gap: 4px;
  margin-top: 13px;
}

.gate-progress i {
  height: 3px;
  flex: 1;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
}

.gate-progress i.on {
  background: var(--lime);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 4px;
  padding: 12px 10px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #d9cbb9;
  color: #3d3125;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
}

.sidebar-user-info {
  min-width: 0;
  line-height: 1.3;
}

.sidebar-user-info b {
  display: block;
  overflow: hidden;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sidebar-user-info small {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  font-size: 9.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: rgba(238, 241, 230, 0.4);
}

.sidebar-user .icon-btn {
  margin-left: auto;
  color: rgba(238, 241, 230, 0.55);
}

/* ---------- Main / topbar ---------- */

.main {
  grid-column: 2;
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 70px;
  padding: 0 34px;
  background: rgba(242, 239, 229, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.mobile-menu {
  display: none;
}

.crumb {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: var(--muted);
}

.crumb svg {
  width: 9px;
  height: 9px;
  color: var(--muted-2);
}

.crumb strong {
  font-weight: 600;
  color: var(--ink);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
}

.live-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  margin-right: 7px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: rgba(251, 250, 245, 0.7);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-3);
  box-shadow: 0 0 0 4px rgba(43, 115, 84, 0.1);
}

.search-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 220px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 11.5px;
  color: var(--muted);
  background: rgba(251, 250, 245, 0.78);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.search-btn:hover {
  border-color: #c3beae;
  background: var(--paper);
}

.search-btn svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.search-btn span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.search-btn kbd {
  margin-left: auto;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted-2);
  background: var(--paper);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  transition: background 0.18s ease, color 0.18s ease;
}

.icon-btn:hover {
  color: var(--ink);
  background: rgba(19, 32, 24, 0.06);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

.top-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-left: 4px;
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 9px;
  color: #f4f5ec;
  background: var(--green);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.content {
  width: 100%;
  max-width: 1440px;
  padding: 30px 34px 34px;
  margin: 0 auto;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 44px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn svg {
  width: 14px;
  height: 14px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-dark {
  color: #f6f7ed;
  background: var(--green);
  box-shadow: 0 8px 20px -12px rgba(18, 63, 44, 0.7);
}

.btn-dark:hover {
  background: #0c3121;
}

.btn-lime {
  color: var(--ink);
  background: var(--lime);
}

.btn-lime:hover {
  background: #e4fa8f;
}

.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
  background: rgba(251, 250, 245, 0.45);
}

.btn-ghost:hover {
  border-color: #c2bdab;
  background: var(--paper);
}

.btn-sm {
  height: 34px;
  padding: 0 12px;
  border-radius: 7px;
  font-size: 11px;
}

.btn-icon {
  width: 36px;
  padding: 0;
}

/* ---------- Dashboard hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(390px, 0.88fr);
  gap: 28px;
  padding: 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    linear-gradient(90deg, rgba(251, 250, 245, 0.98) 0%, rgba(251, 250, 245, 0.84) 52%, rgba(251, 250, 245, 0.12) 100%),
    repeating-linear-gradient(90deg, transparent 0, transparent 79px, rgba(19, 32, 24, 0.035) 80px),
    repeating-linear-gradient(0deg, transparent 0, transparent 79px, rgba(19, 32, 24, 0.035) 80px),
    var(--paper);
  box-shadow: 0 26px 70px -44px rgba(19, 32, 24, 0.4);
}

.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -100px;
  width: 570px;
  height: 570px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 245, 107, 0.33) 0%, rgba(217, 245, 107, 0) 68%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 346px;
}

.hero h1 {
  max-width: 680px;
  margin: 18px 0 17px;
  font-size: clamp(46px, 5.25vw, 74px);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.055em;
}

.hero h1 em {
  position: relative;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: 2px;
  left: 2px;
  height: 8px;
  z-index: -1;
  border-radius: 50%;
  background: var(--lime);
  transform: rotate(-1.5deg);
}

.hero-lede {
  max-width: 440px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.hero-foot {
  display: flex;
  gap: 30px;
  margin-top: 31px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.hero-foot div {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.hero-foot strong {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.hero-foot span {
  font-size: 10px;
  color: var(--muted);
}

.hero-visual {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.availability-card {
  position: relative;
  width: 100%;
  max-width: 430px;
  padding: 19px 19px 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 19px;
  color: #f2f4e9;
  background:
    radial-gradient(100% 100% at 80% 0%, rgba(72, 133, 84, 0.42), transparent 65%),
    #133d2b;
  box-shadow: 0 25px 45px -20px rgba(12, 38, 25, 0.6);
}

.availability-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.availability-head p {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(242, 244, 233, 0.5);
}

.availability-head h3 {
  margin-top: 4px;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.availability-head .avail-pct {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.05em;
  color: var(--lime);
}

.availability-head .avail-pct small {
  font-size: 9px;
  color: rgba(242, 244, 233, 0.45);
}

.pitch {
  position: relative;
  width: 100%;
  height: 208px;
  margin: 15px 0 13px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 11px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0, rgba(255, 255, 255, 0.025) 40px, transparent 40px, transparent 80px),
    #1c573e;
}

.pitch::before {
  content: "";
  position: absolute;
  inset: 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.pitch::after {
  content: "";
  position: absolute;
  top: 11px;
  bottom: 11px;
  left: 50%;
  width: 1px;
  background: rgba(255, 255, 255, 0.16);
}

.pitch-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.pitch-box {
  position: absolute;
  top: 50%;
  width: 36px;
  height: 88px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transform: translateY(-50%);
}

.pitch-box.left {
  left: 11px;
  border-left: 0;
}

.pitch-box.right {
  right: 11px;
  border-right: 0;
}

.pitch-goal {
  position: absolute;
  top: 50%;
  width: 7px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transform: translateY(-50%);
}

.pitch-goal.left {
  left: 4px;
  border-left: 0;
}

.pitch-goal.right {
  right: 4px;
  border-right: 0;
}

.pitch-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #dbe7cf;
  border: 2px solid #1c573e;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);
  transform: translate(-50%, -50%);
  transition: transform 0.18s ease;
}

.pitch-dot.injured {
  background: var(--orange);
  border-color: #1c573e;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4), 0 0 0 5px rgba(233, 93, 51, 0.14);
}

.pitch-dot.injured::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(233, 93, 51, 0.4);
  border-radius: 50%;
  animation: ping 2.8s ease-out infinite;
}

.pitch-dot:hover {
  transform: translate(-50%, -50%) scale(1.3);
}

@keyframes ping {
  0% { transform: scale(0.7); opacity: 0.8; }
  70%, 100% { transform: scale(1.5); opacity: 0; }
}

.pitch-label {
  position: absolute;
  top: 21px;
  left: 22px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.availability-foot {
  display: flex;
  align-items: center;
  gap: 15px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.03em;
  color: rgba(242, 244, 233, 0.52);
}

.availability-foot span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.availability-foot i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #dbe7cf;
}

.availability-foot i.inj {
  background: var(--orange);
}

.availability-foot .updated {
  margin-left: auto;
  color: rgba(242, 244, 233, 0.34);
}

.floating-note {
  position: absolute;
  right: 24px;
  bottom: -13px;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 245px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
  box-shadow: var(--shadow);
  transform: rotate(1.1deg);
}

.floating-note .note-icon {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  border-radius: 7px;
  color: var(--ink);
  background: var(--lime);
}

.floating-note .note-icon svg {
  width: 13px;
  height: 13px;
}

.floating-note p {
  font-family: var(--mono);
  font-size: 7.5px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.floating-note b {
  display: block;
  margin-top: 1px;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- KPI strip ---------- */

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.kpi {
  position: relative;
  padding: 17px 18px 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
}

.kpi .kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.kpi .kpi-top .trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  border-radius: 99px;
  font-size: 8px;
  letter-spacing: 0;
  color: var(--green-2);
  background: var(--lime-2);
}

.kpi .kpi-top .trend.down {
  color: var(--red);
  background: var(--red-soft);
}

.kpi .kpi-value {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 9px 0 5px;
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.07em;
}

.kpi .kpi-value small {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted-2);
}

.kpi .kpi-foot {
  font-size: 10.5px;
  color: var(--muted);
}

.kpi .kpi-foot b {
  font-weight: 600;
  color: var(--ink);
}

.kpi.dark {
  border-color: var(--green);
  color: #f5f7ec;
  background: var(--green);
}

.kpi.dark .kpi-top,
.kpi.dark .kpi-foot {
  color: rgba(245, 247, 236, 0.54);
}

.kpi.dark .kpi-top .trend {
  color: var(--lime);
  background: rgba(217, 245, 107, 0.12);
}

.kpi.dark .kpi-value small {
  color: rgba(245, 247, 236, 0.4);
}

.kpi.dark .kpi-foot b {
  color: var(--lime);
}

.kpi.dark::after {
  content: "";
  position: absolute;
  right: -35px;
  bottom: -58px;
  width: 130px;
  height: 130px;
  border: 1px solid rgba(217, 245, 107, 0.22);
  border-radius: 50%;
}

/* ---------- Panels / section headers ---------- */

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.section {
  margin-top: 38px;
}

#roster,
#testing {
  scroll-margin-top: 88px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 17px;
}

.section-head h2 {
  margin-top: 7px;
  font-size: clamp(25px, 2.35vw, 34px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.section-head h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

.section-head p.section-sub {
  margin-top: 7px;
  font-size: 12px;
  color: var(--muted);
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 4px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
}

.section-link svg {
  width: 11px;
  height: 11px;
}

/* ---------- Testing board ---------- */

.board {
  margin-top: 16px;
  overflow: hidden;
}

.board-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 23px 24px 19px;
  border-bottom: 1px solid var(--line);
}

.board-head h2 {
  margin-top: 6px;
  font-size: 23px;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.board-head h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.board-head p {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

.board-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.datestamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--muted);
}

.datestamp i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green-3);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
}

.test-board {
  min-width: 930px;
}

.test-board th {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  color: var(--muted);
  background: var(--paper-2);
  white-space: nowrap;
}

.test-board th span {
  display: block;
  margin-top: 2px;
  font-size: 7px;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--muted-2);
}

.test-board th:first-child {
  padding-left: 24px;
}

.test-board td {
  padding: 13px 16px;
  border-bottom: 1px solid #e7e3d7;
  vertical-align: middle;
}

.test-board tbody tr {
  transition: background 0.16s ease;
}

.test-board tbody tr:hover {
  background: #f7f4eb;
}

.test-board tbody tr:last-child td {
  border-bottom: 0;
}

.test-board td:first-child {
  padding-left: 24px;
}

.board-player {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 176px;
}

.board-avatar {
  position: relative;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 50%;
  background: var(--bone-deep);
}

.board-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.3);
}

.board-player-copy {
  min-width: 0;
}

.board-player-copy b {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.board-player-copy span {
  display: block;
  margin-top: 1px;
  font-size: 8.5px;
  color: var(--muted);
  white-space: nowrap;
}

.measure {
  min-width: 148px;
}

.lr-pair {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.lr-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 8.5px;
}

.lr-row .leg {
  width: 8px;
  color: var(--muted-2);
}

.lr-row .bar {
  position: relative;
  flex: 1;
  height: 4px;
  overflow: hidden;
  border-radius: 3px;
  background: #e7e2d4;
}

.lr-row .bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #9eaa9e;
}

.lr-row.involved .bar i {
  background: var(--orange);
}

.lr-row.involved .leg {
  color: var(--orange);
}

.lr-row b {
  width: 28px;
  font-size: 10px;
  font-weight: 500;
  text-align: right;
  color: var(--ink);
}

.lsi-cell {
  min-width: 100px;
}

.lsi {
  display: flex;
  align-items: center;
  gap: 7px;
}

.lsi-val {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.lsi-val.good { color: var(--green-2); }
.lsi-val.warn { color: var(--amber); }
.lsi-val.risk { color: var(--red); }

.lsi-track {
  width: 42px;
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
  background: #e4dfd1;
}

.lsi-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green-3);
}

.lsi-track i.warn { background: var(--amber); }
.lsi-track i.risk { background: var(--orange); }

.phase-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 8px;
  white-space: nowrap;
  color: var(--muted);
  background: var(--paper);
}

.phase-badge.rtp {
  color: var(--green-2);
  border-color: #c5d9a6;
  background: var(--lime-2);
}

.board-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  border-top: 1px solid var(--line);
  background: #f7f4eb;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.legend {
  display: flex;
  align-items: center;
  gap: 13px;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9eaa9e;
}

.legend i.involved {
  background: var(--orange);
}

/* ---------- Roster ---------- */

.roster-tools {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.filters {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(251, 250, 245, 0.6);
}

.filter-chip {
  height: 27px;
  padding: 0 9px;
  border: 0;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: transparent;
  transition: background 0.16s ease, color 0.16s ease;
}

.filter-chip:hover {
  color: var(--ink);
  background: rgba(19, 32, 24, 0.05);
}

.filter-chip.active {
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 1px 4px rgba(19, 32, 24, 0.12);
}

.roster-search {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 165px;
  height: 35px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(251, 250, 245, 0.6);
}

.roster-search svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  color: var(--muted-2);
}

.roster-search input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  font-size: 10px;
  color: var(--ink);
  background: transparent;
}

.roster-search input::placeholder {
  color: var(--muted-2);
}

.player-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.player-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.player-card:hover {
  z-index: 2;
  border-color: #c8c2b2;
  box-shadow: 0 22px 48px -26px rgba(19, 32, 24, 0.36);
  transform: translateY(-3px);
}

.card-photo {
  position: relative;
  height: 225px;
  overflow: hidden;
  background:
    radial-gradient(80% 70% at 70% 20%, rgba(217, 245, 107, 0.5), transparent 65%),
    #cfd6c1;
}

.card-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 25, 17, 0) 38%, rgba(10, 25, 17, 0.55) 100%),
    linear-gradient(90deg, rgba(18, 63, 44, 0.22), transparent 60%);
}

.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 23%;
  filter: grayscale(0.55) contrast(1.04) sepia(0.08);
  mix-blend-mode: multiply;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.player-card:hover .card-photo img {
  transform: scale(1.035);
}

.card-status {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f3f4e9;
  background: rgba(16, 38, 26, 0.7);
  backdrop-filter: blur(6px);
}

.card-status i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--orange);
}

.card-status.rtp i {
  background: var(--lime);
}

.card-phase {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 7.5px;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(16, 38, 26, 0.4);
  backdrop-filter: blur(6px);
}

.card-number {
  position: absolute;
  right: 14px;
  bottom: -13px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 86px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.1em;
  color: rgba(242, 247, 226, 0.22);
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px 17px 14px;
}

.card-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.card-readiness {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink);
}

.card-readiness b {
  font-weight: 500;
}

.card-readiness i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green-3);
}

.player-card h3 {
  margin: 4px 0 4px;
  font-size: 21px;
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.player-card h3 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

.card-injury {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--muted);
}

.card-injury b {
  font-weight: 600;
  color: var(--ink-2);
}

.card-injury::after {
  content: "";
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--muted-2);
}

.card-injury span {
  white-space: nowrap;
}

.card-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin: 14px 0 12px;
  padding: 9px 0;
  border-top: 1px solid #e7e3d6;
  border-bottom: 1px solid #e7e3d6;
}

.card-metric {
  min-width: 0;
}

.card-metric > span {
  display: block;
  margin-bottom: 3px;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}

.card-metric b {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.card-metric b em {
  font-style: normal;
  font-size: 7px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted-2);
}

.card-metric b .slash {
  color: var(--muted-2);
}

.card-metric b .inj {
  color: var(--orange);
}

.card-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  font-family: var(--mono);
  font-size: 7.5px;
  color: var(--muted);
}

.card-foot .arrow {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.player-card:hover .card-foot .arrow {
  border-color: var(--green);
  background: var(--lime);
}

.card-foot .arrow svg {
  width: 10px;
  height: 10px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 40px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  text-align: center;
  color: var(--muted);
}

.empty-state b {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.add-player-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  min-height: 393px;
  padding: 22px;
  border: 1px dashed #c9c3b2;
  border-radius: 18px;
  background:
    repeating-linear-gradient(135deg, transparent 0, transparent 9px, rgba(19, 32, 24, 0.025) 9px, rgba(19, 32, 24, 0.025) 10px),
    rgba(251, 250, 245, 0.42);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.add-player-card:hover {
  border-color: var(--green-3);
  background-color: var(--paper);
}

.add-player-card .plus {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
}

.add-player-card h3 {
  margin-top: 16px;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.add-player-card p {
  max-width: 230px;
  margin-top: 5px;
  font-size: 10.5px;
  color: var(--muted);
}

.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 40px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.03em;
  color: var(--muted-2);
}

.page-footer b {
  color: var(--muted);
  font-weight: 500;
}

/* ---------- Profile ---------- */

.profile-page {
  max-width: 1260px;
  margin: 0 auto;
}

.profile-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color 0.18s ease;
}

.back-link:hover {
  color: var(--ink);
}

.back-link svg {
  width: 11px;
  height: 11px;
}

.profile-index {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}

.profile-hero {
  position: relative;
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr) 292px;
  gap: 27px;
  min-height: 344px;
  padding: 27px;
  overflow: hidden;
  border-radius: 24px;
  color: #f3f5e9;
  background:
    radial-gradient(65% 100% at 5% 0%, rgba(66, 121, 82, 0.48), transparent 65%),
    repeating-linear-gradient(90deg, transparent 0, transparent 89px, rgba(255, 255, 255, 0.025) 90px),
    repeating-linear-gradient(0deg, transparent 0, transparent 89px, rgba(255, 255, 255, 0.025) 90px),
    #113a28;
  box-shadow: 0 30px 65px -38px rgba(12, 40, 26, 0.65);
}

.profile-hero::before {
  content: "";
  position: absolute;
  top: -50px;
  right: 200px;
  width: 350px;
  height: 350px;
  border: 1px solid rgba(217, 245, 107, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.profile-hero::after {
  content: "";
  position: absolute;
  top: -10px;
  right: 240px;
  width: 270px;
  height: 270px;
  border: 1px solid rgba(217, 245, 107, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.profile-portrait {
  position: relative;
  z-index: 2;
  min-height: 290px;
  overflow: hidden;
  border-radius: 15px;
  background: #b9c4ae;
}

.profile-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 45%, rgba(11, 30, 20, 0.5) 100%),
    linear-gradient(90deg, rgba(18, 63, 44, 0.35), transparent 60%);
}

.profile-portrait img {
  width: 100%;
  height: 100%;
  min-height: 290px;
  object-fit: cover;
  object-position: center 15%;
  filter: grayscale(0.75) contrast(1.04) sepia(0.04);
}

.portrait-number {
  position: absolute;
  right: 12px;
  bottom: -23px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 116px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.12em;
  color: rgba(245, 248, 233, 0.2);
}

.portrait-crest {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.62);
  background: rgba(10, 25, 17, 0.38);
  backdrop-filter: blur(5px);
}

.portrait-crest b {
  font-weight: 500;
  color: var(--lime);
}

.portrait-tag {
  position: absolute;
  bottom: 12px;
  left: 13px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.72);
}

.portrait-tag i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lime);
}

.profile-intro {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  padding: 8px 0;
}

.profile-intro .eyebrow {
  color: rgba(245, 248, 233, 0.5);
}

.profile-intro .eyebrow .idx {
  color: var(--lime);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

.profile-intro h1 {
  margin: 14px 0 10px;
  font-size: clamp(42px, 4.8vw, 68px);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.profile-intro h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.035em;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.02em;
  color: rgba(245, 248, 233, 0.55);
}

.profile-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-meta span + span::before {
  content: "";
  width: 2px;
  height: 2px;
  margin-right: 1px;
  border-radius: 50%;
  background: rgba(245, 248, 233, 0.3);
}

.profile-injury-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.injury-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 29px;
  padding: 0 10px;
  border: 1px solid rgba(233, 93, 51, 0.36);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 500;
  color: #ffd8ca;
  background: rgba(233, 93, 51, 0.14);
}

.injury-pill i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
}

.side-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 29px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 8px;
  color: rgba(245, 248, 233, 0.62);
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 21px;
}

.profile-actions .btn {
  height: 38px;
  font-size: 10.5px;
}

.profile-actions .btn-ghost {
  border-color: rgba(255, 255, 255, 0.17);
  color: #f3f5e9;
  background: rgba(255, 255, 255, 0.055);
}

.profile-actions .btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
}

.phase-panel {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(10px);
}

.phase-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.readiness-ring {
  position: relative;
  width: 60px;
  height: 60px;
  flex: 0 0 auto;
}

.readiness-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.readiness-ring .ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 4;
}

.readiness-ring .ring-fill {
  fill: none;
  stroke: var(--lime);
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}

.readiness-ring .ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  line-height: 1;
}

.readiness-ring .ring-label b {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.05em;
}

.readiness-ring .ring-label span {
  margin-top: 2px;
  font-size: 5.5px;
  letter-spacing: 0.08em;
  color: rgba(245, 248, 233, 0.5);
}

.phase-panel-title p {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 248, 233, 0.4);
}

.phase-panel-title h3 {
  margin-top: 3px;
  font-size: 13px;
  font-weight: 500;
}

.phase-panel-title small {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 7.5px;
  color: rgba(245, 248, 233, 0.45);
}

.phase-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 12px;
}

.phase-step {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 28px;
  font-size: 9.5px;
  color: rgba(245, 248, 233, 0.4);
}

.phase-step .step-dot {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 6px;
  color: rgba(245, 248, 233, 0.45);
}

.phase-step.done {
  color: rgba(245, 248, 233, 0.56);
}

.phase-step.done .step-dot {
  color: var(--green);
  border-color: var(--lime);
  background: var(--lime);
}

.phase-step.current {
  color: #fff;
}

.phase-step.current .step-dot {
  color: var(--ink);
  border-color: var(--lime);
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(217, 245, 107, 0.15);
}

.phase-step.current .step-name::after {
  content: "NOW";
  margin-left: 5px;
  padding: 1px 3px;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 5px;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: var(--lime);
  vertical-align: 1px;
}

.phase-step .step-window {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 6.5px;
  color: rgba(245, 248, 233, 0.26);
}

.phase-panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--mono);
  font-size: 7px;
  color: rgba(245, 248, 233, 0.4);
}

.phase-panel-foot b {
  color: var(--lime);
  font-weight: 500;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 306px;
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.profile-main,
.profile-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.profile-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 21px 23px 17px;
  border-bottom: 1px solid var(--line);
}

.profile-panel-head h2 {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.profile-panel-head h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

.profile-panel-head p {
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--muted);
}

.updated-stamp {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-top: 3px;
  font-family: var(--mono);
  font-size: 7.5px;
  color: var(--muted-2);
  white-space: nowrap;
}

.updated-stamp i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green-3);
}

.rehab-body {
  padding: 20px 23px 22px;
}

.rehab-summary {
  max-width: 760px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-2);
}

.rehab-summary strong {
  font-weight: 600;
  color: var(--ink);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 20px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.detail {
  min-height: 66px;
  padding: 11px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(246, 243, 234, 0.45);
}

.detail dt {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.detail dd {
  margin: 4px 0 0;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
}

.detail dd small {
  display: block;
  margin-top: 1px;
  font-size: 7.5px;
  font-weight: 400;
  color: var(--muted);
}

.focus-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.focus-row > span {
  margin-right: 2px;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.focus-tag {
  padding: 5px 8px;
  border: 1px solid #d6ddc3;
  border-radius: 5px;
  font-size: 8.5px;
  color: var(--green-2);
  background: #f1f6e1;
}

/* ---------- Gym testing cards ---------- */

.gym-list {
  display: flex;
  flex-direction: column;
  padding: 3px 23px 20px;
}

.gym-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 82px;
  gap: 19px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid #e7e3d6;
}

.gym-card:last-child {
  border-bottom: 0;
}

.gym-id {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.gym-index {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 8px;
  color: var(--muted);
  background: var(--paper-2);
}

.gym-id h3 {
  margin-top: 1px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.gym-id p {
  margin-top: 3px;
  font-size: 8px;
  line-height: 1.4;
  color: var(--muted);
}

.gym-id p b {
  font-weight: 500;
  color: var(--ink-2);
}

.gym-readouts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  min-width: 0;
}

.leg-readout {
  min-width: 0;
}

.leg-readout-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin-bottom: 4px;
}

.leg-readout-head span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.leg-readout-head span i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #9eaa9e;
}

.leg-readout.involved .leg-readout-head span {
  color: var(--orange);
}

.leg-readout.involved .leg-readout-head span i {
  background: var(--orange);
}

.leg-readout-head em {
  font-family: var(--mono);
  font-size: 6.5px;
  font-style: normal;
  letter-spacing: 0.02em;
  color: var(--muted-2);
}

.leg-value {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-bottom: 7px;
  font-family: var(--mono);
  font-size: 23px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.07em;
}

.leg-value small {
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted-2);
}

.leg-bar {
  position: relative;
  height: 6px;
  border-radius: 4px;
  background: #e8e3d5;
}

.leg-bar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #a8b3a2;
}

.leg-readout.involved .leg-bar > i {
  background: var(--orange);
}

.leg-bar .target-mark {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 1px;
  background: var(--ink);
  opacity: 0.42;
}

.leg-readout-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 6.5px;
  color: var(--muted-2);
}

.leg-readout-foot b {
  font-weight: 500;
  color: var(--muted);
}

.gym-lsi {
  padding-left: 15px;
  border-left: 1px solid var(--line);
}

.gym-lsi span {
  display: block;
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}

.gym-lsi b {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.06em;
}

.gym-lsi b.risk { color: var(--red); }
.gym-lsi b.warn { color: var(--amber); }
.gym-lsi b.good { color: var(--green-2); }

.gym-lsi small {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 6.5px;
  color: var(--muted-2);
}

.gym-lsi .mini-spark {
  width: 58px;
  height: 16px;
  margin-top: 6px;
}

.asym-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 23px 22px;
  padding: 11px 12px;
  border: 1px solid #dee4cc;
  border-radius: 9px;
  background: #f4f7e9;
}

.asym-note .info-icon {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 11px;
  font-style: italic;
  color: var(--green);
  background: var(--lime);
}

.asym-note p {
  font-size: 8.5px;
  line-height: 1.55;
  color: var(--muted);
}

.asym-note b {
  color: var(--ink-2);
  font-weight: 600;
}

/* ---------- History ---------- */

.history-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
}

.history-table {
  min-width: 700px;
}

.history-table th {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-align: left;
  color: var(--muted-2);
  background: var(--paper-2);
}

.history-table th:first-child,
.history-table td:first-child {
  padding-left: 23px;
}

.history-table th:last-child,
.history-table td:last-child {
  padding-right: 23px;
}

.history-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #eae6da;
  font-size: 9px;
  color: var(--muted);
  vertical-align: top;
}

.history-table tbody tr:last-child td {
  border-bottom: 0;
}

.history-table tbody tr:hover {
  background: #f8f5ed;
}

.history-date b {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.history-date span {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 6.5px;
  color: var(--muted-2);
}

.history-values {
  display: flex;
  gap: 3px;
  font-family: var(--mono);
  font-size: 9px;
  white-space: nowrap;
}

.history-values .l { color: var(--ink-2); }
.history-values .r { color: var(--orange); font-weight: 500; }
.history-values .div { color: var(--line); }

.history-note {
  max-width: 240px;
  font-size: 8.5px;
  line-height: 1.45;
}

.history-clinician {
  font-family: var(--mono);
  font-size: 7px;
  white-space: nowrap;
  color: var(--muted-2);
}

/* ---------- Rail cards ---------- */

.rail-card {
  padding: 19px;
}

.rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}

.rail-head h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.rail-head .rail-idx {
  font-family: var(--mono);
  font-size: 7.5px;
  color: var(--muted-2);
}

.criteria-progress {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 13px;
  padding: 9px 10px;
  border: 1px solid #dde3cd;
  border-radius: 8px;
  background: #f3f7e7;
}

.criteria-progress .cp-num {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.05em;
}

.criteria-progress .cp-num small {
  font-size: 7px;
  font-weight: 400;
  color: var(--muted);
}

.criteria-progress p {
  font-size: 8px;
  line-height: 1.35;
  color: var(--muted);
}

.criteria-progress p b {
  display: block;
  font-size: 8.5px;
  font-weight: 600;
  color: var(--ink);
}

.criteria-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.criterion {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 6px 0;
  border: 0;
  text-align: left;
  background: transparent;
}

.criterion .check {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 1px;
  border: 1px solid #cfd5c1;
  border-radius: 4px;
  color: transparent;
  background: #fff;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.criterion .check svg {
  width: 9px;
  height: 9px;
}

.criterion.done .check {
  color: var(--green);
  border-color: var(--lime);
  background: var(--lime);
}

.criterion.pending .check {
  border-style: dashed;
  border-color: #d8cba9;
  background: #fcf6e8;
}

.criterion span {
  font-size: 9px;
  line-height: 1.4;
  color: var(--muted);
}

.criterion.done span {
  color: var(--ink-2);
}

.criterion.pending span {
  color: var(--muted);
}

.criterion:hover .check {
  border-color: var(--green-3);
}

.plan-list {
  display: flex;
  flex-direction: column;
}

.plan-row {
  display: grid;
  grid-template-columns: 31px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #ece8dc;
}

.plan-row:last-child {
  border-bottom: 0;
}

.plan-day {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.plan-row.today .plan-day {
  color: var(--green-2);
}

.plan-copy b {
  display: block;
  font-size: 9px;
  font-weight: 600;
  color: var(--ink-2);
}

.plan-copy span {
  display: block;
  font-size: 7.5px;
  color: var(--muted-2);
}

.plan-state {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d6d2c4;
}

.plan-row.today .plan-state {
  background: var(--orange);
  box-shadow: 0 0 0 3px rgba(233, 93, 51, 0.12);
}

.plan-row.done .plan-state {
  background: var(--green-3);
}

.clinician-line {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.clinician-avatar {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 8px;
  color: #f4f5ec;
  background: var(--green-2);
}

.clinician-line b {
  display: block;
  font-size: 8.5px;
  font-weight: 600;
}

.clinician-line span {
  display: block;
  font-size: 7px;
  color: var(--muted-2);
}

.clinician-line .btn {
  margin-left: auto;
}

.next-review {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: 6.5px;
  color: var(--muted);
}

.next-review b {
  font-weight: 500;
  color: var(--ink);
}

.contact-card {
  padding: 17px 18px;
  border-radius: 17px;
  color: #f2f4e9;
  background: var(--green);
}

.contact-card h3 {
  margin-top: 7px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.contact-card p {
  margin-top: 5px;
  font-size: 9px;
  line-height: 1.5;
  color: rgba(242, 244, 233, 0.55);
}

.contact-card .btn {
  width: 100%;
  margin-top: 13px;
}

/* ---------- Testing page ---------- */

.testing-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, 0.65fr);
  gap: 26px;
  padding: 33px 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 25px;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(217, 245, 107, 0.4), transparent 58%),
    var(--paper);
}

.testing-hero h1 {
  margin: 15px 0 12px;
  font-size: clamp(45px, 5.2vw, 68px);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.055em;
}

.testing-hero h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

.testing-hero .hero-lede {
  max-width: 480px;
}

.testing-hero-side {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-radius: 16px;
  color: #f3f5e9;
  background: var(--green);
}

.testing-hero-side .th-label {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(243, 245, 233, 0.45);
}

.testing-hero-side .th-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 38px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.07em;
  color: var(--lime);
}

.testing-hero-side .th-value small {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0;
  color: rgba(243, 245, 233, 0.45);
}

.testing-hero-side p {
  font-size: 10px;
  line-height: 1.5;
  color: rgba(243, 245, 233, 0.55);
}

.testing-hero-side .mini-row {
  display: flex;
  gap: 15px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-family: var(--mono);
  font-size: 7px;
  color: rgba(243, 245, 233, 0.45);
}

.testing-hero-side .mini-row b {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 500;
  color: #f3f5e9;
}

.test-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin-top: 15px;
}

.test-summary {
  padding: 18px 19px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.test-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.test-summary-head h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.test-summary-head .ts-index {
  font-family: var(--mono);
  font-size: 8px;
  color: var(--muted-2);
}

.test-summary-stats {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-top: 15px;
}

.ts-big {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.07em;
}

.ts-big small {
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted-2);
}

.ts-meta {
  display: flex;
  gap: 14px;
  margin-left: auto;
  font-family: var(--mono);
  font-size: 6.5px;
  line-height: 1.4;
  color: var(--muted-2);
  text-align: right;
}

.ts-meta b {
  display: block;
  font-size: 9px;
  font-weight: 500;
  color: var(--ink-2);
}

.ts-bar {
  position: relative;
  height: 5px;
  margin-top: 14px;
  border-radius: 4px;
  background: #e8e3d5;
}

.ts-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green-3);
}

.ts-bar i.warn { background: var(--amber); }
.ts-bar i.risk { background: var(--orange); }

.ts-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 6.5px;
  color: var(--muted-2);
}

.matrix-panel {
  margin-top: 16px;
  overflow: hidden;
}

.matrix-table {
  min-width: 980px;
}

.matrix-table th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  color: var(--muted);
  background: var(--paper-2);
  white-space: nowrap;
}

.matrix-table th small {
  display: block;
  font-size: 6.5px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted-2);
}

.matrix-table th:first-child,
.matrix-table td:first-child {
  padding-left: 23px;
}

.matrix-table td {
  padding: 12px;
  border-bottom: 1px solid #e9e5d9;
  font-family: var(--mono);
  font-size: 9px;
  vertical-align: middle;
}

.matrix-table tbody tr:hover {
  background: #f7f4eb;
}

.matrix-table tbody tr:last-child td {
  border-bottom: 0;
}

.matrix-values {
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.matrix-values .m-l,
.matrix-values .m-r {
  color: var(--ink-2);
}

.matrix-values .inj {
  color: var(--orange);
  font-weight: 500;
}

.matrix-values .m-sep {
  color: #c5c0b0;
}

.matrix-lsi {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 8px;
}

.matrix-lsi.good {
  color: var(--green-2);
  background: #edf5db;
}

.matrix-lsi.warn {
  color: #9a6b18;
  background: var(--amber-soft);
}

.matrix-lsi.risk {
  color: var(--red);
  background: var(--red-soft);
}

.matrix-overall {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.method-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 15px;
  margin-top: 16px;
}

.method-card {
  padding: 22px 23px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.method-card h3 {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.method-card h3 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

.method-card p {
  max-width: 620px;
  margin-top: 9px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}

.protocol-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 18px;
  margin-top: 15px;
}

.protocol-list li {
  display: flex;
  gap: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  font-size: 9px;
  line-height: 1.45;
  color: var(--muted);
}

.protocol-list li b {
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 500;
  color: var(--ink);
}

.symmetry-bars {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 15px;
}

.sym-bar-row {
  display: grid;
  grid-template-columns: 82px 1fr 32px;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 7.5px;
  color: var(--muted);
}

.sym-bar-row .sym-track {
  height: 5px;
  overflow: hidden;
  border-radius: 4px;
  background: #e8e3d5;
}

.sym-bar-row .sym-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green-3);
}

.sym-bar-row .sym-track i.warn { background: var(--amber); }
.sym-bar-row .sym-track i.risk { background: var(--orange); }

.sym-bar-row b {
  font-weight: 500;
  text-align: right;
  color: var(--ink-2);
}

/* ---------- Search overlay & modal ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 9vh 20px 30px;
  background: rgba(11, 25, 17, 0.56);
  backdrop-filter: blur(7px);
  animation: fade-in 0.18s ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(12px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.search-panel {
  width: min(590px, 100%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 40px 90px -25px rgba(0, 0, 0, 0.45);
  animation: slide-up 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.search-field {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
}

.search-field svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--muted);
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  font-size: 14px;
  background: transparent;
}

.search-field input::placeholder {
  color: var(--muted-2);
}

.search-field kbd {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 8px;
  color: var(--muted-2);
}

.search-results {
  max-height: 360px;
  padding: 7px;
  overflow-y: auto;
}

.search-label {
  padding: 9px 10px 5px;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.search-result {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  text-align: left;
  background: transparent;
  transition: background 0.15s ease;
}

.search-result:hover,
.search-result.active {
  background: var(--bone-deep);
}

.search-result-avatar {
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 50%;
  background: var(--bone-deep);
}

.search-result-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.4);
}

.search-result-copy {
  min-width: 0;
}

.search-result-copy b {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
}

.search-result-copy span {
  display: block;
  font-size: 8.5px;
  color: var(--muted);
}

.search-result-status {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 7.5px;
  color: var(--muted-2);
}

.search-result svg {
  width: 11px;
  height: 11px;
  color: var(--muted-2);
}

.search-empty {
  padding: 33px 20px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}

.modal {
  width: min(700px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.5);
  animation: slide-up 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin-top: 6px;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.modal-head h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

.modal-head p {
  margin-top: 3px;
  font-size: 10px;
  color: var(--muted);
}

.modal-close {
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
}

.modal-body {
  padding: 20px 24px 22px;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 24px;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
}

.modal-foot p {
  max-width: 340px;
  font-family: var(--mono);
  font-size: 6.5px;
  line-height: 1.5;
  color: var(--muted-2);
}

.modal-foot-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  height: 37px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: 0;
  font-size: 11px;
  background: #fffdf7;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.form-field textarea {
  height: 64px;
  padding-top: 8px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--green-3);
  box-shadow: 0 0 0 3px rgba(43, 115, 84, 0.1);
}

.form-field .unit-input {
  position: relative;
}

.form-field .unit-input input {
  padding-right: 30px;
}

.form-field .unit-input span {
  position: absolute;
  top: 50%;
  right: 10px;
  font-family: var(--mono);
  font-size: 7px;
  color: var(--muted-2);
  transform: translateY(-50%);
}

.form-section {
  margin-top: 19px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.form-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-section-title span {
  font-size: 6.5px;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--muted-2);
}

.test-input-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.test-input-group {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper-2);
}

.test-input-group > label {
  display: block;
  margin-bottom: 8px;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-2);
}

.lr-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.lr-inputs .form-field label {
  font-size: 6.5px;
}

.lr-inputs .form-field input {
  height: 32px;
  font-family: var(--mono);
}

.live-lsi {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 6.5px;
  color: var(--muted-2);
}

.live-lsi b {
  font-size: 8px;
  font-weight: 500;
  color: var(--ink-2);
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px 12px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  font-size: 11px;
  color: #f3f5e9;
  background: var(--green);
  box-shadow: 0 20px 40px -14px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast .toast-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: var(--ink);
  background: var(--lime);
}

.toast .toast-icon svg {
  width: 12px;
  height: 12px;
}

/* ---------- Reveal animation ---------- */

.reveal {
  animation: reveal 0.55s cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.reveal-2 { animation-delay: 0.06s; }
.reveal-3 { animation-delay: 0.12s; }
.reveal-4 { animation-delay: 0.18s; }

@keyframes reveal {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* ---------- Responsive ---------- */

@media (max-width: 1240px) {
  :root { --sidebar-w: 226px; }
  .content { padding: 26px; }
  .topbar { padding: 0 26px; }
  .hero { grid-template-columns: minmax(0, 1fr) 380px; padding: 28px; }
  .player-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-hero { grid-template-columns: 230px minmax(0, 1fr) 270px; gap: 20px; }
  .gym-card { grid-template-columns: 168px minmax(0, 1fr) 76px; gap: 14px; }
  .search-btn { width: 180px; }
}

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { min-height: auto; }
  .hero-visual { justify-content: flex-start; }
  .availability-card { max-width: 100%; }
  .floating-note { right: 22px; bottom: -14px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-rail { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .profile-rail .contact-card { grid-column: 1 / -1; }
  .profile-hero { grid-template-columns: 220px minmax(0, 1fr); }
  .phase-panel { grid-column: 1 / -1; display: grid; grid-template-columns: 190px 1fr; gap: 15px; align-items: center; }
  .phase-panel-head { border-bottom: 0; padding-bottom: 0; }
  .phase-list { margin-top: 0; display: grid; grid-template-columns: 1fr 1fr; }
  .phase-panel-foot { grid-column: 1 / -1; margin-top: 0; }
  .testing-hero { grid-template-columns: 1fr; }
  .test-summary-grid { grid-template-columns: 1fr 1fr; }
  .method-grid { grid-template-columns: 1fr; }
  .roster-tools { justify-content: flex-start; }
  .section-head { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 900px) {
  :root { --sidebar-w: 264px; }
  .app-shell { display: block; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 30px 0 60px rgba(0, 0, 0, 0.28);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  .nav-scrim {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: none;
    background: rgba(11, 25, 17, 0.4);
    backdrop-filter: blur(3px);
  }
  body.nav-open .nav-scrim { display: block; }
  .main { min-height: 100vh; }
  .mobile-menu { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
  .mobile-menu svg { width: 16px; height: 16px; }
  .topbar { height: 62px; padding: 0 18px; gap: 12px; }
  .live-pill { display: none; }
  .search-btn { width: 36px; padding: 0; justify-content: center; border-radius: 50%; }
  .search-btn span, .search-btn kbd { display: none; }
  .content { padding: 20px 18px 28px; }
  .hero { padding: 24px; }
  .board-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .profile-hero { grid-template-columns: 180px minmax(0, 1fr); padding: 20px; }
  .profile-portrait { min-height: 245px; }
  .profile-portrait img { min-height: 245px; }
  .profile-intro h1 { font-size: 44px; }
  .profile-rail { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .topbar .crumb span:first-child { display: none; }
  .topbar .crumb > svg { display: none; }
  .content { padding: 16px 14px 24px; }
  .hero { border-radius: 20px; padding: 21px; }
  .hero h1 { font-size: 43px; }
  .hero-foot { gap: 15px; flex-wrap: wrap; }
  .hero-foot div { min-width: 44%; }
  .availability-card { padding: 14px; }
  .pitch { height: 170px; }
  .pitch-label { display: none; }
  .floating-note { display: none; }
  .kpis { gap: 8px; }
  .kpi { padding: 13px; border-radius: 12px; }
  .kpi .kpi-value { font-size: 24px; }
  .kpi .kpi-foot { font-size: 9px; }
  .section { margin-top: 28px; }
  .section-head { gap: 12px; }
  .section-head h2 { font-size: 27px; }
  .player-grid { grid-template-columns: 1fr; }
  .card-photo { height: 250px; }
  .add-player-card { min-height: 200px; }
  .board-head { padding: 18px 16px 15px; }
  .board-foot { padding: 11px 16px; align-items: flex-start; flex-direction: column; gap: 8px; }
  .profile-topline { margin-bottom: 9px; }
  .profile-hero { grid-template-columns: 1fr; padding: 15px; border-radius: 19px; }
  .profile-portrait { min-height: 270px; max-height: 320px; }
  .profile-intro { padding: 5px 4px 8px; }
  .profile-intro h1 { font-size: 46px; }
  .profile-injury-line { margin-top: 14px; }
  .phase-panel { display: flex; padding: 14px; }
  .phase-list { display: flex; margin-top: 11px; }
  .profile-panel-head { padding: 17px 16px 14px; }
  .rehab-body { padding: 16px; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .gym-list { padding: 2px 16px 15px; }
  .gym-card { grid-template-columns: 1fr; gap: 0; padding: 15px 0; }
  .gym-id { grid-column: 1; margin-bottom: 13px; }
  .gym-readouts { grid-column: 1; grid-row: auto; gap: 12px; }
  .gym-lsi {
    grid-column: 1;
    grid-row: auto;
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin-top: 12px;
    padding: 10px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .gym-lsi span { font-size: 7px; }
  .gym-lsi b { margin-top: 0; font-size: 17px; }
  .gym-lsi small { margin-top: 0; }
  .gym-lsi .mini-spark { margin: 0 0 0 auto; }
  .leg-readout-head em { display: none; }
  .asym-note { margin: 0 16px 17px; }
  .test-summary-grid { grid-template-columns: 1fr; }
  .testing-hero { padding: 22px; }
  .testing-hero h1 { font-size: 43px; }
  .protocol-list { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .test-input-grid { grid-template-columns: 1fr; }
  .modal-head, .modal-body, .modal-foot { padding-left: 17px; padding-right: 17px; }
  .modal-foot { align-items: flex-start; flex-direction: column; }
  .modal-foot-actions { width: 100%; margin-left: 0; }
  .modal-foot-actions .btn { flex: 1; }
  .page-footer { align-items: flex-start; flex-direction: column; gap: 8px; }
  .toast { right: 14px; bottom: 14px; left: 14px; }
}

@media (max-width: 400px) {
  .hero h1 { font-size: 38px; }
  .profile-intro h1 { font-size: 40px; }
  .profile-actions .btn { width: 100%; }
}

/* ---------- Print ---------- */

@media print {
  .sidebar,
  .topbar,
  .profile-actions,
  .modal,
  .overlay,
  .toast,
  .page-footer,
  .profile-rail .contact-card {
    display: none !important;
  }
  .app-shell { display: block; }
  .main { grid-column: auto; }
  .content { padding: 0; max-width: none; }
  body { background: #fff; font-size: 11px; }
  .profile-hero { color: #111; background: #f1efe5; box-shadow: none; }
  .profile-intro h1, .profile-intro .eyebrow { color: #111; }
  .profile-intro .eyebrow { color: #555; }
  .profile-meta, .side-pill, .phase-panel { color: #333; }
  .phase-panel { border-color: #ccc; background: #faf8f0; }
  .phase-step, .phase-step .step-window, .phase-panel-foot { color: #555; }
  .profile-grid { display: block; }
  .profile-main > .panel, .profile-rail > .panel { break-inside: avoid; margin-bottom: 10px; }
  .profile-rail { display: block; }
  .panel { box-shadow: none; }
}
