/* Kickers & type */
.kicker {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.45rem;
}

.section-head {
  margin-bottom: 1.15rem;
}

.section-head h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.section-head p {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 48ch;
  line-height: 1.6;
}

/* Glass panel */
.glass-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  overflow: hidden;
  position: relative;
}

.glass-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.25), transparent);
  pointer-events: none;
  z-index: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.2rem;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  transition: background 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.12s, filter 0.18s;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, #2b7fd4, #0057b8 55%, #003f87);
  color: #ffffff !important;
  border: 1px solid rgba(0, 87, 184, 0.35);
  box-shadow: 0 4px 18px rgba(0, 63, 135, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  text-decoration: none !important;
}

.btn-primary:hover {
  color: #ffffff !important;
  filter: brightness(1.05);
  box-shadow: 0 8px 26px rgba(0, 63, 135, 0.35);
}

.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--surface-hover);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

/* Status chips */
.status-chip {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.status-live {
  color: var(--success);
  background: rgba(26, 143, 92, 0.1);
  border-color: rgba(26, 143, 92, 0.28);
}

.status-soon {
  color: var(--text-dim);
  background: var(--surface);
}

.status-lesson {
  color: var(--ems-mid);
  background: var(--cyan-dim);
  border-color: rgba(0, 87, 184, 0.2);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}

.card-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.resource-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem 1.35rem;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.resource-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  opacity: 0;
  transition: opacity 0.25s;
  background: linear-gradient(90deg, var(--ems-mid), var(--gold));
}

a.resource-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

a.resource-card:hover::after {
  opacity: 1;
}

a.resource-card:focus-visible,
a.category-tile:focus-visible,
.btn:focus-visible,
.footer-col a:focus-visible,
.footer-back-top:focus-visible,
.footer-brand-link:focus-visible {
  outline: 2px solid var(--ems-mid);
  outline-offset: 3px;
}

.resource-card-soon {
  opacity: 0.9;
  cursor: default;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.card-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px var(--accent-glow));
}

.card-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.resource-card h3 {
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.2rem;
}

.card-subtitle {
  font-size: 0.84rem;
  color: var(--cyan);
  font-weight: 600;
  margin-bottom: 0.65rem;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.card-meta li {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ems-mid);
}

a.resource-card:hover .card-cta {
  gap: 0.6rem;
  color: var(--ems);
}

/* Category tiles */
.category-tile {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.35rem 1.3rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s;
  position: relative;
  overflow: hidden;
}

.category-tile::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--ems-mid), var(--gold));
  opacity: 0;
  transition: opacity 0.25s;
}

.category-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

.category-tile:hover::after {
  opacity: 1;
}

.category-tile h3 {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.category-tile p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.tile-count {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-top: 0.35rem;
}

/* Value props */
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.value-card {
  padding: 1.25rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.value-card h3 {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}

.value-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Featured */
.featured-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.5rem;
  padding: 1.5rem 1.6rem;
  align-items: center;
}

.featured-card .kicker {
  margin-bottom: 0.5rem;
}

.featured-card h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.55rem;
}

.featured-card p {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
  max-width: 42ch;
}

.featured-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, rgba(0, 63, 135, 0.06), transparent),
    #0b1f3a;
  border: 1px solid rgba(0, 63, 135, 0.2);
  padding: 1.25rem;
}

.featured-visual svg {
  width: 100%;
  max-width: 320px;
  height: auto;
}

/* Prose */
.prose {
  max-width: var(--prose-max);
}

.prose h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 1.75rem 0 0.65rem;
}

.prose h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.35rem 0 0.5rem;
}

.prose p,
.prose li {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 0.85rem;
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
  margin-bottom: 1rem;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose a {
  color: var(--ems-mid);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(201, 162, 39, 0.45);
  text-underline-offset: 0.15em;
}

.prose a:hover {
  color: var(--ems);
  text-decoration-color: var(--gold);
}

/* Buttons inside prose must not inherit blue link styling */
.prose a.btn,
.prose a.btn:hover {
  text-decoration: none;
  font-weight: 600;
}

.prose a.btn-primary,
.prose a.btn-primary:hover {
  color: #ffffff;
}

.prose a.btn-ghost,
.prose a.btn-ghost:hover {
  color: var(--text);
}

.prose strong {
  color: var(--text);
  font-weight: 700;
}

.callout {
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(201, 162, 39, 0.28);
  background: var(--accent-dim);
}

.callout p {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
}

.decision-box {
  margin: 1.25rem 0;
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
}

.decision-box h3 {
  margin-top: 0;
  color: var(--ems);
  font-size: 0.95rem;
}

.lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 1.25rem;
}

.lesson-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.lesson-nav a.btn-primary,
.lesson-nav a.btn-primary:hover {
  color: #ffffff;
  text-decoration: none;
}

.lesson-nav a.btn-ghost,
.lesson-nav a.btn-ghost:hover {
  color: var(--text);
  text-decoration: none;
}

/* Related lessons */
.related-lessons {
  margin-top: 2rem;
  padding: 1.35rem 1.4rem 1.45rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-soft);
}

.related-lessons > h2 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.9rem;
  color: var(--text);
}

.related-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.related-list a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none !important;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}

.related-list a:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  transform: translateX(2px);
}

.related-list .related-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.related-list .related-meta {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.prose .related-lessons a:hover .related-title {
  color: var(--ems);
}

.path-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.path-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.path-list .step {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--cyan-dim);
  color: var(--ems-mid);
}

.path-list strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.15rem;
}

.path-list span {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.trust-banner {
  text-align: center;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.trust-banner p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.trust-banner a {
  color: var(--ems-mid);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(201, 162, 39, 0.4);
  text-underline-offset: 0.15em;
}

@media (max-width: 800px) {
  .card-grid,
  .card-grid-3,
  .value-grid {
    grid-template-columns: 1fr;
  }

  .featured-card {
    grid-template-columns: 1fr;
  }
}
