/* SentariAI — single page site
   Palette: Blue, Red, Grey/Black (dominant) + Green, Yellow, Purple accents */

:root {
  --blue-900: #0a1628;
  --blue-800: #0f2744;
  --blue-700: #1a3a5c;
  --blue-600: #2563a8;
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --blue-rich: #0c2dff;
  --blue: #0a31ff;

  --red-700: #991b1b;
  --red-600: #dc2626;
  --red-500: #ef4444;
  --red-dark: #8b1a28;

  --grey-950: #0a0a0b;
  --grey-900: #111113;
  --grey-800: #1c1c1f;
  --grey-700: #2d2d32;
  --grey-500: #5c5c5f;
  --grey-300: #c4c4cc;
  --grey-100: #f0f0f4;
  --white: #ffffff;

  --green-500: #22c55e;
  --green-600: #16a34a;
  --yellow-500: #eab308;
  --yellow-600: #ca8a04;
  --purple-500: #a855f7;
  --purple-600: #9333ea;

  --font-display: "Instrument Sans", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;

  --text-hero: clamp(2.25rem, calc(5.4vw + 0.9rem), 3.825rem);
  --text-h2: clamp(2rem, 4vw + 0.5rem, 3rem);
  --text-h3: clamp(1.35rem, 2vw + 0.5rem, 1.75rem);
  --text-lead: clamp(1.125rem, 1.5vw + 0.5rem, 1.375rem);
  --text-body: 1.125rem;
  --line-tight: 1.15;
  --line-relaxed: 1.65;

  --space-section: clamp(4rem, 10vw, 7rem);
  --space-section-bottom: clamp(2rem, 5vw, 3.5rem);
  --container: min(72rem, 92vw);
  --radius: 12px;
  --radius-lg: 20px;
  --header-offset: 4.75rem;

  --gradient-brand:
    radial-gradient(ellipse 75% 60% at 10% 50%, color-mix(in srgb, var(--blue-rich) 55%, transparent) 0%, transparent 58%),
    radial-gradient(ellipse 70% 55% at 92% 35%, color-mix(in srgb, var(--red-500) 50%, transparent) 0%, transparent 55%),
    linear-gradient(135deg, var(--blue-rich) 0%, var(--red-500) 100%);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-offset);
}

section[id] {
  scroll-margin-top: var(--header-offset);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--line-relaxed);
  color: var(--grey-100);
  background: var(--grey-950);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--blue-400);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--yellow-500);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--white);
  color: var(--grey-950);
  font-weight: 600;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 11, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--grey-800);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: var(--container);
  margin-inline: auto;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--white);
}

.logo-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
}

.logo-sentari {
  color: var(--red-500);
}

.logo-accent {
  color: var(--blue-400);
}

.site-header .logo-accent {
  color: var(--blue-rich);
}

.nav {
  display: none;
  gap: 2rem;
}

.nav a {
  color: var(--white);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 500;
  transition: opacity 0.2s;
}

.nav a:hover {
  opacity: 0.85;
}

.nav a[hidden] {
  display: none;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.6rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--blue-rich);
  color: var(--white);
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--blue-rich) 88%, white);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  box-shadow: inset 0 0 0 2px var(--grey-500);
}

.btn-secondary:hover {
  box-shadow: inset 0 0 0 2px var(--blue-rich);
  color: var(--white);
}

.btn-header {
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
  background: var(--blue-rich);
  color: var(--white);
}

.btn-header:hover {
  background: color-mix(in srgb, var(--blue-rich) 88%, white);
}

.btn-large {
  padding: 1.1rem 2rem;
  font-size: 1.15rem;
}

.btn-full {
  width: 100%;
}

/* Hero */
.hero {
  position: relative;
  padding: clamp(1rem, 2.8vw, 1.8rem) 0 clamp(2rem, 10vw, 4rem);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--gradient-brand);
  pointer-events: none;
}

.hero-content {
  position: relative;
}

.eyebrow {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey-300);
}

.eyebrow-blue { color: var(--blue-400); }
.eyebrow-red { color: var(--red-500); }
.eyebrow-grey { color: var(--grey-500); }

.hero h1 {
  margin: 0 0 1.5rem;
  max-width: 26ch;
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: var(--line-tight);
  letter-spacing: -0.03em;
  color: var(--white);
}

.hero-lead {
  margin: 0 0 2.5rem;
  max-width: 60rem;
  font-size: var(--text-lead);
  line-height: 1.5;
  color: var(--grey-300);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-actions .btn-primary {
  background: var(--red-500);
}

.hero-actions .btn-primary:hover {
  background: color-mix(in srgb, var(--red-500) 88%, white);
}

.hero-actions .btn-secondary {
  background: var(--blue-rich);
  color: var(--white);
  box-shadow: none;
}

.hero-actions .btn-secondary:hover {
  background: color-mix(in srgb, var(--blue-rich) 88%, white);
  color: var(--white);
  box-shadow: none;
}

/* Sections */
.section {
  padding: var(--space-section) 0 var(--space-section-bottom);
}

.section h2 {
  margin: 0 0 1.25rem;
  max-width: 22ch;
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 700;
  line-height: var(--line-tight);
  letter-spacing: -0.02em;
  color: var(--white);
}

.section-lead {
  margin: 0 0 3rem;
  max-width: 60rem;
  font-size: var(--text-lead);
  color: var(--grey-300);
}

/* Mission */
.section-mission {
  background: var(--white);
  border-block: 1px solid var(--grey-300);
  padding-top: clamp(0.8rem, 2vw, 1.4rem);
  color: var(--grey-950);
}

.section-mission .eyebrow-blue {
  color: var(--blue-rich);
}

.section-mission h2,
.section-mission .section-lead {
  color: var(--grey-950);
}

.mission-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .mission-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.section-mission .mission-card {
  padding: 0;
  background: var(--grey-100);
  border-radius: var(--radius-lg);
  border: 1px solid var(--grey-300);
  overflow: hidden;
}

.mission-card-media {
  background: var(--white);
  line-height: 0;
}

.mission-card-media img {
  width: 100%;
  height: auto;
  display: block;
}

.section-mission .mission-card h3 {
  margin: 0.75rem 0 0.75rem;
  padding: 0 1.25rem;
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 600;
  color: var(--grey-950);
}

.section-mission .mission-card p {
  margin: 0;
  padding: 1rem 1.25rem 1.25rem;
  font-size: var(--text-body);
  color: var(--grey-800);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.1rem;
  border-radius: 8px;
}

.card-icon-red {
  background: rgba(220, 38, 38, 0.2);
  color: var(--red-500);
}

.card-icon-purple {
  background: rgba(168, 85, 247, 0.2);
  color: var(--purple-500);
}

.card-icon-blue {
  background: rgba(59, 130, 246, 0.2);
  color: var(--blue-400);
}

/* Priorities */
.section-priorities {
  background: color-mix(in srgb, var(--blue-rich) 88%, white);
  color: var(--white);
  padding-top: clamp(0.8rem, 2vw, 1.4rem);
  overflow-x: clip;
}

.section-priorities h2 {
  max-width: 100%;
  color: var(--white);
}

.section-priorities .section-lead {
  color: var(--white);
}

.priority-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.section-priorities .priority-block,
a.priority-block {
  display: grid;
  gap: 1.25rem;
  padding: 2rem 2rem 2rem 1.75rem;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--white);
  border-radius: var(--radius-lg);
  border-left-width: 12px;
  border-left-style: solid;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow-wrap: break-word;
}

a.priority-card-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

a.priority-card-link:focus-visible {
  outline: 3px solid var(--blue-rich);
  outline-offset: 3px;
}

.section-priorities .priority-block:hover,
a.priority-block:hover {
  transform: translateY(-6px);
}

.section-priorities .priority-body .card-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--blue-rich);
  transition: transform 0.2s ease, color 0.2s ease;
}

a.priority-block:hover .card-link {
  transform: translateX(4px);
  color: var(--blue-600);
}

@media (min-width: 640px) {
  .section-priorities .priority-block,
  a.priority-block {
    grid-template-columns: auto 1fr;
    gap: 2rem;
    align-items: start;
  }
}

.section-priorities .priority-innovation {
  border-left-color: var(--green-500);
  box-shadow: -4px 0 16px rgba(34, 197, 94, 0.35);
}

.section-priorities .priority-innovation:hover,
a.priority-innovation:hover {
  box-shadow: -6px 0 28px rgba(34, 197, 94, 0.5), 0 14px 36px rgba(0, 0, 0, 0.1);
}

.section-priorities .priority-community {
  border-left-color: var(--yellow-500);
  box-shadow: -4px 0 16px rgba(234, 179, 8, 0.35);
}

.section-priorities .priority-community:hover,
a.priority-community:hover {
  box-shadow: -6px 0 28px rgba(234, 179, 8, 0.5), 0 14px 36px rgba(0, 0, 0, 0.1);
}

.section-priorities .priority-training {
  border-left-color: var(--purple-500);
  box-shadow: -4px 0 16px rgba(168, 85, 247, 0.35);
}

.section-priorities .priority-training:hover,
a.priority-training:hover {
  box-shadow: -6px 0 28px rgba(168, 85, 247, 0.5), 0 14px 36px rgba(0, 0, 0, 0.1);
}

.priority-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.section-priorities .priority-letter {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--grey-300);
}

.priority-tag {
  padding: 0.35rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
}

.tag-green {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green-500);
}

.tag-yellow {
  background: rgba(234, 179, 8, 0.15);
  color: var(--yellow-500);
}

.tag-purple {
  background: rgba(168, 85, 247, 0.15);
  color: var(--purple-500);
}

.section-priorities .priority-body {
  min-width: 0;
}

.section-priorities .priority-body h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: var(--line-tight);
  color: var(--grey-950);
  overflow-wrap: break-word;
}

.section-priorities .priority-body p {
  margin: 0;
  font-size: var(--text-body);
  color: var(--grey-800);
  overflow-wrap: break-word;
}

/* Priority detail page — same theme as homepage #priorities */
body.priority-page {
  color: var(--white);
  background: color-mix(in srgb, var(--blue-rich) 88%, white);
}

.priority-main {
  border-block: 1px solid rgba(255, 255, 255, 0.15);
}

.priority-detail.section-priorities {
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
}

.priority-detail-body {
  max-width: 52rem;
}

.priority-detail .eyebrow a {
  color: var(--red-500);
  text-decoration: none;
}

.priority-detail .eyebrow a:hover {
  text-decoration: underline;
}

.priority-detail--not-found h1,
.priority-detail-panel .priority-body h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: var(--line-tight);
  color: var(--grey-950);
}

.priority-detail-lead,
.priority-summary {
  margin: 0 0 1.25rem;
  font-size: var(--text-body);
  line-height: var(--line-relaxed);
  color: var(--grey-800);
}

.priority-detail-panel {
  margin-top: 0.5rem;
}

.priority-hero-media {
  position: relative;
  width: 100%;
  margin: 0 0 1.25rem;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--grey-100);
}

.priority-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.priority-hero-image.is-hidden {
  display: none;
}

.priority-hero-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 1.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  text-align: center;
  color: var(--grey-800);
  background: var(--grey-100);
}

.priority-hero-placeholder.is-hidden {
  display: none;
}

.priority-description {
  font-size: var(--text-body);
  line-height: var(--line-relaxed);
  color: var(--grey-800);
}

.priority-description p {
  margin: 0 0 1rem;
}

.priority-description p:last-child {
  margin-bottom: 0;
}

.priority-description strong {
  color: var(--grey-950);
  font-weight: 600;
}

.priority-description h1,
.priority-description h2,
.priority-description h3 {
  margin: 1.5rem 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--line-tight);
  color: var(--grey-950);
}

.priority-description h1:first-child,
.priority-description h2:first-child,
.priority-description h3:first-child {
  margin-top: 0;
}

.priority-description ul,
.priority-description ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.priority-description li + li {
  margin-top: 0.35rem;
}

