:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17202a;
  background: #f5f7f9;
}

body {
  margin: 0;
}

a {
  color: #145a73;
}

.topbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #dce3e8;
  display: flex;
  justify-content: space-between;
  padding: 14px 28px;
}

.brand {
  color: #17202a;
  font-weight: 700;
  text-decoration: none;
}

.topbar nav {
  align-items: center;
  display: flex;
  gap: 16px;
}

.topbar form {
  margin: 0;
}

.theme-form {
  display: flex;
}

.theme-toggle {
  align-items: center;
  background: #eef2f5;
  border: 1px solid #cbd5dc;
  border-radius: 999px;
  color: #17202a;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  padding: 0;
  width: 38px;
}

.theme-toggle svg {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 20px;
}

.page {
  margin: 0 auto;
  max-width: 1120px;
  padding: 32px 24px;
}

.hero {
  margin-bottom: 36px;
}

.hero-landing {
  align-items: center;
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  min-height: 62vh;
}

.hero-copy {
  max-width: 640px;
}

.eyebrow {
  color: #b35c20;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: 44px;
  line-height: 1.1;
  margin: 0 0 14px;
  max-width: 760px;
}

.hero-media {
  overflow: hidden;
}

.hero-media img {
  aspect-ratio: 16 / 10;
  border: 1px solid #d7e0e6;
  border-radius: 8px;
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.trust-band {
  border-top: 1px solid #dce3e8;
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, 1fr);
  padding-top: 28px;
}

.trust-band div {
  display: grid;
  gap: 6px;
}

.trust-band strong {
  color: #17202a;
}

.trust-band span {
  color: #61717d;
}

.lead {
  color: #4d5b66;
  font-size: 18px;
  line-height: 1.6;
}

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

.card,
.lesson,
.attempt,
.narrow {
  background: #ffffff;
  border: 1px solid #dce3e8;
  border-radius: 8px;
  padding: 20px;
}

.badge {
  background: #e8f2f0;
  border-radius: 999px;
  color: #285a4c;
  display: inline-block;
  font-size: 13px;
  padding: 4px 10px;
}

.button,
button {
  background: #145a73;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  display: inline-block;
  font: inherit;
  padding: 10px 14px;
  text-decoration: none;
}

button.theme-toggle {
  align-items: center;
  background: #eef2f5;
  border: 1px solid #cbd5dc;
  border-radius: 999px;
  color: #17202a;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  padding: 0;
  width: 38px;
}

.form,
.workspace {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}

.exercise-shell {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) 320px;
}

.lab-shell {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) 340px;
}

.lab-main {
  display: grid;
  gap: 18px;
}

