:root {
  color-scheme: dark;
  --bg: #111318;
  --panel: #181b22;
  --panel-strong: #20242d;
  --text: #f4f1e8;
  --muted: #a9adba;
  --line: rgba(244, 241, 232, 0.12);
  --accent: #23d18b;
  --accent-dark: #0d8f61;
  --warn: #f4b04f;
  --locked: #737987;
  --danger: #ff6b6b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(35, 209, 139, 0.09), transparent 34%),
    radial-gradient(circle at 84% 8%, rgba(244, 176, 79, 0.12), transparent 30%),
    var(--bg);
  overflow-x: hidden;
}

body.gate-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 34px;
  height: 100vh;
  padding: 26px 20px;
  border-right: 1px solid var(--line);
  background: rgba(17, 19, 24, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.brand img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
}

.nav-links {
  display: grid;
  gap: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.nav-link:hover {
  transform: translateX(2px);
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.rail-footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.rail-footer p,
.rail-footer strong,
.eyebrow {
  margin: 0;
}

.rail-footer p,
.eyebrow {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rail-footer strong {
  display: block;
  margin-top: 8px;
}

.support-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 14px;
  padding: 0 14px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  background: rgba(35, 209, 139, 0.14);
  border: 1px solid rgba(35, 209, 139, 0.28);
  transition:
    transform 180ms ease,
    background 180ms ease;
}

.support-link:hover {
  transform: translateY(-1px);
  background: rgba(35, 209, 139, 0.22);
}

.workspace {
  display: grid;
  align-content: start;
  gap: 28px;
  width: min(1180px, 100%);
  padding: 26px clamp(18px, 4vw, 56px) 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
}

.topbar h1 {
  margin: 4px 0 0;
  font-size: clamp(2rem, 5vw, 4.8rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.icon-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
}

.icon-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.ghost-button,
.primary-button,
.secondary-button,
.access-item button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 180ms ease,
    background 180ms ease,
    opacity 180ms ease;
}

.notification-prompt {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  width: min(430px, calc(100vw - 28px));
  padding: 20px;
  border: 1px solid rgba(35, 209, 139, 0.34);
  border-radius: 12px;
  background: rgba(24, 27, 34, 0.98);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.notification-prompt[hidden] {
  display: none;
}

.notification-prompt__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--accent);
  background: rgba(35, 209, 139, 0.14);
  box-shadow: inset 0 0 0 1px rgba(35, 209, 139, 0.28);
}

.notification-prompt__copy {
  min-width: 0;
  padding-right: 22px;
}

.notification-prompt h2,
.notification-prompt p {
  margin: 0;
}

.notification-prompt h2 {
  margin-top: 5px;
  font-size: 1.18rem;
}

.notification-prompt__copy > p:not(.eyebrow, .notification-prompt__status) {
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.45;
}

.notification-prompt__status {
  min-height: 18px;
  margin-top: 8px !important;
  color: var(--warn);
  font-size: 0.82rem;
}

.notification-prompt > .primary-button {
  grid-column: 2;
  justify-self: start;
}

.notification-prompt__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 1.35rem;
}

.primary-button {
  padding: 0 18px;
  color: #07120d;
  background: var(--accent);
}

.primary-button:hover,
.ghost-button:hover,
.secondary-button:hover,
.access-item button:hover {
  transform: translateY(-1px);
}

.ghost-button,
.secondary-button {
  padding: 0 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.auth-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(280px, 0.72fr);
  gap: clamp(18px, 3.6vw, 44px);
  align-items: stretch;
  padding: clamp(14px, 2vw, 20px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(244, 176, 79, 0.13), rgba(255, 255, 255, 0.04)),
    var(--panel);
  box-shadow: var(--shadow);
  animation: rise 520ms ease both;
}

.auth-visual {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border-radius: 8px;
  background: #050505;
}

.auth-visual img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  object-position: center;
  display: block;
}

.auth-content {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: center;
  gap: 22px;
  padding: clamp(8px, 2.4vw, 24px);
  overflow: hidden;
}

.auth-copy h2,
.welcome-strip h2,
.section-heading h2 {
  margin: 10px 0 0;
  max-width: 760px;
  font-size: clamp(1.7rem, 3.6vw, 3.6rem);
  line-height: 1;
  letter-spacing: 0;
}

.auth-copy p:not(.eyebrow) {
  max-width: 580px;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.field-description {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  font-weight: 500;
}

.profile-wizard {
  position: relative;
  display: grid;
  gap: 16px;
  width: min(560px, calc(100% - 28px));
  max-height: calc(100% - 28px);
  overflow-y: auto;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(244, 176, 79, 0.12), rgba(35, 209, 139, 0.05)),
    rgba(17, 19, 24, 0.98);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62);
  transform: translateY(18px) scale(0.97);
  transition: transform 180ms ease;
}

