
/* Phone and tablet adaptation. Zoom remains enabled. */
.sidebar-close,
.nav-backdrop {
  display: none;
}
.breadcrumb .breadcrumb-root {
  margin: 0;
  color: inherit;
}
.mobile-field-detail {
  display: none;
}
.header-view-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.header-view-controls > button {
  font: 11px var(--mono);
  padding: 8px 12px;
  min-height: 38px;
  background: #f0f4eb;
  border: 1px solid #a8bca8;
  color: #365e44;
}
.header-view-controls > button[aria-pressed="true"] {
  background: #e7eee2;
  border-color: #a8bca8;
  color: #193a2c;
}
.header-view-controls > span {
  font: 10px/1.8 var(--sans);
  color: #607366;
  flex-basis: 100%;
}
.header-grid-scroll {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border-radius: 5px;
}
.header-workbench {
  overflow: visible;
  min-width: 0;
  max-width: 100%;
}
.header-workbench[data-header-view="cards"] .packet-field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
}
.header-workbench[data-header-view="cards"] .header-field {
  grid-column: auto;
}
.header-workbench[data-header-view="cards"]
  .header-field[data-field-width="32"],
.header-workbench[data-header-view="cards"][data-protocol="ethernet"]
  .header-field {
  grid-column: 1/-1;
}
.header-workbench[data-header-view="cards"] .mobile-field-detail {
  display: block;
  grid-column: 1/-1;
}
.header-workbench[data-header-view="cards"] #field-explanation {
  display: none;
}
.mobile-field-detail {
  padding: 18px;
  border: 1px solid #a8bca8;
  border-left: 3px solid #a8bca8;
  background: #f0f4eb;
  border-radius: 7px;
  margin: 5px 0 8px;
}
.mobile-field-detail h4 {
  margin: 9px 0 12px;
  font-size: 20px;
  line-height: 1.3;
  color: #193a2c;
  letter-spacing: -0.035em;
}
.mobile-field-detail p {
  font-size: 13px !important;
  line-height: 1.85 !important;
  margin: 0 0 12px;
  color: #607366 !important;
}
.mobile-field-detail > div {
  font-size: 12px;
  color: #607366;
  line-height: 1.8;
  border-top: 1px solid #dce3d8;
  padding-top: 12px;
}
.responsive-table {
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  overscroll-behavior-inline: contain;
  border-radius: 6px;
}
.responsive-table:focus-visible,
.header-grid-scroll:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
@media (max-width: 1024px) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
  body {
    min-width: 0;
  }
  body.menu-open {
    overflow: hidden;
  }
  body.menu-open:after {
    display: none !important;
  }
  .app-shell {
    display: block;
    min-width: 0;
  }
  .main-shell {
    min-width: 0;
    width: 100%;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(86vw, 280px);
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    transform: translateX(-105%);
    visibility: hidden;
    z-index: 60;
    padding: calc(26px + env(safe-area-inset-top, 0px)) 18px
      calc(20px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: 15px 0 60px #234d3677;
    transition:
      transform 0.23s ease,
      visibility 0.23s;
  }
  .menu-open .sidebar {
    transform: translateX(0);
    visibility: visible;
  }
  .sidebar .brand {
    padding: 0;
    max-width: calc(100% - 40px);
    font-size: 26px;
  }
  .sidebar .brand-icon {
    width: 30px;
    height: 30px;
    font-size: 26px;
  }
  .sidebar-close {
    display: inline-flex;
    position: absolute;
    top: calc(14px + env(safe-area-inset-top, 0px));
    right: 12px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid #dce3d8;
    background: #f0f4eb;
    color: #2d673d;
    border-radius: 8px;
    font: 25px var(--sans);
    z-index: 1;
  }
  .sidebar .workspace-label {
    margin: 29px 8px;
    font-size: 10px;
  }
  .sidebar nav {
    gap: 7px;
  }
  .sidebar nav a {
    font-size: 14px;
    padding: 12px;
    min-height: 46px;
    gap: 12px;
  }
  .sidebar .nav-label {
    font-size: 10px;
  }
  .sidebar-bottom {
    padding-top: 22px;
  }
  .sidebar .daily-card {
    display: none;
  }
  .profile-button {
    min-height: 64px;
  }
  .nav-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 50;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fbfcf8a6;
    backdrop-filter: blur(4px);
    cursor: pointer;
  }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 25;
    height: calc(64px + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px)
      max(18px, env(safe-area-inset-right, 0px)) 0
      max(18px, env(safe-area-inset-left, 0px));
    gap: 10px;
    background: #fbfcf8ed;
    backdrop-filter: blur(15px);
  }
  .topbar .mobile-menu {
    display: inline-flex;
    width: 44px;
    height: 44px;
    min-width: 44px;
    border: 1px solid #dce3d8;
    border-radius: 8px;
    background: #f0f4eb;
    font-size: 22px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .topbar .breadcrumb {
    min-width: 0;
    flex: 1;
    font-size: 12px;
    overflow: hidden;
  }
  .breadcrumb-root,
  .breadcrumb-divider {
    display: none;
  }
  .topbar .breadcrumb b {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    line-height: 1.5;
  }
  .topbar-actions {
    gap: 9px;
    margin-left: 0;
    flex-shrink: 0;
  }
  .topbar .environment-status {
    display: none;
  }
  .topbar .search-trigger {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid #dce3d8;
    background: #f0f4eb;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
  }
  .search-trigger > .icon,
  .search-trigger > span:first-child .icon {
    width: 18px;
    height: 18px;
  }
  .search-trigger > span:last-of-type,
  .search-trigger kbd {
    display: none;
  }
  .small-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 12px;
  }
  .topbar .small-avatar {
    min-height: 44px;
    width: 44px;
  }
  .skip-link:focus {
    z-index: 100;
  }
  main {
    padding: 28px max(22px, env(safe-area-inset-right, 0px)) 38px
      max(22px, env(safe-area-inset-left, 0px));
    min-width: 0;
    width: 100%;
    min-height: calc(100svh - 140px);
  }
  main > * {
    min-width: 0;
  }
  button,
  .button,
  .icon-button {
    min-height: 44px;
  }
  button {
    touch-action: manipulation;
  }
  input:not([type="radio"]):not([type="checkbox"]):not([type="range"]),
  select,
  textarea {
    font-size: 16px !important;
    min-height: 44px;
    max-width: 100%;
  }
  textarea {
    line-height: 1.7 !important;
  }
  input[type="checkbox"],
  input[type="radio"] {
    width: 20px !important;
    height: 20px;
    min-width: 20px;
    accent-color: var(--accent);
  }
  .choice,
  .reading-check .choice,
  .lesson-depth .choice {
    font-size: 14px !important;
    line-height: 1.8;
    min-height: 44px;
    padding: 8px 0;
    align-items: flex-start;
  }
  .choice input {
    margin-top: 4px;
  }
  .choice span {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  summary {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px !important;
    line-height: 1.7;
  }
  summary:before {
    content: "›";
    font-size: 20px;
    color: #375d41;
  }
  details[open] > summary:before {
    content: "⌄";
  }
  label {
    max-width: 100%;
  }
  input[type="range"] {
    min-height: 44px;
    padding: 0;
    touch-action: pan-y;
    accent-color: var(--accent);
  }
  input[type="range"]::-webkit-slider-thumb {
    min-width: 25px;
    min-height: 25px;
  }
  input[type="range"]::-moz-range-thumb {
    width: 25px;
    height: 25px;
  }
  .page-heading {
    flex-wrap: wrap;
    align-items: start;
    gap: 17px;
  }
  .page-heading h1 {
    font-size: clamp(28px, 4.5vw, 38px);
  }
  .page-heading p {
    font-size: 14px;
    line-height: 1.85;
  }
  .page-heading .eyebrow {
    font-size: 10px;
  }
  .page-heading > .text-link {
    min-height: 36px;
    margin: 0;
    align-items: center;
  }
  .eyebrow {
    overflow-wrap: anywhere;
  }
  .lab-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .lab-layout > .workspace-panel {
    grid-row: 1;
    position: static;
    max-width: 100%;
  }
  .lab-layout > .mission-panel {
    grid-row: 2;
  }
  .mission-panel,
  .workspace-panel {
    min-width: 0;
    max-width: 100%;
  }
  .lab-task select {
    font-size: 16px !important;
  }
  .lab-task-actions {
    gap: 14px;
    flex-wrap: wrap;
  }
  .lab-task-actions details {
    min-width: 0;
  }
  .lab-task-actions details summary {
    min-height: 44px;
    padding: 5px 0;
  }
  .lab-task-actions button {
    font-size: 12px;
    min-height: 44px;
  }
  .lab-session-bar {
    font-size: 11px;
    line-height: 1.7;
    flex-wrap: wrap;
  }
  .lab-panel-heading {
    gap: 12px;
  }
  .lab-live-badge {
    font-size: 9px;
  }
  .lab-notebook textarea {
    font-size: 16px !important;
    min-height: 135px;
  }
  .lab-terminal-title {
    font-size: 11px;
    padding: 14px;
  }
  .lab-terminal-output {
    height: clamp(190px, 34svh, 320px);
    max-width: 100%;
    font-size: 12px;
    line-height: 1.9;
  }
  .lab-terminal-entry pre {
    font-size: 12px !important;
    line-height: 1.9 !important;
  }
  .lab-terminal-input {
    flex-wrap: wrap;
    gap: 7px;
    padding: 12px;
  }
  .lab-terminal-input label {
    flex-basis: 100%;
    font-size: 10px !important;
    line-height: 1.7;
  }
  .lab-terminal-input input {
    flex: 1;
    width: 0;
    font-size: 16px !important;
    min-height: 44px !important;
    padding: 7px 0;
  }
  .lab-terminal-input button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    font-size: 22px;
    border: 1px solid #dce3d8;
    border-radius: 6px;
    background: #f0f4eb;
  }
  .lab-command-suggestions {
    gap: 8px;
  }
  .lab-command-suggestions > span {
    font-size: 11px;
    flex-basis: 100%;
  }
  .lab-command-suggestions button,
  .lab-packet-presets button {
    min-height: 44px;
    padding: 9px 12px;
    font-size: 12px;
  }
  .lab-evidence-table {
    min-width: 500px;
  }
  .lab-evidence-table td,
  .lab-evidence-table th {
    font-size: 12px;
    padding: 12px 10px;
  }
  .lab-evidence-table button {
    font-size: 12px;
    min-height: 44px;
    padding: 7px;
  }
  .lab-table-wrap,
  .tool-table-wrap,
  .tools-table-wrap {
    max-width: 100%;
    min-width: 0;
    overflow: auto;
    overscroll-behavior-inline: contain;
  }
  .lab-table-wrap:before,
  .tool-table-wrap:before,
  .responsive-table:before {
    content: "Swipe to explore the table →";
    display: block;
    position: sticky;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 9px 11px;
    font: 10px/1.6 var(--mono);
    color: #385c41;
    background: #f0f4eb;
    border-bottom: 1px solid #dce3d8;
  }
  .lab-filter-bar {
    flex-wrap: wrap;
    gap: 9px;
  }
  .lab-filter-bar > label {
    flex-basis: 100%;
    font-size: 11px;
  }
  .lab-filter-bar input,
  .lab-filter-bar select {
    flex: 1;
    min-width: 0;
    max-width: 100%;
  }
  .lab-filter-bar > span {
    font-size: 10px;
  }
  .lab-rule code {
    font-size: 11px;
  }
  .lab-rule strong {
    font-size: 14px;
  }
  .lab-toggle {
    min-height: 44px;
    font-size: 12px;
    gap: 8px;
  }
  .lab-packet-test {
    flex-wrap: wrap;
    gap: 12px;
  }
  .lab-packet-test label {
    font-size: 12px;
    flex: 1 1 160px;
  }
  .lab-packet-test button {
    min-height: 44px;
    flex: 1 1 100%;
    font-size: 12px;
    margin: 0;
  }
  .lab-packet-presets {
    gap: 9px;
    flex-wrap: wrap;
  }
  .lab-rule-fixed {
    font-size: 10px;
  }
  .lab-tab-bar button {
    font-size: 12px;
    min-height: 44px;
  }
  .lab-email p {
    font-size: 14px;
  }
  .lab-email dl {
    font-size: 12px;
    line-height: 1.9;
  }
  .lab-detail {
    max-width: 100%;
    min-width: 0;
  }
  .lab-detail pre {
    font-size: 12px !important;
  }
  .lab-artifact-note,
  .lab-tool-caption {
    font-size: 12px !important;
  }
  .reading-layout,
  .lesson-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .reading-toc,
  .lesson-depth .lesson-index {
    position: static;
    max-width: 100%;
    padding: 18px 20px;
    border: 1px solid #dce3d8;
    border-radius: 9px;
    background: #f0f4eb;
  }
  .reading-toc ol,
  .lesson-index ol {
    display: flex;
    gap: 6px 25px;
    flex-wrap: wrap;
    padding-left: 19px;
    margin: 12px 0;
  }
  .reading-toc li,
  .lesson-index li {
    font-size: 13px;
    line-height: 1.8;
    padding: 3px 0;
  }
  .reading-toc li a,
  .lesson-index li a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .reading-score {
    max-width: 360px;
    margin: 18px 0 0;
  }
  .reading-toc > a {
    display: none;
  }
  .reading-content {
    max-width: 100%;
    min-width: 0;
  }
  .reading-chapter,
  .reading-experiment,
  .reading-finish,
  .reading-objectives,
  .lesson-depth article,
  .course-intro {
    padding: 28px;
  }
  .reading-content p,
  .reading-content li,
  .lesson-depth p,
  .lesson-depth li {
    font-size: 15px;
    line-height: 1.95;
  }
  .reading-content .status,
  .lesson-depth .status {
    font-size: 13px;
    line-height: 1.9;
  }
  .reading-content h2,
  .lesson-depth article h2 {
    font-size: 29px;
  }
  .responsive-table table {
    min-width: 440px;
    width: 100%;
  }
  .reading-content th,
  .reading-content td,
  .lesson-depth th,
  .lesson-depth td {
    font-size: 13px;
    padding: 12px 10px;
  }
  .reading-content pre,
  .lesson-depth pre {
    font-size: 12px;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .reading-next {
    flex-wrap: wrap;
    gap: 20px;
  }
  .reading-next > a,
  .reading-next > div > a {
    min-height: 44px;
    display: flex;
    align-items: center;
    font-size: 14px;
  }
  .reading-next span {
    font-size: 11px;
  }
  .demo-button-row {
    gap: 10px;
  }
  .reading-experiment button {
    font-size: 13px;
  }
  .reading-check legend {
    font-size: 15px;
    line-height: 1.8;
  }
  .reading-check .choice {
    font-size: 14px !important;
  }
  .reading-check button {
    font-size: 13px;
    min-height: 44px;
  }
  .reading-experiment .demo-mission {
    font-size: 14px !important;
    line-height: 1.8 !important;
  }
  .tools-tabs {
    max-width: 100%;
    gap: 8px;
    flex-wrap: wrap;
    overflow: visible;
  }
  .tools-tabs button {
    min-height: 44px;
    font-size: 12px;
    flex: 1 1 130px;
    white-space: normal;
    line-height: 1.6;
    padding: 10px 12px;
  }
  .tool-panel {
    padding: 27px;
    max-width: 100%;
    min-width: 0;
  }
  .tools-two-col {
    grid-template-columns: minmax(0, 1fr);
  }
  .tool-actions {
    flex-wrap: wrap;
    gap: 10px;
  }
  .tool-actions button {
    min-height: 44px;
    font-size: 13px;
    flex: 1 1 150px;
  }
  .tool-copy {
    min-height: 44px;
    font-size: 12px;
  }
  .tool-result {
    min-width: 0;
    max-width: 100%;
  }
  .tool-packet-table {
    min-width: 550px;
  }
  .tool-packet-table th,
  .tool-packet-table td {
    font-size: 12px !important;
  }
  .tool-result-heading {
    flex-wrap: wrap;
    gap: 10px;
  }
  .tool-tip p,
  .tools-intro > p {
    font-size: 14px;
  }
  .tool-status {
    font-size: 13px;
  }
  .tool-example-buttons {
    flex-wrap: wrap;
  }
  .tool-example-buttons button {
    min-height: 44px;
    font-size: 12px;
  }
  .tool-subnet-results,
  .tool-subnet-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .search-dialog {
    width: calc(100% - 28px);
    max-width: 650px;
    max-height: calc(100dvh - 40px);
    margin: auto;
    padding: 0;
    overflow: hidden;
  }
  .search-heading {
    gap: 8px;
    padding: 14px;
  }
  .search-heading input {
    min-width: 0;
    width: 100%;
    font-size: 16px !important;
    min-height: 44px;
  }
  .search-heading > .icon {
    width: 17px;
    flex-shrink: 0;
  }
  .search-heading #close-search {
    height: 44px;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid #dce3d8;
    border-radius: 7px;
  }
  .search-foot {
    font-size: 10px;
    line-height: 1.7;
    gap: 10px;
  }
  .search-foot kbd {
    font-size: 9px;
    white-space: nowrap;
  }
  #search-results {
    max-height: 55dvh;
    overscroll-behavior: contain;
  }
  #search-results a {
    min-height: 64px;
    padding: 12px;
  }
  #search-results a > div {
    min-width: 0;
  }
  #search-results strong {
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  #search-results small {
    font-size: 12px;
  }
  .progress-actions {
    max-width: 100%;
    flex-wrap: wrap;
    gap: 9px;
  }
  .progress-actions button {
    min-height: 44px;
    white-space: normal;
    flex: 1 1 150px;
  }
  .progress-overview {
    min-width: 0;
  }
  .progress-numbers {
    flex-wrap: wrap;
  }
  .skill-progress-card {
    min-width: 0;
  }
  .journal-row {
    min-width: 0;
  }
  .journal-row > div {
    min-width: 0;
  }
  .journal-row h3 {
    overflow-wrap: anywhere;
  }
  .journal-notes {
    min-width: 0;
    max-width: 100%;
  }
  .journal-notes pre {
    overflow-wrap: anywhere;
  }
  .footer-links {
    flex-wrap: wrap;
  }
  .footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 12px;
  }
  .toast {
    left: 50%;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    max-width: calc(100% - 28px);
    padding: 12px 17px;
    overflow-wrap: anywhere;
  }
  .focus-mode main {
    padding-top: 20px;
  }
  .focus-mode .lab-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .focus-mode .lab-terminal-output {
    height: clamp(200px, 40svh, 360px);
  }
}
@media (max-width: 760px) {
  main {
    padding: 25px 18px calc(32px + env(safe-area-inset-bottom, 0px));
  }
  .topbar {
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
    gap: 8px;
  }
  .topbar-actions {
    gap: 7px;
  }
  .dashboard-hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 29px 25px 24px;
    gap: 8px;
  }
  .hero-copy {
    min-width: 0;
    width: 100%;
  }
  .hero-copy h2 {
    font-size: clamp(40px, 9vw, 61px);
    line-height: 1.08;
  }
  .hero-copy > p {
    font-size: 14px;
    max-width: 100%;
    line-height: 1.85;
  }
  .hero-actions {
    min-width: 0;
    gap: 12px;
    flex-wrap: wrap;
  }
  .hero-actions .primary {
    min-height: 46px;
    font-size: 13px;
  }
  .hero-secondary {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-size: 12px;
  }
  .hero-note {
    font-size: 10px;
    line-height: 1.8;
    margin-top: 14px;
    gap: 8px;
  }
  .hero-coordinate {
    font-size: 7px;
    max-width: calc(100% - 28px);
    line-height: 1.8;
    text-align: right;
  }
  .network-visual {
    max-width: 410px;
    height: auto;
    aspect-ratio: 1.43;
    justify-self: center;
    margin: 0 auto 16px;
    opacity: 1;
  }
  .network-svg {
    width: 100%;
    height: 100%;
    max-height: none;
  }
  .network-hint {
    font-size: 8px;
    bottom: -1px;
    line-height: 1.7;
    text-align: center;
  }
  .stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats-strip > div {
    padding: 19px 14px;
    gap: 10px;
  }
  .stats-strip > div > span:last-child {
    font-size: 12px;
    line-height: 1.5;
  }
  .stats-strip small {
    display: none;
  }
  .stats-strip strong {
    font-size: 28px;
  }
  .stats-strip .stat-icon .icon {
    width: 20px;
    height: 20px;
  }
  .learning-pulse {
    padding: 22px 20px;
    grid-template-columns: minmax(0, 1fr);
  }
  .pulse-main {
    flex-wrap: wrap;
    gap: 13px;
  }
  .pulse-main > div {
    flex: 1;
    min-width: 0;
  }
  .pulse-main h3 {
    font-size: 21px;
    line-height: 1.4;
  }
  .pulse-main p {
    font-size: 13px;
    line-height: 1.85;
  }
  .pulse-main .button {
    width: 100%;
    max-width: none;
    min-height: 44px;
    margin: 3px 0 0;
    font-size: 13px;
  }
  .pulse-progress {
    display: block;
  }
  .pulse-progress > div {
    font-size: 12px;
    margin-bottom: 9px;
  }
  .pulse-progress small {
    font-size: 11px;
    margin-top: 8px;
  }
  .section-heading {
    flex-wrap: wrap;
    align-items: start;
    gap: 11px;
  }
  .section-heading h2 {
    font-size: 26px;
    max-width: none;
  }
  .section-heading .text-link {
    font-size: 12px;
    min-height: 40px;
    align-items: center;
    margin: 0;
  }
  .section-heading .eyebrow {
    font-size: 9px;
  }
  .lab-cards,
  .lesson-cards,
  .lesson-preview .lesson-cards,
  .path-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .lab-cards:not(.catalog-grid) > .lab-card:last-child,
  .lesson-preview .lesson-card:last-child {
    display: flex;
  }
  .lab-card-content,
  .lesson-card,
  .lesson-preview .lesson-card {
    padding: 24px;
  }
  .lab-card h3,
  .lesson-card h3,
  .lesson-preview .lesson-card h3 {
    font-size: 24px;
  }
  .lab-card p,
  .lesson-card > p,
  .lesson-preview .lesson-card > p {
    font-size: 14px;
    line-height: 1.85;
  }
  .lab-meta {
    font-size: 12px;
  }
  .difficulty {
    font-size: 11px;
  }
  .lab-card-footer,
  .lesson-card-footer,
  .lesson-preview .lesson-card-footer {
    font-size: 11px;
    gap: 13px;
    flex-wrap: wrap;
  }
  .lab-card-footer b,
  .lesson-card-footer > b {
    font-size: 12px;
  }
  .lab-card-footer > b,
  .lesson-card-footer > b {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
  }
  .lab-art,
  .catalog-grid .lab-art {
    height: 175px;
  }
  .lab-art svg,
  .catalog-grid .lab-art svg {
    height: 164px;
    width: 245px;
  }
  .lesson-library-intro {
    padding: 22px;
    align-items: start;
    gap: 14px;
  }
  .lesson-library-intro h2 {
    font-size: 22px;
  }
  .lesson-library-intro p {
    font-size: 14px;
  }
  .catalog-toolbar {
    flex-wrap: wrap;
    gap: 15px;
  }
  .filter-tabs {
    gap: 7px;
    max-width: 100%;
  }
  .filter-tabs button {
    min-height: 44px;
    font-size: 12px;
    padding: 9px 11px;
  }
  .catalog-search {
    width: 100%;
    margin-left: 0;
    min-width: 0;
    padding: 0 12px;
  }
  .catalog-search input {
    width: 100%;
    font-size: 16px !important;
    min-height: 44px;
  }
  .catalog-search > .icon {
    flex-shrink: 0;
  }
  .catalog-options {
    flex-wrap: wrap;
    align-items: center;
  }
  .catalog-options > span {
    font-size: 12px;
    flex-basis: 100%;
  }
  .catalog-options > div {
    width: 100%;
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
  }
  .catalog-options select {
    flex: 1;
    min-width: 0;
    max-width: none;
    padding: 9px 8px;
    font-size: 16px !important;
  }
  .path-detail {
    grid-template-columns: minmax(0, 1fr);
  }
  .path-card {
    padding: 28px;
  }
  .path-card h2 {
    font-size: 31px;
  }
  .path-card p {
    font-size: 14px;
  }
  .path-card-footer {
    gap: 14px;
    flex-wrap: wrap;
    font-size: 12px;
  }
  .path-card-footer b {
    font-size: 12px;
    min-height: 32px;
  }
  .path-step {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: start;
    padding: 23px 20px;
    gap: 12px;
  }
  .path-step > span:first-child {
    grid-column: 1;
    grid-row: 1/3;
  }
  .path-step > div {
    grid-column: 2;
    min-width: 0;
  }
  .path-step > span:last-child {
    grid-column: 2;
    margin-left: 0;
    justify-self: start;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    font-size: 12px;
  }
  .path-step h3 {
    font-size: 23px;
    line-height: 1.3;
  }
  .path-step p {
    font-size: 13px;
  }
  .path-step .eyebrow {
    font-size: 9px;
  }
  .path-section-title {
    font-size: 22px;
    line-height: 1.4;
  }
  .path-section-title > span {
    font-size: 10px;
    line-height: 1.8;
  }
  .bottom-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .path-feature {
    padding: 27px;
    flex-direction: column;
  }
  .path-feature h2 {
    font-size: 31px;
  }
  .path-feature p {
    font-size: 14px;
  }
  .path-feature-footer {
    align-items: start;
  }
  .path-feature-footer > span {
    font-size: 12px;
  }
  .path-feature-footer a {
    font-size: 13px;
    min-height: 44px;
  }
  .daily-challenge {
    padding: 25px;
  }
  .daily-challenge h3 {
    font-size: 29px;
    line-height: 1.3;
  }
  .daily-challenge > p {
    font-size: 14px;
    line-height: 1.85;
  }
  .drill-tabs {
    gap: 7px;
  }
  .drill-tabs button {
    font-size: 10px;
    min-height: 44px;
    padding: 8px 11px;
    flex: 1;
    white-space: normal;
    line-height: 1.7;
  }
  .drill-options button {
    font-size: 14px;
    min-height: 48px;
    line-height: 1.8;
    padding: 12px;
  }
  .daily-challenge p.drill-feedback {
    font-size: 13px;
  }
  .course-hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 28px;
  }
  .course-hero h1 {
    font-size: clamp(40px, 9vw, 55px);
  }
  .course-hero p {
    font-size: 14px;
  }
  .course-hero .lesson-art {
    display: none;
  }
  .course-progress {
    font-size: 12px;
  }
  .course-progress progress {
    min-width: 0;
    max-width: 200px;
  }
  .lesson-depth .panel,
  .reading-chapter,
  .reading-experiment,
  .reading-finish,
  .reading-objectives {
    padding: 25px 21px;
  }
  .reading-layout,
  .lesson-grid {
    gap: 20px;
  }
  .reading-content h2 {
    font-size: 28px;
  }
  .reading-next {
    flex-direction: column;
    gap: 21px;
  }
  .reading-next > div {
    text-align: left;
    max-width: 100%;
  }
  .reading-toc ol,
  .lesson-index ol {
    display: block;
    padding-left: 20px;
  }
  .reading-toc li,
  .lesson-index li {
    padding: 0;
  }
  .reading-content .tag {
    font-size: 10px;
  }
  .journey-nodes {
    gap: 10px;
  }
  .journey-nodes b {
    font-size: 14px;
    line-height: 1.6;
  }
  .journey-nodes > div {
    padding: 17px 12px;
  }
  .journey-nodes > div > span {
    font-size: 11px;
  }
  .demo-output {
    font-size: 12px;
    line-height: 1.9;
    padding: 19px;
  }
  .demo-output p {
    font-size: 13px;
  }
  .reading-experiment .factor-grid label {
    min-height: 48px;
    padding: 14px;
    font-size: 14px;
  }
  .lab-heading-meta {
    font-size: 12px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .lab-heading-meta #focus-lab {
    font-size: 13px;
    min-height: 44px;
    padding: 9px 12px;
  }
  .lab-page-heading {
    flex-wrap: wrap;
    gap: 11px;
    align-items: center;
    margin-bottom: 18px;
  }
  .lab-page-heading .back-link {
    font-size: 13px;
    min-height: 36px;
    margin: 0;
  }
  .simulation-badge {
    font-size: 9px;
  }
  .lab-start-screen {
    min-height: 270px;
    padding: 26px 20px;
  }
  .lab-start-screen p {
    font-size: 14px;
  }
  .lab-start-screen h3 {
    font-size: 22px;
  }
  .lab-start-screen small {
    font-size: 11px;
  }
  .lab-start-screen button {
    font-size: 13px;
    min-height: 44px;
  }
  .lab-workspace-heading {
    flex-wrap: wrap;
    align-items: start;
  }
  .lab-workspace-heading h2 {
    font-size: 22px;
  }
  .mission-panel > h2 {
    font-size: 27px;
  }
  .mission-panel > p {
    font-size: 14px;
  }
  .lab-task-title h3 {
    font-size: 14px;
  }
  .lab-feedback {
    font-size: 13px;
  }
  .lab-notebook label {
    font-size: 14px;
  }
  .lab-notebook label span {
    font-size: 11px;
  }
  .lab-rule {
    gap: 10px;
    flex-wrap: wrap;
  }
  .lab-rule > div {
    flex: 1;
    min-width: 140px;
  }
  .lab-rule code {
    font-size: 10px;
  }
  .lab-packet-test label {
    flex-basis: 100%;
  }
  .lab-tab-bar button {
    font-size: 13px;
  }
  .lab-email dl {
    grid-template-columns: 70px minmax(0, 1fr);
    font-size: 12px;
  }
  .tool-panel {
    padding: 25px 21px;
  }
  .tools-intro h2 {
    font-size: 28px;
  }
  .tool-panel label {
    font-size: 14px;
  }
  .tools-tabs button {
    flex: 1 1 42%;
    font-size: 12px;
  }
  .tool-actions button {
    font-size: 13px;
    flex: 1 1 100%;
  }
  .tools-local-note {
    font-size: 12px;
    line-height: 1.9;
  }
  .tool-result-heading {
    gap: 10px;
  }
  .tool-result-heading > span {
    font-size: 10px;
    line-height: 1.8;
  }
  .tool-result pre,
  .tool-filter-result pre {
    font-size: 13px;
  }
  .tool-tip p {
    font-size: 14px;
  }
  .progress-overview {
    grid-template-columns: minmax(0, 1fr);
    padding: 28px;
    gap: 25px;
  }
  .progress-overview h2 {
    font-size: 30px;
  }
  .progress-overview p {
    font-size: 14px;
  }
  .progress-numbers {
    gap: 25px;
  }
  .progress-numbers b {
    font-size: 29px;
  }
  .progress-numbers span {
    font-size: 12px;
  }
  .skills-grid,
  .milestone-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .skill-progress-card {
    padding: 22px 16px;
  }
  .skill-progress-card h3 {
    font-size: 18px;
    line-height: 1.4;
  }
  .skill-progress-card > div {
    font-size: 11px;
    flex-wrap: wrap;
    gap: 6px;
  }
  .milestone {
    padding: 24px 14px;
  }
  .milestone h3 {
    font-size: 17px;
  }
  .milestone p {
    font-size: 12px;
    min-height: 0;
  }
  .milestone small {
    font-size: 9px;
    line-height: 1.8;
  }
  .journal-row {
    padding: 22px 17px;
    gap: 13px;
  }
  .journal-row > div {
    max-width: calc(100% - 44px);
  }
  .journal-row h3 {
    font-size: 16px;
  }
  .journal-row p {
    font-size: 12px;
  }
  .journal-row .record-status {
    font-size: 10px;
    margin-left: 43px;
    line-height: 1.7;
  }
  .journal-action {
    margin-left: auto;
    font-size: 12px;
    min-height: 44px;
  }
  .journal-notes {
    padding-left: 0;
    flex-basis: 100%;
  }
  .journal-notes summary {
    font-size: 12px;
    min-height: 44px;
  }
  .prose {
    padding: 27px 22px;
  }
  .prose p {
    font-size: 15px;
    line-height: 1.9;
  }
  .prose h2 {
    font-size: 27px;
  }
  footer {
    display: block;
    padding: 22px 18px calc(22px + env(safe-area-inset-bottom, 0px));
    font-size: 9px;
  }
  footer > span {
    font-size: 9px;
    line-height: 1.9;
    max-width: none;
  }
  .footer-links {
    margin-top: 12px;
    justify-content: space-between;
    gap: 12px;
  }
  .footer-links a {
    font-size: 12px;
  }
  .focus-mode main {
    padding: 18px 14px 30px;
  }
  .focus-mode .sidebar,
  .focus-mode .topbar {
    display: none;
  }
}
@media (max-width: 600px) {
  .header-workbench[data-header-view="auto"] .packet-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }
  .header-workbench[data-header-view="auto"] .header-field {
    grid-column: auto;
  }
  .header-workbench[data-header-view="auto"]
    .header-field[data-field-width="32"],
  .header-workbench[data-header-view="auto"][data-protocol="ethernet"]
    .header-field {
    grid-column: 1/-1;
  }
  .header-workbench[data-header-view="auto"] .mobile-field-detail {
    display: block;
    grid-column: 1/-1;
  }
  .header-workbench[data-header-view="auto"] #field-explanation {
    display: none;
  }
  .header-workbench[data-header-view="bits"] .packet-field-grid {
    grid-template-columns: repeat(32, minmax(0, 1fr));
    min-width: 540px;
  }
  .header-workbench[data-header-view="bits"] .header-field {
    grid-column: span var(--field-span);
  }
  .header-workbench[data-header-view="bits"] .mobile-field-detail {
    display: none;
  }
  .header-workbench[data-header-view="bits"] #field-explanation {
    display: block;
  }
  .visual-chapter {
    padding: 25px 18px;
    overflow: visible;
  }
  .visual-chapter h2 {
    font-size: clamp(31px, 8vw, 39px);
  }
  .visual-chapter > p {
    font-size: 14px !important;
    line-height: 1.9 !important;
  }
  .visual-chapter-head {
    gap: 11px;
  }
  .visual-badge {
    font-size: 9px;
    line-height: 1.7;
  }
  .visual-eyebrow {
    font-size: 10px;
  }
  .visual-simulator {
    padding: 21px 13px;
  }
  .visual-controls {
    gap: 9px;
  }
  .visual-controls > button {
    font-size: 11px;
    min-height: 44px;
    padding: 10px 12px;
    flex: 1 1 42%;
    white-space: normal;
    line-height: 1.6;
  }
  .visual-controls .visual-segment {
    flex: 1 1 100%;
    min-width: 0;
  }
  .visual-segment button {
    min-height: 44px;
    font-size: 12px;
    padding: 10px;
  }
  .visual-controls > label {
    font-size: 11px;
    flex: 1 1 100%;
    justify-content: space-between;
    min-height: 44px;
  }
  .visual-controls select {
    max-width: 150px;
    min-height: 44px;
    font-size: 16px !important;
  }
  .encap-row {
    grid-template-columns: minmax(0, 1fr) 37px;
    padding: 15px 10px;
    gap: 12px;
  }
  .encap-layer {
    min-width: 0;
    gap: 10px;
    line-height: 1.7;
  }
  .encap-layer > b {
    font-size: 12px;
  }
  .encap-layer > span {
    font-size: 10px;
  }
  .encap-layer > small {
    font-size: 10px;
    margin-left: 0;
  }
  .encap-pieces {
    gap: 6px;
  }
  .encap-pieces .packet-piece {
    font-size: 10px;
    min-height: 44px;
    padding: 10px 8px;
    flex: 1 1 42%;
    line-height: 1.7;
  }
  .encap-size {
    font-size: 10px;
  }
  .wire-path {
    font-size: 8px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .wire-path > div {
    min-width: 70px;
  }
  .visual-live {
    font-size: 12px !important;
    line-height: 1.9 !important;
  }
  .piece-inspector strong {
    font-size: 12px;
  }
  .piece-inspector p {
    font-size: 13px !important;
  }
  .header-tabs {
    gap: 8px;
  }
  .header-tabs button {
    flex: 1 1 42%;
    min-height: 44px;
    font-size: 12px;
    padding: 10px 11px;
    white-space: normal;
    line-height: 1.6;
  }
  .header-workbench {
    padding: 20px 12px;
    max-width: 100%;
    overflow: visible;
  }
  .header-workbench-title h3 {
    font-size: 20px;
    line-height: 1.4;
  }
  .header-workbench-title > span {
    font-size: 11px;
    line-height: 1.8;
  }
  .header-view-controls {
    gap: 8px;
  }
  .header-view-controls > button {
    min-height: 44px;
    font-size: 12px;
    flex: 1;
    padding: 10px 9px;
    white-space: normal;
  }
  .header-view-controls > span {
    font-size: 12px;
    line-height: 1.8;
  }
  .header-grid-scroll {
    max-width: 100%;
    min-width: 0;
    padding: 3px;
    box-sizing: border-box;
  }
  .packet-field-grid {
    gap: 7px;
  }
  .header-field {
    padding: 15px 11px;
    min-height: 105px;
    gap: 9px;
    overflow: visible;
  }
  .header-field > strong {
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  .header-field > span {
    font-size: 10px;
  }
  .header-field > code {
    font-size: 12px;
    line-height: 1.7;
    overflow-wrap: anywhere;
  }
  .header-workbench[data-header-view="bits"] .header-field {
    padding: 12px 8px;
    overflow: hidden;
  }
  .header-workbench[data-header-view="bits"] .header-field > strong {
    font-size: 12px;
  }
  .header-workbench[data-header-view="bits"] .header-field > span {
    font-size: 8px;
  }
  .header-workbench[data-header-view="bits"] .header-field > code {
    font-size: 10px;
  }
  .field-explanation {
    padding: 21px 17px;
  }
  .field-explanation h4 {
    font-size: 23px;
  }
  .field-explanation p {
    font-size: 14px !important;
  }
  .field-explanation > div {
    font-size: 12px;
  }
  .visual-exercise {
    padding: 23px 18px;
  }
  .visual-exercise h3 {
    font-size: 24px;
  }
  .visual-exercise p {
    font-size: 14px !important;
  }
  .visual-exercise label {
    font-size: 14px;
    line-height: 1.8;
  }
  .visual-exercise button {
    min-height: 44px;
    font-size: 12px;
    width: 100%;
  }
  .ttl-model {
    padding: 23px 16px;
  }
  .ttl-model > label {
    font-size: 13px;
    line-height: 1.8;
  }
  .ttl-model > label > strong {
    font-size: 24px;
  }
  .ttl-route {
    display: flex;
    flex-direction: column;
    gap: 9px;
    position: relative;
    margin: 24px 0;
  }
  .ttl-node {
    display: grid;
    grid-template-columns: 35px minmax(0, 1fr) auto;
    align-items: center;
    text-align: left;
    gap: 13px;
    padding: 15px 13px;
    min-height: 65px;
    width: 100%;
  }
  .ttl-node > span {
    font-size: 26px;
    text-align: center;
  }
  .ttl-node > b {
    font-size: 13px;
    line-height: 1.7;
  }
  .ttl-node > small {
    font-size: 10px;
    line-height: 1.7;
    text-align: right;
  }
  .ttl-model > .visual-primary {
    width: 100%;
    min-height: 44px;
    font-size: 12px;
  }
  .concept-scene {
    padding: 23px 17px;
    overflow: visible;
    max-width: 100%;
    min-width: 0;
  }
  .scene-kicker {
    font-size: 10px;
    letter-spacing: 0.08em;
    line-height: 1.8;
    overflow-wrap: anywhere;
  }
  .scene-caption {
    font-size: 13px !important;
    line-height: 1.9 !important;
  }
  .scene-network {
    flex-direction: column;
    gap: 11px;
    align-items: stretch;
  }
  .scene-node {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 7px 14px;
    padding: 17px 15px;
    text-align: left;
    width: 100%;
    min-width: 0;
    align-items: center;
    border-radius: 9px;
  }
  .scene-node > span {
    grid-column: 1;
    grid-row: 1/3;
    font-size: 29px;
    text-align: center;
  }
  .scene-node > b {
    grid-column: 2;
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
  }
  .scene-node > small {
    grid-column: 2;
    font-size: 11px;
    line-height: 1.8;
  }
  .scene-connector {
    align-self: center;
    transform: rotate(90deg);
    font-size: 23px;
    line-height: 1;
  }
  .scene-signal {
    min-width: 0;
    max-width: none;
    width: 100%;
    font-size: 13px;
    line-height: 1.8;
    padding: 15px;
  }
  .decision-path {
    display: flex;
    flex-direction: column;
    gap: 11px;
    align-items: stretch;
  }
  .decision-path > .scene-node {
    min-width: 0;
    width: 100%;
  }
  .decision-path > span {
    align-self: center;
    transform: rotate(90deg);
    font-size: 23px;
    line-height: 1;
  }
  .decision-gate {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    min-width: 0;
    width: 100%;
    padding: 19px 16px;
    gap: 12px;
    border-radius: 9px;
  }
  .decision-gate > b {
    font-size: 11px;
    line-height: 1.7;
    white-space: normal;
  }
  .decision-gate > span {
    font-size: 16px;
    white-space: nowrap;
  }
  .factor-orbits {
    gap: 9px;
    justify-content: space-between;
    margin: 22px 0;
  }
  .factor-orbits > span {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
  }
  .factor-orbit {
    border-radius: 12px;
    width: 0;
    flex: 1;
    min-width: 0;
    height: auto;
    min-height: 145px;
    aspect-ratio: auto;
    padding: 17px 8px;
    gap: 13px;
  }
  .factor-orbit > span {
    font-size: 29px;
  }
  .factor-orbit > b {
    font-size: 9px;
    line-height: 1.8;
    letter-spacing: 0.025em;
    overflow-wrap: anywhere;
  }
  .factor-orbit > small {
    font-size: 10px;
    line-height: 1.8;
    overflow-wrap: anywhere;
  }
  .domain-lens {
    font-size: 16px;
    line-height: 1.9;
    display: block;
    text-align: left;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .domain-lens > span {
    display: block;
    overflow-wrap: anywhere;
    margin-bottom: 8px;
  }
  .domain-lens > strong {
    display: inline-block;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    padding: 8px 10px;
    font-size: 16px;
  }
  .domain-legend {
    font-size: 10px;
    line-height: 1.8;
    flex-wrap: wrap;
  }
  .avalanche-bits {
    grid-template-columns: repeat(16, minmax(0, 1fr));
    gap: 3px;
  }
  .avalanche-total {
    gap: 12px;
    flex-wrap: wrap;
    align-items: baseline;
  }
  .avalanche-total > strong {
    font-size: 32px;
  }
  .avalanche-total > span {
    font-size: 12px;
    line-height: 1.8;
  }
  .access-object strong {
    font-size: 22px;
  }
  .access-object small {
    font-size: 13px;
  }
  .url-anatomy code {
    font-size: 14px;
    line-height: 1.8;
  }
  .url-anatomy span {
    font-size: 10px;
  }
  .hash-compare {
    padding: 20px 15px;
  }
  .hash-compare pre {
    font-size: 12px;
  }
  .hash-compare > span {
    font-size: 10px;
  }
  .factor-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .factor-grid label {
    font-size: 14px;
    min-height: 48px;
  }
  .packet-conversation {
    gap: 10px;
    flex-wrap: wrap;
    font-size: 11px;
    line-height: 1.8;
    padding: 19px 15px;
  }
  .packet-beam {
    font-size: 14px;
  }
  .reading-experiment .demo-toggle {
    font-size: 14px;
    min-height: 44px;
    align-items: flex-start;
    line-height: 1.8;
  }
  .reading-experiment .demo-toggle input {
    margin-top: 4px;
  }
  .reading-next {
    gap: 24px;
  }
  .lesson-header-meta {
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12px;
  }
  .reading-content .responsive-table {
    margin: 20px 0;
  }
  .lab-env-label {
    font-size: 11px;
    line-height: 1.8;
  }
  .lab-env-label .lab-muted {
    display: none;
  }
  .lab-complete-banner strong {
    font-size: 19px;
  }
  .lab-complete-banner span,
  .lab-complete-banner a {
    font-size: 13px;
    line-height: 1.8;
  }
  .lab-complete-banner a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}
@media (max-width: 380px) {
  main {
    padding-left: 14px;
    padding-right: 14px;
  }
  .topbar {
    padding-left: 12px;
    padding-right: 12px;
    gap: 7px;
  }
  .topbar-actions {
    gap: 6px;
  }
  .topbar .small-avatar {
    display: none;
  }
  .topbar .breadcrumb b {
    font-size: 12px;
  }
  .dashboard-hero {
    padding: 26px 22px 23px;
  }
  .hero-copy h2 {
    font-size: 43px;
  }
  .hero-actions {
    gap: 9px;
  }
  .hero-actions .primary {
    width: 100%;
    font-size: 13px;
  }
  .hero-secondary {
    font-size: 12px;
  }
  .hero-note {
    font-size: 9px;
  }
  .network-hint {
    font-size: 7px;
  }
  .stats-strip > div {
    padding: 18px 11px;
    gap: 9px;
  }
  .stats-strip strong {
    font-size: 24px;
  }
  .stats-strip > div > span:last-child {
    font-size: 11px;
  }
  .stat-icon {
    display: none;
  }
  .lesson-card,
  .lesson-preview .lesson-card,
  .lab-card-content {
    padding: 22px;
  }
  .lesson-card h3,
  .lesson-preview .lesson-card h3,
  .lab-card h3 {
    font-size: 23px;
  }
  .lesson-card-footer,
  .lab-card-footer {
    gap: 9px;
  }
  .lesson-library-intro {
    padding: 21px 18px;
  }
  .lesson-library-intro > span {
    display: none;
  }
  .reading-chapter,
  .reading-experiment,
  .reading-finish,
  .reading-objectives,
  .lesson-depth article,
  .course-intro {
    padding: 24px 18px;
  }
  .reading-content h2,
  .lesson-depth article h2 {
    font-size: 27px;
  }
  .reading-check {
    padding: 19px 14px;
  }
  .reading-check legend {
    font-size: 14px;
  }
  .reading-check .choice {
    font-size: 14px !important;
  }
  .visual-chapter {
    padding: 23px 15px;
  }
  .visual-chapter h2 {
    font-size: 32px;
  }
  .visual-simulator {
    padding: 19px 11px;
  }
  .encap-pieces .packet-piece {
    flex-basis: 100%;
    font-size: 10px;
    min-height: 44px;
  }
  .encap-row {
    grid-template-columns: minmax(0, 1fr) 34px;
  }
  .encap-layer {
    gap: 8px;
  }
  .encap-layer > small {
    flex-basis: 100%;
  }
  .wire-path {
    font-size: 7px;
  }
  .visual-controls > button {
    font-size: 10px;
    padding: 9px 8px;
  }
  .header-workbench {
    padding: 19px 10px;
  }
  .header-workbench-title h3 {
    font-size: 19px;
  }
  .header-workbench[data-header-view="cards"] .packet-field-grid,
  .header-workbench[data-header-view="auto"] .packet-field-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .header-workbench[data-header-view="cards"] .header-field,
  .header-workbench[data-header-view="auto"] .header-field {
    grid-column: 1/-1;
    min-height: 88px;
  }
  .header-field {
    min-height: 96px;
  }
  .mobile-field-detail {
    padding: 19px 15px;
  }
  .header-tabs button {
    font-size: 11px;
  }
  .concept-scene {
    padding: 22px 15px;
  }
  .scene-node {
    padding: 17px 13px;
    gap: 7px 11px;
  }
  .scene-node > b {
    font-size: 13px;
  }
  .scene-node > small {
    font-size: 10px;
  }
  .factor-orbit {
    min-height: 137px;
    padding: 15px 7px;
  }
  .factor-orbit > b {
    font-size: 8px;
  }
  .factor-orbit > small {
    font-size: 10px;
  }
  .skills-grid,
  .milestone-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .skill-progress-card {
    padding: 23px;
  }
  .skill-progress-card h3 {
    min-height: 0;
    font-size: 21px;
  }
  .skill-progress-card > div {
    font-size: 12px;
  }
  .milestone {
    padding: 25px;
  }
  .milestone p {
    font-size: 13px;
  }
  .journal-row h3 {
    font-size: 15px;
  }
  .journal-row p {
    font-size: 11px;
  }
  .lab-workspace-heading {
    gap: 12px;
  }
  .lab-live-badge {
    font-size: 9px;
  }
  .mission-panel,
  .workspace-panel {
    padding: 18px 14px;
  }
  .tool-panel {
    padding: 24px 18px;
  }
  .tools-tabs button {
    font-size: 11px;
    padding: 10px 9px;
    flex-basis: 42%;
  }
  .tool-subnet-results,
  .tool-subnet-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .search-heading {
    padding: 12px;
    gap: 7px;
  }
  .search-heading > .icon {
    display: none;
  }
  #search-results strong {
    font-size: 13px;
  }
  #search-results small {
    font-size: 11px;
  }
  .search-foot {
    font-size: 9px;
    flex-wrap: wrap;
  }
  .search-foot kbd {
    font-size: 9px;
  }
  .progress-overview {
    padding: 26px 22px;
  }
  .progress-numbers {
    gap: 22px;
  }
  .progress-numbers b {
    font-size: 26px;
  }
  .footer-links {
    gap: 10px;
  }
  .footer-links a {
    font-size: 11px;
  }
}
@media (max-height: 500px) and (max-width: 1024px) {
  .sidebar {
    padding-top: 20px;
  }
  .sidebar-close {
    top: 11px;
  }
  .sidebar .workspace-label {
    margin: 22px 8px;
  }
  .sidebar-bottom {
    padding-top: 15px;
  }
  .topbar {
    position: relative;
  }
  .lab-terminal-output {
    height: 210px;
  }
  #search-results {
    max-height: 48dvh;
  }
  .search-dialog {
    max-height: calc(100dvh - 20px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar {
    transition: none;
  }
}
@media (max-width: 1024px) {
  button:not(.header-field),
  a.button {
    min-height: 44px !important;
  }
  .visual-controls select {
    min-height: 44px;
  }
  input[type="range"] {
    min-height: 44px !important;
  }
}
@media (max-width: 600px) {
  .tool-example-row {
    gap: 9px;
    flex-wrap: wrap;
  }
  .tool-example-row button {
    font-size: 12px;
    min-height: 44px;
  }
  .tool-subnet-practice form {
    flex-wrap: wrap;
    gap: 10px;
  }
  .tool-subnet-practice input {
    width: 100%;
    flex: 1 1 100%;
    min-width: 0;
  }
  .tool-subnet-practice button {
    width: 100%;
    white-space: normal;
  }
  .subnet-stats strong {
    font-size: 13px;
  }
  .subnet-map-heading {
    gap: 9px;
  }
  .subnet-map-heading > span {
    font-size: 12px;
  }
  .subnet-address small {
    font-size: 11px;
  }
  .lab-evidence-actions {
    flex-wrap: wrap;
    gap: 12px;
  }
  .lab-evidence-actions > span {
    max-width: none;
    font-size: 11px;
    line-height: 1.8;
  }
  .lab-session-actions {
    flex-wrap: wrap;
    gap: 9px;
  }
}
@media (max-width: 380px) {
  .subnet-stats {
    grid-template-columns: minmax(0, 1fr);
  }
  .subnet-address-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .subnet-stats > div {
    padding: 18px;
  }
  .subnet-stats strong {
    font-size: 14px;
  }
  .subnet-bits {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 5px;
  }
  .subnet-bits span {
    font-size: 13px;
    min-height: 33px;
  }
}

