:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-2: #eef3f8;
  --accent: #1d4ed8;
  --accent-2: #0ea5a4;
  --text: #0f172a;
  --muted: #5b6b85;
  --border: #dbe4ef;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
  --page-bg: radial-gradient(circle at top, #ffffff 0%, #eef3f8 45%, #e8eff7 100%);
  --nav-bg: rgba(255, 255, 255, 0.72);
  --nav-border: #dbe4ef;
  --btn-bg: #ffffff;
  --input-bg: #f9fbff;
  --footer-bg: #f7f9fc;
  --progress-track: #e2e8f0;
  --media-bg: #0f172a;
  --glow-1: radial-gradient(circle, rgba(29, 78, 216, 0.18), rgba(29, 78, 216, 0));
  --glow-2: radial-gradient(circle, rgba(14, 165, 164, 0.18), rgba(14, 165, 164, 0));
}

:root[data-theme="dark"] {
  --bg: #0b1220;
  --panel: #0f172a;
  --panel-2: #111c2e;
  --accent: #60a5fa;
  --accent-2: #2dd4bf;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --border: #1f2a3b;
  --shadow: 0 20px 50px rgba(2, 6, 23, 0.45);
  --shadow-soft: 0 12px 24px rgba(2, 6, 23, 0.35);
  --page-bg: radial-gradient(circle at top, #111827 0%, #0b1220 50%, #05070d 100%);
  --nav-bg: rgba(11, 18, 32, 0.85);
  --nav-border: #1f2a3b;
  --btn-bg: #0f1b2d;
  --input-bg: #0b1627;
  --footer-bg: #0b1627;
  --progress-track: #1f2a3b;
  --media-bg: #020617;
  --glow-1: radial-gradient(circle, rgba(96, 165, 250, 0.12), rgba(96, 165, 250, 0));
  --glow-2: radial-gradient(circle, rgba(45, 212, 191, 0.12), rgba(45, 212, 191, 0));
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Sora', 'Manrope', sans-serif;
  color: var(--text);
  background: var(--page-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: '';
  position: fixed;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  opacity: 0.55;
  z-index: -1;
  pointer-events: none;
}

body::before {
  top: -160px;
  right: -120px;
  background: var(--glow-1);
}

body::after {
  bottom: -200px;
  left: -140px;
  background: var(--glow-2);
}

a { color: inherit; text-decoration: none; }

.nav, .card, .hero { animation-delay: 0.05s; }

.container { max-width: 1120px; margin: 0 auto; padding: 36px 24px 40px; width: 100%; }
main.container { flex: 1 0 auto; }

.nav {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

@media (hover: none) and (pointer: coarse) {
  .nav {
    position: static;
    backdrop-filter: none;
  }
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 24px;
  max-width: 1120px;
  margin: 0 auto;
}

.nav-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-brand {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-brand span { color: var(--accent); font-weight: 600; }
.nav-links { display: flex; gap: 14px; align-items: center; font-size: 14px; }
.nav-links form { margin: 0; }
.nav-links a { padding: 6px 10px; border-radius: 8px; }
.nav-links a:hover { color: var(--accent); }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  padding: 4px;
}

.lang-switch a {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 999px;
  padding: 6px 10px;
}

.lang-switch a.is-active {
  background: var(--panel);
  color: var(--text);
}

.nav-burger {
  display: none;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  align-items: center;
  justify-content: center;
  padding: 0;
}

.nav-burger-lines {
  position: relative;
  width: 16px;
  height: 12px;
}

.nav-burger-lines span,
.nav-burger-lines::before,
.nav-burger-lines::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
}

.nav-burger-lines::before { top: 0; }
.nav-burger-lines span { top: 5px; }
.nav-burger-lines::after { top: 10px; }

.nav[data-menu-open="true"] .nav-burger-lines span { opacity: 0; }
.nav[data-menu-open="true"] .nav-burger-lines::before {
  top: 5px;
  transform: rotate(45deg);
}
.nav[data-menu-open="true"] .nav-burger-lines::after {
  top: 5px;
  transform: rotate(-45deg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--btn-bg);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}

.btn-primary {
  background: linear-gradient(120deg, var(--accent), #2563eb);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 14px 30px rgba(29, 78, 216, 0.25);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  box-shadow: none;
}

.theme-toggle {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 999px;
  box-shadow: none;
}

.theme-toggle .icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }

:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

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

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-soft);
  animation: fadeUp 0.6s ease both;
}

