/* ============================================================
   Career Sentinel — Training engine page (training.html)
   Uses the shared design tokens from styles.css (:root).
   ============================================================ */

/* ── Hero ─────────────────────────────────────────────────── */
.trn-hero {
  padding: 72px 24px 40px;
  text-align: center;
}
.trn-hero-inner {
  max-width: 820px;
  margin: 0 auto;
}
.trn-hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 18px 0 16px;
}
.trn-hero-title em {
  color: var(--blue-bright);
  font-style: normal;
}
.trn-hero-sub {
  font-size: clamp(1rem, 2.2vw, 1.18rem);
  color: var(--fg-muted, #9fb0d0);
  line-height: 1.6;
  max-width: 680px;
  margin: 0 auto;
}
.trn-hero-meta {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 26px;
  font-size: 0.92rem;
  color: var(--blue-mid);
}
.trn-hero-meta span {
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  padding: 8px 14px;
  border-radius: 999px;
}

/* ── Sections ─────────────────────────────────────────────── */
.trn-section { padding: 48px 24px; }
.trn-section-alt {
  background: var(--bg-3);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.trn-wrap { max-width: 1040px; margin: 0 auto; }
.trn-section-title {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.trn-section-sub {
  color: var(--fg-muted, #9fb0d0);
  font-size: 1.02rem;
  margin: 0 0 28px;
  max-width: 640px;
}

/* ── Builder form ─────────────────────────────────────────── */
.trn-builder-form {
  display: grid;
  gap: 16px;
  max-width: 640px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.trn-field { display: grid; gap: 7px; }
.trn-field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dim);
}
.trn-optional { color: var(--fg-muted, #8294b5); font-weight: 400; }
.trn-field input {
  width: 100%;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px solid var(--border-hover);
  background: #fff;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}
.trn-field input:focus {
  outline: none;
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
.trn-builder-form .cta-btn { justify-self: start; }

/* ── Plan / curriculum ────────────────────────────────────── */
.trn-plan {
  margin-top: 32px;
  background: var(--bg-card);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius);
  padding: 26px;
}
.trn-plan-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.trn-plan-title { font-size: 1.4rem; font-weight: 800; margin: 0 0 4px; }
.trn-plan-meta { color: var(--fg-muted, #9fb0d0); margin: 0; font-size: 0.95rem; }

.trn-bundle-card {
  display: grid;
  gap: 4px;
  justify-items: center;
  background: var(--gold-soft);
  border: 1px solid var(--gold-border);
  border-radius: 14px;
  padding: 14px 18px;
  text-align: center;
  min-width: 180px;
}
.trn-bundle-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9a3412;
}
.trn-bundle-price { font-size: 1.5rem; font-weight: 800; color: var(--fg, #fff); }
.trn-bundle-was {
  font-size: 0.82rem;
  color: var(--fg-muted, #9fb0d0);
  text-decoration: none;
}
.trn-bundle-btn { margin-top: 8px; font-size: 0.9rem; padding: 9px 16px; }

.trn-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.trn-step {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 16px;
  align-items: start;
  background: #fff;
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: 14px;
  padding: 16px 18px;
}
.trn-step-num {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
}
.trn-step-title { font-size: 1.08rem; font-weight: 700; margin: 6px 0 4px; }
.trn-step-why { font-size: 0.86rem; color: var(--blue-pale); margin: 0 0 6px; }
.trn-step-why strong { color: var(--blue-bright); }
.trn-step-summary { font-size: 0.9rem; color: var(--fg-muted, #9fb0d0); margin: 0; line-height: 1.5; }
.trn-step-buy { display: grid; gap: 8px; justify-items: end; }
.trn-step-price { font-weight: 800; font-size: 1.05rem; }

.trn-plan-uncovered {
  margin: 18px 0 0;
  font-size: 0.86rem;
  color: var(--fg-muted, #8294b5);
  border-top: 1px dashed var(--border);
  padding-top: 14px;
}

/* ── Filters ──────────────────────────────────────────────── */
.trn-filters { display: grid; gap: 12px; margin-bottom: 26px; }
.trn-filter-group { display: flex; flex-wrap: wrap; gap: 8px; }
.trn-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  color: #334155;
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}
.trn-chip:hover { border-color: var(--blue-bright); color: #0f172a; }
.trn-chip.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* ── Catalog grid ─────────────────────────────────────────── */
.trn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.trn-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.trn-card:hover { border-color: var(--blue-border); transform: translateY(-2px); }
.trn-card-tags, .trn-step-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.trn-tag {
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: #334155;
}
.trn-tag-tool { background: var(--blue-soft); border-color: var(--blue-border); color: var(--blue-pale); }
.trn-tag-min { color: #9a3412; border-color: var(--gold-border); background: var(--gold-soft); }
.trn-card-title { font-size: 1.12rem; font-weight: 700; margin: 0 0 8px; }
.trn-card-summary {
  font-size: 0.9rem;
  color: var(--fg-muted, #9fb0d0);
  line-height: 1.5;
  margin: 0 0 18px;
  flex: 1;
}
.trn-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}
.trn-card-price { font-weight: 800; font-size: 1.15rem; }
.trn-card-btn {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}
.trn-card-btn:hover { background: var(--blue-mid); }

.trn-status {
  margin-top: 20px;
  color: var(--fg-muted, #9fb0d0);
  font-size: 0.95rem;
}
.trn-empty { color: var(--fg-muted, #8294b5); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 560px) {
  .trn-step { grid-template-columns: 32px 1fr; }
  .trn-step-buy {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-items: stretch;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
  }
  .trn-plan-head { flex-direction: column; }
  .trn-bundle-card { width: 100%; }
}

/* ── Verified freshness badge + banner ────────────────────── */
.trn-verified {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #166534;
  background: rgba(34, 197, 94, 0.10);
  border: 1px solid rgba(34, 197, 94, 0.30);
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 10px;
  cursor: help;
  align-self: flex-start;
}
.trn-step .trn-verified { margin: 0 0 8px; }

.trn-freshness-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(34, 197, 94, 0.07);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--fg, #eaf0fb);
}
.trn-freshness-banner strong { color: #166534; }
.trn-freshness-banner em { color: #9a3412; font-style: normal; font-weight: 600; }
.trn-freshness-icon {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.20);
  color: #86efac;
  font-weight: 800;
}

/* ── Card → player link + watch action ─────────────────────── */
.trn-card-title-link { color: inherit; text-decoration: none; }
.trn-card-title-link:hover { color: var(--blue-bright); }
.trn-card-actions { display: inline-flex; align-items: center; gap: 10px; }
.trn-card-watch {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--blue-bright);
  text-decoration: none;
  white-space: nowrap;
}
.trn-card-watch:hover { text-decoration: underline; }

/* ── The Daily Edge banner ─────────────────────────────────── */
.trn-daily {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  max-width: 1040px; margin: 20px auto 0;
  background: var(--blue-mid);
  color: #fff;
  border: none;
  box-shadow: var(--card-shadow, 0 1px 3px rgba(15,23,42,0.08));
  border-radius: 14px; padding: 14px 20px; text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.trn-daily:hover { filter: brightness(1.06); transform: translateY(-1px); }
.trn-daily-flag {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; white-space: nowrap;
  color: #f5b829;
}
.trn-daily-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 200px; }
.trn-daily-title { font-weight: 700; color: #fff; font-size: 1.02rem; }
.trn-daily-tag { font-size: 0.82rem; color: rgba(255,255,255,0.75); }
.trn-daily-cta { font-weight: 700; color: #fff; white-space: nowrap; }

/* ── The Daily Edge Library TAB (on the Learn page → links to /daily-library.html) ── */
.trn-edge-libtab {
  display: flex; align-items: center; gap: 16px;
  max-width: 1040px; margin: 12px auto 0;
  background: #fff; border: 1px solid var(--border, #e2e8f0); border-radius: 14px;
  padding: 16px 20px; text-decoration: none; color: inherit;
  box-shadow: var(--card-shadow, 0 1px 3px rgba(15,23,42,0.06));
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.trn-edge-libtab:hover {
  transform: translateY(-1px); border-color: #2563eb;
  box-shadow: 0 6px 18px rgba(37,99,235,0.12);
}
.trn-edge-libtab-icon {
  flex: none; width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(37,99,235,0.10); color: #2563eb;
}
.trn-edge-libtab-icon svg { width: 22px; height: 22px; }
.trn-edge-libtab-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.trn-edge-libtab-title { font-weight: 800; font-size: 1.05rem; color: var(--fg, #0f172a); }
.trn-edge-libtab-sub { font-size: 0.86rem; color: var(--fg-muted, #475569); }
.trn-edge-libtab-arrow { flex: none; font-size: 1.3rem; font-weight: 700; color: #2563eb; }

/* ── The Daily Edge Library (browsable archive — used on /daily-library.html) ── */
.trn-edge-head { max-width: 760px; }
.trn-edge-flag {
  display: inline-block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em;
  color: #b8860b; margin-bottom: 8px;
}
.trn-edge-pitch { color: var(--fg-muted, #475569); font-size: 1rem; line-height: 1.6; margin: 6px 0 0; }
.trn-edge-pitch strong { color: var(--fg, #0f172a); }
.trn-edge-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px; margin-top: 22px;
}
.trn-edge-card {
  display: flex; flex-direction: column; gap: 6px;
  background: #fff; border: 1px solid var(--border, #e2e8f0); border-radius: 12px;
  padding: 16px 18px; text-decoration: none; color: inherit;
  box-shadow: var(--card-shadow, 0 1px 3px rgba(15,23,42,0.06));
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.trn-edge-card:hover {
  transform: translateY(-2px); border-color: #2563eb;
  box-shadow: 0 6px 18px rgba(37,99,235,0.12);
}
.trn-edge-card-date {
  font-size: 0.74rem; font-weight: 800; letter-spacing: 0.04em; color: #2563eb; text-transform: uppercase;
}
.trn-edge-card.is-today .trn-edge-card-date { color: #b8860b; }
.trn-edge-card-title { font-weight: 700; font-size: 0.98rem; color: var(--fg, #0f172a); line-height: 1.35; }
.trn-edge-card-cta { margin-top: auto; font-size: 0.82rem; font-weight: 700; color: #2563eb; }
.trn-edge-card-badge {
  align-self: flex-start; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.05em;
  color: #b8860b; background: rgba(245,184,41,0.14); border-radius: 999px; padding: 2px 8px;
}
.trn-edge-count { margin-top: 16px; font-size: 0.86rem; color: var(--fg-muted, #475569); }
@media (max-width: 640px) {
  .trn-edge-grid { grid-template-columns: 1fr; }
}

/* ── Mobile-first course grid ── */
.trn-course-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
@media (min-width: 600px) {
  .trn-course-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .trn-course-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Filter chips row — horizontal scroll on mobile */
.trn-filter-chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
  margin-bottom: 1rem;
}
.trn-filter-chips::-webkit-scrollbar { display: none; }
.trn-filter-chip {
  flex-shrink: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text-dim);
  cursor: pointer;
  white-space: nowrap;
  min-height: 36px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.trn-filter-chip.is-active {
  background: var(--blue-mid);
  border-color: var(--blue-mid);
  color: #fff;
  font-weight: 600;
}

/* Daily Edge banner — compact on mobile */
@media (max-width: 500px) {
  .trn-daily { padding: 0.75rem 1rem; gap: 0.6rem; font-size: 0.82rem; }
  .trn-daily-cta { display: none; }
}
