:root {
  --ink: #29231f;
  --muted: #70675f;
  --paper: #fbf8f4;
  --panel: #fffdfb;
  --sage: #879883;
  --sage-dark: #284c45;
  --clay: #a85e49;
  --lavender: #76596e;
  --line: #e6ddd5;
  --surface-tint: #f2e9e3;
  --shadow: 0 18px 50px rgba(73, 49, 39, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
select {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 82px;
  padding: 10px clamp(18px, 4vw, 56px);
  background: rgba(251, 248, 244, 0.95);
  border-bottom: 1px solid rgba(230, 221, 213, 0.92);
  backdrop-filter: blur(16px);
}

.brand,
.main-nav a {
  color: var(--ink);
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-logo {
  display: block;
  width: 68px;
  height: 54px;
  border-radius: 4px;
  background: #000000;
  object-fit: contain;
}

.brand-name {
  max-width: 150px;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.15;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.main-nav a {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 650;
  font-size: 0.92rem;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--surface-tint);
  color: var(--ink);
}

.header-actions,
.hero-actions,
.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.primary-button,
.secondary-button,
.ghost-button,
.side-link {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
}

.primary-button {
  background: var(--sage-dark);
  color: white;
  box-shadow: 0 10px 24px rgba(40, 76, 69, 0.22);
}

.secondary-button {
  background: #f0e6df;
  color: var(--ink);
}

.ghost-button {
  background: transparent;
  color: var(--sage-dark);
}

.view {
  min-height: calc(100vh - 82px);
}

.home-view {
  min-height: auto;
}

.hero-view {
  position: relative;
  display: grid;
  align-items: end;
  min-height: min(780px, calc(100svh - 112px));
  overflow: hidden;
  padding: clamp(28px, 5vw, 64px);
}

.hero-media {
  position: absolute;
  inset: 0;
  background: url("assets/hero-yoga.png") center / cover;
}

.hero-media::after {
  position: absolute;
  inset: 0;
  background: rgba(34, 27, 24, 0.5);
  content: "";
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  color: white;
  padding: 9vh 0 6vh;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-content .eyebrow,
.hero-content p {
  color: rgba(255, 255, 255, 0.88);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(3.2rem, 8vw, 7rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.hero-content p {
  max-width: 580px;
  font-size: 1.12rem;
  line-height: 1.7;
}

.content-band {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(42px, 7vw, 86px) 0;
}

.home-preview {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(46px, 7vw, 88px) 0;
}

.teacher-intro-band {
  background: var(--surface-tint);
  padding: 64px 18px;
}

.teacher-carousel {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.15fr);
  width: min(1180px, 100%);
  min-height: 560px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(91, 69, 57, 0.18);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.teacher-carousel-media {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: #eadfd7;
}

.teacher-carousel-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
}

.teacher-carousel-media span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  border-radius: 999px;
  padding: 8px 11px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--sage-dark);
  font-size: 0.76rem;
  font-weight: 850;
}

.teacher-carousel-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 54px;
}

.teacher-slides {
  min-height: 250px;
}

.teacher-slide h2 {
  max-width: 660px;
  font-size: 3.35rem;
  line-height: 1.02;
}

.teacher-slide p {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.teacher-carousel-footer,
.carousel-controls,
.carousel-dots {
  display: flex;
  align-items: center;
}

.teacher-carousel-footer {
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 26px;
}

.carousel-controls {
  gap: 10px;
}

.carousel-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--ink);
  font-size: 1.2rem;
}

.carousel-button:hover,
.carousel-button:focus-visible {
  border-color: var(--sage-dark);
  color: var(--sage-dark);
}

.carousel-status {
  min-width: 48px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  text-align: center;
}

.carousel-dots {
  gap: 7px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: #c7b7ac;
}

.carousel-dot.active {
  background: var(--clay);
}

.teacher-carousel-footer .primary-button {
  margin-left: auto;
}

.section-heading,
.toolbar-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.section-heading {
  flex-direction: column;
}

.subscription-page {
  max-width: 1180px;
}

.subscription-notice,
.subscription-status-message {
  color: var(--muted);
  line-height: 1.6;
}

.subscription-notice {
  margin: -12px 0 16px;
}

.subscription-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
}

