/* ============================================================
   RELATIONAL DESIGN SYSTEM — Site Styles
   Page-specific styles for relationaldesignsystem.com
   Import after tokens.css and base.css
   ============================================================ */

/* ── Page Transition ──────────────────────────────────────── */

main {
  opacity: 1;
  transition: opacity var(--rds-duration-normal) var(--rds-ease-default);
}

main.page-exit {
  opacity: 0;
}

/* ── Scroll Reveal Animations ─────────────────────────────── */

.reveal {
  opacity: 1; /* Visible fallback */
}

@supports (animation-timeline: scroll()) {
  .reveal {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 100%;
  }

  .reveal-clip {
    clip-path: inset(100% 0 0 0);
    animation: reveal-clip-up linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 100%;
  }
}

@keyframes reveal-fade {
  to { opacity: 1; }
}

@keyframes reveal-clip-up {
  to { clip-path: inset(0 0 0 0); }
}

/* ── Navigation ───────────────────────────────────────────── */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  height: var(--rds-nav-height);
  background: color-mix(in srgb, var(--rds-bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rds-border-subtle);
  display: flex;
  align-items: center;
  transform: translateY(0);
  transition: transform 0.32s cubic-bezier(0.25, 0.1, 0.25, 1),
              background 0.2s;
}

.site-nav.nav-hidden {
  transform: translateY(-100%);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--rds-container-xl);
  margin-inline: auto;
  padding-inline: var(--rds-gutter);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--rds-space-3);
  text-decoration: none;
  color: var(--rds-text);
  flex-shrink: 0;
}

.nav-logo svg {
  width: 36px;
  height: 36px;
}

.nav-logo-text {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-lg);
  font-weight: var(--rds-weight-regular);
  letter-spacing: var(--rds-tracking-tight);
}

.nav-links {
  display: none;
  align-items: center;
  gap: var(--rds-space-6);
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  font-size: var(--rds-text-sm);
  font-weight: var(--rds-weight-medium);
  color: var(--rds-text-secondary);
  text-decoration: none;
  padding: var(--rds-space-2) 0;
  transition: color var(--rds-duration-fast) var(--rds-ease-default);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--rds-text);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--rds-accent-500);
  border-radius: 1px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--rds-space-3);
}

.dark-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--rds-radius-md);
  background: transparent;
  border: 1px solid var(--rds-border);
  color: var(--rds-text-secondary);
  cursor: pointer;
  transition: background var(--rds-duration-fast) var(--rds-ease-default),
              color var(--rds-duration-fast) var(--rds-ease-default),
              border-color var(--rds-duration-fast) var(--rds-ease-default);
}

.dark-toggle:hover {
  background: var(--rds-bg-surface);
  color: var(--rds-text);
  border-color: var(--rds-border-strong);
}

.dark-toggle svg {
  width: 18px;
  height: 18px;
}

/* Hamburger */
.hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--rds-radius-md);
  background: transparent;
  border: 1px solid var(--rds-border);
  color: var(--rds-text-secondary);
  cursor: pointer;
  transition: background var(--rds-duration-fast) var(--rds-ease-default),
              color var(--rds-duration-fast) var(--rds-ease-default);
}

.hamburger:hover {
  background: var(--rds-bg-surface);
  color: var(--rds-text);
}

.hamburger svg {
  width: 20px;
  height: 20px;
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--rds-nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  background: var(--rds-bg);
  padding: var(--rds-space-6);
  flex-direction: column;
  gap: var(--rds-space-1);
  overflow-y: auto;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  display: block;
  font-size: var(--rds-text-lg);
  font-weight: var(--rds-weight-medium);
  color: var(--rds-text-secondary);
  text-decoration: none;
  padding: var(--rds-space-4) var(--rds-space-4);
  border-radius: var(--rds-radius-md);
  transition: background var(--rds-duration-fast) var(--rds-ease-default),
              color var(--rds-duration-fast) var(--rds-ease-default);
}

.mobile-menu a:hover,
.mobile-menu a.active {
  background: var(--rds-bg-surface);
  color: var(--rds-text);
}

@media (min-width: 769px) {
  .nav-links {
    display: flex;
  }

  .hamburger {
    display: none;
  }
}

/* ── Footer ───────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--rds-border);
  padding: var(--rds-space-12) 0 var(--rds-space-8);
  margin-top: var(--rds-space-16);
}

.footer-inner {
  max-width: var(--rds-container-xl);
  margin-inline: auto;
  padding-inline: var(--rds-gutter);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rds-space-6);
  margin-bottom: var(--rds-space-10);
}

@media (min-width: 769px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--rds-space-8);
  }
}

.footer-brand p {
  color: var(--rds-text-secondary);
  font-size: var(--rds-text-sm);
  max-width: 36ch;
  margin-top: var(--rds-space-3);
}

.footer-col h4 {
  font-size: var(--rds-text-xs);
  font-weight: var(--rds-weight-semibold);
  letter-spacing: var(--rds-tracking-widest);
  text-transform: uppercase;
  color: var(--rds-text-muted);
  margin-bottom: var(--rds-space-4);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: var(--rds-space-2);
}

.footer-col a {
  font-size: var(--rds-text-sm);
  color: var(--rds-text-secondary);
  text-decoration: none;
  transition: color var(--rds-duration-fast) var(--rds-ease-default);
}

.footer-col a:hover {
  color: var(--rds-text);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--rds-space-4);
  padding-top: var(--rds-space-6);
  border-top: 1px solid var(--rds-border-subtle);
  font-size: var(--rds-text-xs);
  color: var(--rds-text-muted);
}

.footer-bottom a {
  color: var(--rds-text-muted);
  text-decoration: none;
  transition: color var(--rds-duration-fast) var(--rds-ease-default);
}

.footer-bottom a:hover {
  color: var(--rds-text-secondary);
}

/* ── Hero Section ─────────────────────────────────────────── */

.hero {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--rds-space-24) var(--rds-gutter) var(--rds-space-16);
  position: relative;
}

.hero-overline {
  font-family: var(--rds-font-body);
  font-size: var(--rds-text-xs);
  font-weight: var(--rds-weight-semibold);
  letter-spacing: var(--rds-tracking-widest);
  text-transform: uppercase;
  color: var(--rds-primary-500);
  margin-bottom: var(--rds-space-6);
}

.hero h1 {
  max-width: 18ch;
  margin-inline: auto;
  margin-bottom: var(--rds-space-6);
}

.hero-subtitle {
  font-size: var(--rds-text-md);
  line-height: var(--rds-leading-relaxed);
  color: var(--rds-text-secondary);
  max-width: 52ch;
  margin-inline: auto;
  margin-bottom: var(--rds-space-8);
}

.hero-cta {
  margin-top: var(--rds-space-4);
}

/* Hero decorative background */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    color-mix(in srgb, var(--rds-accent-500) 4%, transparent) 0%,
    color-mix(in srgb, var(--rds-primary-500) 2%, transparent) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: -1;
}

/* ── Five Parts Grid ──────────────────────────────────────── */

.parts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rds-gutter);
}

.parts-grid .part-card:first-child {
  grid-column: span 1;
}

@media (min-width: 1025px) {
  .parts-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .parts-grid .part-card:first-child {
    grid-column: span 2;
  }
}

@media (min-width: 769px) {
  .parts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .parts-grid .part-card:first-child {
    grid-column: span 2;
  }
}

.part-card {
  background: var(--rds-bg-elevated);
  border: 1px solid var(--rds-border);
  border-radius: var(--rds-radius-lg);
  padding: var(--rds-space-6);
  text-decoration: none;
  color: var(--rds-text);
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-3);
  transition: box-shadow var(--rds-duration-normal) var(--rds-ease-default),
              border-color var(--rds-duration-normal) var(--rds-ease-default),
              transform var(--rds-duration-normal) var(--rds-ease-default);
  cursor: pointer;
}

.part-card:hover {
  box-shadow: var(--rds-shadow-md);
  border-color: var(--rds-border-strong);
  transform: translateY(-2px);
  text-decoration: none;
}

.part-card:active {
  transform: translateY(0);
}

.part-numeral {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-3xl);
  line-height: 1;
  opacity: 0.8;
}

.part-card h3 {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-xl);
  font-weight: var(--rds-weight-regular);
  margin-bottom: 0;
}

.part-card p {
  font-size: var(--rds-text-sm);
  color: var(--rds-text-secondary);
  line-height: var(--rds-leading-normal);
}

.part-card .part-meta {
  font-size: var(--rds-text-xs);
  color: var(--rds-text-muted);
  font-weight: var(--rds-weight-medium);
  margin-top: auto;
  padding-top: var(--rds-space-3);
  border-top: 1px solid var(--rds-border-subtle);
}

/* ── How It Works ─────────────────────────────────────────── */

.how-stack {
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-10);
  max-width: 900px;
}

.how-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rds-space-2);
  align-items: start;
}

.how-item:nth-child(even) {
  margin-left: 0;
  max-width: 100%;
}

.how-keyword {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-2xl);
  line-height: 1;
  font-style: italic;
  opacity: 0.7;
}

.how-item h3 {
  font-size: var(--rds-text-lg);
  margin-bottom: var(--rds-space-2);
}

.how-item p {
  font-size: var(--rds-text-base);
  color: var(--rds-text-secondary);
  max-width: 50ch;
}

