/* ═══════════════════════════════════════════════════════
   GROUNDWORK — components for the Foundational Process pages.
   Extends the Mathemagicians design system. Defines no new
   brand colours, typefaces or spacing rules; every component
   below is built from the existing tokens in styles.css.
   Per-page accent is set via --c / --l / --b.
   ═══════════════════════════════════════════════════════ */

/* ─── TAGS ───────────────────────────────────────────── */
.tag {
  display: inline-block; font-family: var(--inter); font-size: 10px;
  font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 4px 10px; margin-right: 6px;
}
.tag--track  { background: var(--l); color: var(--c); }
.tag--level  { background: rgba(14,27,74,0.07); color: var(--mist); }
.tag--core   { background: rgba(14,27,74,0.06); color: rgba(14,27,74,0.5); }
.tag--conv   { background: rgba(138,143,153,0.12); color: var(--mist); }
.tag--ground { background: rgba(245,166,35,0.14); color: #9a6a10; }

/* ─── FORMAT STRIP ───────────────────────────────────── */
.format-strip {
  display: flex; flex-wrap: wrap; gap: 40px; margin: 36px 0 0;
  border-top: 1px solid rgba(14,27,74,0.1); padding-top: 24px;
}
.format-strip-item { font-family: var(--inter); font-size: 13px; color: var(--mist); }
.format-strip-item strong {
  display: block; font-size: 19px; color: var(--indigo);
  font-family: var(--baskerville); font-weight: 400; margin-bottom: 4px;
}

/* ─── OUTCOME LIST ───────────────────────────────────── */
.outcome-list { list-style: none; padding: 0; margin: 0; }
.outcome-list li {
  padding: 14px 0 14px 30px; position: relative;
  border-bottom: 1px solid rgba(14,27,74,0.07);
  font-size: 16px; line-height: 1.75; color: var(--charcoal);
}
.outcome-list li:last-child { border-bottom: none; }
.outcome-list li::before {
  content: '→'; position: absolute; left: 0; top: 14px;
  color: var(--c); font-size: 14px;
}

/* ─── PHASE ACCORDION ────────────────────────────────── */
.phase-block { margin-bottom: 0; }
.phase-block summary {
  list-style: none; cursor: pointer;
  font-family: var(--baskerville); font-weight: 400;
  font-size: 20px; color: var(--indigo);
  padding: 22px 0; border-top: 1px solid rgba(14,27,74,0.12);
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
}
.phase-block summary::-webkit-details-marker { display: none; }
.phase-block summary::after {
  content: '+'; font-family: var(--inter); font-size: 20px;
  color: var(--c); font-weight: 300; flex-shrink: 0;
}
.phase-block[open] summary::after { content: '−'; }
.phase-meta {
  font-family: var(--inter); font-size: 12px; color: var(--mist);
  letter-spacing: 0.1em; text-transform: uppercase; flex-shrink: 0;
}
.phase-block:last-of-type { border-bottom: 1px solid rgba(14,27,74,0.12); }

/* ─── SESSION CARD ───────────────────────────────────── */
.session-list { padding: 4px 0 28px; margin: 0; list-style: none; }
.session-card {
  display: grid; grid-template-columns: 52px 1fr; gap: 16px;
  padding: 26px 0; border-top: 1px solid rgba(14,27,74,0.07);
}
.session-card:first-child { border-top: none; }
.session-num {
  font-family: var(--mono); font-size: 12px; color: var(--c);
  font-weight: 500; padding-top: 5px; letter-spacing: 0.04em;
}
.session-title {
  font-family: var(--baskerville); font-weight: 400; font-size: 19px;
  color: var(--indigo); line-height: 1.35; margin-bottom: 12px;
}
.session-title .tag { vertical-align: middle; margin-left: 8px; position: relative; top: -2px; }
.trap {
  border-left: 2px solid var(--b); padding: 4px 0 4px 18px; margin: 0 0 16px;
  font-family: var(--baskerville); font-style: italic; font-size: 16px;
  line-height: 1.6; color: rgba(14,27,74,0.72);
}
.trap-label {
  display: block; font-family: var(--inter); font-style: normal;
  font-size: 10px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--c); margin-bottom: 6px;
}
.covers, .lands { font-size: 15px; line-height: 1.8; color: var(--charcoal); margin-bottom: 8px; }
.covers b, .lands b {
  font-family: var(--inter); font-size: 10px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--mist); margin-right: 8px;
}
.lands { color: rgba(14,27,74,0.65); font-style: italic; margin-bottom: 0; }
.lands b { font-style: normal; }

