/* SEO learning paths on the existing interactive course. Scoped to avoid changing its labs. */
.seo-paths{margin:32px 0;padding-top:24px;border-top:1px solid var(--line)}
.seo-paths>p{max-width:850px;color:var(--muted)}
.seo-paths .cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.seo-paths .card{gap:8px;padding:20px}
.seo-paths .card h3{font-size:18px;line-height:1.4;margin:0}
.seo-paths .card p{font-size:14px;flex:1;color:var(--muted)}
.seo-paths .card>a{font-weight:650}
@media(max-width:950px){.seo-paths .cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.seo-paths .cards{grid-template-columns:1fr}}
/* Standalone, search-readable learning guides. No JavaScript required. */
.learning-page{margin:0;background:#f6f7f9;color:#152b40;font:16px/1.7 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.learning-page *{box-sizing:border-box}
.learning-page a{color:#215ad7;text-underline-offset:3px}
.learning-page a:focus-visible{outline:3px solid #df7619;outline-offset:4px}
.learning-page header,.learning-page main,.learning-page footer{max-width:1020px;margin-inline:auto}
.learning-page header{display:flex;gap:16px;align-items:center;flex-wrap:wrap;padding:22px}
.learning-page header .wordmark{font-size:21px;font-weight:800;color:#152b40;text-decoration:none;margin-right:auto}
.learning-page nav{display:flex;gap:16px;flex-wrap:wrap}
.learning-page main{padding:0 20px 50px}
.learning-page .guide-hero{background:linear-gradient(130deg,#eaf0ff,#f0f7ff 70%,#e6f6ed);padding:28px;border:1px solid #d5e0ee;border-radius:18px;margin-bottom:20px}
.learning-page h1{font-size:clamp(28px,4vw,44px);line-height:1.2;letter-spacing:-.6px;margin:0 0 12px}
.learning-page h2{font-size:24px;line-height:1.3;margin:26px 0 10px}
.learning-page h3{font-size:18px;margin:18px 0 6px}
.learning-page p{margin:0 0 14px}
.learning-page .lead{font-size:18px;color:#40566d}
.learning-page .guide-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.learning-page .panel{background:white;border:1px solid #d9e0e7;border-radius:14px;padding:25px;min-width:0}
.learning-page .panel h2:first-child{margin-top:0}
.learning-page .panel p:last-child{margin-bottom:0}
.learning-page pre{background:#14283c;color:#f4f7ff;padding:18px;border-radius:10px;overflow-x:auto;font:14px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace}
.learning-page code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}
.learning-page :not(pre)>code{background:#edf2fb;padding:2px 5px;border-radius:4px}
.learning-page .cta{display:inline-block;background:#215ad7;color:white;padding:12px 18px;border-radius:9px;font-weight:700;text-decoration:none;margin:8px 8px 8px 0}
.learning-page .cta:hover{background:#1949b3}
.learning-page ul,.learning-page ol{padding-left:25px}
.learning-page li{margin-bottom:7px}
.learning-page footer{border-top:1px solid #d9e0e7;padding:24px;color:#546578}
.learning-page footer nav{margin-top:10px}
@media(max-width:650px){.learning-page .guide-grid{grid-template-columns:1fr}.learning-page .guide-hero{padding:22px}.learning-page .panel{padding:20px}}


/* Four focused, search-readable visual C tutorials. */
.learning-page .panel{margin-bottom:18px}
.learning-page .small-print{font-size:13px;color:#53647b}
.learning-page .visual-lesson{border-color:#bfcef0}
.learning-page .demo-stage{margin:18px 0;padding:22px;background:linear-gradient(120deg,#f0f5ff,#f6fbff);border:1px solid #d5e0f2;border-radius:13px;min-height:170px;display:flex;align-items:center;justify-content:center}
.learning-page .demo-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.learning-page .demo-controls button,.learning-page .demo-controls select,.learning-page .demo-controls input{font:inherit;padding:8px 12px;border:1px solid #9eb1c9;border-radius:8px;background:#fff;color:#152b40}
.learning-page .demo-controls button{font-weight:700;cursor:pointer}
.learning-page .demo-controls button:hover:not(:disabled){background:#eaf0ff}
.learning-page .demo-controls button:disabled{cursor:not-allowed;opacity:.5}
.learning-page .demo-controls button:focus-visible,.learning-page .demo-controls select:focus-visible,.learning-page .demo-controls input:focus-visible{outline:3px solid #df7619;outline-offset:2px}
.learning-page .demo-controls input{width:95px}
.learning-page .demo-status{margin-top:14px;padding:10px 12px;border-left:3px solid #215ad7;background:#f1f5fc;font-weight:600;min-height:44px}
.learning-page .trace-box{width:100%;text-align:center}
.learning-page .trace-values{display:flex;justify-content:center;align-items:stretch;gap:10px;flex-wrap:wrap;margin:12px auto}
.learning-page .trace-cell{padding:10px 16px;min-width:48px;text-align:center;border:2px dashed #b0bfd4;border-radius:8px;background:white;color:#546578}
.learning-page .trace-cell.shown{border:2px solid #215ad7;background:#dbe7ff;color:#122f58;font-weight:800}
.learning-page .array-cell{min-width:92px;padding:12px;border:2px solid #ced8e6;border-radius:12px;background:#fff;text-align:center}
.learning-page .array-cell.selected{border-color:#215ad7;background:#dbe7ff;box-shadow:0 0 0 2px #cbd9fd}
.learning-page .array-cell .cell-index{display:block;font-size:12px;color:#4e6279}
.learning-page .array-cell strong{display:block;font-size:23px}
.learning-page .pointer-diagram{display:flex;gap:15px;align-items:center;justify-content:center;flex-wrap:wrap}
.learning-page .memory-box{padding:18px;background:#fff;border:2px solid #bfd0e9;border-radius:12px;min-width:170px;text-align:center}
.learning-page .memory-box span{display:block;color:#465b73;font-size:13px}
.learning-page .memory-box strong{display:block;font-size:19px;color:#133d76;margin-top:6px;overflow-wrap:anywhere}
.learning-page .memory-box.active{border-color:#215ad7;background:#e6efff}
.learning-page .memory-arrow{font-size:30px;color:#215ad7}
.learning-page .call-stack{display:flex;align-items:center;flex-direction:column-reverse;gap:10px}
.learning-page .call-stack .memory-box{min-width:230px}
.learning-page .topic-nav{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0}
.learning-page .topic-nav a{padding:8px 12px;border:1px solid #cad7e9;border-radius:9px;background:#f2f6fd}
.learning-page details>summary{cursor:pointer;font-weight:700;color:#215ad7}
.learning-page .counter-lab{margin:20px 0;padding:18px;border:1px solid #d5e0ee;border-radius:12px;background:#f7faff}
.learning-page .counter-form{display:grid;grid-template-columns:minmax(0,1fr) minmax(120px,180px) auto;align-items:end;gap:12px;margin:16px 0}
.learning-page .counter-form[hidden]{display:none}
.learning-page .counter-form label{display:grid;gap:5px;font-weight:650}
.learning-page .counter-form input,.learning-page .counter-form button{min-width:0;padding:9px 11px;border:1px solid #9eb1c9;border-radius:8px;background:#fff;color:#152b40;font:inherit}
.learning-page .counter-form button{background:#215ad7;color:#fff;font-weight:700;cursor:pointer}
.learning-page .counter-form :is(input,button):focus-visible{outline:3px solid #df7619;outline-offset:3px}
.learning-page .counter-form button:hover{background:#1949b3}
.learning-page .counter-result,.learning-page .counter-error{padding:10px 12px;border-left:3px solid #215ad7;background:#f1f5fc}
.learning-page .counter-error{border-color:#b42318;background:#fff1f0;color:#7a1b13}
.learning-page .counter-trace{width:100%;border-collapse:collapse;margin:12px 0;text-align:left}
.learning-page .counter-trace :is(th,td){padding:8px 10px;border-bottom:1px solid #d9e0e7}
.learning-page .counter-trace th{background:#edf2fb}
@media(max-width:650px){.learning-page .counter-form{grid-template-columns:1fr}.learning-page .counter-form input{width:100%}}
@media(max-width:650px){.learning-page .demo-stage{padding:12px}.learning-page .array-cell{min-width:53px;padding:8px}.learning-page .array-cell strong{font-size:18px}.learning-page .trace-values{gap:5px}.learning-page .memory-box{min-width:130px}.learning-page .pointer-diagram{gap:6px}.learning-page .pointer-diagram .memory-arrow{font-size:22px}}

/* AI Tutor: hidden until a real, secured Cloudflare endpoint is configured. */
.ai-tutor-panel[hidden]{display:none!important}
.ai-tutor-panel{border-color:#b6c9e8}
.ai-tutor-panel form{display:grid;gap:10px;margin-top:18px}
.ai-tutor-panel textarea{display:block;width:100%;min-height:85px;resize:vertical;padding:12px;font:inherit;border:1px solid #aebdcc;border-radius:9px}
.ai-tutor-panel button{cursor:pointer;padding:9px 14px;border:1px solid #9eb1c9;border-radius:9px;background:white;color:#152b40;font-weight:700}
.ai-tutor-panel button:disabled{opacity:.5;cursor:wait}
.ai-tutor-panel :is(textarea,button):focus-visible{outline:3px solid #df7619;outline-offset:3px}
.ai-tutor-answer{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7;border-radius:10px;background:#eff5ff;margin-top:12px;padding:14px;min-height:24px}
.ai-tutor-answer:empty{display:none}

/* Private AI test controls appear only with an explicit preview URL. */
.ai-tutor-preview-controls{margin:16px 0;padding:16px;border:1px solid #a4b6d2;border-radius:12px;background:#f2f6fd}
.ai-tutor-preview-controls[hidden]{display:none!important}
.ai-tutor-preview-controls p{margin:5px 0 12px}
.ai-tutor-preview-controls input{display:block;max-width:100%;width:min(100%,480px);margin-top:8px;padding:11px;border:1px solid #8196b2;border-radius:8px;font:inherit}
.ai-tutor-preview-controls input:focus-visible{outline:3px solid #df7619;outline-offset:3px}

/* Limited-beta message, accessible controls, and small-screen affordances. */
.ai-tutor-beta-note{border-left:3px solid #245fc8;background:#eef4ff;padding:12px 14px;border-radius:8px;color:#233c58}
.ai-tutor-beta-note[hidden]{display:none!important}
.ai-tutor-beta-note a{text-decoration:underline}
.ai-tutor-panel :is(button,textarea){max-width:100%}
.ai-tutor-panel button{min-height:44px}
.ai-tutor-panel #ai-tutor-status:not(:empty){margin-top:12px;overflow-wrap:anywhere}
@media(max-width:600px){.ai-tutor-panel .demo-controls button{flex:1 1 145px}.ai-tutor-panel textarea{min-height:105px}.ai-tutor-panel form button{width:100%}}
