:root {
  color-scheme: light dark;
  --color-hero-bg: #150905;
  --color-hero-bg-top: #140703;
  --color-bg: #f7f4ef;
  --color-surface: #ffffff;
  --color-text: #1a1816;
  --color-text-inverse: #f5f0e8;
  --color-muted: #5c5650;
  --color-accent: #8b6914;
  --color-border: #e0dbd3;
  --font-serif: "Playfair Display", Georgia, serif;
  --font-sans: "Mulish", system-ui, sans-serif;
  --content-width: 72rem;
  --nav-height: 3.25rem;
}

@media (min-width: 768px) {
  :root {
    --content-width: 50rem;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.65;
}

img:not(.partner-logo) {
  display: block;
  max-width: 100%;
  height: auto;
}

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

button,
input {
  font: inherit;
}

.container {
  width: min(100% - 2rem, var(--content-width));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Dark hero section ── */

.hero-dark {
  background-color: var(--color-hero-bg);
  background-image: radial-gradient(
    ellipse 80% 60% at 50% 70%,
    #1f1008 0%,
    var(--color-hero-bg) 55%,
    var(--color-hero-bg-top) 100%
  );
  color: var(--color-text-inverse);
  position: relative;
  border-bottom: 1px solid var(--color-border);
}

/* ── Navigation ── */

.site-nav {
  position: relative;
  z-index: 10;
  padding: 0 1rem;
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(100%, var(--content-width));
  margin-inline: auto;
  min-height: var(--nav-height);
}

.site-nav__brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.site-nav__brand img {
  display: block;
  height: 2.625rem;
  width: auto;
}

.site-nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.site-nav__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text-inverse);
  transition: transform 0.2s, opacity 0.2s;
}

.site-nav__menu > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav__menu a,
.site-nav__menu .submenu-toggle {
  display: block;
  padding: 0.35rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(245, 240, 232, 0.85);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
}

.site-nav__menu a:hover,
.site-nav__menu a[aria-current="page"],
.site-nav__menu .submenu-toggle:hover {
  color: #fff;
}

.has-submenu {
  position: relative;
}

.submenu {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 11rem;
  background: #1f1008;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 20;
}

@media (min-width: 769px) {
  .has-submenu:hover .submenu {
    display: block;
  }
}

.submenu a {
  padding: 0.55rem 1rem;
  font-size: 0.8125rem;
}