.priority-description hr {
  margin: 1.5rem 0;
  border: none;
  border-top: 1px solid var(--grey-300);
}

.priority-description table {
  width: 100%;
  margin: 0 0 1.25rem;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--white);
}

.priority-description th,
.priority-description td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
  border: 1px solid var(--grey-300);
  color: var(--grey-800);
}

.priority-description th {
  color: var(--grey-950);
  font-weight: 600;
  background: color-mix(in srgb, var(--grey-100) 60%, var(--white));
}

.priority-description img,
.priority-description .offering-inline-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.25rem 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--grey-300);
}

.priority-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

body.priority-page .priority-actions .btn-secondary {
  color: var(--grey-950);
  background: var(--white);
  box-shadow: inset 0 0 0 2px var(--grey-300);
}

body.priority-page .priority-actions .btn-secondary:hover {
  color: var(--blue-rich);
  background: color-mix(in srgb, var(--blue-rich) 6%, white);
  box-shadow: inset 0 0 0 2px var(--blue-rich);
}

/* Capabilities */
.section-capabilities {
  background: var(--red-dark);
  padding-top: clamp(0.8rem, 2vw, 1.4rem);
  overflow-x: clip;
}

.section-capabilities h2 {
  max-width: 100%;
}

.section-capabilities .eyebrow-grey {
  color: var(--blue-400);
}

.capability-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .capability-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.section-capabilities .capability-card,
a.capability-card {
  display: block;
  padding: 2rem;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  overflow-wrap: break-word;
}

a.capability-card-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

a.capability-card-link:focus-visible {
  outline: 3px solid var(--blue-400);
  outline-offset: 3px;
}

.section-capabilities .capability-card:hover,
a.capability-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: 0 14px 40px rgba(12, 45, 255, 0.22), 0 8px 24px rgba(0, 0, 0, 0.25);
}

.capability-card h3 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 600;
  color: var(--white);
  overflow-wrap: break-word;
}

.capability-card p {
  margin: 0 0 1.25rem;
  color: var(--grey-300);
  overflow-wrap: break-word;
}

.card-link {
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--red-500);
}

.card-link:hover {
  color: var(--red-600);
}

.section-capabilities .card-link {
  color: var(--blue-400);
  transition: color 0.2s ease, transform 0.2s ease;
}

.section-capabilities .capability-card .card-link,
a.capability-card .card-link {
  display: inline-block;
}

.section-capabilities .capability-card:hover .card-link,
a.capability-card:hover .card-link {
  color: var(--white);
  transform: translateX(4px);
}

.detail-tag {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue-rich);
  background: rgba(12, 45, 255, 0.12);
  border-radius: 999px;
}

.section-capabilities .card-link:hover {
  color: var(--white);
}

/* Capability detail page — same theme as homepage #capabilities */
body.capability-page {
  color: var(--grey-300);
  background: var(--red-dark);
}

.capability-main {
  border-block: 1px solid rgba(255, 255, 255, 0.12);
}

.capability-detail.section-capabilities {
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
}

.capability-detail-body {
  max-width: 48rem;
}

.capability-detail .eyebrow a {
  color: var(--blue-400);
  text-decoration: none;
}

.capability-detail .eyebrow a:hover {
  text-decoration: underline;
}

.capability-detail h1 {
  margin: 0 0 1rem;
  max-width: none;
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 700;
  line-height: var(--line-tight);
  letter-spacing: -0.02em;
  color: var(--white);
}

.capability-summary {
  margin: 0 0 1.5rem;
  max-width: 60rem;
  font-size: var(--text-body);
  line-height: var(--line-relaxed);
  color: var(--grey-300);
}

.capability-hero-media {
  position: relative;
  width: 100%;
  margin: 0 0 1.5rem;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.capability-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.capability-hero-image.is-hidden {
  display: none;
}

.capability-hero-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 1.5rem;
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 600;
  text-align: center;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.capability-hero-placeholder.is-hidden {
  display: none;
}

.capability-description-panel {
  margin-bottom: 2rem;
}

.capability-description {
  font-size: var(--text-body);
  line-height: var(--line-relaxed);
  color: var(--grey-300);
}

.capability-description p {
  margin: 0 0 1rem;
  font-size: inherit;
  color: inherit;
  line-height: inherit;
}

.capability-description p:last-child {
  margin-bottom: 0;
}

.capability-description p[style],
.capability-description li[style],
.capability-description h1[style],
.capability-description h2[style],
.capability-description h3[style] {
  font-size: inherit !important;
  color: inherit !important;
  line-height: inherit !important;
}

.capability-description strong {
  color: var(--white);
  font-weight: 600;
}

.capability-description h1,
.capability-description h2,
.capability-description h3 {
  margin: 1.5rem 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--line-tight);
  color: var(--white);
}

.capability-description h1:first-child,
.capability-description h2:first-child,
.capability-description h3:first-child {
  margin-top: 0;
}

.capability-description h1 {
  font-size: var(--text-h3);
}

.capability-description h2 {
  font-size: 1.25rem;
}

.capability-description h3 {
  font-size: 1.1rem;
}

.capability-description ul,
.capability-description ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.capability-description li + li {
  margin-top: 0.35rem;
}

.capability-description hr {
  margin: 1.5rem 0;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.capability-description table {
  width: 100%;
  margin: 0 0 1.25rem;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.06);
}

.capability-description th,
.capability-description td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--grey-300);
}

.capability-description th {
  color: var(--white);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
}

.capability-description img,
.capability-description .offering-inline-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.25rem 0;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.capability-detail .detail-tag {
  color: var(--blue-400);
  background: rgba(255, 255, 255, 0.12);
}

.capability-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

body.capability-page .capability-actions .btn-secondary {
  color: var(--white);
  background: transparent;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

body.capability-page .capability-actions .btn-secondary:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 2px var(--blue-400);
}

@media (max-width: 767px) {
  .section-priorities .container,
  .section-capabilities .container {
    width: 100%;
    max-width: 100%;
    padding-inline: clamp(1rem, 4vw, 1.25rem);
    box-sizing: border-box;
  }

  .section-priorities h2,
  .section-capabilities h2 {
    font-size: clamp(1.65rem, 7vw, 2.25rem);
    line-height: 1.2;
    hyphens: auto;
  }

  .section-priorities .section-lead {
    margin-bottom: 2rem;
    max-width: 100%;
  }

  .priority-list {
    gap: 1.25rem;
  }

  .section-priorities .priority-block,
  a.priority-block {
    padding: 1.25rem 1rem;
    border-left-width: 8px;
  }

  .capability-grid {
    gap: 1rem;
  }

  .section-capabilities .capability-card,
  a.capability-card {
    padding: 1.25rem 1rem;
  }
}

/* CTA band */
.section-cta-band {
  padding: clamp(1.75rem, 4vw, 2.75rem) 0 clamp(1.75rem, 4vw, 2.75rem);
  background: var(--gradient-brand);
}

.cta-band-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.cta-band-visual {
  display: flex;
  justify-content: center;
}

.cta-band-visual img {
  display: block;
  width: min(100%, 280px);
  height: auto;
  border-radius: var(--radius-lg);
  object-fit: contain;
}

.cta-band-inner {
  text-align: center;
}

.cta-band-inner h2 {
  max-width: none;
  margin-bottom: 1rem;
  color: var(--white);
}

.cta-band-inner p {
  margin: 0 0 2rem;
  font-size: var(--text-lead);
  color: rgba(255, 255, 255, 0.9);
}

@media (min-width: 768px) {
  .cta-band-grid {
    grid-template-columns: auto 1fr;
    gap: 2.5rem;
  }

  .cta-band-visual {
    justify-content: flex-start;
  }

  .cta-band-visual img {
    width: 260px;
  }

  .cta-band-inner {
    text-align: left;
  }
}

.cta-band-inner .btn-primary {
  background: var(--blue-rich);
}

.cta-band-inner .btn-primary:hover {
  background: color-mix(in srgb, var(--blue-rich) 88%, white);
}

/* Contact */
.section-contact {
  background: var(--grey-900);
  border-top: 1px solid var(--grey-800);
  padding-top: clamp(0.8rem, 2vw, 1.4rem);
}

.contact-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.contact-email {
  margin: 2rem 0 0;
  font-size: var(--text-lead);
  font-weight: 600;
}

.contact-email a {
  color: var(--blue-400);
  text-decoration: none;
}

.contact-email a:hover {
  text-decoration: underline;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.contact-form label {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--grey-300);
}

.contact-form input,
.contact-form textarea {
  padding: 0.72rem 0.8rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--white);
  background: var(--grey-800);
  border: 2px solid var(--grey-700);
  border-radius: var(--radius);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--grey-500);
}

.contact-form textarea {
  resize: vertical;
  min-height: 96px;
}

.contact-form .form-status {
  margin: 0 0 0.8rem;
  padding: 0.8rem 1rem;
  font-size: 1rem;
}

.contact-signed-in {
  margin: 0 0 0.5rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.92rem;
  color: var(--grey-200);
  background: rgba(10, 49, 255, 0.12);
  border: 1px solid rgba(10, 49, 255, 0.35);
  border-radius: var(--radius);
}

.contact-form-notice {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--grey-300);
}

.contact-form button {
  margin-top: 0.8rem;
  padding: 0.72rem 1.28rem;
  font-size: 1rem;
}

.contact-form button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin: 0 0 1rem;
  padding: 1rem 1.25rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
}

.form-status-success {
  background: rgba(34, 197, 94, 0.12);
  border-color: var(--green-500);
  color: var(--green-500);
}

.form-status-error {
  background: rgba(220, 38, 38, 0.12);
  border-color: var(--red-500);
  color: var(--red-500);
}

/* Footer */
.site-footer {
  padding: 3rem 0 2rem;
  background: var(--grey-950);
  border-top: 1px solid var(--grey-800);
}

.footer-inner {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: start;
  }

  .footer-copy {
    grid-column: 1 / -1;
  }

  .footer-tech-focus {
    grid-column: 1 / -1;
  }
}

.footer-brand .logo-text {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.footer-brand p {
  margin: 0.5rem 0 0;
  font-size: 1rem;
  color: var(--grey-500);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-nav a {
  color: var(--grey-300);
  text-decoration: none;
  font-weight: 500;
}

.footer-nav a:hover {
  color: var(--white);
}

.footer-copy {
  margin: 0;
  font-size: 0.95rem;
  color: var(--grey-500);
}

.footer-tech-focus {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
  margin: 0;
  padding: 2rem 0 0.5rem;
  border-top: 1px solid var(--grey-800);
}

.footer-tech-label {
  margin: 0;
  max-width: none;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red-500);
}

.footer-tech-matrix {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem 1.25rem;
  width: 100%;
  min-width: 0;
}

.footer-tech-row--top,
.footer-tech-row--bottom {
  display: contents;
}

.footer-tech-name {
  flex: 0 1 auto;
  max-width: 100%;
  font-family: var(--font-display);
  font-size: clamp(0.8rem, 0.88vw + 0.6rem, 1.08rem);
  font-weight: 600;
  color: var(--blue-400);
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1.35;
  white-space: normal;
  min-width: 0;
  padding: 0;
  box-sizing: border-box;
}

@media (min-width: 1101px) {
  .footer-tech-focus {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 1rem 2.5rem;
    padding: 2.5rem 0 0.5rem;
  }

  .footer-tech-label {
    max-width: 12rem;
    font-size: 1.05rem;
  }

  .footer-tech-matrix {
    display: block;
  }

  .footer-tech-row--top {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: clamp(0.65rem, 1.5vw, 1.35rem);
    align-items: center;
  }

  .footer-tech-row--bottom {
    display: grid;
    grid-template-columns:
      minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    width: 100%;
    margin-top: 1rem;
  }

  .footer-tech-name {
    flex: unset;
    max-width: none;
    padding: 0 0.25rem;
  }

  .footer-tech-brick:nth-child(1) {
    grid-column: 2;
  }

  .footer-tech-brick:nth-child(2) {
    grid-column: 4;
  }

  .footer-tech-brick:nth-child(3) {
    grid-column: 6;
  }

  .footer-tech-brick {
    min-width: 0;
    text-align: center;
  }
}

/* AI security packages */
.section-packages {
  background: var(--grey-950);
  padding-top: clamp(0.8rem, 2vw, 1.4rem);
}

.section-packages h2,
.section-packages .section-lead {
  color: var(--white);
}

.section-packages .eyebrow-blue {
  color: var(--blue-rich);
}

.packages-carousel {
  position: relative;
  margin-top: 2rem;
}

.packages-viewport {
  overflow: hidden;
  margin: 0 3rem;
}

.packages-track {
  display: flex;
  gap: 1.5rem;
  transition: transform 0.45s ease;
  will-change: transform;
}

.package-card {
  flex: 0 0 calc((100% - 4.5rem) / 4);
  min-width: 0;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--grey-900);
  border-radius: var(--radius-lg);
  border: 1px solid var(--grey-800);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.package-card:hover {
  transform: translateY(-4px);
  border-color: var(--blue-rich);
  box-shadow: 0 12px 40px rgba(12, 45, 255, 0.2);
}

.package-card-media {
  aspect-ratio: 16 / 9;
  background: var(--grey-800);
  overflow: hidden;
}

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

.package-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--grey-300);
  background: linear-gradient(135deg, var(--blue-rich) 0%, var(--red-dark) 100%);
}

