﻿:root {
  --ink: #17212b;
  --muted: #5f6f7a;
  --paper: #fbfaf7;
  --panel: #ffffff;
  --line: #dce3e6;
  --code: #0e1824;
  --code-line: #263648;
  --teal: #0f766e;
  --teal-dark: #0d4d4b;
  --coral: #c94f3d;
  --gold: #d99a25;
  --blue: #275e9f;
  --green-soft: #dff3ec;
  --coral-soft: #fae7e2;
  --gold-soft: #fff0cf;
  --shadow: 0 18px 45px rgba(21, 31, 43, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.inline-link {
  color: var(--teal-dark);
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

code,
pre,
textarea {
  font-family: Consolas, "Courier New", monospace;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid rgba(23, 33, 43, 0.12);
  background: rgba(251, 250, 247, 0.94);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--teal-dark);
  font-weight: 800;
  letter-spacing: 0;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.main-nav a {
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
}

.main-nav a:hover {
  color: var(--teal-dark);
  background: var(--green-soft);
}

main {
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 74px);
  padding: clamp(42px, 7vw, 88px) clamp(18px, 5vw, 72px) 38px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(223, 243, 236, 0.78), rgba(255, 240, 207, 0.72) 54%, rgba(250, 231, 226, 0.72)),
    var(--paper);
}

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

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.13;
  margin: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(2.4rem, 5.8vw, 5.15rem);
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.6rem);
}

h3 {
  font-size: 1.12rem;
}

.hero-copy p:not(.eyebrow),
.section-heading p {
  color: var(--muted);
  font-size: 1.06rem;
}

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

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 10px 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button.primary,
button.primary {
  color: #fff;
  background: var(--teal);
}

.button.secondary {
  color: var(--teal-dark);
  border-color: rgba(15, 118, 110, 0.28);
  background: rgba(255, 255, 255, 0.55);
}

.button.small {
  min-height: 38px;
  margin-top: 14px;
}

.topology {
  position: relative;
  min-height: 420px;
  border: 1px solid rgba(23, 33, 43, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(rgba(23, 33, 43, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 33, 43, 0.08) 1px, transparent 1px),
    #fffdfa;
  background-size: 34px 34px;
  box-shadow: var(--shadow);
}

.topology-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.topology-lines .line {
  stroke-width: 1.1;
  stroke-linecap: round;
}

.topology-lines .pc-switch {
  stroke: var(--gold);
}

.topology-lines .switch-router {
  stroke: var(--teal);
}

.topology-lines .router-pc {
  stroke: var(--coral);
}

.device {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 132px;
  min-height: 76px;
  padding: 10px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  text-align: center;
  box-shadow: 7px 7px 0 rgba(23, 33, 43, 0.13);
}

.device span {
  font-weight: 800;
}

.device small {
  color: var(--muted);
  font-size: 0.72rem;
}

.device.pc.left {
  left: 9%;
  top: 53%;
}

.device.switch {
  left: 36%;
  top: 28%;
  border-color: var(--teal);
}

.device.router {
  right: 13%;
  top: 32%;
  border-color: var(--coral);
}

.device.pc.right {
  right: 8%;
  bottom: 10%;
  border-color: var(--blue);
}

.section {
  padding: clamp(48px, 7vw, 86px) clamp(18px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
}

.section.alt {
  background: #f5fbf9;
}

.section-heading {
  max-width: 880px;
  margin-bottom: 26px;
}

.section-heading.compact {
  margin-bottom: 18px;
}

.feature-grid,
.task-grid,
.trouble-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.feature-grid article,
.task-grid article,
.trouble-grid article,
.quiz-card,
.compare-col,
.terminal-task {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel);
}

.feature-grid article:nth-child(2) {
  border-top-color: var(--coral);
}

.feature-grid article:nth-child(3) {
  border-top-color: var(--gold);
}

.feature-grid article:nth-child(4) {
  border-top-color: var(--blue);
}

.feature-grid p,
.task-grid p,
.compare-col li,
.terminal-task li,
.trouble-grid p {
  color: var(--muted);
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 22px;
  align-items: start;
}

.mode-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.72fr);
  gap: 18px;
  align-items: start;
}

