:root {
  color-scheme: light;
  --black: #000000;
  --red: #ff0000;
  --red-dark: #c90000;
  --paper: #f2f0ea;
  --paper-2: #e8e5dc;
  --white: #ffffff;
  --ink: #080808;
  --muted: #5d5b57;
  --line: #000000;
  --soft-line: rgba(0, 0, 0, 0.18);
  --success: #08783e;
  --success-soft: #e4f7ec;
  --warning: #8a5100;
  --warning-soft: #fff2cc;
  --danger-soft: #ffe2e2;
  --sidebar: 82px;
  --content: 1220px;
  --radius: 18px;
  --radius-small: 11px;
  --hard-shadow: 7px 7px 0 var(--black);
  --red-shadow: 7px 7px 0 var(--red);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 28px;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body[data-page] {
  padding-right: var(--sidebar);
}

body.search-is-open,
body.sidebar-is-open,
body.exercise-is-open {
  overflow: hidden;
}

::selection {
  color: var(--white);
  background: var(--red);
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--paper-2);
}

::-webkit-scrollbar-thumb {
  border: 3px solid var(--paper-2);
  border-radius: 999px;
  background: var(--black);
}

button,
input,
select {
  font: inherit;
}

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

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 4px solid var(--red);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 500;
  padding: 10px 16px;
  border: 2px solid var(--black);
  color: var(--white);
  background: var(--red);
  font-weight: 950;
  text-decoration: none;
  transform: translateY(-180%);
}

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

/* Simple header for /wizard/. Learning pages replace this markup with the sidebar. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 2px solid var(--black);
  background: rgba(242, 240, 234, 0.92);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  width: min(calc(100% - 32px), var(--content));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--black);
  font-weight: 950;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid var(--black);
  color: var(--white);
  background: var(--red);
  box-shadow: 3px 3px 0 var(--black);
  font-size: 0.72rem;
  font-weight: 1000;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.desktop-nav a {
  padding: 8px 11px;
  border: 2px solid transparent;
  font-size: 0.88rem;
  font-weight: 850;
  text-decoration: none;
}

.desktop-nav a:hover {
  border-color: var(--black);
  background: var(--white);
}

/* Right navigation */
body[data-page] .site-header {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 120;
  width: var(--sidebar);
  overflow: hidden;
  border: 0;
  border-left: 3px solid var(--red);
  color: var(--white);
  background: var(--black);
  box-shadow: -12px 0 34px rgba(0, 0, 0, 0.18);
  backdrop-filter: none;
  transition: width 260ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

body[data-page] .site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(255, 255, 255, 0.13) 10px 11px);
  pointer-events: none;
}

body[data-page] .site-header.is-expanded {
  width: 350px;
}

.sidebar-top,
.sidebar-search,
.sidebar-nav,
.sidebar-foot {
  position: relative;
  z-index: 1;
}

.sidebar-top {
  height: 83px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
  padding-left: 16px;
  color: var(--white);
  text-decoration: none;
}

.wizard-w {
  flex: 0 0 auto;
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border: 2px solid var(--white);
  color: var(--white);
  background: var(--red);
  box-shadow: 4px 4px 0 var(--white);
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 1.35rem;
  line-height: 1;
  transform: skew(-4deg);
}

.brand-copy,
.sidebar-link-copy,
.sidebar-search-copy,
.sidebar-foot-copy {
  min-width: 0;
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 150ms ease, transform 220ms ease;
  pointer-events: none;
}

.brand-copy strong,
.brand-copy small,
.sidebar-link-copy strong,
.sidebar-link-copy small,
.sidebar-search-copy strong,
.sidebar-search-copy small,
.sidebar-foot-copy strong,
.sidebar-foot-copy small {
  display: block;
  white-space: nowrap;
}

.brand-copy strong {
  font-size: 1.1rem;
  letter-spacing: 0.12em;
}

.brand-copy small {
  color: #bdbdbd;
  font-size: 0.75rem;
}

.sidebar-toggle {
  position: absolute;
  top: 22px;
  right: 18px;
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 160ms ease, transform 260ms ease;
}

.sidebar-toggle:hover {
  background: var(--red);
}

.sidebar-toggle span,
.sidebar-toggle span::before,
.sidebar-toggle span::after {
  width: 17px;
  height: 2px;
  display: block;
  background: currentColor;
}

.sidebar-toggle span {
  position: relative;
}

.sidebar-toggle span::before,
.sidebar-toggle span::after {
  content: "";
  position: absolute;
  right: 0;
}

.sidebar-toggle span::before {
  top: -6px;
  width: 11px;
}

.sidebar-toggle span::after {
  top: 6px;
  width: 13px;
}

.site-header.is-expanded .sidebar-toggle {
  transform: rotate(180deg);
}

.site-header.is-expanded .sidebar-toggle span::before,
.site-header.is-expanded .sidebar-toggle span::after {
  width: 9px;
  right: 8px;
}

.site-header.is-expanded .sidebar-toggle span::before {
  transform: rotate(-45deg);
  transform-origin: right;
}

.site-header.is-expanded .sidebar-toggle span::after {
  transform: rotate(45deg);
  transform-origin: right;
}

.site-header.is-expanded .brand-copy,
.site-header.is-expanded .sidebar-link-copy,
.site-header.is-expanded .sidebar-search-copy,
.site-header.is-expanded .sidebar-foot-copy {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.sidebar-search {
  width: calc(100% - 24px);
  height: 58px;
  margin: 14px 12px 10px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 10px;
  overflow: hidden;
  border: 2px solid var(--red);
  color: var(--white);
  background: rgba(255, 0, 0, 0.12);
  cursor: pointer;
  text-align: left;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.sidebar-search:hover {
  background: var(--red);
  box-shadow: 4px 4px 0 var(--white);
}

.sidebar-search-copy {
  flex: 1 0 190px;
}

.sidebar-search-copy strong,
.sidebar-link-copy strong,
.sidebar-foot-copy strong {
  font-size: 0.84rem;
}

.sidebar-search-copy small,
.sidebar-link-copy small,
.sidebar-foot-copy small {
  color: #ababab;
  font-size: 0.68rem;
}

.sidebar-search:hover small {
  color: var(--white);
}

kbd {
  padding: 2px 7px;
  border: 1px solid currentColor;
  border-bottom-width: 3px;
  border-radius: 5px;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 900;
}

.sidebar-search kbd {
  opacity: 0;
  transition: opacity 150ms ease;
}

.site-header.is-expanded .sidebar-search kbd {
  opacity: 0.75;
}

.sidebar-nav {
  height: calc(100dvh - 228px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4px 10px 18px;
  scrollbar-width: thin;
  scrollbar-color: var(--red) transparent;
}

.sidebar-link {
  position: relative;
  min-width: 58px;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 4px 0;
  padding: 7px 10px;
  overflow: hidden;
  border: 1px solid transparent;
  color: #c7c7c7;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.sidebar-link::after {
  content: "";
  position: absolute;
  top: 8px;
  right: -4px;
  bottom: 8px;
  width: 4px;
  background: var(--red);
  transform: scaleY(0);
  transition: transform 160ms ease;
}

.sidebar-link:hover,
.sidebar-link[aria-current="page"] {
  border-color: rgba(255, 255, 255, 0.17);
  color: var(--white);
  background: rgba(255, 255, 255, 0.09);
  transform: translateX(-2px);
}

.sidebar-link[aria-current="page"] {
  border-color: var(--red);
  background: rgba(255, 0, 0, 0.16);
}

.sidebar-link[aria-current="page"]::after {
  transform: scaleY(1);
}

.sidebar-link-copy {
  flex: 1 0 220px;
}

.sidebar-group {
  margin-top: 7px;
}

.sidebar-group > summary {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 10px 8px 6px;
  color: #9f9f9f;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  list-style: none;
  text-transform: uppercase;
  cursor: pointer;
}

.site-header.is-expanded .sidebar-group > summary {
  display: flex;
}

.sidebar-group > summary::-webkit-details-marker {
  display: none;
}

.summary-arrow {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.sidebar-group[open] .summary-arrow {
  transform: rotate(225deg);
}

.sidebar-group-links {
  animation: nav-reveal 180ms ease both;
}

@keyframes nav-reveal {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.sidebar-foot {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 74px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 25px;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  background: #080808;
}

.sidebar-progress-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(255, 0, 0, 0.2);
  animation: status-pulse 2.5s ease-in-out infinite;
}

@keyframes status-pulse {
  50% { box-shadow: 0 0 0 9px rgba(255, 0, 0, 0); }
}

.sidebar-foot-copy {
  flex: 1 0 240px;
}

.nav-scrim {
  display: none;
}

/* CSS module icons */
.module-icon {
  position: relative;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: inline-block;
  color: currentColor;
}

.sidebar-link .module-icon,
.sidebar-search .module-icon {
  color: var(--white);
}

.icon-home::before {
  content: "";
  position: absolute;
  inset: 8px 7px 5px;
  border: 2px solid currentColor;
  border-top: 0;
}

.icon-home::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 8px;
  width: 16px;
  height: 16px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(45deg);
}

.icon-search::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  width: 16px;
  height: 16px;
  border: 3px solid currentColor;
  border-radius: 50%;
}

.icon-search::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 6px;
  width: 12px;
  height: 3px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: right;
}

.icon-year::before,
.icon-year::after {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 5px;
  width: 13px;
  border: 2px solid currentColor;
}

.icon-year::before {
  left: 3px;
  border-radius: 8px 1px 1px 8px;
  transform: skewY(8deg);
}

.icon-year::after {
  right: 3px;
  border-radius: 1px 8px 8px 1px;
  transform: skewY(-8deg);
}

.icon-network {
  background:
    radial-gradient(circle at 50% 15%, currentColor 0 3px, transparent 4px),
    radial-gradient(circle at 18% 77%, currentColor 0 3px, transparent 4px),
    radial-gradient(circle at 82% 77%, currentColor 0 3px, transparent 4px);
}

.icon-network::before,
.icon-network::after {
  content: "";
  position: absolute;
  top: 15px;
  left: 8px;
  width: 20px;
  height: 2px;
  background: currentColor;
  transform: rotate(-55deg);
}

.icon-network::after {
  left: 7px;
  transform: rotate(55deg);
}

.icon-subnet {
  inset: 3px;
  width: 28px;
  height: 28px;
  border: 2px solid currentColor;
  background:
    linear-gradient(90deg, transparent 46%, currentColor 47% 53%, transparent 54%),
    linear-gradient(transparent 46%, currentColor 47% 53%, transparent 54%);
}

.icon-ports::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 7px;
  width: 17px;
  height: 15px;
  border: 3px solid currentColor;
  border-top: 0;
  border-radius: 0 0 10px 10px;
}

