:root {
  color-scheme: light;
  --ink: #18201c;
  --muted: #687169;
  --line: #dfe5dc;
  --paper: #f7f8f4;
  --white: #ffffff;
  --sage: #60796a;
  --moss: #344a39;
  --clay: #b56e55;
  --sky: #dcebf0;
  --shadow: 0 18px 50px rgba(24, 32, 28, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
.button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 700;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
}

.button.primary {
  background: var(--moss);
  color: var(--white);
}

.button.secondary {
  background: var(--white);
  border-color: var(--line);
  color: var(--ink);
}

.site-header {
  align-items: center;
  background: rgba(247, 248, 244, 0.94);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr auto 1fr;
  left: 0;
  min-height: 72px;
  padding: 0 clamp(18px, 4vw, 48px);
  position: sticky;
  right: 0;
  top: 0;
  z-index: 10;
}

.brand,
.site-header nav,
.header-action {
  align-items: center;
  display: flex;
}

.brand {
  font-weight: 800;
  gap: 10px;
}

.brand-mark {
  background: var(--clay);
  border-radius: 50%;
  display: inline-block;
  height: 14px;
  width: 14px;
}

.site-header nav {
  gap: 22px;
  color: var(--muted);
  font-size: 0.95rem;
}

.header-action {
  border: 1px solid var(--line);
  border-radius: 8px;
  justify-self: end;
  min-height: 40px;
  padding: 0 14px;
}

.hero-band,
.section,
.pricing-page,
.practice-detail {
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(28px, 5vw, 64px) clamp(18px, 4vw, 32px);
}

.hero-band {
  align-items: center;
  display: grid;
  gap: clamp(24px, 5vw, 64px);
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  min-height: calc(100vh - 140px);
}

.hero-copy h1,
.pricing-copy h1,
.practice-copy h1 {
  font-size: clamp(2.6rem, 7vw, 6rem);
  letter-spacing: 0;
  line-height: 0.94;
  margin: 0;
  max-width: 720px;
}

.hero-copy p,
.pricing-copy p,
.practice-copy p {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 620px;
}

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

.hero-media,
.video-shell {
  aspect-ratio: 16 / 11;
  background: var(--sky);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.hero-media::before,
.media::before,
.video-shell::before {
  background:
    linear-gradient(180deg, rgba(24, 32, 28, 0) 42%, rgba(24, 32, 28, 0.34)),
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 36%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 1;
}

.hero-media img,
.media img,
.video-shell img {
  filter: saturate(1.05) contrast(1.03);
  transform: scale(1.01);
  transition:
    filter 180ms ease,
    transform 180ms ease;
}

.hero-media:hover img,
.practice-card:hover img {
  filter: saturate(1.1) contrast(1.05);
  transform: scale(1.035);
}

.hero-meta,
.badge,
.video-lock {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 800;
  padding: 8px 12px;
  position: absolute;
  z-index: 2;
}

.hero-meta {
  bottom: 16px;
  left: 16px;
}

.play-mark {
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 50%;
  bottom: 14px;
  box-shadow: 0 10px 28px rgba(24, 32, 28, 0.16);
  display: flex;
  height: 44px;
  justify-content: center;
  left: 14px;
  position: absolute;
  width: 44px;
  z-index: 2;
}

.play-mark::before {
  border-bottom: 8px solid transparent;
  border-left: 12px solid var(--moss);
  border-top: 8px solid transparent;
  content: "";
  margin-left: 3px;
}

.hero-play {
  bottom: 66px;
  height: 52px;
  width: 52px;
}

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

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

.section-heading h2,
.unlock-panel h2 {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  letter-spacing: 0;
  line-height: 1;
  margin: 0;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.filters input {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 38px;
  min-width: min(260px, 100%);
  padding: 0 12px;
}

.filters button {
  background: var(--white);
  border-color: var(--line);
  min-height: 38px;
  padding: 0 12px;
}

.filters button[aria-pressed="true"] {
  background: var(--moss);
  color: var(--white);
}

.library-heading {
  align-items: end;
  display: grid;
  gap: clamp(18px, 3vw, 32px);
  grid-template-columns: minmax(320px, 0.34fr) minmax(0, 1fr);
}

.library-title h2 {
  max-width: 360px;
}

.library-filters {
  align-items: end;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(190px, 1.4fr) repeat(4, minmax(96px, 0.75fr)) minmax(72px, auto);
  padding: 14px;
}

.library-filters input,
.filter-field select,
.filter-reset {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 40px;
  min-width: 0;
  padding: 0 12px;
  width: 100%;
}

.search-field {
  min-width: min(280px, 100%);
}

.filter-field,
.duration-filter {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.filter-field span,
.duration-heading span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.duration-filter {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  grid-column: 1 / -1;
  padding: 8px 12px 10px;
}

.duration-heading {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.duration-heading output {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 850;
  white-space: nowrap;
}

.range-slider {
  height: 28px;
  position: relative;
}

.range-track,
.range-slider input {
  left: 0;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.range-track {
  background:
    linear-gradient(
      to right,
      var(--line) 0,
      var(--line) var(--range-start, 0%),
      var(--moss) var(--range-start, 0%),
      var(--moss) var(--range-end, 100%),
      var(--line) var(--range-end, 100%),
      var(--line) 100%
    );
  border-radius: 999px;
  height: 5px;
  pointer-events: none;
}

.range-slider input {
  appearance: none;
  background: transparent;
  border: 0;
  height: 28px;
  min-height: 28px;
  padding: 0;
  pointer-events: none;
  width: 100%;
}

.range-slider input::-webkit-slider-thumb {
  appearance: none;
  background: var(--moss);
  border: 3px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(24, 32, 28, 0.25);
  cursor: pointer;
  height: 22px;
  pointer-events: auto;
  width: 22px;
}

.range-slider input::-moz-range-thumb {
  background: var(--moss);
  border: 3px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(24, 32, 28, 0.25);
  cursor: pointer;
  height: 16px;
  pointer-events: auto;
  width: 16px;
}

.range-slider input::-webkit-slider-runnable-track {
  background: transparent;
}

.range-slider input::-moz-range-track {
  background: transparent;
}

.filter-reset {
  min-height: 40px;
  padding: 0 12px;
  width: auto;
}

.result-count {
  color: var(--muted);
  font-weight: 800;
  margin: 12px 0 0;
}

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

.practice-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  min-width: 0;
  overflow: hidden;
}

.media {
  aspect-ratio: 4 / 3;
  display: block;
  overflow: hidden;
  position: relative;
}

.badge {
  right: 12px;
  top: 12px;
}

.badge.locked {
  background: var(--moss);
  color: var(--white);
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 850;
}

.card-summary {
  color: var(--muted);
  line-height: 1.5;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  background: var(--paper);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 6px 8px;
}

.program-band {
  padding-top: 20px;
}

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

.program-grid a,
.price-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 22px;
}

.program-grid span {
  font-size: 1.15rem;
  font-weight: 850;
}

.program-grid small,
.price-card p {
  color: var(--muted);
  line-height: 1.55;
}

.practice-detail {
  display: grid;
  gap: clamp(24px, 5vw, 56px);
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
}

.video-shell {
  align-self: start;
}

.embed-shell {
  aspect-ratio: 16 / 9;
  background: var(--ink);
  border-radius: 8px;
  overflow: hidden;
}

.embed-shell iframe {
  border: 0;
  display: block;
  height: 100%;
  width: 100%;
}

.video-lock {
  align-items: center;
  bottom: 18px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  left: 18px;
  right: 18px;
}

.video-lock.open {
  background: rgba(255, 255, 255, 0.94);
}

.metadata-grid {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
}

.metadata-grid div {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  grid-template-columns: 90px 1fr;
  padding-top: 14px;
}

dt {
  color: var(--muted);
  font-weight: 800;
}

dd {
  margin: 0;
}

.compact {
  padding-top: 0;
}

.unlock-panel {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
  padding: clamp(22px, 4vw, 34px);
}

.unlock-panel p {
  color: var(--muted);
  line-height: 1.6;
}

.offer-list {
  display: grid;
  gap: 10px;
}

.offer {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: flex;
  font: inherit;
  gap: 16px;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px 16px;
  text-align: left;
  width: 100%;
}

.offer.primary {
  border-color: var(--moss);
}

.offer:disabled {
  cursor: progress;
  opacity: 0.7;
}

.offer span {
  display: grid;
  gap: 4px;
}

.offer small {
  color: var(--muted);
}

.checkout-status {
  color: var(--muted);
  font-weight: 800;
  margin: 0;
}

.checkout-video {
  display: grid;
  gap: 12px;
}

.privy-access {
  align-items: center;
  background: rgba(248, 248, 244, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
}

.privy-access span {
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.35;
}

.privy-actions {
  display: flex;
  gap: 8px;
}

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

.pricing-page {
  display: grid;
  gap: 40px;
}

.price-card h2 {
  font-size: 2.2rem;
  margin: 0;
}

.price-card.featured {
  border-color: var(--moss);
  box-shadow: var(--shadow);
}

.admin-page {
  display: grid;
  gap: 24px;
  margin: 0 auto;
  max-width: 1280px;
  padding: clamp(28px, 5vw, 56px) clamp(18px, 4vw, 32px);
}

.admin-heading {
  align-items: end;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
}

.admin-heading h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
  letter-spacing: 0;
  line-height: 0.95;
  margin: 0;
}

.admin-heading p,
.admin-card-body p,
.admin-card li {
  color: var(--muted);
  line-height: 1.55;
}

.admin-login,
.admin-review-form,
.admin-login label,
.admin-review-form label {
  display: grid;
  gap: 8px;
}

.admin-login {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.admin-login span,
.admin-review-form span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.admin-login input,
.admin-review-form select,
.admin-review-form textarea {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 42px;
  padding: 10px 12px;
  width: 100%;
}

.admin-toolbar {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding-top: 18px;
}

.admin-grid {
  display: grid;
  gap: 18px;
}

.admin-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 0;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  overflow: hidden;
}

.admin-media {
  aspect-ratio: 16 / 10;
  background: var(--sky);
  min-height: 100%;
}

.admin-card-body {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.admin-card-title {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.admin-card-title h2 {
  font-size: 1.5rem;
  line-height: 1.1;
  margin: 0;
}

.admin-status-pill {
  background: var(--paper);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
  padding: 7px 9px;
  text-transform: capitalize;
}

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

.admin-preview {
  aspect-ratio: 16 / 9;
  background: var(--ink);
  border-radius: 8px;
  overflow: hidden;
}

.admin-preview iframe {
  border: 0;
  height: 100%;
  width: 100%;
}

.admin-card details {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.admin-card summary {
  cursor: pointer;
  font-weight: 850;
}

.admin-card ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 20px;
}

.poster-admin {
  display: grid;
  gap: 24px;
  margin: 0 auto;
  max-width: 1440px;
  padding: clamp(28px, 5vw, 56px) clamp(18px, 4vw, 32px);
}

.poster-admin-heading {
  align-items: end;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 500px);
}

.poster-admin-heading h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
  letter-spacing: 0;
  line-height: 0.95;
  margin: 0;
}

.poster-admin-heading p,
.poster-export p {
  color: var(--muted);
  line-height: 1.55;
}

.poster-tool {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
}

.poster-video-list,
.poster-controls {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.poster-video-list {
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 118px);
  overflow: hidden;
  padding: 14px;
  position: sticky;
  top: 90px;
}

.poster-search {
  display: grid;
  gap: 8px;
}

.poster-search span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.poster-search input,
.poster-export textarea {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
  width: 100%;
}

.poster-list-meta {
  color: var(--muted);
  display: flex;
  font-size: 0.88rem;
  justify-content: space-between;
}

.poster-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  padding-right: 4px;
}

.poster-list-item {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 10px;
  grid-template-columns: 82px minmax(0, 1fr);
  justify-content: start;
  min-height: 72px;
  padding: 8px;
  text-align: left;
  width: 100%;
}

.poster-list-item[data-active="true"] {
  border-color: var(--moss);
  box-shadow: inset 0 0 0 1px var(--moss);
}

.poster-list-item[data-poster-state="pending"] {
  border-color: color-mix(in srgb, var(--clay) 62%, var(--line));
}

.poster-list-item img {
  aspect-ratio: 16 / 9;
  border-radius: 6px;
}

.poster-list-item strong,
.poster-list-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poster-list-item small {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 3px;
}

.poster-build-state {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 850;
  margin-top: 7px;
  padding: 3px 8px;
}

.poster-build-state[data-state="published"] {
  background: color-mix(in srgb, var(--moss) 12%, var(--white));
  color: var(--moss);
}

.poster-build-state[data-state="pending"] {
  background: color-mix(in srgb, var(--clay) 14%, var(--white));
  color: var(--clay);
}

.poster-review {
  display: grid;
  gap: 16px;
}

.poster-player-shell {
  aspect-ratio: 16 / 9;
  background: var(--ink);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.poster-player-shell iframe {
  border: 0;
  display: block;
  height: 100%;
  width: 100%;
}

.poster-controls {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.poster-current h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
  letter-spacing: 0;
  line-height: 1;
  margin: 0;
}

.poster-current p {
  color: var(--muted);
}

.poster-scrubber {
  display: grid;
  gap: 8px;
}

.poster-scrubber input {
  accent-color: var(--moss);
  width: 100%;
}

.poster-scrubber div,
.poster-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.poster-scrubber div {
  color: var(--muted);
  font-size: 0.9rem;
  justify-content: space-between;
}

.poster-export {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding-top: 14px;
}

.poster-export code {
  color: var(--ink);
  font-weight: 800;
}

.poster-export textarea {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.5;
  resize: vertical;
}

@media (max-width: 840px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-header nav {
    display: none;
  }

  .hero-band,
  .practice-detail,
  .unlock-panel,
  .admin-heading,
  .admin-card,
  .poster-admin-heading,
  .poster-tool {
    grid-template-columns: 1fr;
  }

  .poster-video-list {
    max-height: none;
    position: static;
  }

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

  .practice-grid,
  .program-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .privy-access {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .filters {
    justify-content: start;
  }

  .library-heading {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .library-title h2 {
    max-width: none;
  }

  .library-filters {
    align-items: stretch;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .admin-toolbar {
    align-items: start;
    flex-direction: column;
  }
}