@media (min-width: 769px) {
  .how-item {
    grid-template-columns: 120px 1fr;
    gap: var(--rds-space-8);
  }

  .how-item:nth-child(even) {
    margin-left: auto;
    max-width: 90%;
  }

  .how-keyword {
    font-size: var(--rds-text-3xl);
  }
}

/* ── Featured Frameworks ──────────────────────────────────── */

.featured-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rds-gutter);
}

@media (min-width: 1025px) {
  .featured-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 601px) {
  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.featured-card {
  background: var(--rds-bg-elevated);
  border: 1px solid var(--rds-border);
  border-radius: var(--rds-radius-lg);
  padding: var(--rds-space-6);
  text-decoration: none;
  color: var(--rds-text);
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-3);
  transition: box-shadow var(--rds-duration-normal) var(--rds-ease-default),
              border-color var(--rds-duration-normal) var(--rds-ease-default),
              transform var(--rds-duration-normal) var(--rds-ease-default);
}

.featured-card:hover {
  box-shadow: var(--rds-shadow-md);
  border-color: var(--rds-border-strong);
  transform: translateY(-2px);
  text-decoration: none;
}

.featured-card .fw-name {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-2xl);
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.featured-card .fw-subtitle {
  font-size: var(--rds-text-xs);
  color: var(--rds-text-muted);
  line-height: var(--rds-leading-normal);
}

.featured-card .fw-desc {
  font-size: var(--rds-text-sm);
  color: var(--rds-text-secondary);
  line-height: var(--rds-leading-normal);
  margin-top: auto;
}

/* ── Book Promo ───────────────────────────────────────────── */

.book-promo {
  background: var(--rds-bg-surface);
  border-radius: var(--rds-radius-xl);
  padding: var(--rds-space-8) var(--rds-space-6);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rds-space-8);
  align-items: center;
  text-align: center;
}

@media (min-width: 769px) {
  .book-promo {
    grid-template-columns: 1fr 1fr;
    padding: var(--rds-space-12) var(--rds-space-8);
    text-align: left;
  }
}

.book-promo h2 {
  font-family: var(--rds-font-display);
  font-size: clamp(var(--rds-text-2xl), 3vw, var(--rds-text-3xl));
  font-weight: var(--rds-weight-regular);
}

.book-promo .book-stat-row {
  display: flex;
  gap: var(--rds-space-8);
  margin: var(--rds-space-6) 0;
  flex-wrap: wrap;
  justify-content: center;
}

@media (min-width: 769px) {
  .book-promo .book-stat-row {
    justify-content: flex-start;
  }
}

.book-stat {
  text-align: center;
}

.book-stat .stat-num {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-3xl);
  line-height: 1;
  color: var(--rds-primary-500);
}

.book-stat .stat-label {
  font-size: var(--rds-text-xs);
  color: var(--rds-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--rds-tracking-wider);
  margin-top: var(--rds-space-1);
}

/* Book visual placeholder */
.book-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.book-shape {
  width: 200px;
  height: 280px;
  background: linear-gradient(135deg, var(--rds-primary-500), var(--rds-primary-700));
  border-radius: var(--rds-radius-md) var(--rds-radius-lg) var(--rds-radius-lg) var(--rds-radius-md);
  box-shadow: var(--rds-shadow-xl), inset -4px 0 12px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--rds-space-6);
  color: var(--rds-neutral-0);
  text-align: center;
  position: relative;
}

.book-shape::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 12px;
  background: linear-gradient(90deg, rgba(0,0,0,0.12), transparent);
  border-radius: var(--rds-radius-md) 0 0 var(--rds-radius-md);
}

.book-shape .book-title-visual {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-md);
  line-height: var(--rds-leading-snug);
  margin-bottom: var(--rds-space-3);
}

.book-shape .book-author-visual {
  font-size: var(--rds-text-xs);
  opacity: 0.7;
  letter-spacing: var(--rds-tracking-wide);
}

/* ── Section Headers ──────────────────────────────────────── */

.section-header {
  margin-bottom: var(--rds-space-10);
}

.section-header .rds-overline {
  display: block;
  margin-bottom: var(--rds-space-3);
}

.section-header h2 {
  font-family: var(--rds-font-display);
  font-size: clamp(var(--rds-text-2xl), 3vw, var(--rds-text-3xl));
  font-weight: var(--rds-weight-regular);
  margin-bottom: var(--rds-space-3);
}

.section-header p {
  color: var(--rds-text-secondary);
  max-width: 55ch;
}

/* ── Book Page ────────────────────────────────────────────── */

.book-hero {
  padding: var(--rds-space-20) var(--rds-gutter) var(--rds-space-12);
  text-align: center;
}

.book-hero h1 {
  max-width: 24ch;
  margin-inline: auto;
}

.book-hero .rds-lead {
  margin-inline: auto;
  margin-top: var(--rds-space-4);
}

.book-stats-bar {
  display: flex;
  justify-content: center;
  gap: var(--rds-space-10);
  padding: var(--rds-space-8) 0;
  border-top: 1px solid var(--rds-border);
  border-bottom: 1px solid var(--rds-border);
  flex-wrap: wrap;
}

.book-chapter-list {
  max-width: 720px;
  margin-inline: auto;
}

.book-chapter-list .part-block {
  margin-bottom: var(--rds-space-8);
  padding-bottom: var(--rds-space-8);
  border-bottom: 1px solid var(--rds-border-subtle);
}

.book-chapter-list .part-block:last-child {
  border-bottom: none;
}

.part-block-header {
  display: flex;
  align-items: baseline;
  gap: var(--rds-space-3);
  margin-bottom: var(--rds-space-4);
}

.part-block-header .part-num {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-xl);
  opacity: 0.6;
}

.part-block-header h3 {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-xl);
  font-weight: var(--rds-weight-regular);
  margin-bottom: 0;
}

.framework-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--rds-space-2);
}

.framework-list li {
  margin: 0;
}

.framework-list li a {
  display: inline-flex;
  align-items: center;
  gap: var(--rds-space-1);
  font-size: var(--rds-text-sm);
  padding: var(--rds-space-1) var(--rds-space-3);
  border: 1px solid var(--rds-border);
  border-radius: var(--rds-radius-full);
  color: var(--rds-text-secondary);
  text-decoration: none;
  transition: all var(--rds-duration-fast) var(--rds-ease-default);
}

.framework-list li a:hover {
  border-color: var(--rds-primary-300);
  color: var(--rds-primary-500);
  background: var(--rds-primary-50);
}

.framework-list li a .fw-num {
  font-size: var(--rds-text-xs);
  font-weight: var(--rds-weight-bold);
  font-variant-numeric: tabular-nums;
  opacity: 0.5;
}

/* ── About Page ───────────────────────────────────────────── */

.about-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rds-space-8);
  align-items: start;
}

@media (min-width: 769px) {
  .about-layout {
    grid-template-columns: 1fr 360px;
    gap: var(--rds-space-12);
  }
}

@media (min-width: 1200px) {
  .about-layout {
    grid-template-columns: 1fr 440px;
    gap: var(--rds-space-16);
  }
}

.about-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--rds-radius-xl);
  overflow: hidden;
  background: var(--rds-bg-surface);
}

.about-visual svg {
  width: 100%;
  height: 100%;
}

/* Author photo */
.author-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: var(--rds-radius-xl);
}

.author-photo-caption {
  font-size: var(--rds-text-sm);
  color: var(--rds-text-muted);
  text-align: center;
  margin-top: var(--rds-space-2);
}

/* Book author photo */
.book-author-photo-wrap {
  width: 100%;
  max-width: 280px;
  border-radius: var(--rds-radius-xl);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}

@media (min-width: 769px) {
  .book-author-photo-wrap {
    max-width: 100%;
  }
}

.book-author-photo-wrap img {
  width: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
  aspect-ratio: 3 / 4;
}

.about-content h2 {
  margin-top: var(--rds-space-8);
}

.about-content p {
  color: var(--rds-text-secondary);
}

/* ── Blog Page ────────────────────────────────────────────── */

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rds-gutter);
}

.blog-grid .blog-card:first-child {
  grid-column: span 1;
}

@media (min-width: 769px) {
  .blog-grid {
    grid-template-columns: 1fr 1fr;
  }

  .blog-grid .blog-card:first-child {
    grid-column: span 2;
  }
}

.blog-card {
  background: var(--rds-bg-elevated);
  border: 1px solid var(--rds-border);
  border-radius: var(--rds-radius-lg);
  padding: var(--rds-space-6);
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-3);
  transition: box-shadow var(--rds-duration-normal) var(--rds-ease-default),
              border-color var(--rds-duration-normal) var(--rds-ease-default);
}

.blog-card:hover {
  box-shadow: var(--rds-shadow-md);
  border-color: var(--rds-border-strong);
}

.blog-card .blog-date {
  font-size: var(--rds-text-xs);
  color: var(--rds-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--rds-tracking-wider);
}

.blog-card h3 {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-xl);
  font-weight: var(--rds-weight-regular);
  margin-bottom: 0;
}

.blog-card p {
  font-size: var(--rds-text-sm);
  color: var(--rds-text-secondary);
  line-height: var(--rds-leading-normal);
}

.blog-card .blog-tag {
  display: inline-block;
  font-size: var(--rds-text-xs);
  color: var(--rds-accent-500);
  font-weight: var(--rds-weight-semibold);
}