.icon-ports::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 12px;
  width: 3px;
  height: 11px;
  background: currentColor;
  box-shadow: 8px 0 0 currentColor, 4px 22px 0 currentColor;
}

.icon-hardware::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 3px solid currentColor;
  background: repeating-linear-gradient(45deg, transparent 0 3px, currentColor 3px 4px);
}

.icon-hardware::after {
  content: "";
  position: absolute;
  inset: 3px 13px;
  border-top: 3px dotted currentColor;
  border-bottom: 3px dotted currentColor;
  box-shadow: -10px 10px 0 -8px currentColor, 10px 10px 0 -8px currentColor;
}

.icon-code::before,
.icon-code::after {
  position: absolute;
  top: 0;
  color: currentColor;
  font-family: Consolas, monospace;
  font-size: 28px;
  font-weight: 950;
  line-height: 32px;
}

.icon-code::before { content: "<"; left: 1px; }
.icon-code::after { content: ">"; right: 1px; }

.icon-security::before {
  content: "";
  position: absolute;
  inset: 3px 6px 2px;
  border: 3px solid currentColor;
  background: linear-gradient(135deg, transparent 49%, currentColor 50% 55%, transparent 56%);
  clip-path: polygon(50% 0, 100% 17%, 91% 70%, 50% 100%, 9% 70%, 0 17%);
}

.icon-wiso::before {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 5px;
  left: 4px;
  height: 23px;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  background: linear-gradient(to top, currentColor 0 35%, transparent 36%) 5px 100% / 5px 60% no-repeat, linear-gradient(to top, currentColor 0 65%, transparent 66%) 14px 100% / 5px 82% no-repeat, linear-gradient(to top, currentColor 0 100%, transparent 100%) 23px 100% / 5px 100% no-repeat;
}

.icon-communication::before {
  content: "";
  position: absolute;
  inset: 5px 3px 9px;
  border: 3px solid currentColor;
  border-radius: 50%;
}

.icon-communication::after {
  content: "";
  position: absolute;
  right: 6px;
  bottom: 4px;
  width: 10px;
  height: 10px;
  border-right: 3px solid currentColor;
  transform: skew(-25deg) rotate(35deg);
}

.icon-linux::before {
  content: ">_";
  position: absolute;
  inset: 4px 1px;
  font-family: Consolas, monospace;
  font-size: 21px;
  font-weight: 950;
  line-height: 26px;
}

.icon-windows::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 6px;
  width: 9px;
  height: 9px;
  background: currentColor;
  box-shadow: 13px 0 0 currentColor, 0 13px 0 currentColor, 13px 13px 0 currentColor;
}

.icon-exam::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 3px solid currentColor;
  border-radius: 50%;
}

.icon-exam::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 10px;
  width: 13px;
  height: 7px;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(-45deg);
}

.icon-simulation::before {
  content: "AP";
  position: absolute;
  inset: 5px 3px;
  display: grid;
  place-items: center;
  border: 3px solid currentColor;
  font-family: "Arial Black", sans-serif;
  font-size: 12px;
  line-height: 1;
}

.icon-simulation::after {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 2px;
  width: 11px;
  height: 6px;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  background: var(--black);
  transform: rotate(-45deg);
}

/* Global search */
.search-overlay[hidden] {
  display: none;
}

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: start center;
  padding: clamp(18px, 7vh, 74px) 16px 18px;
}

.search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(7px);
  animation: fade-in 160ms ease both;
}

.search-dialog {
  position: relative;
  width: min(900px, 100%);
  max-height: calc(100dvh - 92px);
  overflow: hidden;
  border: 3px solid var(--black);
  background: var(--paper);
  box-shadow: 12px 12px 0 var(--red);
  animation: dialog-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes fade-in { from { opacity: 0; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(-18px) scale(0.98); } }

.search-dialog::before {
  content: "";
  display: block;
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--red) 0 28px, var(--black) 28px 40px);
}

.search-dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 26px 10px;
}

.search-dialog-head h2 {
  margin-bottom: 0;
}

.search-close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 2px solid var(--black);
  border-radius: 50%;
  color: var(--black);
  background: var(--white);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.search-close:hover {
  color: var(--white);
  background: var(--red);
  transform: rotate(90deg);
}

.search-input-wrap {
  position: relative;
  margin: 8px 26px 12px;
}

.search-input-wrap .module-icon {
  position: absolute;
  top: 13px;
  left: 14px;
  z-index: 1;
  color: var(--black);
}

.search-input-wrap input {
  min-height: 62px;
  padding: 12px 78px 12px 58px;
  border-width: 3px;
  border-radius: 0;
  color: var(--black);
  background: var(--white);
  font-size: clamp(1rem, 2vw, 1.22rem);
  font-weight: 750;
}

.search-input-wrap input:focus {
  border-color: var(--red);
  box-shadow: 5px 5px 0 var(--black);
  outline: none;
}

.search-input-wrap kbd {
  position: absolute;
  top: 18px;
  right: 14px;
  color: var(--muted);
}

.search-status {
  padding: 0 28px 12px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.search-results {
  max-height: calc(100dvh - 295px);
  overflow-y: auto;
  padding: 0 26px 28px;
}

.search-section-title {
  margin: 4px 0 10px;
  font-size: 0.78rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.search-result {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 8px;
  padding: 13px 14px;
  border: 2px solid var(--black);
  color: var(--black);
  background: var(--white);
  text-decoration: none;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.search-result:hover {
  color: var(--white);
  background: var(--black);
  box-shadow: 5px 5px 0 var(--red);
  transform: translate(-2px, -2px);
}

.search-result-copy {
  min-width: 0;
  display: grid;
}

.search-result-copy small {
  color: var(--red);
  font-size: 0.67rem;
  font-weight: 950;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.search-result-copy strong {
  overflow: hidden;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-copy > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result:hover .search-result-copy > span {
  color: #bdbdbd;
}

.result-arrow {
  color: var(--red);
  font-size: 1.4rem;
  font-weight: 950;
  transition: transform 150ms ease;
}

.search-result:hover .result-arrow {
  transform: translateX(4px);
}

.search-empty {
  min-height: 190px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  border: 2px dashed var(--black);
  color: var(--muted);
  text-align: center;
}

.search-empty strong {
  color: var(--black);
  font-size: 1.15rem;
}

/* Per-topic exercise launcher and modal */
.topic-exercise-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin: -2px 0 20px;
}

.topic-exercise-row > span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.topic-exercise-launch {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  border: 2px solid var(--black);
  color: var(--black);
  background: var(--white);
  box-shadow: 3px 3px 0 var(--red);
  font-size: 0.78rem;
  font-weight: 950;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.topic-exercise-launch:hover {
  color: var(--white);
  background: var(--black);
  box-shadow: 5px 5px 0 var(--red);
  transform: translate(-2px, -2px);
}

.exercise-die {
  position: relative;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  transform: rotate(5deg);
  transition: transform 220ms ease;
}

.topic-exercise-launch:hover .exercise-die {
  transform: rotate(95deg);
}

.exercise-die i,
.exercise-die::before,
.exercise-die::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.exercise-die::before { top: 3px; left: 3px; }
.exercise-die::after { right: 3px; bottom: 3px; }
.exercise-die i:first-child { top: 3px; right: 3px; }
.exercise-die i:nth-child(2) { bottom: 3px; left: 3px; }
.exercise-die i:nth-child(3) { top: 7px; left: 7px; }

.exercise-overlay[hidden] {
  display: none;
}

.exercise-overlay {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: grid;
  place-items: center;
  padding: 18px;
}

.exercise-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background:
    repeating-linear-gradient(-45deg, rgba(255, 0, 0, 0.08) 0 10px, transparent 10px 20px),
    rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(7px);
  animation: fade-in 160ms ease both;
}

.exercise-modal {
  position: relative;
  width: min(780px, 100%);
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  border: 3px solid var(--black);
  background: var(--paper);
  box-shadow: 13px 13px 0 var(--red);
  animation: exercise-in 240ms cubic-bezier(0.2, 0.85, 0.25, 1) both;
}

@keyframes exercise-in {
  from { opacity: 0; transform: translateY(22px) rotate(0.5deg) scale(0.98); }
}

.exercise-modal::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--red) 0 34px, var(--black) 34px 48px);
}

.exercise-modal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 28px 18px;
  color: var(--white);
  background: var(--black);
}

