/* LACROSSE READY — global design system */
:root {
  --bg: #0f172a;
  --bg-soft: #1e293b;
  --surface: #1a2335;
  --surface-2: #243147;
  --border: #334155;
  --text: #e2e8f0;
  --text-dim: #94a3b8;
  --accent: #f59e0b;
  --accent-2: #22c55e;
  --danger: #ef4444;
  --info: #38bdf8;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --phase-off: #38bdf8;
  --phase-pre: #a78bfa;
  --phase-in: #f59e0b;
  --phase-playoff: #22c55e;
  --phase-post: #f472b6;
  /* long-form names matching phaseClass() (Off-Season -> offseason) */
  --phase-offseason: #38bdf8;
  --phase-preseason: #a78bfa;
  --phase-inseason: #f59e0b;
  --phase-playoffs: #22c55e;
  --phase-postseason: #f472b6;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Accessibility: visible keyboard focus */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Accessibility: respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .card:hover { transform: none; }
}

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.app-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px 80px;
}

header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

/* Persistent field labels (LR-07b): a control must be identifiable by its own
   label, not by placeholder text that disappears once a value is chosen. */
.field-label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 4px;
}

/* ---- Pricing ------------------------------------------------------------ */
.plan-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 18px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 8px;
}
.footer-links a { color: var(--text-dim); font-size: 0.85rem; }
.footer-links a:hover { color: var(--text); }
.account-facts { display: grid; gap: 8px; margin: 0; font-size: 0.92rem; }
.account-facts div { display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.account-facts dt { color: var(--text-dim); }
.account-facts dd { margin: 0; font-weight: 600; }
.plan-card { display: flex; flex-direction: column; }
.plan-card-featured { border-color: var(--accent); }
.plan-price { margin: 4px 0 10px; }
.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
}
.plan-features li { display: flex; gap: 8px; }
.plan-features li::before { content: '✓'; color: var(--accent-2); font-weight: 700; }
.plan-limits {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-bottom: 16px;
}
.plan-limits div { display: flex; justify-content: space-between; gap: 12px; }
.plan-limits span { color: var(--text-dim); }
.plan-card > .btn { margin-top: auto; }

