/* Soccer Fit — styles */
:root {
  --pitch: #0e7a3e;
  --pitch-dark: #0a5c2f;
  --pitch-deep: #07421f;
  --navy: #14213d;
  --page: #f6f7f3;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --hairline: #e1e0d9;
  --border: rgba(11, 11, 11, 0.10);
  --blue: #2a78d6;          /* data marks (water, activity) */
  --blue-soft: #cde2fb;
  --good: #0ca30c;
  --good-text: #006300;
  --warn: #fab219;
  --crit: #d03b3b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(11, 11, 11, 0.05), 0 4px 14px rgba(11, 11, 11, 0.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--page);
  color: var(--ink);
  line-height: 1.5;
}
a { color: var(--pitch-dark); }
h2 { font-size: 1.5rem; margin: 0 0 4px; }
h3 { font-size: 1.05rem; margin: 0 0 8px; }
h4 { margin: 10px 0 2px; font-size: 0.9rem; }
p { margin: 6px 0; }
code { background: #eef0ea; padding: 1px 6px; border-radius: 6px; font-size: 0.85em; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(135deg, var(--pitch-deep), var(--pitch-dark) 55%, var(--pitch));
  color: #fff;
  box-shadow: 0 2px 10px rgba(7, 66, 31, 0.35);
}
.head-inner {
  max-width: 1100px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.brand { display: flex; align-items: baseline; gap: 8px; margin-right: auto; }
.brand .ball { font-size: 1.5rem; }
.brand h1 { font-size: 1.35rem; margin: 0; letter-spacing: 0.5px; }
.brand .tagline { font-size: 0.72rem; opacity: 0.85; letter-spacing: 1.5px; text-transform: uppercase; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-tab {
  appearance: none; border: 0; cursor: pointer;
  background: transparent; color: rgba(255, 255, 255, 0.85);
  font: inherit; font-weight: 600; font-size: 0.92rem;
  padding: 8px 14px; border-radius: 999px; text-decoration: none;
}
.nav-tab:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.nav-tab.on { background: #fff; color: var(--pitch-deep); }
.player-pick { font-size: 0.8rem; display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,0.9); }
.player-pick select {
  font: inherit; font-weight: 600; padding: 6px 10px; border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.14); color: #fff;
}
.player-pick select option { color: var(--ink); }

/* ---------- layout ---------- */
.wrap { max-width: 1100px; margin: 0 auto; padding: 22px 20px 60px; }
.wrap.narrow { max-width: 520px; }
.tab-head { margin-bottom: 14px; }
.section-intro { color: var(--ink-2); max-width: 72ch; margin: 4px 0 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.muted { color: var(--ink-2); font-size: 0.9rem; }
.small-note { font-size: 0.82rem; }
.mt { margin-top: 16px; }

/* ---------- home ---------- */
.hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.streak-badge {
  text-align: center; background: linear-gradient(135deg, #fff7e6, #ffedc7);
  border: 1px solid #f3ddae; border-radius: var(--radius); padding: 10px 20px;
}
.streak-num { display: block; font-size: 2rem; font-weight: 800; line-height: 1; }
.streak-lab { font-size: 0.78rem; color: var(--ink-2); }
.check-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; margin: 4px -10px;
  border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 500;
}
.check-row:hover { background: #f1f3ec; }
.check-box {
  width: 22px; height: 22px; flex: none; border-radius: 7px; border: 2px solid #c9c8c0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.8rem; color: #fff; background: #fff;
}
.check-row.done .check-box { background: var(--good); border-color: var(--good); }
.check-row.done { color: var(--good-text); text-decoration: line-through; text-decoration-thickness: 1px; }

.water-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.water-num { font-size: 1.7rem; font-weight: 800; }
.water-num span { font-size: 0.95rem; font-weight: 600; color: var(--muted); }
.water-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.water-btn { display: flex; flex-direction: column; align-items: center; line-height: 1.2; gap: 1px; }
.water-btn small { font-weight: 500; font-size: 0.66rem; opacity: 0.85; }
.meter { height: 12px; background: var(--blue-soft); border-radius: 999px; overflow: hidden; }
.meter-fill { height: 100%; background: var(--blue); border-radius: 999px 0 0 999px; transition: width 0.3s; }
.meter-fill.green { background: var(--pitch); }

.spark { display: flex; align-items: flex-end; gap: 10px; height: 92px; padding-top: 8px; }
.spark-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; flex: 1; height: 100%; }
.spark-bar { width: 100%; max-width: 34px; background: var(--blue); border-radius: 4px 4px 0 0; }
.spark-bar.zero { background: var(--hairline); }
.spark-lab { font-size: 0.72rem; color: var(--muted); }
.spark-lab.today { font-weight: 700; color: var(--ink); }

.habit-list { margin: 6px 0; padding-left: 20px; }
.habit-list li { margin: 6px 0; }
.warning-box {
  margin-top: 10px; padding: 10px 12px; border-radius: 10px; font-size: 0.86rem; font-weight: 600;
  background: #fdeeee; border: 1px solid #f2c7c7; color: #8c1d1d;
}

/* ---------- buttons ---------- */
.btn {
  appearance: none; cursor: pointer; font: inherit; font-weight: 700; font-size: 0.9rem;
  background: var(--pitch); color: #fff; border: 1px solid var(--pitch-dark);
  padding: 9px 16px; border-radius: 10px;
}
.btn:hover { background: var(--pitch-dark); }
.btn.small { padding: 6px 10px; font-size: 0.8rem; border-radius: 8px; }
.btn.ghost { background: transparent; color: var(--pitch-dark); border-color: var(--hairline); }
.btn.ghost:hover { background: #eef2ea; }
.btn.danger { background: transparent; color: var(--crit); border-color: var(--hairline); }
.btn.danger:hover { background: #fdeeee; }
.btn.done-btn { background: var(--good); border-color: var(--good-text); }

/* ---------- fuel ---------- */
.goal-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 14px 0; }
.goal {
  display: flex; gap: 12px; align-items: flex-start;
  background: linear-gradient(135deg, #ffffff, #f2f7ef);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow);
}
.goal-icon { font-size: 1.6rem; }
.goal p { margin: 2px 0 0; font-size: 0.85rem; color: var(--ink-2); }
.subnav { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 18px; }
.subtab {
  appearance: none; cursor: pointer; font: inherit; font-weight: 600; font-size: 0.88rem;
  border: 1px solid var(--hairline); background: var(--surface); color: var(--ink-2);
  padding: 8px 14px; border-radius: 999px;
}
.subtab:hover { border-color: var(--pitch); color: var(--pitch-dark); }
.subtab.on { background: var(--navy); border-color: var(--navy); color: #fff; }

.pick-list { margin: 8px 0 0; padding-left: 20px; }
.pick-list li { margin: 5px 0; }
.avoid {
  margin-top: 12px; padding: 9px 12px; border-radius: 10px; font-size: 0.85rem;
  background: #fdeeee; border: 1px solid #f2c7c7; color: #8c1d1d;
}
.combo-card { background: linear-gradient(135deg, #fffdf4, #fff8e0); }
.hot-card { background: linear-gradient(135deg, #fff8f3, #ffefe3); }
.coach-card { border-left: 4px solid var(--pitch); }

.sched { width: 100%; border-collapse: collapse; margin-top: 6px; }
.sched td { padding: 7px 4px; border-bottom: 1px solid var(--hairline); font-size: 0.9rem; }
.sched tr:last-child td { border-bottom: 0; }
.sched .amt { text-align: right; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.total-line { font-weight: 700; font-size: 0.88rem; margin-top: 8px; }

.timeline { margin-top: 10px; }
.tl-row { display: grid; grid-template-columns: 74px 18px 1fr; gap: 8px; position: relative; padding-bottom: 16px; }
.tl-row::before {
  content: ""; position: absolute; left: 81px; top: 14px; bottom: -2px; width: 2px; background: var(--hairline);
}
.tl-row:last-child::before { display: none; }
.tl-time { font-size: 0.8rem; font-weight: 700; text-align: right; padding-top: 1px; font-variant-numeric: tabular-nums; }
.tl-dot {
  width: 12px; height: 12px; border-radius: 50%; background: #fff;
  border: 3px solid var(--blue); margin-top: 3px; z-index: 1; justify-self: center;
}
.tl-game .tl-dot { border-color: var(--pitch); background: var(--pitch); }
.tl-body strong { font-size: 0.95rem; }
.tl-body p { margin: 1px 0 0; font-size: 0.85rem; color: var(--ink-2); }
.tl-game .tl-body strong { color: var(--pitch-dark); }

/* ---------- match day ---------- */
.md-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.md-phase.completed { border-color: var(--good); box-shadow: 0 0 0 1px var(--good), var(--shadow); }
.md-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.md-icon {
  font-size: 1.5rem; flex: none; width: 48px; height: 48px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #eef4ec; border: 1px solid var(--hairline);
}
.md-phase.completed .md-icon { background: #e7f6e7; border-color: var(--good); }
.md-titles { flex: 1; min-width: 0; }
.md-titles h3 { margin: 0; }
.md-time {
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--pitch-dark);
}
.water-line {
  background: #e8f1fc; border-left: 4px solid var(--blue); border-radius: 8px;
  padding: 9px 12px; margin: 8px 0; font-size: 0.9rem; font-weight: 600;
}
.md-options-label { font-size: 0.82rem; font-weight: 700; color: var(--ink-2); margin: 10px 0 0; }
.pick-list.two-col { columns: 2; column-gap: 24px; }
@media (max-width: 560px) { .pick-list.two-col { columns: 1; } }

/* ---------- workouts & skills ---------- */
.rules-card { margin-bottom: 16px; border-left: 4px solid var(--warn); }
.wk-card { display: flex; flex-direction: column; }
.wk-card.completed { border-color: var(--good); box-shadow: 0 0 0 1px var(--good), var(--shadow); }
.wk-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.tag {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px; background: var(--navy); color: #fff;
}
.tag-strength { background: #6b3fa0; }
.tag-speed { background: #b03a2e; }
.tag-conditioning { background: #b9770e; }
.tag-injuryprevention { background: #1a6f8b; }
.tag-warmup { background: #5d6d7e; }
.tag-skill { background: var(--pitch-dark); }
.meta { font-size: 0.78rem; color: var(--muted); }
.ex-table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.ex-table td { padding: 6px 4px; border-bottom: 1px solid var(--hairline); font-size: 0.9rem; vertical-align: top; }
.ex-table tr:last-child td { border-bottom: 0; }
.ex-name { font-weight: 600; }
.ex-dose { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.cue-row td { border-bottom: 1px solid var(--hairline) !important; padding-top: 0 !important; font-size: 0.8rem !important; color: var(--muted); }
.steps { margin: 8px 0; padding-left: 20px; }
.steps li { margin: 5px 0; font-size: 0.92rem; }
.challenge {
  margin: 8px 0; padding: 9px 12px; border-radius: 10px; font-size: 0.86rem;
  background: #f0f7ee; border: 1px solid #cfe6c9;
}
.card-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.coach-badge {
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase;
  background: var(--pitch); color: #fff; padding: 2px 8px; border-radius: 999px; vertical-align: middle;
}
.week-table { width: 100%; border-collapse: collapse; }
.week-table td { padding: 8px 6px; border-bottom: 1px solid var(--hairline); font-size: 0.92rem; }
.week-table tr:last-child td { border-bottom: 0; }
.wt-day { font-weight: 700; width: 110px; }
.wt-match td { background: #f0f7ee; }
.wt-rest td { color: var(--muted); }

/* ---------- food log ---------- */
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack label { display: flex; flex-direction: column; gap: 4px; font-size: 0.82rem; font-weight: 600; color: var(--ink-2); }
.field-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.field-row input { flex: 1; min-width: 160px; }
input, select, textarea {
  font: inherit; padding: 9px 11px; border-radius: 9px; border: 1px solid #cfcec6; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--pitch); outline-offset: 1px; border-color: var(--pitch); }
textarea { width: 100%; resize: vertical; }
.log-list { list-style: none; margin: 12px 0 0; padding: 0; }
.log-list li {
  display: flex; align-items: center; gap: 8px; padding: 8px 2px;
  border-bottom: 1px solid var(--hairline); font-size: 0.9rem;
}
.log-list li:last-child { border-bottom: 0; }
.chip {
  flex: none; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px;
  background: #eef0ea; color: var(--ink-2); padding: 3px 8px; border-radius: 999px;
}
.x {
  margin-left: auto; appearance: none; border: 0; background: transparent; cursor: pointer;
  color: var(--muted); font-size: 0.85rem; padding: 4px 6px; border-radius: 6px;
}
.x:hover { background: #fdeeee; color: var(--crit); }

/* ---------- coach ---------- */
.gate { text-align: center; padding: 34px 26px; }
.gate .field-row { justify-content: center; margin-top: 14px; }
.gate input { max-width: 160px; text-align: center; letter-spacing: 4px; font-weight: 700; }
.coach-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px;
}
.tile-lab { font-size: 0.78rem; font-weight: 600; color: var(--ink-2); }
.tile-val { font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.tile-val small { font-size: 1rem; color: var(--muted); font-weight: 700; }
.tile-alert { border-color: var(--crit); box-shadow: 0 0 0 1px var(--crit), var(--shadow); }
.tile-alert .tile-val { color: var(--crit); }

.pr-table { display: flex; flex-direction: column; }
.pr-row { border-bottom: 1px solid var(--hairline); }
.pr-row:last-child { border-bottom: 0; }
.pr-main {
  display: grid; grid-template-columns: minmax(150px, 1.3fr) 110px minmax(220px, 1.6fr) 130px;
  gap: 12px; align-items: center; padding: 11px 4px; cursor: pointer; border-radius: 10px;
}
.pr-main:hover { background: #f4f6f0; }
.pr-name { display: flex; flex-direction: column; line-height: 1.25; }
.pr-name .muted { font-size: 0.78rem; }
.mini-spark { display: flex; align-items: flex-end; gap: 3px; height: 28px; }
.mini-bar { width: 10px; background: var(--blue); border-radius: 3px 3px 0 0; }
.mini-bar.zero { background: var(--hairline); }
.pr-nums { display: flex; gap: 12px; font-size: 0.85rem; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.status {
  font-size: 0.76rem; font-weight: 800; padding: 4px 10px; border-radius: 999px;
  text-align: center; white-space: nowrap; justify-self: end;
}
.st-good { background: #e7f6e7; color: var(--good-text); }
.st-warn { background: #fdf3d9; color: #7a5600; }
.st-crit { background: #fdeeee; color: #8c1d1d; }
.pr-detail { padding: 2px 8px 14px; font-size: 0.9rem; }
.pr-note { background: #fffbe8; border: 1px solid #f3e6b0; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.medical { color: #8c1d1d; font-weight: 600; font-size: 0.88rem; }

.roster-card .rc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.contact-line { font-size: 0.9rem; margin: 8px 0; }
.form-card { margin-bottom: 16px; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.field-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; font-weight: 600; color: var(--ink-2); }
.studio-grid { align-items: start; }

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
  background: var(--navy); color: #fff; font-weight: 600; font-size: 0.9rem;
  padding: 11px 20px; border-radius: 999px; box-shadow: 0 6px 24px rgba(11, 11, 11, 0.25);
  opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s; z-index: 100;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- footer ---------- */
.site-foot { text-align: center; padding: 26px 16px 40px; color: var(--muted); font-size: 0.8rem; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .pr-main { grid-template-columns: 1fr auto; }
  .mini-spark { display: none; }
  .pr-nums { grid-column: 1 / -1; }
  .brand .tagline { display: none; }
}