.card.soft { background: var(--panel-2); }

.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.hero {
  padding: 52px;
  background: linear-gradient(120deg, rgba(29, 78, 216, 0.08), rgba(14, 165, 164, 0.12));
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: fadeUp 0.7s ease both;
}

.hero h1 {
  font-family: 'Fraunces', serif;
  font-size: 42px;
  margin: 12px 0;
}

.hero p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
  max-width: 680px;
}

.badge {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', serif;
  letter-spacing: -0.01em;
}

.muted { color: var(--muted); }
.small { font-size: 13px; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; }
.table th { text-transform: uppercase; font-size: 11px; color: var(--muted); letter-spacing: 0.08em; }

.input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
}

.input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(96, 165, 250, 0.25);
  border-color: var(--accent);
}

.label { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: 0.02em; }

.section-label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
}

.prose {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text);
  max-width: 760px;
}

.prose p { margin: 0 0 16px; }
.prose ul { padding-left: 18px; margin: 0 0 16px; }
.prose li { margin: 6px 0; }
.prose a { color: var(--accent); text-decoration: underline; }
.prose h2, .prose h3, .prose h4 {
  font-family: 'Fraunces', serif;
  margin: 24px 0 12px;
}

.media-frame {
  aspect-ratio: 16/9;
  background: var(--media-bg);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.media-panel p { margin-top: 12px; color: var(--muted); }

.notice {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(14, 165, 164, 0.25);
  background: rgba(14, 165, 164, 0.08);
  color: #0f766e;
  margin-bottom: 16px;
}

.error {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(248, 113, 113, 0.4);
  background: rgba(254, 226, 226, 0.7);
  color: #b91c1c;
  font-size: 13px;
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.flash {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  font-size: 14px;
}

.flash--success {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
}

.flash--info {
  border-color: rgba(37, 99, 235, 0.3);
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

.flash--warning {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.1);
  color: #b45309;
}

.flash--error {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(254, 226, 226, 0.7);
  color: #b91c1c;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.page-header h1 {
  margin: 0;
}

.page-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
}

.page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.kpi-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.kpi-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.kpi-label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kpi-value {
  margin-top: 8px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
}

.kpi-value--small {
  font-size: 20px;
}

.kpi-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.progress {
  margin-top: 12px;
  height: 8px;
  border-radius: 999px;
  background: var(--progress-track);
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
}

.progress-meta {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-highlight {
  background: linear-gradient(120deg, rgba(29, 78, 216, 0.11), rgba(14, 165, 164, 0.08));
}

.dashboard-header {
  align-items: center;
}

.dashboard-cta {
  align-self: center;
}

.module-card {
  display: grid;
  gap: 8px;
}

.module-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.module-card__title {
  margin: 0;
  font-size: 22px;
}

.module-card__meta {
  color: var(--muted);
  font-size: 13px;
}

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

.lesson-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: var(--panel);
}

.lesson-item.is-complete {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
}

.lesson-item__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.lesson-item__head strong {
  font-size: 15px;
}

.lesson-item__meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  background: var(--panel-2);
}

.status-pill--ok {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.status-pill--warn {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.status-pill--danger {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.12);
  color: #b91c1c;
}

.status-pill--neutral {
  border-color: var(--border);
  background: var(--panel-2);
  color: var(--muted);
}

.toolbar {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 1.5fr) minmax(130px, 150px) minmax(130px, 170px) auto;
  align-items: end;
}