.profile-modal {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 14px;
  border-radius: 8px;
  background: rgba(8, 10, 14, 0.94);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.profile-modal[hidden] {
  display: none;
}

.profile-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.profile-modal.open .profile-wizard {
  transform: translateY(0) scale(1);
}

.auth-content.profile-active > .auth-copy,
.auth-content.profile-active > .auth-form {
  visibility: hidden;
}

.profile-wizard__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-right: 34px;
}

.profile-wizard__header h3,
.profile-wizard__header p,
.profile-wizard__header span,
.profile-wizard__error {
  margin: 0;
}

.profile-wizard__header h3 {
  margin-top: 6px;
  color: var(--text);
  font-size: clamp(1.5rem, 4vw, 2.3rem);
  line-height: 1.05;
}

.profile-wizard__header > span {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 900;
}

.profile-progress {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.profile-progress span {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
  transition: width 180ms ease;
}

.profile-step {
  display: none;
  gap: 9px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  min-height: 180px;
  align-content: center;
}

.profile-step.active {
  display: grid;
  animation: fadeSlide 180ms ease both;
}

.profile-step > label,
.profile-step > legend {
  padding: 0;
  color: var(--text);
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  font-weight: 800;
}

.profile-step > small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.interest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.interest-grid label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(17, 19, 24, 0.72);
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1.35;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background 160ms ease;
}

.interest-grid label:has(input:checked) {
  border-color: rgba(35, 209, 139, 0.62);
  color: var(--text);
  background: rgba(35, 209, 139, 0.1);
}

.interest-grid input {
  flex: 0 0 auto;
  width: 17px;
  min-height: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.profile-wizard__error {
  min-height: 20px;
  color: #ff9d9d;
  font-size: 0.82rem;
  line-height: 1.4;
}

.profile-wizard__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.profile-wizard__actions button {
  min-width: 120px;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--text);
  background: rgba(17, 19, 24, 0.72);
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(35, 209, 139, 0.7);
}

.phone-field {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px;
}

.phone-input-wrap {
  position: relative;
  display: grid;
  gap: 10px;
}

.phone-callout {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  z-index: 8;
  width: min(420px, calc(100vw - 56px));
  padding: 14px 14px 12px;
  border: 1px solid rgba(35, 209, 139, 0.3);
  border-radius: 8px;
  background: rgba(17, 19, 24, 0.98);
  box-shadow: var(--shadow);
}

.phone-callout.hidden {
  display: none;
}

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

.phone-callout__header strong,
.phone-callout p {
  margin: 0;
}

.phone-callout__header strong {
  color: var(--text);
  font-size: 0.9rem;
}

.phone-callout p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.phone-callout__close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.phone-prefix {
  display: grid;
  place-items: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(17, 19, 24, 0.72);
  font-weight: 800;
}

.view {
  display: none;
  animation: fadeSlide 260ms ease both;
}

.view.active {
  display: grid;
  gap: 26px;
}

.intro-gate {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(5, 6, 9, 0.88);
  backdrop-filter: blur(10px);
}

.intro-gate.open {
  display: grid;
}

.intro-gate__panel {
  display: grid;
  gap: 18px;
  width: min(1120px, 100%);
  padding: clamp(16px, 2.6vw, 24px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(244, 176, 79, 0.12), rgba(35, 209, 139, 0.08)),
    rgba(17, 19, 24, 0.96);
  box-shadow: var(--shadow);
}

.intro-gate__copy h2 {
  margin: 8px 0 0;
  font-size: clamp(1.6rem, 3.4vw, 3.2rem);
  line-height: 1;
}

.intro-gate__copy p:not(.eyebrow),
.intro-gate__footer span {
  color: var(--muted);
  line-height: 1.6;
}

.intro-gate__media {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #000;
}

.intro-video {
  display: block;
  width: 100%;
  max-height: min(66vh, 760px);
  background: #000;
}

.intro-gate__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.intro-gate__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.intro-watch-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(244, 176, 79, 0.08), rgba(35, 209, 139, 0.05)),
    rgba(255, 255, 255, 0.035);
}

.intro-watch-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.intro-watch-header h3,
.intro-watch-status {
  margin: 0;
}

.intro-watch-header h3 {
  margin-top: 8px;
  font-size: 1.25rem;
  overflow-wrap: anywhere;
}

.intro-watch-media {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #000;
}

.intro-watch-status {
  color: var(--muted);
  line-height: 1.6;
}