.blog-card:first-child h3 {
  font-size: clamp(var(--rds-text-xl), 2vw, var(--rds-text-2xl));
}

/* Blog card featured media */
.blog-card-has-media {
  padding: 0;
  overflow: hidden;
}

.blog-card-has-media .blog-date,
.blog-card-has-media h3,
.blog-card-has-media p,
.blog-card-has-media .blog-tag {
  padding: 0 var(--rds-space-6);
}

.blog-card-has-media .blog-date { padding-top: var(--rds-space-5); }
.blog-card-has-media .blog-tag  { padding-bottom: var(--rds-space-5); }

.blog-card-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0;
}

.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s var(--rds-ease-default);
}

.blog-card:hover .blog-card-media img {
  transform: scale(1.03);
}

.blog-card-video iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Blog skeleton loading */
.blog-loading {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rds-gutter);
}

@media (min-width: 769px) {
  .blog-loading {
    grid-template-columns: 1fr 1fr;
  }
  .blog-loading .blog-skeleton:first-child {
    grid-column: span 2;
  }
}

.blog-skeleton {
  height: 240px;
  background: linear-gradient(
    90deg,
    var(--rds-bg-elevated) 25%,
    var(--rds-border) 50%,
    var(--rds-bg-elevated) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
  border-radius: var(--rds-radius-lg);
  border: 1px solid var(--rds-border);
}

@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Blog back link */
.blog-post-hero {
  min-height: unset;
  padding-top: var(--rds-space-10);
  padding-bottom: var(--rds-space-4);
  align-items: flex-start;
}

.blog-back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--rds-space-2);
  font-size: var(--rds-text-sm);
  color: var(--rds-text-muted);
  text-decoration: none;
  transition: color var(--rds-duration-fast) var(--rds-ease-default);
}

.blog-back-link:hover {
  color: var(--rds-text-primary);
}

/* Blog single post */
.blog-post-content {
  max-width: 72ch;
  margin-inline: auto;
}

.blog-post-header {
  margin-bottom: var(--rds-space-8);
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-3);
}

.blog-post-header h1 {
  margin-bottom: 0;
}

.blog-post-media {
  width: 100%;
  border-radius: var(--rds-radius-xl);
  overflow: hidden;
  margin-bottom: var(--rds-space-10);
  aspect-ratio: 16 / 9;
}

.blog-post-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-post-video iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.blog-post-body {
  font-size: var(--rds-text-md);
  line-height: var(--rds-leading-relaxed);
  color: var(--rds-text-secondary);
}

.blog-post-body h2 {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-2xl);
  color: var(--rds-text-primary);
  margin-top: var(--rds-space-10);
  margin-bottom: var(--rds-space-4);
  font-weight: var(--rds-weight-regular);
}

.blog-post-body h3 {
  font-size: var(--rds-text-xl);
  color: var(--rds-text-primary);
  margin-top: var(--rds-space-8);
  margin-bottom: var(--rds-space-3);
}

.blog-post-body p {
  margin-bottom: var(--rds-space-5);
}

.blog-post-body blockquote {
  border-left: 3px solid var(--rds-accent-500);
  margin: var(--rds-space-8) 0;
  padding: var(--rds-space-4) var(--rds-space-6);
  font-style: italic;
  color: var(--rds-text-muted);
  background: var(--rds-bg-elevated);
  border-radius: 0 var(--rds-radius-md) var(--rds-radius-md) 0;
}

/* ── Contact Page ─────────────────────────────────────────── */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rds-space-8);
  align-items: start;
}

@media (min-width: 769px) {
  .contact-layout {
    grid-template-columns: 1fr 1fr;
    gap: var(--rds-space-12);
  }
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-5);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-2);
}

.form-group label {
  font-size: var(--rds-text-sm);
  font-weight: var(--rds-weight-medium);
  color: var(--rds-text-secondary);
}

.contact-aside h3 {
  margin-top: var(--rds-space-8);
}

.contact-aside h3:first-child {
  margin-top: 0;
}

.contact-aside p {
  color: var(--rds-text-secondary);
  font-size: var(--rds-text-sm);
}

.contact-aside a {
  color: var(--rds-link);
  font-weight: var(--rds-weight-medium);
}

.collab-list {
  list-style: none;
  padding: 0;
  margin: var(--rds-space-4) 0;
}

.collab-list li {
  padding: var(--rds-space-2) 0;
  font-size: var(--rds-text-sm);
  color: var(--rds-text-secondary);
  display: flex;
  align-items: center;
  gap: var(--rds-space-2);
}

.collab-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--rds-accent-500);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Form success message */
.form-success {
  background: var(--rds-success-light);
  border: 1px solid var(--rds-success);
  color: var(--rds-success-dark);
  padding: var(--rds-space-4) var(--rds-space-6);
  border-radius: var(--rds-radius-md);
  font-size: var(--rds-text-sm);
  display: none;
}

.form-success.show {
  display: block;
}

/* ── Page Hero (interior pages) ───────────────────────────── */

.page-hero {
  padding: var(--rds-space-16) var(--rds-gutter) var(--rds-space-10);
  text-align: center;
}

.page-hero h1 {
  max-width: 20ch;
  margin-inline: auto;
}

.page-hero .rds-lead {
  margin-inline: auto;
  margin-top: var(--rds-space-3);
}

/* ── CTA Section ──────────────────────────────────────────── */

.cta-section {
  text-align: center;
  background: var(--rds-bg-surface);
  border-radius: var(--rds-radius-xl);
  padding: var(--rds-space-12) var(--rds-space-8);
}

.cta-section h2 {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-2xl);
  font-weight: var(--rds-weight-regular);
}

.cta-section p {
  max-width: 50ch;
  margin-inline: auto;
  color: var(--rds-text-secondary);
}

/* ── Content Visibility for Off-Screen Sections ───────────── */

.rds-section {
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

/* ── Loading placeholder for framework routes ─────────────── */

.loading-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  color: var(--rds-text-muted);
  font-size: var(--rds-text-lg);
}

/* ── Arrow icon in links ──────────────────────────────────── */

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: var(--rds-space-2);
  font-weight: var(--rds-weight-medium);
  font-size: var(--rds-text-sm);
  color: var(--rds-link);
  text-decoration: none;
  transition: gap var(--rds-duration-fast) var(--rds-ease-default),
              color var(--rds-duration-fast) var(--rds-ease-default);
}

.arrow-link:hover {
  gap: var(--rds-space-3);
  color: var(--rds-link-hover);
}

.arrow-link svg {
  width: 16px;
  height: 16px;
}

/* ══════════════════════════════════════════════════════════
   FORM ENHANCEMENTS — Error, Gated Content, PHP-compatible
   ══════════════════════════════════════════════════════════ */

/* Form error message */
.form-error {
  background: var(--rds-error-light);
  border: 1px solid var(--rds-error);
  color: var(--rds-error-dark);
  padding: var(--rds-space-3) var(--rds-space-4);
  border-radius: var(--rds-radius-md);
  font-size: var(--rds-text-sm);
}

/* Small input variant */
.rds-input-sm {
  padding: var(--rds-space-2) var(--rds-space-3) !important;
  font-size: var(--rds-text-sm) !important;
}

/* Button disabled state */
.rds-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Gated Content Email Capture Form ─────────────────────── */

.gated-form {
  width: 100%;
  max-width: 360px;
  margin-top: var(--rds-space-3);
}

.gated-form-row {
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-2);
  margin-bottom: var(--rds-space-2);
}

.gated-form-row input {
  flex: 1;
  min-width: 0;
}

.gated-submit-btn {
  white-space: nowrap;
  flex-shrink: 0;
  width: 100%;
  justify-content: center;
}

.gated-form-msg {
  font-size: var(--rds-text-sm);
  padding: var(--rds-space-2) var(--rds-space-3);
  border-radius: var(--rds-radius-sm);
  text-align: center;
  margin-top: var(--rds-space-2);
}

.gated-msg-success {
  background: var(--rds-success-light);
  color: var(--rds-success-dark);
  border: 1px solid var(--rds-success);
}

.gated-msg-error {
  background: var(--rds-error-light);
  color: var(--rds-error-dark);
  border: 1px solid var(--rds-error);
}

@media (min-width: 481px) {
  .gated-form-row {
    flex-direction: row;
  }

  .gated-submit-btn {
    width: auto;
    justify-content: flex-start;
  }
}

/* ══════════════════════════════════════════════════════════
   FRAMEWORK EXPLORER PAGE
   ══════════════════════════════════════════════════════════ */

.fw-filters {
  margin-bottom: var(--rds-space-8);
}

.fw-search-wrap {
  position: relative;
  max-width: 400px;
  margin-bottom: var(--rds-space-5);
}

.fw-search-wrap .search-icon {
  position: absolute;
  left: var(--rds-space-4);
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--rds-text-muted);
  pointer-events: none;
}

.fw-search {
  padding-left: var(--rds-space-10) !important;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--rds-space-2);
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--rds-space-2);
  font-family: var(--rds-font-body);
  font-size: var(--rds-text-sm);
  font-weight: var(--rds-weight-medium);
  padding: var(--rds-space-2) var(--rds-space-4);
  border: 1px solid var(--rds-border);
  border-radius: var(--rds-radius-full);
  background: transparent;
  color: var(--rds-text-secondary);
  cursor: pointer;
  transition: all var(--rds-duration-fast) var(--rds-ease-default);
}