.subscription-plan {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 225px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.subscription-plan .eyebrow,
.subscription-plan h3,
.subscription-plan p {
  margin: 0;
}

.subscription-plan h3 {
  font-size: 1.65rem;
}

.subscription-plan > p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.5;
}

.subscription-plan button {
  align-self: end;
  margin-top: auto;
}

.subscription-plan button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.subscription-dashboard h3,
.subscription-dashboard > p {
  margin-top: 0;
}

.subscription-dashboard .subscription-plans {
  margin-top: 22px;
}

.auth-mode-toggle {
  border: 0;
  background: transparent;
  color: var(--sage-dark);
  font-weight: 800;
}

.split-layout,
.teacher-profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 24px;
  font-size: 1.05rem;
  line-height: 1.75;
}

.soft-panel,
.service-card,
.method-card,
.content-card,
.auth-card,
.admin-form,
.table-wrap,
.teacher-cta {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.soft-panel {
  padding: 24px;
}

.teacher-profile {
  align-items: stretch;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  margin-bottom: 22px;
}

.teacher-photo {
  display: grid;
  min-height: 430px;
  place-items: end start;
  overflow: hidden;
  border-radius: 8px;
  padding: 28px;
  background: url("assets/hero-yoga.png") center / cover;
}

.teacher-photo span {
  display: inline-flex;
  border-radius: 999px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--sage-dark);
  font-weight: 900;
}

.teacher-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.lead {
  font-size: 1.22rem;
  line-height: 1.65;
  color: var(--ink);
}

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

.teacher-stats div {
  display: grid;
  gap: 4px;
  border-top: 2px solid var(--line);
  padding-top: 14px;
}

.teacher-stats strong {
  color: var(--sage-dark);
  font-size: 1.45rem;
}

.teacher-stats span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 760;
}

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

.method-card {
  padding: 22px;
}

.teacher-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: 22px;
  background: var(--surface-tint);
}

.teacher-cta h3 {
  margin: 0;
}

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

.home-service-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.service-card {
  padding: 24px;
}

.service-card span {
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--lavender);
  font-weight: 900;
}

