/* VR1: language-aware layout and visual teaching components. */
html[lang=fa]{font-family:Vazirmatn,Inter,sans-serif}html[lang=fa] :is(h1,h2,h3,.eyebrow,.nav-label,.brand-caption,.lesson-number){letter-spacing:0}html[lang=fa] p{line-height:1.95}html[lang=fa] h1{font-size:1.85rem;line-height:1.65}html[lang=fa] h2{line-height:1.8}html[lang=fa] .content{font-size:15px}html[lang=fa] .nav-item{font-size:14px}html[lang=fa] .lesson-card p{line-height:1.9}bdi{unicode-bidi:isolate}code,pre,.formula,.code-editor{direction:ltr;unicode-bidi:isolate}textarea.code-editor{font-family:'JetBrains Mono',ui-monospace,SFMono-Regular,Consolas,monospace;text-align:left;line-height:1.8;tab-size:2}html[lang=fa] .code-editor{font-family:'JetBrains Mono',Vazirmatn,monospace}html[dir=rtl] .sidebar{inset:0 0 0 auto}html[dir=rtl] :is([data-icon=arrow],[data-icon=back],[data-icon=chevron]){transform:scaleX(-1)}html[dir=rtl] .brand-caption{margin:9px 0 40px;text-align:center}html[dir=rtl] .brand{justify-content:center}html[dir=rtl] .nav-count,html[dir=rtl] .profile-button>svg{margin-left:0;margin-right:auto}.profile-button{text-align:start}html[dir=rtl] .search-box input{padding:9px 34px 9px 42px}html[dir=rtl] .search-box>svg{right:11px;left:auto}html[dir=rtl] .search-shortcut{left:10px;right:auto}html[dir=rtl] .resume-meta{margin-left:0;margin-right:14px}html[dir=rtl] .xp-tag{margin-left:0;margin-right:10px}html[dir=rtl] .stat{border-right:0;border-left:1px solid var(--border)}html[dir=rtl] .stat:last-child{border-left:0}html[dir=rtl] .challenge-banner>.button{margin-left:0;margin-right:auto}html[dir=rtl] .quick-lab>svg{margin-left:0;margin-right:auto}html[dir=rtl] .lesson-content .lesson-section{scroll-margin-top:25px}html[dir=rtl] .toast{left:24px;right:auto}html[dir=rtl] .skip-link{left:auto;right:20px}.language-control{display:inline-flex;flex-shrink:0}.language-select{width:100px;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:8px;min-height:38px;padding:6px 10px;cursor:pointer}.level-pill{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;border:1px solid var(--border);background:var(--surface);padding:9px 13px;border-radius:30px;color:var(--purple);font-size:.82rem;line-height:1.5}.page-heading>.level-pill{align-self:center}.topbar-actions{gap:13px}.breadcrumb{white-space:nowrap}.content{max-width:1600px;margin-inline:auto}.page-footer{gap:15px;flex-wrap:wrap}.storage-status bdi{display:inline}.visual-invite{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-top:26px;padding:25px 28px;border:1px solid var(--border);border-radius:var(--radius);background:linear-gradient(125deg,var(--surface),var(--soft))}.visual-invite h2{margin-top:8px}.visual-invite p{margin:0;color:var(--muted);max-width:650px}.visual-invite>.button{flex-shrink:0}.concept-chip{position:relative;display:flex;flex-direction:column;justify-content:center;width:190px;height:180px;border:1px solid #c6bdf0;border-radius:22px;background:linear-gradient(145deg,#faf8ff,#e1d9f9);box-shadow:0 12px 28px #61528c18,inset 0 0 0 10px #ffffff60;color:#62538d;transform:rotate(-7deg);text-align:center;gap:9px}.concept-chip:before{content:'';position:absolute;inset:-13px;border:1px dashed #b6a9d4;border-radius:29px}.concept-chip>span{font-size:13px;letter-spacing:.14em}.concept-chip>strong{font-size:31px;letter-spacing:-.03em}.concept-chip>div{display:flex;gap:10px;justify-content:center;font-size:10px;font-family:monospace}.learning-guide{padding:19px 23px;background:var(--soft);border-inline-start:3px solid var(--purple);border-radius:8px;margin:22px 0}.learning-guide p{margin:12px 0 0}.learning-guide .eyebrow{color:var(--purple)}.learning-guide .guide-prompt{font-weight:550}.lab-guidance{display:flex;align-items:center;gap:20px;justify-content:space-between;margin-bottom:20px}.lab-guidance p{margin:0}.mini-experiment{border:1px solid var(--border);border-radius:12px;background:var(--bg);padding:22px;margin:28px 0;overflow:hidden}.mini-experiment .section-heading{margin-top:0}.mini-code{background:var(--sidebar);color:#e2e5f0;padding:18px;border-radius:8px;overflow:auto;line-height:1.8}.mini-machine{display:flex;gap:18px;flex-wrap:wrap;padding:14px 0;font-size:.85rem}.mini-machine code{font-size:inherit}.mini-hit-sequence{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:12px 0}.mini-hit-sequence span{padding:8px 14px;background:var(--surface);border:1px solid var(--border);border-radius:6px}.execution-visual{overflow:hidden}.visual-empty{padding:24px;color:var(--muted);background:var(--bg);border:1px dashed var(--border);border-radius:9px;line-height:1.9;margin:14px 0}.value-journey{display:flex;align-items:stretch;justify-content:center;gap:12px;flex-wrap:wrap;margin:20px 0}.value-card{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:120px;padding:14px 18px;border:1px solid var(--border);border-radius:11px;background:var(--bg);gap:7px}.value-card>strong{font-family:'JetBrains Mono',monospace;font-size:24px;line-height:1.35}.value-card>small{color:var(--muted);font-size:.83rem}.value-card>span{font-size:.75rem;color:var(--muted)}.value-card.result{background:var(--soft);border-color:#b7a7ed}.value-card.result>strong{color:var(--purple)}.value-card.immediate{border-style:dashed}.journey-arrow{align-self:center;color:var(--purple);font-size:26px;padding:0 8px}.visual-explanation{padding:13px 17px;border-radius:8px;background:var(--bg);line-height:1.8}.dataflow-figure{margin:18px 0 0}.diagram-scroll{width:100%;overflow-x:auto;padding-bottom:8px}.dataflow-svg{display:block;width:100%;min-width:690px;height:auto;max-height:520px}.flow-node{fill:var(--bg);stroke:var(--border);stroke-width:1.5}.flow-node.active{fill:var(--soft);stroke:#937dcc;stroke-width:2}.flow-label{fill:var(--text);font-size:15px;font-weight:600}.flow-value{fill:var(--muted);font-size:13px;font-family:'JetBrains Mono',monospace}.flow-wire{stroke:#b9c0d0;stroke-width:1.5;fill:none;opacity:.52}.flow-wire.active{stroke:#8b71d4;stroke-width:3;opacity:1}.flow-note{fill:var(--muted);font-size:12px}.dataflow-figure figcaption{font-size:.82rem;color:var(--muted);line-height:1.85;padding-top:10px}.register-grid{direction:ltr}.register{min-width:0}.register span{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.machine-status{gap:15px}.executed-code code{display:block;overflow-x:auto}.technical-table{max-width:100%;overflow:auto}.technical-table table{font-variant-numeric:tabular-nums}.technical-table td{font-family:'JetBrains Mono',Vazirmatn,monospace}.technical-table caption{caption-side:top;text-align:start;padding:12px 0;color:var(--muted);font-size:.82rem}.selected-cell{background:var(--soft);color:var(--purple);font-weight:700}.pipeline-editor{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(220px,1fr);gap:28px}.pipeline-editor .code-editor{min-height:160px}.pipeline-settings{padding-top:29px}.pipeline-settings p{margin:16px 0}.scrubber{padding:18px 0}.scrubber>label{display:block;font-size:.9rem;margin-bottom:12px}.scrubber-controls{display:flex;align-items:center;gap:12px}.scrubber input[type=range]{flex:1;min-width:80px;accent-color:var(--purple);height:24px}.pipeline-board{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:10px 0 22px;overflow-x:auto}.pipeline-station{display:flex;flex-direction:column;align-items:center;min-height:157px;padding:15px 10px;border:1px solid var(--border);border-radius:9px;background:var(--bg);text-align:center;gap:8px}.pipeline-station.IF{border-top:3px solid #9a82d7}.pipeline-station.ID{border-top:3px solid #5793c3}.pipeline-station.EX{border-top:3px solid #d7a251}.pipeline-station.MEM{border-top:3px solid #6b9f7a}.pipeline-station.WB{border-top:3px solid #be84b4}.stage-name{font-weight:700;font-size:17px}.station-label{font-size:.75rem;color:var(--muted)}.station-instruction{font-family:'JetBrains Mono',monospace;font-size:10px;line-height:1.8;overflow-wrap:anywhere;margin-top:6px}.station-state,.station-empty{font-size:.7rem;color:var(--muted);line-height:1.5}.station-empty{margin:auto}.pipeline-station.waiting{background:#fff5e1;border-color:#d7a251}.pipeline-station.waiting .station-state{color:#805822}.pipeline-legend{display:flex;gap:15px;flex-wrap:wrap;font-size:.75rem;color:var(--muted);margin-bottom:12px}.pipeline-table th,.pipeline-table td{min-width:44px}.pipeline-table tbody th{position:sticky;left:0;background:var(--surface);z-index:1;font-family:'JetBrains Mono',monospace;font-size:11px;font-weight:500;white-space:nowrap}.pipeline-table .selected-cycle{background:var(--soft);box-shadow:inset 1px 0 #cbbfea,inset -1px 0 #cbbfea}.pipeline-table .stage-cell{min-width:30px;padding:5px;font-size:10px}.pipeline-table .stall{font-family:inherit}.cache-controls-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px;padding-top:18px}.cache-config{display:flex;align-items:start;gap:15px;flex-wrap:wrap}.cache-config>label{flex:1;min-width:90px}.cache-config select{width:100%;height:40px;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:7px;padding:5px}.address-title{font-size:.85rem;margin:8px 0 14px}.address-bits{display:grid;grid-template-columns:minmax(0,4fr) minmax(70px,1fr) minmax(85px,1fr);gap:4px;margin-bottom:20px}.bit-segment{display:flex;flex-direction:column;justify-content:center;gap:9px;text-align:center;padding:17px 9px;background:var(--soft);border:1px solid #cfc5ed;border-radius:7px}.bit-segment.index{background:#edf5fd;border-color:#c8ddeb}.bit-segment.offset{background:#edf7e9;border-color:#c9dfbd}.bit-segment code{font-size:13px;letter-spacing:.06em;overflow-wrap:anywhere}.bit-segment span{font-size:.77rem;color:#555a68}.cache-map{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:12px;margin:22px 0}.cache-map-set{border:1px solid var(--border);border-radius:10px;padding:12px;background:var(--bg)}.cache-map-set.selected{border-color:var(--purple);box-shadow:0 0 0 1px var(--purple)}.cache-set-label{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;font-size:.82rem;font-weight:600}.cache-set-label>span{font-size:.7rem;color:var(--purple)}.cache-block{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-height:92px;padding:13px 5px;margin-top:8px;border:1px dashed var(--border);border-radius:6px;background:var(--surface)}.cache-block strong{direction:ltr;font-size:12px}.cache-block code{font-size:12px}.cache-block small,.cache-block>span{font-size:.71rem;color:var(--muted)}.cache-block.touched{background:var(--soft);border:1px solid #b9a5e1}.selected-access{background:var(--soft)}.future-access{color:var(--muted)}.formula{background:var(--bg);border-radius:8px;padding:16px;font-family:'JetBrains Mono',monospace;font-size:12px;line-height:1.9;overflow-x:auto}.settings-row{gap:16px}.settings-row>div:first-child{flex:1}.settings-row .level-pill{white-space:normal;min-width:94px}.settings-row p bdi{font-family:inherit}.form-field{display:block;margin:15px 0}.modal-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:20px}.modal-head h2{margin:0}.modal-head .icon-button{flex-shrink:0}#modal[data-kind=onboarding]{width:min(760px,calc(100vw - 32px));max-width:760px}.onboarding-intro{display:flex;align-items:start;gap:22px}.onboarding-intro p{color:var(--muted);font-size:.93rem;line-height:1.9}.level-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;border:0;padding:0;margin:10px 0 20px;min-width:0}.level-option{position:relative;display:flex;flex-direction:column;align-items:start;gap:11px;border:1px solid var(--border);border-radius:12px;padding:21px 18px;cursor:pointer;background:var(--surface);text-align:start;min-width:0}.level-option input{position:absolute;inset-inline-end:14px;top:18px;accent-color:var(--purple);width:17px;height:17px}.level-option:has(input:checked){background:var(--soft);border-color:var(--purple);box-shadow:0 0 0 1px var(--purple)}.level-option-icon{color:var(--purple);padding:8px;background:var(--bg);border-radius:9px;margin-bottom:6px}.level-option strong{font-size:1.05rem}.level-option>span:not(.level-option-icon){font-size:.85rem}.level-option small{color:var(--muted);font-size:.79rem;line-height:1.9}.search-result{width:100%;display:flex;align-items:center;justify-content:space-between;padding:15px 10px;border:0;border-bottom:1px solid var(--border);background:var(--surface);text-align:start;gap:15px}.search-result:hover{background:var(--soft)}.search-result strong{display:block;font-size:.9rem}.search-result small{display:block;font-size:.76rem;color:var(--muted);margin-top:6px}.search-result svg{color:var(--purple)}.instruction-help{line-height:1.9}.instruction-help summary{cursor:pointer;padding:12px 0}.learning-grid,.challenge-grid,.settings-grid,.lab-grid,.progress-grid{min-width:0}.panel,.lesson-card,.challenge-card{min-width:0}.button{line-height:1.5}.button-row{flex-wrap:wrap}.page-heading>div{min-width:0}.lesson-outline button{text-align:start}.mini-experiment .pipeline-board{grid-template-columns:repeat(5,minmax(85px,1fr))}.onboarding-intro .language-control{margin-top:5px}.notice p:last-child{margin-bottom:0}.topbar select option{color:var(--text);background:var(--surface)}
[data-theme=dark] .concept-chip{background:linear-gradient(145deg,#3d3559,#28223d);border-color:#675783;color:#e4d4ff;box-shadow:inset 0 0 0 10px #ffffff08}[data-theme=dark] .pipeline-station.waiting{background:#403523;color:#f5dab0}[data-theme=dark] .pipeline-station.waiting .station-state{color:#f5dab0}[data-theme=dark] .bit-segment{background:#332c4c;border-color:#665c84}[data-theme=dark] .bit-segment.index{background:#243547;border-color:#465d75}[data-theme=dark] .bit-segment.offset{background:#2b3c2b;border-color:#516c4a}[data-theme=dark] .bit-segment span{color:#ccd0da}
@media(max-width:1200px){.topbar{padding-inline:28px;gap:16px}.topbar-actions{gap:10px}.search-box input{width:200px}.processor-visual{transform:scale(.83);transform-origin:center}.continue-card{gap:18px}.station-instruction{font-size:9px}.cache-controls-row{gap:18px}.visual-invite{padding:22px}}
@media(max-width:1000px){.breadcrumb>span,.breadcrumb>svg{display:none}.topbar .search-box{display:none}.lab-grid{grid-template-columns:minmax(0,1fr)}.pipeline-editor{grid-template-columns:minmax(0,1fr)}.pipeline-settings{padding-top:0}.cache-controls-row{grid-template-columns:minmax(0,1fr)}.value-card{min-width:105px;padding:13px}.visual-invite{align-items:start}.visual-invite p{font-size:.85rem}.processor-visual{display:none}.settings-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:800px){html[dir=rtl] .sidebar{transform:translateX(100%)}.sidebar{visibility:hidden}.sidebar.open{visibility:visible}html[dir=rtl] .sidebar.open{transform:translateX(0)}.app-layout{display:block}.shell{width:100%}.topbar{padding-inline:20px}.content{padding:26px 20px}.topbar-actions{gap:10px}.breadcrumb{margin-inline-end:auto}.pipeline-station{min-width:108px}.pipeline-board{grid-template-columns:repeat(5,minmax(108px,1fr))}.visual-invite{flex-direction:column;gap:16px}.language-select{width:91px}.pipeline-editor .code-editor{min-height:170px}.level-pill{font-size:.78rem}.page-heading h1{font-size:1.65rem}.page-heading{gap:12px}.processor-visual{display:block}.continue-card{gap:5px}.concept-chip{width:154px;height:147px}.concept-chip>strong{font-size:26px}.learning-guide{padding:17px 18px}.station-instruction{font-size:9px}}
@media(max-width:540px){html[lang=fa] h1{font-size:1.55rem}.content{padding:22px 15px}.topbar{padding-inline:15px;height:69px;gap:10px}.topbar-actions{gap:8px}.topbar-actions>.avatar{display:none}.breadcrumb{font-size:.78rem;white-space:normal}.language-select{width:86px;min-height:36px;font-size:.8rem}.topbar-actions .icon-button{width:32px;height:34px}.page-heading{flex-wrap:wrap;align-items:start}.page-heading>.level-pill{align-self:start}.processor-visual{display:none}.continue-card{padding:24px}.stat{padding:15px 10px;gap:10px}.stats-row{grid-template-columns:1fr 1fr}.stat:nth-child(2){border-inline-end:0}.stat strong{font-size:1.4rem}.stat small{font-size:.71rem}.panel{padding:18px}.lab-guidance{align-items:start;gap:12px;flex-direction:column}.tab-bar{overflow-x:auto;white-space:nowrap}.tab-bar a{flex-shrink:0}.panel-head{gap:12px;flex-wrap:wrap}.panel-head select{max-width:190px}.register-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.register{padding:11px}.register span{font-size:12px}.machine-status{flex-wrap:wrap;gap:16px}.machine-status>div{min-width:72px}.value-journey{gap:8px}.value-card{min-width:90px;padding:12px 8px}.value-card>strong{font-size:20px}.value-card>span{font-size:.7rem}.journey-arrow{padding:0 2px}.scrubber-controls{gap:7px;flex-wrap:wrap}.scrubber-controls input{flex-basis:100px}.scrubber .button{font-size:.72rem;padding:8px 9px}.address-bits{grid-template-columns:minmax(0,1fr) 58px 70px;gap:3px}.bit-segment{padding:13px 6px}.bit-segment code{font-size:10px;letter-spacing:0}.bit-segment span{font-size:.65rem;line-height:1.8}.cache-map{grid-template-columns:repeat(2,minmax(0,1fr))}.cache-config{gap:8px}.cache-config>label{min-width:75px}.cache-config .field-label{font-size:.72rem}.cache-config select{font-size:.8rem}.mini-experiment{padding:15px}.mini-experiment .section-heading{align-items:start;gap:10px}.mini-experiment .section-heading h2{font-size:1.05rem}.onboarding-intro{gap:13px}.onboarding-intro p{font-size:.86rem}.level-options{grid-template-columns:minmax(0,1fr);gap:10px}.level-option{display:grid;grid-template-columns:42px minmax(0,1fr);padding:14px 17px;gap:4px 14px}.level-option-icon{grid-row:1/4;margin:0;padding:8px;align-self:center}.level-option strong{font-size:.95rem;padding-inline-end:23px}.level-option>span:not(.level-option-icon){font-size:.78rem}.level-option small{grid-column:2;font-size:.75rem;line-height:1.8}.level-option input{top:16px}#modal[data-kind=onboarding]{width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:22px 18px}.onboarding-intro .language-select{width:83px}.modal-head{margin-bottom:14px}.modal-head h2{font-size:1.2rem}.settings-row .level-pill{max-width:125px}.page-footer{font-size:.68rem}.toast{max-width:calc(100vw - 30px)}html[dir=rtl] .toast{left:15px}.challenge-banner{flex-wrap:wrap}.challenge-banner>.button{margin-inline:0!important}.diagram-scroll{border:1px solid var(--border);border-radius:6px}.dataflow-svg{min-width:710px}.execution-visual .panel-head{gap:8px}.execution-visual .badge{font-size:.65rem}}

html[dir=rtl] .toast{left:50%;right:auto;transform:translateX(-50%)}
@media(max-width:800px){.mobile-toggle{display:inline-grid;z-index:31}.sidebar{width:240px;transition:transform .2s}}
