:root {
  --bg: #eef2f6;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --ink: #17202b;
  --muted: #627084;
  --line: #d8e0ea;
  --accent: #12826f;
  --accent-dark: #0a5b50;
  --accent-soft: #e2f4ef;
  --blue: #2362a7;
  --amber: #f4bd4f;
  --coral: #c85d45;
  --side: #111a24;
  --side-2: #182535;
  --side-line: rgba(255, 255, 255, 0.11);
  --shadow: 0 18px 44px rgba(20, 32, 48, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(18, 130, 111, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(35, 98, 167, 0.045) 1px, transparent 1px),
    var(--bg);
  background-size: 36px 36px;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 304px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 18px;
  background:
    linear-gradient(180deg, rgba(18, 130, 111, 0.18), transparent 240px),
    var(--side);
  color: #f5f8fb;
  overflow-y: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(244, 189, 79, 0.5);
  border-radius: 8px;
  background: var(--amber);
  color: #141b22;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.2;
}

.brand small {
  color: #aeb9c5;
}

.student-card {
  padding: 16px;
  border: 1px solid var(--side-line);
  border-radius: 8px;
  background: var(--side-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.student-card span,
.student-card small {
  display: block;
  color: #aeb9c5;
  font-size: 0.84rem;
}

.student-card > strong {
  display: block;
  max-width: 100%;
  margin: 3px 0 12px;
  overflow: hidden;
  color: #fff;
  font-size: 1.08rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.progress-meta span {
  margin: 0;
}

.progress-meta strong {
  color: var(--amber);
  font-size: 0.92rem;
  line-height: 1;
}

.progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--amber), #65d4be);
  transition: width 0.25s ease;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.side-nav a {
  position: relative;
  display: block;
  min-height: 48px;
  padding: 11px 12px 11px 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #f5f8fb;
  text-decoration: none;
}

.side-nav a::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 16px;
  width: 13px;
  height: 13px;
  border: 2px solid #8794a3;
  border-radius: 50%;
  background: transparent;
}

.side-nav a:hover,
.side-nav a.active {
  border-color: rgba(101, 212, 190, 0.35);
  background: rgba(255, 255, 255, 0.07);
}

.side-nav a.done::before {
  border-color: #65d4be;
  background: #65d4be;
  box-shadow: inset 0 0 0 3px var(--side-2);
}

.side-nav a.locked {
  color: #798594;
  cursor: not-allowed;
}

.side-nav a.locked::before {
  border-radius: 3px;
  border-color: #566271;
}

.side-nav a span,
.side-nav a small {
  display: block;
  line-height: 1.25;
}

.side-nav a span {
  font-weight: 900;
}

.side-nav a small {
  margin-top: 3px;
  color: #aeb9c5;
  font-size: 0.78rem;
}

.side-nav a.locked small {
  color: #6f7b8a;
}

.reset-course {
  align-self: flex-end;
  width: min(132px, 100%);
  background: var(--coral);
  box-shadow: 0 10px 18px rgba(200, 93, 69, 0.22);
}

.reset-course:hover {
  background: #a94732;
}

.sidebar-note {
  margin: auto 0 0;
  padding: 13px;
  border: 1px solid rgba(244, 189, 79, 0.22);
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  background: rgba(244, 189, 79, 0.1);
  color: #e7edf5;
  font-size: 0.9rem;
}

.sidebar-toggle {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 40;
  display: none;
  width: 46px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.sidebar-toggle span {
  display: block;
  width: 21px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.content {
  min-width: 0;
}

.section {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 58px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.85fr);
  align-items: center;
  gap: 42px;
  min-height: 100vh;
  padding-top: 46px;
  padding-bottom: 42px;
}

.hero-copy,
.hero-visual,
.learning-layout > article {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 0.79rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: 4.5rem;
  line-height: 1.02;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

h1 span {
  display: block;
}

h2 {
  margin-bottom: 14px;
  font-size: 2.35rem;
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.22rem;
}

.hero-copy > p:not(.eyebrow),
.course-map > div > p,
.final-unit > p,
.certificate-actions p {
  color: var(--muted);
  font-size: 1.02rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.hero-stats span {
  min-width: 130px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  box-shadow: 0 10px 22px rgba(20, 32, 48, 0.06);
}

.hero-stats strong {
  color: var(--ink);
  font-size: 1.35rem;
}

.name-card,
.activity,
.final-test,
.course-map,
.unit {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.name-card {
  max-width: 620px;
  padding: 18px;
}

.name-card label {
  display: block;
  margin-bottom: 8px;
  font-weight: 900;
}

.name-row {
  display: flex;
  gap: 10px;
}

.name-row input {
  min-width: 0;
  flex: 1;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
}

.name-row input:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(18, 130, 111, 0.16);
}

button {
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  padding: 12px 16px;
  box-shadow: 0 10px 18px rgba(18, 130, 111, 0.18);
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  cursor: not-allowed;
  background: #9ca6b2;
  box-shadow: none;
}

.name-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.hero-visual {
  position: relative;
  min-height: 480px;
  border: 1px solid rgba(17, 26, 36, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(18, 130, 111, 0.14), rgba(35, 98, 167, 0.1)),
    repeating-linear-gradient(0deg, rgba(17, 26, 36, 0.08) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, rgba(17, 26, 36, 0.08) 0 1px, transparent 1px 32px),
    #e8f0f4;
  box-shadow: 18px 18px 0 rgba(18, 130, 111, 0.1), var(--shadow);
  overflow: hidden;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 26px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
}

.lab-card {
  position: absolute;
  left: 50%;
  top: 48%;
  width: min(390px, 78%);
  padding: 16px;
  border: 1px solid rgba(17, 26, 36, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 55px rgba(20, 32, 48, 0.2);
  transform: translate(-50%, -50%);
}

.lab-topline {
  display: flex;
  gap: 7px;
  margin-bottom: 14px;
}

.lab-topline span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--coral);
}

.lab-topline span:nth-child(2) {
  background: var(--amber);
}

.lab-topline span:nth-child(3) {
  background: var(--accent);
}

.lab-screen {
  position: relative;
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 22px;
  align-items: center;
  min-height: 210px;
  padding: 24px;
  border-radius: 8px;
  background: #101b27;
  color: #dff7f1;
  overflow: hidden;
}

.lab-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(101, 212, 190, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(101, 212, 190, 0.08) 1px, transparent 1px);
  background-size: 18px 18px;
}

.scan-ring {
  position: relative;
  z-index: 1;
  width: 116px;
  height: 116px;
  border: 13px solid rgba(101, 212, 190, 0.22);
  border-top-color: var(--amber);
  border-right-color: #65d4be;
  border-radius: 50%;
  box-shadow: inset 0 0 0 12px rgba(255, 255, 255, 0.04);
}

.scan-ring::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: var(--accent);
  transform: translate(-50%, -50%);
}

.system-lines {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 13px;
}

.system-lines span {
  display: block;
  height: 14px;
  border-radius: 999px;
  background: rgba(223, 247, 241, 0.86);
}

.system-lines span:nth-child(2) {
  width: 76%;
  background: rgba(244, 189, 79, 0.92);
}

.system-lines span:nth-child(3) {
  width: 58%;
}

.lab-status {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.lab-status span {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
}

.tool-dock {
  position: absolute;
  right: 26px;
  bottom: 24px;
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 34px rgba(20, 32, 48, 0.14);
}

.tool-icon {
  position: relative;
  display: block;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: var(--surface);
}

.screwdriver::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 21px;
  width: 28px;
  height: 6px;
  border-radius: 999px;
  background: var(--coral);
  transform: rotate(-32deg);
}

.screwdriver::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 16px;
  border-left: 14px solid #8894a3;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transform: rotate(-32deg);
}

.brush::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 25px;
  width: 25px;
  height: 7px;
  border-radius: 999px;
  background: #8a5f3d;
  transform: rotate(26deg);
}