@media (max-width: 768px) {
  .site-nav__toggle {
    display: flex;
  }

  .site-nav__menu {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 1rem;
    right: 1rem;
    background: #1f1008;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 0.5rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  }

  .site-nav__menu.is-open {
    display: block;
  }

  .site-nav__menu > ul {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav__menu a,
  .site-nav__menu .submenu-toggle {
    width: 100%;
    text-align: left;
  }

  .submenu {
    position: static;
    border: none;
    box-shadow: none;
    background: rgba(0, 0, 0, 0.25);
    margin: 0.25rem 0 0.5rem;
    padding: 0.35rem 0 0.35rem 0.5rem;
  }

  .has-submenu.is-open .submenu {
    display: block;
  }

  .site-nav__toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .site-nav__toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .site-nav__toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* ── Hero ── */

.hero {
  position: relative;
  z-index: 1;
  padding: 0 0 0.25rem;
  margin-top: -0.175rem;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
}

.hero__aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  width: 100%;
}

.hero__content {
  width: 100%;
}

.hero__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: clamp(1.875rem, 5vw, 2.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.hero__title-break {
  display: none;
}

.hero__tagline {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(0.875rem, 2vw, 1.0625rem);
  font-style: italic;
  font-weight: 400;
  color: rgba(245, 240, 232, 0.75);
  line-height: 1.35;
}

.hero__image-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  max-width: 16rem;
  line-height: 0;
  overflow: hidden;
}

.hero__image {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center 85%;
}

.hero__trusted {
  width: 100%;
  display: flex;
  justify-content: center;
}

.hero__trusted img {
  width: 100%;
  max-width: 22rem;
  opacity: 0.9;
  margin-bottom: 0;
}

@media (max-width: 767px) {
  :root {
    --nav-height: 2.875rem;
  }

  .site-nav__brand img {
    height: 2.125rem;
  }

  .hero {
    padding: 0 0 0.25rem;
    margin-top: -0.6rem;
  }

  .hero__inner {
    gap: 0;
  }

  .hero__title-break {
    display: block;
  }

  .hero__title {
    margin-bottom: 0.35rem;
  }

  .hero__image-wrap {
    max-width: 18rem;
    align-items: flex-start;
    max-height: clamp(13.5rem, 37vh, 19rem);
    margin-top: 0;
  }

  .hero__image {
    max-height: clamp(15rem, 40vh, 21rem);
    object-position: center 15%;
    margin-top: -1.75rem;
    margin-bottom: -0.625rem;
  }

  .hero__aside {
    margin-top: -0.75rem;
    gap: 1.75rem;
  }

  .hero__trusted img {
    max-width: 19rem;
  }
}

@media (min-width: 768px) {
  .hero {
    padding: 0 0 0.25rem;
    margin-top: -0.175rem;
  }

  .hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 46%) minmax(0, 54%);
    align-items: center;
    gap: 0.875rem 1rem;
  }

  .hero__image-wrap {
    max-width: none;
    justify-content: center;
    align-items: center;
    align-self: center;
    max-height: clamp(22rem, 54vh, 38rem);
  }

  .hero__image {
    max-height: clamp(26rem, 62vh, 42rem);
    object-position: center 85%;
    margin-bottom: -1.25rem;
  }

  .hero__aside {
    align-items: center;
    align-self: center;
    text-align: center;
    gap: 2.75rem;
  }

  .hero__title {
    margin-bottom: 0.75rem;
    font-size: clamp(2rem, 5vw, 2.75rem);
    line-height: 1.15;
  }

  .hero__tagline {
    font-size: clamp(0.9375rem, 2vw, 1.125rem);
    line-height: 1.4;
  }

  .hero__trusted img {
    max-width: 100%;
  }
}

/* ── Offerings ── */

.offerings {
  padding: 3rem 0;
}

.offerings__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 767px) {
  .offerings__pair {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.offering {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.offering__media {
  width: 50%;
  aspect-ratio: 1 / 1;
  margin: 0 auto 1.25rem;
  border-radius: 10px;
  overflow: hidden;
  background: #ebe6de;
}

.offering__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.offering__body {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.offering h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.offering h2 a {
  color: inherit;
  text-decoration: none;
}

.offering h2 a:hover {
  text-decoration: underline;
}

.offering p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-muted);
  line-height: 1.65;
}

.partner-logos {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.partner-logos__slot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: 2.25rem;
  line-height: 0;
}

.partner-logos__slot img.partner-logo {
  display: block;
  height: 2.25rem !important;
  width: auto !important;
  max-width: none !important;
  max-height: none !important;
}

#book .partner-logos {
  gap: 1.25rem;
}

/* ── Book features ── */

.book-features {
  background-color: var(--color-hero-bg);
  background-image: radial-gradient(
    ellipse 80% 60% at 50% 50%,
    #1f1008 0%,
    var(--color-hero-bg) 55%,
    var(--color-hero-bg-top) 100%
  );
  color: var(--color-text-inverse);
  padding: 3.5rem 0 4rem;
}

.book-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 3rem;
  align-items: center;
}

.book-feature + .book-feature {
  margin-top: 3.5rem;
}

.book-feature:nth-child(even) .book-feature__media {
  order: 2;
}

.book-feature:nth-child(even) .book-feature__content {
  order: 1;
}

.book-feature__media img {
  display: block;
  width: 100%;
  height: auto;
}

.book-feature__content {
  max-width: 26rem;
}