.package-card-body {
  padding: 1.25rem 1.35rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.package-card-body h3 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: var(--line-tight);
  color: var(--white);
}

.package-card-body p {
  margin: 0 0 1rem;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--grey-300);
  flex: 1;
}

.package-card-cta {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--blue-400);
}

.packages-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 50%;
  background: var(--blue-rich);
  color: var(--white);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.packages-nav:hover {
  background: color-mix(in srgb, var(--blue-rich) 88%, white);
}

.packages-nav-prev { left: 0; }
.packages-nav-next { right: 0; }

.packages-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.75rem;
}

.packages-dot {
  width: 0.65rem;
  height: 0.65rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--grey-700);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.packages-dot.is-active {
  background: var(--blue-rich);
  transform: scale(1.2);
}

.packages-error {
  color: var(--grey-300);
  text-align: center;
  padding: 2rem;
}

@media (max-width: 1024px) {
  .package-card {
    flex: 0 0 calc((100% - 1.5rem) / 2);
  }
}

@media (max-width: 640px) {
  .packages-viewport {
    margin: 0 2.5rem;
  }

  .package-card {
    flex: 0 0 100%;
  }

  .packages-nav {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.4rem;
  }
}

/* Offering detail page — Our mission (#mission) light theme */
body.offering-page {
  color: var(--grey-950);
  background: var(--white);
}

body.offering-page .offering-main {
  border-block: 1px solid var(--grey-300);
}

.offering-hero {
  border-bottom: 1px solid var(--grey-300);
}

.offering-hero-media {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: var(--grey-100);
  overflow: hidden;
}

.offering-hero-media--placeholder {
  background: var(--gradient-brand);
}

.offering-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  display: block;
}

.offering-hero-image.is-hidden {
  display: none;
}

@media (min-width: 768px) {
  .offering-hero-media {
    width: 50%;
    max-width: 50%;
  }
}

.offering-hero-content {
  width: 100%;
  max-width: 60rem;
  margin-inline: auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) 0 0;
  color: var(--grey-950);
  text-align: center;
}

.offering-hero .eyebrow-blue {
  color: var(--blue-rich);
}

.offering-hero .eyebrow a {
  color: var(--blue-rich);
  text-decoration: none;
}

.offering-hero .eyebrow a:hover {
  text-decoration: underline;
}

.offering-hero h1 {
  margin: 0 0 1rem;
  max-width: none;
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 700;
  line-height: var(--line-tight);
  letter-spacing: -0.02em;
  color: var(--grey-950);
}

.offering-hero-lead {
  margin: 0 0 0.5rem;
  max-width: 60rem;
}

body.offering-page .offering-hero-lead.section-lead {
  color: var(--grey-800);
}

.offering-detail-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-section) 0 var(--space-section-bottom);
  color: var(--grey-950);
}

.offering-description-panel {
  width: 100%;
  max-width: 60rem;
  margin-inline: auto;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--grey-100);
  border: 1px solid var(--grey-300);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.offering-description {
  font-size: var(--text-body);
  line-height: var(--line-relaxed);
  color: var(--grey-800);
}

.offering-description p {
  margin: 0 0 1rem;
  font-size: inherit;
  color: inherit;
  line-height: inherit;
}

.offering-description p:last-child {
  margin-bottom: 0;
}

.offering-description p[style],
.offering-description li[style],
.offering-description h1[style],
.offering-description h2[style],
.offering-description h3[style] {
  font-size: inherit !important;
  color: inherit !important;
  line-height: inherit !important;
}

.offering-description strong {
  color: var(--grey-950);
  font-weight: 600;
}

.offering-description h1,
.offering-description h2,
.offering-description h3 {
  margin: 1.5rem 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--line-tight);
  color: var(--grey-950);
}

.offering-description h1:first-child,
.offering-description h2:first-child,
.offering-description h3:first-child {
  margin-top: 0;
}

.offering-description h1 {
  font-size: var(--text-h3);
}

.offering-description h2 {
  font-size: 1.25rem;
}

.offering-description h3 {
  font-size: 1.1rem;
}

.offering-description ul,
.offering-description ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.offering-description li + li {
  margin-top: 0.35rem;
}

.offering-description hr {
  margin: 1.5rem 0;
  border: none;
  border-top: 1px solid var(--grey-300);
}

.offering-description table {
  width: 100%;
  margin: 0 0 1.25rem;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--white);
}

.offering-description th,
.offering-description td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
  border: 1px solid var(--grey-300);
  color: var(--grey-800);
}

.offering-description th {
  color: var(--grey-950);
  font-weight: 600;
  background: color-mix(in srgb, var(--grey-100) 60%, var(--white));
}

.offering-description img,
.offering-description .offering-inline-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.25rem 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--grey-300);
}

.offering-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  max-width: 60rem;
  margin-top: 2.5rem;
}

.offering-not-found {
  padding: var(--space-section) 0;
  color: var(--grey-800);
}

.offering-not-found h1 {
  color: var(--grey-950);
}

body.offering-page .offering-actions .btn-secondary {
  color: var(--grey-950);
  background: var(--white);
  box-shadow: inset 0 0 0 2px var(--grey-300);
}

body.offering-page .offering-actions .btn-secondary:hover {
  color: var(--blue-rich);
  background: color-mix(in srgb, var(--blue-rich) 6%, white);
  box-shadow: inset 0 0 0 2px var(--blue-rich);
}

/* Careers page */
.careers-page {
  background: var(--grey-950);
}

.careers-hero {
  position: relative;
  padding: clamp(2rem, 6vw, 4rem) 0 clamp(2.5rem, 8vw, 4rem);
  overflow: hidden;
}

.careers-hero-bg {
  position: absolute;
  inset: 0;
  background: var(--gradient-brand);
  pointer-events: none;
}

.careers-hero-content {
  position: relative;
}

.careers-hero .eyebrow {
  color: rgba(255, 255, 255, 0.85);
}

.careers-hero h1 {
  margin: 0 0 1.25rem;
  max-width: none;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: var(--line-tight);
  color: var(--white);
}

.careers-hero-lead {
  margin: 0;
  max-width: 60rem;
  font-size: var(--text-lead);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 720px) {
  .careers-hero h1 {
    white-space: normal;
  }
}

.section-careers-roles {
  background: var(--white);
  color: var(--grey-950);
  padding-top: clamp(2rem, 5vw, 3.5rem);
}

.section-careers-roles h2 {
  margin: 0 0 2rem;
  max-width: none;
  color: var(--grey-950);
}

.brand-wordmark {
  font-family: var(--font-display);
  font-weight: inherit;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.section-careers-roles h2 .logo-sentari {
  color: var(--red-500);
}

.section-careers-roles h2 .logo-accent {
  color: var(--blue-rich);
}

.careers-roles-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .careers-roles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.careers-role-card {
  padding: 2rem;
  background: var(--grey-100);
  border: 1px solid var(--grey-300);
  border-radius: var(--radius-lg);
}

.careers-role-card h3 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 600;
  color: var(--grey-950);
}

.careers-role-card p {
  margin: 0;
  font-size: var(--text-body);
  line-height: var(--line-relaxed);
  color: var(--grey-800);
}

.section-careers-form {
  background: var(--grey-900);
  border-top: 1px solid var(--grey-800);
}

.careers-form-container h2 {
  margin: 0 0 2rem;
  max-width: none;
  color: var(--white);
}

.careers-form {
  max-width: 42rem;
}

.careers-fieldset {
  margin: 0 0 2rem;
  padding: 0;
  border: none;
}

.careers-fieldset legend {
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
}

.careers-fieldset .required,
.careers-fieldset .optional {
  font-weight: 500;
  color: var(--grey-300);
}

.careers-fieldset .optional {
  font-size: 0.95rem;
}

.careers-options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.careers-option {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 1.05rem;
  color: var(--grey-300);
  cursor: pointer;
}

.careers-option input {
  margin-top: 0.2rem;
  accent-color: var(--blue-rich);
  flex-shrink: 0;
}

.careers-fieldset-text label {
  display: block;
  margin-bottom: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
}

.careers-fieldset-text textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--white);
  background: var(--grey-800);
  border: 2px solid var(--grey-700);
  border-radius: var(--radius);
  resize: vertical;
  min-height: 120px;
}

.careers-char-count {
  margin: 0.5rem 0 0;
  text-align: right;
  font-size: 0.9rem;
  color: var(--grey-500);
}

.careers-form-notice {
  margin: 0 0 0.5rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--grey-300);
}

.careers-form-notice-secondary {
  margin-bottom: 1.25rem;
}

.careers-form .btn-large {
  display: flex;
  width: 100%;
  max-width: 24rem;
  margin-inline: auto;
}

.nav a[aria-current="page"] {
  color: var(--blue-400);
}

/* Firebase auth modal */
body.auth-modal-open {
  overflow: hidden;
}

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

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 11, 0.72);
}

.auth-modal-dialog {
  position: relative;
  width: min(100%, 26rem);
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem 1.75rem 1.75rem;
  background: var(--red-dark);
  border: 1px solid color-mix(in srgb, var(--red-dark) 70%, white);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.auth-modal-dialog:has(.auth-admin-panel) {
  width: min(100%, 42rem);
}

.auth-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  border: none;
  background: transparent;
  color: var(--grey-300);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.auth-modal-close:hover {
  color: var(--white);
}

.auth-modal-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--white);
}

.auth-modal-sub {
  margin: 0 0 1.25rem;
  font-size: 0.98rem;
  color: var(--grey-300);
}

.auth-form label {
  display: block;
  margin-top: 0.75rem;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--grey-300);
}

.auth-form input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--white);
  background: var(--grey-800);
  border: 2px solid var(--grey-700);
  border-radius: var(--radius);
}

.auth-form-meta {
  margin: 0.5rem 0 0;
  text-align: right;
}

.auth-link {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--blue-400);
  cursor: pointer;
  text-decoration: underline;
}

.auth-link:hover {
  color: var(--blue-500);
}

.auth-switch {
  margin: 1.25rem 0 0;
  text-align: center;
  font-size: 0.95rem;
  color: var(--grey-300);
}

.auth-divider {
  margin: 1.25rem 0;
  text-align: center;
  color: var(--grey-500);
  font-size: 0.9rem;
}

.auth-divider span {
  padding: 0 0.75rem;
  background: var(--red-dark);
}

.auth-divider::before {
  content: "";
  display: block;
  height: 1px;
  background: var(--grey-700);
  margin-bottom: -0.65rem;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background: var(--white);
  color: var(--grey-950);
  border: none;
}