.filter-btn:hover {
  border-color: var(--rds-border-strong);
  color: var(--rds-text);
}

.filter-btn.active {
  background: var(--rds-primary-500);
  border-color: var(--rds-primary-500);
  color: white;
}

.filter-btn[data-filter]:not([data-filter="all"]).active {
  background: var(--filter-color);
  border-color: var(--filter-color);
  color: white;
}

.filter-count {
  font-size: var(--rds-text-xs);
  opacity: 0.7;
}

.fw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: var(--rds-gutter);
}

.fw-card {
  background: var(--rds-bg-elevated);
  border: 1px solid var(--rds-border);
  border-radius: var(--rds-radius-lg);
  padding: var(--rds-space-5);
  text-decoration: none;
  color: var(--rds-text);
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-2);
  transition: box-shadow var(--rds-duration-normal) var(--rds-ease-default),
              border-color var(--rds-duration-normal) var(--rds-ease-default),
              transform var(--rds-duration-normal) var(--rds-ease-default);
}

.fw-card:hover {
  box-shadow: var(--rds-shadow-md);
  border-color: var(--rds-border-strong);
  transform: translateY(-2px);
  text-decoration: none;
}

.fw-card:active {
  transform: translateY(0);
}

.fw-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--rds-space-1);
}

.fw-card-name {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-xl);
  font-weight: var(--rds-weight-regular);
  letter-spacing: 0.04em;
  margin: 0;
}

.fw-card-subtitle {
  font-size: var(--rds-text-xs);
  color: var(--rds-text-muted);
  line-height: var(--rds-leading-normal);
  margin: 0;
}

.fw-card-desc {
  font-size: var(--rds-text-sm);
  color: var(--rds-text-secondary);
  line-height: var(--rds-leading-normal);
  margin: 0;
  margin-top: auto;
}

.fw-empty {
  text-align: center;
  color: var(--rds-text-muted);
  font-size: var(--rds-text-lg);
  padding: var(--rds-space-16) 0;
}

/* ══════════════════════════════════════════════════════════
   INDIVIDUAL FRAMEWORK PAGE
   ══════════════════════════════════════════════════════════ */

.fw-hero {
  padding: var(--rds-space-16) 0 var(--rds-space-10);
  border-bottom: 1px solid var(--rds-border-subtle);
}

.fw-hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rds-space-8);
  align-items: center;
}

.fw-hero-text {
  min-width: 0;
}

.fw-hero-art {
  border-radius: var(--rds-radius-lg);
  overflow: hidden;
  height: 200px;
  width: 100%;
}

.fw-hero-art svg {
  width: 100%;
  height: 100%;
  display: block;
}

.fw-hero-meta {
  display: flex;
  gap: var(--rds-space-3);
  flex-wrap: wrap;
  margin-bottom: var(--rds-space-5);
}

.fw-hero h1 {
  margin-bottom: var(--rds-space-4);
  letter-spacing: 0.06em;
}

.fw-hero-subtitle {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-md);
  font-style: italic;
  color: var(--rds-text-secondary);
  margin-bottom: var(--rds-space-4);
}

.fw-hero-desc {
  color: var(--rds-text-secondary);
  max-width: 60ch;
}

.fw-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rds-space-8);
  align-items: start;
}

@media (min-width: 1025px) {
  .fw-layout {
    grid-template-columns: 1fr 280px;
    gap: var(--rds-space-12);
  }
}

.fw-main {
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-8);
}

.fw-toc {
  background: var(--rds-bg-surface);
  border-radius: var(--rds-radius-lg);
  padding: var(--rds-space-6);
}

.fw-toc h2 {
  font-size: var(--rds-text-lg);
  margin-bottom: var(--rds-space-4);
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  display: flex;
  align-items: center;
  gap: var(--rds-space-3);
  padding: var(--rds-space-2) 0;
  font-size: var(--rds-text-sm);
  color: var(--rds-text-secondary);
  border-bottom: 1px solid var(--rds-border-subtle);
}

.toc-list li:last-child {
  border-bottom: none;
}

.toc-num {
  font-variant-numeric: tabular-nums;
  font-weight: var(--rds-weight-semibold);
  color: var(--rds-text-muted);
  font-size: var(--rds-text-xs);
  min-width: 1.5rem;
}

.fw-preview h2 {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-xl);
  font-weight: var(--rds-weight-regular);
  margin-bottom: var(--rds-space-4);
}

.fw-preview p {
  color: var(--rds-text-secondary);
}

.gated-content-preview {
  padding: var(--rds-space-8);
}

.gated-content-preview h2 {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-xl);
  font-weight: var(--rds-weight-regular);
  margin-bottom: var(--rds-space-4);
}

.gated-content-preview h3 {
  margin-top: var(--rds-space-6);
}

.gated-content-preview p {
  color: var(--rds-text-secondary);
}

.fw-sidebar {
  position: static;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--rds-space-6);
}

@media (min-width: 1025px) {
  .fw-sidebar {
    position: sticky;
    top: calc(var(--rds-nav-height) + var(--rds-space-6));
    display: flex;
    flex-direction: column;
  }
}

.sidebar-block {
  padding-bottom: var(--rds-space-5);
  border-bottom: 1px solid var(--rds-border-subtle);
}

.sidebar-block:last-child {
  border-bottom: none;
}

.sidebar-block h4 {
  font-size: var(--rds-text-xs);
  text-transform: uppercase;
  letter-spacing: var(--rds-tracking-widest);
  color: var(--rds-text-muted);
  margin-bottom: var(--rds-space-3);
}

.sidebar-part-link {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-md);
  text-decoration: none;
  transition: opacity var(--rds-duration-fast) var(--rds-ease-default);
}

.sidebar-part-link:hover {
  opacity: 0.8;
  text-decoration: none;
}

.related-stack {
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-2);
}

.related-card {
  display: flex;
  align-items: center;
  gap: var(--rds-space-3);
  padding: var(--rds-space-2) var(--rds-space-3);
  border-radius: var(--rds-radius-md);
  text-decoration: none;
  color: var(--rds-text-secondary);
  font-size: var(--rds-text-sm);
  transition: background var(--rds-duration-fast) var(--rds-ease-default),
              color var(--rds-duration-fast) var(--rds-ease-default);
}

.related-card:hover {
  background: var(--rds-bg-surface);
  color: var(--rds-text);
  text-decoration: none;
}

.related-name {
  font-weight: var(--rds-weight-medium);
}

/* Prev/Next navigation */
.fw-nav-row,
.part-nav-row {
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-4);
  padding-top: var(--rds-space-6);
  border-top: 1px solid var(--rds-border);
}

.fw-nav-link {
  display: flex;
  align-items: center;
  gap: var(--rds-space-3);
  text-decoration: none;
  color: var(--rds-text-secondary);
  padding: var(--rds-space-4) var(--rds-space-5);
  border: 1px solid var(--rds-border);
  border-radius: var(--rds-radius-lg);
  transition: all var(--rds-duration-fast) var(--rds-ease-default);
  max-width: 100%;
}

.fw-nav-link:hover {
  border-color: var(--rds-border-strong);
  background: var(--rds-bg-surface);
  color: var(--rds-text);
  text-decoration: none;
}

.fw-nav-link.next {
  margin-left: 0;
  text-align: left;
  flex-direction: row-reverse;
}

.fw-nav-label {
  display: block;
  font-size: var(--rds-text-xs);
  text-transform: uppercase;
  letter-spacing: var(--rds-tracking-wider);
  color: var(--rds-text-muted);
  margin-bottom: var(--rds-space-1);
}

.fw-nav-name {
  display: block;
  font-size: var(--rds-text-sm);
  font-weight: var(--rds-weight-medium);
}

@media (min-width: 601px) {
  .fw-nav-row,
  .part-nav-row {
    flex-direction: row;
    justify-content: space-between;
  }

  .fw-nav-link {
    max-width: 45%;
  }

  .fw-nav-link.next {
    margin-left: auto;
    text-align: right;
    flex-direction: row;
  }
}

/* ══════════════════════════════════════════════════════════
   PART CLUSTER PAGE
   ══════════════════════════════════════════════════════════ */

.part-hero {
  padding: var(--rds-space-20) var(--rds-gutter) var(--rds-space-12);
  position: relative;
  overflow: hidden;
}

.part-hero .rds-container {
  position: relative;
  z-index: 1;
}

/* Part hero AI image — mobile: subtle full-bleed background */
.part-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  opacity: 0.13;
  pointer-events: none;
  z-index: 0;
  mask-image: linear-gradient(to bottom, transparent 0%, black 35%, black 65%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 35%, black 65%, transparent 100%);
}

.part-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    color-mix(in srgb, var(--part-color) 6%, transparent) 0%,
    transparent 60%
  );
  pointer-events: none;
  z-index: -1;
}

.part-hero-num {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-xl);
  display: block;
  margin-bottom: var(--rds-space-4);
  opacity: 0.7;
}

.part-hero h1 {
  margin-bottom: var(--rds-space-4);
}

.part-hero-stats {
  margin-top: var(--rds-space-5);
}

