/* ============ PeakDSA: cozy, clean, pastel ============ */
:root {
  --bg: #fff8ee; --bg2: #fdf1e1; --card: #ffffff; --ink: #23233a; --ink2: #5b5b72; --ink3: #9898ab;
  --line: #efe3d1; --pink: #ffd6e3; --mint: #cff3e2; --lav: #e7defe; --butter: #fff0b5; --sky: #d8eaff; --peach: #ffe1cc;
  --pinkD: #ff6fa3; --mintD: #22b07a; --lavD: #8a6cff; --butterD: #e3a400; --skyD: #3d8bff; --red: #ef4f5f;
  --r: 18px; --r2: 26px; --shadow: 0 2px 0 rgba(35, 35, 58, .06), 0 10px 30px -12px rgba(35, 35, 58, .18);
  --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; --sans: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); color: var(--ink); background: var(--bg); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
img { max-width: 100%; display: block; }
code, pre, .mono { font-family: var(--mono); font-size: .88em; }
code { background: #f6eee2; padding: .08em .38em; border-radius: 6px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 900; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 900; }
h3 { font-size: 1.15rem; font-weight: 800; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; cursor: pointer; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink2); }
.tiny { font-size: .82rem; }
.center { text-align: center; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.hide { display: none !important; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 999px; font-weight: 800; text-decoration: none; transition: transform .12s, box-shadow .12s, background .12s; box-shadow: 0 3px 0 #000; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #000; }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: 0 0 0 2px var(--ink) inset, 0 3px 0 var(--ink); }
.btn.soft { background: var(--lav); color: var(--ink); box-shadow: 0 3px 0 #c9bbf6; }
.btn.green { background: var(--mintD); box-shadow: 0 3px 0 #13784f; }
.btn.small { padding: 7px 14px; font-size: .9rem; }
.btn[disabled] { opacity: .5; cursor: default; transform: none; }
.chipbtn { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: .9rem; transition: .12s; }
.chipbtn:hover { border-color: var(--ink3); }
.chipbtn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.seg { display: inline-flex; background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: .88rem; }
.seg button.on { background: var(--ink); color: #fff; }

/* ---- top nav ---- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 248, 238, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 900; font-size: 1.3rem; letter-spacing: -.02em; }
.logo img { width: 38px; height: 38px; object-fit: contain; }
.logo span b { color: var(--lavD); }
.navlinks { display: flex; gap: 4px; flex: 1; }
.navlinks a { text-decoration: none; padding: 8px 13px; border-radius: 999px; font-weight: 800; color: var(--ink2); font-size: .95rem; }
.navlinks a:hover { background: #fff; color: var(--ink); }
.navlinks a.on { background: var(--ink); color: #fff; }
.xp-pill { display: flex; align-items: center; gap: 8px; background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 5px 12px 5px 6px; font-weight: 800; font-size: .88rem; text-decoration: none; }
.xp-pill .lv { background: var(--butter); border-radius: 999px; padding: 2px 9px; }
.burger { display: none; border: 0; background: #fff; border-radius: 12px; width: 42px; height: 42px; font-size: 1.3rem; box-shadow: 0 0 0 2px var(--line) inset; }
@media (max-width: 980px) {
  .navlinks { position: fixed; inset: 64px 0 auto 0; background: var(--bg); flex-direction: column; padding: 12px 16px 20px; border-bottom: 1px solid var(--line); display: none; }
  .navlinks.open { display: flex; }
  .navlinks a { padding: 12px 16px; font-size: 1.05rem; }
  .burger { display: block; margin-left: auto; }
  .nav .wrap { gap: 10px; }
}
@media (max-width: 420px) { .xp-pill .xpn { display: none; } }

/* ---- generic cards ---- */
main { min-height: calc(100vh - 64px); padding-bottom: 60px; }
.card { background: var(--card); border-radius: var(--r2); box-shadow: var(--shadow); padding: 22px; border: 1px solid #f3e9db; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.tile { display: flex; flex-direction: column; text-decoration: none; background: #fff; border-radius: var(--r2); overflow: hidden; box-shadow: var(--shadow); border: 1px solid #f3e9db; transition: transform .15s, box-shadow .15s; position: relative; }
.tile:hover { transform: translateY(-3px); box-shadow: 0 2px 0 rgba(35, 35, 58, .06), 0 18px 40px -14px rgba(35, 35, 58, .28); }
.tile .art { aspect-ratio: 16/10; background: var(--bg2); overflow: hidden; }
.tile .art img { width: 100%; height: 100%; object-fit: cover; }
.tile .body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.tile .body p { margin: 0; color: var(--ink2); font-size: .95rem; }
.tile .done-badge { position: absolute; top: 12px; right: 12px; background: var(--mintD); color: #fff; font-weight: 800; font-size: .78rem; padding: 3px 10px; border-radius: 999px; }
.tag { display: inline-block; font-size: .76rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--lav); }
.tag.Easy, .tag.easy { background: var(--mint); color: #11704a; }
.tag.Medium, .tag.medium { background: var(--butter); color: #8a5b00; }
.tag.Hard, .tag.hard { background: var(--pink); color: #b0204e; }
.bg-pink { background: var(--pink); } .bg-mint { background: var(--mint); } .bg-lav { background: var(--lav); } .bg-butter { background: var(--butter); } .bg-sky { background: var(--sky); } .bg-peach { background: var(--peach); }

/* ---- page header ---- */
.phead { padding: 36px 0 22px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.phead .txt { flex: 1; min-width: 260px; }
.phead img { width: 150px; height: 150px; object-fit: cover; border-radius: 28px; box-shadow: var(--shadow); }
.phead p { color: var(--ink2); font-size: 1.08rem; max-width: 720px; }
.crumb { font-weight: 800; color: var(--ink3); text-decoration: none; font-size: .92rem; display: inline-block; margin-bottom: 8px; }
.crumb:hover { color: var(--ink); }

/* ---- home ---- */
.hero { position: relative; padding: 30px 0 10px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 20px; align-items: center; }
.hero h1 span { background: linear-gradient(120deg, var(--pinkD), var(--lavD) 60%, var(--skyD)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 1.2rem; color: var(--ink2); max-width: 560px; }
.hero .art img { width: 100%; border-radius: 30px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 14px; }
.stats { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 12px; }
.stats div { font-weight: 800; } .stats b { display: block; font-size: 1.6rem; font-weight: 900; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } .hero .art { order: -1; } }
.feature { padding: 22px; border-radius: var(--r2); }
.feature h3 { margin-bottom: 6px; }
.feature p { margin: 0; color: var(--ink2); }
.feature .em { font-size: 2rem; }
.section { padding: 34px 0 6px; }
.section > .wrap > h2 { margin-bottom: 4px; }
.section > .wrap > p.muted { margin-bottom: 18px; }
.steps3 { counter-reset: s; }
.steps3 .feature { position: relative; padding-top: 44px; }
.steps3 .feature::before { counter-increment: s; content: counter(s); position: absolute; top: 14px; left: 22px; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 900; display: grid; place-items: center; font-size: .9rem; }

/* ---- toast ---- */
.toasts { position: fixed; bottom: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 16px; font-weight: 800; box-shadow: var(--shadow); animation: pop .3s ease; }
@keyframes pop { from { transform: translateY(12px) scale(.95); opacity: 0; } }

/* ---- loading ---- */
.pyload { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .88rem; color: var(--ink2); }
.pyload i { width: 10px; height: 10px; border-radius: 50%; background: var(--ink3); }
.pyload.loading i { background: var(--butterD); animation: blink 1s infinite; }
.pyload.ready i { background: var(--mintD); }
.pyload.error i { background: var(--red); }
@keyframes blink { 50% { opacity: .3; } }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ THEATER (code + visual) ============ */
.theater { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); grid-template-areas: "left right" "ctrl ctrl"; gap: 14px; }
.th-left { grid-area: left; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.th-right { grid-area: right; background: #fff; border-radius: var(--r2); box-shadow: var(--shadow); padding: 14px; min-width: 0; min-height: 420px; max-height: 78vh; overflow: auto; border: 1px solid #f3e9db; }
.th-controls { grid-area: ctrl; background: #fff; border-radius: var(--r2); box-shadow: var(--shadow); padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; position: sticky; bottom: 10px; z-index: 5; border: 1px solid #f3e9db; }
.th-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: .85rem; color: var(--ink2); font-weight: 700; flex-wrap: wrap; }
.pill-lbl { background: var(--bg2); border-radius: 999px; padding: 3px 12px; font-weight: 800; color: var(--ink); }
.glow-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--butter); box-shadow: 0 0 0 3px #ffe58a; vertical-align: middle; }
.codeview { background: #1f1f33; color: #e9e7ff; border-radius: var(--r2); padding: 12px 0; font-family: var(--mono); font-size: 14px; line-height: 1.75; max-height: 52vh; overflow: auto; box-shadow: var(--shadow); }
.cl { display: flex; align-items: flex-start; padding: 0 12px 0 0; border-left: 4px solid transparent; position: relative; white-space: pre; }
.cl .ln { width: 38px; text-align: right; color: #6f6f92; padding-right: 8px; flex: none; user-select: none; }
.cl .hits { width: 30px; flex: none; color: #ffcf5c; font-size: 11px; opacity: .9; padding-top: 2px; user-select: none; }
.cl .ct { flex: 1; min-width: 0; }
.cl .nmark { font-size: 11px; opacity: .65; padding-left: 6px; }
.cl.cur { background: rgba(255, 214, 102, .2); border-left-color: #ffd166; }
.cl.cur .ln { color: #ffd166; font-weight: 800; }
.cl.cur::after { content: '◀ now'; position: absolute; right: 10px; color: #ffd166; font-size: 11px; font-weight: 700; font-family: var(--sans); }
.cl.ret { background: rgba(124, 240, 190, .16); border-left-color: #7cf0be; }
.cl.was { background: rgba(255, 255, 255, .05); border-left-color: rgba(255, 255, 255, .25); }
.asking .cl { cursor: pointer; }
.asking .cl:hover { background: rgba(168, 139, 255, .3); }
.tk-k { color: #ff9ecb; font-weight: 700; } .tk-s { color: #b8f2a2; } .tk-n { color: #ffcf8a; } .tk-c { color: #7c7ca3; font-style: italic; } .tk-b { color: #8fd3ff; } .tk-f { color: #ffe08a; }
.explain { background: #fff; border-radius: var(--r2); padding: 14px 16px; box-shadow: var(--shadow); border: 2px solid var(--butter); min-height: 120px; }
.ex-line { font-size: .75rem; font-weight: 900; color: var(--ink3); text-transform: uppercase; letter-spacing: .06em; }
.ex-head { font-size: 1.06rem; font-weight: 700; margin: 4px 0; }
.ex-note { background: var(--sky); border-radius: 12px; padding: 8px 12px; margin-top: 8px; font-size: .95rem; }
.ex-chg { margin-top: 8px; font-size: .92rem; }
.ex-chg ul { margin: 4px 0 0; padding-left: 20px; }
.ex-chg li { margin: 2px 0; }
.ex-chg li.t-add::marker { content: '+  '; } .ex-chg li.t-del::marker { content: '−  '; } .ex-chg li.t-new::marker { content: '+  '; } .ex-chg li.t-swap::marker { content: '⇄  '; } .ex-chg li.t-chg::marker { content: '~  '; }
.ex-final { margin-top: 10px; background: var(--mint); padding: 10px 14px; border-radius: 12px; font-weight: 800; }
.ex-final.err { background: var(--pink); }
.ex-ask { background: var(--lav); border-radius: 12px; padding: 8px 12px; font-weight: 800; margin-bottom: 8px; animation: pop .3s; }
.ex-verdict { border-radius: 12px; padding: 6px 12px; font-weight: 800; margin-bottom: 8px; }
.ex-verdict.ok { background: var(--mint); } .ex-verdict.no { background: var(--pink); }
.ctrl-row { display: flex; align-items: center; gap: 8px; }
.ctrl-row.wrap { flex-wrap: wrap; }
.ib { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--bg2); font-size: 1rem; font-weight: 900; flex: none; }
.ib:hover { background: var(--lav); }
.ib.play { width: 52px; height: 52px; background: var(--ink); color: #fff; font-size: 1.2rem; box-shadow: 0 3px 0 #000; }
.scrub { flex: 1; min-width: 80px; accent-color: var(--lavD); height: 6px; }
.pscore { font-weight: 800; color: var(--lavD); }
.th-step { font-family: var(--mono); font-size: .78rem; }
@media (max-width: 900px) {
  .theater { grid-template-columns: 1fr; grid-template-areas: "left" "right" "ctrl"; }
  .th-right { max-height: none; min-height: 260px; }
  .codeview { max-height: 40vh; font-size: 13px; }
  .th-controls { bottom: 6px; padding: 10px; }
  .ib { width: 38px; height: 38px; } .ib.play { width: 46px; height: 46px; }
}

/* ---- visual widgets ---- */
.viz-empty { color: var(--ink3); font-weight: 700; padding: 30px; text-align: center; }
.vsec { margin-bottom: 16px; }
.vsec h4 { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink3); margin: 0 0 8px; font-weight: 900; }
.vcards { display: flex; flex-wrap: wrap; gap: 8px; }
.vcard { background: var(--bg); border-radius: 14px; padding: 6px 12px; border: 2px solid var(--line); min-width: 64px; }
.vcard .vname { font-size: .76rem; font-weight: 800; color: var(--ink2); font-family: var(--mono); }
.vcard .vval { font-family: var(--mono); font-weight: 700; font-size: .95rem; word-break: break-all; }
.vcard .see { color: var(--ink3); font-size: .8rem; }
.flash { animation: flash 1s ease; border-color: #ffd166 !important; background: #fff6d6 !important; }
@keyframes flash { 0% { transform: scale(1.08); box-shadow: 0 0 0 6px #ffe58a; } 100% { transform: none; box-shadow: none; } }
.scard { background: var(--bg); border-radius: 16px; padding: 10px 12px; margin-bottom: 10px; border: 1px solid var(--line); }
.stitle { display: flex; gap: 10px; align-items: baseline; margin-bottom: 6px; flex-wrap: wrap; }
.stitle b { font-family: var(--mono); }
.stitle span { font-size: .78rem; color: var(--ink3); font-weight: 700; }
.scrollx { overflow-x: auto; padding-bottom: 4px; }
.arr { display: flex; gap: 4px; align-items: flex-end; padding: 2px 0 2px; }
.cell { display: flex; flex-direction: column; align-items: center; min-width: 40px; }
.cell .box { min-width: 40px; height: 40px; padding: 0 6px; display: grid; place-items: center; background: #fff; border: 2px solid #d9cfc0; border-radius: 10px; font-family: var(--mono); font-weight: 700; font-size: .92rem; transition: .25s; }
.cell .idx { font-size: .7rem; color: var(--ink3); font-family: var(--mono); margin-top: 2px; }
.cell .ptrs { display: flex; flex-direction: column; gap: 2px; align-items: center; min-height: 18px; }
.cell.on .box { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 30%, transparent); }
.cell.chg .box { background: #fff2c2; border-color: #ffc94a; animation: flash .9s; }
.cell.ghost .box { border-style: dashed; color: var(--ink3); }
.cell .bar { width: 26px; background: linear-gradient(180deg, var(--lavD), #c7b6ff); border-radius: 8px 8px 3px 3px; margin-bottom: 4px; transition: height .25s; }
.cell.chg .bar { background: linear-gradient(180deg, #ffb547, #ffe08a); }
.cell.on .bar { background: var(--c); }
.cell.barcell .box { height: 28px; font-size: .8rem; min-width: 34px; }
.ptag { background: var(--c); color: #fff; font-family: var(--mono); font-size: .7rem; font-weight: 800; padding: 1px 7px; border-radius: 999px; line-height: 1.4; }
.ptag::before { content: '▲ '; font-size: .55rem; }
.more, .emptyarr { color: var(--ink3); font-size: .82rem; font-weight: 700; align-self: center; padding: 4px 8px; }
table.grid { border-collapse: separate; border-spacing: 3px; font-family: var(--mono); font-size: .82rem; }
table.grid th { color: var(--ink3); font-weight: 600; font-size: .7rem; padding: 0 4px; }
table.grid td { min-width: 32px; height: 32px; text-align: center; background: #fff; border: 2px solid #e2d8c8; border-radius: 8px; font-weight: 700; position: relative; transition: .2s; }
table.grid td.chg { background: #fff2c2 !important; border-color: #ffc94a; }
table.grid td.on { border-color: var(--pinkD); box-shadow: 0 0 0 3px #ffc1d6; }
.gtag { position: absolute; top: -9px; right: -6px; background: var(--pinkD); color: #fff; font-size: .55rem; padding: 0 4px; border-radius: 6px; }
table.dict { border-collapse: collapse; font-family: var(--mono); font-size: .86rem; }
table.dict td { padding: 4px 8px; border-bottom: 1px dashed var(--line); }
table.dict td.k { font-weight: 800; background: #fff; border-radius: 8px; }
table.dict td.arrow { color: var(--ink3); }
table.dict tr.new td { background: #e3fbef; animation: flash .9s; }
table.dict tr.chg td { background: #fff2c2; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: #fff; border: 2px solid #d9cfc0; border-radius: 999px; padding: 2px 12px; font-family: var(--mono); font-weight: 700; font-size: .85rem; }
.chip.new { background: #e3fbef; border-color: var(--mintD); animation: flash .9s; }
.stackv { display: inline-flex; flex-direction: column; gap: 4px; padding: 6px 10px 0; border: 3px solid #d9cfc0; border-top: 0; border-radius: 0 0 16px 16px; min-width: 110px; }
.sitem { background: #fff; border: 2px solid #d9cfc0; border-radius: 10px; padding: 4px 12px; font-family: var(--mono); font-weight: 700; text-align: center; position: relative; font-size: .88rem; }
.sitem:first-child { border-color: var(--lavD); background: var(--lav); }
.sitem.chg { animation: flash .9s; }
.toptag { position: absolute; left: -46px; top: 50%; transform: translateY(-50%); font-size: .68rem; color: var(--lavD); font-weight: 900; font-family: var(--sans); }
.toptag::after { content: ' →'; }
.stackv { margin-left: 46px; }
.sbase { height: 6px; }
.queuev { display: flex; gap: 6px; align-items: center; }
.qitem { background: #fff; border: 2px solid #d9cfc0; border-radius: 12px; padding: 6px 12px; font-family: var(--mono); font-weight: 700; white-space: nowrap; font-size: .88rem; }
.qitem:first-of-type { border-color: var(--skyD); background: var(--sky); }
.qend { font-size: .72rem; font-weight: 800; color: var(--ink3); white-space: nowrap; }
svg text { font-family: var(--mono); font-size: 13px; font-weight: 700; text-anchor: middle; fill: var(--ink); }
svg .edge { stroke: #2b2b3a; stroke-width: 2; fill: none; }
svg .edge.prev { stroke: #a88bff; stroke-dasharray: 5 4; }
svg .edge.rand { stroke: #ff8a5c; stroke-dasharray: 2 4; }
svg .edge.act { stroke: var(--lavD); stroke-width: 3; }
svg .nil { fill: var(--ink3); font-size: 14px; text-anchor: start; }
svg .lbl { font-size: 11px; font-weight: 800; }
svg .elbl { font-size: 12px; fill: var(--lavD); font-weight: 900; }
.ln rect { fill: #fff; stroke: #c9bfae; stroke-width: 2; transition: .25s; }
.ln.on rect { stroke: var(--c); stroke-width: 3; fill: color-mix(in srgb, var(--c) 14%, #fff); }
.tn circle { fill: #fff; stroke: #c9bfae; stroke-width: 2; transition: .25s; }
.tn.cur circle { stroke: var(--c, var(--pinkD)); stroke-width: 3.5; fill: color-mix(in srgb, var(--c, var(--pinkD)) 16%, #fff); }
.tn.chg circle { fill: #fff2c2; stroke: #ffc94a; }
.tn.root circle { stroke: var(--lavD); stroke-width: 3; }
.tn.end circle { fill: var(--butter); }
.legend { font-size: .75rem; color: var(--ink3); font-weight: 700; margin-top: 4px; }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: middle; margin: 0 2px 0 8px; border: 2px solid #c9bfae; }
.lg.cur { background: var(--butter); border-color: var(--butterD); } .lg.act { background: var(--lav); border-color: var(--lavD); } .lg.done { background: var(--mint); border-color: var(--mintD); }
.rn rect { fill: #fff; stroke: #d9cfc0; stroke-width: 2; }
.rn text { font-size: 11px; }
.rn .rv { fill: var(--mintD); font-size: 11px; font-weight: 900; }
.rn.done rect { fill: var(--mint); stroke: var(--mintD); }
.rn.act rect { fill: var(--lav); stroke: var(--lavD); }
.rn.rec-cur rect { fill: var(--butter); stroke: var(--butterD); stroke-width: 3; }
.cstack { display: flex; flex-direction: column; gap: 4px; }
.cframe { background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 4px 10px; font-size: .82rem; display: flex; gap: 10px; flex-wrap: wrap; }
.cframe b { font-family: var(--mono); }
.cframe span { font-family: var(--mono); color: var(--ink2); }
.cframe.top { border-color: var(--lavD); background: var(--lav); }
.stdout { background: #1f1f33; color: #c9f7d9; padding: 10px 12px; border-radius: 12px; margin: 0; white-space: pre-wrap; max-height: 180px; overflow: auto; font-size: .82rem; }
.retbox { background: var(--mint); border-radius: 14px; padding: 8px 12px; font-weight: 800; margin-bottom: 12px; }
.retbox.err { background: var(--pink); }

@media (max-width: 1240px) {
  .navlinks { gap: 2px; }
  .navlinks a { padding: 8px 9px; font-size: .9rem; }
}