.prompt-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel);
}

.prompt-card h3 {
  margin-bottom: 12px;
}

.prompt-card pre code {
  min-width: 520px;
}

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

.lesson-panel h3 {
  margin-bottom: 12px;
}

pre {
  overflow: auto;
  max-height: 680px;
  margin: 0;
  border: 1px solid #263648;
  border-radius: 8px;
  background: var(--code);
  color: #e9f4f1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

pre code {
  display: block;
  min-width: 680px;
  padding: 18px;
  font-size: 0.92rem;
  line-height: 1.56;
  white-space: pre;
}

.explain-stack {
  display: grid;
  gap: 10px;
}

details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

summary {
  padding: 14px 16px;
  font-weight: 800;
  cursor: pointer;
}

details p,
details pre,
details .mistake-list {
  margin: 0 16px 16px;
}

details code,
td code,
li code,
p code,
label code {
  padding: 2px 5px;
  border-radius: 5px;
  color: #163c38;
  background: var(--green-soft);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
}

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

th {
  color: #fff;
  background: var(--teal-dark);
}

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

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

.compare-col h3 {
  margin-bottom: 12px;
}

.router-col {
  border-top: 5px solid var(--coral);
}

.switch-col {
  border-top: 5px solid var(--teal);
}

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

.task-grid ol {
  padding-left: 22px;
}

.terminal-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.terminal {
  overflow: hidden;
  border: 1px solid #263648;
  border-radius: 8px;
  background: var(--code);
  box-shadow: var(--shadow);
}

.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  color: #e9f4f1;
  border-bottom: 1px solid var(--code-line);
  background: #111d2b;
}

.terminal-bar button {
  min-height: 34px;
  color: #fff;
  background: var(--coral);
}

.terminal-screen {
  min-height: 310px;
  max-height: 430px;
  overflow: auto;
  padding: 16px;
  color: #e9f4f1;
  background: var(--code);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.95rem;
  line-height: 1.5;
}

.terminal-screen pre {
  overflow: visible;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  white-space: pre-wrap;
}

.command-line {
  display: flex;
  align-items: baseline;
  min-height: 24px;
}

#cli-live-prompt {
  flex: 0 0 auto;
  color: #e9f4f1;
}

#cli-command {
  flex: 1;
  min-height: 24px;
  border: 0;
  border-radius: 0;
  padding: 0 0 0 2px;
  color: #e9f4f1;
  background: transparent;
  font: inherit;
  outline: 0;
}

#r1-command,
#s1-command {
  flex: 1;
  min-height: 24px;
  border: 0;
  border-radius: 0;
  padding: 0 0 0 2px;
  color: #e9f4f1;
  background: transparent;
  font: inherit;
  outline: 0;
}

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

.feedback {
  min-height: 44px;
  margin: 0;
  padding: 12px 16px;
  color: var(--muted);
}

.terminal .feedback {
  color: #f4f9f8;
  border-top: 1px solid var(--code-line);
}

.wide-details {
  margin-top: 16px;
}

.learning-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tab-button {
  color: var(--teal-dark);
  border-color: rgba(15, 118, 110, 0.2);
  background: #fff;
}

.tab-button.active {
  color: #fff;
  background: var(--teal);
}

.tab-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
}

.tab-panel.active {
  display: block;
}

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

#quiz-panel[hidden],
.tab-panel[hidden] {
  display: none;
}

.quiz-card {
  display: grid;
  gap: 10px;
}

.quiz-card button {
  justify-content: flex-start;
  color: var(--ink);
  border-color: var(--line);
  background: #fff;
  text-align: left;
}

.quiz-card button.correct {
  color: #fff;
  background: var(--teal);
}

.quiz-card button.wrong {
  color: #fff;
  background: var(--coral);
}

.quiz-card .answer {
  margin: 0;
  color: var(--muted);
}

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

label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  font: inherit;
}