.brush::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 14px;
  width: 13px;
  height: 21px;
  border-radius: 3px 9px 9px 3px;
  background: var(--amber);
  transform: rotate(26deg);
}

.chip::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 5px;
  background: var(--blue);
  box-shadow:
    -8px 0 0 -6px var(--blue),
    8px 0 0 -6px var(--blue),
    0 -8px 0 -6px var(--blue),
    0 8px 0 -6px var(--blue);
}

.chip::after {
  content: "";
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  background: #fff;
}

.course-map {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 30px;
  padding: 30px;
}

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

.map-grid a {
  display: grid;
  min-height: 92px;
  align-content: space-between;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  text-decoration: none;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.map-grid a:hover {
  border-color: rgba(18, 130, 111, 0.5);
  background: #eef8f5;
  transform: translateY(-2px);
}

.map-grid a.locked {
  color: #758092;
  cursor: not-allowed;
  background: #eef1f5;
  transform: none;
}

.map-grid a.done {
  border-color: rgba(18, 130, 111, 0.45);
  background: var(--accent-soft);
}

.status-badge {
  justify-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e8edf3;
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 900;
}

.locked .status-badge {
  color: #627084;
}

.done .status-badge {
  background: var(--accent);
  color: #fff;
}

.unit {
  position: relative;
  margin-top: 28px;
  padding: 30px;
  scroll-margin-top: 28px;
}

.unit::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  border-radius: 8px 0 0 8px;
  background: var(--accent);
}

