@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Inter:wght@300;400;500;600;700&family=Manrope:wght@400;500;600;700;800&family=Orbitron:wght@500;700;800;900&family=Rajdhani:wght@400;500;700&family=Share+Tech+Mono&family=Sora:wght@600;700;800&family=Space+Grotesk:wght@300;400;500;600;700;900&display=swap');

@font-face {
  font-family: 'OpenDyslexic';
  src: url('../fonts/opendyslexic/OpenDyslexic-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'OpenDyslexic';
  src: url('../fonts/opendyslexic/OpenDyslexic-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --pc-blue-900: #062751;
  --pc-blue-800: #0a3f80;
  --pc-blue-700: #0f5fb6;
  --pc-cyan-500: #20b9e3;
  --pc-sky-200: #d9f2ff;
  --pc-bg: #f3f8fd;
  --pc-surface: #ffffff;
  --pc-border: #d4e4f2;
  --pc-text: #132236;
  --pc-muted: #5a6f89;
  --pc-shadow: 0 18px 45px rgba(6, 39, 81, 0.14);
  --site-font-body: 'Manrope', sans-serif;
  --site-font-head: 'Sora', sans-serif;
  --site-font-code: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--site-font-body);
  color: var(--pc-text);
  background:
    radial-gradient(circle at 12% 0%, rgba(32, 185, 227, 0.12) 0%, transparent 34%),
    radial-gradient(circle at 88% 10%, rgba(15, 95, 182, 0.14) 0%, transparent 28%),
    var(--pc-bg);
  line-height: 1.7;
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 3000;
  padding: 0.7rem 1rem;
  border-radius: 0.5rem;
  color: #fff;
  background: var(--pc-blue-900);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--pc-cyan-500);
  outline-offset: 3px;
}

main[tabindex='-1']:focus {
  outline: none;
}

a {
  color: var(--pc-blue-700);
}

.course-figure {
  max-width: 100%;
  margin: 1.25rem 0;
  overflow-x: auto;
}

.course-figure svg,
.course-figure img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
}

.course-figure figcaption {
  margin-top: 0.55rem;
  color: var(--pc-muted);
  font-size: 0.88rem;
  text-align: center;
}

.course-quiz {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0;
}

.course-review-status {
  margin: 0 0 1.5rem;
  padding: 1rem 1.15rem;
  border: 2px solid var(--pc-border);
  border-left: 0.35rem solid var(--pc-blue-700);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--pc-surface) 92%, var(--pc-sky-200));
}

.course-review-status h2 {
  margin-top: 0;
  font-size: 1.15rem;
}

.course-review-status p:last-child {
  margin-bottom: 0;
}

.course-quiz fieldset {
  margin: 0;
  padding: 1rem;
  border: 2px solid var(--pc-border);
  border-radius: var(--radius-md);
}

.course-quiz fieldset.is-correct {
  border-color: #238636;
}

.course-quiz fieldset.is-incorrect {
  border-color: #b42318;
}

.course-quiz legend {
  padding: 0 0.35rem;
  font-weight: 800;
}

.course-quiz label {
  display: block;
  margin: 0.35rem 0;
  cursor: pointer;
}

.course-quiz input {
  margin-right: 0.45rem;
}

.quiz-feedback,
.quiz-result {
  font-weight: 700;
}

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--pc-border);
  backdrop-filter: blur(8px);
}

.header-inner {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 0;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.brand {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-top {
  color: var(--pc-blue-700);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-bottom {
  font-family: var(--site-font-head);
  font-weight: 700;
  font-size: 1rem;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--pc-muted);
  font-weight: 700;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  transition: 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  background: linear-gradient(135deg, var(--pc-blue-700), var(--pc-blue-800));
  color: #fff;
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.24rem;
  border: 1px solid var(--pc-border);
  border-radius: 999px;
  background: var(--pc-surface);
  box-shadow: 0 3px 12px rgba(10, 63, 128, 0.08);
}

.theme-btn {
  border: 0;
  background: transparent;
  color: var(--pc-muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  border-radius: 999px;
  padding: 0.52rem 0.85rem;
  cursor: pointer;
  transition: 0.2s ease;
}

.theme-btn:hover {
  color: var(--pc-blue-800);
}

.theme-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--pc-blue-700), var(--pc-blue-800));
}

.theme-btn:focus-visible {
  outline: 2px solid rgba(32, 185, 227, 0.35);
  outline-offset: 2px;
}

.hero,
.course-hero {
  width: min(1160px, calc(100% - 2rem));
  margin: 2rem auto 0;
  background: linear-gradient(125deg, var(--pc-blue-900) 0%, var(--pc-blue-700) 58%, var(--pc-cyan-500) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--pc-shadow);
  overflow: hidden;
}

.hero-inner,
.course-hero-inner {
  padding: clamp(1.75rem, 4vw, 3rem);
}

.hero-kicker,
.course-hero-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
}

.hero h1,
.course-hero h1 {
  margin: 0.6rem 0 0.9rem;
  font-family: var(--site-font-head);
  line-height: 1.15;
  font-size: clamp(1.6rem, 3.7vw, 2.85rem);
}

.hero-text,
.course-hero-subtitle {
  margin: 0;
  max-width: 720px;
  color: rgba(255, 255, 255, 0.9);
}

.course-hero-tags {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.course-hero-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  color: #f4fbff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.course-hero-tag.is-category {
  background: rgba(32, 185, 227, 0.16);
  border-color: rgba(132, 233, 255, 0.45);
}

.section-summary {
  margin-top: 1rem;
  max-width: 840px;
  display: grid;
  gap: 0.45rem;
}

.section-summary p {
  margin: 0;
  color: var(--pc-muted);
}

.section-summary-light p {
  color: rgba(255, 255, 255, 0.9);
}

.hero-stats {
  margin-top: 1.4rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-stats div {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  min-width: 180px;
}

.hero-stats strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
}

.hero-stats span {
  font-size: 0.9rem;
  opacity: 0.95;
}

.hero-links {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.35rem;
  padding: 0.52rem 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.86rem;
}

.hero-links a:hover {
  background: rgba(255, 255, 255, 0.24);
}

.pillar-shell,
.pillar-faq {
  width: min(1160px, calc(100% - 2rem));
  margin: 1.4rem auto 0;
}

.pillar-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.8fr);
  gap: 1rem;
  align-items: start;
}

.pillar-main,
.pillar-side,
.pillar-faq {
  background: var(--pc-surface);
  border: 1px solid var(--pc-border);
  border-radius: var(--radius-md);
  box-shadow: 0 6px 18px rgba(10, 63, 128, 0.08);
  padding: clamp(1rem, 2vw, 1.35rem);
}

.pillar-main h2,
.pillar-side h2,
.pillar-faq h2 {
  margin: 0 0 0.75rem;
  font-family: var(--site-font-head);
  color: var(--pc-blue-900);
}

.pillar-main p,
.pillar-side li,
.pillar-faq p {
  color: var(--pc-muted);
}

.pillar-main p {
  margin: 0 0 0.75rem;
}

.pillar-side ol {
  margin: 0;
  padding-left: 1.2rem;
}

.pillar-side li + li {
  margin-top: 0.55rem;
}

.pillar-topics {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.pillar-topics span {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.68rem;
  border-radius: 999px;
  border: 1px solid #c7dcf3;
  background: #f2f8ff;
  color: var(--pc-blue-800);
  font-size: 0.8rem;
  font-weight: 800;
}

.pillar-faq {
  margin-bottom: 3rem;
}

.pillar-faq details {
  border-top: 1px solid var(--pc-border);
  padding: 0.75rem 0;
}

.pillar-faq details:first-of-type {
  border-top: 0;
}

.pillar-faq summary {
  cursor: pointer;
  color: var(--pc-blue-900);
  font-weight: 800;
}

.pillar-faq p {
  margin: 0.55rem 0 0;
}

.catalog {
  width: min(1160px, calc(100% - 2rem));
  margin: 2rem auto 3rem;
}

.catalog-head {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.catalog-head-copy {
  display: grid;
  gap: 0.35rem;
}

.catalog h2 {
  margin: 0;
  font-family: var(--site-font-head);
}

.catalog-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1 1 340px;
  justify-content: flex-end;
}

.catalog-status {
  margin: 0;
  color: var(--pc-muted);
  font-size: 0.95rem;
}

#course-filter {
  border: 1px solid var(--pc-border);
  background: var(--pc-surface);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  width: min(420px, 100%);
  font: inherit;
}

#course-filter:focus {
  outline: 2px solid rgba(32, 185, 227, 0.25);
  border-color: var(--pc-cyan-500);
}

.courses-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.filter-chip,
.course-card-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.filter-chip {
  border: 1px solid var(--pc-border);
  background: var(--pc-surface);
  color: var(--pc-blue-800);
  padding: 0.45rem 0.82rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
  border-color: #9bc6ef;
  background: #eaf4ff;
  color: var(--pc-blue-900);
}

.course-card {
  background: var(--pc-surface);
  border: 1px solid var(--pc-border);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  box-shadow: 0 6px 18px rgba(10, 63, 128, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.course-card.is-hidden {
  display: none;
}

.course-card h3 {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.35;
}

.course-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.course-card-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.course-card-tag {
  padding: 0.3rem 0.62rem;
  border: 1px solid #c7dcf3;
  background: #f2f8ff;
  color: var(--pc-blue-800);
}

.course-card-keyword {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #d5def1;
  background: #ffffff;
  color: var(--pc-muted);
  font-size: 0.74rem;
  font-weight: 700;
}

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

.catalog-empty {
  margin: 1rem 0 0;
  padding: 0.95rem 1rem;
  border: 1px dashed var(--pc-border);
  border-radius: 12px;
  background: #f8fbff;
  color: var(--pc-muted);
}

.catalog-empty.is-hidden {
  display: none;
}

.btn {
  display: inline-flex;
  width: fit-content;
  margin-top: auto;
  padding: 0.62rem 1rem;
  text-decoration: none;
  font-weight: 700;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--pc-blue-700), var(--pc-blue-800));
}

.btn:hover {
  filter: brightness(1.06);
}

.btn-light {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.course-page {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto 2.5rem;
}

.course-shell {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 1.2rem;
  align-items: start;
}

.course-shell.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.course-shell > :only-child {
  grid-column: 1 / -1;
}

.legal-shell {
  margin-top: 1.2rem;
}

.course-toc {
  position: sticky;
  top: 95px;
  background: #fff;
  border: 1px solid var(--pc-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  max-height: calc(100vh - 120px);
  overflow: auto;
}

.course-toc h2 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-family: var(--site-font-head);
}

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

.course-toc li + li {
  margin-top: 0.35rem;
}

.course-toc li.level-3 {
  padding-left: 0.7rem;
}

.course-toc a {
  display: block;
  padding: 0.3rem 0.45rem;
  border-radius: 8px;
  color: var(--pc-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.course-toc a:hover {
  background: var(--pc-sky-200);
  color: var(--pc-blue-900);
}

.course-content {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--pc-border);
  border-radius: var(--radius-md);
  padding: clamp(1rem, 2.8vw, 2rem);
  box-shadow: 0 6px 20px rgba(10, 63, 128, 0.08);
  overflow-wrap: anywhere;
}

.course-content > *:first-child {
  margin-top: 0;
}

.course-content h1,
.course-content h2,
.course-content h3,
.course-content h4 {
  font-family: var(--site-font-head);
  line-height: 1.3;
  color: var(--pc-blue-900);
  margin-top: 1.65rem;
  margin-bottom: 0.65rem;
}

.course-content h1 {
  font-size: 1.85rem;
}

.course-content h2 {
  font-size: 1.45rem;
}

.course-content h3 {
  font-size: 1.2rem;
}

/* Keep readable contrast for imported full-page heroes rendered inside course-content. */
.course-content .hero {
  color: #e9f7ff;
}

.course-content .hero :where(h1, h2, h3, p, .hero-sub, .hero-badge, .scroll-hint) {
  color: #e9f7ff !important;
}

.course-content .hero h1 span {
  color: #84e9ff !important;
}

.course-content .hero h1 em {
  color: #9bffd5 !important;
}

.course-content .hero .hero-sub,
.course-content .hero .scroll-hint {
  color: rgba(233, 247, 255, 0.92) !important;
}

.course-content .hero .hero-badge {
  border-color: rgba(132, 233, 255, 0.55);
  background: rgba(132, 233, 255, 0.12);
}

.course-content .hero .tag {
  border-color: rgba(233, 247, 255, 0.38);
  background: rgba(233, 247, 255, 0.16);
  color: #e9f7ff;
}

.course-content p,
.course-content li,
.course-content td,
.course-content th,
.course-content blockquote {
  color: var(--pc-text);
}

.course-content p {
  margin: 0.55rem 0 0.9rem;
}

.course-content ul,
.course-content ol {
  padding-left: 1.2rem;
}

.course-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.course-table-scroll {
  max-width: 100%;
  margin: 1rem 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.course-table-scroll table {
  min-width: 38rem;
  margin: 0;
}

.course-table-scroll:focus-visible {
  outline: 3px solid var(--pc-cyan-500);
  outline-offset: 2px;
}

.course-content th,
.course-content td {
  border: 1px solid var(--pc-border);
  padding: 0.6rem;
  vertical-align: top;
}

.course-content th {
  background: #eaf4ff;
}

.course-content tr:nth-child(even) td {
  background: #f8fbff;
}

.course-content pre,
.course-content code,
.course-content .command-box {
  font-family: var(--site-font-code);
}

.course-content pre,
.course-content .command-box {
  background: #0d223f;
  color: #e6f3ff;
  border-radius: 10px;
  padding: 0.9rem;
  overflow-x: auto;
}

.course-content svg {
  max-width: 100%;
  height: auto;
}

/* Unified styling for imported legacy course content */
.course-content :where(.container, .content, .page-wrapper) {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.course-content .content-grid {
  display: block;
  margin: 0;
}

.course-content .content-grid > aside:empty {
  display: none;
}

.course-content :where(section, .section, .epreuve-section, .page-break, .exercise, .scenario, .methodology, .attack-section) {
  margin: 1.4rem 0;
}

.course-content .header {
  margin-bottom: 1.2rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--pc-border);
  border-radius: 12px;
  background: linear-gradient(135deg, #f7fbff 0%, #edf6ff 100%);
}

.course-content .header :where(h1, h2) {
  margin-top: 0.35rem;
}

.course-content .subtitle {
  margin: 0;
  color: var(--pc-blue-700);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.course-content :where(.grid, .grid-2, .grid-3, .info-grid, .tool-grid, .rights-grid, .summary-grid, .principles-grid, .steps, .comparison, .key-points, .algorithm-list, .stats) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  margin: 1rem 0;
}

.course-content :where(.card, .grid-item, .tool-card, .stat-card, .summary-item, .right-card, .principle-card, .layer-card, .step-content, .intro-box, .algorithm-card, .mini-card) {
  background: #f8fbff;
  border: 1px solid var(--pc-border);
  border-radius: 11px;
  padding: 0.9rem 1rem;
}

.course-content :where(.info-box, .alert, .tip, .warn, .info, .warning, .warning-box, .danger-box, .success-box, .important, .definition, .example, .highlight, .concept-box, .interactive-demo, .description, .advantages, .disadvantages, .solution, .callout) {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--pc-border);
  border-radius: 11px;
  background: #f8fbff;
}

.course-content .callout {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  border-left-width: 4px;
}

.course-content .callout strong {
  display: block;
  margin-bottom: 0.35rem;
}

.course-content .callout-icon {
  flex-shrink: 0;
  font-size: 1.2rem;
  line-height: 1.2;
}

.course-content .callout-text {
  min-width: 0;
}

.course-content .callout-info {
  background: #eef5ff;
  border-color: #bfd8f3;
  color: var(--pc-blue-900);
}

.course-content :where(.info-box-title, .schema-title, .code-header, .section-label, .section-number) {
  display: inline-block;
  margin-bottom: 0.45rem;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 800;
  color: var(--pc-blue-700);
}

.course-content :where(.card-title, .exercise-title, .mini-card-title, .step-title, .svg-title) {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  font-weight: 800;
  color: var(--pc-blue-700);
}

.course-content h2 .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.95rem;
  height: 1.95rem;
  flex-shrink: 0;
  border-radius: 10px;
  background: #e8f3ff;
  border: 1px solid #bfd8f3;
  color: var(--pc-blue-800);
  font-size: 1rem;
}

.course-content .card-accent {
  border-left: 4px solid var(--pc-blue-700);
}

.course-content .card-title.blue {
  color: var(--pc-blue-700);
}

.course-content .card-title.orange {
  color: #9a5a00;
}

.course-content .card-title.green {
  color: #0f6b3d;
}

.course-content .alert {
  display: block;
  line-height: 1.65;
}

.course-content .alert .alert-title {
  display: block;
  margin-bottom: 0.4rem;
}

.course-content .alert .alert-icon {
  display: inline-block;
  margin-right: 0.45rem;
  font-size: 1.2rem;
  line-height: 1.1;
}

.course-content :where(.warning, .warning-box, .badge-warning, .card-warn, .callout-warn) {
  background: #fff8e8;
  border-color: #f4d58f;
  color: #7a5a00;
}

.course-content :where(.box, .box--blue, .box--yellow, .box--green) {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--pc-border);
  border-left: 4px solid var(--pc-blue-700);
  border-radius: 11px;
  background: #eef5ff;
}

.course-content :where(.box, .box--blue, .box--yellow, .box--green) strong {
  display: block;
  margin-bottom: 0.35rem;
}

.course-content :where(.box--yellow, .callout.warn) {
  background: #fff8e8;
  border-color: #f4d58f;
  color: #7a5a00;
}

.course-content :where(.box--green, .callout.green) {
  background: #ebfbf2;
  border-color: #a8e0c1;
  color: #0f6b3d;
}

.course-content :where(.danger-box, .danger, .badge-danger, .comp-bad, .callout-danger) {
  background: #ffeef0;
  border-color: #f3b8c0;
  color: #8f2233;
}

.course-content :where(.success-box, .badge-success, .card-success, .comp-good, .callout-ok) {
  background: #ebfbf2;
  border-color: #a8e0c1;
  color: #0f6b3d;
}

.course-content :where(.comp-bad, .comp-good) {
  border-style: solid;
  border-width: 1px;
  border-radius: 11px;
  padding: 0.9rem 1rem;
}

.course-content :where(.badge, .tag, .comp-label) {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.16rem 0.56rem;
  border-radius: 999px;
  border: 1px solid var(--pc-border);
  background: #eef5ff;
  color: var(--pc-blue-800);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.course-content .badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.course-content .metric-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.course-content .metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.36rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--pc-border);
  background: #eef5ff;
  color: var(--pc-blue-800);
  font-size: 0.8rem;
  font-weight: 700;
}

.course-content .summary-item {
  text-align: center;
}

.course-content .summary-item .number {
  display: block;
  font-family: var(--site-font-head);
  font-size: 1.95rem;
  line-height: 1.05;
  font-weight: 800;
  color: var(--pc-blue-700);
}

.course-content .summary-item .label {
  display: block;
  margin-top: 0.35rem;
  color: var(--pc-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.course-content .tag-blue {
  background: #dceeff;
  border-color: #b9d8f6;
  color: #1b4f9b;
}

.course-content .tag-orange {
  background: #fff1dd;
  border-color: #f2c995;
  color: #8c5000;
}

.course-content .tag-green {
  background: #e5f8ee;
  border-color: #b6e2cb;
  color: #0f6b3d;
}

.course-content .tag-purple {
  background: #f1ebff;
  border-color: #d5c5f5;
  color: #5b3e99;
}

.course-content .tag-red {
  background: #ffeef0;
  border-color: #f3b8c0;
  color: #8f2233;
}

.course-content .epreuve-header {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.course-content .epreuve-icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.course-content .epreuve-title {
  min-width: min(100%, 240px);
}

.course-content .epreuve-code {
  margin: 0.15rem 0 0;
  color: var(--pc-blue-700);
  font-weight: 700;
}

.course-content .epreuve-section {
  padding: 1rem;
  border: 1px solid var(--pc-border);
  border-radius: 12px;
  background: #f8fbff;
}

.course-content .epreuve-section.e5 {
  border-top: 4px solid #ef9a58;
}

.course-content .epreuve-section.e6 {
  border-top: 4px solid #4c87d5;
}

.course-content .epreuve-section.e7 {
  border-top: 4px solid #9b72cf;
}

.course-content .layer-card.layer-4 {
  border-left: 4px solid #4c87d5;
}

.course-content .layer-card.layer-3 {
  border-left: 4px solid #34a06a;
}

.course-content .layer-card.layer-2 {
  border-left: 4px solid #e0a03b;
}

.course-content .layer-card.layer-1 {
  border-left: 4px solid #d36a74;
}

.course-content .principle-number {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-weight: 800;
  background: #e8f3ff;
  border: 1px solid #bfd8f3;
  color: var(--pc-blue-800);
  margin-bottom: 0.5rem;
}

.course-content :where(.diagram-wrap, .diagram-container, .diagram, .svg-container, .schema, .schema-container, .tcp-model, .svg-section) {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--pc-border);
  border-radius: 12px;
  background: #f8fbff;
  overflow-x: auto;
}

.course-content :where(.diagram-caption, .schema-title, .svg-caption) {
  color: var(--pc-muted);
  text-align: center;
}

.course-content .summary-section {
  background: linear-gradient(135deg, var(--pc-blue-900) 0%, var(--pc-blue-700) 100%);
  border-color: transparent;
  color: #fff;
}

.course-content .summary-section > h2 {
  color: #fff;
}

.course-content .summary-section > h2 .icon {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.course-content .table-zones td:first-child {
  font-weight: 700;
}

.course-content .pros-cons-table th:first-child {
  background: #ebfbf2;
  color: #0f6b3d;
}

.course-content .pros-cons-table th:last-child {
  background: #ffeef0;
  color: #8f2233;
}

.course-content .comparison-table,
.course-content .record-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.course-content .comparison-table th,
.course-content .comparison-table td,
.course-content .record-table th,
.course-content .record-table td {
  border: 1px solid var(--pc-border);
  padding: 0.6rem;
}

.course-content .comparison-table tr:nth-child(even) td,
.course-content .record-table tr:nth-child(even) td {
  background: #f8fbff;
}

.course-content .schema pre,
.course-content .code-block,
.course-content .command-box,
.course-content pre {
  background: #0d223f;
  color: #e6f3ff;
}

.course-content .code-block {
  border-radius: 10px;
  padding: 0.9rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.course-content :where(.code-block, pre, .command-box) :where(.comment, .cm) {
  color: #98aec8;
}

.course-content :where(.code-block, pre, .command-box) :where(.keyword, .cmd, .kw) {
  color: #8fd2ff;
}

.course-content :where(.code-block, pre, .command-box) :where(.string, .value, .st) {
  color: #bbf7d0;
}

.course-content :where(.code-block, pre, .command-box) :where(.number, .nu) {
  color: #f6d38a;
}

.course-content :where(.code-block, pre, .command-box) :where(.type, .key) {
  color: #d7bdff;
}

.course-content .code-dot {
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 999px;
  display: inline-block;
  vertical-align: middle;
}

.course-content .code-dot.r {
  background: #ef7f8b;
}

.course-content .code-dot.y {
  background: #f1c774;
}

.course-content .code-dot.g {
  background: #79d49a;
}

.course-content :where(.allow, .zone-lan) {
  color: #127c43;
  font-weight: 700;
}

.course-content :where(.deny, .zone-internet) {
  color: #9a2134;
  font-weight: 700;
}

.course-content .zone-dmz {
  color: #a05a00;
  font-weight: 700;
}

.course-content :where(.emoji-list, .checklist) {
  list-style: none;
  padding-left: 0;
}

.course-content :where(.emoji-list li, .checklist li) {
  border: 1px solid var(--pc-border);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  background: #f8fbff;
  margin-bottom: 0.55rem;
}

.course-content .step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
}

.course-content .step-body {
  min-width: 0;
}

.course-content .step-num {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-weight: 800;
  background: #e8f3ff;
  color: var(--pc-blue-800);
  border: 1px solid #bfd8f3;
}

.course-content h2 .ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  margin-right: 0.3rem;
  border-radius: 0.55rem;
  border: 1px solid #bfd8f3;
  background: #e8f3ff;
  color: var(--pc-blue-800);
  font-size: 0.95rem;
  line-height: 1;
  vertical-align: middle;
}

.course-content .sep {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.4rem 0;
  color: var(--pc-blue-700);
}

.course-content .sep::before,
.course-content .sep::after {
  content: '';
  height: 1px;
  flex: 1;
  background: var(--pc-border);
}

.course-content .back-to-top {
  display: inline-flex;
  margin-top: 1rem;
  padding: 0.45rem 0.8rem;
  border-radius: 10px;
  text-decoration: none;
  background: #edf5ff;
  border: 1px solid #bdd9f6;
  font-weight: 700;
}

.course-content .page-break {
  border-top: 1px dashed var(--pc-border);
  padding-top: 0.9rem;
}

.course-content .page-break:first-child {
  border-top: 0;
  padding-top: 0;
}

.course-content .section-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 1.5rem 0 0.65rem;
  color: var(--pc-blue-900);
  font-family: var(--site-font-head);
  font-size: 1.1rem;
  line-height: 1.3;
}

.course-content .section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.course-content .section-header .section-title {
  margin: 0;
}

.course-content .section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(15, 95, 182, 0.28), transparent);
}

.course-content .section-title .num,
.course-content .section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  border: 1px solid #bfd8f3;
  background: #e8f3ff;
  color: var(--pc-blue-800);
  font-family: var(--site-font-code);
  font-size: 0.78rem;
  font-weight: 700;
}

.course-content :where(.section-intro, .section-desc) {
  margin: 0 0 1rem;
  color: var(--pc-muted);
}

.course-content :where(.cards, .card-grid, .cheat, .shortcut-grid) {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 1rem 0;
}

.course-content :where(.cheat-block, .shortcut, .svg-block, .svg-container, .svg-wrap, .table-wrap) {
  border: 1px solid var(--pc-border);
  border-radius: 12px;
  background: #f8fbff;
  padding: 0.9rem;
}

.course-content .tbl-wrap {
  margin: 1rem 0;
  overflow-x: auto;
}

.course-content :where(.cheat-head, .box-title, .alert-title, .terminal-title, .toc-title) {
  display: inline-block;
  margin-bottom: 0.45rem;
  font-size: 0.76rem;
  font-family: var(--site-font-code);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--pc-blue-700);
}

.course-content .alert-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.course-content .alert-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--pc-border);
  border-radius: 10px;
  background: #f8fbff;
}

.course-content .alert-name {
  font-weight: 700;
}

.course-content .cmd-label {
  display: inline-block;
  margin-bottom: 0.6rem;
  color: #98aec8;
  font-family: var(--site-font-code);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.course-content :where(.check, .cross) {
  font-weight: 700;
}

.course-content .check {
  color: #0f6b3d;
}

.course-content .cross {
  color: #8f2233;
}

.course-content .cheat-row + .cheat-row {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--pc-border);
}

.course-content .terminal {
  margin: 1rem 0;
  border: 1px solid var(--pc-border);
  border-radius: 10px;
  overflow: hidden;
  background: #0d223f;
}

.course-content .terminal-bar,
.course-content .term-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid rgba(191, 216, 243, 0.35);
  background: rgba(6, 39, 81, 0.36);
  color: #cde5ff;
  font-family: var(--site-font-code);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.course-content .terminal-body,
.course-content pre.terminal {
  margin: 0;
  padding: 0.85rem 0.95rem;
  background: #0d223f;
  color: #e6f3ff;
  font-family: var(--site-font-code);
  font-size: 0.9rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-x: auto;
}

.course-content .dot,
.course-content .term-dot,
.course-content .code-dot {
  flex-shrink: 0;
}

.course-content .dot,
.course-content .term-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
}

.course-content .dot,
.course-content .td-green {
  background: #79d49a;
}

.course-content .td-red {
  background: #ef7f8b;
}

.course-content .td-yellow {
  background: #f1c774;
}

.course-content :where(.prompt, .prompt-lin, .prompt-win, .cmd, .cmd-l, .cmd-w) {
  color: #8fd2ff;
}

.course-content :where(.cmd-text, .line, .output) {
  color: #e6f3ff;
}

.course-content :where(.cmd-output, .cmd-output-dim, .out, .comment, .cmd-comment) {
  color: #98aec8;
}

.course-content :where(.cmd-path, .path) {
  color: #f6d38a;
}

.course-content :where(.cmd-highlight, .ok) {
  color: #bbf7d0;
}

.course-content :where(.cmd-error, .err, .error) {
  color: #ef7f8b;
}

.course-content .cursor {
  display: inline-block;
  width: 0.55rem;
  height: 1rem;
  margin-left: 0.2rem;
  vertical-align: -0.15rem;
  background: #8fd2ff;
  animation: terminal-cursor-blink 1s step-end infinite;
}

@keyframes terminal-cursor-blink {
  50% {
    opacity: 0;
  }
}

.course-content .cmp-table,
.course-content .cmd-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.course-content .cmp-table th,
.course-content .cmp-table td,
.course-content .cmd-table th,
.course-content .cmd-table td {
  border: 1px solid var(--pc-border);
  padding: 0.6rem;
  vertical-align: top;
}

.site-footer {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto 1.5rem;
  border-top: 1px solid var(--pc-border);
  padding-top: 1rem;
  text-align: center;
  color: var(--pc-muted);
  font-size: 0.92rem;
}

.site-footer a {
  color: inherit;
  text-underline-offset: 3px;
}

.site-footer a:hover {
  color: var(--pc-blue-700);
}

.page-updated {
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
  color: var(--pc-muted);
}

body[data-theme='terminal'] {
  --pc-blue-900: #131313;
  --pc-blue-800: #1f1f1f;
  --pc-blue-700: #00ff41;
  --pc-cyan-500: #00e639;
  --pc-sky-200: #1b1b1b;
  --pc-bg: #131313;
  --pc-surface: #1f1f1f;
  --pc-border: #3b4b37;
  --pc-text: #e2e2e2;
  --pc-muted: #b9ccb2;
  --pc-shadow: 0 0 20px rgba(0, 255, 65, 0.05);
  --site-font-body: 'Inter', sans-serif;
  --site-font-head: 'Space Grotesk', sans-serif;
  --site-font-code: 'ui-monospace', 'SFMono-Regular', 'Menlo', 'Monaco', 'Consolas', monospace;
  --radius-lg: 12px;
  --radius-md: 12px;
  background: #131313;
}

body[data-theme='terminal'] a {
  color: #00ff41;
}

body[data-theme='terminal'] .site-header {
  background: rgba(19, 19, 19, 0.95);
  border-bottom-color: rgba(0, 255, 65, 0.2);
  box-shadow: 0 0 15px rgba(0, 255, 65, 0.1);
}

body[data-theme='terminal'] .brand-top {
  color: #00ff41;
}

body[data-theme='terminal'] .brand-bottom {
  color: #e2e2e2;
}

body[data-theme='terminal'] .main-nav a {
  color: #9ca3af;
  font-weight: 700;
  letter-spacing: -0.01em;
}

body[data-theme='terminal'] .main-nav a:hover {
  color: #fff;
  background: transparent;
}

body[data-theme='terminal'] .main-nav a.active {
  color: #00ff41;
  background: transparent;
  border-bottom: 2px solid #00ff41;
  border-radius: 0;
  padding-bottom: 0.35rem;
}

body[data-theme='terminal'] .theme-switch {
  background: #1f1f1f;
  border-color: rgba(0, 255, 65, 0.2);
  box-shadow: none;
}

body[data-theme='terminal'] .theme-btn {
  color: #9ca3af;
  font-size: 0.82rem;
  letter-spacing: 0;
}

body[data-theme='terminal'] .theme-btn:hover {
  color: #e2e2e2;
}

body[data-theme='terminal'] .theme-btn.is-active {
  color: #003907;
  background: #00ff41;
}

body[data-theme='terminal'] .hero,
body[data-theme='terminal'] .course-hero {
  border: 1px solid rgba(0, 255, 65, 0.2);
  background: linear-gradient(135deg, #131313 0%, #1a1a1a 50%, #131313 100%);
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.05);
}

body[data-theme='terminal'] .hero-kicker,
body[data-theme='terminal'] .course-hero-kicker {
  color: #00ff41;
}

body[data-theme='terminal'] .hero h1,
body[data-theme='terminal'] .course-hero h1 {
  color: #e2e2e2;
  letter-spacing: -0.04em;
  text-shadow: none;
}

body[data-theme='terminal'] .hero-text,
body[data-theme='terminal'] .course-hero-subtitle,
body[data-theme='terminal'] .section-summary-light p {
  color: #b9ccb2;
}

body[data-theme='terminal'] .course-hero-tag {
  color: #e2e2e2;
  border-color: rgba(0, 255, 65, 0.28);
  background: rgba(0, 255, 65, 0.1);
}

body[data-theme='terminal'] .course-hero-tag.is-category {
  color: #003907;
  border-color: rgba(0, 255, 65, 0.5);
  background: #00ff41;
}

body[data-theme='terminal'] .section-summary p,
body[data-theme='terminal'] .course-card p {
  color: var(--pc-muted);
}

body[data-theme='terminal'] .hero-stats div {
  background: rgba(0, 255, 65, 0.05);
  border-color: rgba(0, 255, 65, 0.2);
}

body[data-theme='terminal'] #course-filter {
  color: var(--pc-text);
  border: 1px solid var(--pc-border);
  background: #1f1f1f;
}

body[data-theme='terminal'] #course-filter::placeholder {
  color: #6b7280;
}

body[data-theme='terminal'] #course-filter:focus {
  outline: none;
  border-color: #00ff41;
  box-shadow: 0 0 0 1px rgba(0, 255, 65, 0.3);
}

body[data-theme='terminal'] .catalog-status,
body[data-theme='terminal'] .catalog-empty {
  color: var(--pc-muted);
}

body[data-theme='terminal'] .catalog-empty {
  background: #1b1b1b;
  border-color: var(--pc-border);
}

body[data-theme='terminal'] .filter-chip {
  color: #b9ccb2;
  border-color: rgba(255, 255, 255, 0.05);
  background: #1b1b1b;
}

body[data-theme='terminal'] .filter-chip:hover {
  color: #e2e2e2;
  border-color: rgba(0, 255, 65, 0.3);
  background: #2a2a2a;
}

body[data-theme='terminal'] .filter-chip.is-active {
  color: #003907;
  border-color: #00ff41;
  background: #00ff41;
}

body[data-theme='terminal'] .course-card-tag {
  color: #00ff41;
  border-color: rgba(0, 255, 65, 0.2);
  background: rgba(0, 255, 65, 0.08);
}

body[data-theme='terminal'] .course-card-keyword {
  color: #b9ccb2;
  border-color: rgba(255, 255, 255, 0.05);
  background: #1f1f1f;
}

body[data-theme='terminal'] .course-card {
  border-color: rgba(255, 255, 255, 0.05);
  background: #1b1b1b;
  box-shadow: none;
}

body[data-theme='terminal'] .course-card:hover {
  background: #2a2a2a;
}

body[data-theme='terminal'] .course-toc {
  border-color: rgba(0, 255, 65, 0.2);
  background: #1f1f1f;
  box-shadow: none;
}

body[data-theme='terminal'] .course-content {
  border-color: rgba(0, 255, 65, 0.2);
  background: #1b1b1b;
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.05);
}

body[data-theme='terminal'] .course-content h1,
body[data-theme='terminal'] .course-content h2,
body[data-theme='terminal'] .course-content h3,
body[data-theme='terminal'] .course-content h4,
body[data-theme='terminal'] .course-toc h2,
body[data-theme='terminal'] .catalog h2 {
  color: #e2e2e2;
}

body[data-theme='terminal'] .course-toc a {
  color: #9ca3af;
}

body[data-theme='terminal'] .course-toc a:hover {
  background: rgba(0, 255, 65, 0.05);
  color: #00ff41;
}

body[data-theme='terminal'] .btn {
  color: #003907;
  background: #00ff41;
  border-radius: 8px;
}

body[data-theme='terminal'] .btn:hover {
  filter: brightness(1.1);
}

body[data-theme='terminal'] .btn-light {
  color: #00ff41;
  border-color: rgba(0, 255, 65, 0.4);
  background: transparent;
}

body[data-theme='terminal'] .btn-light:hover {
  color: #003907;
  background: #00ff41;
}

body[data-theme='terminal'] .course-content p,
body[data-theme='terminal'] .course-content li,
body[data-theme='terminal'] .course-content td,
body[data-theme='terminal'] .course-content th,
body[data-theme='terminal'] .course-content blockquote {
  color: #b9ccb2;
}

body[data-theme='terminal'] .course-content th {
  color: #e2e2e2;
  background: #2a2a2a;
}

body[data-theme='terminal'] .course-content tr:nth-child(even) td,
body[data-theme='terminal'] .course-content .comparison-table tr:nth-child(even) td,
body[data-theme='terminal'] .course-content .record-table tr:nth-child(even) td {
  background: #1f1f1f;
}

body[data-theme='terminal'] .course-content :where(.card, .grid-item, .tool-card, .stat-card, .summary-item, .right-card, .principle-card, .layer-card, .step-content, .intro-box, .algorithm-card, .mini-card),
body[data-theme='terminal'] .course-content :where(.info-box, .alert, .tip, .warn, .info, .warning, .warning-box, .danger-box, .success-box, .important, .definition, .example, .highlight, .concept-box, .interactive-demo, .description, .advantages, .disadvantages, .solution, .callout),
body[data-theme='terminal'] .course-content :where(.diagram-wrap, .diagram-container, .diagram, .svg-container, .schema, .schema-container, .tcp-model, .svg-section),
body[data-theme='terminal'] .course-content .epreuve-section,
body[data-theme='terminal'] .course-content :where(.emoji-list li, .checklist li) {
  background: #1f1f1f;
  border-color: rgba(255, 255, 255, 0.05);
}

body[data-theme='terminal'] .course-content .header {
  background: linear-gradient(135deg, #1f1f1f 0%, #2a2a2a 100%);
  border-color: rgba(0, 255, 65, 0.2);
}

body[data-theme='terminal'] .course-content :where(.badge, .tag, .comp-label) {
  color: #00ff41;
  border-color: rgba(0, 255, 65, 0.2);
  background: rgba(0, 255, 65, 0.08);
}

body[data-theme='terminal'] .course-content .callout-info {
  color: #9ed9ff;
  border-color: rgba(37, 99, 235, 0.3);
  background: rgba(37, 99, 235, 0.08);
}

body[data-theme='terminal'] .course-content :where(.warning, .warning-box, .badge-warning, .card-warn, .callout-warn) {
  color: #ffd37c;
  border-color: rgba(234, 179, 8, 0.3);
  background: rgba(234, 179, 8, 0.08);
}

body[data-theme='terminal'] .course-content :where(.danger-box, .danger, .badge-danger, .comp-bad, .callout-danger) {
  color: #ffb4ab;
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.08);
}

body[data-theme='terminal'] .course-content :where(.success-box, .badge-success, .card-success, .comp-good, .callout-ok) {
  color: #8cf2bd;
  border-color: rgba(0, 255, 65, 0.25);
  background: rgba(0, 255, 65, 0.06);
}

body[data-theme='terminal'] .course-content pre,
body[data-theme='terminal'] .course-content .code-block,
body[data-theme='terminal'] .course-content .command-box,
body[data-theme='terminal'] .course-content .schema pre {
  color: #8ac38a;
  border: 1px solid rgba(0, 255, 65, 0.15);
  background: #0e0e0e;
}

body[data-theme='terminal'] .course-content :where(.code-block, pre, .command-box) :where(.comment, .cm) {
  color: #84967e;
}

body[data-theme='terminal'] .course-content :where(.code-block, pre, .command-box) :where(.keyword, .cmd, .kw) {
  color: #00ff41;
}

body[data-theme='terminal'] .course-content :where(.code-block, pre, .command-box) :where(.string, .value, .st) {
  color: #9bd59a;
}

body[data-theme='terminal'] .course-content :where(.code-block, pre, .command-box) :where(.number, .nu) {
  color: #ffe08a;
}

body[data-theme='terminal'] .course-content :where(.code-block, pre, .command-box) :where(.type, .key) {
  color: #bdb5ff;
}

body[data-theme='terminal'] .course-content .section-title,
body[data-theme='terminal'] .course-content :where(.section-intro, .section-desc) {
  color: #b9ccb2;
}

body[data-theme='terminal'] .course-content .section-title .num,
body[data-theme='terminal'] .course-content .section-num {
  border-color: rgba(0, 255, 65, 0.2);
  background: rgba(0, 255, 65, 0.08);
  color: #00ff41;
}

body[data-theme='terminal'] .course-content .step-num,
body[data-theme='terminal'] .course-content h2 .ico,
body[data-theme='terminal'] .course-content h2 .icon {
  border-color: rgba(0, 255, 65, 0.2);
  background: rgba(0, 255, 65, 0.08);
  color: #00ff41;
}

body[data-theme='terminal'] .course-content :where(.cheat-block, .shortcut, .svg-block, .svg-container, .svg-wrap, .table-wrap) {
  background: #1f1f1f;
  border-color: rgba(255, 255, 255, 0.05);
}

body[data-theme='terminal'] .course-content .summary-section {
  background: linear-gradient(135deg, #1f1f1f 0%, #2a2a2a 100%);
  border-color: rgba(0, 255, 65, 0.2);
}

body[data-theme='terminal'] .course-content .summary-section > h2 {
  color: #e2e2e2;
}

body[data-theme='terminal'] .course-content .summary-section > h2 .icon {
  border-color: rgba(0, 255, 65, 0.2);
  background: rgba(0, 255, 65, 0.08);
  color: #00ff41;
}

body[data-theme='terminal'] .course-content :where(.cheat-head, .box-title, .alert-title, .terminal-title, .toc-title) {
  color: #00ff41;
}

body[data-theme='terminal'] .course-content .cheat-row + .cheat-row {
  border-top-color: rgba(255, 255, 255, 0.05);
}

body[data-theme='terminal'] .course-content .terminal {
  background: #0e0e0e;
  border-color: rgba(0, 255, 65, 0.15);
}

body[data-theme='terminal'] .course-content .terminal-bar,
body[data-theme='terminal'] .course-content .term-label {
  color: #00ff41;
  border-bottom-color: rgba(0, 255, 65, 0.15);
  background: #1f1f1f;
}

body[data-theme='terminal'] .course-content .terminal-body,
body[data-theme='terminal'] .course-content pre.terminal {
  color: #8ac38a;
  background: #0e0e0e;
}

body[data-theme='terminal'] .course-content .dot,
body[data-theme='terminal'] .course-content .td-green,
body[data-theme='terminal'] .course-content .cursor {
  background: #00ff41;
}

body[data-theme='terminal'] .course-content .td-red {
  background: #ff7373;
}

body[data-theme='terminal'] .course-content .td-yellow {
  background: #ffe08a;
}

body[data-theme='terminal'] .course-content :where(.prompt, .prompt-lin, .prompt-win, .cmd, .cmd-l, .cmd-w) {
  color: #00ff41;
}

body[data-theme='terminal'] .course-content :where(.cmd-text, .line, .output) {
  color: #e2e2e2;
}

body[data-theme='terminal'] .course-content :where(.cmd-output, .cmd-output-dim, .out, .comment, .cmd-comment) {
  color: #84967e;
}

body[data-theme='terminal'] .course-content :where(.cmd-path, .path) {
  color: #ffe08a;
}

body[data-theme='terminal'] .course-content :where(.cmd-highlight, .ok) {
  color: #9bd59a;
}

body[data-theme='terminal'] .course-content :where(.cmd-error, .err, .error) {
  color: #ffb4ab;
}

body[data-theme='terminal'] .course-content .back-to-top {
  color: #00ff41;
  border-color: rgba(0, 255, 65, 0.2);
  background: #1f1f1f;
}

body[data-theme='terminal'] .course-content .back-to-top:hover {
  color: #003907;
  background: #00ff41;
}

body[data-theme='terminal'] .course-content :where(.info-box-title, .schema-title, .code-header, .section-label, .section-number) {
  color: #00ff41;
}

body[data-theme='terminal'] .course-content :where(.card-title, .exercise-title, .mini-card-title, .step-title, .svg-title) {
  color: #00ff41;
}

body[data-theme='terminal'] .course-content .subtitle {
  color: #00ff41;
}

body[data-theme='terminal'] .course-content .summary-item .number {
  color: #00ff41;
}

body[data-theme='terminal'] .course-content .summary-item .label {
  color: #b9ccb2;
}

body[data-theme='terminal'] .course-content .principle-number {
  border-color: rgba(0, 255, 65, 0.2);
  background: rgba(0, 255, 65, 0.08);
  color: #00ff41;
}

body[data-theme='terminal'] .course-content .sep {
  color: #00ff41;
}

body[data-theme='terminal'] .course-content .sep::before,
body[data-theme='terminal'] .course-content .sep::after {
  background: rgba(0, 255, 65, 0.2);
}

body[data-theme='terminal'] .course-content .pros-cons-table th:first-child {
  background: rgba(0, 255, 65, 0.08);
  color: #9bd59a;
}

body[data-theme='terminal'] .course-content .pros-cons-table th:last-child {
  background: rgba(239, 68, 68, 0.08);
  color: #ffb4ab;
}

body[data-theme='terminal'] .site-footer {
  color: #6b7280;
  border-top-color: rgba(255, 255, 255, 0.05);
  background: #131313;
}

body[data-theme='terminal'] .site-footer a:hover {
  color: #00ff41;
}

body[data-theme='terminal'] .page-updated {
  color: #6b7280;
}

body[data-theme='terminal'] .course-content .card-accent {
  border-left-color: #00ff41;
}

body[data-theme='terminal'] .course-content .epreuve-section.e5 {
  border-top-color: #ef9a58;
}

body[data-theme='terminal'] .course-content .epreuve-section.e6 {
  border-top-color: #4c87d5;
}

body[data-theme='terminal'] .course-content .epreuve-section.e7 {
  border-top-color: #9b72cf;
}

body[data-theme='terminal'] .course-content .tag-blue {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.3);
  color: #93c5fd;
}

body[data-theme='terminal'] .course-content .tag-orange {
  background: rgba(234, 179, 8, 0.1);
  border-color: rgba(234, 179, 8, 0.3);
  color: #fcd34d;
}

body[data-theme='terminal'] .course-content .tag-green {
  background: rgba(0, 255, 65, 0.08);
  border-color: rgba(0, 255, 65, 0.2);
  color: #9bd59a;
}

body[data-theme='terminal'] .course-content .tag-purple {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.3);
  color: #c4b5fd;
}

body[data-theme='terminal'] .course-content .tag-red {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

body[data-theme='terminal'] .course-content .page-break {
  border-top-color: rgba(255, 255, 255, 0.05);
}

body[data-theme='dyslexie'] {
  --pc-blue-900: #202124;
  --pc-blue-800: #3c4043;
  --pc-blue-700: #1a73e8;
  --pc-cyan-500: #4285f4;
  --pc-sky-200: #e8f0fe;
  --pc-bg: #ffffff;
  --pc-surface: #ffffff;
  --pc-border: #dadce0;
  --pc-text: #202124;
  --pc-muted: #5f6368;
  --pc-shadow: 0 1px 2px rgba(60, 64, 67, 0.16), 0 1px 3px 1px rgba(60, 64, 67, 0.08);
  --site-font-body: 'OpenDyslexic', 'Comic Sans MS', sans-serif;
  --site-font-head: 'OpenDyslexic', 'Comic Sans MS', sans-serif;
  --site-font-code: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
  background: #ffffff;
  font-size: 1.05rem;
  line-height: 1.85;
  letter-spacing: 0.02em;
  word-spacing: 0.08em;
}

body[data-theme='dyslexie'] a {
  color: #1a73e8;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.12em;
  text-decoration-color: rgba(26, 115, 232, 0.35);
}

body[data-theme='dyslexie'] .site-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: #eceff1;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
}

body[data-theme='dyslexie'] .brand-top,
body[data-theme='dyslexie'] .hero-kicker,
body[data-theme='dyslexie'] .course-hero-kicker {
  color: #5f6368;
  letter-spacing: 0.03em;
  text-transform: none;
}

body[data-theme='dyslexie'] .brand-top {
  color: #1a73e8;
}

body[data-theme='dyslexie'] .brand-bottom {
  color: #202124;
}

body[data-theme='dyslexie'] :where(.main-nav a, .theme-btn, .filter-chip, .btn, .btn-light, .course-card-tag, .course-card-keyword, .course-hero-tag) {
  word-spacing: normal;
}

body[data-theme='dyslexie'] .main-nav a {
  color: #5f6368;
  letter-spacing: 0.01em;
  padding: 0.65rem 1rem;
}

body[data-theme='dyslexie'] .main-nav a:hover {
  background: #f1f3f4;
  color: #202124;
}

body[data-theme='dyslexie'] .main-nav a.active {
  background: #e8f0fe;
  color: #1a73e8;
}

body[data-theme='dyslexie'] .theme-switch {
  background: #f8f9fa;
  border-color: #dadce0;
  box-shadow: none;
}

body[data-theme='dyslexie'] .theme-btn {
  color: #5f6368;
  letter-spacing: 0.01em;
}

body[data-theme='dyslexie'] .theme-btn:hover {
  color: #202124;
  background: #eef1f3;
}

body[data-theme='dyslexie'] .theme-btn.is-active {
  color: #1a73e8;
  background: #e8f0fe;
}

body[data-theme='dyslexie'] .theme-btn:focus-visible {
  outline: 3px solid rgba(26, 115, 232, 0.16);
}

body[data-theme='dyslexie'] .hero {
  border: 0;
  background: transparent;
  box-shadow: none;
}

body[data-theme='dyslexie'] .hero .hero-inner {
  padding: clamp(2rem, 6vw, 4rem) 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

body[data-theme='dyslexie'] .course-hero {
  border: 1px solid #dadce0;
  background: #ffffff;
  box-shadow: var(--pc-shadow);
}

body[data-theme='dyslexie'] .hero h1,
body[data-theme='dyslexie'] .course-hero h1 {
  color: #202124;
  line-height: 1.3;
}

body[data-theme='dyslexie'] .hero-text,
body[data-theme='dyslexie'] .course-hero-subtitle,
body[data-theme='dyslexie'] .section-summary-light p {
  color: #5f6368;
}

body[data-theme='dyslexie'] .hero .hero-text,
body[data-theme='dyslexie'] .hero .section-summary {
  max-width: 760px;
}

body[data-theme='dyslexie'] .hero-stats div {
  background: #f8f9fa;
  border-color: #dadce0;
  box-shadow: var(--pc-shadow);
}

body[data-theme='dyslexie'] .hero-stats {
  justify-content: center;
}

body[data-theme='dyslexie'] .hero-stats strong {
  color: #1a73e8;
}

body[data-theme='dyslexie'] .hero-stats span {
  color: #5f6368;
}

body[data-theme='dyslexie'] #course-filter {
  color: #202124;
  border-color: #dfe1e5;
  background: #ffffff;
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.12);
}

body[data-theme='dyslexie'] #course-filter:hover {
  box-shadow: 0 1px 8px rgba(32, 33, 36, 0.18);
}

body[data-theme='dyslexie'] #course-filter::placeholder {
  color: #5f6368;
}

body[data-theme='dyslexie'] #course-filter:focus {
  outline: none;
  border-color: #dfe1e5;
  box-shadow: 0 1px 8px rgba(32, 33, 36, 0.2), 0 0 0 3px rgba(26, 115, 232, 0.12);
}

body[data-theme='dyslexie'] .catalog-status,
body[data-theme='dyslexie'] .catalog-empty,
body[data-theme='dyslexie'] .section-summary:not(.section-summary-light) p,
body[data-theme='dyslexie'] .course-card p {
  color: #5f6368;
}

body[data-theme='dyslexie'] .catalog-empty,
body[data-theme='dyslexie'] .course-card,
body[data-theme='dyslexie'] .course-toc,
body[data-theme='dyslexie'] .course-content,
body[data-theme='dyslexie'] .pillar-main,
body[data-theme='dyslexie'] .pillar-side,
body[data-theme='dyslexie'] .pillar-faq {
  border-color: #dadce0;
  background: #ffffff;
  box-shadow: var(--pc-shadow);
}

body[data-theme='dyslexie'] .course-card:hover {
  background: #ffffff;
  border-color: #c6dafc;
  box-shadow: 0 4px 12px rgba(60, 64, 67, 0.16);
}

body[data-theme='dyslexie'] .filter-chip {
  color: #3c4043;
  border-color: #dadce0;
  background: #f8f9fa;
}

body[data-theme='dyslexie'] .filter-chip:hover {
  color: #1a73e8;
  border-color: #d2e3fc;
  background: #eef3fd;
}

body[data-theme='dyslexie'] .filter-chip.is-active {
  color: #1a73e8;
  border-color: #d2e3fc;
  background: #e8f0fe;
}

body[data-theme='dyslexie'] .course-card-tag,
body[data-theme='dyslexie'] .course-card-keyword,
body[data-theme='dyslexie'] .course-hero-tag {
  color: #1a73e8;
  border-color: #d2e3fc;
  background: #e8f0fe;
}

body[data-theme='dyslexie'] .course-hero-tag.is-category {
  color: #ffffff;
  border-color: #1a73e8;
  background: #1a73e8;
}

body[data-theme='dyslexie'] .course-content h1,
body[data-theme='dyslexie'] .course-content h2,
body[data-theme='dyslexie'] .course-content h3,
body[data-theme='dyslexie'] .course-content h4,
body[data-theme='dyslexie'] .course-toc h2,
body[data-theme='dyslexie'] .catalog h2,
body[data-theme='dyslexie'] .pillar-main h2,
body[data-theme='dyslexie'] .pillar-side h2,
body[data-theme='dyslexie'] .pillar-faq h2 {
  color: #202124;
}

body[data-theme='dyslexie'] .course-toc a {
  color: #3c4043;
}

body[data-theme='dyslexie'] .course-toc a:hover {
  color: #1a73e8;
  background: #f1f3f4;
}

body[data-theme='dyslexie'] .btn {
  color: #ffffff;
  background: #1a73e8;
  border-radius: 999px;
}

body[data-theme='dyslexie'] .btn:hover {
  filter: brightness(1.08);
}

body[data-theme='dyslexie'] .btn-light {
  color: #3c4043;
  border-color: #dadce0;
  background: #f8f9fa;
}

body[data-theme='dyslexie'] .btn-light:hover {
  color: #1a73e8;
  background: #eef3fd;
}

body[data-theme='dyslexie'] .course-content p,
body[data-theme='dyslexie'] .course-content li,
body[data-theme='dyslexie'] .course-content td,
body[data-theme='dyslexie'] .course-content th,
body[data-theme='dyslexie'] .course-content blockquote {
  color: #202124;
}

body[data-theme='dyslexie'] .pillar-main p,
body[data-theme='dyslexie'] .pillar-side li,
body[data-theme='dyslexie'] .pillar-faq p {
  color: #3c4043;
}

body[data-theme='dyslexie'] .course-content strong {
  color: #202124;
}

body[data-theme='dyslexie'] .course-content :where(code, pre, kbd, samp, .code-block, .command-box, .terminal, .terminal-body, .prompt, .prompt-lin, .prompt-win, .cmd, .cmd-l, .cmd-w, .line, .output, .cmd-output, .cmd-output-dim) {
  letter-spacing: normal;
  word-spacing: normal;
}

body[data-theme='dyslexie'] .course-content pre,
body[data-theme='dyslexie'] .course-content .code-block,
body[data-theme='dyslexie'] .course-content .command-box,
body[data-theme='dyslexie'] .course-content .schema pre,
body[data-theme='dyslexie'] .course-content .terminal {
  border-color: #e0e3e7;
  background: #f8f9fa;
  color: #202124;
}

body[data-theme='dyslexie'] .site-footer {
  color: #5f6368;
  border-top-color: #eceff1;
  background: #ffffff;
}

body[data-theme='dyslexie'] .site-footer a:hover {
  color: #1a73e8;
}

body[data-theme='dyslexie'] .page-updated {
  color: #5f6368;
}

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

  .pillar-shell {
    grid-template-columns: 1fr;
  }

  .course-toc {
    position: static;
    max-height: none;
  }
}

@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .theme-switch {
    width: 100%;
    justify-content: center;
  }

  .catalog-tools {
    width: 100%;
    justify-content: stretch;
  }

  #course-filter {
    width: 100%;
  }

  .course-content {
    padding: 1rem;
  }
}

/* Keep the CyberFroid diagrams legible on narrow screens. */
.course-content .cyberfroid-figure svg {
  min-width: 640px;
}