.btn-google:hover {
  background: var(--grey-100);
}

.btn-google-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  font-weight: 700;
  color: var(--blue-rich);
}

.auth-message {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
}

.auth-message-info {
  background: rgba(12, 45, 255, 0.12);
  border: 1px solid var(--blue-rich);
  color: var(--blue-400);
}

.auth-message-success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid var(--green-500);
  color: var(--green-500);
}

.auth-message-error {
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid var(--red-500);
  color: var(--red-500);
}

.auth-account-email {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  color: var(--grey-300);
  word-break: break-all;
}

.auth-verify-banner {
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid var(--yellow-500);
  border-radius: var(--radius);
}

.auth-verify-banner p {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--yellow-500);
}

.auth-profile-list {
  margin: 0 0 1.25rem;
  display: grid;
  gap: 0.65rem;
}

.auth-profile-list > div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.5rem;
  align-items: baseline;
}

.auth-profile-list dt {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--grey-400);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-profile-list dd {
  margin: 0;
  font-size: 0.98rem;
  color: var(--grey-100);
  word-break: break-word;
}

.auth-role-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: capitalize;
}

.auth-role-member {
  background: rgba(92, 92, 95, 0.35);
  color: var(--grey-200);
}

.auth-role-editor {
  background: rgba(10, 49, 255, 0.2);
  color: #9eb4ff;
}

.auth-role-sales {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
}

.auth-role-admin {
  background: rgba(139, 26, 40, 0.25);
  color: #f5a8b3;
}

.auth-admin-panel {
  margin-bottom: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--grey-700);
}

.auth-admin-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--white);
}

.auth-admin-sub {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  color: var(--grey-400);
}

.auth-admin-table-wrap {
  overflow-x: auto;
}

.auth-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.auth-admin-table th,
.auth-admin-table td {
  padding: 0.45rem 0.35rem;
  text-align: left;
  border-bottom: 1px solid var(--grey-700);
  color: var(--grey-200);
}

.auth-admin-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--grey-400);
}

.auth-role-select {
  width: 100%;
  max-width: 7rem;
  padding: 0.35rem 0.4rem;
  border: 1px solid var(--grey-600);
  border-radius: var(--radius);
  background: var(--grey-800);
  color: var(--white);
  font-size: 0.85rem;
}

.auth-admin-you {
  font-size: 0.82rem;
  color: var(--grey-400);
}

.auth-admin-error {
  margin: 0;
  font-size: 0.9rem;
  color: var(--red-500);
}

/* App modules: Dashboard, CMS, Admin */
body.module-app {
  background: var(--grey-950);
  color: var(--grey-100);
}

.module-auth-loading,
.module-access-denied {
  min-height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  text-align: center;
}

.module-auth-loading p {
  margin: 0;
  max-width: 28rem;
}

#module-auth-retry {
  margin-top: 0.25rem;
}

.module-auth-loading[hidden],
.module-access-denied[hidden],
.module-app-shell[hidden] {
  display: none !important;
}

body.module-auth-ready .module-auth-loading {
  display: none !important;
}

.module-access-denied-inner {
  max-width: 28rem;
  text-align: center;
}

.module-access-denied-inner h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  color: var(--white);
}

.module-access-denied-inner p {
  margin: 0 0 1.25rem;
  color: var(--grey-300);
}

.module-access-denied-inner .btn {
  margin: 0.35rem;
}

.module-app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.module-app-shell .module-layout {
  flex: 1;
}

.module-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: var(--grey-900);
  border-bottom: 1px solid var(--grey-800);
}

.module-topbar-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.module-user-label {
  font-size: 0.88rem;
  color: var(--grey-400);
}

.module-layout {
  display: grid;
  grid-template-columns: 12rem 1fr;
  flex: 1;
}

.module-sidebar {
  padding: 1.25rem 0.75rem;
  background: var(--grey-900);
  border-right: 1px solid var(--grey-800);
}

.module-sidebar-title {
  margin: 0 0 0.85rem;
  padding: 0 0.75rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-500);
}

.module-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.module-nav-link {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  color: var(--grey-300);
  text-decoration: none;
}

.module-nav-link[hidden],
.module-nav-link.is-nav-restricted,
li.is-nav-restricted {
  display: none !important;
}

.module-nav-divider {
  margin: 0.85rem 0.5rem;
  border: none;
  border-top: 3px solid var(--grey-600);
}

/* Tighter Dashboard sidebar nav */
body[data-module-access="dashboard"] .module-sidebar {
  padding: 0.75rem 0.6rem;
}

body[data-module-access="dashboard"] .module-sidebar-title {
  margin-bottom: 0.45rem;
  padding: 0 0.5rem;
}

body[data-module-access="dashboard"] .module-nav {
  gap: 0.1rem;
}

body[data-module-access="dashboard"] .module-nav-link {
  padding: 0.32rem 0.55rem;
  font-size: 0.92rem;
  line-height: 1.25;
}

body[data-module-access="dashboard"] .module-nav-divider {
  margin: 0.45rem 0.35rem;
}

.module-footer {
  padding: 0.85rem 1.25rem;
  background: var(--grey-900);
  border-top: 1px solid var(--grey-800);
}

.module-footer-inner {
  max-width: 100%;
}

.module-footer-copy {
  margin: 0;
  font-size: 0.88rem;
  color: var(--grey-500);
  text-align: center;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1.75rem;
  align-items: stretch;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
  min-height: 11rem;
  padding: 1.25rem 1.35rem;
  background: var(--grey-900);
  border: 1px solid var(--grey-800);
  border-radius: var(--radius-lg);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.tool-card:hover,
.tool-card:focus-visible {
  border-color: var(--blue-rich);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  color: inherit;
  text-decoration: none;
}

.tool-card:focus-visible {
  outline: 2px solid var(--blue-400);
  outline-offset: 2px;
}

.tool-card > * {
  pointer-events: none;
}

.tool-card-thumb {
  position: relative;
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--grey-800);
}

.tool-card-thumb img,
.tool-card-thumb > .tool-card-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.tool-card-thumb img {
  object-fit: cover;
  object-position: center;
  display: block;
}

.tool-card-thumb > .tool-card-icon[hidden],
.tool-card-thumb > img[hidden] {
  display: none !important;
}

.tool-card-thumb--fallback {
  background: linear-gradient(135deg, var(--blue-rich) 0%, var(--red-dark) 100%);
}

.tool-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-rich) 0%, var(--red-dark) 100%);
}

.tool-card-thumb > .tool-card-icon:not([hidden]) {
  display: inline-flex;
}

.tool-card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--white);
}

.tool-card-summary {
  margin: 0;
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--grey-300);
}

.tool-card-cta {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--blue-400);
}

.tool-breadcrumb {
  margin: 0 0 1rem;
}

.tool-back-link {
  font-weight: 600;
  color: var(--blue-400);
  text-decoration: none;
}

.tool-back-link:hover {
  text-decoration: underline;
}

.tool-workspace .tool-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-bottom: 1rem;
}

.tool-radio {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  color: var(--grey-200);
  cursor: pointer;
}

.tool-select {
  padding: 0.45rem 0.6rem;
  font-size: 0.95rem;
  color: var(--white);
  background: var(--grey-800);
  border: 1px solid var(--grey-700);
  border-radius: var(--radius);
}

.tool-panels {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tool-panel label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--grey-300);
}

.tool-textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--grey-100);
  background: var(--grey-800);
  border: 1px solid var(--grey-700);
  border-radius: var(--radius);
  resize: vertical;
}

.tool-textarea-output {
  background: var(--grey-950);
}

.tool-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tool-status {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--grey-400);
}

.tool-status-ok {
  color: var(--green-500);
}

.tool-status-error {
  color: var(--red-500);
}

@media (max-width: 768px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }
}

/* Academy catalog */
.academy-category {
  margin-top: 1.75rem;
}

.academy-category:first-of-type {
  margin-top: 1.75rem;
}

.academy-category-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--white);
}

.academy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}

.academy-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  height: 100%;
  min-height: 10rem;
  padding: 1.25rem 1.35rem;
  background: var(--grey-900);
  border: 1px solid var(--grey-800);
  border-radius: var(--radius-lg);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.academy-card:hover,
.academy-card:focus-visible {
  border-color: var(--blue-rich);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  color: inherit;
  text-decoration: none;
}

.academy-card > * {
  pointer-events: none;
}

.academy-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-rich) 0%, var(--red-dark) 100%);
}

.academy-card-category {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey-500);
}

.academy-card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--white);
}

.academy-card-summary {
  margin: 0;
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--grey-300);
}

.course-summary-html p {
  margin: 0 0 0.5rem;
}

.course-summary-html p:last-child {
  margin-bottom: 0;
}

.course-summary-html ul,
.course-summary-html ol {
  margin: 0.35rem 0 0;
  padding-left: 1.25rem;
}

.course-summary-html li {
  margin-bottom: 0.25rem;
}

.course-summary-html li:last-child {
  margin-bottom: 0;
}

.course-summary-html strong,
.course-summary-html b {
  font-weight: 700;
  color: var(--grey-100);
}

.academy-card-cta {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--blue-400);
}

.academy-card-progress {
  margin-top: 0.35rem;
}

.academy-card-progress-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--grey-800);
  overflow: hidden;
}

.academy-card-progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-rich), var(--green-500));
  transition: width 0.25s ease;
}

.academy-card-progress-label {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--grey-500);
}

.academy-card-is-complete .academy-card-progress-label {
  color: var(--green-500);
  font-weight: 600;
}

/* Course player */
.course-breadcrumb {
  margin: 0 0 1rem;
}

.course-back-link {
  font-weight: 600;
  color: var(--blue-400);
  text-decoration: none;
}

.course-back-link:hover {
  text-decoration: underline;
}

.course-shell {
  background: var(--grey-900);
  border: 1px solid var(--grey-800);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.course-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--grey-800);
}

.course-header-summary {
  margin-bottom: 1rem;
}

.course-progress-wrap {
  max-width: 28rem;
}

.course-progress-bar {
  height: 0.5rem;
  background: var(--grey-800);
  border-radius: 999px;
  overflow: hidden;
}

.course-progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--blue-rich), var(--green-500));
  border-radius: 999px;
  transition: width 0.25s ease;
}

.course-progress-label {
  margin: 0.4rem 0 0;
  font-size: 0.88rem;
  color: var(--grey-400);
}

.course-layout-inner {
  display: grid;
  grid-template-columns: minmax(12rem, 16rem) 1fr;
  min-height: 24rem;
  align-items: start;
}

.course-outline {
  padding: 1rem 0.75rem;
  background: var(--grey-950);
  border-right: 1px solid var(--grey-800);
  overflow: visible;
  max-height: none;
}

.course-outline-chapter {
  margin-bottom: 0;
  padding-bottom: 1rem;
}

.course-outline-chapter:not(:last-child) {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--grey-800);
}

.course-outline-chapter-title {
  margin: 0 0 0.35rem;
  padding: 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--grey-500);
}

.course-outline-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.course-outline-topic {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  padding: 0.45rem 0.5rem;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: var(--grey-300);
}

.course-outline-topic:hover,
.course-outline-topic.is-active {
  background: rgba(10, 49, 255, 0.15);
  color: var(--white);
}

.course-outline-topic.is-done .course-outline-topic-title::before {
  content: '✓ ';
  color: var(--green-500);
}

.course-outline-topic-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.course-outline-topic-type {
  font-size: 0.72rem;
  color: var(--grey-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.course-main {
  display: flex;
  flex-direction: column;
  min-height: 24rem;
}

.course-topic-panel {
  flex: 1;
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
}

.course-topic-title {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--white);
}

.course-topic-meta {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--grey-500);
}

.course-video-wrap {
  position: relative;
  margin-bottom: 1.25rem;
  padding-bottom: 56.25%;
  background: var(--grey-950);
  border-radius: var(--radius);
  overflow: hidden;
}

