InferHaven/agent-skills / codetrain
codetrain
FlaggedCodeTrain is an open-source Socratic coding tutor with a local lesson page where the learner writes every line while the agent sets small steps, gives hints and reviews the work without putting the solution into the lesson. Use when the user wants to be taught/walked through code one tiny step at a time — triggers like "teach me this code", "walk me through this", "hold my hand", "explain step by step", "tutor me", "guide me through", "I want to learn this", or asks for a safe practice exercise to learn a concept.
app/static/styles.css
View on GitHub/* CodeTrain's local lesson page (the CodeTrain CLI and CodeTrain Open Skill serve it).
ONE DESIGN WITH THE SITE. sheet.css, loaded first, is the site's own web/sheet.css with only
its two font paths made flat (this server serves flat files): the papers (Blueprint, Linen,
Graphite), light and dark, Archivo and JetBrains Mono, the one 2px corner. theme.js and
theme-toggle.js are the site's own files, byte for byte, so the paper and the light are chosen
here the way they are on the website. The names below are this page's own, kept so its rules
read as they did, each an alias of a sheet token: nothing here holds a colour of its own except
the editor's four palettes, which are a choice inside the editor, not the page. */
:root {
--body: var(--sans);
--bg-2: var(--sheet);
--line-2: color-mix(in srgb, var(--ln) 45%, transparent);
--ink-soft: var(--muted);
--ink-faint: var(--muted);
--accent: var(--mint);
--accent-2: var(--mint);
--accent-ink: var(--on-mint);
--good-bg: color-mix(in srgb, var(--good) 14%, var(--panel));
--retry: var(--redline);
--retry-bg: color-mix(in srgb, var(--redline) 12%, var(--panel));
--brand-2: var(--red);
--scrim: color-mix(in srgb, var(--bg) 62%, transparent);
/* The page's side margin, shared by the rail and the sheet so their edges line up. */
--lpad: clamp(16px, 4vw, 40px);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
/* The night ground, as on the site: flat, no glow. The lesson sheet sits on it. */
body {
margin: 0;
font-family: var(--body);
color: var(--ink);
background: var(--bg);
line-height: 1.55;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
/* ---------- the rail ----------
The site's own rail (sheet.css, the app variant: opaque, never retracting, one row on a phone),
with the brand where the line starts and End session as the terminus. Only its measure and its
tools are this page's: it spans the sheet's width, and it carries the tutor's state beside the
paper and light control. */
.track-local .track-in { max-width: 1640px; padding: 0 var(--lpad); }
.track-local .track-in::after { left: calc(var(--lpad) + 14px); right: var(--lpad); }
.track-local .track-origin { margin-right: auto; }
.track-local .track-tools { gap: 14px; }
/* End session answers to the terminus rule (sheet.css) at rest, and turns red while it waits for
the second click that ends the session. */
.track-term .btn.end-btn:hover { color: var(--retry); border-color: var(--retry); }
.track-term .btn.end-btn.armed { color: var(--bg); background: var(--retry); border-color: var(--retry); }
.track-term .btn.end-btn:disabled { opacity: .6; cursor: default; transform: none; }
/* A finished lesson hides it (app.js buildDone); the sheet's .btn display would otherwise win
over `hidden`. The buffer stop stays: the line still ends there. */
.track-term .btn.end-btn[hidden] { display: none; }
@media (max-width: 760px) {
.track-local .track-in::after { left: var(--lpad); }
}
/* The mode, in the control row: a narrow-caps tag drawn in its own colour, as the beta tag is. */
.badge {
font-family: var(--display); font-stretch: 80%; font-size: 11px; font-weight: 600;
letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.5;
padding: 1px 7px; border-radius: var(--radius); border: 1px solid currentColor;
color: var(--muted);
}
.badge.repo { color: var(--accent); }
.badge.sandbox { color: var(--good); }
.badge.network { color: var(--accent-2); }
/* The tutor's state: a mark and its words. Each state has its own drawn mark, so it never rests
on colour alone: a solid disc while the tutor listens, a half disc that fades while it works, a
ring when it is your move, a quiet ring when the session is paused or over. Only the narrowest
phones drop the words, and a screen reader still has them. */
.status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.status[data-s="listening"] .dot { background: var(--good); }
.status[data-s="thinking"] .dot { background: linear-gradient(90deg, var(--accent) 50%, transparent 50%); border: 2px solid var(--accent); animation: pulse 1.1s ease-in-out infinite; }
.status[data-s="waiting_for_you"] .dot { background: transparent; border: 2px solid var(--accent-2); }
.status[data-s="paused"] .dot, .status[data-s="ended"] .dot { background: transparent; border: 2px solid var(--muted); animation: none; }
@keyframes pulse { 50% { opacity: .35; } }
@media (max-width: 420px) {
.status #status-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* paused banner */
.paused-banner {
margin: 0 clamp(16px, 4vw, 40px); margin-top: 12px; padding: 11px 16px;
border: 1px solid var(--accent); border-radius: var(--radius); background: var(--panel);
color: var(--ink-soft); font-size: 0.88rem;
}
.paused-banner b { color: var(--accent); }
/* ---------- the lesson sheet ----------
One drawn sheet, as the hosted lesson screen draws it (web/app/study/index.html .lsheet): a 2px
frame, the title block at its head, the control row under that, then the lesson, the work and
the notes as cells divided by 1px rules, never three floating panels. */
.lwrap { max-width: 1640px; margin: 0 auto; padding: clamp(16px, 2.4vw, 28px) var(--lpad) 60px; }
.lsheet { background: var(--sheet); border: 2px solid var(--ln); }
.lsheet .tblock { border-top: 0; }
.lesson-tb { grid-template-columns: minmax(0, 2.4fr) repeat(3, minmax(0, 1fr)); }
.lesson-tb h1 {
font-family: var(--display); font-stretch: 104%; font-weight: 680; letter-spacing: -.01em;
font-size: 19px; line-height: 1.2; margin: 0; overflow-wrap: anywhere;
}
.lsheet-ctl {
display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
gap: 6px 12px; min-height: 46px; padding: 7px 14px; border-top: 1px solid var(--ln);
}
.lsheet-badges { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; min-width: 0; }
.head-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
/* The control row's text buttons do not move: they are part of the sheet, not on it. */
.lsheet-ctl .btn.ghost { border-color: transparent; color: var(--muted); padding: 7px 12px; }
.lsheet-ctl .btn.ghost:hover { color: var(--ink); border-color: var(--line); transform: none; }
.layout {
display: grid;
grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.35fr) 290px;
border-top: 2px solid var(--ln);
}
.cell { min-width: 0; }
.layout > .cell + .cell { border-left: 1px solid var(--line); }
/* The finished lesson has no work cell: the lesson and the notes share the sheet. */
.layout.no-work { grid-template-columns: minmax(0, 1fr) 290px; }
@media (max-width: 1180px) {
.layout { grid-template-columns: 1fr 1fr; }
.layout > .rail { grid-column: 1 / -1; order: 3; border-left: 0; border-top: 1px solid var(--line); }
.layout.no-work { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
.lesson-tb { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lesson-tb .tb-lesson, .lesson-tb > :last-child { grid-column: 1 / -1; }
.layout { grid-template-columns: 1fr; }
.layout > .cell + .cell { border-left: 0; border-top: 1px solid var(--line); }
}
/* Feedback and new wins still arrive with a short rise; the sheet itself does not. */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
/* Entrance animations are dropped once finished (.rise-done added on animationend): Gecko keeps
any ancestor with a transform animation — even one settled at transform:none — as the
containing block for position:fixed descendants, which trapped the editor pop-out inside
.work behind its own backdrop in Firefox. The `to` state equals the natural style, so
removing the animation is visually a no-op. */
.rise-done { animation: none !important; }
/* Every cell's inner block is padded by its place, not by a class: app.js replaces the lesson
block's class on each view (intake, step, done), and the class alone left the lesson's text on
the cell's edge. */
.pad, .cell > div { padding: clamp(18px, 2.2vw, 28px); }
/* A label inside a block (the question, a concept check): narrow caps in the checked ink. */
.eyebrow {
font-family: var(--display); font-stretch: 80%; font-weight: 600; font-size: 11.5px;
letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent); margin: 0 0 3px;
}
.step-head {
font-family: var(--display); font-stretch: 104%; font-weight: 670; letter-spacing: -0.01em;
font-size: clamp(21px, 2vw, 24px); line-height: 1.2; margin: 6px 0 12px; text-wrap: balance;
}
/* The stop line heads the lesson; its marks are sheet.css's. */
#stops-wrap .stops { margin: 0 0 14px; }
/* The question the step opens with, lifted out of the body by prose.js. Styled as a question and
not as the first line of the explanation: a weak one then reads as the tutor framing the
problem rather than as a lesson that starts badly, and a good one keeps the force of being
asked. Ruled above and below, as its twin in the hosted app (web/app/study/index.html) is; only
the JS is shared, because the two apps name their design tokens differently. */
.step-q { margin: 12px 0 14px; padding: 10px 0 11px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.step-q-b { font-family: var(--display); font-size: 1.06rem; line-height: 1.5; color: var(--ink); }
.step-q-b code.ic { font-size: 0.82em; }
/* A repository path the lesson cited, turned into a button by prose.js. Only paths the local
server will serve become one, so an invented path stays plain text beside a real one. */
/* `display:inline`, NEVER inline-flex: a flex container mid-sentence copies to the clipboard as
its own block, and every cited path came through a paste as a line break with the path missing.
The glyph is an ::before so it is decoration the clipboard does not have to carry. */
.fileref {
font: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
display: inline;
}
.fileref code {
font-family: var(--mono); font-size: 0.86em; background: var(--bg); color: var(--accent-2);
padding: 1px 6px; border-radius: var(--radius); border: 1px solid var(--line);
border-bottom-color: var(--accent); transition: background .14s ease;
}
/* A file, drawn: a small sheet outline at the line's stroke, never a glyph. */
.fileref code::before { content: ""; display: inline-block; width: 7px; height: 9px; margin-right: 5px; vertical-align: -1px; border: 1.5px solid currentColor; opacity: .7; }
.fileref:hover code, .fileref:focus-visible code { background: var(--panel-2); }
/* The file itself, inside the overlay the quick reference already uses. min-width:0 on the pre
and a sticky gutter: without the first a long line pushes the overlay sideways, and without the
second the line numbers scroll away from their lines. */
.rf { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.rf-head {
display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0;
font-size: 0.78rem; color: var(--ink-soft);
}
.rf-where { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rf-size { opacity: .72; }
.rf-out { margin-left: auto; color: var(--accent); text-decoration: none; white-space: nowrap; }
.rf-out:hover { text-decoration: underline; }
.rf-box {
display: flex; align-items: flex-start; min-width: 0; max-height: 62vh; overflow: auto;
background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
}
.rf-gut {
position: sticky; left: 0; z-index: 1; flex: 0 0 auto; padding: 12px 10px; text-align: right;
white-space: pre; user-select: none; font-family: var(--mono); font-size: 0.78rem;
line-height: 1.55; color: var(--ink-faint); border-right: 1px solid var(--line);
background: var(--bg);
}
.rf-pre {
flex: 1 1 auto; min-width: 0; margin: 0; padding: 12px 14px; background: none; border: 0;
white-space: pre; font-size: 0.78rem; line-height: 1.55; color: var(--ink);
}
.rf-pre code { font-family: var(--mono); }
.rf-pre .token.comment, .rf-pre .token.prolog, .rf-pre .token.doctype, .rf-pre .token.cdata { color: var(--ink-faint); font-style: italic; }
.rf-pre .token.keyword, .rf-pre .token.important { color: var(--accent); }
.rf-pre .token.string, .rf-pre .token.char, .rf-pre .token.attr-value, .rf-pre .token.triple-quoted-string { color: var(--good); }
.rf-pre .token.number, .rf-pre .token.boolean, .rf-pre .token.constant, .rf-pre .token.symbol { color: var(--accent-2); }
.rf-pre .token.function, .rf-pre .token.class-name, .rf-pre .token.builtin, .rf-pre .token.attr-name { color: var(--accent-2); }
.rf-pre .token.operator, .rf-pre .token.punctuation, .rf-pre .token.entity { color: var(--ink-soft); }
.rf-pre .token.property, .rf-pre .token.tag, .rf-pre .token.selector { color: var(--accent-2); }
/* rendered tutor markdown */
.md { color: var(--ink-soft); font-size: 0.97rem; }
.md p { margin: 0 0 0.9em; }
.md h3 { font-family: var(--display); font-weight: 600; color: var(--ink); font-size: 1.15rem; margin: 1.2em 0 .4em; }
.md h4 { font-weight: 600; color: var(--ink); font-size: 1rem; margin: 1em 0 .3em; }
.md ul { margin: 0 0 1em; padding-left: 1.2em; }
.md li { margin: 0.25em 0; }
.md strong { color: var(--ink); font-weight: 600; }
.md code.ic { font-family: var(--mono); font-size: 0.86em; background: var(--bg); color: var(--accent-2); padding: 1px 6px; border-radius: var(--radius); border: 1px solid var(--line); }
.md pre.code {
font-family: var(--mono); font-size: 0.85rem; line-height: 1.5; color: var(--ink);
background: var(--panel-2); border: 1px solid var(--line);
border-radius: var(--radius); padding: 12px 14px; overflow-x: auto; margin: 0 0 1em;
}
.md ol { margin: 0 0 1em; padding-left: 1.4em; }
.md li::marker { color: var(--accent); }
.md blockquote { margin: 0 0 1em; padding: 2px 0 2px 12px; border-left: 2px solid var(--line-2); color: var(--ink-faint); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1.2em 0; }
.md > :last-child { margin-bottom: 0; }
/* A table the tutor wrote (prose.js::toHtml). It scrolls inside its own box rather than pushing
the column sideways, and its header is set like the other small labels in this UI. */
.md-table { margin: 0 0 1em; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.md-table table { width: 100%; border-collapse: collapse; font-size: 0.9rem; line-height: 1.45; }
.md-table th {
text-align: left; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
color: var(--accent); background: color-mix(in srgb, var(--mint) 8%, transparent); padding: 8px 12px; border-bottom: 1px solid var(--line);
}
.md-table td { padding: 8px 12px; vertical-align: top; color: var(--ink-soft); }
.md-table tbody tr + tr td { border-top: 1px solid var(--line); }
.md-table tbody tr:nth-child(even) td { background: var(--bg-2); }
.md-table td:first-child { color: var(--ink); font-weight: 600; }
.md-table code.ic { white-space: nowrap; }
.md-table .al-c { text-align: center; }
.md-table .al-r { text-align: right; }
/* Three columns or more scroll rather than squeeze to one word per line. */
.md-table tr > :first-child:nth-last-child(n+3),
.md-table tr > :first-child:nth-last-child(n+3) ~ * { min-width: 9em; }
/* What the answer guard held back, behind a click. The <pre> sits OUTSIDE .md, so it carries its
own rules rather than inheriting the one above. Deliberately quieter than a code block the
tutor meant you to read: dashed edge, no accent bar, and never styled as a call to action. */
details.held { margin: 0 0 1em; font-size: 0.9rem; }
details.held summary { cursor: pointer; color: var(--muted); display: inline-block; }
details.held summary:hover { color: var(--ink); }
details.held pre.code {
font-family: var(--mono); font-size: 0.85rem; line-height: 1.5; color: var(--ink);
background: var(--panel-2); border: 1px dashed var(--line);
border-radius: var(--radius); padding: 12px 14px; overflow-x: auto; margin: 8px 0 0;
}
/* The task is the next stop on the line: a hollow station ring in front of it, as on the hosted
lesson screen, not a dashed box with a label. */
.task { position: relative; margin-top: 18px; padding: 8px 0 8px 24px; color: var(--ink); }
.task::before { content: ""; position: absolute; left: 1px; top: 13px; width: 10px; height: 10px; border: 2px solid var(--accent); border-radius: 50%; box-sizing: border-box; }
.task .md { color: var(--ink); }
/* hints — progressive disclosure */
.hints { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
/* A line button, as the work cell's Reference, Skip and Reset are: it must not read as one of the
filled stat chips beside it. */
.hint-btn {
align-self: flex-start; font-family: var(--display); font-weight: 650; font-size: 13px; cursor: pointer;
color: var(--ink); background: transparent; border: 1px solid var(--line-2);
border-radius: var(--radius); padding: 7px 12px; transition: border-color .16s, color .16s;
}
.hint-btn:hover { border-color: var(--accent); color: var(--accent); }
.hint-btn:disabled { opacity: .5; cursor: default; }
.hint {
font-size: 0.9rem; color: var(--ink-soft);
border-left: 1px solid var(--accent); padding: 6px 0 6px 14px; margin: 0;
animation: slideIn .35s ease both;
}
.hint b { color: var(--accent); font-style: normal; }
@keyframes slideIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
/* ---------- editor ---------- */
.work .pad { display: flex; flex-direction: column; gap: 14px; height: 100%; }
.file-tab {
display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-family: var(--mono); font-size: 0.8rem;
color: var(--ink-soft);
}
.file-tab .name { color: var(--ink); }
/* The language is a tag like the mode beside it: narrow caps, never mono, which is for code. */
.file-tab .lang {
margin-left: auto; font-family: var(--display); font-stretch: 80%; font-weight: 600; font-size: 11px;
line-height: 1.5; text-transform: uppercase; letter-spacing: 0.08em;
color: var(--accent); border: 1px solid currentColor; border-radius: var(--radius); padding: 1px 7px;
}
.editor {
position: relative; background: var(--bg); border: 1px solid var(--line);
border-radius: var(--radius); overflow: hidden; min-height: 230px;
}
/* Focus is the site's ring, drawn on the sheet around the well, never a glow. */
.editor:focus-within { border-color: var(--accent); outline: 2px solid var(--mint); outline-offset: 2px; }
/* Editor themes — recolor ONLY the typing area by overriding palette vars locally
(Prism tokens + gutter read these vars), so the page chrome is unaffected. Each palette's
--ink-faint (comments, line numbers) reads at 4.6:1 or more on both of its grounds. */
.file-tab .etheme {
margin-left: 8px; font-family: var(--display); font-weight: 600; font-size: 12px; cursor: pointer; min-height: 28px;
background: var(--bg-2); color: var(--ink-soft); border: 1px solid var(--line-2);
border-radius: var(--radius); padding: 4px 6px;
}
.editor.etheme-dark {
--bg:#10151a; --bg-2:#161d23; --ink:#e7eef2; --ink-soft:#a6b3bd; --ink-faint:#798792;
--accent:#39aaaa; --accent-2:#5fc6c6; --good:#5cb88a; --line:#2a3742; --line-2:#384854;
}
.editor.etheme-midnight {
--bg:#0b1020; --bg-2:#121a33; --ink:#dde6ff; --ink-soft:#9fb0d8; --ink-faint:#7585ae;
--accent:#7aa2ff; --accent-2:#a6c0ff; --good:#7be0b0; --line:#23304f; --line-2:#33436b;
}
.editor.etheme-hacker {
--bg:#020a05; --bg-2:#04140b; --ink:#36ff7a; --ink-soft:#27c75f; --ink-faint:#159240;
--accent:#39ff14; --accent-2:#86ffae; --good:#b6ff6b; --line:#0c3a1c; --line-2:#11512a;
}
.editor.etheme-hacker .cinput { caret-color: #39ff14; }
.editor.etheme-light {
--bg:#ffffff; --bg-2:#f1f5f7; --ink:#16212a; --ink-soft:#46555f; --ink-faint:#616f7b;
--accent:#1f7f7f; --accent-2:#15706e; --good:#3f7d5a; --line:#d8e1e7; --line-2:#bccbd4;
}
/* Prism overlay editor */
.cwrap { display: grid; grid-template-columns: auto 1fr; }
.cwrap .gutter {
font-family: var(--mono); font-size: 0.88rem; line-height: 1.6; text-align: right;
color: var(--ink-faint); padding: 14px 10px 14px 14px; user-select: none;
border-right: 1px solid var(--line); background: var(--bg-2); white-space: pre; overflow: hidden;
min-height: 230px; max-height: 60vh; /* match .celayers so the gutter clips + scroll-syncs */
}
.celayers { position: relative; min-height: 230px; max-height: 60vh; overflow: hidden; }
.celayers .chl, .celayers .cinput {
margin: 0; border: 0; padding: 14px 16px; position: absolute; inset: 0; overflow: auto;
font-family: var(--mono); font-size: 0.88rem; line-height: 1.6; tab-size: 4;
white-space: pre; word-wrap: normal; overflow-wrap: normal;
}
.celayers .chl { z-index: 0; pointer-events: none; color: var(--ink); background: transparent; }
.celayers .chl code { font: inherit; white-space: pre; background: none; padding: 0; }
.celayers .cinput { z-index: 1; color: transparent; background: transparent; caret-color: var(--accent); resize: none; outline: none; }
.celayers .cinput::selection { background: color-mix(in srgb, var(--mint) 30%, transparent); }
/* full-page pop-out: distraction-free editing of large files.
NOTE: #editor-mount carries BOTH .editor and the editor's own layout class (.cwrap=grid /
.ta-wrap=grid lives one level down for the textarea fallback). The fullscreen rules must NOT
override that display, or the gutter/code columns collapse — so we only reposition + resize. */
.ed-backdrop {
position: fixed; inset: 0; z-index: 9990;
background: var(--scrim);
}
body.ed-zoom { overflow: hidden; } /* freeze the page behind the overlay */
.editor.fullscreen {
position: fixed; inset: 3vmin; z-index: 9995;
/* Explicit height (not just inset) so the editor's own grid/flex layout has a definite box to
fill — never relying on implicit grid-row sizing, which is what collapsed the row before and
crammed the text to the bottom. 6vmin = inset top+bottom. */
height: calc(100vh - 6vmin); min-height: 0; max-height: none;
border: 2px solid var(--ln); outline: 0;
}
/* Fill the popped-out frame. The mount IS the grid (.cwrap, columns auto/1fr): make its single row
fill the height so both grid cells (gutter + .celayers) stretch. The textarea fallback (.ta-wrap,
a child of the mount) expands the same way. Drop the 60vh clamp; the absolute .chl/.cinput layers
(inset:0) then fill .celayers, keeping text top-aligned and the gutter pinned in column 1. */
.editor.fullscreen.cwrap { grid-template-rows: minmax(0, 1fr); }
.editor.fullscreen .ta-wrap { height: 100%; }
.editor.fullscreen.cwrap > .celayers,
.editor.fullscreen.cwrap > .gutter,
.editor.fullscreen .ta-wrap textarea,
.editor.fullscreen .ta-wrap .gutter { max-height: none; height: 100%; min-height: 0; align-self: stretch; }
/* Floating exit button, pinned top-right inside the pop-out (hidden until zoomed). */
.ed-close { display: none; }
.editor.fullscreen .ed-close {
display: inline-block; position: absolute; top: 10px; right: 12px; z-index: 2;
font-family: var(--display); font-weight: 600; font-size: 12px; cursor: pointer;
background: var(--bg-2); color: var(--ink); border: 1px solid var(--accent);
border-radius: var(--radius); padding: 5px 10px;
}
.ed-close:hover { background: var(--accent); color: var(--bg); }
.ed-expand {
font-family: var(--display); font-weight: 600; font-size: 12px; cursor: pointer; margin-left: 6px; min-height: 28px;
background: var(--bg-2); color: var(--ink-soft); border: 1px solid var(--line-2);
border-radius: var(--radius); padding: 4px 8px;
}
.ed-expand:hover { color: var(--ink); border-color: var(--accent); }
/* concept-check (mcq) step: options replace the editor */
.mcq { padding: 4px 2px 10px; }
.mcq .mcq-q { font-weight: 600; margin: 6px 0 10px; }
.mcq .mcq-opt {
display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; padding: 9px 12px;
border: 1px solid var(--line-2); border-radius: var(--radius); cursor: pointer;
}
.mcq .mcq-opt:hover { border-color: var(--accent); }
.mcq .mcq-opt:has(input:checked) { border-color: var(--accent); background: var(--bg-2); }
/* @-mention autocomplete */
.mention-pop {
position: absolute; z-index: 9999; max-height: 240px; overflow: auto;
background: var(--panel); border: 2px solid var(--ln); border-radius: var(--radius); padding: 4px;
}
.mention-pop .mi {
font-family: var(--mono); font-size: 0.78rem; color: var(--ink-soft);
padding: 5px 8px; border-radius: var(--radius); cursor: pointer; white-space: nowrap;
overflow: hidden; text-overflow: ellipsis;
}
.mention-pop .mi.on, .mention-pop .mi:hover { background: var(--bg-2); color: var(--ink); }
/* multi-file step: a tab per file */
.file-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.file-tabs .ftab {
font-family: var(--mono); font-size: 0.72rem; cursor: pointer;
background: var(--bg-2); color: var(--ink-soft); border: 1px solid var(--line);
border-radius: var(--radius); padding: 5px 10px; max-width: 280px;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file-tabs .ftab.on { color: var(--ink); border-color: var(--accent); background: var(--bg); }
.file-tabs .ftab:hover { color: var(--ink); }
/* Prism token colors mapped to the palette (tracks light/dark) */
.chl .token.comment, .chl .token.prolog, .chl .token.doctype, .chl .token.cdata { color: var(--ink-faint); font-style: italic; }
.chl .token.keyword, .chl .token.important { color: var(--accent); }
.chl .token.string, .chl .token.char, .chl .token.attr-value, .chl .token.triple-quoted-string { color: var(--good); }
.chl .token.number, .chl .token.boolean, .chl .token.constant, .chl .token.symbol { color: var(--accent-2); }
.chl .token.function, .chl .token.class-name, .chl .token.builtin, .chl .token.attr-name { color: var(--accent-2); }
.chl .token.operator, .chl .token.punctuation, .chl .token.entity { color: var(--ink-soft); }
.chl .token.property, .chl .token.tag, .chl .token.selector { color: var(--accent-2); }
/* textarea fallback */
.ta-wrap { display: grid; grid-template-columns: auto 1fr; }
.ta-wrap .gutter {
font-family: var(--mono); font-size: 0.88rem; line-height: 1.6; text-align: right;
color: var(--ink-faint); padding: 14px 10px 14px 14px; user-select: none;
border-right: 1px solid var(--line); background: var(--bg-2); white-space: pre; overflow: hidden;
min-height: 230px; max-height: 60vh;
}
.ta-wrap textarea {
font-family: var(--mono); font-size: 0.88rem; line-height: 1.6; color: var(--ink);
background: transparent; border: 0; resize: none; outline: none;
padding: 14px 16px; min-height: 230px; max-height: 60vh; overflow: auto;
tab-size: 4; caret-color: var(--accent); width: 100%;
}
.ta-wrap textarea::placeholder { color: var(--ink-faint); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn {
font-family: var(--display); font-weight: 650; font-size: 0.88rem; cursor: pointer;
border-radius: var(--radius); padding: 10px 18px; border: 1px solid transparent;
transition: transform .08s ease, background .2s, border-color .2s, color .2s;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-2); }
.btn.ghost { background: transparent; color: var(--ink-soft); border-color: var(--line-2); }
.btn.ghost:hover { color: var(--ink); border-color: var(--accent); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn.primary.sent { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn.run { background: transparent; color: var(--ink); border-color: var(--good); }
.btn.run:hover { background: var(--good); color: var(--bg); }
.btn.ask { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn.ask:hover { background: var(--accent); color: var(--accent-ink); }
.run-hint { font-size: 0.78rem; color: var(--ink-faint); margin: -4px 0 0; }
.run-hint b { color: var(--good); }
/* "every check is" a tick: the same drawn mark a passed check carries below. */
.run-hint .tick { position: relative; display: inline-block; width: 13px; height: 10px; margin: 0 1px; vertical-align: -1px; }
.run-hint .tick::before { content: ""; position: absolute; left: 2px; top: 0; width: 8px; height: 4px; border-left: 2px solid var(--good); border-bottom: 2px solid var(--good); transform: rotate(-45deg); }
/* run output (stdout/stderr) */
.output { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
/* The output's and the checks' bars are labels: narrow caps, as the title block's are. Their counts
stay in the code face, which is for figures. */
.output .obar { padding: 8px 14px; background: var(--bg-2); font-family: var(--display); font-stretch: 80%; font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.output pre { margin: 0; padding: 12px 14px; font-family: var(--mono); font-size: 0.8rem; line-height: 1.5; color: var(--ink-soft); background: var(--bg); max-height: 220px; overflow: auto; white-space: pre-wrap; }
.output pre .err { color: var(--retry); }
/* structured test cases */
.cases { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cases .cbar { display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: var(--bg-2); font-family: var(--display); font-stretch: 80%; font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.cases .ctall { margin-left: auto; color: var(--ink); font-family: var(--mono); font-stretch: 100%; font-size: 0.7rem; letter-spacing: .06em; }
.cstamp, .ostamp { margin-left: 10px; color: var(--ink-faint); font-family: var(--body); font-stretch: 100%; font-weight: 400; font-size: 0.7rem; letter-spacing: 0; text-transform: none; }
/* A fresh run draws its frame in the checked ink for a moment: a line, not a glow. */
.cases.ran, .output.ran { animation: flashran .6s ease; }
@keyframes flashran {
0% { border-color: var(--accent); }
100% { border-color: var(--line); }
}
.caselist { list-style: none; margin: 0; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.case { display: grid; grid-template-columns: auto 1fr; column-gap: 9px; align-items: baseline; padding: 7px 10px; border-radius: var(--radius); font-size: 0.86rem; }
/* A check's mark is drawn: a tick for passed, a cross for failed, a ring while it waits. The word
is there for a screen reader (.sr). */
.case .ci { position: relative; display: inline-block; width: 14px; height: 14px; }
.case.pass .ci::before { content: ""; position: absolute; left: 2px; top: 2px; width: 9px; height: 5px; border-left: 2px solid var(--good); border-bottom: 2px solid var(--good); transform: rotate(-45deg); }
.case.fail .ci::before, .case.fail .ci::after { content: ""; position: absolute; left: 6px; top: 1px; width: 2px; height: 12px; background: var(--retry); transform: rotate(45deg); }
.case.fail .ci::after { transform: rotate(-45deg); }
.case.pending .ci::before { content: ""; position: absolute; inset: 2px; border: 2px solid var(--ink-faint); border-radius: 50%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.case.fail { background: var(--retry-bg); }
.case.pending { color: var(--ink-faint); }
.case .cn { color: var(--ink); }
/* Under the check's name, never under its mark. */
.case .cx { grid-column: 2; color: var(--ink-faint); font-size: 0.8rem; }
.case .cio { grid-column: 2; font-family: var(--mono); font-size: 0.76rem; color: var(--ink-soft); margin-top: 3px; }
.case .cio code { color: var(--accent-2); background: var(--bg); padding: 1px 5px; border-radius: var(--radius); border: 1px solid var(--line); }
.note-input {
flex: 1; min-width: 160px; font-family: var(--body); font-size: 0.85rem; color: var(--ink);
background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 12px;
}
.note-input:focus { outline: none; border-color: var(--accent); }
/* feedback + tests */
.feedback {
border-radius: var(--radius); padding: 14px 16px; border: 1px solid var(--line);
background: var(--panel-2); animation: rise .4s ease both;
}
.feedback.pass { border-color: var(--good); background: var(--good-bg); }
.feedback.retry { border-color: var(--retry); background: var(--retry-bg); }
.feedback .tag {
font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.feedback.pass .tag { color: var(--good); }
.feedback.retry .tag { color: var(--retry); }
.feedback.comment .tag { color: var(--accent); }
/* Each criterion the tutor checked, with the drawn marks a run's checks carry: a tick for one
that holds, a brick cross for one that is missing. The word is for a screen reader (.sr). */
.fb-checks { margin: 8px 0 0; padding-left: 0; list-style: none; font-size: 0.82rem; }
.fb-checks li { padding-left: 22px; position: relative; color: var(--ink-soft); margin: 3px 0; }
.fb-checks li.ok::before { content: ""; position: absolute; left: 3px; top: .42em; width: 8px; height: 4px; border-left: 2px solid var(--good); border-bottom: 2px solid var(--good); transform: rotate(-45deg); }
.fb-checks li.no::before, .fb-checks li.no::after { content: ""; position: absolute; left: 7px; top: .28em; width: 2px; height: 11px; background: var(--brand-2); transform: rotate(45deg); }
.fb-checks li.no::after { transform: rotate(-45deg); }
.fb-checks li.no { color: var(--ink); }
/* flash so it's obvious where a tutor reply / nudge landed: the site's ring, for a moment */
.feedback.flash { outline: 2px solid var(--accent); outline-offset: 2px; }
/* patch-back: propose writing the learner's accepted code into their repo */
.patch-panel { border: 1px solid var(--accent); border-radius: var(--radius); padding: 14px 16px; background: var(--bg-2); animation: rise .4s ease both; }
.patch-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 700; }
.patch-head code { font-family: var(--mono); font-size: 0.82rem; color: var(--accent); }
.patch-sum { color: var(--ink-soft); font-size: 0.9rem; margin: 6px 0 0; }
.patch-panel .diff { margin: 10px 0 0; padding: 10px 12px; max-height: 320px; overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); font-family: var(--mono); font-size: 0.78rem; line-height: 1.5; white-space: pre; }
.diff .dl-add { color: var(--good); } .diff .dl-del { color: var(--brand-2); } .diff .dl-hunk { color: var(--accent-2); }
.patch-stats { margin-left: auto; font-family: var(--mono); font-size: 0.78rem; }
.patch-stats .dl-add { color: var(--good); } .patch-stats .dl-del { color: var(--brand-2); }
/* the overlay's full-diff view: tall and scrollable, never clamped like the inline panel */
.diff-full { max-height: 68vh; overflow: auto; padding: 10px 12px; background: var(--bg);
border: 1px solid var(--line); border-radius: var(--radius); font-family: var(--mono);
font-size: 0.78rem; line-height: 1.5; white-space: pre; }
.patch-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.patch-note { color: var(--ink-faint); font-size: 0.78rem; }
.patch-note code { font-family: var(--mono); }
/* overlay popup (quick language reference) */
.overlay { position: fixed; inset: 0; background: color-mix(in srgb, var(--bg) 62%, transparent); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 24px; }
.overlay-box { background: var(--sheet); border: 2px solid var(--ln); border-radius: var(--radius); max-width: 760px; width: 100%; max-height: 86vh; display: flex; flex-direction: column; }
.overlay-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); font-weight: 700; }
.overlay-body { padding: 16px 18px; overflow: auto; }
.reftab { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.reftab td { padding: 5px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.reftab code { font-family: var(--mono); color: var(--accent); }
.overlay-body .muted { color: var(--ink-soft); }
.tests {
border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.tests .bar {
display: flex; align-items: center; gap: 10px; padding: 10px 14px;
background: var(--bg-2); font-family: var(--mono); font-size: 0.8rem; color: var(--ink-soft);
}
.tests .bar .cmd { color: var(--ink); overflow-x: auto; white-space: nowrap; }
.tests .result { margin-left: auto; font-weight: 700; }
.tests .result.pass { color: var(--good); }
.tests .result.fail { color: var(--retry); }
.tests pre {
margin: 0; padding: 12px 14px; font-family: var(--mono); font-size: 0.78rem; line-height: 1.5;
color: var(--ink-soft); background: var(--bg); max-height: 200px; overflow: auto; white-space: pre-wrap;
}
/* ---------- rail ---------- */
.rail .pad { display: flex; flex-direction: column; gap: 22px; }
.rail h2 {
font-family: var(--display); font-weight: 600; font-size: 0.95rem; color: var(--ink);
margin: 0 0 4px; display: flex; align-items: center; gap: 8px;
}
.meta-row { font-size: 0.85rem; color: var(--ink-soft); }
.meta-row b { color: var(--ink); font-weight: 600; }
.learned { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.learned li {
position: relative; font-size: 0.86rem; color: var(--ink-soft); padding-left: 22px;
}
.learned li.fresh { animation: rise .4s ease both; }
/* A win is a passed stop: the solid disc of the state marks. A ring would read as "not yet". */
.learned li::before {
content: ""; position: absolute; left: 1px; top: .38em; width: 10px; height: 10px; border-radius: 50%; background: var(--accent);
}
.empty { font-size: 0.84rem; color: var(--ink-faint); font-style: italic; }
/* ---------- intake form ---------- */
.intake .step-head { margin-bottom: 8px; }
.intake .lead { color: var(--ink-soft); margin: 0 0 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--display); font-stretch: 80%; font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 8px; }
.field label .sub { font-family: var(--body); font-stretch: 100%; font-weight: 400; font-size: 0.78rem; letter-spacing: 0; text-transform: none; font-style: italic; color: var(--ink-faint); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
font-family: var(--body); font-size: 0.85rem; cursor: pointer; color: var(--ink-soft);
background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 8px 16px;
transition: all .15s;
}
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.intake textarea {
width: 100%; font-family: var(--body); font-size: 0.92rem; color: var(--ink);
background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px;
resize: vertical; min-height: 70px;
}
.intake textarea:focus { outline: none; border-color: var(--accent); }
/* The intake's one select (the tutor's voice), drawn as the fields around it are. */
.field select {
max-width: 100%; min-height: 40px; font-family: var(--body); font-size: 0.9rem; color: var(--ink);
background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; cursor: pointer;
}
.field select:focus-visible { border-color: var(--accent); }
/* ---------- toast ---------- */
.toast {
position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 140%);
background: var(--sheet); color: var(--ink); border: 2px solid var(--ln);
border-radius: var(--radius); padding: 13px 20px; z-index: 200;
font-size: 0.9rem; max-width: 90vw; transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.toast:not(.show) { visibility: hidden; }
.toast.show { transform: translate(-50%, 0); }
.toast b { color: var(--accent); }
/* done state */
.done .step-head { color: var(--accent); }
.done .seal {
font-family: var(--display); font-style: italic; color: var(--ink-soft); font-size: 0.92rem;
}
.done-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
/* ask row + shortcut hint */
.askrow { display: flex; gap: 10px; align-items: center; }
.btn.ask2 { white-space: nowrap; }
.run-hint kbd { font-family: var(--mono); font-size: 0.72rem; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 1px 5px; color: var(--ink-soft); }
/* "your journey" profile widget */
.pwelcome { font-size: 0.86rem; color: var(--ink-soft); margin: 2px 0 8px; }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { font-size: 0.74rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 4px 10px; }
/* confetti */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 9998; overflow: hidden; }
.cpiece { position: absolute; top: -14px; width: 9px; height: 14px; border-radius: var(--radius); opacity: 0.92; animation: confall linear forwards; }
@keyframes confall {
0% { transform: translateY(-12vh) rotate(0deg); }
100% { transform: translateY(112vh) rotate(720deg); }
}
/* ---------- Phase 2 · polish + accessibility ---------- */
/* Visible keyboard focus (mouse clicks stay clean via :focus-visible).
The editor draws its own ring on the container, so drop the inner one. */
:where(button, a, input, textarea, [tabindex]):focus-visible,
.chip:focus-visible, .hint-btn:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
.cinput:focus-visible, .ta-wrap textarea:focus-visible { outline: none; }
/* Richer run-result diff: expected vs got, side by side and colour-coded */
.case { align-items: start; }
.case .cdiff {
grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px;
font-family: var(--mono); font-size: 0.76rem; color: var(--ink-faint);
}
.case .cdiff code { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1px 6px; }
.case .cd-exp code { color: var(--good); }
.case .cd-got code, .case .cd-err { color: var(--retry); }
/* Subtle primary-action lift on hover */
.btn.primary:not(:disabled):hover { transform: translateY(-1px); }
/* Honour reduced-motion: neutralize non-essential animation + transition */
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.001ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.001ms !important;
scroll-behavior: auto !important;
}
}
/* ---------- progress drawer ---------- */
/* `hidden` must beat the display:flex/fixed below (author CSS otherwise overrides
the UA `[hidden]{display:none}`, leaving the drawer stuck open on load). */
.drawer[hidden], .drawer-backdrop[hidden] { display: none !important; }
.drawer-backdrop { position: fixed; inset: 0; background: color-mix(in srgb, var(--bg) 50%, transparent); z-index: 300; }
.drawer {
position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 92vw); z-index: 301;
background: var(--sheet); border-left: 2px solid var(--ln);
display: flex; flex-direction: column; animation: drawerIn .28s cubic-bezier(.2,.7,.2,1);
}
@keyframes drawerIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-head {
display: flex; align-items: center; justify-content: space-between;
padding: 18px 20px; border-bottom: 1px solid var(--line);
}
.drawer-head h2 { font-family: var(--display); font-weight: 600; font-size: 1.1rem; color: var(--ink); margin: 0; }
.drawer-close {
font-family: var(--body); background: transparent; border: 1px solid var(--line-2);
color: var(--ink-soft); border-radius: var(--radius); padding: 4px 11px; cursor: pointer; transition: all .2s;
}
.drawer-close:hover { color: var(--ink); border-color: var(--accent); }
/* The close mark is drawn, not a glyph. */
.drawer-close { position: relative; width: 32px; height: 30px; padding: 0; }
.drawer-close::before, .drawer-close::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; background: currentColor; transform: rotate(45deg); }
.drawer-close::after { transform: rotate(-45deg); }
.drawer-body { padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 22px; }
.pg-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.pg-stat { background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 6px 12px; font-size: 0.82rem; color: var(--ink); }
.pg-sec h3 { font-family: var(--display); font-weight: 600; font-size: 0.95rem; color: var(--ink); margin: 0 0 8px; }
.pg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.pg-list li { font-size: 0.86rem; color: var(--ink-soft); }
.pg-gap { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pg-gap .cx { color: var(--ink-faint); font-size: 0.76rem; }
.pg-gap .due { font-family: var(--mono); font-size: 0.74rem; color: var(--accent); white-space: nowrap; }
.pg-gap.overdue .due { color: var(--retry); }
.pg-empty { color: var(--ink-faint); font-style: italic; font-size: 0.86rem; margin: 0; }
.pg-hist { display: flex; flex-direction: column; gap: 10px; }
.pg-hist .h-date { color: var(--ink-faint); font-family: var(--mono); font-size: 0.72rem; }
.pg-hist > div > div:last-child { font-size: 0.88rem; color: var(--ink-soft); }
/* "tutor working": the animated logo and what the tutor is doing, in the control row while a turn
is in flight, where it covers nothing. The rail's state says the same and stays in view on the
way down the page. */
.working { align-items: center; gap: 8px; min-width: 0; color: var(--muted); font-size: 13px; }
.working:not([hidden]) { display: flex; } /* `hidden` wins by default; show only when unset */
.working-logo { flex: 0 0 auto; width: 22px; height: 22px; display: block; }
/* ---- lesson visuals (trace / flow / compare) -------------------------------
Built as DOM by visuals.js, which is a byte copy of the hosted study screen's
renderer. Token names differ between the two apps, so the CSS is written per
app against local variables rather than copied across. */
.vis { border: 1px solid var(--line); border-radius: var(--radius); padding: 13px; margin: 14px 0; background: var(--panel-2); }
.vis-h { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin-bottom: 10px; }
.vis-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.vis-btn { background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: var(--radius); width: 26px; height: 26px; font-size: 15px; line-height: 1; cursor: pointer; }
.vis-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.vis-btn:disabled { opacity: .35; cursor: default; }
.vis-count { font-size: 12px; color: var(--ink-soft); }
.vis-cap { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 9px; }
.vis-grid { display: flex; flex-direction: column; gap: 4px; }
.vis-row { display: flex; gap: 10px; padding: 5px 8px; border-radius: var(--radius); border: 1px solid transparent; font-size: 13px; }
.vis-row.changed { border-color: var(--accent); background: color-mix(in srgb, var(--mint) 9%, transparent); }
.vis-name { color: var(--ink-soft); min-width: 88px; flex: 0 0 auto; }
.vis-val { color: var(--ink); word-break: break-all; }
.vis-scroll { overflow-x: auto; }
.vis-svg { width: 100%; min-width: 280px; height: auto; display: block; }
.vis-node { fill: var(--panel); stroke: var(--line); stroke-width: 1; }
/* The one box the step is about. Accent fill at low alpha rather than a heavier border, so the
emphasis reads at a glance without the diagram gaining a second weight of line. */
.vis-node.focus { fill: color-mix(in srgb, var(--mint) 12%, transparent); stroke: var(--accent); }
.vis-node-t { fill: var(--ink); font-size: 12px; font-family: var(--mono); }
.vis-node-t.focus { fill: var(--accent); }
.vis-edge { fill: none; stroke: var(--ink-faint); stroke-width: 1; }
.vis-arrowhead { fill: var(--ink-faint); }
/* An edge label is prose ("next() triggers"), not an identifier, so it is set in the body face.
Node labels stay mono because they are usually code. The plate is what lets it read OVER the
curve it belongs to instead of through it. */
.vis-edge-t { fill: var(--ink-faint); font-size: 10.5px; font-family: var(--body); }
.vis-edge-plate { fill: var(--panel-2); stroke: none; }
.vis-cmp { display: flex; flex-direction: column; gap: 2px; }
.vis-cmp-row { display: grid; grid-template-columns: 16px 1fr 1fr; gap: 9px; padding: 4px 7px; border-radius: var(--radius); font-size: 12.5px; }
.vis-cmp-row.head { color: var(--ink-soft); text-transform: uppercase; font-size: 10.5px; letter-spacing: .06em; }
.vis-cmp-row.changed { background: color-mix(in srgb, var(--mint) 10%, transparent); }
.vis-cmp-row.added { background: color-mix(in srgb, var(--good) 14%, transparent); }
.vis-cmp-row.removed { background: color-mix(in srgb, var(--redline) 13%, transparent); }
/* table widget — deliberately NOT shared with the study app's CSS: same markup, different
design tokens (--ink-soft here vs --muted there). Only visuals.js is a byte-identical copy. */
.vis-table { width: 100%; border-collapse: collapse; font-size: 12.5px; display: block; overflow-x: auto; }
.vis-table th { text-align: left; padding: 5px 9px; color: var(--ink-soft); text-transform: uppercase; font-size: 10.5px; letter-spacing: .06em; border-bottom: 1px solid var(--line); white-space: nowrap; }
.vis-table td { padding: 5px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
.vis-table tr:last-child td { border-bottom: 0; }
.vis-cmp-mark { color: var(--ink-soft); }
.vis-cmp-cell { word-break: break-all; }
/* --- in-lesson glossary -------------------------------------------------------------------
A term the tutor used, turned into a button by glossary.js. The renderer is byte-identical to
the hosted one; the CSS deliberately is NOT shared, because the two apps name their tokens
differently (--accent here, --mint there) and a shared stylesheet would have to pick one. */
.ct-term { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0;
cursor: help; border-bottom: 1px dotted var(--accent); border-radius: 0; }
.ct-term:hover, .ct-term:focus-visible { color: var(--accent); border-bottom-style: solid; }
.ct-gloss { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
.ct-gloss-box { position: fixed; pointer-events: auto; width: min(320px, calc(100vw - 20px));
min-width: 0; background: var(--sheet); border: 2px solid var(--ln); border-radius: var(--radius);
padding: 13px 15px 14px; }
.ct-gloss-h { display: flex; align-items: baseline; gap: 10px; }
.ct-gloss-t { flex: 1; min-width: 0; font-family: var(--mono); font-size: .84rem;
color: var(--accent); overflow-wrap: anywhere; }
.ct-gloss-x { background: none; border: 0; color: var(--ink-soft); cursor: pointer;
font-size: .8rem; padding: 0 2px; }
.ct-gloss-x:hover { color: var(--ink); }
.ct-gloss-s { margin-top: 7px; font-size: .86rem; line-height: 1.5; color: var(--ink); }
.ct-gloss-b { margin-top: 7px; font-size: .8rem; line-height: 1.55; color: var(--ink-soft); }
.ct-gloss-e { margin-top: 9px; padding: 8px 10px; background: var(--panel-2); border-radius: var(--radius);
font-family: var(--mono); font-size: .76rem; color: var(--ink); white-space: pre-wrap;
overflow-x: auto; }
.ct-gloss-a { margin-top: 10px; font-size: .76rem; color: var(--ink-soft); }
.ct-gloss-rel { border-bottom-color: var(--ink-soft); cursor: pointer; }
.ct-gloss-d { display: inline-block; margin-top: 10px; font-size: .76rem; color: var(--accent); }
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |