:root {
  color-scheme: light;
  --ink: #18242a;
  --muted: #5d6c72;
  --line: #d9e2e2;
  --paper: #fbfbf7;
  --soft: #edf4ff;
  --accent: #2563c7;
  --accent-strong: #174fae;
  --warm: #f4c665;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(25, 39, 42, 0.12);
}

* {
  box-sizing: border-box;
}

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

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 251, 247, 0.92);
  backdrop-filter: blur(14px);
}

.brand,
.topbar nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar nav {
  gap: 18px;
}

.brand {
  font-weight: 800;
  text-decoration: none;
}

.mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
}

.topbar nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.admin-nav .active {
  color: var(--ink);
}

button[type="button"].nav-button,
button[type="button"].icon-text-button,
button[type="button"].inline-text-button {
  min-height: auto;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

button[type="button"].nav-button:hover,
button[type="button"].nav-button:focus-visible,
button[type="button"].icon-text-button:hover,
button[type="button"].icon-text-button:focus-visible,
button[type="button"].inline-text-button:hover,
button[type="button"].inline-text-button:focus-visible {
  color: var(--accent-strong);
  background: transparent;
}

.shell,
.admin-shell,
.lesson-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 64px;
}

.home-shell {
  width: min(1220px, calc(100% - 32px));
}

.platform-hero {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  padding: 48px;
  border-radius: 8px;
  background: #172737;
  color: var(--white);
  box-shadow: var(--shadow);
}

.platform-hero::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 28%;
  background: #2563c7;
  clip-path: polygon(34% 0, 100% 0, 100% 100%, 0 100%);
  opacity: 0.88;
}

.platform-hero > * {
  position: relative;
  z-index: 1;
}

.platform-hero h1 {
  max-width: 980px;
  margin-bottom: 22px;
  font-size: clamp(46px, 7vw, 86px);
  line-height: 0.98;
}

.platform-hero > p:last-child {
  max-width: 820px;
  margin: 0;
  color: #dbe7f5;
  font-size: 19px;
}

.hero-kicker {
  margin: 0 0 18px;
  color: #f4c665;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.catalog-section {
  padding-top: 42px;
}

.catalog-heading h2 {
  font-size: 34px;
}

.vip-section {
  padding-top: 0;
}

.vip-grid {
  grid-template-columns: minmax(280px, 390px);
}

.course-card {
  display: grid;
  min-height: 270px;
  padding: 26px;
  border: 1px solid #e4e9ec;
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.course-card h2 {
  margin-top: 22px;
  font-size: 28px;
}

.course-card p:not(.course-type) {
  margin-bottom: 24px;
}

.course-card-footer {
  display: grid;
  align-self: end;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.compact-catalog-section {
  padding-top: 0;
}

.course-type {
  display: inline-block;
  width: fit-content;
  margin: 0;
  padding: 7px 10px;
  border-radius: 999px;
  background: #edf4ff;
  color: #1d63c8;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.course-button {
  align-self: end;
  width: 100%;
  border-radius: 8px;
  background: var(--accent);
  color: var(--white);
  font-size: 15px;
  font-weight: 800;
  padding: 13px 16px;
  text-align: center;
  text-decoration: none;
}

.course-button:hover,
.course-button:focus-visible {
  background: var(--accent-strong);
}

.library-heading {
  max-width: 720px;
  margin-bottom: 22px;
}

.library-heading h2 {
  margin-bottom: 8px;
  font-size: clamp(32px, 5vw, 52px);
}

.library-heading p:last-child {
  margin: 0;
}

.intro {
  max-width: 720px;
  margin-bottom: 28px;
}

.intro.compact {
  margin-bottom: 20px;
}

.eyebrow,
.meta {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(36px, 7vw, 72px);
  line-height: 0.98;
}

.compact h1,
.lesson-heading h1 {
  font-size: clamp(32px, 5vw, 54px);
}

h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

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

.toolbar {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 260px);
  gap: 14px;
  margin-bottom: 18px;
}

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

fieldset {
  min-width: 0;
}

.focus-fieldset {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.focus-fieldset legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

.checkbox-option {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}

.checkbox-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

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

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(15, 118, 110, 0.18);
  border-color: var(--accent);
}

.status {
  min-height: 28px;
  color: var(--muted);
  font-weight: 700;
}

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

.lesson-card,
.panel,
.preview-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.lesson-card {
  display: grid;
  min-height: 230px;
  padding: 22px;
}

.lesson-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.focus-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.focus-list span {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
}

.card-footer,
.actions,
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-footer {
  align-self: end;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.button,
button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  padding: 11px 14px;
  text-decoration: none;
}

button[type="button"] {
  background: var(--ink);
}

button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(360px, 440px) 1fr;
  gap: 18px;
  align-items: start;
}