#enterPlatformButton[disabled] {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.welcome-strip {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  padding: 16px 0 4px;
}

.access-grid {
  display: grid;
  gap: 12px;
}

.access-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.access-item:hover {
  border-color: rgba(35, 209, 139, 0.36);
  background: rgba(255, 255, 255, 0.065);
  transform: translateY(-1px);
}

.access-item p,
.access-item h3,
.access-item span,
.lesson-list h3,
.lesson-list p {
  margin: 0;
}

.access-item p {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.access-item h3 {
  margin-top: 4px;
  font-size: 1.16rem;
  overflow-wrap: anywhere;
}

.access-item div > span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.access-item button {
  padding: 0 15px;
  color: var(--text);
  background: var(--panel-strong);
  max-width: 100%;
  text-align: center;
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--locked);
  box-shadow: 0 0 0 5px rgba(115, 121, 135, 0.14);
}

.status-dot.unlocked {
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(35, 209, 139, 0.16);
}

.metrics-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.metrics-band div {
  padding: 22px;
  background: rgba(17, 19, 24, 0.72);
}

.metrics-band strong {
  display: block;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
}

.metrics-band span,
.lesson-list p,
.profile-list dt,
.profile-list dd {
  color: var(--muted);
}

.section-heading {
  padding-top: 18px;
}

.lesson-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.lesson-list article {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 22px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.lesson-list article > span {
  color: var(--accent);
  font-weight: 900;
}

.lesson-list h3 {
  font-size: 1.25rem;
}

.lesson-list p {
  margin-top: 8px;
  line-height: 1.55;
}

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

.course-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.72fr);
  gap: 20px;
  align-items: start;
}

.course-main,
.course-side,
.course-resources {
  display: grid;
  gap: 16px;
}

.book-hero {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.22fr);
  gap: 20px;
  align-items: stretch;
}

.book-cover {
  overflow: hidden;
  border: 1px solid rgba(244, 176, 79, 0.3);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

.book-intro,
.book-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(244, 176, 79, 0.1), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.035);
}

.book-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 4vw, 54px);
}

.book-intro h3,
.book-intro p,
.book-section h3,
.book-section p {
  margin: 0;
}

.book-intro h3 {
  margin-top: 12px;
  max-width: 760px;
  font-size: clamp(1.75rem, 3.4vw, 3.4rem);
  line-height: 1;
}

.book-intro > p:not(.eyebrow) {
  margin-top: 22px;
  max-width: 760px;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.75;
}

.book-purchase {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.book-purchase span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.book-purchase strong,
.book-final-action strong {
  color: var(--accent);
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
}

.book-buy-button {
  min-width: 210px;
  text-align: center;
}

.book-section {
  padding: clamp(22px, 4vw, 42px);
}

.book-section-heading {
  display: grid;
  gap: 10px;
  max-width: 780px;
}

.book-section-heading h3 {
  font-size: clamp(1.55rem, 3vw, 2.8rem);
  line-height: 1.05;
}

.book-topics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.book-topics article {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 24px;
  background: rgba(17, 19, 24, 0.96);
}

.book-topics span {
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 900;
}

.book-topics p {
  color: var(--text);
  line-height: 1.55;
}

.book-audience-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.book-audience-list li {
  position: relative;
  padding: 18px 18px 18px 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  line-height: 1.55;
  background: rgba(17, 19, 24, 0.55);
}

.book-audience-list li::before {
  position: absolute;
  top: 18px;
  left: 18px;
  color: var(--accent);
  content: "✓";
  font-weight: 900;
}

.book-final-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 30px;
  padding: 28px;
  border: 1px solid rgba(244, 176, 79, 0.3);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(244, 176, 79, 0.14), transparent 58%),
    rgba(17, 19, 24, 0.82);
}

.book-final-cta h3 {
  margin-top: 8px;
  max-width: 560px;
  font-size: clamp(1.35rem, 2.6vw, 2.25rem);
}

.book-final-action {
  display: flex;
  align-items: center;
  gap: 22px;
}

.alex-bio-block,
.alex-page-layout,
.alex-bio-sections {
  display: grid;
  gap: 16px;
}

.alex-bio-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 6px;
}

.alex-bio-block {
  align-content: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(244, 176, 79, 0.08), rgba(35, 209, 139, 0.05)),
    rgba(255, 255, 255, 0.035);
}

.alex-bio-copy h3,
.alex-bio-copy p {
  margin: 0;
}

.alex-bio-copy h3 {
  margin-top: 10px;
  font-size: 1.5rem;
}

.alex-bio-copy p:not(.eyebrow) {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.alex-bio-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-items: start;
  align-items: start;
  gap: 8px;
}