.course-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.course-topic-body {
  max-width: 52rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--grey-200);
}

.course-topic-body > :first-child {
  margin-top: 0;
}

.course-topic-body > :last-child {
  margin-bottom: 0;
}

.course-topic-body h1,
.course-topic-body h2,
.course-topic-body h3,
.course-topic-body h4 {
  margin: 1.75rem 0 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.3;
  color: var(--white);
}

.course-topic-body h1 {
  font-size: 1.5rem;
}

.course-topic-body h2 {
  font-size: 1.3rem;
}

.course-topic-body h3 {
  font-size: 1.12rem;
}

.course-topic-body h4 {
  font-size: 1rem;
  color: var(--grey-100);
}

.course-topic-body p {
  margin: 0 0 1rem;
}

.course-topic-body strong {
  font-weight: 700;
  color: var(--white);
}

.course-topic-body em {
  font-style: italic;
}

.course-topic-body a {
  color: var(--blue-400);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.course-topic-body a:hover {
  color: color-mix(in srgb, var(--blue-400) 80%, white);
}

.course-topic-body ul,
.course-topic-body ol {
  margin: 0 0 1.15rem;
  padding-left: 1.5rem;
}

.course-topic-body li {
  margin-bottom: 0.45rem;
}

.course-topic-body li::marker {
  color: var(--blue-400);
}

.course-topic-body ul ul,
.course-topic-body ol ol,
.course-topic-body ul ol,
.course-topic-body ol ul {
  margin-top: 0.45rem;
  margin-bottom: 0.35rem;
}

.course-topic-body blockquote {
  margin: 1rem 0 1.25rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--blue-rich);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: color-mix(in srgb, var(--blue-rich) 12%, var(--grey-950));
  color: var(--grey-100);
}

.course-topic-body hr {
  margin: 1.5rem 0;
  border: 0;
  border-top: 1px solid var(--grey-800);
}

.course-topic-body code {
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  background: var(--grey-900);
  font-size: 0.9em;
  color: var(--grey-100);
}

.course-topic-body pre {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  overflow-x: auto;
  border-radius: var(--radius);
  background: var(--grey-950);
  border: 1px solid var(--grey-800);
  font-size: 0.88rem;
  line-height: 1.5;
}

.course-topic-body pre code {
  padding: 0;
  background: transparent;
}

.course-topic-table-wrap {
  margin: 1.25rem 0 1.5rem;
  overflow-x: auto;
  border: 1px solid var(--grey-800);
  border-radius: var(--radius);
  background: var(--grey-950);
}

.course-topic-body table {
  width: 100%;
  min-width: 28rem;
  margin: 0;
  border-collapse: collapse;
  border: 0 !important;
  font-size: 0.9rem;
  line-height: 1.45;
}

.course-topic-body table[border],
.course-topic-body table[border] th,
.course-topic-body table[border] td {
  border: 0 !important;
}

.course-topic-body th,
.course-topic-body td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--grey-800);
  border-right: 1px solid var(--grey-800);
}

.course-topic-body th:last-child,
.course-topic-body td:last-child {
  border-right: 0;
}

.course-topic-body tr:last-child th,
.course-topic-body tr:last-child td {
  border-bottom: 0;
}

.course-topic-body table:not(:has(thead)):not(:has(th)) tr:first-child td {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--grey-200);
  background: color-mix(in srgb, var(--blue-rich) 22%, var(--grey-950));
}

.course-topic-body th {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--grey-200);
  background: color-mix(in srgb, var(--blue-rich) 22%, var(--grey-950));
}

.course-topic-body tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--grey-900) 55%, transparent);
}

.course-topic-body tbody tr:hover td {
  background: color-mix(in srgb, var(--blue-rich) 8%, var(--grey-950));
}

.course-quiz {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  background: var(--grey-950);
  border: 1px solid var(--grey-800);
  border-radius: var(--radius);
}

.course-quiz-intro {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  color: var(--grey-300);
}

.course-quiz-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--grey-800);
}

.course-quiz-item:last-of-type {
  margin-bottom: 1rem;
  padding-bottom: 0;
  border-bottom: 0;
}

.course-quiz-num {
  color: var(--blue-400);
  font-weight: 700;
}

.course-quiz-item-feedback {
  margin: 0.65rem 0 0;
  font-size: 0.9rem;
  line-height: 1.55;
}

.course-quiz-item-feedback:empty {
  display: none;
}

.course-quiz-item-feedback.course-quiz-feedback-error {
  padding: 0.7rem 0.95rem;
  border-radius: var(--radius);
  border-left: 3px solid var(--red-500);
  background: color-mix(in srgb, var(--red-500) 16%, var(--grey-950));
  color: var(--grey-100);
}

.course-quiz-item-feedback.course-quiz-feedback-ok {
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius);
  border-left: 3px solid var(--green-500);
  background: color-mix(in srgb, var(--green-500) 14%, var(--grey-950));
  color: color-mix(in srgb, var(--green-500) 45%, white);
  font-weight: 600;
}

.course-quiz-question {
  margin: 0 0 0.85rem;
  font-weight: 600;
  color: var(--white);
}

.course-quiz-option {
  display: block;
  margin-bottom: 0.5rem;
  cursor: pointer;
  color: var(--grey-200);
}

.course-quiz-feedback {
  margin: 0.75rem 0 0;
  font-size: 0.92rem;
}

.course-quiz-feedback-ok {
  color: var(--green-500);
}

.course-quiz-feedback-error {
  color: var(--red-500);
}

.course-topic-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--grey-800);
  background: var(--grey-950);
}

@media (max-width: 900px) {
  .academy-grid {
    grid-template-columns: 1fr;
  }

  .course-layout-inner {
    grid-template-columns: 1fr;
  }

  .course-outline {
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--grey-800);
  }
}

.module-nav-link:hover,
.module-nav-link.is-active {
  color: var(--white);
  background: rgba(10, 49, 255, 0.15);
}

.module-main {
  padding: 1.5rem 1.75rem 2.5rem;
}

.module-page-header h1 {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: var(--text-h2);
  color: var(--white);
}

.module-card {
  padding: 1.25rem 1.5rem;
  background: var(--grey-900);
  border: 1px solid var(--grey-800);
  border-radius: var(--radius-lg);
}

.module-lead {
  margin: 0 0 1rem;
  color: var(--grey-300);
  line-height: 1.6;
}

.module-link-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--grey-200);
}

.module-link-list a {
  color: var(--blue-400);
}

.module-table-wrap {
  overflow-x: auto;
}

.module-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.module-table th,
.module-table td {
  padding: 0.5rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid var(--grey-800);
}

.module-table th {
  color: var(--grey-400);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.module-table code {
  font-size: 0.85em;
  color: var(--grey-300);
}

.module-role-select {
  padding: 0.35rem 0.45rem;
  background: var(--grey-800);
  border: 1px solid var(--grey-700);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 0.85rem;
}

.module-error {
  color: var(--red-500);
}

.dashboard-profile-list {
  margin: 0 0 1.25rem;
  display: grid;
  gap: 0.65rem;
}

.dashboard-profile-list > div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.5rem;
  align-items: baseline;
}

.dashboard-profile-list dt {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--grey-400);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-profile-list dd {
  margin: 0;
  color: var(--grey-100);
}

/* Dashboard · Personal Info */
.dashboard-profile-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dashboard-profile-intro {
  margin: 0;
  max-width: 42rem;
  color: var(--grey-300);
  line-height: 1.65;
  font-size: 0.98rem;
}

.dashboard-profile-grid {
  display: grid;
  gap: 1.25rem;
  align-items: stretch;
}

@media (min-width: 960px) {
  .dashboard-profile-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.dashboard-profile-panel.module-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--red-500) 22%, var(--grey-800));
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--grey-900) 92%, var(--red-dark) 8%) 0%,
    var(--grey-900) 45%
  );
}

.dashboard-profile-panel-header {
  padding: 1.35rem 1.5rem 1.1rem;
  border-bottom: 1px solid color-mix(in srgb, var(--red-dark) 35%, var(--grey-800));
  border-left: 4px solid var(--red-500);
  background: color-mix(in srgb, var(--grey-800) 55%, transparent);
}

.dashboard-profile-panel-eyebrow {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red-500);
}

.dashboard-profile-panel-title {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.25;
}

.dashboard-profile-panel-desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--grey-400);
  line-height: 1.55;
  max-width: 32rem;
}

.dashboard-profile-panel.is-loading .dashboard-profile-form {
  opacity: 0.55;
  pointer-events: none;
}

.dashboard-profile-form {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0;
  margin: 0;
  min-height: 0;
}

.dashboard-profile-group {
  margin: 0;
  padding: 1.25rem 1.5rem;
  border: 0;
  min-width: 0;
}

.dashboard-profile-form > .dashboard-profile-group:last-of-type {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dashboard-profile-group + .dashboard-profile-group {
  border-top: 1px solid var(--grey-800);
}

.dashboard-profile-group-title {
  display: block;
  width: 100%;
  margin: 0 0 1rem;
  padding: 0.75rem 0 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-400);
}

.dashboard-profile-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.dashboard-profile-field:last-child {
  margin-bottom: 0;
}

.dashboard-profile-field-narrow {
  max-width: 10rem;
}

.dashboard-profile-field label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--grey-200);
}

.dashboard-profile-form input,
.dashboard-profile-form textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  background: var(--grey-800);
  border: 1px solid var(--grey-700);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-profile-form input::placeholder,
.dashboard-profile-form textarea::placeholder {
  color: var(--grey-500);
}

.dashboard-profile-form textarea {
  resize: vertical;
  min-height: 8.5rem;
  line-height: 1.55;
}

#profile-professional-panel .dashboard-profile-group:last-of-type .dashboard-profile-field:last-child {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

#profile-professional-panel .dashboard-profile-group:last-of-type textarea {
  flex: 1;
  min-height: 8.5rem;
}

.dashboard-profile-form input:hover:not(:disabled):not([readonly]),
.dashboard-profile-form textarea:hover:not(:disabled) {
  border-color: var(--grey-600);
}

.dashboard-profile-form input:focus,
.dashboard-profile-form textarea:focus {
  outline: none;
  border-color: var(--red-500);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--red-500) 25%, transparent);
}

.dashboard-profile-form input:disabled,
.dashboard-profile-form textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dashboard-profile-form input[readonly] {
  background: color-mix(in srgb, var(--grey-800) 70%, var(--grey-900));
  border-color: var(--grey-750, #2a2a30);
  color: var(--grey-300);
  cursor: default;
}

.dashboard-profile-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--grey-500);
  line-height: 1.45;
}

.dashboard-profile-form-row {
  display: grid;
  gap: 1rem;
}

@media (min-width: 520px) {
  .dashboard-profile-form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.dashboard-profile-form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-top: auto;
  padding: 1.1rem 1.5rem 1.35rem;
  border-top: 1px solid var(--grey-800);
  background: color-mix(in srgb, var(--grey-800) 40%, transparent);
  flex-shrink: 0;
}

.dashboard-profile-form-footer .btn {
  min-width: 11rem;
}

.dashboard-profile-form-status {
  margin: 0;
  flex: 1 1 12rem;
  font-size: 0.9rem;
  color: var(--grey-300);
}

.dashboard-profile-form-status:not([hidden]) {
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--grey-800) 80%, transparent);
}

