:root {
  --bg: #f7f8fb; --surface: #ffffff; --sidebar: #ffffff; --text: #232634; --muted: #656d7d;
  --border: #dfe3eb; --primary: #6145cf; --primary-soft: #f0ecfc; --hero: #f0eef9;
  --hero-border: #dfd9f1; --art-line: #d9d1ee; --code-bg: #ffffff; --code-text: #3e455b;
  --code-purple: #7441ba; --code-blue: #2963aa; --code-green: #277455; --code-comment: #6c7283;
  --green: #267454; --green-soft: #eaf6ef; --amber: #90600b; --amber-soft: #fbf3df;
  --blue: #2968a8; --blue-soft: #eaf2fc; --shadow: 0 12px 32px #30204b0a; --focus: #6145cf;
}
:root[data-theme="dark"] {
  --bg: #11141b; --surface: #1b1f29; --sidebar: #171b24; --text: #ecedf4; --muted: #acb3c4;
  --border: #343a49; --primary: #b6a4ff; --primary-soft: #2b2541; --hero: #222034;
  --hero-border: #413856; --art-line: #403651; --code-bg: #1a1c29; --code-text: #c6c9db;
  --code-purple: #c59bf5; --code-blue: #92bafa; --code-green: #94d4b4; --code-comment: #a1a7bd;
  --green: #92d6b1; --green-soft: #213c31; --amber: #e9c278; --amber-soft: #393125;
  --blue: #95c4f4; --blue-soft: #253549; --shadow: 0 12px 32px #00000020; --focus: #c6b8ff;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 100px; }
body { margin: 0; color: var(--text); background: var(--bg); font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; font-size: 15px; line-height: 1.55; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
button, a, input { transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
.icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 12px 20px; background: var(--surface); color: var(--primary); border: 2px solid var(--focus); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.app-shell { display: grid; grid-template-columns: 250px minmax(0,1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--sidebar); border-right: 1px solid var(--border); padding: 0 18px; overflow-y: auto; }
.brand { min-height: 81px; display: flex; align-items: center; gap: 9px; padding: 0 10px; font-size: 20px; font-weight: 700; letter-spacing: -.6px; }
.brand-mark { display: grid; place-items: center; width: 33px; height: 33px; background: #6145cf; border-radius: 9px; color: #fff; }
.brand-mark .icon { width: 22px; height: 22px; }
.brand-light { font-weight: 400; }
.version { margin-left: auto; font-family: Consolas, monospace; color: var(--muted); font-size: 11px; padding: 2px 5px; border: 1px solid var(--border); border-radius: 5px; letter-spacing: 0; }
.sidebar-section-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.3px; color: var(--muted); margin: 35px 12px 14px; font-weight: 600; }
.category-nav { display: flex; flex-direction: column; gap: 5px; }
.nav-item { width: 100%; border: 1px solid transparent; background: transparent; display: flex; align-items: center; gap: 11px; padding: 11px 12px; min-height: 46px; border-radius: 8px; text-align: left; font-size: 13px; font-weight: 500; }
.nav-item:hover { background: var(--bg); }
.nav-item.active { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.nav-item > span:not(.nav-count) { flex: 1; }
.nav-count { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.nav-item.active .nav-count { color: var(--primary); }
.nav-divider { height: 1px; background: var(--border); margin: 13px 12px; }
.cs { --category: var(--primary); --category-soft: var(--primary-soft); }
.python { --category: var(--green); --category-soft: var(--green-soft); }
.html { --category: var(--amber); --category-soft: var(--amber-soft); }
.network { --category: var(--blue); --category-soft: var(--blue-soft); }
.icon.cs, .icon.python, .icon.html, .icon.network { color: var(--category); }
.sidebar-bottom { margin-top: auto; padding-top: 48px; }
.learning-note { padding: 20px 15px; border-radius: 10px; background: var(--bg); margin-bottom: 22px; }
.learning-note .icon { color: var(--primary); display: block; margin-bottom: 12px; }
.learning-note strong { display: block; font-size: 15px; line-height: 1.5; font-weight: 600; }
.learning-note p { color: var(--muted); font-size: 12px; margin: 10px 0 0; line-height: 1.8; }
.workspace { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 81px; padding: 12px 40px; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 10; }
.breadcrumb { display: flex; align-items: center; gap: 13px; font-size: 12px; color: var(--muted); }
.breadcrumb strong { color: var(--text); font-weight: 500; }
.theme-control { display: flex; border: 1px solid var(--border); padding: 3px; border-radius: 10px; background: var(--bg); gap: 2px; }
.theme-control button { display: grid; place-items: center; background: transparent; border: 1px solid transparent; width: 44px; height: 44px; border-radius: 7px; color: var(--muted); }
.theme-control button:hover { color: var(--primary); }
.theme-control button[aria-pressed="true"] { color: var(--primary); background: var(--surface); border-color: var(--border); box-shadow: 0 1px 3px #0000000a; }
.theme-control .icon { width: 17px; height: 17px; }
.main-content { max-width: 1480px; margin: 0 auto; padding: 32px 40px 0; }
.hero { position: relative; display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 32px 36px; background: var(--hero); border: 1px solid var(--hero-border); border-radius: 16px; overflow: hidden; }
.hero-copy { position: relative; z-index: 1; flex: 1; min-width: 0; }
.eyebrow { text-transform: uppercase; font-size: 10px; letter-spacing: 1.65px; color: var(--primary); font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.eyebrow-line { width: 18px; height: 2px; background: currentColor; }
h1 { font-size: clamp(28px, 2.7vw, 44px); line-height: 1.18; letter-spacing: -1.4px; font-weight: 650; margin: 0; }
h1 span { color: var(--primary); }
.hero-copy > p { color: var(--muted); font-size: 13px; line-height: 1.75; margin: 17px 0 22px; }
.hero-stats { display: flex; gap: 20px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.hero-stats strong { color: var(--text); font-size: 14px; font-weight: 600; margin-right: 3px; }
.hero-stats > span + span { border-left: 1px solid var(--hero-border); padding-left: 20px; }
.hero-art { width: 330px; min-width: 265px; height: 215px; position: relative; display: flex; align-items: center; flex-shrink: 0; }
.art-orbit { border: 1px solid var(--art-line); position: absolute; border-radius: 50%; width: 340px; height: 340px; top: -65px; left: -5px; }
.orbit-two { width: 240px; height: 240px; top: -14px; left: 45px; }
.code-window { position: relative; width: 315px; transform: rotate(-3deg); border-radius: 11px; background: var(--code-bg); color: var(--code-text); border: 1px solid var(--hero-border); box-shadow: 0 18px 30px #2313460c; font-family: Consolas, 'Courier New', monospace; font-size: 11px; }
.window-top { display: flex; align-items: center; gap: 5px; padding: 13px 14px; border-bottom: 1px solid var(--border); }
.window-top > span { width: 6px; height: 6px; border-radius: 50%; background: var(--art-line); }
.window-top small { font-size: 9px; margin-left: auto; color: var(--muted); }
.code-lines { padding: 18px 15px; line-height: 1.9; }
.code-purple { color: var(--code-purple); }.code-blue { color: var(--code-blue); }.code-green { color: var(--code-green); }.code-comment { color: var(--code-comment); font-size: 10px; }
.code-cursor { display: inline-block; width: 5px; height: 12px; background: var(--primary); vertical-align: middle; margin-left: 2px; }
.code-output { border-top: 1px solid var(--border); padding: 10px 15px; color: var(--green); font-size: 10px; }
.code-output > span { margin-right: 6px; }
.art-tag { position: absolute; bottom: -2px; right: 0; background: var(--surface); color: var(--text); border: 1px solid var(--hero-border); font-size: 11px; padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); transform: rotate(4deg); display: flex; align-items: center; gap: 6px; }
.tag-dot { width: 6px; height: 6px; background: var(--green); border-radius: 50%; }
.catalog { margin-top: 35px; scroll-margin-top: 100px; }
.catalog-toolbar { display: flex; gap: 20px; justify-content: space-between; align-items: center; margin-bottom: 31px; }
.catalog-toolbar h2 { font-size: 23px; margin: 0 0 4px; letter-spacing: -.6px; line-height: 1.3; font-weight: 600; }
#result-count { font-size: 12px; color: var(--muted); margin: 0; }
.search-wrap { display: flex; align-items: center; position: relative; width: 330px; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; flex-shrink: 0; }
.search-wrap > .icon { position: absolute; left: 14px; color: var(--muted); width: 18px; height: 18px; pointer-events: none; }
.search-wrap:focus-within { outline: 2px solid var(--focus); outline-offset: 3px; }
.search-wrap input { padding: 13px 47px 13px 42px; font-size: 12px; width: 100%; min-width: 0; color: var(--text); border: 0; background: transparent; outline: none; height: 46px; }
.search-wrap input::placeholder { color: var(--muted); opacity: 1; }
.search-wrap input::-webkit-search-cancel-button { display: none; }
.clear-search { position: absolute; right: 1px; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
.clear-search:hover { background: var(--bg); color: var(--text); }
.clear-search .icon { width: 16px; height: 16px; }
.category-section { margin-bottom: 37px; }
.section-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.category-icon { display: grid; place-items: center; color: var(--category); background: var(--category-soft); width: 39px; height: 39px; border-radius: 10px; flex-shrink: 0; }
.section-heading h3 { margin: 0; font-size: 16px; line-height: 1.5; font-weight: 600; }
.section-count { display: inline-block; margin-left: 8px; color: var(--muted); font-size: 11px; padding: 1px 6px; border: 1px solid var(--border); border-radius: 4px; vertical-align: 1px; font-weight: 400; }
.section-heading p { font-size: 12px; color: var(--muted); margin: 2px 0 0; }
.card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.lab-card { display: flex; flex-direction: column; min-width: 0; padding: 20px 20px 0; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; min-height: 222px; }
a.lab-card:hover { border-color: var(--category); box-shadow: var(--shadow); }
a.lab-card:hover .card-footer { color: var(--category); }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; letter-spacing: .15px; }
.card-tag { font-size: 10px; color: var(--category); background: var(--category-soft); border-radius: 5px; padding: 3px 7px; font-weight: 600; white-space: nowrap; }
.lab-card h4 { font-size: 15px; font-weight: 600; letter-spacing: -.2px; line-height: 1.45; margin: 17px 0 7px; }
.lab-card > p { color: var(--muted); font-size: 12px; line-height: 1.65; margin: 0 0 20px; }
.card-footer { border-top: 1px solid var(--border); padding: 12px 0; font-size: 11px; font-weight: 500; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; min-height: 44px; }
.card-footer .icon { width: 15px; height: 15px; }
.project-card { border-color: var(--hero-border); background: linear-gradient(135deg, var(--surface), var(--category-soft)); }
.unavailable { background: var(--bg); border-style: dashed; }
.unavailable .card-footer { color: var(--muted); font-weight: 400; }
.empty-state { text-align: center; padding: 60px 20px 85px; border: 1px dashed var(--border); border-radius: 12px; }
.empty-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; margin: 0 auto 16px; color: var(--primary); background: var(--primary-soft); }
.empty-icon .icon { width: 25px; height: 25px; }
.empty-state h3 { margin: 0; font-weight: 600; font-size: 20px; }
.empty-state p { color: var(--muted); font-size: 14px; margin: 10px 0 24px; }
.reset-button { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); padding: 10px 15px; color: var(--primary); font-size: 13px; }
.reset-button:hover { background: var(--primary-soft); }
.noscript-note { padding: 20px; border: 1px solid var(--border); border-radius: 10px; }
.noscript-note a { text-decoration: underline; color: var(--primary); }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 24px 0 28px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.footer-dot { margin: 0 8px; }
.footer > span:last-child { display: flex; align-items: center; gap: 8px; }
.footer .icon { width: 14px; height: 14px; }
@media (min-width: 1600px) { .hero { padding: 40px 45px; }.hero-art { width: 390px; }.code-window { width: 340px; }.hero-stats { font-size: 12px; }.card-grid { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media (max-width: 1200px) { .app-shell { grid-template-columns: 224px minmax(0,1fr); }.sidebar { padding: 0 12px; }.nav-item { font-size: 12px; gap: 8px; }.main-content { padding: 26px 26px 0; }.topbar { padding-inline: 26px; }.hero { padding: 28px; }.hero-art { width: 270px; min-width: 270px; }.code-window { width: 265px; font-size: 10px; }.code-comment { font-size: 9px; }.hero-stats { gap: 10px; }.hero-stats > span + span { padding-left: 10px; }.card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.search-wrap { width: 280px; }.hero-copy > p { font-size: 12px; } }
@media (max-width: 1000px) and (min-width: 901px) { .hero-art { display: none; }h1 { font-size: 38px; }.hero { padding: 30px; }.hero-stats { gap: 16px; }.hero-stats > span + span { padding-left: 16px; }.catalog-toolbar { align-items: flex-start; flex-direction: column; }.search-wrap { width: 100%; } }
@media (max-width: 900px) {
  .app-shell { display: block; }.sidebar { position: static; height: auto; padding: 0 24px 16px; border-right: 0; border-bottom: 1px solid var(--border); overflow: visible; }
  .brand { min-height: 72px; width: max-content; padding: 0; gap: 10px; }.version { margin-left: 7px; }.sidebar-section-label, .sidebar-bottom, .nav-divider { display: none; }
  .category-nav { flex-direction: row; flex-wrap: wrap; gap: 7px; }.nav-item { width: auto; min-height: 44px; padding: 8px 12px; border-color: var(--border); gap: 8px; font-size: 12px; }.nav-item.active { border-color: var(--hero-border); }.nav-item .icon { width: 17px; height: 17px; }.nav-count { margin-left: 3px; }
  .topbar { position: static; min-height: 72px; padding: 10px 24px; background: var(--bg); border-bottom: 0; }.main-content { padding: 6px 24px 0; }
  .hero-art { width: 285px; min-width: 285px; }.code-window { width: 280px; }h1 { font-size: 34px; }.hero { padding: 28px; }.hero-stats { gap: 12px; }.hero-stats > span + span { padding-left: 12px; }.hero-copy > p { font-size: 12px; }.catalog { scroll-margin-top: 16px; }.catalog-toolbar h2 { font-size: 22px; }.card-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }.lab-card { padding: 16px 16px 0; }.lab-card h4 { font-size: 14px; }.search-wrap { width: 285px; }
}
@media (max-width: 760px) { .hero-art { display: none; }.card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }h1 { font-size: 38px; }.hero-copy > p { font-size: 14px; }.hero-stats { font-size: 12px; }.catalog-toolbar { gap: 16px; }.search-wrap { width: 260px; }.catalog-toolbar h2 { font-size: 21px; } }
@media (max-width: 560px) {
  .sidebar { padding: 0 16px 8px; }.brand { min-height: 66px; font-size: 21px; }.category-nav { gap: 8px; flex-wrap: nowrap; overflow-x: auto; padding: 3px 3px 8px; margin: 0 -3px; scrollbar-width: thin; }.nav-item { flex-shrink: 0; font-size: 12px; padding: 8px 11px; gap: 7px; white-space: nowrap; }.nav-count { font-size: 11px; }.nav-item .icon { width: 16px; height: 16px; }
  .topbar { padding: 8px 16px; min-height: 72px; }.breadcrumb { font-size: 11px; gap: 8px; }.breadcrumb > span:first-child { display: none; }.breadcrumb > span:nth-child(2) { display: none; }.breadcrumb strong { font-size: 13px; }
  .main-content { padding: 4px 16px 0; }.hero { padding: 25px 22px; border-radius: 12px; }h1 { font-size: clamp(25px,6.7vw,34px); letter-spacing: -.9px; }.eyebrow { font-size: 9px; letter-spacing: 1.4px; margin-bottom: 13px; }.hero-copy > p { font-size: 12px; margin: 14px 0 18px; }.desktop-break { display: none; }.hero-stats { gap: 8px 12px; font-size: 10px; }.hero-stats strong { font-size: 12px; }.hero-stats > span + span { padding-left: 12px; }
  .catalog { margin-top: 27px; }.catalog-toolbar { flex-direction: column; align-items: stretch; margin-bottom: 27px; }.catalog-toolbar h2 { font-size: 22px; }.search-wrap { width: 100%; }.search-wrap input { font-size: 13px; }.section-heading { align-items: flex-start; gap: 10px; margin-bottom: 14px; }.section-heading h3 { font-size: 15px; }.section-heading p { font-size: 11px; margin-top: 4px; }.category-icon { width: 35px; height: 35px; border-radius: 9px; }.category-icon .icon { width: 18px; height: 18px; }.card-grid { grid-template-columns: 1fr; gap: 11px; }.lab-card { min-height: 195px; padding: 19px 20px 0; }.lab-card h4 { font-size: 16px; margin-top: 16px; }.lab-card > p { font-size: 13px; }.card-meta { font-size: 11px; }.card-footer { font-size: 12px; min-height: 47px; }.category-section { margin-bottom: 30px; }
  .footer { flex-direction: column; align-items: flex-start; gap: 8px; padding-bottom: max(24px, env(safe-area-inset-bottom)); }.empty-state { padding: 45px 15px; }.empty-state h3 { font-size: 19px; }.empty-state p { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