.editor-shell {
  width: min(1120px, calc(100% - 32px));
}

.editor-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  max-width: 920px;
  margin-right: auto;
  margin-left: auto;
}

.secondary-link {
  flex: 0 0 auto;
  background: var(--ink);
}

.editor-grid {
  display: block;
  width: min(920px, 100%);
  margin: 0 auto;
}

.editor-fields {
  display: grid;
  gap: 16px;
}

.form-section {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.form-section > legend {
  padding: 0 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.form-section > legend span {
  display: inline-grid;
  width: 24px;
  height: 24px;
  margin-right: 7px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font-size: 12px;
}

.focus-category {
  display: grid;
  gap: 9px;
}

.focus-category + .focus-category {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.focus-category h3 {
  margin: 0;
  font-size: 14px;
}

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

.file-picker input {
  padding: 9px;
  cursor: pointer;
}

.file-picker span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

button.preview-button,
.editor-actions button[data-status="published"],
.login-form > button {
  background: var(--accent);
}

button.preview-button:hover,
button.preview-button:focus-visible,
.editor-actions button[data-status="published"]:hover,
.editor-actions button[data-status="published"]:focus-visible,
.login-form > button:hover,
.login-form > button:focus-visible {
  background: var(--accent-strong);
}

.action-spacer {
  flex: 1 1 auto;
}

.editor-preview {
  position: sticky;
  top: 90px;
  min-height: 720px;
  align-self: start;
  transition: min-height 160ms ease;
}

.preview-dialog {
  width: min(1420px, calc(100vw - 32px));
  height: min(900px, calc(100vh - 32px));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 28px 80px rgba(23, 36, 42, 0.28);
}

.preview-dialog::backdrop {
  background: rgba(23, 36, 42, 0.7);
  backdrop-filter: blur(4px);
}

.preview-dialog-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
}

.preview-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.preview-dialog-header h2,
.preview-dialog-header p {
  margin: 0;
}

.preview-dialog-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.preview-dialog-actions > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.preview-dialog iframe {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.editor-preview.collapsed {
  min-height: 54px;
}

.editor-preview.collapsed iframe {
  display: none;
}

.preview-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.preview-actions > span {
  color: var(--muted);
}

.panel {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.message {
  min-height: 28px;
  margin: 0;
  font-weight: 800;
}

.saved-lessons {
  margin-top: 42px;
}

.catalog-shell {
  width: min(1180px, calc(100% - 32px));
}

.catalog-admin-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.catalog-form {
  position: sticky;
  top: 90px;
}

.catalog-list-panel {
  min-width: 0;
}

.compact-filter {
  width: min(190px, 44vw);
}

.catalog-list {
  display: grid;
  gap: 12px;
}

.catalog-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 126px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.catalog-item.inactive {
  opacity: 0.72;
}

.catalog-item h3,
.catalog-item p {
  margin: 8px 0 0;
}

.login-page {
  min-height: 100vh;
  background: #f4f7f6;
}

.login-shell {
  display: grid;
  min-height: calc(100vh - 68px);
  padding: 32px 16px;
  place-items: center;
}

.login-panel {
  width: min(440px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-top: 6px solid var(--accent);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.login-heading h1 {
  font-size: 40px;
  line-height: 1.05;
}

.login-form {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.login-form > button {
  width: 100%;
  min-height: 48px;
}

.password-control {
  position: relative;
  display: block;
}

.password-control input {
  padding-right: 78px;
}

.password-control .inline-text-button {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
}

.login-back {
  margin: 18px 0 0;
}

.section-heading,
.saved-lesson {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h2,
.saved-lesson h3,
.saved-lesson p {
  margin: 0;
}

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

.saved-lesson {
  min-height: 142px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.saved-lesson h3 {
  margin-top: 10px;
}

.saved-lesson-meta {
  margin-top: 6px !important;
  font-size: 12px;
}

.saved-lesson .focus-list {
  margin-top: 10px;
}

.saved-lesson-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

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

button.danger-button {
  background: var(--warm);
  color: var(--ink);
}

button.danger-button:hover,
button.danger-button:focus-visible {
  background: #e3ad3f;
}

.status-badge {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-badge.draft {
  background: #fff5d6;
  color: #70500c;
}

.preview-panel {
  overflow: hidden;
}

.preview-header {
  min-height: 54px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

iframe {
  display: block;
  width: 100%;
  border: 0;
  background: var(--white);
}

.preview-panel iframe {
  min-height: 680px;
}

.lesson-shell {
  width: min(1280px, calc(100% - 24px));
}

.lesson-heading {
  min-width: 0;
}

.lesson-heading h1,
.lesson-heading p:last-child {
  margin-bottom: 0;
}

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

.fullscreen-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  background: var(--ink);
}

.fullscreen-button:hover,
.fullscreen-button:focus-visible {
  background: var(--accent-strong);
}

.fullscreen-button:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.24);
  outline-offset: 3px;
}

.fullscreen-icon {
  font-size: 21px;
  line-height: 1;
}

.lesson-viewer {
  background: var(--white);
}

.fullscreen-toolbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.lesson-viewer:fullscreen,
.lesson-fullscreen-fallback .lesson-viewer {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  background: var(--white);
}

.lesson-viewer:fullscreen .fullscreen-toolbar,
.lesson-fullscreen-fallback .fullscreen-toolbar {
  display: flex;
}

.lesson-viewer:fullscreen #lessonFrame,
.lesson-fullscreen-fallback #lessonFrame {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.lesson-fullscreen-fallback {
  overflow: hidden;
}

.lesson-fullscreen-fallback .lesson-viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
}

#lessonFrame {
  min-height: 76vh;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.library-shell {
  width: min(1180px, calc(100% - 32px));
}

.library-hero {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  padding: 38px;
  border-radius: 8px;
  background: #172737;
  color: var(--white);
  box-shadow: var(--shadow);
}

.library-hero::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 27%;
  background: #2459a5;
  clip-path: polygon(34% 0, 100% 0, 100% 100%, 0 100%);
}

.library-hero > * {
  position: relative;
  z-index: 1;
}

.library-hero h1 {
  max-width: 920px;
}

.library-hero .eyebrow {
  color: #f4c665;
}

.library-hero > p:last-child {
  max-width: 720px;
  margin-bottom: 0;
  color: #dbe7f5;
  font-size: 17px;
}

.back-link {
  display: inline-block;
  margin-bottom: 26px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.library-hero .back-link {
  color: #f4c665;
}

.back-link:hover,
.back-link:focus-visible {
  text-decoration: underline;
}

.library-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(150px, 220px) minmax(190px, 260px);
  gap: 14px;
  padding: 28px 0 18px;
}

.dated-lessons {
  display: grid;
  gap: 36px;
  margin-top: 18px;
}

.date-group {
  display: grid;
  gap: 14px;
}

.date-group > h2 {
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 20px;
}

.library-lesson-card {
  min-height: 250px;
}

@media (max-width: 860px) {
  .topbar {
    padding: 0 16px;
  }

  .toolbar,
  .library-toolbar,
  .admin-grid,
  .catalog-admin-grid,
  .course-grid,
  .lesson-grid,
  .saved-lessons-grid {
    grid-template-columns: 1fr;
  }

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

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

  .saved-lesson {
    align-items: stretch;
    flex-direction: column;
  }

  .saved-lesson-actions {
    justify-content: flex-start;
  }

  h1 {
    font-size: 42px;
  }

  .platform-hero {
    min-height: auto;
    padding: 34px 26px;
  }

  .platform-hero h1 {
    font-size: 46px;
  }

  .platform-hero::after {
    width: 36%;
    opacity: 0.55;
  }

  .topbar nav a[href="#courses"] {
    display: none;
  }

  .lesson-controls {
    align-items: stretch;
    flex-direction: column;
  }

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

  .editor-preview,
  .catalog-form {
    position: static;
  }

  .editor-preview {
    min-height: 540px;
  }

  .preview-dialog {
    width: calc(100vw - 16px);
    height: calc(100vh - 16px);
  }

  .preview-dialog-header {
    align-items: stretch;
    flex-direction: column;
  }

  .preview-dialog-actions {
    flex-wrap: wrap;
  }

  .library-hero {
    min-height: 230px;
    padding: 30px 24px;
  }

  .library-hero::after {
    width: 34%;
    opacity: 0.72;
  }

  .catalog-item {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-topbar {
    align-items: flex-start;
    min-height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .admin-nav {
    max-width: 60vw;
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 8px !important;
  }

  .fullscreen-button {
    align-self: flex-start;
  }
}

@media (max-width: 520px) {
  .focus-options {
    grid-template-columns: 1fr;
  }

  .form-section,
  .login-panel {
    padding: 18px;
  }

  .login-heading h1 {
    font-size: 34px;
  }

  .editor-actions button {
    flex: 1 1 100%;
  }
}

/* DDELT brand system - 1.1.0 */
:root {
  --ink: #07364f;
  --muted: #5d7480;
  --line: #d6e6eb;
  --paper: #f6fafb;
  --soft: #e8f5fa;
  --accent: #1f9fbd;
  --accent-strong: #087b98;
  --warm: #ffba19;
  --orange: #ff8619;
  --sky: #8bc9e5;
  --navy: #07364f;
  --navy-deep: #04283b;
  --white: #ffffff;
  --shadow: 0 14px 36px rgba(7, 54, 79, 0.1);
  --shadow-strong: 0 22px 56px rgba(7, 54, 79, 0.16);
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", Avenir, Montserrat, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

.topbar {
  min-height: 92px;
  padding: 8px max(24px, calc((100vw - 1320px) / 2));
  border-bottom: 4px solid var(--warm);
  background: var(--navy);
  box-shadow: 0 8px 26px rgba(4, 40, 59, 0.14);
  backdrop-filter: none;
}

.brand {
  min-width: 0;
  gap: 18px;
  color: var(--white);
}

.brand-logo {
  display: block;
  width: 138px;
  height: auto;
  flex: 0 0 auto;
}

.brand-product {
  max-width: 145px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
}

.mark {
  display: none;
}

.topbar nav {
  gap: 24px;
}

.topbar nav a,
.topbar button.nav-button {
  position: relative;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 800;
}

.topbar nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -9px;
  left: 0;
  height: 2px;
  background: transparent;
}

.topbar nav a:hover,
.topbar nav a:focus-visible,
.topbar button.nav-button:hover,
.topbar button.nav-button:focus-visible,
.admin-nav .active {
  color: var(--warm);
}

.topbar nav a:hover::after,
.topbar nav a:focus-visible::after,
.admin-nav .active::after {
  background: var(--warm);
}

button[type="button"].nav-button,
button[type="button"].nav-button:hover,
button[type="button"].nav-button:focus-visible {
  background: transparent;
}

.shell,
.admin-shell,
.lesson-shell {
  width: min(1240px, calc(100% - 48px));
  padding: 44px 0 72px;
}

.home-shell {
  width: min(1320px, calc(100% - 48px));
}

.platform-hero,
.library-hero {
  position: relative;
  overflow: hidden;
  min-height: 270px;
  padding: 46px 48px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow-strong);
}

.platform-hero::before,
.library-hero::before {
  content: "";
  position: absolute;
  top: 28px;
  right: 42px;
  width: 330px;
  height: 190px;
  background: url("/assets/ddelt-logo-white.png") center / contain no-repeat;
  opacity: 0.13;
}

.platform-hero::after,
.library-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  width: 100%;
  height: 7px;
  background: var(--warm);
  clip-path: none;
  opacity: 1;
}

.platform-hero > *,
.library-hero > * {
  position: relative;
  z-index: 1;
}

.platform-hero h1 {
  max-width: 760px;
  margin: 0 0 20px;
  font-size: 58px;
  line-height: 1.02;
}

.platform-hero > p:last-child {
  max-width: 660px;
  color: #d9edf5;
  font-size: 18px;
  line-height: 1.55;
}

.hero-kicker,
.eyebrow,
.meta,
.course-type {
  letter-spacing: 0;
}

.hero-kicker,
.library-hero .eyebrow {
  color: var(--warm);
}

.catalog-section {
  padding-top: 48px;
}

.compact-catalog-section {
  padding-top: 18px;
}

.catalog-heading,
.library-heading {
  position: relative;
  padding-left: 18px;
}

.catalog-heading::before,
.library-heading::before {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 0;
  width: 5px;
  border-radius: 999px;
  background: var(--warm);
}

.catalog-heading h2,
.library-heading h2 {
  color: var(--navy);
  font-size: 34px;
}

.course-grid {
  gap: 20px;
  margin-top: 20px;
}

.course-card {
  position: relative;
  min-height: 258px;
  padding: 26px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--accent);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.course-card:nth-child(3n + 2) {
  border-top-color: var(--warm);
}

.course-card:nth-child(3n) {
  border-top-color: var(--orange);
}

.course-card:hover {
  transform: translateY(-3px);
  border-color: var(--sky);
  box-shadow: var(--shadow-strong);
}

.course-card h2 {
  margin: 18px 0 8px;
  color: var(--navy);
  font-size: 27px;
  line-height: 1.16;
}

.course-card p:not(.course-type) {
  margin-top: 0;
  color: var(--muted);
}

.course-type,
.status-badge,
.focus-list span {
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent-strong);
}

.course-button {
  border-radius: 8px;
  background: var(--navy);
}

.course-button:hover,
.course-button:focus-visible {
  background: var(--accent-strong);
}

.library-heading {
  max-width: none;
  margin-top: 64px;
}

.toolbar,
.library-toolbar {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.toolbar {
  margin: 20px 0 18px;
}

.library-toolbar {
  margin-top: 22px;
}

label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  min-height: 46px;
  border-color: #c8dce3;
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
}

textarea {
  min-height: auto;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--sky);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(31, 159, 189, 0.18);
}

.lesson-grid {
  gap: 18px;
}

.lesson-card {
  min-height: 242px;
  padding: 22px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--warm);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.lesson-card h2,
.lesson-card h3 {
  color: var(--navy);
  line-height: 1.2;
}

.button,
button {
  min-height: 44px;
  border-radius: 8px;
  background: var(--accent);
  box-shadow: none;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.button:hover,
.button:focus-visible,
button:hover,
button:focus-visible {
  background: var(--accent-strong);
}

.button:active,
button:active {
  transform: translateY(1px);
}

button.secondary-button,
.secondary-link,
.fullscreen-button {
  background: var(--navy);
  color: var(--white);
}

button.secondary-button:hover,
button.secondary-button:focus-visible,
.secondary-link:hover,
.secondary-link:focus-visible,
.fullscreen-button:hover,
.fullscreen-button:focus-visible {
  background: var(--navy-deep);
}

button.danger-button {
  background: var(--warm);
  color: var(--navy-deep);
}

button.danger-button:hover,
button.danger-button:focus-visible {
  background: var(--orange);
  color: var(--navy-deep);
}

.status {
  margin: 18px 0;
  color: var(--muted);
}

.intro.compact {
  max-width: none;
  margin-bottom: 28px;
  padding: 28px 30px;
  border-bottom: 6px solid var(--warm);
  border-radius: 8px;
  background: var(--navy);
  box-shadow: var(--shadow);
}

.intro.compact h1,
.intro.compact h2 {
  color: var(--white);
}

.intro.compact h1 {
  font-size: 42px;
  line-height: 1.05;
}

.intro.compact p:not(.eyebrow) {
  max-width: 760px;
  margin-bottom: 0;
  color: #d9edf5;
}

.intro.compact .eyebrow {
  color: var(--warm);
}

.editor-intro {
  max-width: 1060px;
}

.editor-intro .secondary-link {
  background: var(--warm);
  color: var(--navy-deep);
}

.editor-intro .secondary-link:hover,
.editor-intro .secondary-link:focus-visible {
  background: var(--orange);
}

.editor-grid {
  width: min(1060px, 100%);
}

.editor-fields {
  gap: 22px;
}

.form-section,
.panel,
.catalog-list-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.form-section {
  gap: 18px;
  padding: 26px;
}

.form-section > legend {
  padding: 0 10px;
  color: var(--navy);
  font-size: 15px;
}

.form-section > legend span {
  width: 28px;
  height: 28px;
  background: var(--warm);
  color: var(--navy-deep);
}

.focus-category + .focus-category {
  border-color: var(--line);
}

.focus-category h3 {
  color: var(--navy);
}

.checkbox-option {
  min-height: 46px;
  border-color: var(--line);
  background: var(--paper);
}

.checkbox-option:hover {
  border-color: var(--sky);
  background: var(--soft);
}

.checkbox-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--soft);
  color: var(--accent-strong);
}

.editor-actions {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

button.preview-button,
.editor-actions button[data-status="published"],
.login-form > button {
  background: var(--accent);
}

button.preview-button:hover,
button.preview-button:focus-visible,
.editor-actions button[data-status="published"]:hover,
.editor-actions button[data-status="published"]:focus-visible,
.login-form > button:hover,
.login-form > button:focus-visible {
  background: var(--accent-strong);
}

.saved-lessons {
  margin-top: 58px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 16px;
}

.section-heading h2 {
  color: var(--navy);
  font-size: 30px;
}

.saved-lessons-grid {
  gap: 16px;
}

.saved-lesson,
.catalog-item {
  min-height: 168px;
  padding: 22px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.saved-lesson h3,
.catalog-item h3 {
  color: var(--navy);
  font-size: 20px;
}

.saved-lesson-actions .button,
.saved-lesson-actions button {
  min-height: 40px;
  padding: 9px 14px;
}

.catalog-admin-grid {
  gap: 24px;
}

.catalog-form {
  top: 114px;
}

.catalog-list-panel {
  min-width: 0;
  padding: 24px;
}

.preview-dialog {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  box-shadow: 0 30px 90px rgba(4, 40, 59, 0.38);
}

.preview-dialog::backdrop {
  background: rgba(4, 40, 59, 0.76);
}

.preview-dialog-header {
  border-bottom: 5px solid var(--warm);
  background: var(--navy);
}

.preview-dialog-header h2,
.preview-dialog-header .eyebrow,
.preview-dialog-actions > span {
  color: var(--white);
}

.preview-dialog-header .eyebrow {
  color: var(--warm);
}

.login-page {
  background: #eaf5f8;
}

.login-shell {
  min-height: calc(100vh - 92px);
  padding: 48px 20px;
}

.login-panel {
  width: min(470px, 100%);
  padding: 38px;
  border: 1px solid var(--line);
  border-top: 7px solid var(--warm);
  border-radius: 8px;
  box-shadow: var(--shadow-strong);
}

.login-heading h1 {
  color: var(--navy);
  font-size: 38px;
}

.login-heading .eyebrow {
  color: var(--accent-strong);
}

.login-form > button {
  min-height: 50px;
}

.library-hero {
  min-height: 250px;
}

.library-hero h1 {
  max-width: 800px;
  color: var(--white);
  font-size: 48px;
  line-height: 1.05;
}

.library-hero > p:last-child {
  color: #d9edf5;
}

.library-hero .back-link {
  color: var(--warm);
}

.dated-lessons {
  gap: 42px;
}

.date-group > h2 {
  padding-bottom: 12px;
  border-bottom: 3px solid var(--sky);
  color: var(--navy);
  font-size: 22px;
}

.lesson-controls {
  align-items: center;
  padding: 26px 28px;
  border-bottom: 6px solid var(--warm);
  border-radius: 8px;
  background: var(--navy);
  box-shadow: var(--shadow);
}

.lesson-heading .eyebrow,
.lesson-heading h1,
.lesson-heading p:last-child {
  color: var(--white);
}

.lesson-heading .eyebrow {
  color: var(--warm);
}

.lesson-heading h1 {
  font-size: 42px;
  line-height: 1.08;
}

.lesson-viewer,
#lessonFrame {
  border-radius: 8px;
}

#lessonFrame {
  border: 1px solid var(--line);
  box-shadow: var(--shadow-strong);
}

.fullscreen-toolbar {
  border-bottom: 4px solid var(--warm);
  background: var(--navy);
  color: var(--white);
}

@media (max-width: 960px) {
  .course-grid,
  .lesson-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-admin-grid {
    grid-template-columns: 1fr;
  }

  .catalog-form {
    position: static;
  }

  .brand-product {
    display: none;
  }

  .platform-hero::before,
  .library-hero::before {
    right: 24px;
    width: 260px;
  }
}

@media (max-width: 720px) {
  .topbar,
  .admin-topbar {
    align-items: center;
    min-height: 82px;
    padding: 8px 16px;
  }

  .brand-logo {
    width: 108px;
  }

  .topbar nav,
  .admin-nav {
    max-width: 62vw;
    gap: 13px;
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 6px;
  }

  .topbar nav a,
  .topbar button.nav-button {
    font-size: 11px;
  }

  .topbar nav a::after {
    bottom: -4px;
  }

  .shell,
  .admin-shell,
  .lesson-shell,
  .home-shell {
    width: min(100% - 28px, 1240px);
    padding: 28px 0 52px;
  }

  .platform-hero,
  .library-hero {
    min-height: 232px;
    padding: 30px 24px;
  }

  .platform-hero::before,
  .library-hero::before {
    top: 38px;
    right: -20px;
    width: 190px;
    opacity: 0.08;
  }

  .platform-hero h1 {
    max-width: 440px;
    font-size: 40px;
  }

  .platform-hero > p:last-child {
    font-size: 16px;
  }

  .course-grid,
  .lesson-grid,
  .saved-lessons-grid,
  .toolbar,
  .library-toolbar {
    grid-template-columns: 1fr;
  }

  .catalog-section {
    padding-top: 36px;
  }

  .course-card {
    min-height: 230px;
  }

  .library-heading {
    margin-top: 48px;
  }

  .intro.compact,
  .lesson-controls {
    padding: 24px;
  }

  .editor-intro,
  .lesson-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .form-section,
  .catalog-list-panel,
  .login-panel {
    padding: 22px;
  }

  .library-hero h1,
  .intro.compact h1,
  .lesson-heading h1 {
    font-size: 36px;
  }

  .saved-lesson,
  .catalog-item {
    align-items: stretch;
    flex-direction: column;
  }

  .saved-lesson-actions {
    justify-content: flex-start;
  }

  .preview-dialog-header {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .topbar nav a[href="#aulas"],
  .topbar nav a[href="/admin/#salvas"] {
    display: none;
  }

  .platform-hero h1 {
    font-size: 34px;
  }

  .catalog-heading h2,
  .library-heading h2,
  .section-heading h2 {
    font-size: 28px;
  }

  .editor-actions {
    padding: 14px;
  }

  .editor-actions button {
    flex: 1 1 100%;
  }

  .login-heading h1 {
    font-size: 32px;
  }
}