.dashboard-profile-form-status-ok {
  color: var(--green-400, #6ee7a0);
  background: color-mix(in srgb, var(--green-400, #6ee7a0) 12%, var(--grey-800));
}

.dashboard-profile-form-status-error {
  color: var(--red-500);
  background: color-mix(in srgb, var(--red-500) 12%, var(--grey-800));
}

.dashboard-submissions-loading,
.dashboard-submissions-empty {
  margin: 0;
  color: var(--grey-300);
}

.dashboard-submissions-empty a {
  color: var(--red-500);
}

.dashboard-submissions-list {
  display: grid;
  gap: 1rem;
  margin-top: 0.5rem;
}

.dashboard-submission-card {
  margin: 0;
  padding: 1rem 1rem 1rem 1.1rem;
  background: var(--grey-800);
  border: 1px solid color-mix(in srgb, var(--red-500) 35%, var(--grey-700));
  border-left: 4px solid var(--red-500);
  border-radius: var(--radius);
}

.dashboard-submission-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid color-mix(in srgb, var(--red-dark) 40%, var(--grey-700));
}

.dashboard-submission-type {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--red-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-submission-date {
  font-size: 0.85rem;
  color: var(--grey-400);
}

.dashboard-submission-body {
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.dashboard-submission-field {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.5rem;
  align-items: start;
}

.dashboard-submission-field dt {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--grey-400);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dashboard-submission-field dd {
  margin: 0;
  color: var(--grey-100);
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 520px) {
  .dashboard-submission-field {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

.dashboard-help-heading {
  margin: 1.5rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--white);
}

.dashboard-help-heading:first-of-type {
  margin-top: 0;
}

@media (max-width: 768px) {
  .module-layout {
    grid-template-columns: 1fr;
  }

  .module-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--grey-800);
  }

  .module-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* Dashboard — Top priorities color scheme (home #priorities section) */
body[data-module-access="dashboard"] {
  --dash-bg: color-mix(in srgb, var(--blue-rich) 88%, white);
  --dash-surface: var(--white);
  --dash-text: var(--grey-950);
  --dash-text-body: var(--grey-800);
  --dash-text-muted: var(--grey-700);
  --dash-border: color-mix(in srgb, var(--blue-rich) 18%, var(--grey-300));
  --dash-shadow: -4px 0 12px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(10, 49, 255, 0.08);
  background: var(--dash-bg);
  color: var(--dash-text-body);
}

body[data-module-access="dashboard"] .module-topbar {
  background: var(--dash-surface);
  border-bottom: 1px solid var(--dash-border);
  box-shadow: 0 2px 12px rgba(10, 49, 255, 0.06);
}

body[data-module-access="dashboard"] .logo {
  color: var(--dash-text);
}

body[data-module-access="dashboard"] .logo-text {
  color: var(--dash-text);
}

body[data-module-access="dashboard"] .logo-accent {
  color: var(--blue-rich);
}

body[data-module-access="dashboard"] .module-user-label {
  color: var(--dash-text-muted);
}

body[data-module-access="dashboard"] .module-sidebar {
  background: color-mix(in srgb, var(--white) 92%, var(--blue-rich) 8%);
  border-right: 1px solid var(--dash-border);
}

body[data-module-access="dashboard"] .module-sidebar-title {
  color: var(--blue-rich);
}

body[data-module-access="dashboard"] .module-nav-link {
  color: var(--dash-text-body);
}

body[data-module-access="dashboard"] .module-nav-link:hover,
body[data-module-access="dashboard"] .module-nav-link.is-active {
  color: var(--blue-rich);
  background: color-mix(in srgb, var(--blue-rich) 10%, white);
}

body[data-module-access="dashboard"] .module-nav-divider {
  border-top-color: var(--dash-border);
}

body[data-module-access="dashboard"] .module-main {
  background: var(--dash-bg);
}

body[data-module-access="dashboard"] .module-page-header h1 {
  color: var(--white);
}

body[data-module-access="dashboard"] .module-card {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-left: 12px solid var(--yellow-500);
  border-radius: var(--radius-lg);
  box-shadow: -4px 0 16px rgba(234, 179, 8, 0.35), 0 8px 24px rgba(0, 0, 0, 0.08);
  color: var(--dash-text-body);
}

body[data-module-access="dashboard"] .module-lead {
  color: var(--dash-text-body);
}

body[data-module-access="dashboard"] .module-lead strong {
  color: var(--dash-text);
}

body[data-module-access="dashboard"] .module-link-list {
  color: var(--dash-text-body);
}

body[data-module-access="dashboard"] .module-link-list a {
  color: var(--blue-rich);
  font-weight: 600;
}

body[data-module-access="dashboard"] .module-table th {
  color: var(--dash-text-muted);
}

body[data-module-access="dashboard"] .module-table td {
  color: var(--dash-text-body);
  border-bottom-color: var(--dash-border);
}

body[data-module-access="dashboard"] .module-table code {
  color: var(--dash-text);
}

body[data-module-access="dashboard"] .module-role-select {
  background: var(--white);
  border-color: var(--dash-border);
  color: var(--dash-text);
}

body[data-module-access="dashboard"] .module-footer {
  background: color-mix(in srgb, var(--white) 85%, var(--blue-rich) 15%);
  border-top: 1px solid var(--dash-border);
}

body[data-module-access="dashboard"] .module-footer-copy {
  color: var(--dash-text-muted);
}

body[data-module-access="dashboard"] .module-access-denied-inner h1 {
  color: var(--white);
}

body[data-module-access="dashboard"] .module-access-denied-inner p {
  color: color-mix(in srgb, var(--white) 88%, transparent);
}

body[data-module-access="dashboard"] .module-auth-loading {
  color: var(--white);
}

/* Tools */
body[data-module-access="dashboard"] .tool-card {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-left: 12px solid var(--green-500);
  box-shadow: -4px 0 16px rgba(34, 197, 94, 0.35), 0 8px 24px rgba(0, 0, 0, 0.08);
}

body[data-module-access="dashboard"] .tool-card:hover,
body[data-module-access="dashboard"] .tool-card:focus-visible {
  border-color: var(--dash-border);
  border-left-color: var(--green-500);
  box-shadow: -6px 0 28px rgba(34, 197, 94, 0.5), 0 14px 36px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

body[data-module-access="dashboard"] .tool-card-title {
  color: var(--dash-text);
}

body[data-module-access="dashboard"] .tool-card-summary {
  color: var(--dash-text-body);
}

body[data-module-access="dashboard"] .tool-card-cta {
  color: var(--blue-rich);
}

body[data-module-access="dashboard"] .tool-back-link,
body[data-module-access="dashboard"] .course-back-link {
  color: var(--white);
}

body[data-module-access="dashboard"] .tool-back-link:hover,
body[data-module-access="dashboard"] .course-back-link:hover {
  color: color-mix(in srgb, var(--white) 85%, var(--blue-rich));
}

body[data-module-access="dashboard"] .tool-radio {
  color: var(--dash-text-body);
}

body[data-module-access="dashboard"] .tool-panel label {
  color: var(--dash-text);
}

body[data-module-access="dashboard"] .tool-select,
body[data-module-access="dashboard"] .tool-textarea {
  background: var(--white);
  border-color: var(--dash-border);
  color: var(--dash-text);
}

body[data-module-access="dashboard"] .tool-textarea-output {
  background: color-mix(in srgb, var(--grey-100) 80%, white);
}

body[data-module-access="dashboard"] .tool-status {
  color: var(--dash-text-muted);
}

/* Academy */
body[data-module-access="dashboard"] .academy-category-title {
  color: var(--white);
}

body[data-module-access="dashboard"] .academy-card {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-left: 12px solid var(--purple-500);
  box-shadow: -4px 0 16px rgba(168, 85, 247, 0.2), var(--dash-shadow);
}

body[data-module-access="dashboard"] .academy-card:hover,
body[data-module-access="dashboard"] .academy-card:focus-visible {
  border-color: var(--purple-500);
  box-shadow: -6px 0 28px rgba(168, 85, 247, 0.35), 0 14px 36px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

body[data-module-access="dashboard"] .academy-card-category {
  color: var(--purple-600);
}

body[data-module-access="dashboard"] .academy-card-title {
  color: var(--dash-text);
}

body[data-module-access="dashboard"] .course-summary-html strong,
body[data-module-access="dashboard"] .course-summary-html b {
  color: var(--dash-text);
}

body[data-module-access="dashboard"] .academy-card-summary {
  color: var(--dash-text-body);
}

body[data-module-access="dashboard"] .academy-card-cta {
  color: var(--blue-rich);
}

body[data-module-access="dashboard"] .academy-card-progress-bar {
  background: color-mix(in srgb, var(--grey-300) 55%, white);
}

body[data-module-access="dashboard"] .academy-card-progress-label {
  color: var(--dash-text-body);
}

body[data-module-access="dashboard"] .academy-card-is-complete .academy-card-progress-label {
  color: var(--green-600);
}

/* Course player */
body[data-module-access="dashboard"] .course-shell {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-left: 12px solid var(--green-500);
  box-shadow: -4px 0 16px rgba(34, 197, 94, 0.2), var(--dash-shadow);
}

body[data-module-access="dashboard"] .course-header {
  border-bottom-color: var(--dash-border);
}

body[data-module-access="dashboard"] .course-header .module-lead {
  color: var(--dash-text-body);
}

body[data-module-access="dashboard"] .course-progress-bar {
  background: color-mix(in srgb, var(--grey-300) 50%, white);
}

body[data-module-access="dashboard"] .course-progress-label {
  color: var(--dash-text-muted);
}

body[data-module-access="dashboard"] .course-outline {
  background: color-mix(in srgb, var(--grey-100) 70%, white);
  border-right-color: var(--dash-border);
  max-height: none;
  overflow: visible;
}

body[data-module-access="dashboard"] .course-outline-chapter:not(:last-child) {
  border-bottom-color: var(--dash-border);
}

body[data-module-access="dashboard"] .course-outline-chapter-title {
  color: var(--dash-text-muted);
}

body[data-module-access="dashboard"] .course-outline-topic {
  color: var(--dash-text-body);
}

body[data-module-access="dashboard"] .course-outline-topic:hover,
body[data-module-access="dashboard"] .course-outline-topic.is-active {
  background: color-mix(in srgb, var(--blue-rich) 12%, white);
  color: var(--blue-rich);
}

body[data-module-access="dashboard"] .course-outline-topic-type {
  color: var(--dash-text-muted);
}

body[data-module-access="dashboard"] .course-topic-title {
  color: var(--dash-text);
}

body[data-module-access="dashboard"] .course-topic-meta {
  color: var(--dash-text-muted);
}

body[data-module-access="dashboard"] .course-topic-body {
  color: var(--dash-text-body);
}

body[data-module-access="dashboard"] .course-topic-body h1,
body[data-module-access="dashboard"] .course-topic-body h2,
body[data-module-access="dashboard"] .course-topic-body h3,
body[data-module-access="dashboard"] .course-topic-body h4 {
  color: var(--dash-text);
}

body[data-module-access="dashboard"] .course-topic-body strong {
  color: var(--dash-text);
}

body[data-module-access="dashboard"] .course-topic-body a {
  color: var(--blue-rich);
}

body[data-module-access="dashboard"] .course-topic-body blockquote {
  color: var(--dash-text-body);
  background: color-mix(in srgb, var(--blue-rich) 6%, white);
  border-left-color: var(--blue-rich);
}

body[data-module-access="dashboard"] .course-topic-body code {
  background: color-mix(in srgb, var(--grey-200) 60%, white);
  color: var(--dash-text);
}

body[data-module-access="dashboard"] .course-topic-body pre {
  background: color-mix(in srgb, var(--grey-100) 70%, white);
  border-color: var(--dash-border);
}

body[data-module-access="dashboard"] .course-topic-table-wrap {
  border-color: var(--dash-border);
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

body[data-module-access="dashboard"] .course-topic-body th,
body[data-module-access="dashboard"] .course-topic-body td {
  border-color: var(--dash-border);
}

body[data-module-access="dashboard"] .course-topic-body th,
body[data-module-access="dashboard"] .course-topic-body table:not(:has(thead)):not(:has(th)) tr:first-child td {
  color: var(--dash-text);
  background: color-mix(in srgb, var(--blue-rich) 10%, white);
}

body[data-module-access="dashboard"] .course-topic-body tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--grey-100) 55%, white);
}

body[data-module-access="dashboard"] .course-topic-body tbody tr:hover td {
  background: color-mix(in srgb, var(--blue-rich) 6%, white);
}

body[data-module-access="dashboard"] .course-topic-body hr {
  border-top-color: var(--dash-border);
}

body[data-module-access="dashboard"] .course-quiz {
  background: color-mix(in srgb, var(--grey-100) 60%, white);
  border-color: var(--dash-border);
}

body[data-module-access="dashboard"] .course-quiz-intro {
  color: var(--dash-text);
}

body[data-module-access="dashboard"] .course-quiz-question {
  color: var(--dash-text);
}

body[data-module-access="dashboard"] .course-quiz-option {
  color: var(--dash-text-body);
}

body[data-module-access="dashboard"] .course-quiz-item-feedback.course-quiz-feedback-error {
  color: var(--grey-900);
  background: color-mix(in srgb, var(--red-500) 12%, white);
  border-left-color: var(--red-500);
}

body[data-module-access="dashboard"] .course-quiz-item-feedback.course-quiz-feedback-ok {
  color: var(--grey-900);
  background: color-mix(in srgb, var(--green-500) 14%, white);
  border-left-color: var(--green-500);
}

body[data-module-access="dashboard"] .course-quiz-feedback-error {
  color: #b91c1c;
  font-weight: 600;
}

body[data-module-access="dashboard"] .course-quiz-feedback-ok {
  color: #15803d;
  font-weight: 600;
}

body[data-module-access="dashboard"] .course-topic-footer {
  background: color-mix(in srgb, var(--grey-100) 70%, white);
  border-top-color: var(--dash-border);
}

body[data-module-access="dashboard"] .course-topic-footer .btn-secondary {
  background: var(--white);
  color: var(--dash-text);
  box-shadow: inset 0 0 0 2px var(--dash-border);
}

body[data-module-access="dashboard"] .course-topic-footer .btn-secondary:hover:not(:disabled) {
  color: var(--blue-rich);
  box-shadow: inset 0 0 0 2px var(--blue-rich);
  background: color-mix(in srgb, var(--blue-rich) 6%, white);
}

body[data-module-access="dashboard"] .course-topic-footer .btn-secondary:disabled {
  color: var(--dash-text-muted);
  background: color-mix(in srgb, var(--grey-100) 80%, white);
  box-shadow: inset 0 0 0 2px var(--grey-300);
  opacity: 1;
  cursor: not-allowed;
  transform: none;
}

body[data-module-access="dashboard"] .course-topic-footer .btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* Personal info */
body[data-module-access="dashboard"] .dashboard-profile-intro {
  color: color-mix(in srgb, var(--white) 95%, transparent);
}

body[data-module-access="dashboard"] .dashboard-profile-panel.module-card {
  border-left-width: 12px;
  border-left-color: var(--red-500);
  background: var(--dash-surface);
  box-shadow: -4px 0 16px rgba(239, 68, 68, 0.15), var(--dash-shadow);
}

body[data-module-access="dashboard"] .dashboard-profile-panel-header {
  border-bottom-color: var(--dash-border);
  border-left: none;
  background: color-mix(in srgb, var(--grey-100) 50%, white);
}

body[data-module-access="dashboard"] .dashboard-profile-panel-title {
  color: var(--dash-text);
}

body[data-module-access="dashboard"] .dashboard-profile-panel-desc {
  color: var(--dash-text-body);
}

body[data-module-access="dashboard"] .dashboard-profile-group + .dashboard-profile-group {
  border-top-color: var(--dash-border);
}

body[data-module-access="dashboard"] .dashboard-profile-group-title {
  color: var(--dash-text-muted);
}

body[data-module-access="dashboard"] .dashboard-profile-field label {
  color: var(--dash-text);
}

body[data-module-access="dashboard"] .dashboard-profile-form input,
body[data-module-access="dashboard"] .dashboard-profile-form textarea {
  background: var(--white);
  border-color: var(--dash-border);
  color: var(--dash-text);
}

body[data-module-access="dashboard"] .dashboard-profile-form input::placeholder,
body[data-module-access="dashboard"] .dashboard-profile-form textarea::placeholder {
  color: var(--grey-500);
}

body[data-module-access="dashboard"] .dashboard-profile-form input[readonly] {
  background: color-mix(in srgb, var(--grey-100) 80%, white);
  color: var(--dash-text-muted);
}

body[data-module-access="dashboard"] .dashboard-profile-hint {
  color: var(--dash-text-muted);
}

body[data-module-access="dashboard"] .dashboard-profile-form-footer {
  border-top-color: var(--dash-border);
  background: color-mix(in srgb, var(--grey-100) 55%, white);
}

body[data-module-access="dashboard"] .dashboard-profile-form-status {
  color: var(--dash-text-body);
}

body[data-module-access="dashboard"] .dashboard-profile-form-status:not([hidden]) {
  background: color-mix(in srgb, var(--grey-100) 70%, white);
}

body[data-module-access="dashboard"] .dashboard-profile-form-status-ok {
  color: var(--green-600);
  background: rgba(34, 197, 94, 0.12);
}

body[data-module-access="dashboard"] .dashboard-profile-form-status-error {
  color: var(--red-600);
  background: rgba(239, 68, 68, 0.1);
}

/* Submissions */
body[data-module-access="dashboard"] .dashboard-submissions-loading,
body[data-module-access="dashboard"] .dashboard-submissions-empty {
  color: color-mix(in srgb, var(--white) 92%, transparent);
}

body[data-module-access="dashboard"] .dashboard-submissions-empty a {
  color: var(--white);
  font-weight: 600;
  text-decoration: underline;
}

body[data-module-access="dashboard"] .dashboard-submission-card {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-left: 12px solid var(--red-500);
  box-shadow: -4px 0 16px rgba(239, 68, 68, 0.2), var(--dash-shadow);
}

body[data-module-access="dashboard"] .dashboard-submission-header {
  border-bottom-color: var(--dash-border);
}

body[data-module-access="dashboard"] .dashboard-submission-type {
  color: var(--red-600);
}

body[data-module-access="dashboard"] .dashboard-submission-date {
  color: var(--dash-text-muted);
}

body[data-module-access="dashboard"] .dashboard-submission-field dt {
  color: var(--dash-text-muted);
}

body[data-module-access="dashboard"] .dashboard-submission-field dd {
  color: var(--dash-text-body);
}

/* Help */
body[data-module-access="dashboard"] .dashboard-help-heading {
  color: var(--dash-text);
}

body[data-module-access="dashboard"] .module-error {
  color: var(--red-600);
}

@media (max-width: 768px) {
  body[data-module-access="dashboard"] .module-sidebar {
    border-bottom-color: var(--dash-border);
  }
}

/* Admin — What we deliver (#capabilities) color scheme */
body[data-module-access="admin"] {
  --admin-bg: var(--red-dark);
  --admin-surface: rgba(255, 255, 255, 0.1);
  --admin-surface-hover: rgba(255, 255, 255, 0.18);
  --admin-text: var(--white);
  --admin-text-body: var(--grey-300);
  --admin-text-muted: var(--grey-400);
  --admin-border: rgba(255, 255, 255, 0.2);
  --admin-border-strong: rgba(96, 165, 250, 0.55);
  --admin-accent: var(--blue-400);
  --admin-shadow: 0 14px 40px rgba(12, 45, 255, 0.22), 0 8px 24px rgba(0, 0, 0, 0.25);
  background: var(--admin-bg);
  color: var(--admin-text-body);
}

body[data-module-access="admin"] .module-topbar {
  background: color-mix(in srgb, var(--red-dark) 92%, black);
  border-bottom: 1px solid var(--admin-border);
}

body[data-module-access="admin"] .logo,
body[data-module-access="admin"] .logo-text {
  color: var(--admin-text);
}

body[data-module-access="admin"] .logo-accent {
  color: var(--admin-accent);
}

body[data-module-access="admin"] .module-user-label {
  color: var(--admin-text-muted);
}

body[data-module-access="admin"] .module-sidebar {
  background: color-mix(in srgb, var(--red-dark) 88%, black);
  border-right: 1px solid var(--admin-border);
}

body[data-module-access="admin"] .module-sidebar-title {
  color: var(--admin-accent);
}

body[data-module-access="admin"] .module-nav-link {
  color: var(--admin-text-body);
}

body[data-module-access="admin"] .module-nav-link:hover,
body[data-module-access="admin"] .module-nav-link.is-active {
  color: var(--admin-text);
  background: var(--admin-surface-hover);
  border-color: var(--admin-border-strong);
}

body[data-module-access="admin"] .module-nav-divider {
  border-top-color: var(--admin-border);
}

body[data-module-access="admin"] .module-main {
  background: var(--admin-bg);
}

body[data-module-access="admin"] .module-page-header h1 {
  color: var(--admin-text);
}

body[data-module-access="admin"] .module-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--admin-shadow);
  color: var(--admin-text-body);
}

body[data-module-access="admin"] .module-lead {
  color: var(--admin-text-body);
}

body[data-module-access="admin"] .module-lead strong {
  color: var(--admin-text);
}

body[data-module-access="admin"] .module-link-list {
  color: var(--admin-text-body);
}

body[data-module-access="admin"] .module-link-list a {
  color: var(--admin-accent);
}

body[data-module-access="admin"] .module-table th {
  color: var(--admin-text-muted);
}

body[data-module-access="admin"] .module-table td {
  color: var(--admin-text-body);
  border-bottom-color: var(--admin-border);
}

body[data-module-access="admin"] .module-table code {
  color: var(--admin-accent);
}

body[data-module-access="admin"] .module-table-actions a {
  color: var(--admin-accent);
}

body[data-module-access="admin"] .module-role-select {
  background: rgba(0, 0, 0, 0.25);
  border-color: var(--admin-border);
  color: var(--admin-text);
}

body[data-module-access="admin"] .module-footer {
  background: color-mix(in srgb, var(--red-dark) 92%, black);
  border-top-color: var(--admin-border);
}

body[data-module-access="admin"] .module-footer-copy {
  color: var(--admin-text-muted);
}

body[data-module-access="admin"] .module-access-denied-inner h1 {
  color: var(--admin-text);
}

body[data-module-access="admin"] .module-access-denied-inner p {
  color: var(--admin-text-body);
}

body[data-module-access="admin"] .module-auth-loading {
  color: var(--admin-text-body);
}

body[data-module-access="admin"] .module-error {
  color: color-mix(in srgb, var(--red-500) 75%, white);
}

body[data-module-access="admin"] .auth-link {
  color: var(--admin-accent);
}

body[data-module-access="admin"] .auth-link:hover {
  color: var(--white);
}

@media (max-width: 768px) {
  body[data-module-access="admin"] .module-sidebar {
    border-bottom-color: var(--admin-border);
  }
}

/* CMS — Our mission (#mission) color scheme */
body[data-module-access="cms"] {
  --cms-bg: var(--white);
  --cms-surface: var(--grey-100);
  --cms-text: var(--grey-950);
  --cms-text-body: var(--grey-800);
  --cms-text-muted: var(--grey-700);
  --cms-border: var(--grey-300);
  --cms-accent: var(--blue-rich);
  --cms-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  background: var(--cms-bg);
  color: var(--cms-text-body);
  border-block: none;
}

body[data-module-access="cms"] .module-topbar {
  background: var(--cms-bg);
  border-bottom: 1px solid var(--cms-border);
}

body[data-module-access="cms"] .logo,
body[data-module-access="cms"] .logo-text {
  color: var(--cms-text);
}

body[data-module-access="cms"] .logo-accent {
  color: var(--cms-accent);
}

body[data-module-access="cms"] .module-user-label {
  color: var(--cms-text-muted);
}

body[data-module-access="cms"] .module-sidebar {
  background: var(--cms-bg);
  border-right: 1px solid var(--cms-border);
}

body[data-module-access="cms"] .module-sidebar-title {
  color: var(--cms-accent);
}

body[data-module-access="cms"] .module-nav-link {
  color: var(--cms-text-body);
}

body[data-module-access="cms"] .module-nav-link:hover,
body[data-module-access="cms"] .module-nav-link.is-active {
  color: var(--cms-accent);
  background: color-mix(in srgb, var(--cms-accent) 8%, white);
}

body[data-module-access="cms"] .module-nav-divider {
  border-top-color: var(--cms-border);
}

body[data-module-access="cms"] .module-main {
  background: var(--cms-bg);
  border-top: 1px solid var(--cms-border);
}

body[data-module-access="cms"] .module-page-header h1 {
  color: var(--cms-text);
}

body[data-module-access="cms"] .module-card {
  background: var(--cms-surface);
  border: 1px solid var(--cms-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--cms-shadow);
  color: var(--cms-text-body);
}

body[data-module-access="cms"] .module-lead {
  color: var(--cms-text-body);
}

body[data-module-access="cms"] .module-lead strong {
  color: var(--cms-text);
}

body[data-module-access="cms"] .module-link-list {
  color: var(--cms-text-body);
}

body[data-module-access="cms"] .module-link-list a {
  color: var(--cms-accent);
}

body[data-module-access="cms"] .module-table th {
  color: var(--cms-text-muted);
}

body[data-module-access="cms"] .module-table td {
  color: var(--cms-text-body);
  border-bottom-color: var(--cms-border);
}

body[data-module-access="cms"] .module-table code {
  color: var(--cms-accent);
}

body[data-module-access="cms"] .module-table-actions a {
  color: var(--cms-accent);
}

body[data-module-access="cms"] .module-table-link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--cms-accent);
  cursor: pointer;
  text-decoration: underline;
}

body[data-module-access="cms"] .cms-btn-danger {
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.35);
}