/* ---- Field view --------------------------------------------------------- */
/* A practice at arm's length on a phone, in the rain, with gloves on. */
.field-view { max-width: 900px; margin: 0 auto; }
.field-block {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  background: var(--surface);
}
.field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.field-head h2 { margin: 0; font-size: 1.25rem; }
.field-minutes { font-variant-numeric: tabular-nums; font-weight: 700; }
.field-line { margin: 6px 0; font-size: 1.02rem; line-height: 1.6; }
.field-cues { margin: 8px 0 0; padding-left: 20px; line-height: 1.7; }
.field-safety {
  margin-top: 10px;
  border-left: 3px solid var(--danger, #f87171);
  padding-left: 12px;
  font-size: 0.95rem;
}
.field-controls { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 22px; }
.field-controls .btn, .field-controls select { min-height: 44px; }
.field-timer {
  font-variant-numeric: tabular-nums;
  font-size: 1.6rem;
  font-weight: 800;
  min-width: 5ch;
}
/* A running practice should not be accidentally ended by a stray tap. */
.field-sticky {
  position: sticky;
  bottom: 0;
  background: rgba(15, 23, 42, 0.96);
  border-top: 1px solid var(--border);
  padding: 10px 0;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
}

/* Print the practice, not the app: no navigation, no buttons, no controls. */
@media print {
  header.site, footer.site, nav, .field-controls, .field-sticky,
  .plan-footer, .plan-sticky, .btn, .chip, .install-banner, #back-to-top,
  .print-toolbar, .to-top {
    display: none !important;
  }
  body { background: #fff; color: #000; }
  .field-view, .plan-draft-panel, .app-shell, .print-page { max-width: none; padding: 0; margin: 0; }
  .field-block, .plan-block, .print-activity, .print-block { break-inside: avoid; page-break-inside: avoid; }
  .field-block, .plan-block {
    border: 1px solid #999;
    margin-bottom: 10px;
    background: #fff;
    color: #000;
  }
  .field-head h2, .panel h3 { color: #000; }
  a[href]::after { content: ''; }
  .print-footer { display: block !important; font-size: 0.72rem; color: #333; margin-top: 12px; }
}
.print-footer { display: none; }

/* ---- The paper plan ------------------------------------------------------
   Read standing up, in the rain, with gloves on: 12pt minimum, one column,
   nothing hidden behind a tap. */
.print-page { max-width: 1000px; margin: 0 auto; }
.print-toolbar {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.print-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  border-bottom: 3px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 14px;
}
.print-head h1 { margin: 0; font-size: 1.6rem; }
.print-sub { margin: 4px 0 0; color: var(--text-dim); font-size: 0.9rem; }
.print-meta { text-align: right; font-size: 0.78rem; color: var(--text-dim); line-height: 1.5; }
.print-notes {
  border-left: 3px solid var(--accent);
  padding-left: 10px;
  margin: 0 0 14px;
}
.print-totals { width: 100%; border-collapse: collapse; margin-bottom: 18px; font-size: 0.92rem; }
.print-totals th, .print-totals td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }
.print-totals td:last-child, .print-totals th:last-child { text-align: right; width: 110px; }
.print-total-row td { border-top: 2px solid var(--border); }
.print-block { margin-bottom: 20px; }
.print-block-head {
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 4px;
  margin-bottom: 10px;
}
.print-activity {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.print-activity h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.print-mins { font-variant-numeric: tabular-nums; white-space: nowrap; }
.print-activity p { margin: 6px 0; line-height: 1.55; }
.print-activity ul { margin: 4px 0 8px; padding-left: 20px; line-height: 1.55; }
.print-label {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.74rem;
  color: var(--text-dim);
  margin: 10px 0 2px !important;
}
.print-subblock { margin: 4px 0 8px; padding-left: 10px; border-left: 2px solid var(--border); }
.print-safety {
  border-left: 3px solid var(--danger, #f87171);
  padding-left: 10px;
  margin-top: 8px !important;
}
.print-provenance { font-size: 0.74rem; color: var(--text-dim); margin-top: 8px !important; }
.print-foot { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 10px; font-size: 0.85rem; }
.print-foot p { margin: 4px 0; }

/* On paper, colour is not guaranteed and ink is precious. */
@media print {
  .print-page { max-width: none; }
  .print-head, .print-block-head, .print-foot, .print-activity, .print-totals th,
  .print-totals td, .print-subblock, .print-notes, .print-safety {
    border-color: #000 !important;
    color: #000 !important;
  }
  .print-page, .print-activity p, .print-activity li { font-size: 11.5pt; }
  .print-activity h3, .print-block-head { font-size: 12.5pt; }
  .print-label, .print-provenance, .print-meta, .print-sub { font-size: 9pt; color: #333 !important; }
  /* A block heading should not be the last thing on a page. */
  .print-block-head { break-after: avoid; page-break-after: avoid; }
  .print-totals { break-inside: avoid; page-break-inside: avoid; }
}

/* Anchor destinations must clear the sticky header (LR-07c). The fallback is
   used until the measured height is applied on load, and for the case where
   scripts are blocked. */
/* Measured worst cases, so the default is never smaller than the real header:
   127px at a 360px viewport (the nav wraps), 109px at desktop width, 68px on a
   tablet. Too small a default is exactly the bug this guards: the anchored
   heading ends up underneath the sticky header while the page looks scrolled to
   the right place. The inline script refines it to the exact height. */
:root { --header-h: 128px; }
html { scroll-padding-top: calc(var(--header-h) + 10px); }
[id] { scroll-margin-top: calc(var(--header-h) + 10px); }

nav.top {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 18px;
  flex-wrap: wrap;
}

/* The header is sticky, so every row it wraps adds permanent height that hides
   content underneath. Above the menu-button breakpoint the inline nav has more
   links than fit in one 1100px row, which used to stack it into three rows
   (a 193px sticky header) — bad on a laptop and it also broke anchor offsets.
   One row, allowed to shrink, with no wrapping: the row stays as tall as its
   tallest chip instead of growing a second and third line. */
@media (min-width: 1100px) {
  nav.top { flex-wrap: nowrap; gap: 10px; }
  /* Every link stays visible. An earlier attempt at fitting more links made this
     row a horizontal scroller with the scrollbar hidden, which silently hid
     about half the navigation (14 links, 1182px of content in a 592px box) with
     no sign that it could be scrolled. Shrinking instead of overflowing keeps
     the whole menu in view; a long label wraps inside its own chip rather than
     pushing its neighbours out of sight. */
  .nav-links { display: flex; flex: 0 1 auto; min-width: 0; flex-wrap: nowrap; justify-content: center; }
  nav.top a.nav { padding: 5px 7px; font-size: 0.8rem; line-height: 1.25; text-align: center; }
  .brand { flex: 0 0 auto; }
  .nav-switch { flex: 0 0 auto; }
  nav.top a.nav-signin { flex: 0 0 auto; margin-left: 0; white-space: nowrap; }
}

.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.05rem; color: var(--text); }
.brand .logo { font-size: 1.3rem; }
.brand small { display: block; font-weight: 500; color: var(--text-dim); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; }

nav.top a.nav {
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 12px;
  border-radius: 8px;
}
nav.top a.nav:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
nav.top a.nav.active { color: var(--accent); }
nav.top a.nav-signin {
  margin-left: auto;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
}
nav.top a.nav-signin:hover { border-color: var(--accent); color: var(--accent); }

/* Girls / Boys side switcher */
.nav-switch {
  display: inline-flex;
  gap: 2px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  margin-left: 8px;
}
.nav-switch a {
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.nav-switch a:hover { color: var(--text); text-decoration: none; }
.nav-switch a.on { background: var(--accent); color: #0b0f1a; }
@media (max-width: 1099px) {
  .nav-switch { margin-left: 8px; margin-right: 8px; }
}

/* PWA install button + iOS help modal */
.nav-install {
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  margin-left: 8px;
  white-space: nowrap;
}
.nav-install:hover { background: var(--accent); color: #0b0f1a; }
@media (max-width: 860px) {
  .nav-install { margin-left: 8px; margin-right: 8px; padding: 6px 10px; }
}
.install-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(56, 189, 248, 0.1));
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 16px 0 4px;
}
.install-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(2, 6, 23, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.install-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 420px;
  width: 100%;
  padding: 22px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}
.install-modal h3 { margin-bottom: 8px; font-size: 1.1rem; }
.install-modal ol { margin: 10px 0 16px; padding-left: 20px; color: var(--text-dim); font-size: 0.92rem; }
.install-modal ol li { margin: 6px 0; }
.install-modal .steps-icon { font-size: 1.5rem; margin-right: 8px; }

/* Mobile hamburger nav */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 42px;
  height: 42px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  margin-left: auto;
}
.nav-toggle-bar { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* The menu button carries the navigation up to the width where the full row
   genuinely fits. It used to hand over at 860px, but with 14 top-level items the
   inline row pushed a link (Pricing) off the edge and gave the page a horizontal
   scrollbar, so the handover moved up to match the desktop rule below. */
@media (max-width: 1099px) {
  .nav-toggle { display: flex; }
  nav.top a.nav-signin { margin-left: 0; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(15, 23, 42, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 8px 18px 14px;
    flex-direction: column;
    gap: 2px;
  }
  .nav-links.open { display: flex; }
  .nav-links a.nav { display: block; padding: 12px 10px; font-size: 1rem; }
}

/* Hero */
.hero {
  padding: 44px 0 28px;
  text-align: center;
}
.hero h1 { font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.1; letter-spacing: -0.02em; }
.hero p.sub { color: var(--text-dim); max-width: 640px; margin: 12px auto 0; font-size: 1.05rem; }
.hero .stats { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 18px;
  min-width: 110px;
}
.stat b { display: block; font-size: 1.5rem; color: var(--accent); }
.stat span { color: var(--text-dim); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* Cards / grids */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card h3 { font-size: 1.02rem; line-height: 1.25; }
.card .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.card p.desc { color: var(--text-dim); font-size: 0.88rem; flex: 1; }
.card .footer { display: flex; justify-content: space-between; align-items: center; }

/* Badges */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  white-space: nowrap;
}
.badge.lvl-b { color: #38bdf8; border-color: #0c4a6e; }
.badge.lvl-bi { color: #7dd3fc; border-color: #0c4a6e; }
.badge.lvl-i { color: #fbbf24; border-color: #78350f; }
.badge.lvl-ia { color: #fbbf24; border-color: #78350f; }
.badge.lvl-a { color: #f87171; border-color: #7f1d1d; }
.badge.lvl-all { color: #a3e635; border-color: #365314; }
.badge.pill { color: #c4b5fd; border-color: #4c1d95; }
.badge.phase-off, .badge.phase-offseason { color: #38bdf8; border-color: #0c4a6e; }
.badge.phase-pre, .badge.phase-preseason { color: #a78bfa; border-color: #4c1d95; }
.badge.phase-in, .badge.phase-inseason { color: #f59e0b; border-color: #78350f; }
.badge.phase-playoff, .badge.phase-playoffs { color: #22c55e; border-color: #14532d; }
.badge.phase-post, .badge.phase-postseason { color: #f472b6; border-color: #831843; }
.badge.fun { color: #fda4af; border-color: #9f1239; }
.badge.motor { color: #67e8f9; border-color: #155e75; }

/* Section headers */
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 30px 0 14px; }
.section-title h2 { font-size: 1.25rem; }
.section-title a.more { font-size: 0.85rem; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #0b0f1a;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: 0.92rem;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.btn-block { width: 100%; text-align: center; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; align-items: center; }
.filters input[type="search"] {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.95rem;
  flex: 1;
  min-width: 200px;
}
/* The hidden attribute must always win over any display rule (cards, chips,
   sticky bars, load-more buttons, etc.). Without this, setting .hidden on an
   element that has an explicit display (e.g. .card{display:flex}) does nothing. */
[hidden] { display: none !important; }

.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
}
@media (max-width: 640px) { .chip { min-height: 42px; } }
.chip.on { background: var(--accent); color: #0b0f1a; border-color: var(--accent); }

/* ---- Practice Plan Builder ---- */
.plan-layout { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.plan-picker input[type="search"], .plan-picker select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.95rem;
  margin-bottom: 10px;
}
.plan-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.plan-sub { font-size: 0.8rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; margin: 10px 0 6px; }
.plan-results { max-height: 420px; overflow-y: auto; }
.pres-row { padding: 8px 4px; border-bottom: 1px solid var(--border); }
.pres-head { display: flex; align-items: center; gap: 8px; }
.pres-title { flex: 1; min-width: 0; }
.pres-title b { display: inline-block; margin-right: 6px; }
.pres-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.pres-preview { margin-top: 8px; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; font-size: 0.85rem; color: var(--text-dim); }
.pres-preview p { margin-bottom: 6px; }
.btn.sm { padding: 5px 10px; font-size: 0.82rem; border-radius: 8px; }
.icon-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 30px; height: 30px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
}
.icon-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.icon-btn.danger:hover { color: var(--danger); border-color: var(--danger); }

.plan-goal { margin: 4px 0 12px; }
.goal-chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.dur-track { height: 10px; background: var(--surface-2); border-radius: 999px; margin-top: 10px; overflow: hidden; border: 1px solid var(--border); }
.dur-fill { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width 0.25s ease; }
.dur-fill.ok { background: var(--accent-2); }
.dur-fill.low { background: var(--info); }
.dur-fill.over { background: var(--danger); }
.dur-msg { font-size: 0.8rem; color: var(--text-dim); margin-top: 6px; transition: opacity 0.3s ease; }

.pblock { margin: 12px 0; border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 12px; overflow: hidden; }
.pblock header { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--surface-2); }
.pblock header h4 { font-size: 0.9rem; }
.pblock header .badge { margin-left: auto; }
.pblock .plan-row { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.pblock .plan-row:first-of-type { border-top: none; }
.pr-title { flex: 1; min-width: 0; }
.pr-title b { display: inline-block; margin-right: 6px; font-size: 0.9rem; }
.pr-ctrl { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.pr-block {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 0.82rem;
  max-width: 150px;
}
.pblock-warm_up { border-left-color: #f59e0b; }
.pblock-technical { border-left-color: #38bdf8; }
.pblock-applied { border-left-color: #a78bfa; }
.pblock-scrimmage { border-left-color: #22c55e; }
.pblock-cool_down { border-left-color: #f472b6; }

.plan-empty { text-align: center; padding: 26px 12px; color: var(--text-dim); }
.plan-empty-icon { font-size: 2.2rem; margin-bottom: 8px; }
.plan-detail { padding: 12px 14px 14px; border-top: 1px dashed var(--border); background: var(--surface-2); }
.item-detail { font-size: 0.86rem; color: var(--text-dim); }
.item-detail b { color: var(--text); }
.item-detail .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.item-detail .badge { font-size: 0.72rem; }
.item-detail .block { padding: 10px 12px; margin: 0; }
.item-detail .block p { font-size: 0.8rem; margin-top: 4px; }
.link-badge { text-decoration: none; }
.link-badge:hover { color: var(--accent); }

/* Plan builder: practice header, notes, custom items, drag & drop */
.auto-build { margin: 10px 0 6px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.auto-build select { flex: 1; min-width: 96px; }
.plan-auth { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 2px 0 10px; }
.plan-auth .badge { font-size: 0.75rem; }
#plan-reset { white-space: nowrap; }
.plan-meta-fields { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.plan-meta-fields input {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
}
.plan-meta-fields input::placeholder { color: var(--text-dim); }
.plan-meta-fields input:focus { outline: none; border-color: var(--accent); }
.print-only { display: none; }
.plan-print-head { margin: 0 0 14px; padding-bottom: 10px; border-bottom: 2px solid var(--border); }
.plan-print-head h2 { margin: 0 0 4px; font-size: 1.35rem; }
.plan-print-head p { margin: 2px 0; font-size: 0.85rem; color: var(--text-dim); }
.plan-item-opts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.plan-min-label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--text-dim); font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.plan-minutes {
  width: 68px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 0.85rem;
}
.plan-note {
  flex: 1;
  min-width: 160px;
  box-sizing: border-box;
  background: var(--surface);
  border: 1px dashed var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
}
.plan-note::placeholder { color: var(--text-dim); }
.pblock-empty {
  padding: 14px 12px;
  font-size: 0.82rem;
  color: var(--text-dim);
  text-align: center;
  border-top: 1px dashed var(--border);
  background: color-mix(in srgb, var(--surface-2) 40%, transparent);
}
.plan-row { cursor: grab; }
.plan-row:active { cursor: grabbing; }
.plan-row.dragging { opacity: 0.45; }
.plan-row.drop-target { outline: 2px dashed var(--accent); outline-offset: -2px; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.pblock.drop-target-block { outline: 2px dashed var(--accent-2); outline-offset: -2px; }
.fav-chip { display: inline-flex; align-items: center; gap: 2px; margin: 2px 0; }
.fav-chip .chip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav-chip .icon-btn { font-size: 0.7rem; padding: 2px 6px; flex-shrink: 0; }
#plan-more { display: block; margin: 10px auto 0; }
.badge.pill { font-size: 0.7rem; text-transform: none; letter-spacing: 0; }
.pr-title .badge.pill { margin-left: 2px; }
.plan-saves { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.saved-plan { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.saved-plan .chip { text-align: left; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.plan-sticky {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
}
@media (min-width: 641px) { .plan-sticky { display: none !important; } }
@media (max-width: 640px) { body:has(.plan-sticky:not([hidden])) { padding-bottom: 76px; } }

/* Session page */
.breadcrumb { color: var(--text-dim); font-size: 0.85rem; margin: 18px 0 6px; }
.session-head { margin: 8px 0 20px; }
.session-head h1 { font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.15; }
.session-head .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.objective {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(56, 189, 248, 0.08));
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 16px 0;
}
.objective b { color: var(--accent); }

.blocks { display: grid; gap: 14px; margin: 18px 0; }
.block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.block h4 { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; }
.block .time { color: var(--accent); font-weight: 700; margin-left: auto; }
.block p { color: var(--text-dim); font-size: 0.92rem; margin-top: 6px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin: 18px 0;
}
.panel h3 { margin-bottom: 12px; font-size: 1.05rem; }

.drill-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.drill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.drill h4 { font-size: 0.95rem; margin-bottom: 8px; color: var(--accent); }
.drill p { color: var(--text-dim); font-size: 0.88rem; margin-top: 10px; line-height: 1.5; }
.drill .footer { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
a.badge.link-badge { text-decoration: none; }
a.badge.link-badge:hover { border-color: var(--accent); color: var(--accent); }
.panel ul { list-style: none; }
.panel li { padding: 8px 0 8px 26px; position: relative; color: var(--text-dim); font-size: 0.93rem; border-bottom: 1px solid var(--border); }
.panel li:last-child { border-bottom: none; }
.panel li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-2); font-weight: 700; }
.panel li.cp::before { content: "•"; color: var(--accent); }

table.errors { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.errors th { text-align: left; color: var(--accent); padding: 8px 10px; border-bottom: 1px solid var(--border); }
table.errors td { padding: 8px 10px; border-bottom: 1px solid var(--border); color: var(--text-dim); vertical-align: top; }
table.errors td:first-child { color: var(--text); font-weight: 600; }

/* Session in-page section nav */
.sec-nav {
  position: sticky;
  top: 64px;
  z-index: 40;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 0;
  background: var(--bg);
  border-radius: 12px;
  margin: 12px 0 4px;
}
.sec-nav .chip { flex-shrink: 0; }

/* Back-to-top */
.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 55;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #0b0f1a;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.to-top.show { opacity: 1; pointer-events: auto; }

/* Results meta on library */
.results-meta { min-height: 20px; }
.results-meta #clear-filters { min-height: 30px; }

/* Onboarding "start here" */
.start-here { border-left: 4px solid var(--accent); }
.start-steps { margin: 6px 0 0 18px; color: var(--text-dim); font-size: 0.92rem; }
.start-steps li { margin: 4px 0; }

/* Roadmap */
.phase-row { display: grid; grid-template-columns: 130px 1fr; gap: 12px; align-items: center; margin: 10px 0; }
.week-pill {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 8px 10px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
}
.week-pill b { display: block; color: var(--text); font-size: 0.95rem; }
.week-pill.done { border-color: var(--accent-2); color: var(--accent-2); }

.timeline { display: flex; gap: 4px; overflow-x: auto; padding: 6px 0 12px; }
.tl-week {
  min-width: 34px;
  height: 44px;
  border-radius: 6px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #0b0f1a;
  font-weight: 700;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

/* Offline page */
.offline-page { display: grid; place-items: center; min-height: 100vh; }
.offline-card { text-align: center; max-width: 420px; padding: 30px; }
.offline-mark { font-size: 3rem; }
.offline-card h1 { margin: 12px 0; }
.offline-card p { color: var(--text-dim); margin-bottom: 20px; }

/* Wizard */
.wizard { max-width: 640px; margin: 0 auto; }
.wizard label { display: block; font-weight: 600; margin: 16px 0 8px; color: var(--text); }
.wizard select, .wizard input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 1rem;
}
.result-plan { margin-top: 24px; }

/* Footer */
footer.site { color: var(--text-dim); font-size: 0.82rem; text-align: center; padding: 26px 0; border-top: 1px solid var(--border); margin-top: 40px; }

/* Trends */
.trend { width: 100%; }
.trend-wrap { margin: 10px 0 16px; }
.trend-wrap h4 { font-size: 0.9rem; margin-bottom: 4px; }
.trend-axis text { fill: var(--text-dim); font-size: 10px; }

/* Print / PDF — clean field copy */
@media print {
  header.site, footer.site, .btn, .chip, .filters, #plan-favs, #plan-results,
  .breadcrumb, .hero .stats, nav.top, .plan-picker, .plan-goal, .plan-footer,
  .plan-sticky, .pr-ctrl, .pres-actions, .icon-btn, .plan-sub, #plan-count,
  .dur-track, .dur-msg, .plan-meta-fields, .plan-note, .plan-minutes, .plan-min-label, .pblock-empty, .plan-saves,
  .plan-auth, #plan-custom-add, #plan-custom-name, #plan-custom-min { display: none !important; }
  body { background: #fff; color: #111; }
  .app-shell { padding: 0; max-width: 100%; }
  .card, .panel, .block, .objective {
    background: #fff !important;
    border: 1px solid #ccc !important;
    color: #111 !important;
    break-inside: avoid;
  }
  .card h3, .panel h3, .block h4, .section-title h2, .session-head h1, .hero h1 { color: #111 !important; }
  .card p, .desc, .block p, .panel li, .badge, .objective b { color: #333 !important; }
  .badge { border-color: #999; }
  a { color: #000 !important; text-decoration: none !important; }
  .grid { grid-template-columns: repeat(2, 1fr) !important; }
  /* Plan builder prints as a clean block-grouped field sheet */
  .print-only { display: block !important; }
  .plan-print-head h2 { font-size: 1.5rem; margin: 0 0 4px; }
  .plan-print-head p { font-size: 0.85rem; color: #333; margin: 2px 0; }
  .plan-layout { display: block !important; }
  .plan-draft-panel { border: none !important; padding: 0 !important; }
  .plan-draft-panel h3 { font-size: 1.2rem; border-bottom: 2px solid #111; padding-bottom: 6px; }
  .plan-draft-panel h3, .plan-total, .plan-saves { display: none !important; }
  .pblock { border: 1px solid #999; border-left-width: 4px; break-inside: avoid; margin: 10px 0; counter-reset: plan-item; }
  .pblock header { background: #eee !important; }
  .pblock header h4, .pblock header .badge, .pr-title b, .plan-row .badge { color: #111 !important; }
  .pr-title b { font-size: 0.95rem; }
  .pr-ctrl { display: none !important; }
  .pblock .plan-row { counter-increment: plan-item; }
  .pblock .plan-row .pr-title::before { content: counter(plan-item) ". "; font-weight: 700; }
  .plan-total-note { display: block; }
}

/* Responsive */
@media (max-width: 640px) {
  .phase-row { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .sec-nav { top: 58px; }
  /* Stack the errors table into blocks on small screens */
  table.errors, table.errors thead, table.errors tbody, table.errors tr, table.errors th, table.errors td { display: block; }
  table.errors thead { display: none; }
  table.errors tr { padding: 10px 0; border-bottom: 1px solid var(--border); }
  table.errors td { padding: 4px 10px; border-bottom: none; }
  table.errors td:first-child { padding-top: 8px; font-weight: 700; }
  table.errors td::before { content: attr(data-label); display: block; font-size: 0.7rem; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px; }
}