.unit-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.unit-number {
  display: inline-block;
  margin-bottom: 8px;
  padding: 6px 9px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 900;
  font-size: 0.78rem;
}

.unit-time {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

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

.learning-layout article:only-child {
  grid-column: 1 / -1;
}

ul {
  padding-left: 0;
  list-style: none;
}

li {
  position: relative;
  padding-left: 28px;
}

li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(244, 189, 79, 0.16);
}

li + li {
  margin-top: 9px;
}

.video-slot {
  display: grid;
  place-items: center;
  min-height: 224px;
  padding: 0;
  border: 1px solid rgba(18, 130, 111, 0.28);
  border-radius: 8px;
  background: #000;
}

.video-slot iframe {
  width: 100%;
  min-height: 224px;
  aspect-ratio: 16 / 9;
  border: 0;
}

.video-link {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  text-align: center;
}

.unit.is-locked {
  background: #edf1f5;
}

.unit.is-locked::before {
  background: #9aa6b5;
}

.unit.is-locked > *:not(.lock-message) {
  pointer-events: none;
  user-select: none;
  filter: grayscale(0.28);
  opacity: 0.36;
}

.lock-message {
  display: none;
}

.unit.is-locked .lock-message {
  position: relative;
  z-index: 2;
  display: block;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(200, 93, 69, 0.24);
  border-radius: 8px;
  background: #fff5eb;
  color: #7f3c2d;
  font-weight: 900;
}

.activity {
  margin-top: 24px;
  padding: 20px;
  box-shadow: none;
}

.activity h3,
.final-test h3 {
  color: var(--accent-dark);
}

.activity label,
.final-test label {
  display: block;
  margin: 9px 0;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--surface-2);
  cursor: pointer;
}

.activity label:hover,
.final-test label:hover {
  border-color: rgba(18, 130, 111, 0.28);
  background: #eef8f5;
}

.activity input,
.final-test input {
  margin-right: 8px;
}

.feedback {
  display: block;
  min-height: 28px;
  margin-top: 12px;
  color: var(--accent-dark);
}

.feedback.error {
  color: var(--coral);
}

.final-test {
  padding: 22px;
}

fieldset {
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

legend {
  padding: 0 8px;
  font-weight: 900;
}

.certificate-section {
  padding-bottom: 80px;
}

.certificate-actions {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.certificate {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border: 1px solid rgba(18, 130, 111, 0.3);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(18, 130, 111, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(244, 189, 79, 0.13), transparent 35%),
    #fff;
  box-shadow: var(--shadow);
}

.certificate::before,
.certificate::after {
  content: "";
  position: absolute;
  width: 210px;
  height: 210px;
  border: 28px solid rgba(18, 130, 111, 0.08);
  border-radius: 50%;
}

.certificate::before {
  left: -94px;
  top: -94px;
}

.certificate::after {
  right: -94px;
  bottom: -94px;
}

.certificate.locked {
  filter: grayscale(0.45);
  opacity: 0.62;
}

.certificate-frame {
  position: relative;
  z-index: 1;
  min-height: 520px;
  padding: 34px;
  border: 2px solid rgba(18, 130, 111, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 0 22px, rgba(18, 130, 111, 0.05) 22px 23px, transparent 23px),
    linear-gradient(0deg, transparent 0 22px, rgba(18, 130, 111, 0.05) 22px 23px, transparent 23px),
    rgba(255, 255, 255, 0.78);
  background-size: 24px 24px;
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.8);
}

.certificate-header,
.certificate-footer,
.certificate-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.certificate-header {
  margin-bottom: 44px;
}

.certificate-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.certificate-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--side);
  color: var(--amber);
  font-weight: 900;
}

.certificate-brand strong,
.certificate-brand small {
  display: block;
  line-height: 1.25;
}