.toolbar--compact {
  grid-template-columns: minmax(180px, 1.5fr) minmax(130px, 170px) auto;
}

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

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

.table .cell-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.table .cell-actions form {
  margin: 0;
}

.inline-form {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.choice-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
}

.choice-card input {
  margin-top: 3px;
}

.details-list {
  display: grid;
  gap: 8px;
}

.details-list div {
  color: var(--muted);
}

.details-list strong {
  color: var(--text);
}

.hero-actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.feature-card h3 {
  margin-top: 0;
}

.price-line {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}

.price-line strong {
  font-size: 40px;
  line-height: 1;
  color: var(--accent);
}

.list-check {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.list-check li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--muted);
}

.list-check li::before {
  content: "*";
  color: var(--accent-2);
  font-weight: 700;
  line-height: 1.2;
}

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

.faq-list p {
  margin: 0;
}

.cta-card {
  background: linear-gradient(120deg, rgba(29, 78, 216, 0.12), rgba(14, 165, 164, 0.12));
}

.cta-card__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.lesson-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.lesson-nav .btn {
  flex: 1;
  min-width: 180px;
}

.translation-note {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
}

.translation-note p {
  margin: 8px 0 0;
}

.admin-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.soft-grid {
  display: grid;
  gap: 6px;
}

.not-found {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--border);
  background:
    linear-gradient(140deg, rgba(29, 78, 216, 0.12), rgba(14, 165, 164, 0.08)),
    var(--panel);
  box-shadow: var(--shadow);
  padding: clamp(28px, 6vw, 64px);
  min-height: min(66vh, 680px);
  display: grid;
  place-items: center;
  gap: 14px;
  text-align: center;
  animation: fadeUp 0.7s ease both;
}

.not-found::before {
  content: "";
  position: absolute;
  inset: auto -140px -220px auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: var(--glow-1);
  opacity: 0.8;
}

.not-found__code {
  font-family: 'Fraunces', serif;
  font-size: clamp(82px, 18vw, 188px);
  line-height: 0.9;
  letter-spacing: -0.03em;
  margin-top: -2px;
}

.not-found__title {
  margin: 0;
  font-size: clamp(28px, 4.2vw, 44px);
}

.not-found__text {
  margin: 0;
  max-width: 640px;
  color: var(--muted);
  line-height: 1.75;
}

.not-found__path {
  margin: 0;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--muted);
  max-width: min(720px, 100%);
}

.not-found__path code {
  color: var(--text);
  font-family: 'Sora', 'Manrope', sans-serif;
  word-break: break-all;
}

.not-found__actions {
  margin-top: 6px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.not-found--forbidden {
  background:
    linear-gradient(140deg, rgba(225, 29, 72, 0.1), rgba(245, 158, 11, 0.08)),
    var(--panel);
}

.not-found--forbidden .badge { color: #e11d48; }

.protected-page {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 18px;
}

.protected-page.is-inspection-blocked::after {
  content: attr(data-inspection-message);
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: rgba(2, 6, 23, 0.72);
  color: #f8fafc;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
}

.protected-page__content {
  position: relative;
  z-index: 2;
}

.protected-page.is-inspection-blocked .protected-page__content {
  filter: blur(14px);
  pointer-events: none;
}

.protected-page img,
.protected-page video,
.protected-page iframe {
  -webkit-user-drag: none;
}

.protected-prose {
  user-select: none;
  -webkit-user-select: none;
}

.protected-prose.is-loading {
  opacity: 0.65;
}

.content-watermark {
  position: absolute;
  inset: 16px;
  z-index: 1;
  pointer-events: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 64px 42px;
  opacity: 0.14;
  transform: rotate(-16deg) scale(1.08);
  transform-origin: center;
}

.content-watermark span {
  color: var(--text);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

:root[data-theme="dark"] .content-watermark { opacity: 0.22; }

.protection-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  border-radius: 999px;
  border: 1px solid rgba(14, 165, 164, 0.5);
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  padding: 10px 16px;
  font-size: 12px;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.protection-notice.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.print-protection {
  display: none;
  margin: 20vh auto;
  max-width: 720px;
  text-align: center;
  font-family: 'Fraunces', serif;
  font-size: 28px;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--footer-bg);
  margin-top: 0;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) repeat(2, minmax(180px, 1fr));
  gap: 28px;
  padding: 40px 24px 24px;
  max-width: 1120px;
  margin: 0 auto;
  font-size: 14px;
  color: var(--muted);
}

.footer-brand { display: grid; gap: 12px; }
.footer-logo { font-family: 'Fraunces', serif; font-size: 22px; color: var(--text); }
.footer-text { margin: 0; line-height: 1.7; }
.footer-contact { display: grid; gap: 4px; }
.footer-label { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text); font-weight: 600; }
.footer-title { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text); font-weight: 600; }
.footer-links { display: grid; gap: 8px; }
.site-footer a { color: var(--text); }
.site-footer a:hover { color: var(--accent); }

