@layer base, layout, components, responsive;

@layer base {
  :root {
    --bg: #f5f7f6; --surface: #fff; --ink: #20382f; --muted: #687a72;
    --green: #176f59; --green-dark: #105741; --mint: #c2f7d8; --mint-light: #eaf6ef;
    --border: #dfe7e2; --canvas: #132b25; --canvas-muted: #a2beb0; --canvas-line: #405e52;
    --blue: #9bd5ff; --purple: #ddbbff; --red: #a93333; --radius: 16px;
    font-family: Inter, "Segoe UI", Arial, sans-serif; color: var(--ink); background: var(--bg);
    font-synthesis: none; text-rendering: optimizeLegibility;
  }
  * { box-sizing: border-box; }
  body { margin: 0; font-size: 14px; line-height: 1.6; }
  button, a, summary { -webkit-tap-highlight-color: transparent; }
  button { font: inherit; cursor: pointer; }
  button:disabled { cursor: default; opacity: .5; }
  button, a, summary { transition: background .18s, color .18s, border-color .18s; }
  a { color: inherit; }
  button:focus-visible, a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid #328366; outline-offset: 4px; }
  [tabindex="-1"]:focus { outline: none; }
  h1, h2, p { margin: 0; }
  h1, h2 { line-height: 1.2; text-wrap: balance; }
  .icon { width: 19px; height: 19px; flex-shrink: 0; vertical-align: middle; }
  .skip-link { position: fixed; top: -80px; left: 16px; z-index: 20; background: white; padding: 12px 18px; }
  .skip-link:focus { top: 12px; }
  ::selection { background: var(--mint); color: var(--ink); }
}

@layer layout {
  #app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100dvh; }
  .sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 32px 20px 20px; position: sticky; height: 100dvh; top: 0; display: flex; flex-direction: column; }
  .page { min-width: 0; }
  .topbar { height: 75px; padding: 0 40px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); background: #ffffff70; }
  main { max-width: 1500px; margin: auto; padding: 32px 40px 24px; }
  .workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
  .below-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; margin-top: 24px; }
}

