:root {
  --ink: #03033a;
  --ink-soft: #0b195d;
  --blue: #1e6bd0;
  --blue-bright: #2d89ef;
  --orange: #f24208;
  --green: #087b4d;
  --green-soft: #e3f5ec;
  --red: #bd2626;
  --red-soft: #fff0f0;
  --white: #ffffff;
  --page: #f6f8fc;
  --surface: #ffffff;
  --surface-alt: #eef4fc;
  --text: #1b2433;
  --muted: #526075;
  --line: #d7e0ec;
  --radius: 18px;
  --shadow: 0 22px 60px rgba(3, 3, 58, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-family: "Open Sans", Arial, sans-serif;
  line-height: 1.55;
}

button, input { font: inherit; }
a { color: inherit; }
code, output, .record-code { font-family: "IBM Plex Mono", Consolas, monospace; }
:focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 3px; }

.container { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-180%);
  text-decoration: none;
  font-weight: 800;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--white);
  background: rgba(3, 3, 58, 0.97);
  backdrop-filter: blur(14px);
}
.site-header__inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--white); text-decoration: none; }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.brand span { display: grid; line-height: 1.05; }
.brand strong { font-size: 0.98rem; }
.brand small { margin-top: 4px; color: #c8ddf8; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.site-header nav { display: flex; align-items: center; gap: 4px; }
.site-header nav a { padding: 9px 10px; border-radius: 7px; color: #d6e5f9; font-size: 0.88rem; font-weight: 800; text-decoration: none; }
.site-header nav a:hover { color: var(--white); background: rgba(30, 107, 208, 0.42); }

.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(119deg, var(--ink) 0%, #0b195d 58%, #164b98 100%);
}
.hero::before,
.hero::after {
  position: absolute;
  content: "";
  pointer-events: none;
}
.hero::before {
  right: -7%;
  bottom: -58%;
  width: 560px;
  height: 560px;
  border: 1px solid rgba(171, 214, 255, 0.23);
  border-radius: 50%;
  box-shadow: 0 0 0 42px rgba(171, 214, 255, 0.03), 0 0 0 84px rgba(171, 214, 255, 0.025);
}
.hero::after {
  top: 38px;
  right: max(4vw, 40px);
  width: 190px;
  height: 92px;
  border-top: 2px solid rgba(159, 199, 255, 0.45);
  border-right: 2px solid rgba(159, 199, 255, 0.45);
  border-radius: 0 70px 0 0;
}
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.24fr) minmax(300px, 0.76fr); align-items: center; gap: 48px; padding-block: clamp(56px, 8vw, 88px); }
.eyebrow { margin: 0 0 12px; color: #9fc7ff; font-size: 0.76rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }
.eyebrow--blue { color: var(--blue); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: Inter, Arial, sans-serif; color: var(--ink); letter-spacing: -0.036em; }
.hero h1 { max-width: 780px; margin-bottom: 20px; color: var(--white); font-size: clamp(2.65rem, 6vw, 5.15rem); font-weight: 900; line-height: 0.99; }
.hero__lead { max-width: 740px; margin-bottom: 0; color: #e4eefb; font-size: clamp(1.05rem, 1.85vw, 1.32rem); }
.hero__lead strong { color: var(--white); }
.hero__actions, .activity-actions, .assessment-actions, .completion-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero__actions { margin-top: 29px; }
.hero__note { margin: 18px 0 0; color: #c9ddfa; font-size: 0.88rem; font-weight: 700; }

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}
.button:hover { transform: translateY(-1px); }
.button--primary { border-color: var(--blue); color: var(--white); background: var(--blue); }
.button--primary:hover { border-color: #1759af; background: #1759af; }
.button--secondary { color: var(--white); background: transparent; }
.button--secondary:hover { background: rgba(255, 255, 255, 0.1); }
.button--quiet { border-color: var(--line); color: var(--ink); background: var(--white); }
.button--quiet:hover { border-color: #9dbbe5; background: var(--surface-alt); }
.button--secondary-dark { border-color: var(--ink); color: var(--ink); background: transparent; }
.button--secondary-dark:hover { color: var(--white); background: var(--ink); }
.small-button, .text-button { border: 0; color: var(--blue); background: transparent; font-weight: 800; cursor: pointer; }
.small-button { min-height: 38px; border: 1px solid #b9d1f0; border-radius: 7px; padding: 7px 10px; }
.small-button:hover { color: #1759af; border-color: var(--blue); background: #f3f8ff; }
.text-button { padding: 0; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.text-button:hover { color: #174f9e; }

.byte-hero-card { padding: 26px; border: 1px solid rgba(255, 255, 255, 0.24); border-radius: var(--radius); color: var(--text); background: var(--white); box-shadow: 0 22px 55px rgba(0, 0, 0, 0.24); }
.byte-hero-card__label { margin-bottom: 14px; color: var(--blue); font-family: "IBM Plex Mono", monospace; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.hero-byte { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.hero-byte span { display: grid; min-height: 42px; place-items: center; border: 1px solid #78a9ec; border-radius: 7px; color: var(--blue); background: #eff6ff; font-family: "IBM Plex Mono", monospace; font-size: 1.15rem; font-weight: 700; }
.hero-byte span:nth-child(odd) { color: var(--green); border-color: #a9d9bc; background: #eff9f2; }
.byte-hero-card__equation { margin: 17px 0; color: var(--ink); font-family: Inter, Arial, sans-serif; font-size: 1.55rem; font-weight: 900; text-align: center; }
.hero-facts { display: grid; gap: 11px; margin: 0; }
.hero-facts div { display: grid; grid-template-columns: 62px 1fr; align-items: baseline; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.hero-facts dt { color: var(--ink); font-family: "IBM Plex Mono", monospace; font-weight: 700; }
.hero-facts dd { margin: 0; color: var(--muted); font-size: 0.87rem; }

.lab-summary { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 34px; margin-block: 58px 42px; padding: 29px 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 13px 38px rgba(3, 3, 58, 0.06); }
.lab-summary h2 { max-width: 470px; margin-bottom: 0; font-size: clamp(1.75rem, 3.4vw, 2.65rem); line-height: 1.05; }
.objectives-list { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; }
.objectives-list li { display: grid; grid-template-columns: 32px 1fr; gap: 11px; align-items: start; color: var(--muted); font-size: 0.94rem; }
.objectives-list span { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 7px; color: var(--white); background: var(--blue); font-family: "IBM Plex Mono", monospace; font-size: 0.7rem; font-weight: 700; }
.objectives-list code { color: var(--ink); font-size: 0.9em; }

.lab-layout { display: grid; grid-template-columns: 242px minmax(0, 1fr); gap: 34px; align-items: start; padding-bottom: 72px; }
.progress-card { position: sticky; top: 95px; padding: 21px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 12px 32px rgba(3, 3, 58, 0.06); }
.progress-card__head { display: grid; gap: 2px; }
.progress-card__head .eyebrow { margin-bottom: 0; }
.progress-card__head strong { color: var(--ink); font-family: Inter, Arial, sans-serif; font-size: 1.03rem; }
.progress-track { height: 8px; margin: 17px 0 18px; overflow: hidden; border-radius: 99px; background: #e5ebf4; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), #5aa1f3); transition: width 0.35s ease; }
.progress-steps { display: grid; gap: 4px; padding: 0; margin: 0; list-style: none; }
.progress-steps li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid #edf1f6; color: var(--muted); }
.progress-steps li:last-child { border-bottom: 0; }
.progress-steps b, .progress-steps small { display: block; }
.progress-steps b { color: var(--text); font-size: 0.84rem; }
.progress-steps small { margin-top: 1px; font-size: 0.73rem; }
.step-icon { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid #b8c3d2; border-radius: 50%; color: var(--muted); font-family: "IBM Plex Mono", monospace; font-size: 0.72rem; font-weight: 700; }
.progress-steps li.is-complete .step-icon { border-color: var(--green); color: var(--white); background: var(--green); font-size: 0; }
.progress-steps li.is-complete .step-icon::before { content: "✓"; font-family: Arial, sans-serif; font-size: 0.9rem; }
.progress-steps li.is-complete b { color: var(--green); }
.progress-card__note { margin: 18px 0 10px; color: var(--muted); font-size: 0.78rem; }

.lab-content { min-width: 0; }
.module { padding: 0 0 52px; margin: 0 0 52px; border-bottom: 1px solid var(--line); }
.module:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
.module__header { display: grid; grid-template-columns: 94px minmax(0, 1fr); gap: 18px; margin-bottom: 26px; }
.module__number { margin: 7px 0 0; color: var(--blue); font-family: "IBM Plex Mono", monospace; font-size: 0.79rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.module__header h2 { margin-bottom: 9px; font-size: clamp(1.65rem, 3.2vw, 2.45rem); line-height: 1.04; }
.module__header p:not(.module__number) { max-width: 770px; margin-bottom: 0; color: var(--muted); }

.concept-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.concept-card { min-height: 174px; padding: 19px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.concept-card__kicker { margin-bottom: 13px; color: var(--muted); font-family: "IBM Plex Mono", monospace; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; }
.concept-card strong { display: block; margin-bottom: 8px; font-family: Inter, Arial, sans-serif; font-size: 2rem; line-height: 1; letter-spacing: -0.06em; }
.concept-card p:last-child { margin-bottom: 0; color: var(--muted); font-size: 0.88rem; }
.concept-card--bit { border-top: 4px solid #61a625; }
.concept-card--bit strong { color: #4a8d14; }
.concept-card--byte { border-top: 4px solid var(--blue); }
.concept-card--byte strong { color: var(--blue); }
.concept-card--value { border-top: 4px solid var(--orange); }
.concept-card--value strong { color: #cc390a; }

.activity-card, .calculator-card, .assessment-card { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 15px 38px rgba(3, 3, 58, 0.07); }
.activity-card__head { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.activity-card h3, .calculator-card h3 { margin-bottom: 0; font-size: 1.42rem; line-height: 1.1; }
.activity-label { margin-bottom: 7px; color: var(--blue); font-family: "IBM Plex Mono", monospace; font-size: 0.73rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; }
.challenge-prompt { margin: 19px 0 21px; color: var(--ink); font-size: 1.04rem; }
.challenge-prompt strong { color: var(--blue); }
.byte-builder { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.bit-control { min-width: 0; text-align: center; }
.bit-control > span { display: block; margin-bottom: 6px; color: var(--muted); font-family: "IBM Plex Mono", monospace; font-size: 0.71rem; font-weight: 600; }
.bit-toggle { display: grid; width: 100%; min-height: 74px; place-content: center; gap: 2px; border: 1px solid #abc4e4; border-radius: 10px; color: var(--blue); background: #f1f7ff; cursor: pointer; transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease; }
.bit-toggle:hover { transform: translateY(-2px); border-color: var(--blue); }
.bit-toggle b { font-family: "IBM Plex Mono", monospace; font-size: 1.46rem; line-height: 1; }
.bit-toggle small { color: var(--muted); font-size: 0.66rem; font-weight: 800; text-transform: uppercase; }
.bit-toggle[aria-pressed="true"] { border-color: #5e9a1d; color: #3f7d0c; background: #edf8e7; box-shadow: 0 8px 20px rgba(80, 146, 19, 0.15); }
.bit-toggle[aria-pressed="true"] small { color: #4d811d; }
.byte-readout { display: grid; grid-template-columns: 1fr 100px minmax(190px, 1.2fr); gap: 1px; margin: 22px 0 19px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--line); }
.byte-readout > div { min-width: 0; padding: 12px 14px; background: var(--surface-alt); }
.byte-readout span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.byte-readout output { display: block; overflow-wrap: anywhere; color: var(--ink); font-size: 0.93rem; font-weight: 600; }
.byte-readout div:nth-child(2) output { color: var(--blue); font-family: Inter, Arial, sans-serif; font-size: 1.2rem; font-weight: 900; }
.feedback { min-height: 1.5em; margin: 15px 0 0; border-radius: 9px; font-size: 0.92rem; font-weight: 700; }
.feedback[data-status="success"] { padding: 10px 12px; color: #075631; background: var(--green-soft); }
.feedback[data-status="error"] { padding: 10px 12px; color: #8c1e1e; background: var(--red-soft); }
.feedback[data-status="info"] { padding: 10px 12px; color: #174f9e; background: #edf5ff; }

.formula-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 18px; }
.formula-row article { padding: 19px; border-radius: 12px; color: var(--white); background: var(--ink); }
.formula-row article:nth-child(2) { background: var(--blue); }
.formula-row span { display: block; margin-bottom: 7px; color: #c8ddf8; font-family: "IBM Plex Mono", monospace; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.formula-row strong { display: block; font-family: Inter, Arial, sans-serif; font-size: 1.36rem; }
.formula-row b { color: #8fc2ff; }
.conversion-card { background: linear-gradient(138deg, var(--surface) 0%, #f3f8ff 100%); }
.answer-line { display: grid; gap: 7px; max-width: 540px; }
.answer-line label { color: var(--ink); font-size: 0.89rem; font-weight: 800; }
.answer-line label span { color: var(--muted); font-weight: 600; }
.answer-line > div { display: grid; grid-template-columns: minmax(120px, 1fr) auto; gap: 10px; }
.answer-line input, .completion-controls input, .calculator-card input { width: 100%; min-height: 46px; border: 1px solid #9fb7d5; border-radius: 8px; padding: 9px 11px; color: var(--ink); background: var(--white); font-weight: 700; }
.answer-line input:focus, .completion-controls input:focus, .calculator-card input:focus { border-color: var(--blue); }
.conversion-card .text-button { margin-top: 16px; }
.working { margin: 10px 0 0; padding: 11px 13px; border-radius: 8px; color: #184f96; background: #eaf3ff; font-family: "IBM Plex Mono", monospace; font-size: 0.87rem; }

.notation-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.notation-grid article { display: flex; gap: 13px; align-items: center; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.notation-grid h3 { margin-bottom: 3px; font-size: 1.05rem; }
.notation-grid p { margin-bottom: 0; color: var(--muted); font-size: 0.82rem; }
.notation-mark { display: grid; flex: 0 0 46px; width: 46px; height: 46px; place-items: center; border-radius: 10px; color: #407a11; background: #eef8e7; font-family: "IBM Plex Mono", monospace; font-size: 1.45rem; font-weight: 700; }
.notation-mark--blue { color: var(--blue); background: #edf5ff; }
.notation-mark--orange { color: #b6370c; background: #fff0e9; font-size: 1rem; }
.calculator-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, 0.5fr) minmax(140px, 0.34fr); align-items: end; gap: 18px; margin-bottom: 18px; background: linear-gradient(135deg, #071b4c, #11438e); color: var(--white); }
.calculator-card h3 { color: var(--white); }
.calculator-card p:not(.activity-label) { max-width: 580px; margin: 10px 0 0; color: #d7e7fc; font-size: 0.88rem; }
.calculator-card .activity-label { color: #a8d2ff; }
.calculator-card label { display: grid; gap: 7px; color: #d7e7fc; font-size: 0.8rem; font-weight: 800; }
.calculator-card input { border-color: #a8c7ec; }
.rate-output { display: grid; min-height: 46px; place-items: center; border: 1px solid #78ace3; border-radius: 8px; color: var(--white); background: rgba(255, 255, 255, 0.1); font-family: Inter, Arial, sans-serif; font-size: 1.16rem; font-weight: 900; text-align: center; }
.units-questions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; margin: 22px 0 15px; }
.units-questions fieldset, .quiz-question { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 12px; }
.units-questions legend, .quiz-question legend { max-width: 100%; padding: 0 3px; color: var(--ink); font-weight: 800; }
.units-questions label, .quiz-question label { display: block; margin-top: 10px; color: var(--muted); cursor: pointer; font-size: 0.89rem; }
input[type="radio"] { width: 16px; height: 16px; accent-color: var(--blue); vertical-align: -3px; }
.prefix-note { margin: 0 0 17px; padding: 12px 14px; border-left: 4px solid var(--orange); color: #73401c; background: #fff7ef; font-size: 0.87rem; }
.prefix-note code { color: var(--ink); font-size: 0.95em; }

.assessment-card { display: grid; gap: 14px; background: linear-gradient(135deg, var(--surface) 0%, #f4f8ff 100%); }
.quiz-question { transition: border-color 0.16s ease, background 0.16s ease; }
.quiz-question legend { font-size: 0.96rem; }
.quiz-question legend span { display: inline-grid; width: 24px; height: 24px; margin-right: 6px; place-items: center; border-radius: 6px; color: var(--white); background: var(--blue); font-family: "IBM Plex Mono", monospace; font-size: 0.72rem; }
.quiz-question.is-correct { border-color: #75ba91; background: #f1fbf5; }
.quiz-question.is-incorrect { border-color: #e9aaaa; background: #fff7f7; }
.question-feedback { min-height: 0; margin: 9px 0 0; color: var(--muted); font-size: 0.82rem; }
.quiz-question.is-correct .question-feedback { color: #09653b; font-weight: 700; }
.quiz-question.is-incorrect .question-feedback { color: #9d2424; font-weight: 700; }
.assessment-actions { justify-content: space-between; padding-top: 4px; }
.assessment-actions span { color: var(--muted); font-family: "IBM Plex Mono", monospace; font-size: 0.86rem; font-weight: 600; }

.completion-panel { margin-top: 42px; padding: 30px; border: 2px solid var(--blue); border-radius: var(--radius); color: var(--ink); background: linear-gradient(135deg, #f0f7ff, var(--white)); box-shadow: var(--shadow); }
.completion-panel__head h2 { margin-bottom: 9px; font-size: clamp(1.7rem, 3.2vw, 2.45rem); line-height: 1.04; }
.completion-panel__head p:not(.eyebrow) { max-width: 700px; margin-bottom: 22px; color: var(--muted); }
.completion-controls { align-items: end; margin-bottom: 20px; }
.completion-controls label { display: grid; min-width: min(100%, 340px); gap: 6px; color: var(--ink); font-size: 0.86rem; font-weight: 800; }
.completion-record { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(250px, 0.9fr); gap: 24px; padding: 25px; margin-bottom: 17px; border: 1px solid #b6d0f0; border-radius: 12px; background: var(--white); }
.record-code { display: inline-block; margin-bottom: 11px; color: var(--blue); font-size: 0.79rem; font-weight: 600; letter-spacing: 0.08em; }
.completion-record h3 { margin-bottom: 9px; font-size: 1.52rem; line-height: 1.08; }
.completion-record p { margin-bottom: 0; color: var(--muted); }
.completion-record dl { display: grid; align-content: start; gap: 11px; margin: 0; }
.completion-record dl div { padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.completion-record dl div:last-child { padding-bottom: 0; border-bottom: 0; }
.completion-record dt { margin-bottom: 2px; color: var(--blue); font-family: "IBM Plex Mono", monospace; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; }
.completion-record dd { margin: 0; color: var(--text); font-size: 0.85rem; }
.completion-record .record-disclaimer { grid-column: 1 / -1; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.78rem; }

footer { padding-block: 34px; color: #d9e7fa; background: var(--ink); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer__inner strong { color: var(--white); font-family: Inter, Arial, sans-serif; }
.footer__inner p { margin: 5px 0 0; color: #b8cdeb; font-size: 0.86rem; }
.footer__inner nav { display: flex; flex-wrap: wrap; gap: 15px; }
.footer__inner nav a { color: var(--white); font-size: 0.88rem; font-weight: 800; }

@media (max-width: 930px) {
  .hero__grid, .lab-summary, .lab-layout { grid-template-columns: 1fr; }
  .hero__grid { gap: 34px; }
  .progress-card { position: static; display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 1fr); gap: 13px 23px; align-items: start; }
  .progress-card__head, .progress-track, .progress-steps, .progress-card__note, .progress-card .text-button { grid-column: 1 / -1; }
  .progress-card__head { display: flex; align-items: baseline; justify-content: space-between; }
  .progress-track { margin-block: 0; }
  .progress-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .progress-steps li:nth-last-child(-n+2) { border-bottom: 0; }
  .progress-card__note { margin: 0; }
  .concept-grid, .notation-grid { grid-template-columns: 1fr; }
  .concept-card { min-height: 0; }
  .calculator-card { grid-template-columns: 1fr 0.6fr; }
  .calculator-card > :first-child { grid-column: 1 / -1; }
  .completion-record { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .container { width: min(100% - 28px, 1160px); }
  .site-header__inner { min-height: 63px; }
  .brand small { display: none; }
  .site-header nav a { padding: 7px; font-size: 0.79rem; }
  .site-header nav a:first-child { display: none; }
  .hero__grid { padding-block: 52px; }
  .hero h1 { font-size: clamp(2.45rem, 12vw, 4rem); }
  .lab-summary, .activity-card, .calculator-card, .assessment-card, .completion-panel { padding: 22px; }
  .module__header { grid-template-columns: 1fr; gap: 7px; }
  .module__number { margin-top: 0; }
  .byte-builder { gap: 5px; }
  .bit-control > span { font-size: 0.62rem; }
  .bit-toggle { min-height: 62px; border-radius: 8px; }
  .bit-toggle b { font-size: 1.18rem; }
  .bit-toggle small { font-size: 0.57rem; }
  .byte-readout { grid-template-columns: 1fr 88px; }
  .byte-readout > div:last-child { grid-column: 1 / -1; }
  .formula-row, .units-questions { grid-template-columns: 1fr; }
  .calculator-card { grid-template-columns: 1fr; }
  .calculator-card > :first-child { grid-column: auto; }
  .activity-card__head { align-items: start; }
  .answer-line > div { grid-template-columns: 1fr; }
  .progress-card { display: block; }
  .progress-card__head { display: grid; }
  .progress-track { margin-block: 17px 18px; }
  .progress-steps { display: grid; grid-template-columns: 1fr; }
  .progress-steps li:nth-last-child(-n+2) { border-bottom: 1px solid #edf1f6; }
  .progress-steps li:last-child { border-bottom: 0; }
  .progress-card__note { margin: 18px 0 10px; }
  .footer__inner { display: grid; }
  .completion-controls { align-items: stretch; }
  .completion-controls label { min-width: 100%; }
}

@media print {
  body { background: var(--white); }
  .site-header, .hero, .lab-summary, .lab-layout > .progress-card, .module, footer, .completion-panel__head, .completion-controls, .completion-panel > .button { display: none !important; }
  main, .container, .lab-layout, .lab-content { display: block; width: 100%; margin: 0; padding: 0; }
  .completion-panel { display: block !important; margin: 0; border: 0; box-shadow: none; background: var(--white); }
  .completion-record { display: grid; border: 1px solid #000; box-shadow: none; }
}

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