:root {
  --bg: #e8e1d6;
  --surface: #f8f4ec;
  --surface-strong: #ede5d8;
  --surface-muted: #ddd3c3;
  --ink: #1f1b17;
  --muted: #5f574f;
  --line: #c9beae;
  --band: #211d1a;
  --band-text: #f8f3ea;
  --accent: #8a4d2f;
  --shadow: 0 6px 18px rgba(31, 27, 23, 0.08);
  --radius: 10px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

body.auth-pending {
  visibility: hidden;
}

a {
  color: inherit;
}

button,
textarea,
iframe {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 20px 0 56px;
}

.session-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 12px 16px;
  background: rgba(248, 244, 236, 0.84);
  border: 1px solid var(--line);
}

.session-strip__text {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.session-strip__text strong {
  color: var(--ink);
  font-weight: 600;
}

.hero {
  background: var(--band);
  color: var(--band-text);
  border: 1px solid rgba(248, 243, 234, 0.12);
}

.hero__inner {
  max-width: 880px;
  padding: 36px 24px 40px;
}

.hero__author {
  margin: 0 0 18px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(248, 243, 234, 0.72);
}

.hero__title {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.4rem, 4vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero__lead {
  margin: 22px 0 0;
  max-width: 780px;
  font-size: clamp(1.05rem, 1.8vw, 1.4rem);
  line-height: 1.5;
  color: rgba(248, 243, 234, 0.78);
}

.course-layout {
  display: grid;
  gap: 24px;
  margin-top: 24px;
}

.module__band {
  background: var(--band);
  color: var(--band-text);
  border: 1px solid rgba(33, 29, 26, 0.88);
  padding: 22px 28px;
}

.module__band h2,
.prompt-panel__card h2,
.access-card h3,
.text-note h3 {
  margin: 0;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.module__body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 0;
  padding: 26px 28px 34px;
}

.module__body--stack {
  display: grid;
  gap: 24px;
}

.video-card {
  padding: 14px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.video-card iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 260px;
  border: 0;
  background: #111;
}

.module__actions {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.button--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.button--ghost:hover,
.button--ghost:focus-visible {
  background: rgba(31, 27, 23, 0.06);
}

.button--solid {
  background: var(--ink);
  color: var(--band-text);
}

.button--solid:hover,
.button--solid:focus-visible {
  background: #342d28;
}

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

.button--secondary:hover,
.button--secondary:focus-visible {
  background: #efe8db;
}

.button--wide {
  width: 100%;
}

.text-note {
  margin-top: 22px;
  padding: 22px 24px;
  border: 1px solid var(--line);
}

.text-note p {
  margin: 0;
  max-width: 760px;
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--ink);
}

.text-note--plain {
  background: #fbf8f1;
  border-left: 3px solid var(--ink);
}

.text-note--plain p {
  font-style: italic;
}

.text-note--stone {
  background: var(--surface-muted);
}

.text-note--stone h3 {
  margin-bottom: 14px;
  font-size: 1.45rem;
}

.prompt-panel__card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 24px;
  box-shadow: var(--shadow);
}

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

.prompt-panel__hint {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

#ceoPrompt {
  width: 100%;
  min-height: 560px;
  resize: vertical;
  border: 1px solid var(--line);
  background: #f1ece4;
  color: var(--ink);
  padding: 18px;
  border-radius: var(--radius);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92rem;
  line-height: 1.62;
}

#ceoPrompt:focus-visible,
.button:focus-visible,
.icon-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.access-card {
  margin-top: 18px;
  border: 1px solid var(--line);
  padding: 18px;
  background: #fcfaf5;
}

.access-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.access-card__body {
  border: 1px solid var(--line);
  background: #f1ece4;
  padding: 16px 18px;
}

.access-card__body p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
}

.access-card__body p + p {
  margin-top: 2px;
}

.access-card__body span {
  color: var(--muted);
}

.access-card__body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.icon-button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f1e8;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: #efe8db;
}

.icon-button__label--hide {
  display: none;
}

.icon-button[data-shown="true"] .icon-button__label--show {
  display: none;
}

.icon-button[data-shown="true"] .icon-button__label--hide {
  display: inline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(100%, 460px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 28px;
}

.auth-card h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.auth-copy {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.auth-form {
  margin-top: 24px;
  display: grid;
  gap: 18px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfaf5;
  color: var(--ink);
}

.field input::placeholder {
  color: #81786e;
}

.field input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.auth-error {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(138, 77, 47, 0.24);
  background: rgba(138, 77, 47, 0.08);
  color: #6c2f18;
  line-height: 1.45;
}

.auth-form .button {
  margin-top: 6px;
}

@media (max-width: 820px) {
  .shell {
    width: min(100vw - 24px, 1180px);
    padding-top: 12px;
  }

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

  .hero__inner {
    padding: 28px 18px 30px;
  }

  .module__band,
  .module__body,
  .prompt-panel__card,
  .access-card {
    padding-left: 18px;
    padding-right: 18px;
  }

  .prompt-panel__head,
  .access-card__head {
    flex-direction: column;
  }

  .module__actions {
    justify-content: stretch;
  }

  .button,
  .icon-button {
    width: 100%;
  }

  .session-strip .button {
    width: auto;
  }

  #ceoPrompt {
    min-height: 480px;
  }
}

@media (max-width: 560px) {
  .module__band {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .module__body {
    padding-top: 18px;
    padding-bottom: 22px;
  }

  .video-card {
    padding: 10px;
  }

  .video-card iframe {
    min-height: 200px;
  }

  .text-note,
  .prompt-panel__card {
    padding: 16px;
  }

  .auth-card {
    padding: 20px;
  }

  #ceoPrompt {
    padding: 14px;
    font-size: 0.88rem;
  }
}
