.routine-showcase { margin-bottom: 90px; }
.routine-heading { display:flex; justify-content:space-between; align-items:end; gap:24px; margin-bottom:20px; }
.routine-heading h2 { font-size:clamp(2rem,4.5vw,3.8rem); letter-spacing:-.055em; line-height:1.05; margin:10px 0 0; }
.routine-project-type,.routine-section-note { color:var(--muted); font-size:.8rem; max-width:250px; }
.routine-project-type { border:1px solid var(--line); border-radius:20px; padding:8px 14px; white-space:nowrap; }
.routine-lead { max-width:650px; font-size:1.1rem; color:var(--muted); }
.routine-project-links { display:flex; gap:24px; flex-wrap:wrap; margin:24px 0 32px; font-size:.85rem; color:var(--teal); }
.routine-project-links a { padding:10px 0; border-bottom:1px solid var(--line); }
.systems-lab { border:1px solid var(--line); border-radius:12px; overflow:clip; background:#121719; }
.system-picker { display:flex; gap:8px; padding:14px; border-bottom:1px solid var(--line); overflow-x:auto; }
.system-picker button { color:var(--muted); border:1px solid transparent; border-radius:6px; background:transparent; padding:12px 18px; font:inherit; font-size:.85rem; white-space:nowrap; cursor:pointer; }
.system-picker button[aria-pressed=true] { color:var(--ink); background:#27312f; border-color:#5a7a70; }
.system-workspace { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); position:relative; align-items:start; }
.system-demo { min-width:0; padding:20px; position:sticky; top:95px; }
.system-video-wrap { background:#080c0d; aspect-ratio:16/9; border-radius:6px; overflow:hidden; }
.system-demo video { width:100%; height:100%; object-fit:contain; display:block; scroll-margin-top:90px; }
.system-demo-copy { padding:20px 3px 5px; }
.system-demo-copy h3 { margin:7px 0; font-size:1.4rem; letter-spacing:-.025em; }
.system-demo-copy>p:last-child { font-size:.9rem; color:var(--muted); max-width:56ch; }
.system-code-panel { border-left:1px solid var(--line); min-width:0; }
.code-panel-heading { display:flex; align-items:center; justify-content:space-between; padding:22px; gap:12px; }
.code-panel-heading p { margin:4px 0 0; font-size:.8rem; color:var(--muted); }
.code-language { font:700 .8rem ui-monospace,monospace; color:var(--teal); padding:6px 10px; background:#25312f; border-radius:4px; }
.system-code { max-height:460px; overflow:auto; scrollbar-color:#51605c #131819; padding:0 16px 16px; }
.code-block { display:block; text-align:left; width:100%; background:#101416; border:1px solid #3b484d; border-left:3px solid var(--block-color); color:var(--ink); border-radius:6px; padding:0; margin:0 0 12px; cursor:pointer; }
.code-block:hover,.code-block[aria-expanded=true] { background:#1c2427; border-color:var(--block-color); }
.code-block-label { padding:12px; display:flex; justify-content:space-between; gap:12px; font:600 .8rem system-ui,sans-serif; color:var(--block-color); }
.code-block pre { margin:0; overflow:auto; padding:4px 12px 16px; tab-size:2; font:12px/1.7 ui-monospace,SFMono-Regular,Consolas,monospace; white-space:pre; }
.syntax-keyword { color:#b7a6ff; }.syntax-string { color:#dcd49b; }.syntax-number { color:#f4b784; }.syntax-comment { color:#9baaac; }.syntax-type { color:#79d9d3; }
.code-explanation { grid-column:1/-1; border-top:1px solid #627d75; background:#21302b; padding:25px 62px 25px 28px; position:relative; }
.code-explanation h3 { margin:7px 0 10px; }.code-explanation p:not(.eyebrow) { color:#e0e6df; max-width:85ch; font-size:.94rem; }
.code-explanation>span { color:#b4c6bd; font:12px ui-monospace,monospace; overflow-wrap:anywhere; }
#explanation-close { position:absolute; right:14px; top:14px; width:40px; height:40px; border:1px solid #7b978b; color:white; background:transparent; border-radius:50%; cursor:pointer; font-size:24px; }
.routine-vfx-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.routine-animation-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.motion-card { min-width:0; margin:0; border:1px solid var(--line); border-radius:9px; overflow:hidden; background:#161b1d; transition:border-color .15s; }
.motion-card:has(button:hover),.motion-card:has(button[aria-pressed=true]) { border-color:var(--teal); }
.motion-preview { display:block; position:relative; width:100%; border:0; padding:0; background:#080b0c; color:white; cursor:pointer; aspect-ratio:3/2; overflow:hidden; }
.motion-preview video { display:block; width:100%; height:100%; object-fit:contain; }
.vfx-card .motion-preview { aspect-ratio:1; background:#000; }
.vfx-card.study .motion-preview video { width:100%; height:100%; object-fit:contain; }
.motion-state { position:absolute; bottom:12px; left:12px; background:#0a1011e8; border:1px solid #657874; border-radius:20px; padding:5px 10px; font:600 11px/1.5 system-ui,sans-serif; letter-spacing:.04em; }
.motion-card figcaption { padding:18px; }.motion-card h3 { font-size:1.03rem; margin:5px 0; }.motion-card figcaption p { color:var(--muted); font-size:.8rem; margin:0; }
.motion-card .eyebrow { font-size:10px; letter-spacing:.11em; color:var(--teal); }
.routine-code-link { display:flex; flex-direction:column; gap:8px; padding:24px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); margin-bottom:24px; }
.routine-code-link span { font-size:.8rem; color:var(--muted); }.routine-code-link strong { color:var(--teal); font-size:1.25rem; }
@media(max-width:1000px) { .routine-vfx-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.routine-animation-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.routine-heading { align-items:start; flex-direction:column; gap:12px; }.routine-project-type { white-space:normal; } }
@media(max-width:760px) {
 .system-workspace { grid-template-columns:minmax(0,1fr); }.system-demo { position:static; padding:14px; }.system-code-panel { border-left:0; border-top:1px solid var(--line); }.system-code { max-height:330px; }.code-explanation { position:fixed; z-index:60; bottom:0; left:0; right:0; max-height:46dvh; overflow:auto; border-radius:16px 16px 0 0; box-shadow:0 -15px 80px #0009; padding:20px 60px 28px 22px; }.code-explanation h3 { font-size:1.1rem; }.routine-project-links { gap:14px; }.routine-heading h2 { font-size:2.2rem; }.routine-animation-grid { gap:12px; }.motion-card figcaption { padding:12px; }.motion-card h3 { font-size:.9rem; }.motion-card figcaption p { font-size:.75rem; }.system-picker button { padding:12px; }.routine-showcase { margin-bottom:65px; }
}
@media(max-width:440px) { .routine-animation-grid { grid-template-columns:1fr; }.routine-vfx-grid { gap:10px; }.motion-state { font-size:10px; bottom:8px; left:8px; } }