@layer components {
  .brand { display: grid; grid-template-columns: 38px 1fr; grid-template-rows: 28px 17px; gap: 0 10px; align-items: center; text-decoration: none; margin: 0 12px 42px; }
  .brand img { grid-row: span 2; }
  .brand > span:not(.brand-tag) { font-size: 34px; line-height: 1; font-weight: 750; letter-spacing: -2px; }
  .brand-dot { color: var(--green); }
  .brand-tag { font-size: 11px; color: var(--muted); letter-spacing: .1px; }
  .course-label { display: flex; justify-content: space-between; margin: 0 12px 16px; font-size: 10px; font-weight: 750; letter-spacing: 1.7px; color: var(--muted); }
  .course-label > span { color: #687a72; letter-spacing: 0; }
  .course-intro { padding: 0 12px 26px; }
  .course-intro h2 { font-size: 18px; line-height: 1.5; letter-spacing: -.5px; }
  .course-intro p { font-size: 11px; color: var(--muted); margin-top: 8px; }
  .modules { display: grid; gap: 8px; }
  .module { min-height: 72px; padding: 12px 10px; border-radius: 10px; display: flex; align-items: center; gap: 10px; text-decoration: none; border: 1px solid transparent; }
  .module:hover { background: var(--bg); }
  .module.selected { background: var(--mint-light); border-color: #c5e2d2; }
  .module-num { display: grid; place-items: center; width: 29px; height: 29px; flex-shrink: 0; font: 12px ui-monospace, monospace; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); background: white; }
  .module.selected .module-num, .module.complete .module-num { color: white; background: var(--green); border-color: var(--green); }
  .module-num .icon { width: 16px; }
  .module strong { font-size: 12px; font-weight: 650; display: block; }
  .module.selected strong { color: var(--green-dark); }
  .module small { display: block; font-size: 10px; margin-top: 4px; color: var(--muted); }
  .module-arrow { margin-left: auto; color: var(--green); font-size: 20px; opacity: 0; }
  .module.selected .module-arrow { opacity: 1; }
  .sidebar-bottom { margin-top: auto; padding: 35px 12px 0; }
  .course-progress-label { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 10px; }
  .course-progress-label strong { font: 11px ui-monospace, monospace; color: var(--green); }
  progress { width: 100%; height: 5px; border: 0; border-radius: 10px; background: var(--border); display: block; overflow: hidden; accent-color: var(--green); }
  progress::-webkit-progress-bar { background: var(--border); }
  progress::-webkit-progress-value { background: var(--green); border-radius: 10px; }
  progress::-moz-progress-bar { background: var(--green); }
  .sidebar-bottom p { font-size: 11px; color: var(--muted); margin-top: 10px; }
  .local-note { font-size: 10px; color: var(--muted); padding-top: 25px; margin-top: 25px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 7px; }
  .local-note .icon { width: 14px; }
  .topbar > span { font-size: 10px; font-weight: 600; letter-spacing: 1.4px; color: var(--muted); }
  .topbar strong { font-size: 12px; font-weight: 500; letter-spacing: 0; color: #52675c; }
  .topbar-divider { padding: 0 18px; color: #8da296; }
  .text-button { background: transparent; border: 0; color: var(--muted); padding: 8px 2px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; font-size: 11px; font-weight: 550; }
  .text-button:not(:disabled):hover { color: var(--green); }
  .topbar .text-button { font-size: 12px; }
  .lesson-topline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
  .eyebrow { font-size: 10px; letter-spacing: 1.35px; line-height: 1.5; font-weight: 750; color: var(--green); }
  .eyebrow > span { margin-left: 5px; color: #70877b; font-weight: 500; }
  .time { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); }
  .time .icon { width: 14px; }
  .lesson-title-row { display: flex; gap: 20px; justify-content: space-between; align-items: start; margin-bottom: 28px; }
  h1 { font-size: clamp(27px, 2.7vw, 39px); font-weight: 700; letter-spacing: -1.6px; }
  .intro { max-width: 650px; color: var(--muted); margin-top: 13px; line-height: 1.85; font-size: 13px; }
  .visual-badge { flex-shrink: 0; display: flex; gap: 7px; align-items: center; padding: 5px 10px; margin-top: 5px; font-size: 10px; border: 1px solid var(--border); border-radius: 100px; background: white; color: #5e7367; }
  .visual-badge > span { width: 5px; height: 5px; border-radius: 100%; background: var(--green); }
  .visual-panel { background: white; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: 0 3px 10px #15382703; }
  .canvas-top { display: flex; align-items: center; justify-content: space-between; color: #ecf7ef; background: var(--canvas); padding: 19px 22px 0; }
  .canvas-top > div { display: flex; align-items: center; gap: 9px; }
  .canvas-top strong { font-size: 12px; font-weight: 550; }
  .live-dot { width: 6px; height: 6px; background: #bcf8d6; border-radius: 50%; box-shadow: 0 0 0 4px #bcf8d60b; }
  .canvas-subtitle { color: #aac2b4; font-size: 8px; border-left: 1px solid #365247; padding-left: 10px; letter-spacing: 1px; }
  .device-count { color: #b5cabc; font: 10px ui-monospace, monospace; }
  .network-wrap { background-color: var(--canvas); background-image: radial-gradient(#608b6e25 .7px, transparent .7px); background-size: 17px 17px; }
  .network { width: 100%; display: block; overflow: visible; }
  .network-group { fill: #afc9b9; font: 10px ui-monospace, monospace; letter-spacing: 1.8px; }
  .network-edge { stroke: #648475; stroke-width: 1.8; stroke-dasharray: 5 6; fill: none; transition: stroke .4s; }
  .network-edge.connected { stroke: #729e85; stroke-width: 2; stroke-dasharray: none; }
  .network-edge.connecting { stroke-dasharray: 1; animation: draw-connection .7s ease-out; }
  @keyframes draw-connection { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
  .network-edge.carrying { stroke: #d0ffdf; stroke-width: 3.5; }
  .network-edge.broken { stroke: #d17e7e; stroke-dasharray: 4 8; }
  .edge-label-bg { fill: #132b25; }
  .edge-label { fill: #c5dacd; font: 11px ui-monospace, monospace; }
  .edge-label.broken-label { fill: #ffb6b6; }
  .device { color: #bdd0c4; cursor: pointer; }
  .device-shadow { fill: #091d1640; }
  .device-card { fill: #1c362c; stroke: #506f5f; stroke-width: 1; transition: stroke .2s, fill .2s; }
  .device:hover .device-card, .selected-device .device-card { fill: #244334; stroke: #b0ebc6; }
  .device:focus-visible { outline: none; }
  .device:focus-visible .device-card { stroke: #fff; stroke-width: 3; }
  .device-icon-bg { fill: #345243; }
  .device-status { fill: #98a99e; }
  .device.ready .device-status { fill: #bbf9d0; }
  .device.ready { color: #c0f2cf; }
  .device-name { fill: #f0faf3; font: 650 14px Inter, "Segoe UI", sans-serif; letter-spacing: -.3px; }
  .device-ip { fill: #bdcfc2; font: 11px ui-monospace, monospace; }
  .logical-session { stroke: #9bd5ff; stroke-width: 1.3; stroke-dasharray: 5 5; fill: none; }
  .session-label { fill: #9bd5ff; font: 10px ui-monospace, monospace; }
  .packet { color: #c5ffdb; }
  .packet.blue { color: var(--blue); }
  .packet.purple { color: var(--purple); }
  .packet-halo { fill: currentColor; opacity: .12; }
  .packet-body { fill: #102a23; stroke: currentColor; stroke-width: 1.5; }
  #packet-text { fill: currentColor; font: 700 10px ui-monospace, monospace; }
  .canvas-legend { display: flex; justify-content: center; gap: 23px; padding: 5px 10px 19px; color: #c0d1c5; font-size: 9px; }
  .canvas-legend > span { display: flex; align-items: center; gap: 7px; }
  .legend-line { width: 16px; border-top: 2px solid #8fb89d; }
  .legend-line.pending { border-top: 2px dashed #a6b7ac; }
  .legend-packet { width: 5px; height: 5px; background: var(--mint); border-radius: 50%; box-shadow: 0 0 0 3px #c2f7d820; }
  .playback-bar { padding: 4px 19px; background: #fbfcfb; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
  .playback-bar .icon { width: 14px; }
  .playback-actions { display: flex; gap: 14px; }
  .playback-actions .skip { font-size: 10px; }
  .explanation { margin: 21px 22px 0; display: flex; gap: 12px; min-height: 94px; }
  .explanation-mark { width: 32px; height: 32px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center; background: var(--mint-light); color: var(--green); }
  .explanation .eyebrow { letter-spacing: .7px; font-size: 9px; }
  .explanation p { font-size: 12px; color: #52695b; line-height: 1.8; margin-top: 5px; }
  .hop-list { padding: 0; margin: 5px 22px 20px; list-style: none; display: grid; gap: 7px; }
  .hop-list:empty { display: none; }
  .hop-list li { display: flex; align-items: start; gap: 9px; font-size: 11px; color: #62776b; padding: 7px 9px; border: 1px solid transparent; border-radius: 8px; }
  .hop-list li > span { flex-shrink: 0; font: 9px/18px ui-monospace, monospace; width: 18px; text-align: center; border: 1px solid var(--border); border-radius: 50%; }
  .hop-list li.active { background: var(--mint-light); border-color: #c9e2d1; color: var(--green-dark); }
  .hop-list li.passed > span { background: var(--green); color: white; border-color: var(--green); }
  .node-detail { display: flex; align-items: start; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--border); background: #fcfdfc; }
  .node-detail-icon { color: #6e8276; padding-top: 2px; }
  .node-detail strong { font-size: 11px; font-weight: 650; }
  .node-detail p { color: #65796c; font-size: 11px; margin-top: 3px; line-height: 1.7; }
  .node-detail-label { margin-left: auto; flex-shrink: 0; font-size: 7px; letter-spacing: 1px; line-height: 1.9; color: #5d7567; padding-top: 4px; }
  .visual-footnote { font-size: 9px; color: #738579; border-top: 1px solid var(--border); padding: 0 20px; display: flex; justify-content: space-between; align-items: center; }
  .visual-footnote .text-button { font-size: 9px; }
  .step-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 25px 23px 0; }
  .step-card-heading .eyebrow { font-size: 8px; letter-spacing: 1.1px; }
  .step-card h2 { font-size: 23px; letter-spacing: -.8px; margin-top: 10px; }
  .step-card-heading p { font-size: 12px; color: var(--muted); margin-top: 12px; line-height: 1.8; }
  .stages { margin: 27px 0 25px; padding: 0; list-style: none; }
  .stages li { display: flex; gap: 12px; position: relative; padding: 0 0 28px; }
  .stages li:last-child { padding-bottom: 0; }
  .stages li:not(:last-child)::after { content: ''; position: absolute; left: 13px; top: 30px; width: 1px; height: calc(100% - 33px); background: var(--border); }
  .stage-number { width: 27px; height: 27px; flex-shrink: 0; display: grid; place-items: center; font: 11px ui-monospace, monospace; border: 1px solid var(--border); border-radius: 50%; color: #74877b; }
  .stage-number .icon { width: 14px; }
  .stages strong { font-size: 12px; font-weight: 550; color: #6c7d72; }
  .stages small { display: block; margin-top: 3px; color: #738579; font-size: 10px; }
  .stages .current strong { color: var(--ink); font-weight: 650; }
  .stages .current .stage-number { background: var(--green); color: white; border-color: var(--green); box-shadow: 0 0 0 4px #176f590b; }
  .stages .done strong { color: var(--green); }
  .stages .done .stage-number { background: var(--mint-light); color: var(--green); border-color: #c9e2d1; }
  .next-action { background: #f4f8f5; border: 1px solid #e1eae3; padding: 16px; border-radius: 11px; margin-top: 22px; }
  .small-label { font-size: 8px; font-weight: 750; color: var(--green); letter-spacing: 1px; }
  .next-action p { font-size: 11px; line-height: 1.85; color: #52695b; margin: 10px 0 18px; }
  .primary-button { background: var(--green); color: white; border: 1px solid var(--green); border-radius: 8px; min-height: 46px; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 13px; font-size: 11px; font-weight: 600; text-align: left; }
  .primary-button:hover:not(:disabled) { background: var(--green-dark); }
  .primary-button .icon { width: 16px; }
  .step-card-footer { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; margin-top: 10px; color: #6d8173; font-size: 9px; }
  .step-card-footer .text-button { font-size: 9px; }
  .concept-card, .quiz-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 25px; }
  .concept-card h2, .quiz-card h2 { font-size: 21px; margin-top: 12px; line-height: 1.4; letter-spacing: -.6px; }
  .concept-card > p, .quiz-card > p { color: var(--muted); font-size: 12px; line-height: 1.9; margin-top: 13px; }
  .tags { display: flex; gap: 7px; flex-wrap: wrap; margin: 18px 0 22px; }
  .tags span { font: 9px ui-monospace, monospace; background: #f2f6f3; border: 1px solid var(--border); border-radius: 5px; padding: 6px 8px; color: #4f6b59; }
  details { border-top: 1px solid var(--border); }
  summary { display: flex; align-items: center; justify-content: space-between; padding: 15px 0 0; cursor: pointer; font-size: 11px; color: var(--green); min-height: 44px; }
  summary::-webkit-details-marker { display: none; }
  summary .icon { width: 14px; }
  details[open] summary .icon { transform: rotate(90deg); }
  pre { padding: 14px; white-space: pre-wrap; overflow-wrap: anywhere; background: #f3f6f4; border-radius: 8px; color: #395645; font: 11px/1.9 ui-monospace, monospace; }
  .quiz-card { background: #eff5ee; border-color: #dbe5d8; position: relative; }
  .quiz-heading { display: flex; justify-content: space-between; align-items: start; }
  .quiz-symbol { width: 26px; height: 26px; border: 1px solid #b6cbb4; border-radius: 50%; display: grid; place-items: center; font-size: 15px; color: #5d7b57; }
  .quiz-wait { display: inline-flex; margin-top: 22px; background: #e2eddf; color: #56704e; padding: 5px 11px; border-radius: 6px; font-size: 10px; }
  .answers { display: grid; gap: 8px; margin-top: 18px; }
  .answer { display: flex; align-items: center; text-align: left; gap: 9px; min-height: 46px; border: 1px solid #ccdcca; background: #ffffff80; color: #3c5743; border-radius: 8px; font-size: 11px; padding: 10px; }
  .answer > span { font: 9px ui-monospace, monospace; border: 1px solid #c4d5c0; padding: 4px 6px; border-radius: 4px; flex-shrink: 0; }
  .answer .icon { width: 15px; margin-left: auto; }
  .answer:hover { background: white; border-color: #78a983; }
  .answer.correct { background: #d9f2df; border-color: #538d60; }
  .answer.incorrect { border-color: #bb6666; background: #fff1ee; }
  .quiz-card .answer-feedback { color: #913b32; font-size: 11px; padding: 10px 0 0; }
  .quiz-card .answer-feedback.success { color: #285f38; }
  .quiz-card .quiz-hint { font-size: 10px; }
  .lesson-footer { border-top: 1px solid var(--border); margin-top: 28px; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
  .lesson-footer > span { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 11px; }
  .lesson-footer > span .icon { width: 14px; color: var(--green); }
  .next-module, .outline-button { border: 1px solid #bad1c1; background: white; border-radius: 8px; padding: 11px 14px; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; color: var(--green); font-size: 11px; font-weight: 600; }
  .next-module:hover:not(:disabled), .outline-button:hover { background: var(--mint-light); border-color: var(--green); }
  .next-module .icon { width: 15px; }
  .sources { display: flex; align-items: center; justify-content: space-between; margin-top: 25px; color: #708277; font-size: 9px; gap: 16px; }
  .sources .text-button { font-size: 9px; flex-shrink: 0; }
  .sources .icon { width: 13px; }
  .experiment { display: flex; gap: 16px; justify-content: space-between; align-items: center; padding: 18px 22px; border-top: 1px solid var(--border); background: #f7fbf7; }
  .experiment strong { font-size: 12px; }
  .experiment p { font-size: 11px; color: var(--muted); margin-top: 3px; }
  .experiment .outline-button { font-size: 10px; flex-shrink: 0; }
  dialog { max-width: 560px; width: calc(100% - 36px); max-height: calc(100dvh - 60px); overflow-y: auto; border: 1px solid var(--border); border-radius: 20px; padding: 36px; color: var(--ink); box-shadow: 0 20px 100px #09251930; }
  dialog::backdrop { background: #0d271c77; backdrop-filter: blur(3px); }
  .dialog-close { position: absolute; right: 10px; top: 8px; background: none; border: none; font-size: 27px; color: var(--muted); width: 44px; height: 44px; }
  dialog h2 { font-size: 29px; letter-spacing: -1px; margin: 12px 0 18px; }
  dialog p { font-size: 13px; color: #5e7565; line-height: 1.9; }
  dialog ul { padding: 0; margin: 24px 0; list-style: none; }
  dialog a { display: flex; align-items: center; justify-content: space-between; min-height: 48px; font-size: 13px; color: var(--green); text-decoration: none; border-bottom: 1px solid var(--border); }
  .help-steps { padding-left: 20px; margin: 24px 0; display: grid; gap: 18px; }
  .help-steps strong { font-size: 13px; }
  .help-steps p { margin-top: 4px; font-size: 12px; }
  dialog .fine-print { font-size: 11px; border-top: 1px solid var(--border); padding-top: 16px; }
}

@layer responsive {
  @media (min-width: 1550px) { .network-wrap { padding-top: 18px; } .canvas-legend { padding-bottom: 24px; } .step-card { padding: 28px 25px 0; } }
  @media (max-width: 1200px) and (min-width: 761px) {
    #app { grid-template-columns: 208px minmax(0, 1fr); }
    .sidebar { padding-inline: 12px; }
    main { padding-inline: 25px; }
    .topbar { padding-inline: 25px; }
    .workspace-grid { grid-template-columns: minmax(0, 1fr); }
    .step-card { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
    .step-card-heading { grid-column: 1; }
    .stages { grid-column: 1; grid-row: 2 / 4; }
    .next-action { grid-column: 2; grid-row: 1 / 3; margin-top: 0; margin-bottom: 20px; align-self: center; }
    .step-card-footer { grid-column: 2; grid-row: 3; margin-top: 0; }
    .stages li { padding-bottom: 20px; }
    .canvas-subtitle { font-size: 9px; }
  }
  @media (max-width: 760px) {
    #app { display: block; }
    .sidebar { position: static; height: auto; padding: 18px 18px 0; border-right: 0; border-bottom: 1px solid var(--border); }
    .brand { margin: 0 0 18px; grid-template-columns: 34px 1fr; width: max-content; }
    .brand img { width: 34px; height: 34px; }
    .brand > span:not(.brand-tag) { font-size: 30px; }
    .course-label, .course-intro, .sidebar-bottom { display: none; }
    .modules { display: flex; overflow-x: auto; gap: 7px; padding-bottom: 13px; scrollbar-width: thin; }
    .module { min-width: 164px; min-height: 61px; padding: 9px; gap: 8px; }
    .module-num { width: 25px; height: 25px; font-size: 10px; }
    .module strong { font-size: 11px; }
    .module small { font-size: 9px; }
    .module-arrow { display: none; }
    .topbar { height: 56px; padding-inline: 20px; }
    .topbar > span { font-size: 9px; letter-spacing: .9px; }
    .topbar strong { display: none; }
    .topbar-divider { display: none; }
    .topbar .text-button { font-size: 11px; }
    main { padding: 25px 17px 20px; }
    .lesson-title-row { margin-bottom: 24px; }
    h1 { font-size: 30px; letter-spacing: -1.1px; }
    .intro { font-size: 13px; line-height: 1.9; }
    .visual-badge { display: none; }
    .workspace-grid, .below-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .canvas-top { padding: 19px 18px 0; }
    .canvas-subtitle { display: none; }
    .network-group { font-size: 9px; letter-spacing: .9px; }
    .canvas-legend { font-size: 8px; gap: 16px; padding-bottom: 22px; }
    .device-ip { font-size: 11.5px; }
    .playback-bar { padding: 3px 14px; flex-wrap: wrap; }
    .playback-bar .text-button { font-size: 10px; }
    .playback-actions { gap: 12px; }
    .playback-actions .skip { font-size: 9px; }
    .explanation { margin: 20px 16px 16px; min-height: auto; }
    .explanation p { font-size: 12px; }
    .explanation .eyebrow { font-size: 9px; }
    .hop-list { margin-inline: 16px; }
    .node-detail { padding: 16px; }
    .node-detail-label { display: none; }
    .node-detail p { font-size: 11px; }
    .visual-footnote { padding-inline: 15px; font-size: 8px; }
    .step-card { padding: 25px 22px 0; }
    .step-card h2 { font-size: 25px; }
    .step-card-heading p, .next-action p { font-size: 13px; }
    .stages strong { font-size: 13px; }
    .stages small { font-size: 11px; }
    .primary-button { font-size: 12px; }
    .step-card-footer { font-size: 10px; }
    .step-card-footer .text-button { font-size: 10px; }
    .concept-card, .quiz-card { padding: 23px; }
    .concept-card > p, .quiz-card > p { font-size: 13px; }
    .answer { font-size: 12px; }
    .lesson-footer { align-items: stretch; flex-direction: column; gap: 14px; }
    .lesson-footer > span { font-size: 12px; }
    .next-module { font-size: 12px; }
    .sources { align-items: start; font-size: 9px; }
    .sources .text-button { padding-top: 0; min-height: 44px; }
    .experiment { align-items: stretch; flex-direction: column; padding: 20px 16px; }
    dialog { padding: 28px 23px; }
  }
  @media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
}