.part-hero-stat {
  font-size: var(--rds-text-sm);
  color: var(--rds-text-muted);
  font-weight: var(--rds-weight-medium);
}

.part-fw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: var(--rds-gutter);
}

.part-fw-card {
  background: var(--rds-bg-elevated);
  border: 1px solid var(--rds-border);
  border-radius: var(--rds-radius-lg);
  padding: var(--rds-space-6);
  text-decoration: none;
  color: var(--rds-text);
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-3);
  transition: box-shadow var(--rds-duration-normal) var(--rds-ease-default),
              border-color var(--rds-duration-normal) var(--rds-ease-default),
              transform var(--rds-duration-normal) var(--rds-ease-default);
}

.part-fw-card:hover {
  box-shadow: var(--rds-shadow-md);
  border-color: var(--rds-border-strong);
  transform: translateY(-2px);
  text-decoration: none;
}

.part-fw-card:active {
  transform: translateY(0);
}

.part-fw-top {
  margin-bottom: var(--rds-space-1);
}

.part-fw-card h3 {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-xl);
  font-weight: var(--rds-weight-regular);
  letter-spacing: 0.04em;
  margin-bottom: 0;
}

.part-fw-subtitle {
  font-size: var(--rds-text-xs);
  color: var(--rds-text-muted);
  line-height: var(--rds-leading-normal);
}

.part-fw-desc {
  font-size: var(--rds-text-sm);
  color: var(--rds-text-secondary);
  line-height: var(--rds-leading-normal);
}

/* ══════════════════════════════════════════════════════════
   ACCESSIBILITY & MOBILE OPTIMIZATIONS
   ══════════════════════════════════════════════════════════ */

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--rds-space-4);
  z-index: 200;
  padding: var(--rds-space-3) var(--rds-space-5);
  background: var(--rds-primary-500);
  color: white;
  border-radius: var(--rds-radius-md);
  font-size: var(--rds-text-sm);
  font-weight: var(--rds-weight-semibold);
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: var(--rds-space-3);
  outline: 2px solid var(--rds-focus-ring);
  outline-offset: 2px;
}

/* Touch action on interactive elements */
.rds-btn,
.filter-btn,
.fw-card,
.part-card,
.featured-card,
.part-fw-card,
.blog-card,
.nav-links a,
.mobile-menu a,
.dark-toggle,
.hamburger {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Safe area insets for notched phones */
body {
  padding-top: var(--rds-nav-height); /* compensate for fixed nav */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.site-footer {
  padding-bottom: calc(var(--rds-space-8) + env(safe-area-inset-bottom));
}

/* Hero uses dvh for accurate mobile height */
@supports (min-height: 100dvh) {
  .hero {
    min-height: 70dvh;
  }
}

/* Reduce motion globally */
@media (prefers-reduced-motion: reduce) {
  .hero::before {
    animation: none;
  }

  .part-hero::before {
    animation: none;
  }

  main {
    transition: none;
  }

  main.page-exit {
    opacity: 1;
  }
}

/* Focus-visible for all interactive elements */
.fw-card:focus-visible,
.part-card:focus-visible,
.featured-card:focus-visible,
.part-fw-card:focus-visible,
.blog-card:focus-visible,
.fw-nav-link:focus-visible,
.related-card:focus-visible,
.filter-btn:focus-visible {
  outline: 2px solid var(--rds-focus-ring);
  outline-offset: 2px;
}

/* Ensure 44px minimum touch targets on mobile */
.nav-links a,
.mobile-menu a,
.filter-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.footer-col a {
  display: inline-block;
  min-height: 44px;
  line-height: 44px;
}

/* Larger form inputs on mobile to prevent iOS zoom */
.rds-input {
  font-size: 16px !important;
}

@media (min-width: 769px) {
  .nav-links a,
  .mobile-menu a,
  .filter-btn {
    min-height: auto;
  }

  .footer-col a {
    min-height: auto;
    line-height: normal;
  }

  .rds-input {
    font-size: var(--rds-text-base) !important;
  }

  /* Framework hero — two-column layout on desktop */
  .fw-hero-inner {
    grid-template-columns: 1fr 380px;
    gap: var(--rds-space-12);
  }

  .fw-hero-art {
    height: 300px;
  }

  /* Part hero image — desktop: right-side accent, more visible */
  .part-hero-img {
    inset: 0 0 0 auto;
    width: 52%;
    height: 100%;
    opacity: 0.28;
    mask-image: linear-gradient(to left, black 20%, transparent 90%),
                linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, black 20%, transparent 90%),
                        linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
    mask-composite: intersect;
    -webkit-mask-composite: destination-in;
  }
}

/* Print styles */
@media print {
  .site-nav,
  .mobile-menu,
  .dark-toggle,
  .hamburger,
  .skip-link {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}

/* ══════════════════════════════════════════════════════════
   APPS PAGE
   ══════════════════════════════════════════════════════════ */

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr));
  gap: var(--rds-gutter);
}

.app-card {
  background: var(--rds-bg-elevated);
  border: 1px solid var(--rds-border);
  border-radius: var(--rds-radius-lg);
  padding: var(--rds-space-6);
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-3);
  transition: box-shadow var(--rds-duration-normal) var(--rds-ease-default),
              border-color var(--rds-duration-normal) var(--rds-ease-default);
}

.app-card:hover {
  box-shadow: var(--rds-shadow-md);
  border-color: var(--rds-border-strong);
}

.app-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--rds-space-3);
}

.app-card-id {
  display: flex;
  align-items: center;
  gap: var(--rds-space-2);
}

.app-status {
  font-size: var(--rds-text-xs);
  font-weight: var(--rds-weight-semibold);
  padding: var(--rds-space-1) var(--rds-space-3);
  border-radius: var(--rds-radius-full);
  white-space: nowrap;
}

.app-status-live {
  background: var(--rds-success-light);
  color: var(--rds-success);
}

.app-status-soon {
  background: var(--rds-bg-surface-alt);
  color: var(--rds-text-muted);
}

.app-card-name {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-2xl);
  font-weight: var(--rds-weight-regular);
  letter-spacing: 0.06em;
  margin: 0;
}

.app-card-subtitle {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-sm);
  font-style: italic;
  color: var(--rds-text-muted);
  line-height: var(--rds-leading-normal);
  margin: 0;
}

.app-card-desc {
  font-size: var(--rds-text-sm);
  color: var(--rds-text-secondary);
  line-height: var(--rds-leading-normal);
  margin: 0;
}

.app-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--rds-space-2);
  margin-top: var(--rds-space-1);
}

.app-features li {
  font-size: var(--rds-text-xs);
  color: var(--rds-text-secondary);
  padding: var(--rds-space-1) var(--rds-space-3);
  background: var(--rds-bg-surface);
  border-radius: var(--rds-radius-full);
  margin: 0;
}

.app-card-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: var(--rds-space-4);
  margin-top: auto;
  padding-top: var(--rds-space-4);
  border-top: 1px solid var(--rds-border-subtle);
}

.app-card-actions .rds-btn {
  justify-content: center;
}

.app-card-actions .arrow-link {
  justify-content: center;
}

.app-btn-disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

@media (min-width: 601px) {
  .app-card-actions {
    flex-direction: row;
    align-items: center;
  }

  .app-card-actions .rds-btn {
    justify-content: flex-start;
  }

  .app-card-actions .arrow-link {
    justify-content: flex-start;
  }
}

/* ── LRAP Logo in Footer ─────────────────────────────────── */

.footer-lrap {
  display: flex;
  justify-content: center;
  padding: var(--rds-space-6) 0;
  margin-top: var(--rds-space-4);
  border-top: 1px solid var(--rds-border-subtle);
}

.footer-lrap a {
  display: block;
  transition: opacity var(--rds-duration-fast) var(--rds-ease-default);
}

.footer-lrap a:hover {
  opacity: 0.8;
}

.footer-lrap img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: var(--rds-radius-md);
}

/* ══════════════════════════════════════════════════════════
   AUTH PAGES — Login, Register, Account, Reset Password
   ══════════════════════════════════════════════════════════ */

/* ── Auth Form Wrapper ─────────────────────────────────── */

.auth-form-wrap {
  max-width: 420px;
  margin-inline: auto;
  padding-top: var(--rds-space-2);
}

/* ── Auth Form ─────────────────────────────────────────── */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-5);
  position: relative; /* for honeypot absolute positioning */
}

/* Same as .form-group */
.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-2);
}

.auth-form-group label {
  font-size: var(--rds-text-sm);
  font-weight: var(--rds-weight-medium);
  color: var(--rds-text-secondary);
}

/* ── Auth Note (pricing notice below submit) ───────────── */

.auth-note {
  font-size: var(--rds-text-xs);
  color: var(--rds-text-muted);
  text-align: center;
  margin-top: calc(var(--rds-space-2) * -1); /* pull up a bit */
  max-width: 44ch;
  margin-inline: auto;
}

/* ── Auth Links (below form) ───────────────────────────── */

.auth-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--rds-space-3);
  margin-top: var(--rds-space-6);
  padding-top: var(--rds-space-6);
  border-top: 1px solid var(--rds-border-subtle);
}

.auth-links a {
  font-size: var(--rds-text-sm);
  color: var(--rds-link);
  text-decoration: none;
  transition: color var(--rds-duration-fast) var(--rds-ease-default);
}

