/* First lesson only: diagrams stay readable without external assets. */
.lesson-one { --ink: #17355c; --muted: #53647b; --blue: #215eab; }
.lesson-one header p { max-width: 38em; }
.lesson-one code { white-space: nowrap; }
.lesson-one section > p { margin: 1em 0; }
.lesson-one section { padding: 28px; }
.lesson-one h2 { line-height: 1.5; }
.lesson-one h3 { line-height: 1.6; }
.lesson-one .section-step { display: block; color: var(--blue); font-size: .82em; font-weight: 650; margin-bottom: 8px; }
.lesson-one .reading-note { color: var(--muted); font-size: .9em; }
.lesson-one .lesson-intro { border-top: 4px solid #3777b8; }
.lesson-one .lesson-diagram { margin: 26px 0; }
.lesson-one figcaption { color: var(--ink); font-weight: 650; margin-bottom: 14px; font-size: .94em; }
.lesson-one .diagram-note { color: var(--muted); margin: 12px 0 0; font-size: .85em; line-height: 1.7; }
.lesson-one .folder-window { border: 1px solid #304259; border-radius: 10px; overflow: hidden; background: #17212f; color: #e7edf5; }
.lesson-one .folder-title { padding: 12px 20px; background: #243348; font-size: .9em; font-weight: 650; }
.lesson-one .folder-title > span { color: #efc66f; margin-right: 8px; }
.lesson-one .folder-files { list-style: none; padding: 12px; margin: 0; }
.lesson-one .folder-files li { display: grid; grid-template-columns: 30px 1fr 1fr; gap: 12px; align-items: center; padding: 10px 14px; margin: 3px 0; border-radius: 5px; }
.lesson-one .folder-files code { color: #f0f5fc; background: transparent; padding: 0; font-size: .95em; }
.lesson-one .folder-files li > span:last-child { font-size: .8em; color: #c3cede; text-align: right; }
.lesson-one .folder-files .active-file { background: #2b4463; }
.lesson-one .file-icon { border: 1px solid #91a5c1; border-radius: 3px; color: #c5d5ed; font: 10px/26px monospace; text-align: center; width: 26px; }
.lesson-one .snapshot-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; list-style: none; padding: 0; margin: 0; }
.lesson-one .paper { min-width: 0; border: 1px solid #c4d3e5; border-radius: 10px; padding: 16px; background: #fff; box-shadow: 0 3px 0 #e8eef6; }
.lesson-one .snapshot-row > li { position: relative; margin: 0; }
.lesson-one .snapshot-row > li:not(:last-child)::after { content: '→'; position: absolute; right: -22px; top: 44%; color: var(--blue); font-weight: 700; }
.lesson-one .paper-label { display: block; color: var(--muted); font-size: .78em; line-height: 1.6; }
.lesson-one .paper h3 { font-size: .98em; margin: 8px 0 14px; overflow-wrap: anywhere; }
.lesson-one .rule { font-size: .9em; line-height: 1.75; margin: 9px 0; padding: 7px 9px; border-radius: 5px; background: #f3f6fa; overflow-wrap: anywhere; }
.lesson-one .rule span { display: block; font-size: .8em; font-weight: 700; margin-bottom: 2px; }
.lesson-one .added { color: #18523e; background: #eaf6ef; border-left: 3px solid #348164; }
.lesson-one .removed { color: #893d33; background: #fff1ed; border-left: 3px solid #bf6556; }
.lesson-one .change-label { color: var(--muted); font-size: .78em; margin: 14px 0 0; line-height: 1.6; }
.lesson-one .computer-box { border: 2px solid #a5bdd8; border-radius: 12px; background: #f2f6fc; padding: 20px; }
.lesson-one .place-label { display: block; color: var(--ink); font-size: .85em; font-weight: 650; margin-bottom: 14px; }
.lesson-one .file-history-layout { display: grid; grid-template-columns: 1fr 1.25fr; gap: 20px; align-items: start; }
.lesson-one .history-box { min-width: 0; }
.lesson-one .history-box h3 { margin: 0 0 8px; font-size: .95em; }
.lesson-one .history-list { list-style: none; padding: 0 0 0 16px; margin: 0; border-left: 2px solid #94afce; }
.lesson-one .history-list li { position: relative; padding: 8px 12px; background: #fff; border: 1px solid #d6e1ee; border-radius: 6px; margin: 0 0 10px; font-size: .85em; }
.lesson-one .history-list li:last-child { margin-bottom: 0; }
.lesson-one .history-list li::before { content: ''; position: absolute; left: -22px; top: 20px; width: 8px; height: 8px; background: var(--blue); border-radius: 50%; }
.lesson-one .history-list strong, .lesson-one .history-list span { display: block; }
.lesson-one .history-list span { color: var(--muted); font-size: .95em; }
.lesson-one .restore-layout, .lesson-one .remote-layout { display: grid; grid-template-columns: minmax(0, 1fr) 105px minmax(0, 1fr); gap: 12px; align-items: center; }
.lesson-one .selected-rule { border: 2px solid #c79837; background: #fff8e8; }
.lesson-one .copy-direction { text-align: center; color: var(--blue); font-size: .78em; line-height: 1.7; }
.lesson-one .copy-direction > span { display: block; font-size: 2rem; line-height: 1.2; margin-bottom: 5px; }
.lesson-one .copy-direction small { font-size: .9em; }
.lesson-one .location-card { min-width: 0; text-align: center; padding: 18px 12px; border: 2px solid #afc5de; border-radius: 12px; background: #f0f5fc; }
.lesson-one .location-card h3 { margin: 0; font-size: 1.1em; }
.lesson-one .location-card p { font-size: .92em; margin: 12px 0; }
.lesson-one .location-card small { display: block; color: var(--muted); font-size: .75em; }
.lesson-one .remote-location { background: #edf7f3; border-color: #a3cbbb; }
.lesson-one .pause-check { margin-top: 22px; }
.lesson-one .walkthrough { margin: 22px 0; }
.lesson-one [hidden] { display: none !important; }
.lesson-one .demo-controls { border: 1px solid #b8cbe1; background: #f3f7fd; border-radius: 12px; padding: 18px; }
.lesson-one #demo-instructions { margin: 0 0 12px; font-size: .9em; color: var(--muted); }
.lesson-one .demo-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.lesson-one button { font: inherit; font-size: .85em; cursor: pointer; padding: 9px 12px; border: 1px solid #a4b9d4; border-radius: 7px; background: white; color: var(--ink); }
.lesson-one button:hover { border-color: var(--blue); background: #e7f0ff; }
.lesson-one button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: white; }
.lesson-one button:focus-visible { outline: 3px solid #d08b26; outline-offset: 3px; }
.lesson-one .demo-status { font-weight: 650; margin: 18px 0 12px; }
.lesson-one .demo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lesson-one .demo-place { background: white; border: 1px solid #c8d6e7; padding: 12px; border-radius: 8px; min-width: 0; }
.lesson-one .demo-place h3 { font-size: .82em; margin: 0 0 10px; }
.lesson-one .demo-place p { margin: 0; padding: 9px; font-size: .85em; line-height: 1.7; background: #f3f5f8; border-radius: 5px; }
.lesson-one .demo-place p[data-fixed="true"] { background: #eaf6ef; color: #18523e; border-left: 3px solid #348164; }
.lesson-one #demo-explanation { margin: 14px 0 0; font-size: .9em; }
.lesson-one .action-explanations { padding-left: 26px; }
.lesson-one .action-explanations > li { padding-left: 5px; margin: 22px 0; }
.lesson-one .action-explanations h3 { margin-bottom: 6px; }
.lesson-one .action-explanations p { margin: 0; }
.lesson-one .practice-question { margin: 22px 0; }
.lesson-one .practice-question h3 { font-weight: 600; }
.lesson-one .next-lesson { display: inline-block; margin: 8px 0; }
.lesson-one .references { font-size: .86em; }
@media (max-width: 700px) {
  .lesson-one section { padding: 22px 18px; }
  .lesson-one .snapshot-row, .lesson-one .file-history-layout, .lesson-one .restore-layout, .lesson-one .remote-layout { grid-template-columns: minmax(0, 1fr); }
  .lesson-one .snapshot-row > li:not(:last-child)::after { content: '↓'; left: calc(50% - 8px); right: auto; top: 100%; line-height: 24px; }
  .lesson-one .copy-direction > span { transform: rotate(90deg); margin: 0; }
  .lesson-one .copy-direction { padding: 3px 0; }
  .lesson-one .computer-box { padding: 15px; }
  .lesson-one .folder-files li { grid-template-columns: 26px 1fr; gap: 0 10px; padding: 8px; }
  .lesson-one .folder-files li > span:last-child { grid-column: 2; text-align: left; }
  .lesson-one .folder-files .file-icon { grid-row: span 2; }
  .lesson-one .demo-grid { grid-template-columns: minmax(0, 1fr); }
  .lesson-one .demo-place { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 8px; }
  .lesson-one .demo-place h3 { margin: 0; }
  .lesson-one .demo-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lesson-one .demo-controls { padding: 14px; }
}
@media print {
  .lesson-one .demo-controls { display: none; }
  .lesson-one header { background: white; color: #17355c; padding: 20px; }
  .lesson-one .tag { color: #17355c; }
  .lesson-one nav, .lesson-one footer { display: none; }
  .lesson-one .lesson-diagram, .lesson-one .practice-question { break-inside: avoid; }
}

/* Align lesson illustrations with the course's warm document surfaces. */
.lesson-one { --ink: #000; --muted: #615d59; --blue: #0075de; }
.lesson-one .lesson-intro { border-top: 1px solid #e6e6e6; }
.lesson-one .folder-window { border-color: #e6e6e6; background: #fff; color: #31302e; }
.lesson-one .folder-title { background: #f6f5f4; color: #000; border-bottom: 1px solid #e6e6e6; }
.lesson-one .folder-title > span { color: #615d59; }
.lesson-one .folder-files code { color: #000; }
.lesson-one .folder-files li > span:last-child { color: #615d59; }
.lesson-one .folder-files .active-file { background: #f6f5f4; }
.lesson-one .file-icon { border-color: #a39e98; color: #615d59; }
.lesson-one .paper { border-color: #e6e6e6; box-shadow: 0 2px 8px rgba(0,0,0,.025); }
.lesson-one .rule, .lesson-one .demo-place p { background: #f6f5f4; }
.lesson-one .added, .lesson-one .demo-place p[data-fixed="true"] { color: #18523e; background: #eaf6ef; }
.lesson-one .removed { color: #893d33; background: #fff1ed; }
.lesson-one .computer-box, .lesson-one .location-card, .lesson-one .remote-location, .lesson-one .demo-controls { border: 1px solid #e6e6e6; background: #f6f5f4; }
.lesson-one .history-list { border-color: #d8d6d3; }
.lesson-one .history-list li, .lesson-one .demo-place { border-color: #e6e6e6; }
.lesson-one .history-list li::before { background: #615d59; }
.lesson-one .selected-rule { border: 1px solid #a39e98; background: #fff; }
.lesson-one button { min-height: 44px; border-color: #e6e6e6; border-radius: 8px; color: #000; }
.lesson-one button:hover { border-color: #a39e98; background: #fff; }
.lesson-one button[aria-pressed="true"] { background: #0075de; border-color: #0075de; color: #fff; }
.lesson-one button:focus-visible { outline-color: #0075de; }

/* Monochrome course palette, shared with the rest of the lessons. */
.lesson-one { --ink: #111; --muted: #666; --blue: #111; }
.lesson-one .added, .lesson-one .removed, .lesson-one .demo-place p[data-fixed="true"] { color: #222; background: #eee; border-left-color: #555; }
.lesson-one button { background: #111; border-color: #111; color: #fff; }
.lesson-one button:hover { background: #444; border-color: #444; color: #fff; }
.lesson-one button[aria-pressed="true"] { background: #fff; border-color: #111; color: #111; }
.lesson-one button:focus-visible { outline-color: #555; }
@media print { .lesson-one header, .lesson-one .tag { color: #111; } }