.exercise-modal-head h2 {
  margin-bottom: 0;
  color: var(--white);
  font-size: clamp(1.55rem, 4vw, 2.4rem);
}

.exercise-close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 2px solid var(--white);
  border-radius: 50%;
  color: var(--white);
  background: transparent;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}

.exercise-close:hover {
  background: var(--red);
  transform: rotate(90deg);
}

.exercise-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 28px;
  border-bottom: 2px solid var(--black);
  color: var(--muted);
  background: var(--white);
  font-size: 0.71rem;
  font-weight: 850;
}

.exercise-progress span:first-child {
  color: var(--red-dark);
  font-weight: 950;
}

.exercise-modal-body {
  padding: clamp(24px, 5vw, 40px) 28px;
}

.exercise-question {
  margin-bottom: 24px;
  color: var(--black);
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
  font-weight: 900;
  line-height: 1.35;
  white-space: pre-wrap;
}

.exercise-instruction {
  margin: -14px 0 20px;
  color: var(--red-dark);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.exercise-choices {
  display: grid;
  gap: 11px;
}

.exercise-choice {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  min-height: 59px;
  padding: 10px 14px;
  border: 2px solid var(--black);
  color: var(--black);
  background: var(--white);
  box-shadow: 3px 3px 0 var(--black);
  text-align: left;
  font-weight: 800;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.exercise-choice:hover:not([disabled]),
.exercise-choice.is-selected:not([disabled]) {
  color: var(--white);
  background: var(--black);
  box-shadow: 5px 5px 0 var(--red);
  transform: translate(-2px, -2px);
}

.exercise-choice-letter {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  color: var(--red);
  background: transparent;
  font-family: "Arial Black", sans-serif;
  font-size: 0.8rem;
}

.exercise-choice.correct {
  border-color: var(--success);
  color: var(--success);
  background: var(--success-soft);
  box-shadow: 3px 3px 0 var(--success);
}

.exercise-choice.wrong {
  border-color: var(--red);
  color: var(--red-dark);
  background: var(--danger-soft);
  box-shadow: 3px 3px 0 var(--red);
}

.exercise-modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 17px 28px 24px;
  border-top: 2px solid var(--black);
  background: var(--white);
}

.exercise-modal-foot > a {
  margin-right: auto;
  color: var(--black);
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration-color: var(--red);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

.exercise-modal-foot .button {
  min-width: 150px;
}

/* Verbindlicher Abschluss jeder Lernseite */
.certification-panel {
  margin-top: 44px;
  padding: 0;
  overflow: hidden;
  border-width: 3px;
  box-shadow: 9px 9px 0 var(--red);
}

.certification-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: clamp(25px, 4vw, 42px);
  color: var(--white);
  background: var(--black);
}

.certification-head h2 { margin-bottom: 10px; color: var(--white); }
.certification-head p:last-child { max-width: 830px; margin: 0; color: #c7c7c7; }
.certification-head > strong {
  max-width: 150px;
  padding: 13px 15px;
  border: 3px solid var(--white);
  color: var(--white);
  background: var(--red);
  box-shadow: 5px 5px 0 var(--white);
  font-size: 0.75rem;
  line-height: 1.25;
  text-align: center;
  transform: rotate(2deg);
}

.certification-intro {
  display: grid;
  grid-template-columns: repeat(3, minmax(105px, 1fr)) auto;
  gap: 0;
  align-items: stretch;
  background: var(--white);
}

.certification-intro[hidden],
.certification-run[hidden],
.certification-result[hidden] { display: none; }
.certification-intro > div { display: grid; place-content: center; padding: 22px; border-right: 2px solid var(--black); text-align: center; }
.certification-intro > div strong { color: var(--red-dark); font-size: 1.55rem; }
.certification-intro > div span { color: var(--muted); font-size: 0.68rem; font-weight: 900; text-transform: uppercase; }
.certification-intro > .button { align-self: center; margin: 18px 22px; }

.certification-run { padding: clamp(24px, 5vw, 48px); background: var(--white); }
.certification-progress { display: grid; grid-template-columns: auto minmax(120px, 1fr); gap: 18px; align-items: center; margin-bottom: 35px; font-size: 0.72rem; font-weight: 950; }
.certification-progress > span:last-child { height: 12px; padding: 2px; border: 2px solid var(--black); background: var(--paper); }
.certification-progress i { display: block; width: 0; height: 100%; background: var(--red); transition: width 200ms ease; }
.certification-run h3 { max-width: 920px; margin-bottom: 9px; font-size: clamp(1.25rem, 3vw, 2rem); white-space: pre-wrap; }
.certification-instruction { margin-bottom: 22px; color: var(--red-dark); font-size: 0.74rem; font-weight: 950; text-transform: uppercase; }
.certification-choices { display: grid; gap: 12px; }
.certification-choices button {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 62px;
  padding: 11px 15px;
  border: 2px solid var(--black);
  color: var(--black);
  background: var(--white);
  box-shadow: 3px 3px 0 var(--black);
  text-align: left;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}
.certification-choices button > span { width: 31px; height: 31px; display: grid; place-items: center; border: 2px solid currentColor; color: var(--red); font-weight: 950; }
.certification-choices button > strong { color: inherit; }
.certification-choices button:hover,
.certification-choices button.is-selected { color: var(--white); background: var(--black); box-shadow: 5px 5px 0 var(--red); transform: translate(-2px, -2px); }
.certification-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 28px; padding-top: 20px; border-top: 2px dashed var(--soft-line); }
.certification-actions > span { color: var(--muted); font-size: 0.7rem; font-weight: 800; }

.certification-result { padding: clamp(24px, 5vw, 45px); background: var(--paper); }
.certification-summary { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 25px 28px; border: 3px solid var(--black); background: var(--white); box-shadow: 6px 6px 0 var(--black); }
.certification-summary.is-passed { border-left: 11px solid var(--success); }
.certification-summary.is-failed { border-left: 11px solid var(--red); }
.certification-summary h3 { margin-bottom: 7px; }
.certification-summary p:last-child { margin: 0; color: var(--muted); }
.certification-summary > strong { flex: 0 0 auto; padding: 10px 13px; color: var(--white); background: var(--black); }
.certification-review { display: grid; gap: 17px; margin-top: 32px; }
.certification-review article { overflow: hidden; border: 2px solid var(--black); background: var(--white); }
.certification-review article.is-correct { border-left: 8px solid var(--success); }
.certification-review article.is-wrong { border-left: 8px solid var(--red); }
.certification-review article > header { display: flex; justify-content: space-between; gap: 18px; padding: 12px 16px; border-bottom: 2px solid var(--black); background: var(--paper); font-size: 0.7rem; font-weight: 900; }
.certification-review article > header strong { color: var(--red-dark); }
.certification-review article > h4 { margin: 0; padding: 18px 17px; white-space: pre-wrap; }
.certification-review-answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--soft-line); border-bottom: 1px solid var(--soft-line); }
.certification-review-answers p { display: grid; gap: 5px; margin: 0; padding: 15px 17px; }
.certification-review-answers p + p { border-left: 2px solid var(--black); background: var(--success-soft); }
.certification-review-answers p strong { font-size: 0.68rem; text-transform: uppercase; }
.certification-review-answers p span { color: var(--muted); }
.certification-explanation { margin: 0; padding: 15px 17px; color: var(--muted); }
.certification-retry { margin-top: 25px; }

/* Layout and typography */
.page-shell {
  position: relative;
  width: min(calc(100% - clamp(28px, 5vw, 76px)), var(--content));
  margin: 0 auto;
  padding: clamp(36px, 6vw, 78px) 0 88px;
  animation: page-enter 420ms ease both;
}

@keyframes page-enter {
  from { opacity: 0; transform: translateY(12px); }
}

.page-shell.narrow {
  max-width: 960px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 0.73rem;
  font-weight: 1000;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--black);
  line-height: 1.03;
  letter-spacing: -0.045em;
}

h1 {
  max-width: 830px;
  margin-bottom: 18px;
  font-family: "Arial Black", Inter, sans-serif;
  font-size: clamp(2.55rem, 6vw, 5.5rem);
  font-weight: 1000;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 13px;
  font-size: clamp(1.7rem, 3.2vw, 2.8rem);
  font-weight: 950;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

p {
  margin-top: 0;
}

.lead {
  max-width: 760px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: clamp(1.04rem, 1.7vw, 1.25rem);
}

.muted {
  color: var(--muted);
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(250px, 0.6fr);
  gap: clamp(30px, 6vw, 78px);
  align-items: center;
  padding: clamp(30px, 5vw, 68px);
  border: 3px solid var(--black);
  border-radius: 0;
  color: var(--white);
  background: var(--black);
  box-shadow: 12px 12px 0 var(--red);
}

.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  top: -170px;
  right: -120px;
  width: 430px;
  height: 430px;
  border: 52px solid var(--red);
  border-radius: 50%;
  opacity: 0.9;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 130px;
  height: 8px;
  background: var(--red);
  box-shadow: 160px 0 0 var(--white), 320px 0 0 var(--red);
}

.hero-copy,
.hero-progress {
  position: relative;
  z-index: 1;
}

.hero h1,
.hero .lead {
  color: var(--white);
}

.hero .eyebrow {
  color: var(--red);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button,
button.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 17px;
  border: 2px solid var(--black);
  border-radius: 0;
  color: var(--white);
  background: var(--red);
  box-shadow: 4px 4px 0 var(--black);
  font-weight: 950;
  text-decoration: none;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.hero .button {
  border-color: var(--white);
  box-shadow: 4px 4px 0 var(--white);
}

.button:hover {
  color: var(--white);
  background: var(--black);
  box-shadow: 6px 6px 0 var(--red);
  transform: translate(-2px, -2px);
}

.hero .button:hover {
  color: var(--black);
  background: var(--white);
  box-shadow: 6px 6px 0 var(--red);
}

.button.secondary {
  color: var(--black);
  background: var(--white);
}

.hero .button.secondary {
  color: var(--white);
  background: transparent;
}

.button.secondary:hover {
  color: var(--white);
  background: var(--black);
}

.button.small {
  min-height: 38px;
  padding: 7px 12px;
  font-size: 0.86rem;
}

.button.danger {
  color: var(--red);
  background: var(--white);
}

.button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.progress-ring {
  --progress: 0deg;
  width: min(230px, 53vw);
  aspect-ratio: 1;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border: 3px solid var(--white);
  border-radius: 50%;
  background: conic-gradient(var(--red) var(--progress), #2c2c2c 0);
  box-shadow: 8px 8px 0 rgba(255, 255, 255, 0.95);
  transition: background 300ms ease;
}

.progress-ring::before {
  content: "";
  grid-area: 1 / 1;
  width: 72%;
  aspect-ratio: 1;
  border: 3px solid var(--white);
  border-radius: 50%;
  background: var(--black);
}

.progress-ring-content {
  z-index: 1;
  grid-area: 1 / 1;
  display: grid;
  gap: 3px;
  color: var(--white);
  text-align: center;
}

.progress-ring-content strong {
  font-family: "Arial Black", Inter, sans-serif;
  font-size: clamp(2rem, 5vw, 3.35rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.progress-ring-content span {
  color: #bdbdbd;
  font-size: 0.75rem;
  font-weight: 850;
}

.section {
  margin-top: clamp(52px, 7vw, 88px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 23px;
  padding-bottom: 17px;
  border-bottom: 3px solid var(--black);
}

.section-heading::after {
  content: "";
  flex: 0 0 54px;
  height: 9px;
  margin-left: auto;
  background: var(--red);
}

.section-heading p {
  max-width: 610px;
  margin-bottom: 0;
  color: var(--muted);
}

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

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

.card,
.content-card,
.quiz-panel {
  border: 2px solid var(--black);
  border-radius: 0;
  background: var(--white);
}

.card {
  position: relative;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  box-shadow: 5px 5px 0 var(--black);
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.card::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  width: 54px;
  height: 7px;
  background: var(--red);
  transition: width 220ms ease;
}

a.card:hover {
  color: var(--white);
  background: var(--black);
  box-shadow: 9px 9px 0 var(--red);
  transform: translate(-3px, -3px);
}

a.card:hover::before {
  width: calc(100% + 4px);
}

.card p {
  margin-bottom: 20px;
  color: var(--muted);
}

a.card:hover p,
a.card:hover .card-footer {
  color: #c2c2c2;
}

.card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.79rem;
  font-weight: 850;
}

.icon-box {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border: 2px solid var(--black);
  color: var(--black);
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--red);
  font-size: 0.82rem;
  font-weight: 1000;
}

.icon-box.module-icon {
  width: 54px;
  height: 54px;
  padding: 8px;
}

.icon-box.module-icon::before,
.icon-box.module-icon::after {
  transform-origin: center;
}

.icon-box.icon-code::before,
.icon-box.icon-code::after {
  top: 9px;
}

.icon-box.icon-subnet {
  inset: auto;
  background:
    linear-gradient(90deg, transparent 46%, currentColor 47% 53%, transparent 54%),
    linear-gradient(transparent 46%, currentColor 47% 53%, transparent 54%),
    var(--paper);
}

a.card:hover .icon-box {
  border-color: var(--white);
  color: var(--white);
  background: var(--red);
  box-shadow: 3px 3px 0 var(--white);
  animation: icon-kick 350ms ease;
}

@keyframes icon-kick {
  50% { transform: rotate(-5deg) scale(1.08); }
}

.status-pill,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  padding: 4px 9px;
  border: 1px solid var(--black);
  border-radius: 999px;
  color: var(--black);
  background: var(--paper);
  font-size: 0.7rem;
  font-weight: 900;
}

.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
}

.status-pill.done {
  color: var(--success);
  background: var(--success-soft);
}

.status-pill.done::before {
  background: var(--success);
}

a.card:hover .status-pill,
a.card:hover .tag {
  border-color: var(--white);
  color: var(--white);
  background: transparent;
}

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

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border: 2px solid var(--black);
  background: var(--white);
  box-shadow: 4px 4px 0 var(--black);
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -25px;
  bottom: -25px;
  width: 62px;
  height: 62px;
  border: 12px solid var(--red);
  border-radius: 50%;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin-top: 5px;
  font-family: "Arial Black", Inter, sans-serif;
  font-size: 1.8rem;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.page-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
  padding: clamp(28px, 5vw, 55px);
  border: 3px solid var(--black);
  background: var(--white);
  box-shadow: 10px 10px 0 var(--black);
}

.page-hero::before {
  width: 300px;
  height: 300px;
  border-width: 32px;
  opacity: 1;
}

.page-hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 115px;
  height: 9px;
  background: var(--red);
}

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

.page-hero h1 {
  margin-bottom: 12px;
  font-size: clamp(2.25rem, 5vw, 4.6rem);
}

.page-hero .lead {
  margin-bottom: 0;
}

.lesson-progress {
  min-width: 220px;
  padding: 17px;
  border: 2px solid var(--black);
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--red);
}

.lesson-progress span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 850;
}

.lesson-progress span:last-child { margin-bottom: 0; }
.lesson-progress.is-complete { border-color: var(--success); box-shadow: 4px 4px 0 var(--success); }
.lesson-progress.is-complete span { color: var(--success); }

.lesson-progress .button {
  width: 100%;
}

.lesson-progress .button.is-complete {
  color: var(--white);
  background: var(--success);
  box-shadow: 4px 4px 0 var(--black);
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 245px;
  gap: 32px;
  align-items: start;
  margin-top: 38px;
}

.article-flow {
  min-width: 0;
}

.article-flow > * + * {
  margin-top: 25px;
}

.content-card {
  position: relative;
  padding: clamp(22px, 3.4vw, 38px);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.12);
}

.content-card::after {
  content: "";
  position: absolute;
  top: -2px;
  right: 25px;
  width: 34px;
  height: 7px;
  background: var(--red);
}

.content-card p:last-child,
.callout p:last-child {
  margin-bottom: 0;
}

.content-card p,
.content-card li {
  color: #41403d;
}

.content-card strong {
  color: var(--black);
}

.content-card ul,
.content-card ol {
  padding-left: 1.25rem;
}

.content-card li + li {
  margin-top: 7px;
}