/* ─── COURSE GRID ────────────────────────────────────── */
.track-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: rgba(14,27,74,0.1); margin-top: 8px;
}
.track-card {
  display: flex; flex-direction: column; background: var(--cream);
  padding: 44px 40px; text-decoration: none; transition: background 0.2s;
  border-left: 3px solid var(--tc);
}
.track-card:hover { background: var(--tl); text-decoration: none; }
.track-card-track {
  font-family: var(--inter); font-size: 10px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--tc); display: block; margin-bottom: 10px;
}
.track-card-name {
  font-family: var(--baskerville); font-weight: 400; font-size: 27px;
  color: var(--indigo); margin-bottom: 12px; line-height: 1.2;
}
.track-card-sub {
  font-size: 15px; color: var(--mist); line-height: 1.7;
  margin: 0 0 26px; flex-grow: 1;
}
.track-card-meta {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 16px; border-top: 1px solid rgba(14,27,74,0.1);
  font-family: var(--inter); font-size: 12px; color: var(--mist);
}
.track-card-price { font-weight: 600; color: var(--tc); }

/* ─── SESSION SHAPE TABLE ────────────────────────────── */
.shape-table { width: 100%; border-collapse: collapse; font-family: var(--inter); font-size: 15px; }
.shape-table th {
  font-size: 11px; font-weight: 500; color: var(--mist);
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 12px 14px 12px 0; text-align: left;
  border-bottom: 1px solid rgba(14,27,74,0.15);
}
.shape-table td {
  padding: 18px 14px 18px 0; vertical-align: top;
  border-bottom: 1px solid rgba(14,27,74,0.07);
  color: var(--charcoal); line-height: 1.75;
}
.shape-table td:first-child {
  font-family: var(--baskerville); font-size: 17px; color: var(--indigo);
  white-space: nowrap; width: 200px;
}
.shape-table td:nth-child(2) {
  font-family: var(--mono); font-size: 12px; color: var(--teal); width: 76px;
}
.shape-table tr:last-child td { border-bottom: none; }

/* ─── PRICE TABLE ────────────────────────────────────── */
.price-table { width: 100%; border-collapse: collapse; font-family: var(--inter); font-size: 15px; }
.price-table th {
  font-size: 11px; font-weight: 500; color: var(--mist);
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 12px 16px; text-align: right; border-bottom: 1px solid rgba(14,27,74,0.15);
}
.price-table th:first-child { text-align: left; }
.price-table td {
  padding: 15px 16px; text-align: right;
  border-bottom: 1px solid rgba(14,27,74,0.07); color: var(--charcoal);
}
.price-table td:first-child { text-align: left; }
.price-table td a { color: var(--indigo); }
.price-table td a:hover { color: var(--teal); }
.price-table .amt { font-weight: 600; color: var(--indigo); }
.price-table tbody tr:hover { background: rgba(0,184,169,0.03); }
.price-table tr.total td {
  border-top: 1px solid rgba(14,27,74,0.15); border-bottom: none;
  font-weight: 600; color: var(--indigo); padding-top: 18px;
}

/* ─── BIG PRICE BLOCK ────────────────────────────────── */
.price-block {
  border: 1px solid rgba(14,27,74,0.16); background: var(--l);
  padding: 40px 44px; display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between; gap: 28px;
}
.price-figure {
  font-family: var(--baskerville); font-size: 42px; color: var(--indigo);
  line-height: 1; margin-bottom: 8px;
}
.price-note { font-family: var(--inter); font-size: 13px; color: var(--mist); line-height: 1.6; }

/* ─── PREV / NEXT ────────────────────────────────────── */
.course-nav {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  border-top: 1px solid rgba(14,27,74,0.12); padding-top: 28px;
}
.course-nav a { font-family: var(--inter); font-size: 13px; color: var(--mist); }
.course-nav a:hover { color: var(--indigo); text-decoration: none; }
.course-nav span { display: block; font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: rgba(14,27,74,0.3); margin-bottom: 6px; }

/* ─── FAQ ────────────────────────────────────────────── */
.faq { padding: 30px 0; border-top: 1px solid rgba(14,27,74,0.1); }
.faq:last-of-type { border-bottom: 1px solid rgba(14,27,74,0.1); }
.faq h3 {
  font-family: var(--baskerville); font-weight: 400; font-size: 19px;
  color: var(--indigo); margin-bottom: 12px; line-height: 1.35;
}
.faq p { font-size: 16px; line-height: 1.8; color: var(--charcoal); margin: 0; }

/* ─── NOTE ───────────────────────────────────────────── */
.note {
  border-left: 2px solid var(--teal); padding: 6px 0 6px 20px;
  font-family: var(--inter); font-size: 14px; line-height: 1.75;
  color: rgba(14,27,74,0.62);
}

@media (max-width: 640px) {
  .track-grid { grid-template-columns: 1fr; }
  .price-block { padding: 32px 28px; }
  .shape-table td:first-child { width: auto; white-space: normal; }
  .session-card { grid-template-columns: 40px 1fr; gap: 12px; }
  .format-strip { gap: 24px; }
}
