@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Noto+Sans+JP:wght@400;500;700;900&display=swap');
:root{--ink:#192d28;--muted:#66766f;--green:#1f694f;--lime:#d5edac;--bg:#f8faf4;--border:#dce4d9;--mono:'DM Mono',monospace}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font-family:'Noto Sans JP',sans-serif;font-size:15px}a{color:inherit}header{height:76px;display:flex;justify-content:space-between;align-items:center;padding:0 max(6vw,24px);border-bottom:1px solid var(--border)}.brand{text-decoration:none;font-weight:900;font-size:19px;letter-spacing:-.04em}.brand span{display:inline-grid;place-items:center;background:var(--green);color:white;border-radius:8px;width:30px;height:30px;margin-right:7px}nav{display:flex;gap:32px}nav a{text-decoration:none;font-size:13px;font-weight:700}nav a:hover,.textlink:hover{color:var(--green)}main{overflow:hidden}.hero{max-width:1300px;margin:auto;padding:110px 6vw 105px;display:grid;grid-template-columns:1.1fr .9fr;gap:60px;align-items:center}.eyebrow{font:500 11px var(--mono);letter-spacing:.15em;color:#4c8a67}.hero h1{font-size:clamp(38px,5vw,68px);line-height:1.32;letter-spacing:-.055em;margin:25px 0}.hero h1 em{font-style:normal;color:var(--green)}.hero p,.section-heading p{color:var(--muted);line-height:2}.actions{display:flex;align-items:center;gap:27px;margin-top:35px}.button{border:0;border-radius:6px;padding:16px 22px;background:var(--green);color:white;font:700 14px inherit;text-decoration:none;cursor:pointer;display:inline-flex;gap:30px;align-items:center;justify-content:center}.button:hover{background:#164f3c}.button:disabled,.secondary:disabled{opacity:.45;cursor:not-allowed}.textlink{font-size:13px;text-decoration:none;font-weight:700}.hero-card,.terminal{background:#1d302b;color:#dce8dc;border-radius:10px;box-shadow:0 25px 60px #233a291c;overflow:hidden}.hero-card{transform:rotate(2deg)}.terminal-head{height:47px;background:#263d35;display:flex;align-items:center;padding:0 18px;gap:7px}.terminal-head i{width:8px;height:8px;border-radius:50%;background:#759187}.terminal-head i:first-child{background:#db927e}.terminal-head i:nth-child(2){background:#e0bb72}.terminal-head span{font:11px var(--mono);color:#a1b5a8;margin-left:12px}.hero-code{font:14px/1.8 var(--mono);padding:35px 30px 45px;min-height:220px}.hero-code span{color:#a8d990}.hero-code small{color:#a5b8ad}.hero-code b{font:500 14px 'Noto Sans JP'}.cursor{display:inline-block;width:8px;height:16px;background:#b1dd9d;vertical-align:middle;margin-left:5px}.hero-label{background:#d9eaca;color:#426549;padding:14px 25px;font-size:12px;font-weight:700}.intro{background:#eaf1e4;padding:55px max(calc((100vw - 1150px)/2),6vw);display:grid;grid-template-columns:1fr 1.2fr .8fr;gap:40px;align-items:center}.intro h2,.section h2,.closing h2{font-size:28px;letter-spacing:-.05em;margin:12px 0}.intro p{font-size:13px;line-height:2;color:#52665b}.intro code{color:var(--green);font-family:var(--mono)}.intro-command{border-left:1px solid #c5d6c3;padding-left:25px;display:grid;gap:8px}.intro-command small,.intro-command span{font-size:11px;color:#678071}.intro-command code{font-size:19px}.section{max-width:1300px;padding:105px 6vw;margin:auto}.section-heading{display:flex;align-items:end;justify-content:space-between;margin-bottom:30px}.section-heading p{margin-bottom:0}.count{font:12px var(--mono);color:var(--muted)}.search{margin-bottom:25px}.search label{display:block;font-size:12px;font-weight:700;margin-bottom:8px}.search input{width:min(100%,420px);padding:13px 15px;border:1px solid #cbd8ca;border-radius:6px;background:white;font:inherit}.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.case{background:white;border:1px solid var(--border);border-radius:8px;padding:25px;text-align:left;cursor:pointer;color:inherit;min-height:180px;display:flex;flex-direction:column;align-items:flex-start}.case:hover{border-color:#7dac8a;transform:translateY(-2px)}.tag{font:11px var(--mono);color:var(--green);background:#edf5e9;padding:6px 9px;border-radius:4px}.case h3{font:700 16px/1.6 'Noto Sans JP';margin:18px 0 8px}.case p{font:12px/1.7 'Noto Sans JP';color:var(--muted);margin:0 0 18px}.case .arrow{margin-top:auto;margin-left:auto;color:var(--green);font-size:20px}.cheat-section{border-top:1px solid var(--border)}.compare{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:32px}.compare article{background:#eaf1e4;padding:20px;border-radius:6px}.compare b{font:500 18px var(--mono);color:var(--green)}.compare p{font-size:12px;line-height:1.8;color:#52665b}.cheat-row{display:grid;grid-template-columns:1.2fr 1fr 1.5fr;gap:20px;padding:18px 4px;border-bottom:1px solid var(--border);font-size:13px;line-height:1.7}.cheat-row code{font:13px var(--mono);color:var(--green);overflow-wrap:anywhere}.cheat-row span:last-child{color:var(--muted)}.closing{background:#dfeedd;padding:70px 6vw;text-align:center}.closing p,.sources{font-size:13px;color:#5b7263;line-height:2}.sources a{color:var(--green)}footer{padding:30px 6vw;font-weight:900}footer span{float:right;font-size:11px;font-weight:400;color:var(--muted)}dialog{width:min(1100px,94vw);max-height:90vh;border:0;border-radius:12px;padding:30px;color:var(--ink);box-shadow:0 25px 80px #0003}dialog::backdrop{background:#10251dbb}.dialog-top{display:flex;justify-content:space-between;gap:20px}.dialog-top h2{margin:8px 0;font-size:25px}.dialog-top p{color:var(--muted);font-size:13px}.close{align-self:start;background:#edf2eb;border:0;border-radius:50%;font-size:24px;width:40px;height:40px;cursor:pointer}.lesson-layout{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:25px}.state{background:#eff4ec;border:1px solid #d9e5d8;border-radius:8px;padding:20px;min-height:220px}.panel-label{font-size:12px;font-weight:700;color:#65806e}.panel-label span{float:right;font:12px var(--mono)}pre{white-space:pre-wrap;overflow-wrap:anywhere}.state pre{font:13px/1.8 var(--mono);margin:25px 0}.state p,.note,.hint{font-size:13px;line-height:1.8}.controls{display:flex;gap:8px;flex-wrap:wrap;margin-top:15px}.controls button{padding:12px 16px}.secondary{border:1px solid #cad8c9;background:white;color:var(--ink);border-radius:6px;cursor:pointer}.terminal{box-shadow:none;min-height:300px}.terminal pre{font:12px/1.8 var(--mono);padding:20px;margin:0;max-height:340px;overflow:auto}.note{background:#fff5df;border-radius:6px;padding:15px 20px;margin-top:20px;color:#725d37}.hint{color:var(--muted)}:focus-visible{outline:3px solid #79ac62;outline-offset:3px}@media(max-width:760px){header{height:auto;min-height:65px;flex-wrap:wrap;gap:12px;padding:15px 6vw}nav{gap:17px}nav a{font-size:11px}.hero{grid-template-columns:1fr;padding:65px 6vw;gap:40px}.hero-card{transform:none}.intro{grid-template-columns:1fr;gap:10px}.intro-command{border-left:0;border-top:1px solid #c5d6c3;padding:20px 0 0}.section{padding:70px 6vw}.grid{grid-template-columns:1fr 1fr}.compare{grid-template-columns:1fr 1fr}.cheat-row{grid-template-columns:1fr;gap:4px}.lesson-layout{grid-template-columns:1fr}.terminal{min-height:180px}.terminal pre{max-height:220px}.actions{flex-wrap:wrap}footer span{float:none;display:block;margin-top:10px}}@media(max-width:450px){.grid{grid-template-columns:1fr}.case{min-height:140px}}

/* 履歴の変化を出力と同じタイミングで示す。 */
.state pre.changed{animation:graph-change .55s ease-out}@keyframes graph-change{0%{opacity:.25;transform:translateX(-12px)}100%{opacity:1;transform:translateX(0)}}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.state pre.changed{animation:none}}
.graph-key{display:flex;gap:13px;flex-wrap:wrap;margin:14px 0 0;font-size:10px;color:#60776a}.graph-key span{display:flex;align-items:center;gap:4px}.graph-key i{width:10px;height:10px;border:2px solid #24704e;border-radius:50%;background:#fff}.graph-key span:nth-child(2) i{width:15px;border-radius:5px;background:#cce7c9;border:0}.graph-view{width:100%;overflow:hidden}.graph-view svg{display:block;width:100%;height:auto;min-height:150px}.graph-edge{fill:none;stroke:#77a989;stroke-width:4;stroke-linecap:round}.graph-edge.branch-edge{stroke:#d1a25c}.commit-node circle{fill:#fff;stroke:#267651;stroke-width:4}.commit-node circle.branch-node{stroke:#c18c3e}.commit-node text{font:700 15px 'DM Mono',monospace;fill:#1d4935}.ref-label rect{fill:#d5e9d0}.ref-label text{fill:#28593c;font:700 10px 'DM Mono',sans-serif}.feature-ref rect{fill:#fae5c1}.feature-ref text{fill:#835817}.remote-ref rect{fill:#dce9f3}.remote-ref text{fill:#345c7a}.head-ref rect{fill:#245f48}.head-ref text{fill:white}.tag-ref rect{fill:#eee1f2}.tag-ref text{fill:#714c79}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.state{min-height:0}.state p:not(.sr-only){margin-bottom:0}@media(max-width:450px){.graph-key{gap:8px;font-size:9px}.graph-view svg{min-height:0}}

.graph-view{overflow-x:auto}.graph-view svg{min-width:520px}.ref-label text{font-size:12px}.graph-caption{font-size:11px!important;color:#60776a;margin:0!important}.graph-view:focus-visible{outline-offset:0}

.lesson-layout>div{min-width:0}.case-filters{display:flex;gap:8px;overflow-x:auto;padding:0 0 15px;scrollbar-width:thin}.filter{white-space:nowrap;border:1px solid #cad8c9;border-radius:99px;background:white;padding:9px 15px;font:700 12px 'Noto Sans JP',sans-serif;color:#466052;cursor:pointer}.filter[aria-pressed="true"]{background:#245f48;color:white;border-color:#245f48}.case-group{margin-top:30px}.case-group>h3{font-size:15px;margin:0 0 14px;display:flex;align-items:center;gap:10px}.case-group>h3:before{content:"";width:4px;height:18px;border-radius:3px;background:#6ca779}.case h4{font:700 16px/1.6 'Noto Sans JP';margin:18px 0 8px}
.step-track{display:flex;align-items:center;gap:8px;margin-top:16px}.step-dot{width:29px;height:29px;border:1px solid #becfc0;border-radius:50%;background:#fff;color:#6b7f70;cursor:pointer;font:500 11px var(--mono)}.step-dot.done{background:#dcecdc;color:#245f48;border-color:#96bd9d}.step-dot.next{border:2px solid #287b55;color:#245f48}.step-dot:disabled{opacity:.6}.controls #play{font-weight:700}.graph-view{background:linear-gradient(#f7faf5,#eef5e9);border-radius:8px;border:1px solid #dce9db;margin-top:12px}
.reset-compare{background:#fff5df;border:1px solid #f1dfb8;border-radius:8px;padding:20px;margin:22px 0;font-size:13px;line-height:1.8;color:#725d37}.reset-compare p{margin:8px 0 0}