.auth-links a:hover {
  color: var(--rds-link-hover);
  text-decoration: underline;
}

/* ── Account Tier Badge ────────────────────────────────── */

.account-tier-badge {
  display: inline-flex;
  align-items: center;
  padding: var(--rds-space-1) var(--rds-space-4);
  border-radius: 999px;
  font-size: var(--rds-text-xs);
  font-weight: var(--rds-weight-semibold);
  letter-spacing: var(--rds-tracking-wide);
  text-transform: uppercase;
  margin-top: var(--rds-space-3);
}

.account-tier-badge.tier-trial {
  background: color-mix(in srgb, var(--rds-warm-500) 12%, transparent);
  color: var(--rds-warm-600, var(--rds-warm-500));
  border: 1px solid color-mix(in srgb, var(--rds-warm-500) 30%, transparent);
}

.account-tier-badge.tier-lifetime {
  background: color-mix(in srgb, var(--rds-success) 12%, transparent);
  color: var(--rds-success-dark, var(--rds-success));
  border: 1px solid color-mix(in srgb, var(--rds-success) 30%, transparent);
}

.account-tier-badge.tier-admin {
  background: color-mix(in srgb, var(--rds-accent-500) 12%, transparent);
  color: var(--rds-accent-600, var(--rds-accent-500));
  border: 1px solid color-mix(in srgb, var(--rds-accent-500) 30%, transparent);
}

/* ── Account Layout ────────────────────────────────────── */

.account-layout {
  max-width: 640px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-8);
}

/* ── Account Stats / Trial Countdown ──────────────────── */

.account-stats {
  background: var(--rds-bg-surface);
  border: 1px solid var(--rds-border);
  border-radius: var(--rds-radius-xl);
  padding: var(--rds-space-8);
  text-align: center;
}

.trial-countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--rds-space-1);
  margin-bottom: var(--rds-space-2);
}

.trial-days {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-5xl, 3.5rem);
  font-weight: var(--rds-weight-regular);
  line-height: 1;
  color: var(--rds-primary-500);
}

.trial-days-label {
  font-size: var(--rds-text-sm);
  color: var(--rds-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--rds-tracking-widest);
}

.trial-expiry-note {
  font-size: var(--rds-text-xs);
  color: var(--rds-text-muted);
  margin-top: var(--rds-space-2);
}

/* ── Trial Expired Warning ─────────────────────────────── */

.trial-expired {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--rds-space-2);
  text-align: center;
  background: var(--rds-error-light);
  border: 1px solid var(--rds-error);
  border-radius: var(--rds-radius-xl);
  padding: var(--rds-space-6) var(--rds-space-8);
  color: var(--rds-error-dark);
}

.trial-expired p {
  font-size: var(--rds-text-sm);
  max-width: 44ch;
  margin-top: var(--rds-space-1);
  color: var(--rds-error-dark);
  opacity: 0.85;
}

/* ── Upgrade CTA Block ─────────────────────────────────── */

.upgrade-cta {
  background: var(--rds-bg-surface);
  border: 1px solid var(--rds-border);
  border-radius: var(--rds-radius-xl);
  padding: var(--rds-space-8);
  text-align: center;
}

.upgrade-cta h3 {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-xl);
  font-weight: var(--rds-weight-regular);
  margin-bottom: var(--rds-space-2);
}

.upgrade-cta p {
  font-size: var(--rds-text-sm);
  color: var(--rds-text-secondary);
  max-width: 44ch;
  margin-inline: auto;
}

/* ── Lifetime Confirmed ────────────────────────────────── */

.account-lifetime-confirmed {
  display: flex;
  align-items: center;
  gap: var(--rds-space-3);
  padding: var(--rds-space-4) var(--rds-space-6);
  background: color-mix(in srgb, var(--rds-success) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--rds-success) 25%, transparent);
  border-radius: var(--rds-radius-lg);
  color: var(--rds-success-dark, var(--rds-success));
  font-size: var(--rds-text-sm);
  font-weight: var(--rds-weight-medium);
}

/* ── Account Quick Links ───────────────────────────────── */

.account-quick-links {
  padding: var(--rds-space-6) 0;
  border-top: 1px solid var(--rds-border-subtle);
}

.account-quick-links h3 {
  font-size: var(--rds-text-sm);
  font-weight: var(--rds-weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--rds-tracking-widest);
  color: var(--rds-text-muted);
  margin-bottom: var(--rds-space-4);
}

.account-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-2);
}

.account-links-list li a {
  display: inline-flex;
  align-items: center;
  gap: var(--rds-space-2);
  font-size: var(--rds-text-sm);
  font-weight: var(--rds-weight-medium);
  color: var(--rds-link);
  text-decoration: none;
  transition: color var(--rds-duration-fast) var(--rds-ease-default),
              gap var(--rds-duration-fast) var(--rds-ease-default);
}

.account-links-list li a:hover {
  color: var(--rds-link-hover);
  gap: var(--rds-space-3);
}

/* ── Account Footer Actions ────────────────────────────── */

.account-footer-actions {
  padding-top: var(--rds-space-2);
  border-top: 1px solid var(--rds-border-subtle);
}

/* ── Gated Overlay Auth Buttons ────────────────────────── */

.gated-auth-btns {
  display: flex;
  gap: var(--rds-space-3);
  flex-wrap: wrap;
  justify-content: center;
  margin-top: var(--rds-space-4);
}

.gated-access-btns {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--rds-space-3);
  margin-top: var(--rds-space-4);
}

/* ── Auth Nav Link Styling ─────────────────────────────── */

/* The authNavLink li should look like other nav links */
#authNavLink a,
#authMobileLink a {
  /* inherits from .nav-links a and .mobile-menu a */
}

/* On mobile, span wrapper for authMobileLink needs display:block */
#authMobileLink {
  display: contents; /* lets the inner <a> take normal mobile-menu flow */
}


/* ═══════════════════════════════════════════════════════════
   FREEMIUM — Free Strip, App Cards, Pricing
   ═══════════════════════════════════════════════════════════ */

/* ── Free Strip (home page) ──────────────────────────────── */

.free-strip {
  background: color-mix(in srgb, var(--rds-accent-500) 8%, var(--rds-bg));
  border-top: 1px solid color-mix(in srgb, var(--rds-accent-500) 20%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--rds-accent-500) 20%, transparent);
  padding: var(--rds-space-5) 0;
}

.free-strip-inner {
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-4);
  align-items: flex-start;
}

.free-strip-label {
  display: flex;
  align-items: center;
  gap: var(--rds-space-3);
  font-size: var(--rds-text-sm);
  color: var(--rds-text-secondary);
}

.free-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--rds-radius-full);
  background: var(--rds-accent-500);
  color: var(--rds-neutral-0);
  font-family: var(--rds-font-body);
  font-size: var(--rds-text-xs);
  font-weight: var(--rds-weight-bold);
  letter-spacing: var(--rds-tracking-wide);
  text-transform: uppercase;
  flex-shrink: 0;
}

.free-badge-lg {
  padding: 4px 14px;
  font-size: var(--rds-text-sm);
}

.free-strip-apps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--rds-space-2);
}

.free-app-pill {
  display: inline-flex;
  align-items: center;
  padding: var(--rds-space-2) var(--rds-space-4);
  min-height: 44px;
  border-radius: var(--rds-radius-full);
  border: 1.5px solid var(--rds-accent-400);
  color: var(--rds-accent-600);
  font-family: var(--rds-font-body);
  font-size: var(--rds-text-sm);
  font-weight: var(--rds-weight-semibold);
  text-decoration: none;
  transition: background var(--rds-duration-normal), color var(--rds-duration-normal);
}

.free-app-pill:hover {
  background: var(--rds-accent-500);
  color: var(--rds-neutral-0);
  border-color: var(--rds-accent-500);
}

@media (min-width: 768px) {
  .free-strip-inner {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--rds-space-5);
  }
}

/* ── App Status Badges ───────────────────────────────────── */

.app-status-free {
  background: color-mix(in srgb, var(--rds-accent-500) 12%, transparent);
  color: var(--rds-accent-600);
  border: 1px solid color-mix(in srgb, var(--rds-accent-500) 30%, transparent);
}

.app-status-lock {
  background: color-mix(in srgb, var(--rds-primary-500) 10%, transparent);
  color: var(--rds-primary-500);
  border: 1px solid color-mix(in srgb, var(--rds-primary-500) 25%, transparent);
  display: inline-flex;
  align-items: center;
}

/* ── Apps Tier Headers ───────────────────────────────────── */

.apps-tier-header {
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-4);
  margin-bottom: var(--rds-space-10);
  padding: var(--rds-space-6);
  background: var(--rds-bg-elevated);
  border-radius: var(--rds-radius-xl);
  border: 1px solid var(--rds-border-subtle);
  box-shadow: var(--rds-shadow-sm);
}

.lock-badge-lg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--rds-radius-full);
  background: color-mix(in srgb, var(--rds-primary-500) 12%, transparent);
  color: var(--rds-primary-500);
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .apps-tier-header {
    flex-direction: row;
    align-items: center;
  }
}

/* ── App Cards — locked state ────────────────────────────── */

.app-card-locked {
  opacity: 0.82;
}

.app-card-locked:hover {
  opacity: 1;
}

.app-open-btn {
  min-height: 44px;
}