.book-feature:nth-child(odd) .book-feature__content {
  justify-self: start;
}

.book-feature:nth-child(even) .book-feature__content {
  justify-self: end;
}

.book-feature h3 {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  line-height: 1.3;
  color: var(--color-text-inverse);
}

.book-feature p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: rgba(245, 240, 232, 0.75);
}

@media (max-width: 767px) {
  .book-features {
    padding: 2.5rem 0 3rem;
  }

  .book-feature {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .book-feature + .book-feature {
    margin-top: 2.5rem;
  }

  .book-feature:nth-child(even) .book-feature__media,
  .book-feature:nth-child(even) .book-feature__content {
    order: unset;
  }

  .book-feature__content {
    max-width: none;
    justify-self: auto !important;
  }

  .book-feature__media {
    padding-inline: 2rem;
  }
}

/* ── About ── */

.about {
  padding: 3.5rem 0 4rem;
  background: var(--color-surface);
  border-block: 1px solid var(--color-border);
}

.about__inner {
  display: grid;
  grid-template-columns: minmax(0, 20rem) 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 768px) {
  .about__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about {
    padding: 2.5rem 0 3rem;
  }

  .about__photo {
    padding-inline: 2rem;
  }
}

.about__photo img {
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(26, 24, 22, 0.12);
}

.about__bio p {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--color-muted);
}

.about__bio p:last-child {
  margin-bottom: 0;
}

/* ── Testimonials ── */

.testimonials {
  padding: 3.5rem 0 4rem;
  background-color: var(--color-hero-bg);
  background-image: radial-gradient(
    ellipse 80% 60% at 50% 50%,
    #1f1008 0%,
    var(--color-hero-bg) 55%,
    var(--color-hero-bg-top) 100%
  );
  color: var(--color-text-inverse);
}

.testimonial {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

.testimonials__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4.5rem 6rem;
}

.testimonials__grid .testimonial {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.testimonials__grid .testimonial--featured {
  grid-column: 1 / -1;
}

@media (min-width: 768px) {
  .testimonials__grid .testimonial--featured {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
  }

  .testimonials__grid .testimonial--featured .testimonial__body {
    max-width: 36rem;
    text-align: center;
  }

  .testimonials__grid .testimonial--featured .testimonial__photo {
    margin-bottom: 1.75rem;
  }
}

.testimonials__grid .testimonial__photo {
  width: 9.5rem;
  height: 9.5rem;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.5rem;
}

.testimonials__grid .testimonial--featured .testimonial__photo {
  width: 12rem;
  height: 12rem;
  justify-self: center;
}

.testimonials__grid .testimonial__body {
  max-width: 26rem;
  width: 100%;
}

.testimonial__quote {
  margin: 0 0 1.25rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.55;
  color: var(--color-text-inverse);
}

.testimonial footer {
  font-size: 1rem;
  line-height: 1.5;
  color: rgba(245, 240, 232, 0.75);
}

.testimonial cite {
  display: block;
  font-style: normal;
  font-weight: 700;
  color: var(--color-text-inverse);
}

.testimonial footer span {
  display: block;
}

@media (max-width: 767px) {
  .testimonials {
    padding: 2.5rem 0 3rem;
  }

  .testimonials__grid .testimonial--featured {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .testimonials__grid .testimonial--featured .testimonial__body {
    text-align: left;
  }

  .testimonials__grid .testimonial--featured .testimonial__photo,
  .testimonials__grid .testimonial__photo {
    width: 9.875rem;
    height: 9.875rem;
    margin-bottom: 1.5rem;
  }

  .testimonials__grid {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }
}

/* ── Book page ── */

.book-hero {
  padding: 2rem 0 3.5rem;
}

.book-hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 3rem;
  align-items: center;
}

.book-hero__media img {
  display: block;
  width: 100%;
  max-width: 22rem;
  margin-inline: auto;
  border-radius: 1rem;
}

.book-hero__title {
  margin: 0 0 1.25rem;
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.1;
}

.book-hero__title-accent,
.book-hero__title-main {
  display: block;
}

.book-hero__title-accent {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  color: #b8c99a;
}

.book-hero__title-main {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  color: var(--color-text-inverse);
}

.book-hero__lead {
  margin: 0 0 1.25rem;
  max-width: 28rem;
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(245, 240, 232, 0.85);
}

.book-hero__status {
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-inverse);
}

