:root {
  --ink: #f4efed;
  --muted: #b4a7a2;
  --paper: #090909;
  --cream: #171011;
  --lime: #e1261c;
  --clay: #e1261c;
  --moss: #b4231b;
  --charcoal: #050505;
  --line: rgba(225, 38, 28, 0.24);
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  align-items: center;
  background: rgba(9, 9, 9, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 56px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand,
.nav-links,
.hero-actions,
.site-footer,
.chapter-meta {
  align-items: center;
  display: flex;
}

.brand,
h1,
h2,
h3,
.button,
.eyebrow,
.list-header,
.stats-band strong {
  font-family: Inter, system-ui, sans-serif;
  letter-spacing: 0;
}

.brand {
  font-size: 0.88rem;
  font-weight: 800;
  gap: 10px;
  text-transform: uppercase;
}

.brand-mark {
  align-items: center;
  background: var(--charcoal);
  border-radius: 50%;
  color: var(--lime);
  display: inline-flex;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.66rem;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.nav-links {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  gap: clamp(14px, 3vw, 34px);
}

.nav-links a:hover {
  color: var(--ink);
}

.hero {
  display: grid;
  gap: clamp(28px, 5vw, 72px);
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  padding: clamp(52px, 8vw, 106px) clamp(18px, 5vw, 70px);
}

.planner-hero {
  min-height: calc(100vh - 72px);
}

.hero-content {
  align-self: center;
  max-width: 860px;
}

.eyebrow {
  color: var(--clay);
  font-size: 0.68rem;
  font-weight: 800;
  margin: 0 0 14px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  line-height: 0.94;
}

h1 {
  font-size: clamp(2.45rem, 6.2vw, 6.2rem);
  font-weight: 800;
  margin-bottom: 26px;
}

h2 {
  font-size: clamp(1.75rem, 3.8vw, 3.65rem);
  font-weight: 800;
}

.hero-copy {
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.24rem);
  line-height: 1.75;
  max-width: 680px;
}

.hero-actions,
.print-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  border: 1px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  justify-content: center;
  min-width: 150px;
  padding: 14px 22px;
}

.button.primary {
  background: var(--ink);
  color: var(--charcoal);
}

.button.secondary {
  background: transparent;
}

.builder-preview {
  align-self: center;
  background: var(--charcoal);
  box-shadow: var(--shadow);
  color: var(--white);
  min-height: 520px;
  padding: clamp(22px, 4vw, 38px);
}

.preview-header,
.preview-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.preview-header span,
.preview-footer span {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.85rem;
  font-weight: 800;
}

.preview-header strong {
  color: var(--lime);
  text-align: right;
}

.mini-flow {
  display: grid;
  gap: 14px;
  margin: 72px 0;
}

.mini-flow span {
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: block;
  font-family: Inter, system-ui, sans-serif;
  font-size: clamp(1rem, 2vw, 1.55rem);
  padding: 18px;
}

.mini-flow span:nth-child(even) {
  margin-left: 42px;
}

.stats-band {
  background: var(--charcoal);
  color: var(--white);
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, 1fr);
}

.stats-band div {
  background: rgba(225, 38, 28, 0.08);
  padding: 28px clamp(18px, 4vw, 48px);
}

.stats-band strong,
.stats-band span {
  display: block;
}

.stats-band strong {
  color: var(--lime);
  font-size: clamp(1.5rem, 2.8vw, 2.55rem);
}

.stats-band span {
  color: rgba(255, 255, 255, 0.7);
  margin-top: 6px;
}

.section {
  padding: clamp(58px, 8vw, 112px) clamp(18px, 5vw, 70px);
}

.intro {
  align-items: end;
  display: grid;
  gap: 34px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 560px);
}

.intro p,
.section-heading p {
  color: var(--muted);
  line-height: 1.8;
}

.section-heading {
  margin-bottom: 30px;
  max-width: 900px;
}

.section-grid,
.pose-grid,
.builder-layout {
  display: grid;
  gap: 18px;
}

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

.section-card {
  background: #111112;
  border: 1px solid var(--line);
  display: grid;
  gap: 18px;
  min-height: 310px;
  padding: 28px;
}

.section-card:hover,
.pose-card-item:hover {
  border-color: rgba(225, 38, 28, 0.58);
  transform: translateY(-2px);
}

.section-card span {
  color: var(--moss);
  font-family: Inter, system-ui, sans-serif;
  font-weight: 800;
}

