:root{--paper:#f8f7f1;--ink:#1c4136;--muted:#607368;--line:#d9e0d5;--green:#e5eddf;--gold:#f0ddb0;--red:#a34e37;--dock:76px;--board:330px;color-scheme:light;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--paper)}
*{box-sizing:border-box}html{scroll-padding-top:72px;scroll-padding-bottom:calc(var(--dock) + 24px)}body{margin:0;padding-bottom:calc(var(--dock) + 28px);line-height:1.55}a{color:inherit;text-underline-offset:4px}button,select,summary{font:inherit}button,summary,select{cursor:pointer}a,button,select,summary{-webkit-tap-highlight-color:transparent}:focus-visible{outline:3px solid #a47730;outline-offset:4px}h1,h2,h3,p,figure{margin:0}button{color:inherit}.sr-only,.skip:not(:focus){position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.skip:focus{position:fixed;left:12px;top:8px;z-index:100;background:white;padding:12px}.site-header{height:64px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 max(24px,calc((100% - 1120px)/2));position:sticky;top:0;z-index:30;background:var(--paper)}.brand{display:flex;align-items:center;gap:10px;font-weight:750;font-size:17px;letter-spacing:-.04em;text-decoration:none}.brand-grid{font-size:30px;line-height:1;color:var(--paper);background:var(--ink);padding:1px 5px;border-radius:7px}.site-menu{position:relative}.site-menu summary{list-style:none;display:flex;align-items:center;gap:12px;min-height:44px;padding:8px 12px;border:1px solid var(--line);border-radius:7px;font-size:13px}.site-menu summary::-webkit-details-marker{display:none}.site-menu summary span{font-size:15px}.site-menu nav{position:absolute;inset-inline-end:0;top:51px;width:260px;background:var(--paper);border:1px solid var(--line);box-shadow:0 12px 30px #1c413615;padding:10px;border-radius:8px;max-height:calc(100svh - 150px);overflow-y:auto;overscroll-behavior:contain}.site-menu nav a{display:block;padding:12px;font-size:14px;text-decoration:none;border-radius:4px}.site-menu nav a:hover{background:var(--green)}main,.site-footer{max-width:1120px;margin:auto;padding-inline:24px}.utility{display:flex;justify-content:space-between;gap:12px;align-items:center;padding-block:18px 4px;font-size:12px;color:var(--muted)}.utility>a{text-decoration:none;min-height:34px;display:flex;align-items:center}.language-label select{color:var(--ink);border:0;background:transparent;min-height:34px;max-width:140px;font-size:12px;padding:4px}.hero{display:grid;grid-template-columns:1fr 1fr;gap:64px;align-items:center;padding-block:22px 48px}.eyebrow{font-size:10px;font-weight:650;letter-spacing:.12em;color:var(--muted);line-height:1.6}.intro h1{font-family:Georgia,"Times New Roman",serif;font-weight:400;letter-spacing:-.055em;font-size:clamp(48px,5.5vw,76px);line-height:1.04;margin:18px 0 22px;overflow-wrap:break-word}.intro .lead{font-size:21px;line-height:1.45;max-width:390px}.definition{font-size:15px;line-height:1.75;color:var(--muted);max-width:430px;margin-top:22px}.text-link{display:inline-flex;align-items:center;min-height:44px;font-size:13px;margin-top:18px}.demo-card{background:#eaf0e5;border:1px solid #cdd9c8;border-radius:12px;padding:14px 18px 8px;position:relative;min-width:0;scroll-margin-top:78px}.demo-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:8px;min-height:26px}.demo-head h2{font-size:16px;font-weight:650;line-height:1.2}.scene-count{font-size:10px;letter-spacing:.05em;white-space:nowrap;color:var(--muted);font-variant-numeric:tabular-nums}.demo-figure{margin:0}.board-wrap{position:relative;width:calc(var(--board) + 14px);padding:14px 0 0 14px;margin:0 auto;direction:ltr}.axis-x{position:absolute;left:14px;right:0;top:0;display:grid;grid-template-columns:repeat(9,1fr);text-align:center}.axis-y{position:absolute;left:0;top:14px;bottom:0;width:14px;display:grid;grid-template-rows:repeat(9,1fr);align-items:center}.axis-x span,.axis-y span{font-size:8px;line-height:12px;color:#6a7c6a}.sudoku-grid{width:var(--board);height:var(--board);table-layout:fixed;border-collapse:collapse;text-align:center;background:#fffdf7;border:2px solid #52725e;font-variant-numeric:tabular-nums}.sudoku-grid tr{height:11.1111%}.sudoku-grid td{padding:0;width:11.1111%;height:11.1111%;position:relative;border:1px solid #dde2d7;transition:background-color .35s;color:#234b3e}.sudoku-grid td:nth-child(3n){border-right:2px solid #52725e}.sudoku-grid tr:nth-child(3n) td{border-bottom:2px solid #52725e}.given{position:absolute;inset:0;display:grid;place-items:center;font-size:calc(var(--board)/17);opacity:.68;font-weight:500}.notes{position:absolute;inset:1px;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);font-size:calc(var(--board)/29);line-height:1;color:#62765b}.notes>span{display:flex;align-items:center;justify-content:center}.sudoku-grid td.line-band{background:#dfe9d8}.sudoku-grid td.box-band{background:#e5e8ce}.sudoku-grid td.line-band.box-band{background:#d3e0c5}.sudoku-grid td.focus{background:var(--gold);box-shadow:inset 0 0 0 1.5px #aa8a48;z-index:1}.sudoku-grid td.focus .notes{color:#654a1b;font-weight:750;font-size:calc(var(--board)/25)}.sudoku-grid td.focus:after{content:'';position:absolute;inset:1px;border:1px solid #b08c45;pointer-events:none}.sudoku-grid td.has-removal{background:#f4e3d7}.notes .removed{color:var(--red);text-decoration:line-through;text-decoration-thickness:1.5px;font-weight:700}.notes .just-removed{animation:cross-note .45s ease-out both}.candidate-equation{display:flex;align-items:center;justify-content:center;gap:7px;min-height:32px;margin-top:4px;font-size:12px;letter-spacing:.02em;font-variant-numeric:tabular-nums}.candidate-equation b{font-weight:550;color:#685328}.candidate-equation strong{font-weight:650;border:1px solid #b7c6aa;padding:1px 7px;border-radius:4px;background:#f9faf2}.candidate-equation[data-emphasis=true] strong{background:var(--gold);border-color:#c5a66a}.demo-figure figcaption{font-size:14px;line-height:1.45;min-height:var(--caption-height,62px);max-width:420px;text-align:center;margin:auto;display:flex;align-items:center;justify-content:center;padding-block:3px}.caption-probe{position:absolute;visibility:hidden;pointer-events:none;left:18px;right:18px;top:0;font-size:14px;line-height:1.45;text-align:center;max-width:420px;margin:auto}.demo-controls{display:flex;align-items:center;gap:12px;min-height:44px;margin-top:1px}.scene-progress{display:flex;flex:1;gap:12px;align-items:center;min-width:0}.scene-progress>span{flex:1;position:relative;padding-top:7px;font-size:10px;color:#7d8f77;line-height:1.2;min-width:0}.scene-progress>span:before{content:'';position:absolute;top:0;inset-inline:0;height:3px;background:#cbd7c3;border-radius:3px}.scene-progress i{position:absolute;top:0;inset-inline:0;height:3px;background:#5c8056;transform:scaleX(0);transform-origin:left;border-radius:3px}.scene-progress .current{color:#294e36;font-weight:650}#pause{border:0;border-radius:5px;background:transparent;min-width:44px;min-height:44px;padding:0;display:grid;place-items:center}#pause svg{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}.demo-card[data-playback]:not([data-playback=playing]) *{animation-play-state:paused!important}.why-section,.examples-section,.compare-section,.next-section{padding-block:42px;border-top:1px solid var(--line);scroll-margin-top:82px}.section-heading{margin-bottom:28px}.section-heading h2,.next-section h2{font-family:Georgia,"Times New Roman",serif;font-size:34px;line-height:1.2;font-weight:400;letter-spacing:-.025em}.section-heading .eyebrow{margin-bottom:8px}.section-heading p{margin-top:12px;font-size:14px;line-height:1.7;color:var(--muted);max-width:700px}.mobile-definition{display:none}.rule-cards,.differences{display:grid;grid-template-columns:repeat(3,1fr);gap:36px}.rule-number{font-size:11px;display:block;color:#8d9e80;margin-bottom:12px}.rule-cards h3,.differences h3{font-size:17px;line-height:1.4;font-weight:600;margin-bottom:9px}.rule-cards p,.differences p{font-size:14px;line-height:1.75;color:var(--muted)}.static-examples{border-block:1px solid var(--line)}.static-examples>summary{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:60px;padding:14px 0;font-size:15px;list-style:none}.static-examples>summary::-webkit-details-marker{display:none}.static-examples[open]>summary>span{transform:rotate(45deg)}.course-example{display:grid;grid-template-columns:1fr 1fr;gap:45px;padding-block:30px;border-top:1px solid var(--line)}.course-example h3{font-size:24px;line-height:1.3;margin:6px 0 18px;font-weight:500}.course-example figure{align-self:center}.course-example img{display:block;width:100%;height:auto;border:1px solid #c7d2c1;border-radius:4px}.course-example figcaption{font-size:12px;color:var(--muted);margin-top:10px}.step-list{list-style:none;padding:0;margin:0}.step-list li{display:flex;gap:16px;margin-bottom:18px}.step-list li>span{font-size:10px;color:#85977a;padding-top:4px}.step-list h3{font-size:14px;font-family:inherit;font-weight:650;margin:0 0 4px}.step-list p{font-size:13px;line-height:1.65;color:var(--muted)}.differences a{text-decoration-thickness:1px}.next-section{display:grid;grid-template-columns:1.2fr 1fr;gap:60px;align-items:center}.next-section h2{margin:9px 0 12px;max-width:460px}.next-section p:not(.eyebrow){font-size:14px;color:var(--muted);max-width:460px;margin-bottom:22px}.next-section nav a{padding-block:14px;display:flex;justify-content:space-between;border-bottom:1px solid var(--line);font-size:14px;text-decoration:none}.button{display:inline-flex;align-items:center;justify-content:center;gap:16px;min-height:46px;background:var(--ink);color:var(--paper);border-radius:5px;text-decoration:none;padding:11px 16px;font-size:14px;font-weight:550;line-height:1.35}.button:hover{background:#2d5a45}.site-footer{border-top:1px solid var(--line);padding-block:28px 32px;font-size:12px;color:var(--muted)}.site-footer>div,.site-footer nav{display:flex;flex-wrap:wrap;gap:8px 26px}.site-footer a{display:inline-flex;align-items:center;min-height:44px}.site-footer nav{border-top:1px solid var(--line);margin-top:12px;padding-top:10px}.site-footer [aria-current]{font-weight:700;color:var(--ink)}.site-footer>p{margin-top:16px}.download-dock{position:fixed;inset:auto 0 0;z-index:25;background:var(--paper);border-top:1px solid #c5d2be;box-shadow:0 -4px 24px #1c413608;padding:10px max(24px,calc((100% - 1072px)/2)) max(10px,env(safe-area-inset-bottom,0px))}.dock-inner{display:flex;align-items:center;justify-content:space-between;gap:12px;max-width:1072px;margin:auto}.dock-inner>div{min-width:0}.dock-inner strong,.dock-inner>div span{display:block}.dock-inner strong{font-size:14px;font-weight:650;line-height:1.4}.dock-inner>div span{font-size:11px;color:var(--muted);margin-top:2px;line-height:1.4}.download-dock.is-hidden{visibility:hidden;pointer-events:none}.download-dock .button{flex-shrink:0;max-width:65%}
@keyframes cross-note{from{opacity:.2;transform:scale(1.4)}to{opacity:1;transform:scale(1)}}
@media(max-width:800px){.hero{gap:28px}.intro h1{font-size:48px}.intro .lead{font-size:18px}.rule-cards,.differences{gap:22px}}
@media(max-width:650px){.site-header{height:52px;padding-inline:16px}.brand{font-size:15px}.brand-grid{font-size:25px}.site-menu summary{min-height:40px;padding:7px 10px;font-size:12px}.site-menu nav{top:45px}.utility{padding-block:4px 0;min-height:36px;font-size:11px}.utility>a,.language-label select{min-height:36px;font-size:11px}.language-label select{max-width:120px}main,.site-footer{padding-inline:16px}.hero{grid-template-columns:minmax(0,1fr);gap:8px;padding-block:4px 28px}.intro>.eyebrow,.intro>.definition,.intro>.lead,.intro>.text-link{display:none}.intro h1{font-family:inherit;font-weight:600;font-size:27px;letter-spacing:-.035em;margin:0;line-height:1.15}.demo-card{padding:10px 12px 4px;border-radius:9px;scroll-margin-top:60px}.demo-head{min-height:20px;margin-bottom:3px}.demo-head h2{font-size:14px}.scene-count{font-size:9px}.board-wrap{padding-top:12px;padding-left:12px;width:calc(var(--board) + 12px)}.axis-x{left:12px}.axis-y{top:12px;width:12px}.axis-x span,.axis-y span{font-size:7px;line-height:10px}.candidate-equation{min-height:26px;margin-top:3px;font-size:11px;gap:6px}.candidate-equation strong{padding-inline:5px}.demo-figure figcaption,.caption-probe{font-size:13px;line-height:1.4}.demo-figure figcaption{min-height:var(--caption-height,54px);padding-block:2px}.caption-probe{left:12px;right:12px}.demo-controls{margin:0;min-height:40px;gap:8px}.scene-progress{gap:10px}.scene-progress>span{font-size:9px}.mobile-definition{display:block}.why-section,.examples-section,.compare-section,.next-section{padding-block:28px;scroll-margin-top:66px}.section-heading{margin-bottom:22px}.section-heading h2,.next-section h2{font-family:inherit;font-size:25px;letter-spacing:-.03em;font-weight:500}.section-heading .eyebrow{font-size:9px}.rule-cards,.differences{grid-template-columns:1fr;gap:22px}.rule-cards article{position:relative;padding-inline-start:30px}.rule-number{position:absolute;inset-inline-start:0;top:3px}.rule-cards h3,.differences h3{font-size:16px;margin-bottom:5px}.rule-cards p,.differences p{font-size:14px;line-height:1.7}.static-examples>summary{font-size:14px}.course-example{grid-template-columns:minmax(0,1fr);gap:12px;padding-block:22px}.course-example figure{grid-row:1}.course-example h3{font-size:21px}.next-section{grid-template-columns:1fr;gap:24px}.download-dock{padding:8px 16px max(8px,env(safe-area-inset-bottom,0px))}.download-dock .button{min-height:44px;font-size:12px;padding:8px 12px;gap:8px}.dock-inner strong{font-size:12px}.dock-inner>div span{font-size:10px}.site-footer{padding-block:20px 24px}.site-footer>div{gap:0 18px}.given{font-size:calc(var(--board)/16)}.notes{font-size:calc(var(--board)/29)}.sudoku-grid td.focus .notes{font-size:calc(var(--board)/25)}}
@media(max-width:360px){.intro h1{font-size:24px}.dock-inner strong{font-size:11px}.dock-inner>div span{font-size:9px}.download-dock .button{font-size:11px;padding-inline:10px;gap:5px}.candidate-equation{gap:4px;font-size:10px}.demo-head h2{font-size:13px}.demo-figure figcaption,.caption-probe{font-size:12px}.brand{font-size:14px}}
@media(min-width:651px) and (max-height:500px){.site-header{height:48px}.utility{padding-block:0}.hero{padding-top:6px;padding-bottom:20px;gap:26px}.intro h1{font-size:40px;margin-block:8px 12px}.intro .lead{font-size:16px}.intro .definition,.intro .text-link,.intro>.eyebrow{display:none}.demo-card{padding:8px 12px 4px}.demo-head{min-height:20px;margin-bottom:2px}.demo-head h2{font-size:13px}.demo-figure{display:grid;grid-template-columns:auto 1fr;gap:0 12px;align-items:center}.board-wrap{grid-row:1/3}.candidate-equation{grid-column:2;flex-wrap:wrap;align-self:end;gap:4px;font-size:10px;margin-bottom:6px}.demo-figure figcaption{grid-column:2;text-align:left;font-size:12px;align-self:start;min-height:var(--caption-height,70px)}.caption-probe{font-size:12px;left:auto;width:calc(100% - var(--board) - 50px)}.demo-controls{min-height:36px}.scene-progress>span{font-size:9px}.download-dock{padding-top:6px;padding-bottom:max(6px,env(safe-area-inset-bottom,0px))}.download-dock .button{min-height:44px;padding-block:7px}.dock-inner strong{font-size:12px}.dock-inner>div span{font-size:10px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
/* In a short landscape window, keep the explanation beside the complete board. */
@media(min-width:651px) and (max-height:500px){.hero{grid-template-columns:minmax(120px,.45fr) minmax(0,1.55fr)}.intro h1{font-size:32px}.intro .lead{font-size:14px}.demo-card{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:12px}.demo-head{grid-column:2;grid-row:1;align-self:start}.demo-figure{display:contents}.board-wrap{grid-column:1;grid-row:1/5}.candidate-equation{grid-column:2;grid-row:2;margin:0;align-self:center}.demo-figure figcaption{grid-column:2;grid-row:3;align-self:center;min-height:0}.demo-controls{grid-column:2;grid-row:4;align-self:end}.scene-progress{gap:6px}.scene-progress>span{font-size:8px}}

.brand-logo{width:30px;height:30px;display:block;border-radius:7px}@media(max-width:650px){.brand-logo{width:28px;height:28px}}

/* Keep numeric teaching diagrams stable while the surrounding Arabic text is RTL. */
.candidate-equation,.scene-progress{direction:ltr}.scene-progress>span{unicode-bidi:plaintext}.demo-head h2{min-width:0;overflow-wrap:break-word}.scene-progress>span{overflow-wrap:break-word}
html[dir=rtl] .demo-figure figcaption{text-align:center}html[dir=rtl] .candidate-equation{unicode-bidi:isolate}html[dir=rtl] .step-list li>span{direction:ltr}
@media(min-width:651px) and (max-height:500px){html[dir=rtl] .demo-figure figcaption{text-align:start}}
/* Compact browser windows retain the entire demonstration above the download dock. */
@media(max-width:650px) and (max-height:520px){.site-header{height:44px}.brand{font-size:14px}.brand-logo{width:24px;height:24px}.site-menu summary{min-height:36px;padding-block:5px}.utility,.utility>a,.language-label select{min-height:30px}.utility{padding:0}.hero{padding-top:2px;gap:6px}.intro h1{font-size:22px;line-height:1.1}.demo-card{padding:8px 10px 4px}.demo-head{min-height:20px;padding-inline-end:38px}.scene-count{display:none}.demo-figure figcaption,.caption-probe{font-size:12px;line-height:1.35}.caption-probe{inset-inline:10px}.candidate-equation{min-height:24px;margin-top:2px}.demo-controls{min-height:8px;height:8px;margin-top:4px}.scene-progress>span{font-size:0;padding-top:3px;line-height:1}.demo-controls #pause{position:absolute;top:0;inset-inline-end:2px;min-height:44px;min-width:44px}.demo-controls #pause svg{width:16px;height:16px}}

/* A schematic condition check, separate from the unchanged real puzzle data. */
.pair-check{margin-bottom:32px;padding:22px;background:#eceee3;border-radius:8px}.pair-check>h3{font-size:16px;font-weight:600;margin-bottom:18px}.pair-check-grid{display:grid;grid-template-columns:1fr 1fr;gap:28px}.pair-check figure{margin:0}.pair-symbols{display:flex;align-items:center;gap:10px;margin-bottom:12px;direction:ltr}.pair-symbols b{display:flex;align-items:center;justify-content:center;white-space:nowrap;min-width:68px;min-height:58px;border:1px solid #b49a62;border-radius:5px;background:var(--gold);font-size:17px;letter-spacing:.03em;font-weight:550}.pair-symbols>span{font-size:24px;color:#3a6c4b}.pair-symbols.invalid b{background:#f6eee5;border-color:#cbb6a5}.pair-symbols em{font-style:normal;color:var(--red)}.pair-symbols.invalid>span{color:var(--red)}.pair-check figcaption{font-size:13px;color:var(--muted);line-height:1.7}.pair-check figcaption strong{font-weight:600;color:var(--ink)}
@media(max-width:650px){.pair-check{padding:18px;margin-bottom:24px}.pair-check-grid{grid-template-columns:1fr;gap:24px}.pair-symbols{gap:10px}.pair-symbols b{min-width:68px;min-height:55px;font-size:16px}}

/* The candidate strip stays readable while the full grid fits above the dock. */
.candidate-equation{font-size:15px;gap:10px}.candidate-equation b{font-weight:650}.rule-cards,.differences{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:650px){.candidate-equation{font-size:13px;gap:8px}.rule-cards,.differences{grid-template-columns:1fr}}
@media(max-width:360px){.candidate-equation{font-size:12px;gap:6px}}
@media(min-width:651px) and (max-height:500px){.candidate-equation{font-size:12px;gap:5px}}
@media(max-width:650px) and (max-height:520px){.candidate-equation{font-size:12px;gap:6px}}