.book-hero__logos {
  justify-content: flex-start;
  gap: 1.25rem;
}

.book-educators {
  padding: 3.5rem 0 4rem;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.book-educators__inner {
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
}

.book-educators h2 {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  line-height: 1.3;
}

.book-educators__intro {
  margin: 0 0 2.5rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-muted);
}

.book-educators__benefits {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 2.5rem;
  text-align: center;
}

.book-educators__benefits li {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-text);
}

.book-educators__form {
  display: grid;
  gap: 0.75rem;
  max-width: 20rem;
  margin-inline: auto;
}

.book-educators__form input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-surface);
  color: var(--color-text);
}

.book-educators__form input::placeholder {
  color: var(--color-muted);
}

.book-educators__form button {
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 4px;
  background: var(--color-text);
  color: var(--color-surface);
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.book-educators__form button:hover {
  opacity: 0.88;
}

.book-toc {
  padding: 3.5rem 0 4rem;
  background-color: var(--color-hero-bg);
  background-image: radial-gradient(
    ellipse 80% 60% at 50% 50%,
    #1f1008 0%,
    var(--color-hero-bg) 55%,
    var(--color-hero-bg-top) 100%
  );
  color: var(--color-text-inverse);
}

.book-toc h2 {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 400;
  line-height: 1.3;
  text-align: center;
}

.book-toc__intro {
  margin: 0 auto 3rem;
  max-width: 36rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  text-align: center;
  color: rgba(245, 240, 232, 0.75);
}

.book-toc__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 3.5rem;
}

.book-chapter h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-text-inverse);
}

.book-chapter p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: rgba(245, 240, 232, 0.75);
}

@media (max-width: 767px) {
  .book-hero {
    padding: 1.5rem 0 2.5rem;
  }

  .book-hero__inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }

  .book-hero__media img {
    max-width: 16rem;
  }

  .book-hero__lead {
    margin-inline: auto;
  }

  .book-hero__logos {
    justify-content: center;
  }

  .book-educators {
    padding: 2.5rem 0 3rem;
  }

  .book-educators__benefits {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .book-toc {
    padding: 2.5rem 0 3rem;
  }

  .book-toc__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ── Educators ── */

.educators {
  padding: 3.5rem 0 4rem;
  background: var(--color-bg);
}

.educators__intro {
  max-width: 40rem;
  margin-bottom: 2.5rem;
  text-align: center;
}

.educators__intro h1,
.educators--portal h1 {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 400;
  line-height: 1.3;
}

.educators__intro p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-muted);
}

.educators__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
  align-items: stretch;
}

.educators__panel {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.educators__panel--wide {
  max-width: 40rem;
  margin-inline: auto;
}

.educators__panel h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
}

.educators__panel p {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-muted);
}

.educators__panel p:last-of-type {
  margin-bottom: 0;
}

.educators__form,
.educators__panel form {
  display: grid;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1.25rem;
}

.educators__note {
  max-width: 40rem;
  margin: 2.5rem auto 0;
  text-align: left;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-muted);
}

.educators__form input,
.educators__panel input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-surface);
  color: var(--color-text);
}

