.crc-training-dashboard,
.crc-my-training,
.crc-plan {
  --crc-navy: #215387;
  --crc-sky: #2ea3f2;
  --crc-ink: #22313f;
  --crc-muted: #5b6e7f;
  --crc-tint: #eef5fb;
  --crc-tint-2: #f7fafd;
  --crc-line: #d7e4ef;
  --crc-gold: #f5a623;
  --crc-gold-bg: #fef6e7;
  color: var(--crc-ink);
  font: inherit;
  line-height: 1.5;
}

.crc-training-dashboard *,
.crc-my-training *,
.crc-plan *,
.crc-training-dashboard *::before,
.crc-my-training *::before,
.crc-plan *::before,
.crc-training-dashboard *::after,
.crc-my-training *::after,
.crc-plan *::after {
  box-sizing: border-box;
}

.crc-training-dashboard h2,
.crc-my-training h2,
.crc-plan h2 {
  color: var(--crc-sky);
  font-size: 1.45rem;
  line-height: 1.2;
  margin: 0 0 0.65rem;
}

.crc-dashboard-intro {
  color: var(--crc-muted);
  margin: 0 0 1.25rem;
}

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

.crc-group-card {
  background: #fff;
  border: 2px solid var(--crc-navy);
  border-radius: 9px;
  color: var(--crc-ink) !important;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 155px;
  padding: 18px 15px;
  text-align: center;
  text-decoration: none !important;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.crc-group-card:hover {
  background: var(--crc-tint-2);
  transform: translateY(-1px);
}

.crc-group-card:focus-visible,
.crc-btn:focus-visible,
.crc-tool:focus-visible,
.crc-phase-seg:focus-visible,
.crc-phase summary:focus-visible,
.crc-profile-settings summary:focus-visible,
.crc-group-compare summary:focus-visible,
.crc-profile-form select:focus-visible {
  outline: 3px solid var(--crc-gold);
  outline-offset: 2px;
}

.crc-group-card > strong {
  color: var(--crc-navy);
  font-size: 1.2rem;
}

.crc-group-card > span {
  color: var(--crc-muted);
  font-size: 0.92rem;
}

.crc-group-card .crc-group-current {
  color: var(--crc-navy);
  font-weight: 700;
  margin-top: 4px;
}

.crc-group-card.is-selected {
  background: var(--crc-tint-2);
  box-shadow: inset 0 0 0 2px var(--crc-sky);
}

.crc-your-group {
  align-self: center;
  background: var(--crc-navy);
  border-radius: 999px;
  color: #fff !important;
  font-size: 0.68rem !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  text-transform: uppercase;
}

.crc-card-cta {
  color: var(--crc-sky) !important;
  font-weight: 700;
  margin-top: auto;
}

.crc-group-compare {
  border: 1px solid var(--crc-line);
  border-radius: 9px;
  overflow: hidden;
}

.crc-group-compare > summary {
  background: var(--crc-tint-2);
  color: var(--crc-navy);
  cursor: pointer;
  font-weight: 700;
  padding: 13px 15px;
}

.crc-group-compare[open] > summary {
  border-bottom: 1px solid var(--crc-line);
}

.crc-group-compare .crc-group-grid {
  padding: 14px;
}

.crc-my-training {
  margin: 1.75rem 0 2.25rem;
}

.crc-my-training-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.crc-my-training-heading h2 {
  margin: 0;
}

.crc-selected-pace {
  color: var(--crc-muted);
  margin: 4px 0 0;
}

.crc-eyebrow {
  color: var(--crc-sky);
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.crc-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
  z-index: 2;
}

.crc-badge {
  background: var(--crc-tint);
  border-radius: 999px;
  color: var(--crc-navy);
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 5px 11px;
  text-transform: uppercase;
}

.crc-badge-navy {
  background: var(--crc-navy);
  color: #fff;
}

.crc-badge-gold {
  background: var(--crc-gold);
  color: #5a3b00;
}

.crc-current-panel {
  background: #fff;
  border: 2px solid var(--crc-navy);
  border-radius: 12px;
  padding: 20px;
}

.crc-current-topline {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.crc-current-topline > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.crc-current-topline > div:first-child strong {
  color: var(--crc-navy);
  font-size: 1.15rem;
}

.crc-current-topline > div:first-child span {
  color: var(--crc-muted);
}

.crc-mileage {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.crc-mileage strong {
  color: var(--crc-navy);
  font-size: 1.35rem;
}

.crc-mileage span {
  color: var(--crc-muted);
  font-size: 0.74rem;
}

.crc-progress {
  background: var(--crc-line);
  border-radius: 999px;
  height: 10px;
  margin: 15px 0 18px;
  overflow: hidden;
}

.crc-progress > span {
  background: var(--crc-sky);
  display: block;
  height: 100%;
}

.crc-progress-label {
  color: var(--crc-navy);
  font-size: 0.88rem;
  font-weight: 700;
  margin: 15px 0 6px;
}

.crc-countdown,
.crc-complete-note {
  background: var(--crc-tint);
  border-radius: 8px;
  color: var(--crc-navy);
  margin: 15px 0 18px;
  padding: 10px 12px;
}

.crc-goal-line {
  color: var(--crc-muted);
  font-size: 0.9rem;
  margin: 10px 0 0;
}

.crc-goal-callout {
  background: var(--crc-tint-2);
  border-left: 5px solid var(--crc-sky);
  border-radius: 8px;
  margin-top: 14px;
  padding: 12px 14px;
}

.crc-goal-callout a {
  color: var(--crc-sky) !important;
  font-weight: 700;
}

.crc-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.crc-day {
  background: #fff;
  border: 1px solid var(--crc-line);
  border-radius: 7px;
  min-width: 0;
  padding: 8px 9px;
}

.crc-day strong,
.crc-rhythm-day strong {
  color: var(--crc-muted);
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.crc-day span,
.crc-rhythm-day span {
  display: block;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.crc-day-long_run,
.crc-day-gold {
  background: var(--crc-gold-bg);
  border-color: var(--crc-gold);
}

.crc-day-long_run strong,
.crc-day-gold strong {
  color: #8a5b04;
}

.crc-day-race {
  background: var(--crc-navy);
  border-color: var(--crc-navy);
  color: #fff;
}

.crc-day-race strong {
  color: #cbe7fc;
}

.crc-leaders,
.crc-next-week {
  color: var(--crc-muted);
  font-size: 0.9rem;
  margin: 14px 0 0;
}

.crc-leaders a {
  color: var(--crc-sky) !important;
}

.crc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.crc-btn {
  background: #fff;
  border: 1px solid var(--crc-navy);
  border-radius: 6px;
  color: var(--crc-navy) !important;
  cursor: pointer;
  display: inline-block;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 9px 14px;
  text-decoration: none !important;
}

.crc-btn:hover {
  filter: brightness(0.97);
}

.crc-btn-primary {
  background: var(--crc-sky);
  border-color: var(--crc-sky);
  color: #fff !important;
}

/* The site theme applies an !important color to links inside content.
 * Match the legacy plan selector specificity so the primary link-button
 * remains readable against its blue background. */
.crc-plan a.crc-btn-primary,
.crc-plan a.crc-btn-primary:visited,
.crc-plan a.crc-btn-primary:hover,
.crc-plan a.crc-btn-primary:focus {
  color: #fff !important;
  text-decoration: none !important;
}

.crc-callout,
.crc-notice,
.crc-success {
  background: var(--crc-tint);
  border-left: 5px solid var(--crc-sky);
  border-radius: 8px;
  padding: 13px 15px;
}

.crc-notice-error {
  background: #fff3f3;
  border-left-color: #b42318;
}

.crc-success {
  background: #effaf2;
  border-left-color: #238636;
}

.crc-profile-settings {
  border: 1px solid var(--crc-line);
  border-radius: 9px;
  margin-top: 16px;
  overflow: hidden;
}

.crc-profile-settings summary {
  background: var(--crc-tint-2);
  color: var(--crc-navy);
  cursor: pointer;
  font-weight: 700;
  padding: 12px 15px;
}

.crc-profile-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  padding: 15px;
}

.crc-profile-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.crc-profile-form label > span {
  color: var(--crc-navy);
  font-size: 0.82rem;
  font-weight: 700;
}

.crc-profile-form select {
  background: #fff;
  border: 1px solid var(--crc-line);
  border-radius: 6px;
  color: var(--crc-ink);
  font: inherit;
  min-height: 42px;
  padding: 7px 9px;
  width: 100%;
}

.crc-profile-form .crc-btn {
  align-self: end;
  min-height: 42px;
}

.crc-plan {
  margin: 0 auto;
  max-width: 1060px;
  padding: 16px;
}

.crc-plan a {
  color: var(--crc-sky) !important;
}

.crc-plan section {
  margin: 2.2rem 0;
}

.crc-plan-hero {
  background: #fff;
  border: 2px solid var(--crc-navy);
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(33, 83, 135, 0.08);
  overflow: hidden;
  padding: 26px 22px;
  position: relative;
}

.crc-hero-number {
  bottom: -60px;
  color: rgba(46, 163, 242, 0.1);
  font-size: 14rem;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
  position: absolute;
  right: -10px;
}

.crc-plan-hero h1 {
  color: var(--crc-sky);
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  line-height: 1.1;
  margin: 0.7rem 0 0.25rem;
  position: relative;
  z-index: 2;
}

.crc-plan-hero > p {
  margin: 0;
  position: relative;
  z-index: 2;
}

.crc-plan-band {
  background: var(--crc-tint);
  border-radius: 8px;
  color: var(--crc-navy);
  display: inline-block;
  font-size: 0.9rem;
  margin-top: 0.65rem !important;
  padding: 6px 10px;
}

.crc-draft-note {
  background: var(--crc-gold-bg);
  border: 1.5px solid var(--crc-gold);
  border-radius: 10px;
  font-size: 0.9rem;
  margin-top: 14px;
  padding: 12px 14px;
}

.crc-prereq {
  background: var(--crc-tint-2);
  border: 1.5px solid var(--crc-navy);
  border-left: 6px solid var(--crc-gold);
  border-radius: 10px;
  padding: 14px 16px;
}

.crc-prereq p {
  margin: 0.3rem 0 0;
}

.crc-def-grid,
.crc-plain-list {
  margin: 0.4rem 0;
}

.crc-def-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
  list-style: none;
  padding: 0;
}

.crc-def-grid li {
  background: var(--crc-tint-2);
  border: 1px solid var(--crc-line);
  border-radius: 8px;
  font-size: 0.92rem;
  padding: 9px 12px;
}

.crc-def-grid strong {
  color: var(--crc-navy);
}

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

.crc-tool {
  background: #fff;
  border: 1px solid var(--crc-line);
  border-radius: 10px;
  border-top: 4px solid var(--crc-sky);
  padding: 12px 14px;
  text-decoration: none !important;
}

.crc-tool strong {
  color: var(--crc-navy);
  display: block;
  margin-bottom: 2px;
}

.crc-tool span {
  color: var(--crc-muted);
  display: block;
  font-size: 0.85rem;
}

.crc-fine {
  color: var(--crc-muted);
  font-size: 0.86rem;
}

.crc-rhythm {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.crc-rhythm-day {
  background: #fff;
  border: 1px solid var(--crc-line);
  border-radius: 8px;
  padding: 9px 10px;
}

.crc-rhythm-day.is-long-run {
  background: var(--crc-gold-bg);
  border-color: var(--crc-gold);
}

.crc-rhythm-day.is-long-run strong {
  color: #8a5b04;
}

.crc-rhythm-notes {
  color: var(--crc-muted);
  font-size: 0.9rem;
  margin-top: 0.7rem;
}

.crc-rhythm-notes p {
  margin: 0.4rem 0;
}

.crc-phase-strip {
  display: flex;
  gap: 3px;
}

.crc-phase-seg {
  border-radius: 6px;
  color: #fff !important;
  display: block;
  min-width: 0;
  padding: 8px 6px;
  text-align: center;
  text-decoration: none !important;
}

/* Preserve the legacy phase-strip contrast even when Kadence or another
 * theme gives content links an !important accent color. */
.crc-plan a.crc-phase-seg,
.crc-plan a.crc-phase-seg:visited,
.crc-plan a.crc-phase-seg:hover,
.crc-plan a.crc-phase-seg:focus {
  color: #fff !important;
  text-decoration: none !important;
}

.crc-phase-seg strong,
.crc-phase-seg span,
.crc-phase-seg small {
  display: block;
}

.crc-phase-seg strong {
  font-size: 0.78rem;
}

.crc-phase-seg span,
.crc-phase-seg small {
  font-size: 0.68rem;
  opacity: 0.9;
}

.crc-phase-base { background: #7fb4e4; }
.crc-phase-endurance { background: #4e92ce; }
.crc-phase-lt { background: #2f6eae; }
.crc-phase-prep { background: var(--crc-navy); }
.crc-phase-taper { background: #16395c; }

.crc-phase {
  background: #fff;
  border: 1px solid var(--crc-line);
  border-radius: 12px;
  margin: 12px 0;
  overflow: hidden;
  scroll-margin-top: 140px;
}

.crc-phase summary {
  align-items: center;
  background: var(--crc-tint);
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  list-style: none;
  padding: 14px 16px;
}

.crc-phase summary::-webkit-details-marker {
  display: none;
}

.crc-phase summary > span > strong,
.crc-phase summary > span > small,
.crc-phase summary > span > em {
  display: block;
}

.crc-phase summary > span > strong {
  color: var(--crc-navy);
  font-size: 1.05rem;
}

.crc-phase summary > span > small {
  color: var(--crc-muted);
  font-size: 0.8rem;
}

.crc-phase summary > span > em {
  color: var(--crc-ink);
  font-size: 0.85rem;
  font-style: normal;
}

.crc-phase summary > i {
  border-bottom: 2.5px solid var(--crc-navy);
  border-right: 2.5px solid var(--crc-navy);
  height: 11px;
  transform: rotate(45deg);
  width: 11px;
}

.crc-phase[open] summary > i {
  transform: rotate(-135deg);
}

.crc-week {
  border-top: 1px solid var(--crc-line);
  padding: 12px 14px;
  scroll-margin-top: 140px;
}

.crc-week.is-current {
  background: var(--crc-tint-2);
  box-shadow: inset 4px 0 0 var(--crc-sky);
}

.crc-week > header {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.crc-week-number {
  color: var(--crc-navy);
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.crc-week-dates {
  color: var(--crc-muted);
  font-size: 0.85rem;
}

.crc-week-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.crc-chip {
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 9px;
  text-transform: uppercase;
}

.crc-chip-now {
  background: var(--crc-sky);
  color: #06263f;
}

.crc-chip-standard {
  background: var(--crc-tint);
  border: 1px solid var(--crc-line);
  color: var(--crc-navy);
}

.crc-chip-gold {
  background: var(--crc-gold-bg);
  border: 1px solid var(--crc-gold);
  color: #8a5b04;
}

.crc-chip-race {
  background: var(--crc-navy);
  color: #fff;
}

.crc-week-total {
  color: var(--crc-navy);
  font-size: 1.05rem;
  font-weight: 800;
  margin-left: auto;
}

.crc-week-total small {
  color: var(--crc-muted);
  font-size: 0.7rem;
  font-weight: 600;
  margin-left: 2px;
}

.crc-week .crc-week-grid {
  margin-top: 10px;
}

.crc-phase-note {
  color: var(--crc-muted);
  font-size: 0.88rem;
  margin: 10px 16px 14px;
}

.crc-plain-list {
  padding-left: 1.2rem;
}

.crc-plain-list li {
  margin: 0.45rem 0;
}

.crc-plan-footer {
  background: var(--crc-tint);
  border-radius: 10px;
  border-top: 2px solid var(--crc-navy);
  font-size: 0.9rem;
  margin-top: 2.5rem;
  padding: 12px 14px;
}

@media (max-width: 900px) {
  .crc-group-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crc-week-grid,
  .crc-rhythm {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crc-tool-grid {
    grid-template-columns: 1fr;
  }

  .crc-profile-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .crc-group-grid,
  .crc-def-grid,
  .crc-week-grid,
  .crc-rhythm {
    grid-template-columns: 1fr;
  }

  .crc-current-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .crc-mileage {
    text-align: left;
  }

  .crc-phase-strip {
    flex-direction: column;
  }

  .crc-phase-seg {
    text-align: left;
  }

  .crc-day {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 8px;
  }

  .crc-day strong {
    margin: 0;
    padding-top: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .crc-group-card {
    transition: none;
  }
}

@media print {
  .crc-actions,
  .crc-profile-settings,
  .crc-draft-note {
    display: none !important;
  }

  .crc-plan {
    font-size: 11px;
    max-width: none;
    padding: 0;
  }

  .crc-plan-hero,
  .crc-phase {
    border-radius: 0;
  }

  .crc-phase {
    break-inside: auto;
  }

  .crc-phase:not([open]) > *:not(summary) {
    display: block;
  }

  .crc-week {
    break-inside: avoid;
    padding: 6px 8px;
  }

  .crc-week-grid,
  .crc-rhythm {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .crc-day {
    display: block;
    font-size: 9px;
    padding: 3px 5px;
  }
}

.crc-half-week-note {
  background: var(--crc-gold-bg);
  border-left: 4px solid var(--crc-gold);
  border-radius: 7px;
  color: var(--crc-ink);
  font-size: 0.9rem;
  margin: 10px 0 0;
  padding: 9px 11px;
}