.site-footer__bottom {
  border-top: 1px solid var(--border);
  padding: 16px 24px 24px;
  max-width: 1120px;
  margin: 0 auto;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 700px) {
  .nav-inner { display: block; padding: 14px 18px; }
  .nav-head { width: 100%; justify-content: space-between; }
  .nav-head-actions { gap: 8px; }
  .nav-burger { display: inline-flex; }
  .nav-links {
    display: none;
    width: 100%;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--nav-border);
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .nav[data-menu-open="true"] .nav-links { display: flex; }
  .nav-links a,
  .nav-links .btn,
  .nav-links form,
  .nav-links form .btn { width: 100%; }
  .nav-links a,
  .nav-links .btn { min-height: 42px; justify-content: center; }
  .nav-links > a:not(.btn) {
    padding: 10px 12px;
    border: 1px solid var(--border);
    background: var(--btn-bg);
    border-radius: 12px;
  }
  .nav-links .lang-switch {
    width: 100%;
    justify-content: center;
  }
  .nav-links .lang-switch a {
    width: auto;
    min-height: 36px;
  }
  .nav-links form { display: block; }
  .nav-head-actions .theme-toggle {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
  }
  .container { padding: 28px 18px 36px; }
  .hero { padding: 28px; }
  .hero h1 { font-size: 32px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .prose { font-size: 16px; }
  .dashboard-header {
    align-items: stretch;
  }
  .dashboard-cta {
    width: 100%;
  }
  .table { display: block; overflow-x: auto; white-space: nowrap; }
  .table th, .table td { white-space: nowrap; }
  .toolbar,
  .toolbar--compact {
    grid-template-columns: 1fr;
  }
  .toolbar-actions {
    width: 100%;
  }
  .toolbar-actions .btn {
    width: 100%;
  }
  .lesson-nav .btn {
    min-width: 0;
    width: 100%;
  }
  .page-actions {
    width: 100%;
  }
  .page-actions .btn {
    flex: 1;
  }
  .admin-links .btn {
    width: 100%;
  }
  .not-found { min-height: auto; border-radius: 22px; }
  .not-found__actions { width: 100%; }
  .not-found__actions .btn { width: 100%; }
  .content-watermark {
    grid-template-columns: 1fr;
    gap: 36px;
    transform: rotate(-12deg) scale(1.05);
    opacity: 0.12;
  }
  .protection-notice {
    left: 18px;
    right: 18px;
    bottom: 18px;
    text-align: center;
  }
  .site-footer__inner { grid-template-columns: 1fr; padding: 28px 18px 18px; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; padding: 14px 18px 18px; }
}

@media (max-width: 520px) {
  .nav-head-actions .theme-toggle {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
  }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 16px; }
  .section-label { letter-spacing: 0.14em; }
}

@media print {
  .nav,
  .site-footer,
  .protected-page {
    display: none !important;
  }

  .print-protection {
    display: block !important;
  }
}
