/* Calendar + Workout Detail presentation only. Data, privacy and matching
   behaviour remain owned by their page modules. */
body[data-phase="R"] { background-image: radial-gradient(900px 540px at 50% -8%, rgba(46, 219, 255, .15), transparent 64%), linear-gradient(180deg, #070216, #000 68%); }
body[data-phase="A"] { background-image: radial-gradient(900px 540px at 50% -8%, rgba(85, 156, 255, .15), transparent 64%), linear-gradient(180deg, #070216, #000 68%); }
body[data-phase="C"] { background-image: radial-gradient(900px 540px at 50% -8%, rgba(255, 229, 0, .11), transparent 64%), linear-gradient(180deg, #070216, #000 68%); }
body[data-phase="E"] { background-image: radial-gradient(900px 540px at 50% -8%, rgba(255, 122, 87, .14), transparent 64%), linear-gradient(180deg, #070216, #000 68%); }

.load-tile, .planner, .cal-shell, .card {
  background: var(--private-card);
  border-color: var(--border);
  box-shadow: var(--private-shadow);
}

.load-tile {
  min-height: 112px;
  border-radius: var(--private-radius);
  padding: 17px 19px;
}
.load-tile::after {
  content: "";
  position: absolute;
  inset: auto -28px -42px auto;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: currentColor;
  opacity: .08;
  pointer-events: none;
}
.load-tile[data-k="fitness"] { color: var(--blue); border-color: rgba(85, 156, 255, .45); }
.load-tile[data-k="fatigue"] { color: var(--coral); border-color: rgba(255, 122, 87, .45); }
.load-tile[data-k="form"] { color: var(--action); border-color: rgba(255, 229, 0, .42); }
.load-tile[data-k="ramp"] { color: var(--violet); border-color: rgba(191, 95, 255, .4); }
.load-tile .label, .load-tile .sub, .ramp-item .rl { color: var(--text-muted); }
.load-tile .value { font-size: clamp(28px, 3vw, 38px); }
.load-verdict, .verdict { border-left: 0; border-radius: 18px; padding: 14px 17px; background: rgba(255, 229, 0, .075); border: 1px solid rgba(255, 229, 0, .22); }

.toolbar { gap: 12px; }
.tb-group { padding: 4px; border: 1px solid var(--border); border-radius: var(--private-pill); background: rgba(16, 6, 36, .78); }
.tb-btn, .navbtn {
  background: rgba(31, 14, 63, .82);
  border-color: var(--border);
  border-radius: var(--private-pill);
  color: var(--text-muted);
}
.tb-btn { padding-inline: 15px; }
.tb-btn:hover, .navbtn:hover { background: rgba(74, 46, 115, .56); border-color: var(--border-strong); }
.tb-btn[aria-pressed="true"] { background: var(--action); border-color: var(--action); color: #09020e; box-shadow: 0 0 24px rgba(255, 229, 0, .18); }
.phase-pill, .score-pill, .chip, .sport, .src, .evidence-state { border-radius: var(--private-pill); }

.planner { border-radius: var(--private-radius); }
.plan-row input, .plan-row select, .plan-row textarea { background: rgba(0, 0, 0, .28); border-color: var(--border-strong); }
.cal-shell { border-radius: var(--private-radius); overflow: clip; }
.cal-head { background: rgba(191, 95, 255, .07); }
.cal-head span { color: var(--text-muted); }
.cal-row { border-top-color: var(--border); }
.day { border-right-color: var(--border); min-height: 142px; }
.day:hover { background: rgba(191, 95, 255, .07); }
.day.today { background: linear-gradient(160deg, rgba(255, 229, 0, .12), rgba(191, 95, 255, .055)); box-shadow: inset 0 0 0 1px rgba(255, 229, 0, .35); }
.item { border-radius: 13px; }
.item-move { min-width: 44px; min-height: 44px; border-radius: var(--private-pill); background: var(--elevated); }
.week-rail { background: rgba(31, 14, 63, .76); }
.agenda .ag-day, .plan-audit { background: var(--private-card); border-color: var(--border); border-radius: 20px; box-shadow: var(--private-shadow); }
.move-dialog, dialog { color: var(--text); background: var(--elevated); border-color: var(--border-strong); border-radius: var(--private-radius); box-shadow: 0 30px 90px rgba(0, 0, 0, .72); }

.crumb { color: var(--text-muted); min-height: 44px; }
.day-head { padding: 4px 0 8px; }
.card { border-radius: var(--private-radius); padding: 22px; }
.card.race { background: linear-gradient(150deg, rgba(255, 122, 87, .18), rgba(16, 6, 36, .98) 70%); border-color: rgba(255, 122, 87, .48); }
.vs { border-radius: 20px; border-color: var(--border-strong); background: rgba(0, 0, 0, .2); }
.vs > div { padding: 20px; }
.vs > div + div { border-color: var(--border); }
.vs .actual { background: linear-gradient(145deg, rgba(85, 156, 255, .12), rgba(191, 95, 255, .06)); }
.evidence-case, .sess, .notice { background: rgba(31, 14, 63, .62); border-color: var(--border); border-radius: 18px; }
.evidence-case { padding: 15px; }
.evidence-chain { gap: 10px; counter-reset: evidence; }
.evidence-step { counter-increment: evidence; border: 1px solid var(--border); border-radius: 14px; padding: 38px 10px 11px; position: relative; background: rgba(0, 0, 0, .2); }
.evidence-step::before { content: counter(evidence); position: absolute; top: 9px; left: 9px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: var(--text-muted); background: var(--border); font: 700 10px var(--mono); }
.evidence-step.known { border-color: rgba(0, 255, 136, .38); }
.evidence-step.known::before { color: #00160c; background: var(--green); }
.execution-metrics span, .stat, .m { padding: 10px 11px; border: 1px solid rgba(74, 46, 115, .78); border-radius: 14px; background: rgba(0, 0, 0, .18); }
.sess { padding: 18px; }
.bar-track, .zbar { background: rgba(255, 255, 255, .09); }
.chip { padding: 8px 12px; background: rgba(191, 95, 255, .09); }

.performance-brief, .plan-load-card, .season-card, .chart-card, .form-card, .ramp, .tile {
  background: var(--private-card);
  border-color: var(--border);
  box-shadow: var(--private-shadow);
}
.performance-brief { border: 1px solid var(--border); border-radius: var(--private-radius); padding: 20px; margin-top: 14px; }
.performance-brief-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.performance-brief-head h2 { margin: 0 0 4px; font-size: 15px; }
.performance-brief-head p { margin: 0; color: var(--text-muted); font-size: 12.5px; line-height: 1.55; }
.evidence-pill { flex: 0 0 auto; border: 1px solid rgba(0, 255, 136, .36); border-radius: var(--private-pill); color: var(--green); padding: 7px 11px; font: 700 9px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.performance-brief-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.performance-brief-widget { min-width: 0; min-height: 144px; padding: 15px; border: 1px solid var(--border); border-radius: 19px; background: rgba(0, 0, 0, .2); position: relative; overflow: hidden; }
.performance-brief-widget::after { content: ""; position: absolute; width: 92px; height: 92px; right: -30px; bottom: -38px; border-radius: 50%; background: currentColor; opacity: .08; pointer-events: none; }
.performance-brief-widget.complete { color: var(--green); border-color: rgba(0, 255, 136, .36); }
.performance-brief-widget.open { color: var(--action); border-color: rgba(255, 229, 0, .34); }
.performance-brief-widget.above { color: var(--orange); border-color: rgba(252, 76, 2, .42); }
.performance-brief-widget.neutral { color: var(--cyan); border-color: rgba(46, 219, 255, .34); }
.performance-brief-widget.unavailable { color: var(--text-muted); }
.performance-brief-label { display: block; color: var(--text-muted); font: 700 9px var(--mono); letter-spacing: .15em; text-transform: uppercase; }
.performance-brief-widget strong { display: block; margin-top: 11px; color: currentColor; font: 700 clamp(20px, 2vw, 28px) var(--mono); letter-spacing: -.025em; overflow-wrap: anywhere; }
.performance-brief-meta { display: block; margin-top: 7px; color: var(--text); font: 600 10px/1.45 var(--mono); }
.performance-brief-widget p { margin: 10px 0 0; color: var(--text-muted); font-size: 11.5px; line-height: 1.5; }
.tile, .ramp { border-radius: 20px; }
.plan-load-card, .season-card, .chart-card, .form-card { border-radius: var(--private-radius); }
.plan-week, .season-week { background: rgba(0, 0, 0, .22); border-radius: 15px; }
.plan-week.current { background: linear-gradient(150deg, rgba(255, 229, 0, .11), rgba(31, 14, 63, .72)); }
.load-track { background: rgba(255, 255, 255, .1); }
.plan-load-verdict, .verdict { border-left: 0; border-radius: 18px; padding: 14px 17px; background: rgba(255, 229, 0, .075); border: 1px solid rgba(255, 229, 0, .22); }

@media (max-width: 860px) {
  .load-tile { min-height: 102px; }
  .agenda { gap: 12px; }
  .performance-brief-head { display: block; }
  .evidence-pill { display: inline-flex; margin-top: 11px; }
  .performance-brief-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .card { padding: 17px; border-radius: 20px; }
  .day-head { gap: 10px; }
  .navbtn { display: inline-flex; align-items: center; justify-content: center; width: 44px; }
  .evidence-step { padding: 13px 13px 13px 48px; min-height: 48px; }
  .evidence-step::before { top: 12px; left: 13px; }
  .stats, .grid { gap: 9px; }
}

@media (max-width: 420px) {
  .loadstrip { grid-template-columns: 1fr 1fr; }
  .loadstrip .load-tile[data-k="ramp"] { grid-column: 1 / -1; }
  .load-tile { padding: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .load-tile, .card, .day, .sess { transform: none !important; }
}