.section-card h3 {
  font-size: 1.35rem;
  line-height: 1.15;
}

.section-card p {
  color: var(--muted);
  line-height: 1.7;
}

.section-card small {
  align-self: end;
  color: var(--clay);
  font-weight: 800;
  text-transform: uppercase;
}

.library-section {
  background: #120c0d;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.filter-button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  padding: 10px 16px;
}

.filter-button.is-active {
  background: var(--clay);
  border-color: var(--clay);
  color: var(--white);
}

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

.pose-card-item {
  background: rgba(18, 18, 19, 0.9);
  border: 1px solid rgba(225, 38, 28, 0.16);
  display: grid;
  gap: 18px;
  grid-template-columns: 90px minmax(0, 1fr);
  min-height: 190px;
  padding: 18px;
  transition: transform 180ms ease, border-color 180ms ease;
}

.pose-avatar {
  align-items: center;
  aspect-ratio: 1;
  background:
    linear-gradient(135deg, rgba(225, 38, 28, 0.92), rgba(255, 255, 255, 0.06)),
    var(--charcoal);
  color: var(--white);
  display: flex;
  justify-content: center;
}

.pose-avatar span {
  font-family: Inter, system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
}

.pose-avatar img {
  display: block;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  width: 100%;
}

.pose-card-item p {
  color: var(--clay);
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.pose-card-item h3 {
  font-size: 1.05rem;
  line-height: 1.2;
  margin-bottom: 6px;
}

.pose-card-item span,
.pose-card-item small {
  color: var(--muted);
  display: block;
  line-height: 1.55;
}

.builder-layout {
  grid-template-columns: 1fr 1fr;
}

.warmup-section {
  background: var(--paper);
}

.warmup-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 340px;
}

.warmup-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.warmup-card {
  background: #111112;
  border: 1px solid var(--line);
  cursor: pointer;
  display: grid;
  gap: 10px;
  min-height: 170px;
  padding: 18px;
}

.warmup-card:has(input:checked) {
  background: rgba(225, 38, 28, 0.16);
  border-color: rgba(225, 38, 28, 0.76);
}

.warmup-card input {
  accent-color: var(--clay);
  height: 18px;
  width: 18px;
}

.warmup-card span,
.template-card p {
  color: var(--clay);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.warmup-card strong {
  line-height: 1.25;
}

.warmup-card small {
  color: var(--muted);
  line-height: 1.55;
}

.selected-panel {
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 24px;
  position: sticky;
  top: 92px;
}

.selected-panel h3 {
  margin-bottom: 18px;
}

.selected-panel ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}

.builder-column {
  background: #111112;
  border: 1px solid var(--line);
  padding: clamp(24px, 4vw, 38px);
}

.builder-column.dark {
  background: var(--charcoal);
  color: var(--white);
}

.builder-column h3 {
  font-size: 1.45rem;
  margin-bottom: 22px;
}

.builder-column ol,
.builder-column ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 22px;
}

.builder-column li {
  line-height: 1.65;
}

.template-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.template-card {
  background: #111112;
  border: 1px solid var(--line);
  padding: 24px;
}

.template-card h3 {
  font-size: 1.1rem;
}

.template-card ol {
  color: var(--muted);
  display: grid;
  gap: 8px;
  line-height: 1.55;
  margin: 16px 0 0;
  padding-left: 18px;
}

.site-footer {
  background: var(--charcoal);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  gap: 18px;
  justify-content: space-between;
  padding: 24px clamp(18px, 5vw, 70px);
}

.chapter-hero {
  padding: clamp(44px, 7vw, 92px) clamp(18px, 5vw, 70px) clamp(32px, 5vw, 56px);
}

.chapter-hero h1 {
  max-width: 1080px;
}

.chapter-hero p {
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.7;
  max-width: 760px;
}

.back-link {
  color: var(--moss);
  display: inline-flex;
  font-weight: 800;
  margin-bottom: 26px;
}

.chapter-meta {
  color: var(--clay);
  flex-wrap: wrap;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  gap: 10px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.chapter-meta span {
  background: rgba(225, 38, 28, 0.14);
  border-radius: 999px;
  padding: 8px 10px;
}

.chapter-page-layout {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) 380px;
  padding: 0 clamp(18px, 5vw, 70px) clamp(56px, 8vw, 110px);
}