body[data-module-access="cms"] .module-role-select {
  background: var(--white);
  border-color: var(--cms-border);
  color: var(--cms-text);
}

body[data-module-access="cms"] .module-footer {
  background: var(--cms-bg);
  border-top: 1px solid var(--cms-border);
}

body[data-module-access="cms"] .module-footer-copy {
  color: var(--cms-text-muted);
}

body[data-module-access="cms"] .module-access-denied-inner h1 {
  color: var(--cms-text);
}

body[data-module-access="cms"] .module-access-denied-inner p {
  color: var(--cms-text-body);
}

body[data-module-access="cms"] .module-auth-loading {
  color: var(--cms-text-body);
}

body[data-module-access="cms"] .module-error {
  color: var(--red-600);
}

body[data-module-access="cms"] .btn-secondary {
  color: var(--cms-text);
  background: var(--white);
  box-shadow: inset 0 0 0 2px var(--cms-border);
}

body[data-module-access="cms"] .btn-secondary:hover {
  color: var(--cms-accent);
  box-shadow: inset 0 0 0 2px var(--cms-accent);
  background: color-mix(in srgb, var(--cms-accent) 6%, white);
}

body[data-module-access="cms"] .course-back-link {
  color: var(--cms-accent);
}

body[data-module-access="cms"] .course-back-link:hover {
  color: var(--blue-600);
}