.educators button {
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 4px;
  background: var(--color-text);
  color: var(--color-surface);
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.educators button:hover,
.educators button:disabled {
  opacity: 0.88;
}

.educators__status {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
}

.educators__status--ok {
  color: #2c6b3f;
}

.educators__status--err {
  color: #8a2b24;
}

.hp-field {
  position: absolute;
  left: -9999px;
  height: 0;
  width: 0;
  opacity: 0;
}

@media (max-width: 767px) {
  .educators {
    padding: 2.5rem 0 3rem;
  }

  .educators__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .educators__form,
  .educators__panel form {
    margin-top: 1.25rem;
    padding-top: 0;
  }

  .educators__note {
    margin-top: 2rem;
  }
}

/* ── Educator portal ── */

.portal {
  --content-width: 72rem;
}

.portal-welcome,
.portal-lesson-header {
  padding: 3.5rem 0 3rem;
  background: var(--color-bg);
}

.portal-welcome h1,
.portal-lesson-header h1,
.portal-dark h2 {
  margin: 0 0 1.25rem;
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.3;
}

.portal-welcome p,
.portal-lesson-header p {
  margin: 0 0 1rem;
  max-width: 50rem;
  font-size: 1rem;
  line-height: 1.65;
}

.portal-signoff {
  margin-top: 0.5rem;
  font-weight: 500;
}

.portal-back {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
}

.portal-back a {
  color: var(--color-muted);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.portal-back a:hover {
  color: var(--color-text);
}

.portal-dark {
  padding: 3.5rem 0 4.5rem;
  background-color: var(--color-hero-bg);
  background-image: radial-gradient(
    ellipse 80% 60% at 50% 50%,
    #1f1008 0%,
    var(--color-hero-bg) 55%,
    var(--color-hero-bg-top) 100%
  );
  color: var(--color-text-inverse);
}

.portal-dark p,
.portal-copy {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(245, 240, 232, 0.92);
}

.portal-copy ul {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
}

.portal-copy li {
  margin: 0 0 0.35rem;
}

.portal-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.portal-link--dark {
  color: var(--color-text);
}

.portal-lessons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem 2rem;
  margin-top: 3rem;
}

.portal-lesson-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  color: var(--color-text-inverse);
}

.portal-lesson-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 10rem;
  background: rgba(0, 0, 0, 0.28);
}

.portal-lesson-card__media img {
  width: 100%;
  height: 11rem;
  object-fit: contain;
}

.portal-lesson-card__title {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
}

.portal-lesson-card:hover .portal-lesson-card__title {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.portal-signout {
  margin-top: 3rem;
}

.portal-signout button {
  padding: 0;
  border: 0;
  background: none;
  color: rgba(245, 240, 232, 0.7);
  font-size: 0.875rem;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.portal-signout button:hover {
  color: var(--color-text-inverse);
}

.portal-lesson-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.portal-lesson-body .portal-copy {
  margin: 0;
}

.portal-images {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0;
}

.portal-images img {
  width: 100%;
  height: auto;
  cursor: zoom-in;
}

.portal-images--single {
  max-width: 36rem;
  margin-inline: auto;
}

.portal-embed {
  position: relative;
  width: min(100%, 40rem);
  margin-inline: auto;
  background: #000;
}

.portal-embed--drive {
  aspect-ratio: 4 / 3;
}

.portal-embed--video {
  aspect-ratio: 16 / 9;
}

.portal-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.portal-caption {
  margin: 0;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 400;
}

.portal-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(10, 6, 4, 0.92);
  cursor: zoom-out;
}

.portal-lightbox[hidden] {
  display: none;
}

.portal-lightbox img {
  max-width: min(96vw, 72rem);
  max-height: 92vh;
  object-fit: contain;
}

.portal-lightbox-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .portal-welcome,
  .portal-lesson-header,
  .portal-dark {
    padding: 2.5rem 0 2.75rem;
  }

  .portal-lessons {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .portal-images {
    flex-direction: column;
  }

  .portal-lesson-card__media img {
    height: 14rem;
  }
}

/* ── Footer ── */

.site-footer {
  padding: 2.5rem 0;
  background: var(--color-surface);
  color: var(--color-muted);
  border-top: 1px solid var(--color-border);
}

.site-footer__copy {
  margin: 0;
  text-align: center;
  font-size: 0.8125rem;
}