.alex-bio-gallery img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 96px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.alex-bio-gallery--top {
  margin-bottom: 4px;
}

.alex-page-layout {
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}

.alex-bio-gallery--page {
  position: relative;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-self: start;
  justify-items: stretch;
  width: 100%;
  max-width: 420px;
}

.alex-bio-gallery--page img {
  width: 100%;
  max-width: none;
  max-height: none;
  height: auto;
}

.alex-bio-gallery__stack {
  display: grid;
  gap: 8px;
}

.alex-bio-gallery__small {
  max-height: 112px;
}

.alex-bio-gallery__large {
  grid-column: 2;
  align-self: start;
  width: 100%;
  max-height: 232px;
}

.course-video-wrap,
.course-summary,
.course-poster,
.course-pay-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.course-video {
  display: block;
  width: 100%;
  max-height: 520px;
  background: #000;
}

.course-summary,
.course-pay-card {
  padding: 22px;
}

.course-summary h3,
.course-summary p,
.course-pay-card h3,
.course-pay-card p {
  margin: 0;
}

.course-summary,
.course-pay-card {
  gap: 12px;
}

.course-summary,
.course-pay-card,
.course-side {
  align-content: start;
}

.course-summary p:not(.eyebrow),
.course-pay-card p {
  color: var(--muted);
  line-height: 1.6;
}

.course-poster img {
  display: block;
  width: 100%;
  height: auto;
}

.course-pay-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.channel-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1fr);
  gap: 20px;
  align-items: stretch;
}

.channel-media,
.channel-detail-block,
.resource-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.channel-media {
  overflow: hidden;
  min-height: 320px;
}

.channel-media img,
.resource-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.channel-summary {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(140deg, rgba(244, 176, 79, 0.12), rgba(35, 209, 139, 0.07)),
    rgba(255, 255, 255, 0.035);
}

.channel-summary h3,
.channel-summary p,
.channel-detail-block h3,
.channel-detail-block p,
.feature-list,
.content-structure strong,
.content-structure span,
.resource-card strong,
.resource-card span {
  margin: 0;
}

.channel-summary h3,
.channel-detail-block h3 {
  font-size: 1.5rem;
  overflow-wrap: anywhere;
}

.channel-summary p,
.channel-detail-block p,
.feature-list,
.content-structure span,
.resource-card span,
.channel-auto-note {
  color: var(--muted);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.channel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 6px;
}

.channel-pay-button,
.channel-doc-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  text-align: center;
}

.channel-auto-note {
  font-size: 0.95rem;
}

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

.channel-detail-block {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.feature-list {
  display: grid;
  gap: 10px;
  padding-left: 18px;
}

.content-structure {
  display: grid;
  gap: 14px;
}

.content-structure div {
  display: grid;
  gap: 6px;
}

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

.resource-card {
  display: grid;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
}

.resource-card div {
  padding: 16px;
}

.resource-icon {
  display: grid;
  place-items: center;
  min-height: 160px;
  color: var(--accent);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.community-link {
  display: flex;
  flex-direction: column;
  justify-content: end;
  min-height: 240px;
  padding: 24px;
  border: 1px solid rgba(35, 209, 139, 0.24);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  background:
    linear-gradient(150deg, rgba(35, 209, 139, 0.18), rgba(244, 176, 79, 0.08)),
    var(--panel);
  transition:
    transform 180ms ease,
    border-color 180ms ease;
}

.community-link:hover {
  transform: translateY(-2px);
  border-color: rgba(35, 209, 139, 0.62);
}

.community-link.disabled {
  pointer-events: none;
  opacity: 0.54;
  filter: grayscale(0.55);
}

.community-link span {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.profile-list div {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  background: rgba(17, 19, 24, 0.72);
}

.profile-list dt,
.profile-list dd {
  margin: 0;
}

.profile-list dd {
  color: var(--text);
}

.profile-actions {
  display: flex;
  justify-content: flex-start;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.54);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-panel {
  position: relative;
  width: min(520px, 100%);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transform: translateY(14px) scale(0.98);
  transition: transform 180ms ease;
}

.modal.open .modal-panel {
  transform: translateY(0) scale(1);
}

.modal-panel h2 {
  margin: 10px 0;
  font-size: 2.1rem;
}

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

.close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-size: 1.5rem;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100vw - 44px));
  padding: 14px 16px;
  border-radius: 8px;
  color: #07120d;
  background: var(--accent);
  box-shadow: var(--shadow);
  animation: toastIn 240ms ease both;
  font-weight: 800;
}

