/* =========================================================
   Qualification detail page (e.g. PSO) — additions on top of
   course.css (.shell, .hero, .eyebrow, .btn-cta are shared).
   Tokens come from assets/css/styles.css — none redefined here.
   Surfaces: bg-surface -> --secondary, bg-surface-raised -> --muted
   ========================================================= */

/* ---------- Hero header ---------- */
.hero .hero-img {
  opacity: 0.2;
}

.det-hero {
  position: relative;
  /* Clears the fixed header, matching .page-hero spacing */
  padding-top: 8rem;
  padding-bottom: 3.5rem;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

.back:hover {
  color: var(--primary);
}

.det-eyebrow {
  margin-top: 2rem;
}

.det-head {
  display: grid;
  align-items: end;
  gap: 2.5rem;
}

.det-main {
  min-width: 0;
}

.det-title {
  max-width: 56rem;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.08;
  color: var(--foreground);
}

.det-lead {
  max-width: 42rem;
  margin-top: 1.25rem;
  font-size: 1rem;
  line-height: 1.75rem;
  color: var(--muted-foreground);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 2rem;
}

.chip {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: color-mix(in oklab, var(--card) 75%, transparent);
  backdrop-filter: blur(4px);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-foreground);
}

.chip svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--primary);
}

/* Fee block with gold rule */
.price-box {
  min-width: 220px;
  padding-left: 1.5rem;
  border-left: 2px solid var(--primary);
}

.price-box.wide {
  min-width: 240px;
}

.price-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted-foreground);
}

.price-num {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--primary);
}

.price-label + .price-num {
  margin-top: 0.5rem;
}

.cta .price-num {
  margin-top: 0;
}

.price-num svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.price-actions {
  margin-top: 1.25rem;
}

@media (min-width: 768px) {
  .det-hero {
    padding-top: 10rem;
    padding-bottom: 5rem;
  }

  .det-title {
    font-size: 52px;
  }

  .det-lead {
    font-size: 1.125rem;
  }
}

@media (min-width: 1024px) {
  .det-head {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

/* ---------- Buttons ---------- */
.btn-cta-lg {
  height: 3rem;
  padding: 0 1.75rem;
}

.btn-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.25rem;
  padding: 0.5rem 1rem;
  border: 1px solid color-mix(in oklab, var(--primary) 55%, transparent);
  border-radius: 0.375rem;
  background: transparent;
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-line:hover {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn-line:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.btn-line-lg {
  height: 3rem;
  padding: 0 1.75rem;
}

/* ---------- Detail layout ---------- */
.detail {
  border-bottom: 1px solid var(--border);
  background: var(--secondary);
}

.cols {
  display: grid;
  align-items: start;
}

.detail-main {
  min-width: 0;
}

.blk {
  padding-block: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.blk:last-child {
  border-bottom: 0;
}

.blk-label {
  margin-bottom: 0.75rem;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--primary);
}

.blk-title {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--foreground);
}

.stack > * + * {
  margin-top: 1rem;
}

.lead {
  font-size: 1.125rem;
  line-height: 2rem;
  color: var(--foreground);
}

.para {
  font-size: 1rem;
  line-height: 1.75rem;
  color: var(--muted-foreground);
}

@media (min-width: 768px) {
  .blk {
    padding-block: 3rem;
  }

  .blk-title {
    font-size: 1.875rem;
  }
}

@media (min-width: 1024px) {
  .cols {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 3.5rem;
  }
}

/* ---------- Check lists ---------- */
.checks {
  display: grid;
  column-gap: 2rem;
  row-gap: 1.25rem;
}

@media (min-width: 640px) {
  .checks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.check-ico {
  display: flex;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: var(--card);
  color: var(--primary);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.check:hover .check-ico {
  border-color: color-mix(in oklab, var(--primary) 45%, transparent);
  background: color-mix(in oklab, var(--primary) 10%, transparent);
}

.check-ico svg {
  width: 1rem;
  height: 1rem;
}

.check-txt {
  padding-top: 0.25rem;
  font-size: 0.875rem;
  line-height: 1.5rem;
  color: var(--muted-foreground);
}

/* ---------- Curriculum ---------- */
.mods {
  display: grid;
  gap: 0.75rem;
}

.mod {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--card);
  transition: border-color 0.2s ease;
}

.mod:hover {
  border-color: color-mix(in oklab, var(--primary) 40%, transparent);
}

.mod-num {
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: color-mix(in oklab, var(--primary) 55%, transparent);
}

.mod-name {
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.5rem;
  color: var(--foreground);
}

.mod-arrow {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--muted-foreground);
  transition: transform 0.2s ease, color 0.2s ease;
}

.mod:hover .mod-arrow {
  transform: translateX(2px);
  color: var(--primary);
}

.mods + .btn-line {
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .mod {
    padding-inline: 1.25rem;
  }
}

/* ---------- Audience list ---------- */
.ticks {
  display: grid;
  gap: 0.75rem;
}

.tick {
  display: flex;
  gap: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5rem;
  color: var(--muted-foreground);
}

.tick-ico {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  margin-top: 0.25rem;
  color: var(--primary);
}

/* ---------- Specs table ---------- */
.specs {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--card);
}

.spec {
  display: grid;
  border-bottom: 1px solid var(--border);
}

.spec:last-child {
  border-bottom: 0;
}

.spec-k {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
}

.spec-v {
  padding: 0.875rem 1.25rem;
  font-size: 0.875rem;
  line-height: 1.5rem;
  color: var(--muted-foreground);
}

@media (min-width: 640px) {
  .spec {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .spec-k {
    border-bottom: 0;
    border-right: 1px solid var(--border);
  }
}

/* ---------- Sidebar ---------- */
.side {
  order: -1;
  padding-block: 2rem;
  border-bottom: 1px solid var(--border);
}

.side-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--card);
  box-shadow: var(--shadow-elegant);
}

.side-price {
  margin-top: 0.5rem;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--primary);
}

.side-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.75rem;
}

.side-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.side-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.side-ico {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
  color: var(--primary);
}

.side-k {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted-foreground);
}

.side-v {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--foreground);
}

.side-actions {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.side-note {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.25rem;
  color: var(--muted-foreground);
}

@media (min-width: 1024px) {
  .side {
    order: 0;
    position: sticky;
    top: 6rem;
    padding-block: 3rem;
    border-bottom: 0;
  }
}

/* ---------- Call to action ---------- */
.cta {
  padding-block: 4rem;
  border-bottom: 1px solid var(--border);
  background: var(--muted);
}

.cta-grid {
  display: grid;
  align-items: end;
  gap: 2rem;
}

.cta-title {
  max-width: 42rem;
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--foreground);
}

.cta-text {
  max-width: 42rem;
  margin-top: 1rem;
  line-height: 1.75rem;
  color: var(--muted-foreground);
}

.cta-btns {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

@media (min-width: 768px) {
  .cta {
    padding-block: 5rem;
  }

  .cta-title {
    font-size: 2.25rem;
  }
}

@media (min-width: 1024px) {
  .cta-grid {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}