body[data-module-access="cms"] .cms-course-status {
  color: var(--cms-text-muted);
}

.cms-prompt-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-bottom: 1rem;
}

.cms-prompt-filters label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--grey-400);
}

.cms-prompt-filters select {
  min-width: 12rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--grey-700);
  border-radius: var(--radius);
  background: var(--grey-900);
  color: var(--white);
  font-size: 0.9rem;
}

.cms-prompt-category-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--grey-100);
  background: color-mix(in srgb, var(--blue-rich) 35%, var(--grey-900));
}

.cms-prompt-preview-cell {
  max-width: 22rem;
  font-size: 0.85rem;
  color: var(--grey-400);
  line-height: 1.45;
}

.cms-prompt-body-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.5;
}

body[data-module-access="cms"] .cms-prompt-filters label {
  color: var(--dash-text-muted);
}

body[data-module-access="cms"] .cms-prompt-filters select {
  border-color: var(--dash-border);
  background: var(--white);
  color: var(--dash-text);
}

body[data-module-access="cms"] .cms-prompt-category-badge {
  color: var(--dash-text);
  background: color-mix(in srgb, var(--blue-rich) 12%, white);
}

body[data-module-access="cms"] .cms-prompt-preview-cell {
  color: var(--dash-text-muted);
}

body[data-module-access="cms"] .cms-course-editor .cms-field label,
body[data-module-access="cms"] .cms-course-editor .cms-fieldset legend {
  color: var(--cms-text-muted);
}

body[data-module-access="cms"] .cms-course-editor .cms-chapter {
  background: var(--white);
  border-color: var(--cms-border);
}

body[data-module-access="cms"] .cms-course-editor .cms-chapter-title {
  color: var(--cms-text);
}

body[data-module-access="cms"] .cms-course-editor .cms-topic-heading {
  color: var(--cms-text);
}

body[data-module-access="cms"] .cms-course-editor .cms-remove-topic.btn-secondary {
  color: var(--cms-text);
  background: var(--white);
  box-shadow: inset 0 0 0 2px var(--cms-border);
}

body[data-module-access="cms"] .cms-course-editor .cms-remove-topic.btn-secondary:hover {
  color: var(--cms-accent);
  box-shadow: inset 0 0 0 2px var(--cms-accent);
  background: color-mix(in srgb, var(--cms-accent) 6%, white);
}

body[data-module-access="cms"] .cms-field input[readonly] {
  background: color-mix(in srgb, var(--grey-100) 85%, var(--grey-300));
  color: var(--cms-text-muted);
  cursor: default;
}

@media (max-width: 768px) {
  body[data-module-access="cms"] .module-sidebar {
    border-bottom-color: var(--cms-border);
  }
}

/* CMS · Academy courses */
.cms-course-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cms-course-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.cms-course-status {
  margin: 0;
  font-size: 0.9rem;
  color: var(--grey-700);
}

.cms-course-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cms-fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

.cms-fieldset legend {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--grey-950);
}

.cms-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.cms-field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--grey-700);
}

.cms-field-hint {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  color: var(--grey-500);
  line-height: 1.45;
}

.cms-field-hint code {
  font-size: 0.78rem;
}

.cms-field input,
.cms-field textarea,
.cms-field select {
  font: inherit;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--grey-300);
  border-radius: 6px;
  background: var(--white);
  color: var(--grey-950);
}

.cms-field-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .cms-field-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .cms-field-row .cms-field-narrow {
    max-width: 12rem;
  }

  .cms-package-meta-row,
  .cms-course-meta-row {
    grid-template-columns: 1fr minmax(7rem, 10rem) minmax(9rem, 12rem);
  }

  .cms-package-meta-row .cms-field-narrow,
  .cms-course-meta-row .cms-field-narrow {
    max-width: none;
  }

  .cms-priority-tag-row {
    grid-template-columns: 1fr minmax(4.5rem, 6rem) minmax(8.5rem, 10.5rem);
  }
}

.cms-chapter {
  border: 1px solid var(--grey-200);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  background: var(--grey-50);
}

.cms-chapter-head,
.cms-topic-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.cms-chapter-title,
.cms-topic-heading {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.cms-topic {
  border: 1px dashed var(--grey-300);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
  background: var(--white);
}

.cms-topic-fields .is-topic-field-hidden {
  display: none !important;
}

.cms-topic-fields[data-type="text"] .cms-topic-video,
.cms-topic-fields[data-type="text"] .cms-topic-quiz,
.cms-topic-fields[data-type="video"] .cms-topic-quiz,
.cms-topic-fields[data-type="quiz"] .cms-topic-video,
.cms-topic-fields[data-type="quiz"] .cms-topic-body {
  display: none !important;
}

.module-table-actions {
  white-space: nowrap;
}

/* CMS · Package editor hero preview (16:9 offering banner) */
.cms-package-hero-field {
  width: 100%;
}

.cms-package-hero-preview {
  width: 100%;
  max-width: 100%;
  margin: 0.75rem auto 0;
  aspect-ratio: 16 / 9;
  background: var(--grey-100);
  border: 1px solid var(--grey-300);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

body[data-module-access="cms"] .cms-package-hero-preview {
  border-color: var(--cms-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.cms-package-hero-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.cms-package-hero-preview-empty {
  margin: 0;
  padding: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--grey-600);
  line-height: 1.5;
}

body[data-module-access="cms"] .cms-package-hero-preview-empty {
  color: var(--cms-text-muted);
}

.cms-package-hero-preview--loaded .cms-package-hero-preview-empty {
  display: none;
}

/* CMS · Tool editor card thumbnail preview (matches Dashboard .tool-card-thumb) */
.cms-tool-thumb-field {
  width: 100%;
}

.cms-tool-thumb-preview-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.cms-tool-thumb-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--grey-800);
  border: 1px solid var(--grey-300);
}

body[data-module-access="cms"] .cms-tool-thumb-preview {
  border-color: var(--cms-border);
}

.cms-tool-thumb-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cms-tool-thumb-preview-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--grey-700);
}

.cms-tool-thumb-preview--loaded .cms-tool-thumb-preview-placeholder {
  display: none;
}

.cms-tool-thumb-preview-empty {
  margin: 0;
  flex: 1 1 12rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--grey-600);
}

body[data-module-access="cms"] .cms-tool-thumb-preview-empty {
  color: var(--cms-text-muted);
}

.cms-tool-thumb-preview-wrap.cms-tool-thumb-preview--loaded .cms-tool-thumb-preview-empty {
  display: none;
}

.cms-courses-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* CMS · Academy editor help (static page — mission section styling) */
.cms-help-page {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--grey-800);
  background: var(--white);
}

.cms-help-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 2rem);
  background: var(--white);
  border-bottom: 1px solid var(--grey-300);
}

.cms-help-topbar .logo-text {
  color: var(--grey-950);
}

.cms-help-topbar .logo-accent {
  color: var(--blue-rich);
}

.cms-help-topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.cms-help-topnav a {
  color: var(--blue-rich);
  text-decoration: none;
  font-weight: 500;
}

.cms-help-topnav a:hover {
  text-decoration: underline;
}

.cms-help-main {
  max-width: 48rem;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 4vw, 2rem) 4rem;
}

.cms-help-header {
  margin-bottom: 2rem;
}

.cms-help-eyebrow {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-rich);
}

.cms-help-header h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--grey-950);
}

.cms-help-lead {
  margin: 0;
  font-size: 1.125rem;
  color: var(--grey-700);
}

.cms-help-card {
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--grey-100);
  border: 1px solid var(--grey-300);
  border-radius: var(--radius-lg);
}

.cms-help-card h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--grey-950);
}

.cms-help-card h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--grey-900);
}

.cms-help-card h3:first-of-type {
  margin-top: 0.5rem;
}

.cms-help-card p,
.cms-help-card li {
  color: var(--grey-700);
}

.cms-help-card ul,
.cms-help-card ol {
  margin: 0.5rem 0 0;
  padding-left: 1.35rem;
}

.cms-help-card li + li {
  margin-top: 0.35rem;
}

.cms-help-dl {
  margin: 0;
}

.cms-help-dl dt {
  margin-top: 1rem;
  font-weight: 600;
  color: var(--grey-950);
}

.cms-help-dl dt:first-child {
  margin-top: 0;
}

.cms-help-dl dd {
  margin: 0.25rem 0 0;
  color: var(--grey-700);
}

.cms-help-code {
  margin: 1rem 0 0;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.5;
  background: var(--grey-950);
  color: var(--grey-100);
  border-radius: var(--radius);
}

.cms-help-code code {
  font-family: ui-monospace, Consolas, monospace;
}

.cms-help-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.cms-help-footer {
  padding: 1.5rem clamp(1rem, 4vw, 2rem);
  text-align: center;
  font-size: 0.9rem;
  color: var(--grey-500);
  border-top: 1px solid var(--grey-300);
}