select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.cli-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin: -8px 0 18px;
}

.cli-controls label {
  min-width: 210px;
}

.task-notes {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.task-notes p {
  margin: 0;
  color: var(--muted);
}

input.correct {
  border-color: var(--teal);
  background: var(--green-soft);
}

input.wrong {
  border-color: var(--coral);
  background: var(--coral-soft);
}

.order-list {
  display: grid;
  gap: 8px;
  padding-left: 24px;
}

footer {
  padding: 28px clamp(18px, 5vw, 72px);
  color: var(--muted);
  background: #fff;
}

.ptsa-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: end;
  padding: clamp(42px, 7vw, 88px) clamp(18px, 5vw, 72px) 38px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(223, 243, 236, 0.82), rgba(250, 231, 226, 0.72)),
    var(--paper);
}

.ptsa-hero p:not(.eyebrow) {
  max-width: 820px;
  color: var(--muted);
  font-size: 1.06rem;
}

.scenario-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.scenario-panel h2 {
  font-size: 1.25rem;
}

.info-box {
  margin-bottom: 18px;
  border: 1px solid rgba(217, 154, 37, 0.45);
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  padding: 14px 16px;
  color: #5f4a17;
  background: var(--gold-soft);
}

.info-box strong {
  color: var(--ink);
}

.ptsa-topology {
  position: relative;
  min-height: 230px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.ptsa-node {
  position: absolute;
  z-index: 2;
  display: grid;
  width: 112px;
  height: 74px;
  place-items: center;
  border: 2px solid var(--blue);
  border-radius: 7px;
  background: #d9f0f6;
  font-weight: 800;
  box-shadow: 7px 7px 0 rgba(23, 33, 43, 0.12);
}

.ptsa-node.switch-node {
  left: 31%;
  top: 82px;
  border-color: var(--teal);
  background: #cbece4;
}

.ptsa-node.router-node {
  right: 31%;
  top: 82px;
  border-color: var(--coral);
  background: #f8dad3;
}

.ptsa-node.pc-a {
  left: 7%;
  top: 78px;
}

.ptsa-node.pc-b {
  right: 7%;
  top: 78px;
}

.ptsa-lan {
  position: absolute;
  top: 28px;
  font-weight: 800;
}

.ptsa-lan.lan1 {
  left: 36%;
}

.ptsa-lan.lan2 {
  right: 20%;
}

.ptsa-link {
  position: absolute;
  z-index: 1;
  height: 6px;
  background: #d82b25;
}

.ptsa-link span {
  position: absolute;
  top: -25px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
}

.ptsa-link.link-a {
  left: 18%;
  top: 116px;
  width: 13%;
}

.ptsa-link.link-a span {
  left: 36%;
}

.ptsa-link.link-b {
  left: 42%;
  top: 116px;
  width: 7%;
}

.ptsa-link.link-b span {
  left: 4px;
}

.ptsa-link.link-c {
  right: 43%;
  top: 116px;
  width: 7%;
}

.ptsa-link.link-c span {
  right: 4px;
}

.ptsa-link.link-d {
  right: 18%;
  top: 116px;
  width: 13%;
}

.ptsa-link.link-d span {
  left: 10px;
}

.closet-view {
  display: grid;
  grid-template-columns: 150px minmax(240px, 1fr) minmax(260px, 0.9fr);
  gap: 12px;
  min-height: 330px;
}

.rack,
.cable-area {
  border: 8px solid #1d2a35;
  background: #f5f5f5;
}

.tall-rack {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.cable-area {
  position: relative;
  border-color: #0f4d8a;
}

.cables {
  position: absolute;
  top: 18px;
  width: 30%;
  height: 90px;
  border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, transparent 0 16px, currentColor 16px 20px, transparent 20px 32px);
}

.cables.blue {
  left: 5%;
  color: #70cff4;
}

.cables.green {
  left: 35%;
  color: #bfdb45;
}

.cables.orange {
  right: 5%;
  color: #ff8c2f;
}

.pc-tower {
  position: absolute;
  bottom: 36px;
  width: 80px;
  height: 92px;
  display: grid;
  place-items: end center;
  border: 1px solid #87969d;
  background: linear-gradient(#d5dcdd, #9aa6ab);
  font-size: 0.78rem;
  font-weight: 800;
}

.pc-tower:nth-of-type(4) {
  left: 24%;
}

.pc-tower:nth-of-type(5) {
  right: 24%;
}

.shelves {
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  gap: 8px;
  padding: 8px;
  border-color: #20272d;
}

.shelves > div {
  border: 5px solid #222a30;
  background: #fafafa;
}

.device-shelf {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 34px;
  padding: 12px;
}

.device-shelf span {
  display: inline-grid;
  min-width: 74px;
  min-height: 30px;
  place-items: center;
  color: #e9f4f1;
  background: #263648;
  font-weight: 800;
}

.spaced-table {
  margin-top: 18px;
}

.assessment-brief,
.subnet-workbench {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel);
}

.assessment-brief {
  margin-bottom: 18px;
}

.assessment-brief p {
  margin-bottom: 0;
  color: var(--muted);
}

.subnet-workbench {
  margin-top: 18px;
}

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

.address-inputs {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 14px;
}

.workbench-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.answer-feedback {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.ptsa-task-grid,
.pc-config-grid,
.solution-grid,
.config-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ptsa-task-grid article,
.pc-config,
.solution-grid article,
.config-check-grid article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel);
}