.service-link {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  color: var(--ink);
  font: inherit;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.service-link:hover {
  border-color: var(--sage);
  box-shadow: 0 22px 52px rgba(73, 49, 39, 0.16);
  transform: translateY(-2px);
}

.service-link:focus-visible {
  outline: 3px solid rgba(40, 76, 69, 0.28);
  outline-offset: 3px;
}

.service-link p {
  margin: 8px 0 24px;
  line-height: 1.55;
}

.service-card .service-card-action {
  margin: auto 0 0;
  color: var(--sage-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.service-detail-back {
  margin-bottom: 22px;
}

.service-detail-hero {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.service-detail-media {
  min-height: 430px;
  overflow: hidden;
  background: #eadfd7;
}

.service-detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-detail-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 48px;
}

.service-detail-copy h2 {
  font-size: 3.5rem;
}

.service-detail-copy .lead {
  margin-bottom: 0;
  color: var(--muted);
}

.service-detail-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 46px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.service-detail-fact {
  min-width: 0;
  padding: 28px;
}

.service-detail-fact + .service-detail-fact {
  border-left: 1px solid var(--line);
}

.service-detail-fact h3 {
  color: var(--sage-dark);
}

.service-detail-fact p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.service-library-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}

.service-library-heading h3 {
  margin: 0;
  font-size: 1.8rem;
}

.empty-service-content {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
  color: var(--muted);
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 12px 13px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 760;
}

.form-help {
  margin: -8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.content-card {
  display: grid;
  gap: 12px;
  min-height: 260px;
  padding: 18px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-self: end;
}

.card-actions button {
  flex: 1 1 160px;
}

.media-thumb {
  display: grid;
  min-height: 132px;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #efe7e1;
  color: var(--sage-dark);
  font-size: 2rem;
  font-weight: 900;
}

.media-player {
  display: block;
  width: 100%;
  min-height: 132px;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: #07131d;
  object-fit: contain;
}

.youtube-player {
  border: 0;
}

audio.media-player {
  min-height: 54px;
  aspect-ratio: auto;
  align-self: center;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 6px 10px;
  background: #e9eee7;
  color: var(--sage-dark);
  font-size: 0.8rem;
  font-weight: 850;
}

.chip.premium,
.status-pill.premium {
  background: #f0ded6;
  color: #8a4f3d;
}

.chip.preview {
  background: #eee7ec;
  color: var(--lavender);
}

.chip.price {
  background: #f5ebe4;
  color: var(--ink);
}

.preview-note {
  margin: 0;
  color: #805343;
  font-weight: 760;
}

.locked {
  opacity: 0.78;
}

.contact-form,
.admin-form,
.profile-form,
.site-editor-form {
  display: grid;
  gap: 16px;
  max-width: 720px;
  padding: 24px;
}

.site-editor-form {
  max-width: 900px;
}

.site-editor-form h3,
.site-editor-form h4,
.site-editor-form h5 {
  margin: 0;
}

.site-editor-form h4 {
  font-size: 1.25rem;
}

.site-editor-form h5 {
  color: var(--sage-dark);
  font-size: 1rem;
}

.site-editor-section {
  display: grid;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.site-editor-slide,
.site-editor-service {
  display: grid;
  grid-template-columns: minmax(170px, 0.65fr) minmax(0, 1.35fr);
  gap: 14px;
  border-top: 1px solid #e9dfd7;
  padding-top: 18px;
}

.site-editor-slide h5,
.site-editor-service h5 {
  grid-column: 1 / -1;
}

.site-editor-photo {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}

.site-editor-photo img {
  width: 190px;
  aspect-ratio: 4 / 5;
  border-radius: 8px;
  object-fit: cover;
  background: #eadfd7;
}

.site-editor-photo > div {
  display: grid;
  gap: 12px;
}

.profile-form {
  padding: 0;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-form-actions,
.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.table-actions button {
  min-height: 36px;
  padding: 8px 12px;
}

.preview-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--paper);
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  width: min(1240px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0;
  gap: 20px;
}

.sidebar {
  position: sticky;
  top: 92px;
  align-self: start;
  display: grid;
  gap: 10px;
  padding: 18px;
  background: #eee7e1;
  border-radius: 8px;
}

.side-link {
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--ink);
}

.side-link.active {
  background: var(--panel);
}

.side-link.danger {
  color: #a34c45;
}

.workspace {
  min-width: 0;
}

.workspace-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

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

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: 18px;
  height: 18px;
}

.table-wrap {
  margin-top: 18px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 0.86rem;
}

.auth-dialog,
.media-dialog {
  width: min(460px, calc(100% - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
}

.media-dialog {
  width: min(900px, calc(100% - 32px));
}

.auth-dialog::backdrop,
.media-dialog::backdrop {
  background: rgba(34, 27, 24, 0.58);
}

.auth-card {
  position: relative;
  display: grid;
  gap: 15px;
  padding: 28px;
}

.media-dialog-card {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 28px;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.media-dialog-card h2 {
  margin: 0;
  padding-right: 42px;
}

.dialog-media {
  display: block;
  width: 100%;
  max-height: min(70vh, 680px);
  border-radius: 8px;
  background: #07131d;
}

iframe.dialog-media {
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
}

audio.dialog-media {
  min-height: 54px;
  background: transparent;
}

.media-preview-note {
  margin: 0 0 12px;
  color: var(--sage-dark);
  font-weight: 760;
}

.auth-helper,
.auth-note {
  margin: -4px 0 2px;
  color: var(--muted);
  line-height: 1.55;
}

.auth-note {
  margin: 0;
  border-radius: 8px;
  background: var(--surface-tint);
  padding: 12px 13px;
  color: var(--sage-dark);
  font-weight: 760;
}

.icon-button {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f0e6df;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  max-width: min(380px, calc(100% - 44px));
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
  font-weight: 750;
}

.about-library {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  padding-top: 42px;
}

.compact-heading {
  max-width: 720px;
  margin-bottom: 24px;
}

.compact-heading h3 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.compact-heading p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

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

.content-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.content-source-grid label:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.content-source-grid small {
  color: var(--muted);
  font-weight: 600;
  line-height: 1.45;
}

.form-help {
  margin: 0;
  border-left: 3px solid var(--clay);
  padding: 10px 12px;
  background: var(--surface-tint);
  color: var(--sage-dark);
  line-height: 1.5;
}

.youtube-player,
.youtube-dialog-player {
  border: 0;
  aspect-ratio: 16 / 9;
}

.media-thumb-book {
  background: #eee2d7;
  color: var(--clay);
}

.media-thumb-thought {
  background: #eee7ec;
  color: var(--lavender);
}

.media-thumb-pack {
  background: #e6ece8;
  color: var(--sage-dark);
}

#mediaDialogBody {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.pack-resource {
  display: grid;
  gap: 12px;
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.pack-resource:first-child {
  border-top: 0;
  padding-top: 0;
}

.pack-resource h3 {
  margin: 0;
  color: var(--sage-dark);
}

.youtube-dialog-player {
  width: 100%;
  min-height: 360px;
}

.document-resource {
  align-items: start;
}

.document-viewer {
  width: 100%;
  height: min(62vh, 680px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.document-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.thought-body {
  max-width: 760px;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.8;
}

.thought-body p {
  margin: 0 0 1em;
  white-space: pre-wrap;
}

.pack-note {
  max-width: none;
  border-left: 3px solid var(--clay);
  padding: 14px 16px;
  background: var(--surface-tint);
}

.pack-note p:last-child {
  margin-bottom: 0;
}
@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .main-nav {
    justify-content: flex-start;
  }

  .split-layout,
  .teacher-profile,
  .teacher-method,
  .service-grid,
  .content-grid,
  .compact,
  .app-shell {
    grid-template-columns: 1fr;
  }

  .toolbar-heading,
  .workspace-top,
  .teacher-cta {
    flex-direction: column;
  }

  .sidebar {
    position: static;
  }

  .teacher-carousel {
    grid-template-columns: 1fr;
  }

  .service-detail-hero,
  .service-detail-facts {
    grid-template-columns: 1fr;
  }

  .service-detail-fact + .service-detail-fact {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .service-library-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .teacher-carousel-media {
    min-height: auto;
    aspect-ratio: 4 / 3;
  }

  .teacher-carousel-content {
    padding: 38px;
  }

  .site-editor-slide,
  .site-editor-service {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .filter-row {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .site-header {
    gap: 12px;
  }

  .brand-logo {
    width: 60px;
    height: 48px;
  }

  .main-nav {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  .main-nav a {
    width: 100%;
    padding: 8px 5px;
    font-size: 0.8rem;
    text-align: center;
  }

  .header-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .header-actions button {
    width: 100%;
    min-width: 0;
    padding: 9px 6px;
    font-size: 0.84rem;
    white-space: normal;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .hero-actions button {
    width: 100%;
    min-width: 0;
    padding: 9px 10px;
    font-size: 0.82rem;
  }

  .hero-view {
    min-height: min(610px, calc(100svh - 170px));
    padding: 28px;
  }

  .hero-content {
    padding: 32px 0 26px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .preview-options {
    grid-template-columns: 1fr;
  }

  .teacher-stats {
    grid-template-columns: 1fr;
  }

  .teacher-intro-band {
    padding: 42px 18px;
  }

  .teacher-carousel-media {
    aspect-ratio: 4 / 5;
  }

  .teacher-carousel-content {
    padding: 28px 22px;
  }

  .teacher-slides {
    min-height: 300px;
  }

  .teacher-slide h2 {
    font-size: 2.25rem;
  }

  .teacher-carousel-footer .primary-button {
    width: 100%;
    margin-left: 0;
  }

  .service-detail-media {
    min-height: 280px;
    aspect-ratio: 4 / 3;
  }

  .service-detail-copy {
    padding: 30px 22px;
  }

  .service-detail-copy h2 {
    font-size: 2.35rem;
  }

  .site-editor-photo {
    grid-template-columns: 1fr;
  }

  .site-editor-photo img {
    width: min(100%, 260px);
  }
}
@media (max-width: 900px) {
  .content-source-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .content-source-grid label:last-child:nth-child(odd) {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .youtube-dialog-player {
    min-height: 0;
  }

  .document-viewer {
    height: 56vh;
  }

  .media-dialog-card {
    padding: 22px 16px;
  }
}