.port-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.port-grid div {
  border: 1px solid #dce3e8;
  border-radius: 6px;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.status-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.status-grid div {
  border: 1px solid #dce3e8;
  border-radius: 6px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.status-pill {
  background: #eef2f5;
  border-radius: 999px;
  color: #31414d;
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  justify-self: start;
  padding: 5px 10px;
}

.status-preparing {
  background: #fff2cc;
  color: #6a4a00;
}

.status-ready,
.status-check_passed,
.status-vm-running {
  background: #dff4e8;
  color: #24613b;
}

.status-error,
.status-check_failed {
  background: #fde7e1;
  color: #91412c;
}

.status-vm-stopped {
  background: #e9edf2;
  color: #3d4d5a;
}

.port-grid code {
  overflow-wrap: anywhere;
}

.hint-list {
  display: grid;
  gap: 10px;
  padding-left: 22px;
}

.message-list {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.message {
  border-radius: 6px;
  margin: 0;
  padding: 10px 12px;
}

.message-success {
  background: #dff4e8;
  color: #24613b;
}

.message-error {
  background: #fde7e1;
  color: #91412c;
}

.message-warning {
  background: #fff2cc;
  color: #6a4a00;
}

.editor-panel,
.mentor-panel {
  background: #ffffff;
  border: 1px solid #dce3e8;
  border-radius: 8px;
  padding: 16px;
}

.editor-toolbar {
  align-items: center;
  background: #17202a;
  border-radius: 8px 8px 0 0;
  color: #dfe8ee;
  display: flex;
  font-size: 13px;
  justify-content: space-between;
  padding: 10px 14px;
}

.workspace textarea {
  background: #101820;
  border: 1px solid #2b3a45;
  border-radius: 0 0 8px 8px;
  color: #e8f2f0;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 15px;
  line-height: 1.55;
  min-height: 320px;
  padding: 16px;
  resize: vertical;
  tab-size: 4;
}

.actions {
  display: flex;
  justify-content: flex-end;
}

input {
  border: 1px solid #cbd5dc;
  border-radius: 6px;
  font: inherit;
  padding: 10px 12px;
}

.note {
  border-left: 4px solid #b87a2c;
  color: #5d4730;
  padding-left: 12px;
}

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

.lesson-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.lesson-theory {
  color: #31414d;
  line-height: 1.65;
}

.lesson-theory p {
  margin: 0 0 12px;
}

.attempt-summary {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

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

.check-list li {
  align-items: start;
  border: 1px solid #dce3e8;
  border-radius: 6px;
  display: grid;
  gap: 4px;
  grid-template-columns: 58px minmax(0, 1fr);
  padding: 10px;
}

.check-list span {
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 6px;
  text-align: center;
}

.check-list small {
  color: #61717d;
  grid-column: 2;
}

.check-pass span {
  background: #dff4e8;
  color: #24613b;
}

.check-fail span {
  background: #fde7e1;
  color: #91412c;
}

pre {
  white-space: pre-wrap;
}

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

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

  .hero-landing,
  .trust-band {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 36px;
  }
}

html[data-theme="dark"] {
  color-scheme: dark;
  color: #f4f4f4;
  background: #000000;
}

html[data-theme="dark"] body {
  background: #000000;
  color: #f4f4f4;
}

html[data-theme="dark"] a {
  color: #ffffff;
}

html[data-theme="dark"] .topbar {
  background: #050505;
  border-bottom-color: #2a2a2a;
}

html[data-theme="dark"] .brand,
html[data-theme="dark"] .trust-band strong,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3 {
  color: #ffffff;
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .lesson,
html[data-theme="dark"] .attempt,
html[data-theme="dark"] .narrow,
html[data-theme="dark"] .editor-panel,
html[data-theme="dark"] .mentor-panel {
  background: #111111;
  border-color: #333333;
  color: #f4f4f4;
}

html[data-theme="dark"] .port-grid div {
  border-color: #333333;
}

html[data-theme="dark"] .status-grid div {
  border-color: #333333;
}

html[data-theme="dark"] .status-pill {
  background: #262626;
  color: #ffffff;
}

html[data-theme="dark"] .lead,
html[data-theme="dark"] .trust-band span,
html[data-theme="dark"] .lesson-theory,
html[data-theme="dark"] .check-list small {
  color: #cfcfcf;
}

html[data-theme="dark"] .badge {
  background: #262626;
  color: #ffffff;
}

html[data-theme="dark"] .button,
html[data-theme="dark"] button {
  background: #f4f4f4;
  color: #000000;
}

html[data-theme="dark"] .theme-toggle {
  background: #222222;
  border: 1px solid #555555;
  color: #ffffff;
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea {
  background: #050505;
  border-color: #3a3a3a;
  color: #ffffff;
}

html[data-theme="dark"] .editor-toolbar {
  background: #000000;
  color: #ffffff;
}

html[data-theme="dark"] .workspace textarea {
  background: #050505;
  border-color: #333333;
  color: #f4f4f4;
}

html[data-theme="dark"] .note {
  border-left-color: #ffffff;
  color: #d8d8d8;
}

html[data-theme="dark"] .check-list li {
  background: #111111;
  border-color: #333333;
}

html[data-theme="dark"] .check-pass span {
  background: #ffffff;
  color: #000000;
}

html[data-theme="dark"] .check-fail span {
  background: #444444;
  color: #ffffff;
}