body.menu-open .rail {
  transform: translateX(0);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (max-width: 1140px) {
  .course-layout,
  .channel-layout,
  .alex-page-layout,
  .channel-detail-grid,
  .resource-grid,
  .book-hero {
    grid-template-columns: 1fr;
  }

  .book-cover {
    max-width: 680px;
    margin-inline: auto;
  }

  .alex-bio-gallery--page {
    max-width: 520px;
  }

  .channel-media {
    min-height: auto;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 880px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .rail {
    position: fixed;
    z-index: 20;
    width: min(310px, 86vw);
    transform: translateX(-104%);
    transition: transform 220ms ease;
  }

  .icon-button {
    display: block;
    flex: 0 0 auto;
  }

  .workspace {
    padding-top: 16px;
    gap: 20px;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar h1 {
    font-size: clamp(1.55rem, 6.2vw, 2.8rem);
    line-height: 1.02;
  }

  .auth-panel,
  .community-split,
  .course-layout,
  .alex-page-layout,
  .channel-layout,
  .channel-detail-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: auto;
    aspect-ratio: 4 / 3;
  }

  .alex-bio-gallery--page {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 420px;
  }

  .welcome-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .access-item {
    grid-template-columns: 12px minmax(0, 1fr);
    align-items: start;
  }

  .access-item button {
    grid-column: 2;
    width: 100%;
  }

  .intro-gate__footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .intro-gate__actions {
    justify-content: flex-start;
  }

  .metrics-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .workspace {
    padding-inline: 14px;
  }

  .notification-prompt {
    right: 14px;
    bottom: 14px;
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 16px;
  }

  .notification-prompt__icon {
    width: 36px;
    height: 36px;
  }

  .notification-prompt > .primary-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .topbar {
    gap: 12px;
    flex-wrap: wrap;
  }

  .ghost-button {
    display: none;
  }

  .topbar > div {
    min-width: 0;
  }

  .auth-panel {
    padding: 12px;
  }

  .auth-copy h2,
  .welcome-strip h2,
  .section-heading h2 {
    font-size: clamp(1.35rem, 8vw, 2rem);
    line-height: 1.08;
  }

  .auth-visual {
    aspect-ratio: 3 / 4;
  }

  .phone-field {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .phone-prefix {
    font-size: 0.9rem;
  }

  .intro-video {
    max-height: 52vh;
  }

  .phone-callout {
    width: min(100%, calc(100vw - 44px));
  }

  .profile-wizard {
    width: calc(100% - 12px);
    max-height: calc(100% - 12px);
    padding: 22px 16px 16px;
  }

  .profile-modal {
    padding: 6px;
  }

  .profile-wizard__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

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

  .profile-wizard__actions {
    display: flex;
    flex-direction: column-reverse;
  }

  .profile-wizard__actions button {
    width: 100%;
  }

  .access-item {
    grid-template-columns: 12px minmax(0, 1fr);
    padding: 14px;
  }

  .access-item button {
    grid-column: 2;
    width: 100%;
    min-height: 46px;
  }

  .lesson-list article,
  .profile-list div {
    grid-template-columns: 1fr;
  }

  .lesson-list article {
    gap: 10px;
    padding: 16px 0;
  }

  .course-summary,
  .course-pay-card,
  .channel-summary,
  .channel-detail-block,
  .alex-bio-block,
  .intro-watch-card {
    padding: 16px;
  }

  .course-summary h3,
  .channel-summary h3,
  .channel-detail-block h3,
  .alex-bio-copy h3,
  .intro-watch-header h3 {
    font-size: 1.2rem;
  }

  .intro-watch-header {
    align-items: stretch;
    grid-template-columns: 1fr;
    display: grid;
  }

  .channel-actions,
  .alex-bio-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .channel-actions a,
  .alex-bio-actions button {
    width: 100%;
  }

  .book-topics,
  .book-audience-list {
    grid-template-columns: 1fr;
  }

  .book-purchase,
  .book-final-cta,
  .book-final-action {
    align-items: stretch;
    flex-direction: column;
  }

  .book-buy-button {
    width: 100%;
  }

  .book-topics article {
    grid-template-columns: 42px minmax(0, 1fr);
    padding: 18px;
  }

  .book-final-cta {
    padding: 20px;
  }

  .modal-panel {
    padding: 20px;
    max-height: calc(100vh - 26px);
    overflow-y: auto;
  }

  .modal-panel h2 {
    font-size: 1.65rem;
  }

  .close-button {
    top: 10px;
    right: 10px;
  }

  .intro-gate {
    padding: 10px;
  }

  .intro-gate__panel {
    max-height: calc(100vh - 20px);
    overflow-y: auto;
  }
}