.certificate-brand small,
.certificate-code {
  color: var(--muted);
  font-size: 0.86rem;
}

.certificate-code {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 900;
}

.certificate-body {
  max-width: 790px;
  margin: 0 auto;
  text-align: center;
}

.certificate-label {
  margin-bottom: 18px;
  color: var(--accent-dark);
  font-size: 1.02rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.certificate-kicker {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 1.03rem;
}

.certificate h3 {
  margin-bottom: 18px;
  color: var(--blue);
  font-size: 3.85rem;
  line-height: 1.05;
}

.certificate-text {
  max-width: 720px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.08rem;
}

.certificate-details {
  align-items: stretch;
  margin: 42px 0;
}

.certificate-details span {
  flex: 1;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  font-size: 0.86rem;
  text-align: left;
}

.certificate-details strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
}

.certificate-footer {
  align-items: end;
}

.signature {
  min-width: 250px;
  text-align: center;
}

.signature span {
  display: block;
  height: 1px;
  margin-bottom: 9px;
  background: var(--ink);
}

.signature strong,
.signature small {
  display: block;
  line-height: 1.35;
}

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

.seal {
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(244, 189, 79, 0.22) 0 38%, transparent 39%),
    #fff;
  color: var(--accent-dark);
  text-align: center;
  box-shadow: inset 0 0 0 8px rgba(18, 130, 111, 0.09);
}

.seal strong {
  display: block;
  font-size: 1.55rem;
  line-height: 1;
}

.seal small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.footer {
  padding: 24px 16px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
  color: var(--muted);
}

.footer p {
  margin: 0;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  max-width: min(360px, calc(100% - 40px));
  padding: 13px 16px;
  border-radius: 8px;
  background: var(--side);
  color: #f5f8fb;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  h1 {
    font-size: 3.55rem;
  }

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

@media (max-width: 980px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 35;
    width: min(310px, calc(100% - 58px));
    transform: translateX(-100%);
    transition: transform 0.24s ease;
    box-shadow: 18px 0 35px rgba(0, 0, 0, 0.22);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: block;
  }

  .section {
    width: calc(100vw - 28px);
    max-width: 1080px;
  }

  .content {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .hero-copy,
  .hero-copy > p,
  h1,
  .name-card,
  .course-map,
  .unit,
  .certificate-section {
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
  }

  .hero,
  .course-map,
  .learning-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 82px;
  }

  .hero-visual {
    min-height: 380px;
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.85rem;
  }

  .section {
    padding: 36px 0;
  }

  .hero-copy,
  .hero-copy > p,
  h1,
  .name-card,
  .course-map,
  .unit,
  .certificate-section {
    width: min(362px, calc(100vw - 28px));
    max-width: min(362px, calc(100vw - 28px));
  }

  .hero {
    padding-top: 104px;
  }

  .name-row,
  .certificate-actions,
  .unit-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-stats,
  .map-grid,
  .lab-status {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    display: grid;
  }

  .map-grid {
    display: grid;
  }

  .unit {
    padding: 22px;
  }

  .lab-screen {
    grid-template-columns: 1fr;
  }

  .tool-dock {
    left: 20px;
    right: auto;
  }

  .hero-visual {
    min-height: 420px;
  }

  .certificate {
    padding: 10px;
  }

  .certificate-frame {
    min-height: 0;
    padding: 20px;
  }

  .certificate-header,
  .certificate-footer,
  .certificate-details {
    flex-direction: column;
    align-items: stretch;
  }

  .certificate-code {
    align-self: flex-start;
  }

  .certificate h3 {
    font-size: 2.25rem;
  }

  .certificate-details {
    margin: 28px 0;
  }

  .signature {
    min-width: 0;
  }

  .seal {
    align-self: center;
    width: 104px;
    height: 104px;
  }
}

@media print {
  body {
    background: #fff;
  }

  .sidebar,
  .sidebar-toggle,
  .hero,
  .course-map,
  .unit,
  .certificate-actions,
  .footer,
  .toast {
    display: none;
  }

  .app-shell {
    display: block;
  }

  .section {
    width: 100%;
    padding: 0;
  }

  .certificate {
    box-shadow: none;
    margin: 18px;
    border-color: #111;
    background: #fff;
  }

  .certificate-frame {
    min-height: calc(100vh - 76px);
    box-shadow: none;
    background: #fff;
  }

  .certificate::before,
  .certificate::after {
    border-color: rgba(0, 0, 0, 0.06);
  }
}
