/* Static Skolar shell. Colours and spacing follow AlgoreaFrontend's look as
   deployed on skolar.scikit-learner.app: pale-blue sidebar, white page, blue
   primary actions. */
:root {
  --blue: #2563eb;
  --blue-ink: #1d4ed8;
  --side-bg: #eaf0fd;
  --side-hover: #dce6fb;
  --side-active: #cfdcf9;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --ok: #2563eb;
  --page: #ffffff;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--side-bg); font-size: 15px; }
a { color: inherit; text-decoration: none; }

.layout { display: flex; min-height: 100vh; }
.sidebar { width: 360px; flex: 0 0 360px; background: var(--side-bg); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.layout.collapsed .sidebar { display: none; }
.brand { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 14px 30px; border-bottom: 1px solid #d6e0f5; }
.brand-name { color: var(--blue); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; font-size: 17px; }
.side-body { display: flex; flex: 1; min-height: 0; }
.rail { width: 76px; flex: 0 0 76px; border-right: 1px solid #d6e0f5; padding-top: 16px; }
.rail-item { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; color: var(--blue); background: #fff; padding: 10px 0; }
.rail-item svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.tree { flex: 1; overflow-y: auto; padding: 14px 8px 40px 10px; }

.node { display: grid; grid-template-columns: 18px 22px minmax(0, 1fr) 22px; gap: 8px; align-items: center; padding: 8px 8px 8px 0; border-radius: 10px; cursor: pointer; line-height: 1.25; }
.node:hover { background: var(--side-hover); }
.node.active { background: var(--side-active); }
.node .tw { color: var(--muted); font-size: 11px; text-align: center; user-select: none; }
.node .ic { width: 20px; height: 20px; color: var(--blue); }
.node .ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.node .tt { font-size: 13.5px; overflow-wrap: anywhere; }
.node.depth-0 .tt { font-size: 16px; font-weight: 600; }
.node.depth-1 .tt { font-size: 14.5px; }
.children { margin-left: 14px; }
.status { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #9ca3af; justify-self: center; }
.status.done { border: none; color: var(--ok); font-weight: 700; font-size: 16px; line-height: 18px; text-align: center; }
.status.partial { border-color: var(--blue); background: conic-gradient(var(--blue) var(--p), transparent 0); }

.main { flex: 1; min-width: 0; background: var(--page); border-radius: 18px 0 0 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 12px 18px 12px 40px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--page); z-index: 5; border-radius: 18px 0 0 0; }
.score-ring { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; border: 1.5px solid #9ca3af; display: grid; place-items: center; font-size: 13px; color: var(--muted); }
.crumbs { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: #374151; }
.crumbs a:hover { color: var(--blue); }
.crumbs .sep { color: var(--blue); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { border: none; background: transparent; color: var(--blue); font-size: 22px; line-height: 1; padding: 6px 10px; border-radius: 999px; cursor: pointer; }
.icon-btn:hover { background: var(--side-hover); }
.icon-btn[aria-disabled=true] { opacity: .3; pointer-events: none; }
.expand { display: none; }
.layout.collapsed .expand { display: inline-block; }
.btn-primary { background: var(--blue); color: #fff; padding: 8px 18px; border-radius: 999px; font-weight: 500; font-size: 14px; }
.btn-primary:hover { background: var(--blue-ink); }
.btn-primary[aria-disabled=true] { opacity: .35; pointer-events: none; }

.page { padding: 28px 40px 60px 64px; max-width: 1500px; }
.page h1 { font-size: clamp(26px, 3vw, 42px); font-weight: 700; margin: 8px 0 26px; letter-spacing: -.01em; text-wrap: balance; }
.tabs { display: inline-flex; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: #f8fafc; margin-bottom: 18px; flex-wrap: wrap; }
.tab { padding: 8px 18px; border-radius: 999px; font-size: 15px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.tab.on { background: #e8eefc; color: var(--blue); }
.tab.off { opacity: .55; cursor: not-allowed; }
.desc { max-width: 75ch; line-height: 1.6; color: #374151; margin: 0 0 22px; }
.result { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #374151; margin-bottom: 14px; flex-wrap: wrap; }
.result .pill { background: #e8eefc; color: var(--blue); padding: 4px 12px; border-radius: 999px; font-weight: 600; }
.result .msg { color: var(--muted); }

.list { display: flex; flex-direction: column; gap: 10px; max-width: 900px; }
.card { display: grid; grid-template-columns: 26px minmax(0, 1fr) 70px; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.card:hover { border-color: #bfd0f7; background: #fbfcff; }
.card .ic { color: var(--blue); }
.card .ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.card .t { font-weight: 600; }
.card .d { color: var(--muted); font-size: 14px; margin-top: 4px; line-height: 1.45; }
.card .sc { text-align: right; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.card .cat { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #b45309; margin-left: 8px; font-weight: 500; }

.task-frame { width: 100%; border: 1px solid var(--line); border-radius: 12px; min-height: 480px; display: block; background: #fff; }

.static-note { position: fixed; left: 12px; bottom: 10px; max-width: 336px; font-size: 12px; color: var(--muted); background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; z-index: 10; line-height: 1.4; }
.link-btn { background: none; border: none; color: var(--blue); cursor: pointer; font: inherit; padding: 0 0 0 6px; }

@media (max-width: 900px) {
  .sidebar { position: fixed; z-index: 20; width: min(360px, 90vw); box-shadow: 0 0 40px rgba(0,0,0,.15); }
  .page { padding: 20px 16px 60px; }
  .topbar { padding-left: 16px; }
  .static-note { display: none; }
}