.app-lock-btn {
  min-height: 44px;
}

/* ── Pricing Grid ────────────────────────────────────────── */

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rds-space-6);
  max-width: 960px;
  margin-inline: auto;
}

@media (min-width: 640px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pricing-card {
  position: relative;
  border-radius: var(--rds-radius-xl);
  border: 1.5px solid var(--rds-border);
  background: var(--rds-bg-elevated);
  box-shadow: var(--rds-shadow-md);
  overflow: hidden;
  transition: transform var(--rds-duration-normal), box-shadow var(--rds-duration-normal);
}

.pricing-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--rds-shadow-lg);
}

.pricing-card-highlight {
  border-color: var(--rds-primary-500);
  box-shadow: var(--rds-shadow-lg);
}

.pricing-popular {
  background: var(--rds-primary-500);
  color: var(--rds-neutral-0);
  text-align: center;
  padding: var(--rds-space-2) var(--rds-space-4);
  font-size: var(--rds-text-xs);
  font-weight: var(--rds-weight-bold);
  letter-spacing: var(--rds-tracking-wide);
  text-transform: uppercase;
}

.pricing-card-inner {
  padding: var(--rds-space-8) var(--rds-space-6);
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-4);
  height: 100%;
}

.pricing-plan-name {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-xl);
  font-weight: var(--rds-weight-regular);
  color: var(--rds-text);
  margin: 0;
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: var(--rds-space-1);
}

.pricing-amount {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-4xl);
  font-weight: var(--rds-weight-regular);
  color: var(--rds-text);
  line-height: 1;
}

.pricing-period {
  font-size: var(--rds-text-sm);
  color: var(--rds-text-secondary);
}

.pricing-yearly {
  font-size: var(--rds-text-sm);
  color: var(--rds-accent-600);
  min-height: 1.4em;
}

.pricing-description {
  font-size: var(--rds-text-sm);
  color: var(--rds-text-secondary);
  line-height: var(--rds-leading-relaxed);
  margin: 0;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-3);
  flex: 1;
}

.pricing-feature {
  display: flex;
  align-items: flex-start;
  gap: var(--rds-space-3);
  font-size: var(--rds-text-sm);
  color: var(--rds-text);
  line-height: var(--rds-leading-normal);
}

.pricing-cta {
  width: 100%;
  justify-content: center;
  min-height: 48px;
  margin-top: var(--rds-space-2);
}

/* ── Free Apps List (pricing page) ──────────────────────── */

.free-apps-list {
  max-width: 600px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-2);
}

.free-app-link-item {
  display: flex;
  align-items: center;
  gap: var(--rds-space-4);
  padding: var(--rds-space-4) var(--rds-space-5);
  min-height: 64px;
  border-radius: var(--rds-radius-lg);
  border: 1px solid var(--rds-border-subtle);
  background: var(--rds-bg-elevated);
  text-decoration: none;
  color: var(--rds-text);
  transition: background var(--rds-duration-normal), border-color var(--rds-duration-normal);
}

.free-app-link-item:hover {
  background: color-mix(in srgb, var(--rds-accent-500) 6%, var(--rds-bg-elevated));
  border-color: var(--rds-accent-400);
}

.fw-num-sm {
  font-family: var(--rds-font-body);
  font-size: var(--rds-text-xs);
  font-weight: var(--rds-weight-bold);
  letter-spacing: var(--rds-tracking-wide);
  min-width: 28px;
}

/* ── Pricing FAQ ─────────────────────────────────────────── */

.pricing-faq {
  max-width: 720px;
  margin-inline: auto;
}

.pricing-faq h2 {
  margin-bottom: var(--rds-space-8);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-6);
}

.faq-item h4 {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-lg);
  font-weight: var(--rds-weight-regular);
  color: var(--rds-text);
  margin: 0 0 var(--rds-space-2);
}

.faq-item p {
  color: var(--rds-text-secondary);
  line-height: var(--rds-leading-relaxed);
  margin: 0;
}

.inline-link {
  color: var(--rds-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════
   VISUAL ENHANCEMENTS — hero, how-it-works, book, in-practice
   ═══════════════════════════════════════════════════════════ */

/* ── Hero Image ───────────────────────────────────────────── */
/* Hero visual — below headline */
.hero-visual-wrap {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--rds-gutter) var(--rds-space-4);
}

.hero-visual-img {
  width: 100%;
  display: block;
  border-radius: var(--rds-radius-xl);
  opacity: 0.82;
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.6) 10%, black 22%, black 65%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.6) 10%, black 22%, black 65%, transparent 100%);
}

@media (min-width: 769px) {
  .hero-visual-wrap {
    padding: 0 var(--rds-space-8) var(--rds-space-6);
  }
  .hero-visual-img {
    opacity: 0.85;
  }
}

/* ── How-It-Works Illustrations ───────────────────────────── */
.how-visual {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--rds-space-3);
}

.how-illustration {
  width: 80px;
  height: 80px;
  border-radius: var(--rds-radius-lg);
  object-fit: cover;
  opacity: 0.85;
  flex-shrink: 0;
}

@media (min-width: 769px) {
  .how-illustration {
    width: 100px;
    height: 100px;
  }
}

/* ── Book Cover Image ─────────────────────────────────────── */
.book-cover-img {
  width: 220px;
  height: auto;
  border-radius: var(--rds-radius-md);
  box-shadow: var(--rds-shadow-xl), -6px 6px 24px rgba(0,0,0,0.18);
  display: block;
  transition: transform var(--rds-duration-normal) var(--rds-ease-default),
              box-shadow var(--rds-duration-normal) var(--rds-ease-default);
}

.book-cover-img:hover {
  transform: translateY(-4px) rotate(-1deg);
  box-shadow: var(--rds-shadow-xl), -8px 12px 32px rgba(0,0,0,0.22);
}

@media (min-width: 769px) {
  .book-cover-img {
    width: 260px;
  }
}

/* ── In Practice Section ──────────────────────────────────── */
.in-practice-section {
  background: var(--rds-bg-surface);
}

.in-practice-card {
  display: grid;
  grid-template-columns: 1fr;
  border-radius: var(--rds-radius-xl);
  overflow: hidden;
  border: 1px solid var(--rds-border);
  background: var(--rds-bg-elevated);
}

@media (min-width: 769px) {
  .in-practice-card {
    grid-template-columns: 1fr 1fr;
  }
}

.in-practice-img {
  overflow: hidden;
  min-height: 260px;
}

.in-practice-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.6s var(--rds-ease-default);
}

.in-practice-card:hover .in-practice-img img {
  transform: scale(1.03);
}

.in-practice-content {
  padding: var(--rds-space-8) var(--rds-space-6);
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-4);
  justify-content: center;
}

@media (min-width: 769px) {
  .in-practice-content {
    padding: var(--rds-space-10) var(--rds-space-8);
  }
}

.in-practice-meta {
  display: flex;
  align-items: center;
  gap: var(--rds-space-3);
  flex-wrap: wrap;
}

.in-practice-badge {
  font-size: var(--rds-text-xs);
  font-weight: var(--rds-weight-semibold);
  letter-spacing: var(--rds-tracking-wide);
  text-transform: uppercase;
  background: color-mix(in srgb, var(--rds-accent-500) 12%, transparent);
  color: var(--rds-accent-500);
  padding: 2px var(--rds-space-2);
  border-radius: var(--rds-radius-sm);
}

.in-practice-link {
  font-size: var(--rds-text-sm);
  color: var(--rds-text-muted);
  text-decoration: none;
  transition: color var(--rds-duration-fast) var(--rds-ease-default);
}

.in-practice-link:hover {
  color: var(--rds-primary-500);
}

.in-practice-content h3 {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-2xl);
  font-weight: var(--rds-weight-regular);
  margin-bottom: 0;
}

.in-practice-content p {
  font-size: var(--rds-text-base);
  color: var(--rds-text-secondary);
  line-height: var(--rds-leading-relaxed);
  max-width: 52ch;
}

.in-practice-frameworks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--rds-space-2);
  margin-top: var(--rds-space-2);
}

.fw-tag {
  font-size: var(--rds-text-xs);
  font-weight: var(--rds-weight-semibold);
  letter-spacing: var(--rds-tracking-wide);
  text-transform: uppercase;
  background: var(--rds-bg-surface);
  border: 1px solid var(--rds-border);
  color: var(--rds-text-secondary);
  padding: 3px var(--rds-space-3);
  border-radius: var(--rds-radius-full);
}

/* ═══════════════════════════════════════════════════════════
   VISUAL ENHANCEMENTS — hero, how-it-works, book, in-practice
   ═══════════════════════════════════════════════════════════ */

/* ── Hero Image ───────────────────────────────────────────── */


/* ── How-It-Works Illustrations ───────────────────────────── */
.how-visual {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--rds-space-3);
}

.how-illustration {
  width: 80px;
  height: 80px;
  border-radius: var(--rds-radius-lg);
  object-fit: cover;
  opacity: 0.85;
  flex-shrink: 0;
}

@media (min-width: 769px) {
  .how-illustration {
    width: 100px;
    height: 100px;
  }
}