.feature-panel,
.guide-panel {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.feature-panel {
  background: #111112;
}

.avatar-dropzone {
  background:
    linear-gradient(135deg, rgba(225, 38, 28, 0.18), rgba(255, 255, 255, 0)),
    var(--charcoal);
  color: var(--white);
  min-height: 360px;
  padding: clamp(24px, 4vw, 44px);
}

.avatar-dropzone span {
  color: var(--lime);
  display: block;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.avatar-dropzone strong {
  display: block;
  font-family: Inter, system-ui, sans-serif;
  font-size: clamp(1.7rem, 4vw, 3.7rem);
  line-height: 1;
  max-width: 760px;
}

.avatar-dropzone p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  margin-top: 24px;
  max-width: 600px;
}

.chapter-detail {
  padding: clamp(22px, 4vw, 44px);
}

.chapter-detail p {
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.8;
  max-width: 840px;
}

.detail-grid {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 30px;
  padding-top: 24px;
}

.detail-grid span {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.guide-panel {
  background: var(--cream);
  padding: clamp(22px, 4vw, 34px);
  position: sticky;
  top: 92px;
}

.guide-panel h2 {
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  margin-bottom: 22px;
}

.guide-panel details {
  background: rgba(7, 7, 8, 0.5);
  border: 1px solid rgba(225, 38, 28, 0.18);
  margin-top: 12px;
}

.guide-panel summary {
  cursor: pointer;
  font-weight: 800;
  padding: 18px;
}

.guide-panel details p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
  padding: 0 18px 18px;
}

.printable-guide {
  background: #111112;
  border-top: 1px solid var(--line);
  padding: clamp(44px, 7vw, 86px) clamp(18px, 5vw, 70px);
}

.printable-guide h2 {
  margin-bottom: 18px;
}

.printable-guide > p {
  color: var(--muted);
  line-height: 1.7;
  max-width: 820px;
}

#offline-practice {
  counter-reset: practice-step;
  display: grid;
  gap: 14px;
  list-style: none;
  margin: 28px 0 0;
  max-width: 960px;
  padding: 0;
}

#offline-practice li {
  border: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding: 20px;
}

#offline-practice li::before {
  color: var(--clay);
  content: "Step " counter(practice-step);
  counter-increment: practice-step;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

#offline-practice div {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

#offline-practice span {
  color: var(--moss);
  flex: 0 0 auto;
  font-weight: 800;
}

#offline-practice p,
.offline-notes p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.offline-notes {
  background: var(--cream);
  margin-top: 18px;
  max-width: 960px;
  padding: 20px;
}

.offline-notes strong {
  display: block;
  margin-bottom: 8px;
}

@media (max-width: 1020px) {
  .hero,
  .intro,
  .section-grid,
  .pose-grid,
  .warmup-layout,
  .warmup-grid,
  .builder-layout,
  .template-grid,
  .chapter-page-layout {
    grid-template-columns: 1fr;
  }

  .planner-hero {
    min-height: auto;
  }

  .guide-panel {
    position: static;
  }

  .selected-panel {
    position: static;
  }
}

@media (max-width: 680px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links,
  .hero-actions,
  .print-actions {
    width: 100%;
  }

  .button {
    width: 100%;
  }

  .stats-band,
  .detail-grid {
    grid-template-columns: 1fr;
  }

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

  .mini-flow span:nth-child(even) {
    margin-left: 0;
  }

  #offline-practice div {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media print {
  @page {
    margin: 0.55in;
  }

  * {
    box-shadow: none !important;
  }

  body {
    background: #ffffff;
    color: #111111;
    font-size: 11pt;
  }

  .site-header,
  .site-footer,
  .back-link,
  .print-actions,
  .nav-links {
    display: none !important;
  }

  .chapter-hero,
  .chapter-page-layout,
  .printable-guide {
    display: block;
    padding: 0;
  }

  .avatar-dropzone {
    background: transparent;
    color: #111111;
    min-height: 0;
    padding: 0 0 14pt;
  }

  .avatar-dropzone p,
  .chapter-hero p,
  .chapter-detail p,
  .guide-panel details p,
  .printable-guide > p,
  #offline-practice p,
  .offline-notes p {
    color: #222222;
  }

  .chapter-hero h1 {
    font-size: 28pt;
    line-height: 1.05;
  }

  .feature-panel,
  .guide-panel,
  .printable-guide,
  .offline-notes {
    background: transparent;
    border: 0;
  }

  .chapter-detail,
  .guide-panel {
    padding: 0;
  }

  .guide-panel details,
  #offline-practice li,
  .offline-notes {
    border: 1px solid #cccccc;
    break-inside: avoid;
  }
}
