/* Training Hub — shared card components.
   Reusable building blocks used across the Sales Process Foundation cards (and
   available to future programs). These intentionally avoid card-specific names
   so the same markup/style is shared, not re-invented per card.

   Depends on the design tokens (--navy, --blue, --slate, --line, --soft-blue)
   defined by the program's base stylesheet (e.g. sales-foundation.css).

   NOTE: the hook band, inspection grid, word track, and step breakdown are also
   shared, and currently live in card-1-foundation.css / card-1-polish.css (loaded
   by every card). Cards 2-3 still use their original per-card map classes
   (.guestsheet-map, .rt-map); those can be migrated to .training-map-grid in a
   later consolidation pass. */

/* Capability map — a 6-card grid of disciplines, each with its inspection cue.
   Used by Card 2 (Guest Sheet Map), Card 3 (Rapport & Transition Map), Card 4
   (Presentation Map), and onward. */
.training-map-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}
.training-map-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfaf7;
}
.training-map-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.training-map-head span {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: .82rem;
  font-weight: 900;
}
.training-map-head strong { color: var(--navy); font-size: 1.02rem; line-height: 1.15; }
.training-map-card p { margin: 0; color: var(--slate); font-size: .94rem; line-height: 1.45; }

/* Compare block — weak vs manager-ready examples (intel, notes, transitions...). */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}
.compare .col { padding: 18px 20px; border-radius: 16px; border: 1px solid var(--line); }
.compare .weak { background: #fbf3f1; border-color: rgba(176, 58, 46, .22); }
.compare .ready { background: var(--navy); border-color: var(--navy); }
.compare .tag {
  display: inline-flex;
  margin-bottom: 8px;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.compare .weak .tag { color: #b03a2e; }
.compare .ready .tag { color: rgba(255, 255, 255, .72); }
.compare .col p { margin: 0; font-weight: 700; line-height: 1.5; }
.compare .weak p { color: var(--navy); }
.compare .ready p { color: #fff; }

/* Operating Truth label inside the shared hook band. */
.hook-band .hook-eyebrow {
  margin: 0 0 8px;
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .6);
}

/* Operating math blocks — formula + worked examples + teaching point.
   Reusable across any module that needs to make a calculation visible to a
   manager (retail-lift goals, 60/60 activity, funnel rates). Three columns of
   math cards on wide screens; stacks on narrow. */
.training-math {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.math-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfaf7;
}
.math-block h3 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 1.12rem;
  line-height: 1.2;
}
.math-block h4 {
  margin: 18px 0 8px;
  color: var(--blue);
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.math-formula {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.math-formula + .math-formula { margin-top: 8px; }
.math-table {
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: .9rem;
}
.math-table td,
.math-table th { overflow-wrap: anywhere; }
.math-table th,
.math-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  color: var(--slate);
}
.math-table th {
  color: var(--navy);
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.math-table td strong { color: var(--navy); }
.math-table tr:last-child td { border-bottom: none; }
.math-funnel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.math-funnel span {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--navy);
  font-size: .82rem;
  font-weight: 800;
}
.math-funnel em { color: var(--slate); font-style: normal; font-weight: 900; }
.math-questions {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}
.math-questions li {
  position: relative;
  padding: 8px 12px 8px 26px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--slate);
  font-size: .88rem;
  line-height: 1.4;
}
.math-questions li::before {
  content: "?";
  position: absolute;
  left: 11px;
  color: var(--blue);
  font-weight: 900;
}
.math-note {
  margin-top: auto;
  padding-top: 14px;
  color: var(--slate);
  font-size: .9rem;
  line-height: 1.5;
}
.math-note strong { color: var(--navy); }

/* Priority list — a tier-ranked set of example rows for list-discipline practice.
   Each row carries a tier badge (colour-coded by priority) and a compact field
   grid. Reusable by any module that teaches sorting/ranking a customer list. */
.priority-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}
.priority-row {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--navy);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(23, 35, 59, .06);
}
.priority-row.tier-1 { border-left-color: #1f7a4d; }
.priority-row.tier-2 { border-left-color: var(--blue); }
.priority-row.tier-3 { border-left-color: var(--draft); }
.priority-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.priority-row-head strong { color: var(--navy); font-size: 1.08rem; }
.tier-badge {
  display: inline-flex;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--navy);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.tier-1 .tier-badge { background: #e6f3ec; color: #1f7a4d; }
.tier-2 .tier-badge { background: var(--soft-blue); color: var(--blue); }
.tier-3 .tier-badge { background: var(--draft-bg); color: var(--draft); }
.priority-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(23, 35, 59, .08);
}
.pf { padding: 12px 14px; background: #fbfaf7; }
.pf.full { grid-column: 1 / -1; }
.pf span {
  display: block;
  margin-bottom: 4px;
  color: var(--blue);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.pf p { margin: 0; color: var(--navy); font-weight: 600; font-size: .92rem; line-height: 1.4; }

/* Script sequence — a numbered set of channel-tagged script blocks (video, text,
   phone, voicemail). Reusable by any module that coaches the exact words of a
   contact or conversation. */
.script-sequence {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.script-step {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 14px;
  background: #fbfaf7;
}
.script-step .chan {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  color: var(--blue);
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.script-step .chan .n {
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: .76rem;
}
.script-step p {
  margin: 0;
  color: var(--navy);
  font-weight: 600;
  font-style: italic;
  line-height: 1.55;
}
/* Stack the contact-plan blocks (context grid, scripts, CRM note). */
.gs-plan { display: grid; gap: 16px; margin-top: 16px; }
/* The display:grid on these reveal-on-click containers overrides the default
   [hidden] display:none, so restore it explicitly (Load Example toggles it). */
.gs-plan[hidden],
.priority-list[hidden] { display: none; }

/* Question / answer callout — highlights a coached question and the customer's
   answer so a diagnosis reads clearly (question asked → answer → obstacle).
   Reusable by any module that pairs a question with its response. */
.qa-callout {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.qa-callout .qa-q { padding: 16px 18px; background: var(--navy); }
.qa-callout .qa-a { padding: 16px 18px; background: var(--soft-blue); }
.qa-callout .qa-label {
  display: block;
  margin-bottom: 6px;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.qa-callout .qa-q .qa-label { color: rgba(255, 255, 255, .66); }
.qa-callout .qa-a .qa-label { color: var(--blue); }
.qa-callout p { margin: 0; font-weight: 700; font-style: italic; line-height: 1.5; }
.qa-callout .qa-q p { color: #fff; }
.qa-callout .qa-a p { color: var(--navy); }

/* Training tabs — a reusable review-mode / stage switcher. Front-end only;
   driven by /assets/js/training-tabs.js. */
.training-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}
.training-tab {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-size: .9rem;
  font-weight: 900;
  cursor: pointer;
}
.training-tab[aria-selected="true"] {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.training-panel { margin-top: 18px; }
.training-panel[hidden] { display: none; }
.training-panel h3 { margin: 0 0 12px; color: var(--navy); }

/* Muted "coming next" state for a card launcher whose lesson isn't built yet. */
.open-card.soon {
  background: #e7e9ee;
  color: var(--slate);
  pointer-events: none;
  cursor: default;
}

@media (max-width: 980px) {
  .training-math { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .training-map-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .compare { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .priority-fields { grid-template-columns: 1fr; }
}