/* ── Book Cover Image ─────────────────────────────────────── */
.book-cover-img {
  width: 220px;
  height: auto;
  border-radius: var(--rds-radius-md);
  box-shadow: var(--rds-shadow-xl), -6px 6px 24px rgba(0,0,0,0.18);
  display: block;
  transition: transform var(--rds-duration-normal) var(--rds-ease-default),
              box-shadow var(--rds-duration-normal) var(--rds-ease-default);
}

.book-cover-img:hover {
  transform: translateY(-4px) rotate(-1deg);
  box-shadow: var(--rds-shadow-xl), -8px 12px 32px rgba(0,0,0,0.22);
}

@media (min-width: 769px) {
  .book-cover-img {
    width: 260px;
  }
}

/* ── In Practice Section ──────────────────────────────────── */
.in-practice-section {
  background: var(--rds-bg-surface);
}

.in-practice-card {
  display: grid;
  grid-template-columns: 1fr;
  border-radius: var(--rds-radius-xl);
  overflow: hidden;
  border: 1px solid var(--rds-border);
  background: var(--rds-bg-elevated);
}

@media (min-width: 769px) {
  .in-practice-card {
    grid-template-columns: 1fr 1fr;
  }
}

.in-practice-img {
  overflow: hidden;
  min-height: 260px;
}

.in-practice-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.6s var(--rds-ease-default);
}

.in-practice-card:hover .in-practice-img img {
  transform: scale(1.03);
}

.in-practice-content {
  padding: var(--rds-space-8) var(--rds-space-6);
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-4);
  justify-content: center;
}

@media (min-width: 769px) {
  .in-practice-content {
    padding: var(--rds-space-10) var(--rds-space-8);
  }
}

.in-practice-meta {
  display: flex;
  align-items: center;
  gap: var(--rds-space-3);
  flex-wrap: wrap;
}

.in-practice-badge {
  font-size: var(--rds-text-xs);
  font-weight: var(--rds-weight-semibold);
  letter-spacing: var(--rds-tracking-wide);
  text-transform: uppercase;
  background: color-mix(in srgb, var(--rds-accent-500) 12%, transparent);
  color: var(--rds-accent-500);
  padding: 2px var(--rds-space-2);
  border-radius: var(--rds-radius-sm);
}

.in-practice-link {
  font-size: var(--rds-text-sm);
  color: var(--rds-text-muted);
  text-decoration: none;
  transition: color var(--rds-duration-fast) var(--rds-ease-default);
}

.in-practice-link:hover {
  color: var(--rds-primary-500);
}

.in-practice-content h3 {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-2xl);
  font-weight: var(--rds-weight-regular);
  margin-bottom: 0;
}

.in-practice-content p {
  font-size: var(--rds-text-base);
  color: var(--rds-text-secondary);
  line-height: var(--rds-leading-relaxed);
  max-width: 52ch;
}

.in-practice-frameworks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--rds-space-2);
  margin-top: var(--rds-space-2);
}

.fw-tag {
  font-size: var(--rds-text-xs);
  font-weight: var(--rds-weight-semibold);
  letter-spacing: var(--rds-tracking-wide);
  text-transform: uppercase;
  background: var(--rds-bg-surface);
  border: 1px solid var(--rds-border);
  color: var(--rds-text-secondary);
  padding: 3px var(--rds-space-3);
  border-radius: var(--rds-radius-full);
}

/* ═══════════════════════════════════════════════════════════
   TRAINING PAGE
   ═══════════════════════════════════════════════════════════ */

/* ── Overview Stats Row ───────────────────────────────────── */
.train-overview {
  display: flex;
  justify-content: center;
  gap: var(--rds-space-12);
  flex-wrap: wrap;
  padding: var(--rds-space-8) 0;
  border-bottom: 1px solid var(--rds-border);
  margin-bottom: var(--rds-space-10);
}

.train-stat {
  text-align: center;
}

.train-stat .stat-num {
  font-family: var(--rds-font-display);
  font-size: clamp(var(--rds-text-3xl), 5vw, var(--rds-text-4xl));
  line-height: 1;
  color: var(--rds-primary-500);
}

.train-stat .stat-label {
  font-size: var(--rds-text-sm);
  color: var(--rds-text-muted);
  margin-top: var(--rds-space-1);
}

/* ── Intro 2-col ──────────────────────────────────────────── */
.train-intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rds-space-10);
}

@media (min-width: 769px) {
  .train-intro-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--rds-space-12);
  }
}

.train-audience-list {
  list-style: none;
  padding: 0;
  margin: var(--rds-space-4) 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-3);
}

.train-audience-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--rds-space-2);
  font-size: var(--rds-text-base);
  color: var(--rds-text-secondary);
  line-height: var(--rds-leading-relaxed);
}

/* ── Module Cards ─────────────────────────────────────────── */
.train-modules-list {
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-4);
}

.train-module-card {
  background: var(--rds-bg-elevated);
  border: 1px solid var(--rds-border);
  border-radius: var(--rds-radius-lg);
  padding: var(--rds-space-6);
  transition: box-shadow var(--rds-duration-normal) var(--rds-ease-default);
}

.train-module-card:hover {
  box-shadow: var(--rds-shadow-md);
}

.train-module-header {
  border-left: 4px solid var(--rds-border);
  padding-left: var(--rds-space-4);
  margin-bottom: var(--rds-space-4);
}

.train-module-meta {
  display: flex;
  align-items: center;
  gap: var(--rds-space-3);
  margin-bottom: var(--rds-space-2);
  flex-wrap: wrap;
}

.train-part-label {
  font-size: var(--rds-text-xs);
  font-weight: var(--rds-weight-semibold);
  letter-spacing: var(--rds-tracking-widest);
  text-transform: uppercase;
}

.train-duration {
  font-size: var(--rds-text-xs);
  color: var(--rds-text-muted);
}

.train-module-header h3 {
  font-family: var(--rds-font-display);
  font-size: var(--rds-text-xl);
  font-weight: var(--rds-weight-regular);
  margin-bottom: var(--rds-space-2);
}

.train-module-q {
  font-size: var(--rds-text-sm);
  color: var(--rds-text-secondary);
  font-style: italic;
  margin: 0;
}

.train-fw-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--rds-space-2);
}

.train-fw-pill {
  font-size: 11px;
  font-weight: var(--rds-weight-semibold);
  letter-spacing: var(--rds-tracking-wide);
  text-transform: uppercase;
  background: var(--rds-bg-surface);
  border: 1px solid var(--rds-border);
  color: var(--rds-text-muted);
  padding: 2px var(--rds-space-2);
  border-radius: var(--rds-radius-full);
}

/* ── Day Structure Grid ───────────────────────────────────── */
.train-day-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rds-space-4);
}

@media (min-width: 601px) {
  .train-day-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.train-day-block {
  background: var(--rds-bg-elevated);
  border: 1px solid var(--rds-border);
  border-radius: var(--rds-radius-lg);
  padding: var(--rds-space-6);
}

.train-time {
  font-size: var(--rds-text-xs);
  font-weight: var(--rds-weight-semibold);
  letter-spacing: var(--rds-tracking-widest);
  text-transform: uppercase;
  color: var(--rds-text-muted);
  margin-bottom: var(--rds-space-2);
}

.train-day-block h3 {
  font-size: var(--rds-text-lg);
  margin-bottom: var(--rds-space-2);
}

.train-day-block p {
  font-size: var(--rds-text-sm);
  color: var(--rds-text-secondary);
  line-height: var(--rds-leading-relaxed);
}

/* ── Materials Grid ───────────────────────────────────────── */
.train-materials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rds-space-4);
}

@media (min-width: 769px) {
  .train-materials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.train-material-card {
  background: var(--rds-bg-elevated);
  border: 1px solid var(--rds-border);
  border-radius: var(--rds-radius-lg);
  padding: var(--rds-space-6);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.train-material-card h3 {
  font-size: var(--rds-text-lg);
  margin-bottom: var(--rds-space-2);
}

.train-material-card p {
  font-size: var(--rds-text-sm);
  color: var(--rds-text-secondary);
  line-height: var(--rds-leading-relaxed);
  flex: 1;
}

/* ── Certification Grid ───────────────────────────────────── */
.cert-grid {
  display: flex;
  flex-direction: column;
  gap: var(--rds-space-4);
  max-width: 720px;
}

.cert-card {
  background: var(--rds-bg-elevated);
  border: 1px solid var(--rds-border);
  border-radius: var(--rds-radius-lg);
  padding: var(--rds-space-6);
  display: flex;
  align-items: flex-start;
  gap: var(--rds-space-4);
}

.cert-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.cert-card h3 {
  font-size: var(--rds-text-lg);
  margin-bottom: var(--rds-space-2);
}

.cert-card p {
  font-size: var(--rds-text-sm);
  color: var(--rds-text-secondary);
  line-height: var(--rds-leading-relaxed);
  margin: 0;
}


/* ════════════════════════════════════════════════════════════
   FRAMEWORK CARD VISUAL — Procedural artwork header
   ════════════════════════════════════════════════════════════ */

.fw-card-visual {
  width: calc(100% + var(--rds-space-5) * 2);
  margin: calc(-1 * var(--rds-space-5)) calc(-1 * var(--rds-space-5)) var(--rds-space-4);
  border-radius: var(--rds-radius-lg) var(--rds-radius-lg) 0 0;
  overflow: hidden;
  height: 96px;
  flex-shrink: 0;
}

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

.fw-card {
  overflow: hidden; /* clip the visual bleed */
}