.ptsa-task-grid ol {
  padding-left: 22px;
  color: var(--muted);
}

.pc-config {
  display: grid;
  gap: 10px;
}

.pc-config div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.pc-config span {
  color: var(--muted);
}

.pc-config strong {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  font-family: Consolas, "Courier New", monospace;
}

.pc-config input {
  min-height: 34px;
  font-family: Consolas, "Courier New", monospace;
}

.config-textarea {
  display: block;
  width: 100%;
  min-height: 360px;
  resize: vertical;
  border: 1px solid #263648;
  border-radius: 8px;
  padding: 14px;
  color: #e9f4f1;
  background: var(--code);
  font-size: 0.92rem;
  line-height: 1.5;
}

.bottom-task-action {
  margin-top: 18px;
}

@media (max-width: 980px) {
  .hero,
  .ptsa-hero,
  .content-layout,
  .mode-layout,
  .terminal-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .topology {
    min-height: 360px;
  }

  .feature-grid,
  #quiz-panel,
  .cloze-grid,
  .subnet-input-grid,
  .address-inputs,
  .ptsa-task-grid,
  .pc-config-grid,
  .solution-grid,
  .config-check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .closet-view {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .main-nav {
    justify-content: flex-start;
  }

  h1 {
    font-size: 2.42rem;
  }

  .feature-grid,
  .task-grid,
  .compare-grid,
  #quiz-panel,
  .cloze-grid,
  .subnet-input-grid,
  .address-inputs,
  .trouble-grid,
  .ptsa-task-grid,
  .pc-config-grid,
  .solution-grid,
  .config-check-grid {
    grid-template-columns: 1fr;
  }

  .ptsa-node {
    width: 92px;
  }

  .ptsa-node.pc-a {
    left: 3%;
  }

  .ptsa-node.switch-node {
    left: 27%;
  }

  .ptsa-node.router-node {
    right: 27%;
  }

  .ptsa-node.pc-b {
    right: 3%;
  }

  .ptsa-link.link-a {
    left: 18%;
    width: 9%;
  }

  .ptsa-link.link-d {
    right: 18%;
    width: 9%;
  }

  .pc-config div {
    grid-template-columns: 1fr;
  }

  .topology {
    min-height: 430px;
  }

  .device {
    width: 124px;
  }

  .device.pc.left {
    left: 6%;
    top: 59%;
  }

  .device.switch {
    left: 9%;
    top: 13%;
  }

  .device.router {
    right: 8%;
    top: 28%;
  }

  .device.pc.right {
    right: 8%;
    bottom: 9%;
  }

  pre code {
    min-width: 620px;
  }
}