.content-card a:not(.button) {
  color: var(--red-dark);
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.toc {
  position: sticky;
  top: 26px;
  padding: 18px;
  border: 2px solid var(--black);
  background: var(--white);
  box-shadow: 5px 5px 0 var(--red);
}

.toc strong {
  display: block;
  margin-bottom: 10px;
  padding-bottom: 9px;
  border-bottom: 2px solid var(--black);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.toc a {
  position: relative;
  display: block;
  padding: 7px 7px 7px 17px;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 750;
  text-decoration: none;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.toc a::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 3px;
  width: 5px;
  height: 5px;
  background: var(--red);
}

.toc a:hover {
  color: var(--white);
  background: var(--black);
  transform: translateX(3px);
}

.step-list {
  display: grid;
  gap: 13px;
  margin-top: 18px;
}

.step {
  display: grid;
  grid-template-columns: 43px 1fr;
  gap: 15px;
  align-items: start;
  padding: 16px;
  border: 2px solid var(--black);
  background: var(--paper);
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.step:hover {
  background: var(--white);
  box-shadow: 4px 4px 0 var(--red);
  transform: translate(-2px, -2px);
}

.step-number {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 2px solid var(--black);
  color: var(--white);
  background: var(--red);
  box-shadow: 3px 3px 0 var(--black);
  font-size: 0.75rem;
  font-weight: 1000;
}

.step p {
  margin: 3px 0 0;
}

.callout {
  margin-top: 18px;
  padding: 18px 20px;
  border: 2px solid var(--black);
  border-left: 9px solid var(--red);
  color: #333;
  background: #f7eeee;
  box-shadow: 3px 3px 0 var(--black);
}

.callout.warning {
  border-left-color: #ffb000;
  background: var(--warning-soft);
}

.callout.danger {
  border-left-color: var(--red);
  background: var(--danger-soft);
}

.table-wrap {
  overflow-x: auto;
  border: 2px solid var(--black);
  box-shadow: 4px 4px 0 var(--black);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: 0.9rem;
}

th,
td {
  padding: 12px 14px;
  border-right: 1px solid var(--soft-line);
  border-bottom: 1px solid var(--soft-line);
  text-align: left;
  vertical-align: top;
}

th:last-child,
td:last-child {
  border-right: 0;
}

th {
  color: var(--white);
  background: var(--black);
  font-size: 0.71rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

tbody tr:nth-child(even) {
  background: #f6f4ef;
}

tbody tr:hover {
  background: #ffe5e5;
}

tr:last-child td {
  border-bottom: 0;
}

code,
.code {
  padding: 0.14em 0.4em;
  border: 1px solid var(--black);
  color: var(--black);
  background: #f1e4e4;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.91em;
}

pre {
  position: relative;
  overflow-x: auto;
  margin: 16px 0 0;
  padding: 24px 20px 20px;
  border: 2px solid var(--black);
  color: #f1f1f1;
  background: var(--black);
  box-shadow: 5px 5px 0 var(--red);
  line-height: 1.65;
}

pre::before {
  content: "CODE";
  position: absolute;
  top: 0;
  right: 0;
  padding: 2px 8px;
  color: var(--white);
  background: var(--red);
  font-family: Inter, sans-serif;
  font-size: 0.6rem;
  font-weight: 950;
  letter-spacing: 0.12em;
}

pre code {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
}

details:not(.sidebar-group) {
  border-top: 2px solid var(--black);
}

details:not(.sidebar-group):first-of-type {
  border-top: 0;
}

details:not(.sidebar-group) summary {
  padding: 15px 34px 15px 0;
  color: var(--black);
  font-weight: 900;
  cursor: pointer;
}

details:not(.sidebar-group)[open] summary {
  color: var(--red-dark);
}

details:not(.sidebar-group) p {
  padding: 0 0 16px;
}

.quiz-panel {
  overflow: hidden;
  box-shadow: var(--hard-shadow);
}

.quiz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  border-bottom: 2px solid var(--black);
  color: var(--white);
  background: var(--black);
}

.quiz-head h2,
.quiz-head h3,
.quiz-head p {
  margin: 0;
  color: var(--white);
}

.quiz-head .eyebrow {
  color: var(--red);
}

.quiz-meta {
  color: #bdbdbd;
  font-size: 0.8rem;
  font-weight: 850;
  white-space: nowrap;
}

.quiz-body {
  padding: clamp(22px, 4vw, 38px);
}

.question-label {
  margin-bottom: 7px;
  color: var(--red);
  font-size: 0.74rem;
  font-weight: 1000;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.question-title {
  margin-bottom: 8px;
  font-size: clamp(1.45rem, 3.3vw, 2.4rem);
}

.question-help {
  margin-bottom: 24px;
  color: var(--muted);
}

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

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--black);
  font-size: 0.78rem;
  font-weight: 900;
}

input,
select {
  width: 100%;
  min-height: 49px;
  padding: 10px 13px;
  border: 2px solid var(--black);
  border-radius: 0;
  color: var(--black);
  background: var(--white);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input::placeholder {
  color: #8c8982;
}

input:focus,
select:focus {
  border-color: var(--red);
  box-shadow: 4px 4px 0 var(--black);
  outline: 0;
}

.field.is-correct input {
  border-color: var(--success);
  background: var(--success-soft);
}

.field.is-wrong input {
  border-color: var(--red);
  background: var(--danger-soft);
}

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 23px;
}

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

.choice {
  position: relative;
  min-height: 61px;
  padding: 13px 15px;
  border: 2px solid var(--black);
  color: var(--black);
  background: var(--white);
  box-shadow: 3px 3px 0 var(--black);
  text-align: left;
  font-weight: 850;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.choice:hover:not([disabled]),
.choice.is-selected:not([disabled]) {
  color: var(--white);
  background: var(--black);
  box-shadow: 5px 5px 0 var(--red);
  transform: translate(-2px, -2px);
}

.choice.correct {
  border-color: var(--success);
  color: var(--success);
  background: var(--success-soft);
  box-shadow: 3px 3px 0 var(--success);
}

.choice.wrong {
  border-color: var(--red);
  color: var(--red-dark);
  background: var(--danger-soft);
  box-shadow: 3px 3px 0 var(--red);
}

#examChoices .choice {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.exam-choice-marker {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  color: var(--red);
  font-family: "Arial Black", sans-serif;
  font-size: 0.78rem;
}

.choice.correct .exam-choice-marker,
.choice.wrong .exam-choice-marker {
  color: currentColor;
}

.choice-grid.is-free-text {
  grid-template-columns: minmax(0, 1fr);
}

.exam-free-text {
  display: grid;
  gap: 9px;
  padding: clamp(18px, 4vw, 27px);
  border: 2px solid var(--black);
  background:
    linear-gradient(90deg, var(--red) 0 7px, transparent 7px),
    var(--paper);
  box-shadow: 5px 5px 0 var(--black);
}

.exam-free-text > label {
  color: var(--black);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.exam-free-text-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.exam-free-text-row input {
  min-height: 54px;
  font-size: 1rem;
  font-weight: 800;
}

.exam-free-text small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.exam-free-text.is-correct input {
  border-color: var(--success);
  background: var(--success-soft);
  box-shadow: 4px 4px 0 var(--success);
}

.exam-free-text.is-wrong input {
  border-color: var(--red);
  background: var(--danger-soft);
  box-shadow: 4px 4px 0 var(--red);
}

.exam-check-answer {
  min-width: 145px;
}

.feedback {
  display: none;
  margin-top: 21px;
  padding: 16px 18px;
  border: 2px solid var(--black);
  color: #333;
  background: var(--paper);
}

.feedback.is-visible {
  display: block;
  animation: feedback-in 200ms ease both;
}

@keyframes feedback-in {
  from { opacity: 0; transform: translateY(-7px); }
}

.feedback.correct {
  border-left: 9px solid var(--success);
  background: var(--success-soft);
}

.feedback.wrong {
  border-left: 9px solid var(--red);
  background: var(--danger-soft);
}

.feedback strong {
  display: block;
  margin-bottom: 4px;
  color: var(--black);
}

.feedback p {
  margin-bottom: 8px;
}

.exam-topic-link,
.exam-review-links a {
  color: var(--black);
  font-size: 0.8rem;
  font-weight: 900;
  text-decoration-color: var(--red);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

.exam-review-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.exam-review-links a {
  padding: 7px 9px;
  border: 2px solid var(--black);
  background: var(--white);
  text-decoration: none;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.exam-review-links a:hover {
  color: var(--white);
  background: var(--black);
  transform: translateY(-2px);
}

.search-row {
  max-width: 470px;
  margin-bottom: 18px;
}

.terminal {
  overflow: hidden;
  border: 3px solid var(--black);
  color: var(--white);
  background: var(--black);
  box-shadow: 7px 7px 0 var(--red);
}

.terminal-bar {
  display: flex;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid #3d3d3d;
  background: #141414;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
}

.terminal-dot:nth-child(2) { background: var(--white); }
.terminal-dot:nth-child(3) { background: #777; }

.terminal-content {
  padding: 23px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.terminal-prompt {
  color: var(--red);
}

.terminal-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.terminal-input-wrap input {
  min-height: 42px;
  padding: 6px 0;
  border: 0;
  border-bottom: 2px solid #777;
  color: var(--white);
  background: transparent;
  box-shadow: none;
  font-family: inherit;
}

.terminal-input-wrap input:focus {
  border-bottom-color: var(--red);
  box-shadow: none;
}

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

.formula {
  padding: 17px;
  border: 2px solid var(--black);
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--black);
}

.formula strong {
  display: block;
  margin-bottom: 5px;
  color: var(--red-dark);
  font-family: "SFMono-Regular", Consolas, monospace;
}

.timeline {
  display: grid;
  gap: 0;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 31px 1fr;
  gap: 15px;
  padding-bottom: 23px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 30px;
  bottom: 0;
  left: 14px;
  width: 3px;
  background: var(--black);
}

.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:last-child::before { display: none; }

.timeline-dot {
  z-index: 1;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 2px solid var(--black);
  border-radius: 50%;
  color: var(--white);
  background: var(--red);
  font-size: 0.7rem;
  font-weight: 1000;
}

.year-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
  margin-top: 31px;
}

.year-link {
  min-height: 80px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 2px solid var(--black);
  color: var(--muted);
  background: var(--white);
  box-shadow: 4px 4px 0 var(--black);
  font-weight: 800;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.year-link:hover,
.year-link[aria-current="page"] {
  color: var(--white);
  background: var(--black);
  box-shadow: 6px 6px 0 var(--red);
  transform: translate(-2px, -2px);
}

.year-link strong,
.year-link span:last-child {
  display: block;
}

.year-link strong {
  color: var(--black);
}

.year-link:hover strong,
.year-link[aria-current="page"] strong {
  color: var(--white);
}

.year-link span:last-child {
  font-size: 0.75rem;
}

.year-number {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 2px solid var(--black);
  color: var(--white);
  background: var(--red);
  box-shadow: 3px 3px 0 var(--black);
  font-family: "Arial Black", sans-serif;
  font-size: 1.2rem;
}

.year-link:hover .year-number,
.year-link[aria-current="page"] .year-number {
  border-color: var(--white);
  box-shadow: 3px 3px 0 var(--white);
}

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

.syllabus-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 15px;
  padding: 19px;
  border: 2px solid var(--black);
  background: var(--paper);
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.syllabus-item:hover {
  background: var(--white);
  box-shadow: 5px 5px 0 var(--red);
  transform: translate(-2px, -2px);
}

.syllabus-item h3,
.syllabus-item p { margin-bottom: 0; }
.syllabus-item p { margin-top: 5px; color: var(--muted); font-size: 0.88rem; }
.syllabus-item .icon-box { margin-bottom: 0; }

.topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.empty-state {
  position: relative;
  padding: clamp(34px, 6vw, 70px);
  border: 3px dashed var(--black);
  color: var(--muted);
  background: var(--white);
  text-align: center;
}

.empty-state::before,
.empty-state::after {
  content: "";
  position: absolute;
  width: 42px;
  height: 8px;
  background: var(--red);
}

.empty-state::before { top: -4px; left: 34px; }
.empty-state::after { right: 34px; bottom: -4px; }
.empty-state h2 { margin-bottom: 10px; }

.cookie-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 38px;
  padding: 18px 20px;
  border: 2px solid var(--black);
  border-left: 9px solid var(--red);
  color: var(--muted);
  background: var(--white);
  box-shadow: 4px 4px 0 var(--black);
  font-size: 0.82rem;
}

.cookie-note strong { color: var(--black); }

.site-footer {
  border-top: 3px solid var(--black);
  background: var(--paper-2);
}

.footer-wrap {
  width: min(calc(100% - clamp(28px, 5vw, 76px)), var(--content));
  min-height: 94px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.footer-wrap a {
  color: var(--black);
  font-weight: 900;
  text-decoration-color: var(--red);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

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

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; }
  .hero-progress { justify-self: center; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-layout { grid-template-columns: 1fr; }
  .toc { position: static; order: -1; }
}

@media (max-width: 800px) {
  :root { --sidebar: 66px; }

  body[data-page] .site-header.is-expanded {
    width: min(355px, calc(100vw - 18px));
  }

  .sidebar-top { height: 72px; }
  .sidebar-brand { padding-left: 10px; }
  .wizard-w { width: 42px; height: 42px; }
  .sidebar-toggle { top: 17px; right: 13px; }
  .sidebar-nav { height: calc(100dvh - 217px); padding-inline: 4px; }
  .sidebar-search { width: calc(100% - 12px); margin-inline: 6px; padding-inline: 8px; }
  .sidebar-link { min-width: 55px; padding-inline: 10px; }
  .sidebar-foot { padding-inline: 24px; }

  .nav-scrim {
    position: fixed;
    inset: 0 var(--sidebar) 0 0;
    z-index: 110;
    border: 0;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(3px);
  }

  body.sidebar-is-open .nav-scrim {
    display: block;
    animation: fade-in 160ms ease both;
  }

  .page-shell,
  .footer-wrap {
    width: min(calc(100% - 28px), var(--content));
  }
}

@media (max-width: 680px) {
  .page-shell { padding-top: 28px; }
  h1 { font-size: clamp(2.2rem, 12vw, 3.35rem); }

  .hero,
  .page-hero {
    padding: 27px 20px;
    box-shadow: 7px 7px 0 var(--red);
  }

  .page-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .page-hero::before,
  .hero::before { opacity: 0.4; }

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

  .card-grid,
  .card-grid.two,
  .stats-grid,
  .answer-grid,
  .choice-grid,
  .formula-grid,
  .year-switcher,
  .syllabus-grid {
    grid-template-columns: 1fr;
  }

  .exam-free-text-row {
    grid-template-columns: 1fr;
  }

  .exam-check-answer {
    width: 100%;
  }

  .section-heading {
    display: block;
  }

  .section-heading::after {
    display: block;
    margin: 15px 0 0;
  }

  .cookie-note,
  .footer-wrap {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-wrap { padding: 24px 0; }

  .search-overlay { padding: 9px; }
  .search-dialog { max-height: calc(100dvh - 18px); box-shadow: 7px 7px 0 var(--red); }
  .search-dialog-head { padding: 20px 18px 8px; }
  .search-dialog-head h2 { font-size: 1.55rem; }
  .search-input-wrap { margin-inline: 18px; }
  .search-input-wrap input { padding-right: 16px; }
  .search-input-wrap kbd { display: none; }
  .search-status { padding-inline: 20px; }
  .search-results { max-height: calc(100dvh - 245px); padding-inline: 18px; }
  .search-result { grid-template-columns: 34px minmax(0, 1fr); }
  .search-result .result-arrow { display: none; }
  .search-result-copy > span { white-space: normal; }

  .topic-exercise-row {
    align-items: flex-start;
    flex-direction: column-reverse;
    margin-top: 3px;
  }

  .exercise-overlay { padding: 8px; }
  .exercise-modal { max-height: calc(100dvh - 16px); box-shadow: 7px 7px 0 var(--red); }
  .exercise-modal-head { padding: 25px 18px 15px; }
  .exercise-progress { align-items: flex-start; flex-direction: column; gap: 2px; padding-inline: 18px; }
  .exercise-modal-body { padding: 24px 18px; }
  .exercise-modal-foot { align-items: stretch; flex-direction: column; padding: 16px 18px 20px; }
  .exercise-modal-foot > a { margin: 0 0 5px; }
  .exercise-modal-foot .button { width: 100%; }
}

/* Dashboard examination module */
.exam-dashboard-module {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  padding: clamp(30px, 5vw, 58px);
  overflow: hidden;
  border: 3px solid var(--black);
  color: var(--white);
  background:
    repeating-linear-gradient(-45deg, transparent 0 18px, rgba(255, 255, 255, 0.035) 18px 20px),
    var(--black);
  box-shadow: 10px 10px 0 var(--red);
}

.exam-dashboard-module::before {
  content: "PRÜFUNG";
  position: absolute;
  right: -35px;
  bottom: -45px;
  color: rgba(255, 255, 255, 0.035);
  font-family: "Arial Black", sans-serif;
  font-size: clamp(5rem, 12vw, 10rem);
  line-height: 1;
  transform: rotate(-5deg);
}

.exam-dashboard-copy,
.exam-dashboard-options {
  position: relative;
  z-index: 1;
}

.exam-dashboard-copy h2 {
  margin-bottom: 16px;
  color: var(--white);
  font-size: clamp(2rem, 4.5vw, 4rem);
}

.exam-dashboard-copy p:not(.eyebrow) {
  color: #cfcfcf;
}

.exam-dashboard-copy ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.exam-dashboard-copy li {
  padding: 5px 9px;
  border: 1px solid #777;
  font-size: 0.72rem;
  font-weight: 850;
}

.exam-dashboard-options {
  display: grid;
  gap: 15px;
}

.exam-dashboard-options > a {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 17px;
  border: 2px solid var(--white);
  color: var(--black);
  background: var(--white);
  box-shadow: 5px 5px 0 var(--red);
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.exam-dashboard-options > a:hover {
  color: var(--white);
  background: var(--red);
  box-shadow: 8px 8px 0 var(--white);
  transform: translate(-3px, -3px);
}

.exam-dashboard-options > a > span {
  font-family: "Arial Black", sans-serif;
  font-size: 1.6rem;
}

.exam-dashboard-options > a > span strong { color: var(--red); }
.exam-dashboard-options > a:hover > span strong { color: var(--black); }
.exam-dashboard-options div { display: grid; }
.exam-dashboard-options small { opacity: 0.68; font-weight: 800; }
.exam-dashboard-options i { font-size: 1.6rem; font-style: normal; font-weight: 950; }

/* Full AP1/AP2 examination simulator */
.exam-workspace[hidden],
.exam-results[hidden],
.exam-resume[hidden] {
  display: none;
}

.exam-sim-shell {
  --exam-red: #ff0000;
  max-width: 1380px;
}

.exam-sim-hero {
  grid-template-columns: minmax(0, 1fr) auto;
}

.exam-seal {
  position: relative;
  width: 146px;
  height: 146px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 4px solid var(--white);
  outline: 5px solid var(--red);
  color: var(--white);
  background: var(--red);
  transform: rotate(4deg);
}

.exam-seal::before,
.exam-seal::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 2px dashed var(--white);
}

.exam-seal::after {
  inset: -10px;
  border-color: var(--red);
}

.exam-seal span {
  position: relative;
  z-index: 1;
  font-family: "Arial Black", sans-serif;
  font-size: 3rem;
  line-height: 1;
}

.exam-seal small {
  position: relative;
  z-index: 1;
  font-size: 0.65rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.exam-type-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 19px 22px;
  align-items: start;
  padding: clamp(25px, 4vw, 40px);
  overflow: hidden;
  border: 3px solid var(--black);
  background: var(--white);
  box-shadow: 8px 8px 0 var(--black);
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.exam-type-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 100%;
  background: var(--red);
}

.exam-type-card:hover,
.exam-type-card.is-recommended {
  box-shadow: 12px 12px 0 var(--red);
  transform: translate(-3px, -3px);
}

.exam-type-card.is-recommended::after {
  content: "Ausgewählt";
  position: absolute;
  top: 13px;
  right: -33px;
  width: 130px;
  padding: 4px 0;
  color: var(--white);
  background: var(--red);
  font-size: 0.63rem;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(42deg);
}

.exam-type-number {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 3px solid var(--black);
  color: var(--black);
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--red);
  font-family: "Arial Black", sans-serif;
  font-size: 1.4rem;
}

.exam-type-number span { color: var(--red); font-size: 2.3rem; }
.exam-type-card h3 { margin-bottom: 0; font-size: clamp(1.5rem, 3vw, 2.25rem); }
.exam-type-card > p { grid-column: 1 / -1; margin: 0; color: var(--muted); }

.exam-facts {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.exam-facts li {
  display: grid;
  place-items: center;
  padding: 10px 7px;
  border: 2px solid var(--black);
  background: var(--paper);
  font-size: 0.68rem;
  font-weight: 850;
  text-align: center;
}

.exam-facts strong { color: var(--red); font-size: 1.35rem; line-height: 1; }
.exam-start-button { grid-column: 1 / -1; width: 100%; }
.exam-disclaimer { margin-top: 30px; }

.exam-resume {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 30px;
  padding: 20px 22px;
  border: 3px solid var(--black);
  background: var(--warning-soft);
  box-shadow: 6px 6px 0 var(--black);
}

.exam-resume > div:first-child { display: grid; }
.exam-resume .eyebrow { margin-bottom: 2px; }
.exam-resume > div:first-child > strong { font-size: 1.15rem; }
.exam-resume > div:first-child > span { color: var(--muted); font-size: 0.8rem; font-weight: 750; }
.exam-resume > div:last-child { display: flex; gap: 10px; }

.exam-workspace {
  animation: page-enter 300ms ease both;
}

.exam-workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 25px 28px;
  border: 3px solid var(--black);
  color: var(--white);
  background: var(--black);
  box-shadow: 8px 8px 0 var(--red);
}

.exam-workspace-head h1 {
  margin: 0;
  color: var(--white);
  font-size: clamp(1.8rem, 4vw, 3.2rem);
}

.exam-clock {
  min-width: 185px;
  padding: 11px 16px;
  border: 2px solid var(--white);
  text-align: center;
}

.exam-clock small { display: block; color: #bbb; font-size: 0.65rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.exam-clock strong { font-family: Consolas, monospace; font-size: 1.65rem; letter-spacing: 0.04em; }
.exam-clock.is-urgent { border-color: var(--red); color: var(--red); animation: status-pulse 1.2s ease-in-out infinite; }

.exam-rule-strip {
  display: grid;
  grid-template-columns: auto minmax(100px, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin: 8px 0 0;
  padding: 12px 18px;
  border: 2px solid var(--black);
  background: var(--white);
  font-size: 0.76rem;
  font-weight: 900;
}

.exam-progress-track {
  height: 10px;
  overflow: hidden;
  border: 2px solid var(--black);
  background: var(--paper-2);
}

.exam-progress-track span { display: block; width: 0; height: 100%; background: var(--red); transition: width 220ms ease; }
.exam-exit { border: 0; color: var(--black); background: none; font-size: 0.75rem; font-weight: 900; text-decoration: underline 3px var(--red); text-underline-offset: 4px; cursor: pointer; }

.exam-situation {
  margin: 34px 0 24px;
  padding: 25px 28px;
  border: 2px solid var(--black);
  border-left: 10px solid var(--red);
  background: var(--white);
}

.exam-situation h2 { margin-bottom: 9px; }
.exam-situation p:last-child { margin: 0; color: var(--muted); }

.exam-runner-layout {
  display: grid;
  grid-template-columns: 285px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.exam-navigator {
  position: sticky;
  top: 18px;
  padding: 18px;
  border: 3px solid var(--black);
  background: var(--white);
  box-shadow: 6px 6px 0 var(--black);
}

.exam-navigator-head {
  display: flex;
  justify-content: space-between;
  gap: 9px;
  padding-bottom: 13px;
  border-bottom: 2px solid var(--black);
}

.exam-navigator-head > span { color: var(--muted); font-size: 0.65rem; font-weight: 800; }
.exam-navigator-head i { display: inline-block; width: 8px; height: 8px; margin-right: 4px; background: var(--success); }
.exam-nav-section { padding: 15px 0; border-bottom: 1px solid var(--soft-line); }
.exam-nav-section > strong { display: block; margin-bottom: 8px; font-size: 0.68rem; line-height: 1.25; }
.exam-nav-section > div { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }

.exam-nav-section button {
  aspect-ratio: 1;
  border: 2px solid var(--black);
  color: var(--black);
  background: var(--paper);
  font-size: 0.72rem;
  font-weight: 950;
  cursor: pointer;
  transition: color 130ms ease, background 130ms ease, transform 130ms ease;
}

.exam-nav-section button:hover,
.exam-nav-section button.is-current { color: var(--white); background: var(--black); transform: translateY(-2px); }
.exam-nav-section button.is-answered { border-color: var(--success); box-shadow: inset 0 -5px 0 var(--success); }
.exam-nav-section button.is-current { box-shadow: inset 0 -5px 0 var(--red); }
.exam-submit { width: 100%; margin-top: 18px; }
.exam-navigator > small { display: block; margin-top: 8px; color: var(--muted); font-size: 0.65rem; text-align: center; }

.exam-paper {
  min-width: 0;
  border: 3px solid var(--black);
  background: var(--white);
  box-shadow: 8px 8px 0 var(--red);
}

.exam-paper-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  border-bottom: 3px solid var(--black);
  background: var(--paper);
}

.exam-paper-head h2 { margin: 0; font-size: clamp(1.35rem, 2.8vw, 2.1rem); }
.exam-paper-head > strong { flex: 0 0 auto; padding: 7px 10px; color: var(--white); background: var(--black); font-size: 0.78rem; }
.exam-paper-body { padding: clamp(24px, 5vw, 48px); }
.exam-question-context { margin-bottom: 17px; padding: 13px 15px; border-left: 6px solid var(--red); color: var(--muted); background: var(--paper); font-weight: 700; }
.exam-sim-question { margin-bottom: 28px; font-size: clamp(1.25rem, 2.5vw, 1.85rem); line-height: 1.35; white-space: pre-wrap; }

.exam-answer-options {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  border: 0;
}

.exam-answer-instruction { margin-bottom: 8px; color: var(--red-dark); font-size: 0.75rem; font-weight: 900; }
.exam-answer-option { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 13px; align-items: center; min-height: 60px; padding: 11px 14px; border: 2px solid var(--black); background: var(--white); box-shadow: 3px 3px 0 var(--black); font-weight: 800; cursor: pointer; transition: color 150ms ease, background 150ms ease, box-shadow 150ms ease, transform 150ms ease; }
.exam-answer-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.exam-answer-marker { width: 31px; height: 31px; display: grid; place-items: center; border: 2px solid currentColor; color: var(--red); font-family: "Arial Black", sans-serif; font-size: 0.75rem; }
.exam-answer-option:hover { color: var(--white); background: var(--black); box-shadow: 5px 5px 0 var(--red); transform: translate(-2px, -2px); }
.exam-answer-option:has(input:checked) { color: var(--white); background: var(--black); box-shadow: 5px 5px 0 var(--red); }
.exam-answer-option:has(input:focus-visible) { outline: 4px solid var(--red); outline-offset: 3px; }

.exam-number-answer,
.exam-text-answer { display: grid; gap: 8px; }
.exam-number-answer > span:first-child,
.exam-text-answer > span:first-child { font-size: 0.78rem; font-weight: 950; letter-spacing: 0.08em; text-transform: uppercase; }
.exam-number-answer > span:last-child { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.exam-number-answer input { min-height: 58px; font-size: 1.2rem; font-weight: 900; }
.exam-number-answer strong { min-width: 110px; display: grid; place-items: center; padding: 0 14px; border: 2px solid var(--black); border-left: 0; color: var(--white); background: var(--black); }
.exam-text-answer small { color: var(--muted); font-size: 0.72rem; font-weight: 800; }
.exam-text-answer textarea,
.exam-question-tools textarea { width: 100%; padding: 13px 15px; border: 2px solid var(--black); border-radius: 0; color: var(--black); background: var(--white); font: inherit; resize: vertical; transition: border-color 150ms ease, box-shadow 150ms ease; }
.exam-text-answer textarea:focus,
.exam-question-tools textarea:focus { border-color: var(--red); box-shadow: 4px 4px 0 var(--black); outline: 0; }

.exam-question-tools { display: grid; gap: 7px; margin-top: 33px; padding-top: 21px; border-top: 2px dashed var(--soft-line); }
.exam-question-tools label { font-size: 0.74rem; font-weight: 900; }
.exam-question-tools label span { color: var(--muted); font-weight: 650; }
.exam-question-tools textarea { min-height: 76px; background: var(--paper); }
.exam-paper-foot { display: flex; align-items: center; justify-content: space-between; gap: 13px; padding: 17px 24px 23px; border-top: 3px solid var(--black); background: var(--paper); }
.exam-paper-foot > span { color: var(--success); font-size: 0.68rem; font-weight: 850; }

.exam-results { animation: page-enter 350ms ease both; }
.exam-result-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 35px; align-items: center; padding: clamp(30px, 5vw, 55px); border: 3px solid var(--black); color: var(--white); background: var(--black); box-shadow: 10px 10px 0 var(--red); }
.exam-result-hero h1 { color: var(--white); font-size: clamp(2rem, 5vw, 4.2rem); }
.exam-result-hero p:last-child { max-width: 760px; margin: 0; color: #c7c7c7; }
.exam-grade { width: 160px; height: 160px; display: grid; place-items: center; align-content: center; border: 5px solid var(--white); outline: 6px solid var(--red); background: var(--red); transform: rotate(3deg); }
.exam-grade span { font-size: 0.68rem; font-weight: 950; letter-spacing: 0.14em; text-transform: uppercase; }
.exam-grade strong { font-family: "Arial Black", sans-serif; font-size: 4.4rem; line-height: 0.95; }
.exam-grade small { font-weight: 900; }
.exam-result-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.exam-result-stats article { display: grid; padding: 20px; border: 2px solid var(--black); background: var(--white); box-shadow: 4px 4px 0 var(--black); }
.exam-result-stats article > span { color: var(--muted); font-size: 0.7rem; font-weight: 900; text-transform: uppercase; }
.exam-result-stats article > strong { color: var(--red-dark); font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.15; }
.exam-result-stats article > small { color: var(--muted); font-weight: 750; }

#examSectionResults { display: grid; gap: 14px; }
.exam-section-score { padding: 17px 20px; border: 2px solid var(--black); background: var(--white); }
.exam-section-score > div:first-child { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 10px; }
.exam-section-score > div:first-child span { color: var(--red-dark); font-weight: 950; }
.exam-section-score > div:last-child { height: 16px; padding: 2px; border: 2px solid var(--black); background: var(--paper); }
.exam-section-score > div:last-child span { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--red) 0 25px, var(--black) 25px 31px); }

.result-filters { display: flex; flex-wrap: wrap; gap: 7px; }
.result-filters button { padding: 7px 10px; border: 2px solid var(--black); color: var(--black); background: var(--white); font-size: 0.72rem; font-weight: 900; cursor: pointer; }
.result-filters button:hover,
.result-filters button.is-active { color: var(--white); background: var(--black); box-shadow: 3px 3px 0 var(--red); }
.exam-review-list { display: grid; gap: 20px; }
.exam-review-card { overflow: hidden; border: 3px solid var(--black); background: var(--white); box-shadow: 6px 6px 0 var(--black); }
.exam-review-card.is-correct { border-left: 10px solid var(--success); }
.exam-review-card.is-partial { border-left: 10px solid #d68a00; }
.exam-review-card.is-wrong { border-left: 10px solid var(--red); }
.exam-review-card > header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 21px; border-bottom: 2px solid var(--black); background: var(--paper); }
.exam-review-card > header h3 { margin: 0; }
.exam-review-card > header > strong { flex: 0 0 auto; padding: 6px 9px; color: var(--white); background: var(--black); }
.exam-review-prompt { margin: 0; padding: 20px 21px; border-bottom: 1px solid var(--soft-line); font-weight: 850; white-space: pre-wrap; }
.exam-review-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.exam-review-columns > div { padding: 19px 21px; }
.exam-review-columns > div + div { border-left: 2px solid var(--black); background: var(--success-soft); }
.exam-review-columns strong { display: block; margin-bottom: 7px; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
.exam-review-columns p { margin: 0; color: var(--muted); white-space: pre-wrap; }
.exam-criteria { display: flex; flex-wrap: wrap; gap: 7px; padding: 14px 21px 19px; border-top: 1px solid var(--soft-line); }
.exam-criteria span { padding: 5px 8px; border: 1px solid currentColor; font-size: 0.69rem; font-weight: 850; }
.exam-criteria .met { color: var(--success); background: var(--success-soft); }
.exam-criteria .missed { color: var(--red-dark); background: var(--danger-soft); }
.exam-result-actions { display: flex; justify-content: center; gap: 12px; margin-top: 50px; }

@media (max-width: 1050px) {
  .exam-dashboard-module { grid-template-columns: 1fr; }
  .exam-runner-layout { grid-template-columns: 1fr; }
  .exam-navigator { position: static; }
  .exam-nav-section > div { grid-template-columns: repeat(10, minmax(34px, 1fr)); }
  .exam-submit { max-width: 330px; }
}

@media (max-width: 760px) {
  .certification-head { grid-template-columns: 1fr; }
  .certification-head > strong { justify-self: start; }
  .certification-intro { grid-template-columns: 1fr; }
  .certification-intro > div { border-right: 0; border-bottom: 2px solid var(--black); }
  .certification-actions,
  .certification-summary { align-items: stretch; flex-direction: column; }
  .certification-summary > strong { align-self: flex-start; }
  .certification-review-answers { grid-template-columns: 1fr; }
  .certification-review-answers p + p { border-top: 2px solid var(--black); border-left: 0; }
  .exam-dashboard-options > a { grid-template-columns: 57px minmax(0, 1fr) auto; padding: 13px; }
  .exam-dashboard-options > a > span { font-size: 1.25rem; }
  .exam-type-grid,
  .exam-result-stats,
  .exam-review-columns { grid-template-columns: 1fr; }
  .exam-type-card { grid-template-columns: 62px minmax(0, 1fr); padding: 24px 20px; }
  .exam-type-number { width: 61px; height: 61px; font-size: 1rem; }
  .exam-type-number span { font-size: 1.8rem; }
  .exam-resume { align-items: stretch; flex-direction: column; }
  .exam-resume > div:last-child { flex-direction: column; }
  .exam-workspace-head,
  .exam-result-hero { align-items: stretch; grid-template-columns: 1fr; }
  .exam-workspace-head { flex-direction: column; }
  .exam-clock { width: 100%; }
  .exam-rule-strip { grid-template-columns: 1fr auto; }
  .exam-progress-track { grid-column: 1 / -1; grid-row: 2; }
  .exam-situation { padding: 21px 19px; }
  .exam-nav-section > div { grid-template-columns: repeat(5, 1fr); }
  .exam-paper-head { align-items: flex-start; }
  .exam-paper-body { padding: 24px 18px; }
  .exam-paper-foot { align-items: stretch; flex-direction: column; padding: 15px 18px 20px; }
  .exam-paper-foot .button { width: 100%; }
  .exam-paper-foot > span { order: -1; text-align: center; }
  .exam-number-answer > span:last-child { grid-template-columns: 1fr; }
  .exam-number-answer strong { min-height: 44px; border: 2px solid var(--black); border-top: 0; }
  .exam-grade { width: 135px; height: 135px; justify-self: center; }
  .exam-grade strong { font-size: 3.5rem; }
  .exam-review-columns > div + div { border-top: 2px solid var(--black); border-left: 0; }
  .exam-section-score > div:first-child { align-items: flex-start; flex-direction: column; gap: 3px; }
  .result-filters { margin-top: 15px; }
  .exam-result-actions { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
