Skip to content

InferHaven/agent-skills / codetrain

codetrain

Flagged

CodeTrain 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.

FileKindSize
LICENSEother11.1 KB
NOTICEother768 B
README.mdmarkdown22.7 KB
SKILL.mdskill md20.1 KB
app/answer_guard.pyscript7.8 KB
app/checkpoint-hook.shexecutablescript1.2 KB
app/ctl.shexecutablescript4.5 KB
app/install-permissions.pyscript6.8 KB
app/patch.pyexecutablescript4.1 KB
app/profile.pyexecutablescript9.3 KB
app/server.pyexecutablescript23.1 KB
app/static/Archivo.woff2binary88.0 KB
app/static/JetBrainsMono.woff2binary30.7 KB
app/static/app.jsscript57.1 KB
app/static/docklint.jsscript4.3 KB
app/static/editor.jsscript4.4 KB
app/static/fonts-OFL.txtmarkdown9.0 KB
app/static/glossary.jsscript50.8 KB
app/static/index.htmlother8.0 KB
app/static/js-worker.jsscript3.9 KB
app/static/liveness.jsscript1.8 KB
app/static/logo-anim.svgother1.9 KB
app/static/prism.jsscript20.6 KB
app/static/prose.jsscript18.8 KB
app/static/pyodide-worker.jsscript7.0 KB
app/static/runner.jsscript4.5 KB
app/static/sheet.cssother32.7 KB
app/static/styles.cssother51.4 KB
app/static/theme-toggle.jsscript9.5 KB
app/static/theme.jsscript5.2 KB
app/static/visuals.jsscript14.8 KB
app/watch.shexecutablescript2.5 KB
install.shexecutablescript2.0 KB
references/session-protocol.mdmarkdown19.6 KB
references/spaced-repetition.mdmarkdown3.4 KB
references/teach-on-diff.mdmarkdown2.5 KB

app/static/sheet.css

View on GitHub
/* CodeTrain - the Working Timetable system: tokens, type and the shared sheet components.

   ONE FILE, LOADED FIRST. The colour tokens used to be copied into every page (home.css, solo.html,
   the app, the study screen, the console, the generated pages), and the light theme was a separate
   override file that missed whatever was added later. A page that has moved to this system links
   this file and declares no colour of its own. Pages that have not moved yet keep their own block
   and do not load this file.

   THE WORLD, in one paragraph. A lesson is a drawn sheet of a railway's working timetable. The
   ground is night and the rain is the weather outside the sheet. A sheet is opaque and framed by
   one pale line, so no rain character ever runs behind text. Line weight carries rank: 2px for a
   frame, 1px for a rule, a hairline for a grid. Teal marks what is checked. The redline marks
   "try again". Code wells stay dark in both themes.

   The rain is a brand commitment (PRODUCT.md): it links this site to InferHaven's. It stays. */

@font-face{font-family:"Archivo";src:url("Archivo.woff2") format("woff2");font-weight:100 900;font-stretch:62% 125%;font-style:normal;font-display:swap}
@font-face{font-family:"JetBrains Mono";src:url("JetBrainsMono.woff2") format("woff2");font-weight:100 900;font-style:normal;font-display:swap}

:root,.paper-sw[data-paper="blueprint"]{
  /* night print */
  --bg:#060c16;          /* the night outside the sheet */
  --sheet:#0c1a2e;       /* the sheet */
  --panel:#102340;       /* a raised panel on the sheet */
  --panel-2:#15294a;     /* fields, chips, inset rows */
  --line:#2a4365;        /* a quiet rule, a control border */
  --ln:#cfe0f4;          /* the drawing line: frames and title-block rules */
  --ink:#eaf2fb;
  --muted:#a9bfdb;
  --mint:#5fd4d0;        /* teal as text and line on the sheet (9.8:1) */
  --mint-fill:#5fd4d0;   /* teal as a fill */
  --on-mint:#06203d;     /* text on a teal fill */
  --amber:#aa3939;       /* brick as a FILL only (the name is history; the colour is brick) */
  --redline:#ff9a85;     /* brick as text or as a mark: "try again" */
  --red:#ff8f8f;         /* something broke */
  --good:#62d39a;        /* a check ran and passed */
  /* the rain's ramp, faint to dense; rain.js reads it (screen-blended on a dark paper) */
  --rain-0:#0f3d3d;
  --rain-1:#2b8a8a;
  --rain-2:#39aaaa;
  --rain-3:#d6efef;
  --well:#07111f;        /* a code well: dark in both themes and on every paper */
  --well-ink:#e3edf9;
  --well-muted:#a9bfdb;
  --well-mint:#5fd4d0;   /* the paper's checked ink as it reads on a dark ground: wells, video */
  /* One corner for every control and panel on the sheet. A drawn sheet has square corners, and a
     2px radius keeps a control from looking cut out of tin. */
  --radius:2px;
  --track-h:64px;
  /* the drafting grid: a hairline is the lightest line weight on the sheet */
  --grid-minor:color-mix(in srgb,var(--ln) 4.5%,transparent);
  --grid-major:color-mix(in srgb,var(--ln) 9%,transparent);
  --ease:cubic-bezier(.16,1,.3,1);
  --display:"Archivo","Helvetica Neue",Helvetica,Arial,sans-serif;
  --sans:"Archivo",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;
  --mono:"JetBrains Mono",ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  /* An alias, not a typeface. Shared files (demo.css, footer.css, skill-band.css) still ask for
     --serif, and pages that have not moved still want Fraunces from it. Here it is the display
     face, so a moved page has one heading voice. Remove it when the last page has moved. */
  --serif:var(--display);
  color-scheme:dark;
}

/* The day sheet. data-theme is stamped by /app/theme.js before first paint. */
:root[data-theme="light"],:root[data-theme="light"] .paper-sw[data-paper="blueprint"]{
  --bg:#dde4e3;
  --sheet:#f4f7f6;
  --panel:#ffffff;
  --panel-2:#e9efed;
  --line:#bfcbc9;
  --ln:#14202b;
  --ink:#14202b;
  --muted:#465668;
  --mint:#146b6d;
  --mint-fill:#146b6d;
  --on-mint:#ffffff;
  --amber:#a8402b;
  --redline:#b3362a;
  --red:#b3261e;
  --good:#1a7a50;
  --well-mint:#5fd4d0;
  /* multiply-blended on a light paper, so the dense end of a drop is the dark one */
  --rain-0:#dff0f0;
  --rain-1:#78bebe;
  --rain-2:#39aaaa;
  --rain-3:#0f3d3d;
  color-scheme:light;
}

/* ---- the papers ----
   A paper is the sheet's whole colour world: the ground it lies on, the sheet, the drawing line,
   the ink, the ink that marks what is checked (the token is still called --mint; its hue is the
   paper's own) and the redline that marks "try again". Blueprint is the two blocks above.
   data-palette is stamped by /app/theme.js before first paint; no attribute means Blueprint.

   EVERY BLOCK DEFINES EVERY COLOUR TOKEN. [data-palette] and [data-theme] blocks have equal
   specificity, so a token left out of one would be borrowed from another paper without a word;
   control-plane/tests/test_design_system.py fails a block that is incomplete or below AA.
   The code wells (--well, --well-ink, --well-muted) are not here: they stay dark on every paper;
   only --well-mint, the paper's ink on a dark ground, follows the paper. */

/* Linen: an old engineering drawing on linen. Sepia ink, verdigris for what is checked, oxblood
   for the redline. */
:root[data-palette="linen"],.paper-sw[data-paper="linen"]{
  --bg:#120d09;
  --sheet:#1f1812;
  --panel:#2a2018;
  --panel-2:#33271d;
  --line:#4a3a2c;
  --ln:#ecdcc4;
  --ink:#f3e9da;
  --muted:#c9b49a;
  --mint:#8fd0a8;
  --mint-fill:#8fd0a8;
  --on-mint:#13261b;
  --amber:#a64a32;
  --redline:#f0a184;
  --red:#f29a8a;
  --good:#9ad48a;
  --well-mint:#8fd0a8;
  --rain-0:#3a2a1c;
  --rain-1:#7a5634;
  --rain-2:#b7834f;
  --rain-3:#f1dcc0;
  color-scheme:dark;
}
:root[data-palette="linen"][data-theme="light"],:root[data-theme="light"] .paper-sw[data-paper="linen"]{
  --bg:#d9cfbf;
  --sheet:#f6f0e4;
  --panel:#fffaf1;
  --panel-2:#efe6d6;
  --line:#d4c6ad;
  --ln:#3b2a1e;
  --ink:#2e2118;
  --muted:#634e3d;
  --mint:#285d43;
  --mint-fill:#285d43;
  --on-mint:#fffaf1;
  --amber:#9c3b26;
  --redline:#962d1a;
  --red:#a32a1c;
  --good:#2e6b3c;
  --well-mint:#8fd0a8;
  --rain-0:#efe4d2;
  --rain-1:#c9ab86;
  --rain-2:#9a6b45;
  --rain-3:#4a3020;
  color-scheme:light;
}

/* Graphite: pencil on drafting vellum. Graphite lines, the engineer's blue pen for what is
   checked (the founder's pick, 2026-11-17: blue ink over graphite, and no orange to read as a
   warning), crimson for the redline. */
:root[data-palette="graphite"],.paper-sw[data-paper="graphite"]{
  --bg:#0d0f11;
  --sheet:#1a1d20;
  --panel:#23272b;
  --panel-2:#2b3035;
  --line:#3d434a;
  --ln:#d9dde1;
  --ink:#eef0f2;
  --muted:#aab1b8;
  --mint:#8fb8f0;
  --mint-fill:#8fb8f0;
  --on-mint:#0a1a33;
  --amber:#b5532a;
  --redline:#ff9aa5;
  --red:#ff8f8f;
  --good:#7fd19b;
  --well-mint:#8fb8f0;
  --rain-0:#24282c;
  --rain-1:#4d545b;
  --rain-2:#8a939b;
  --rain-3:#e3e7ea;
  color-scheme:dark;
}
:root[data-palette="graphite"][data-theme="light"],:root[data-theme="light"] .paper-sw[data-paper="graphite"]{
  --bg:#d8dbdd;
  --sheet:#f1f2f1;
  --panel:#fbfbfa;
  --panel-2:#e7e9e8;
  --line:#c4c8ca;
  --ln:#2a2e33;
  --ink:#1f2328;
  --muted:#50565e;
  --mint:#1f4f8a;
  --mint-fill:#1f4f8a;
  --on-mint:#ffffff;
  --amber:#b5532a;
  --redline:#b02a3a;
  --red:#a8232f;
  --good:#276b40;
  --well-mint:#8fb8f0;
  --rain-0:#e6e8ea;
  --rain-1:#a9afb5;
  --rain-2:#6b737b;
  --rain-3:#2a2e33;
  color-scheme:light;
}

/* ---- the parts of the page the browser draws ---- */
::selection{background:var(--mint-fill);color:var(--on-mint)}
:focus-visible{outline:2px solid var(--mint);outline-offset:3px;border-radius:2px}
html{scrollbar-color:var(--line) var(--bg)}
a{text-underline-offset:.18em;text-decoration-thickness:1px}
input,textarea{caret-color:var(--mint)}

/* Skip link: the first tab stop on a moved page. Out of sight until it has focus. */
.skip{position:absolute;left:12px;top:-60px;z-index:100;background:var(--mint-fill);color:var(--on-mint);font-family:var(--display);font-weight:700;font-size:14px;padding:10px 14px;border-radius:2px;text-decoration:none}
.skip:focus{top:10px}

/* ---- the label voice: narrow caps, for a name of a thing, never for a sentence ---- */
.cap{font-family:var(--display);font-stretch:80%;font-weight:600;font-size:11.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}

/* ---- the sheet ---- */
.sheet{background:var(--sheet);border:2px solid var(--ln);color:var(--ink)}

/* ---- the title block: ruled cells, a label over a value ----
   The 1px gap on a line-coloured ground draws every rule, so the cells may wrap to any number of
   rows and the rules stay whole. */
.tblock{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;background:var(--ln);border-top:2px solid var(--ln)}
.tblock > *{min-width:0;background:var(--sheet);padding:10px 18px 11px;display:flex;flex-direction:column;gap:2px}
.tblock small{font-family:var(--display);font-stretch:80%;font-weight:600;font-size:11px;letter-spacing:.09em;text-transform:uppercase;color:var(--muted)}
.tblock strong{font-family:var(--display);font-stretch:88%;font-weight:650;font-size:16px;letter-spacing:.03em;text-transform:uppercase;line-height:1.25;overflow-wrap:anywhere}
.tblock .stamp{color:var(--mint)}
@media(max-width:820px){.tblock{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* ---- state marks: drawn, one stroke weight, never a glyph from a font ----
   done = passed unaided, help = passed with a hint, fail = try again, (none) = not yet. */
.mk{display:inline-block;flex:0 0 auto;width:12px;height:12px;border-radius:50%;border:2px solid var(--mint);vertical-align:-1px}
.mk.done{background:var(--mint)}
.mk.help{background:linear-gradient(90deg,var(--mint) 50%,transparent 50%)}
.mk.fail{border:0;border-radius:0;background:
  linear-gradient(45deg,transparent 42%,var(--redline) 42% 58%,transparent 58%),
  linear-gradient(-45deg,transparent 42%,var(--redline) 42% 58%,transparent 58%)}
.mk.next{border-color:var(--line)}

/* ---- utilities ---- */
.vh{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
html{scroll-padding-top:calc(var(--track-h) + 16px)}

/* ---- the rail: the site's navigation, drawn as a line ----
   The brand is where the line starts, every page is a station on it, the page you are on is the
   filled station, and Start free is the terminus. On the way down the page the bar slides up and
   leaves only its line; it comes back on the way up, on hover and on keyboard focus (/sheet.js
   sets the two classes, and without it the bar simply stays). At the top of the page the bar is
   a tint over the night, so the rain carries on behind it. No blur: the rain is weather, not
   frosted glass.

   Geometry, all from --track-h: the line's centre sits 7px above the bottom edge, every station
   mark is centred on it, and .is-line moves the bar up by all but its last 14px, which is the
   line and its marks. */
nav.track{position:sticky;top:0;z-index:30;height:var(--track-h);background:color-mix(in srgb,var(--bg) 80%,transparent);transition:transform .34s var(--ease),background-color .2s}
nav.track.is-off-top{background:var(--bg)}
nav.track.is-line{transform:translateY(calc(14px - var(--track-h)))}
nav.track.is-line:hover,nav.track:focus-within{transform:none}
/* Retracted, the strip that stays is the line and its station marks; the controls above it fade
   so no sliver of a button edge hangs in the strip. */
.track-tools,.track-term .btn{transition:opacity .2s}
nav.track.is-line:not(:hover):not(:focus-within) .track-tools,
nav.track.is-line:not(:hover):not(:focus-within) .track-term .btn{opacity:0}
@media (prefers-reduced-motion:reduce){nav.track{transition:none}}
.track-in{position:relative;max-width:1244px;height:100%;margin:0 auto;padding:0 24px;display:flex;align-items:stretch;gap:clamp(14px,2.2vw,30px)}
/* The line, from the origin under the brand mark to the buffer stop under Start free. */
.track-in::after{content:"";position:absolute;left:38px;right:24px;bottom:6px;height:2px;background:color-mix(in srgb,var(--ln) 55%,transparent);pointer-events:none}
.track a{text-decoration:none}
/* Every item is the bar's full height, so a mark at bottom:2px lands on the line. */
.track-origin,.track-stops a,.track-term,.track-tools{position:relative;display:flex;align-items:center}
.track-origin{gap:10px;color:var(--ink);font-family:var(--display);font-stretch:106%;font-weight:700;font-size:17px;white-space:nowrap;min-width:0}
.track-origin svg{flex:0 0 auto;display:block}
.track-origin .beta{margin-left:2px}
.track-stops{display:flex;align-items:stretch;gap:clamp(18px,2.6vw,34px);margin:0 0 0 auto;padding:0;list-style:none}
.track-stops li{display:flex}
.track-stops a{color:var(--muted);font-family:var(--display);font-weight:560;font-size:15px;white-space:nowrap;transition:color .16s}
.track-stops a:hover{color:var(--ink)}
.track-stops a[aria-current="page"]{color:var(--ink);font-weight:650}
/* The station marks: a ring on the line under each label, filled for the page you are on.
   The origin's mark sits under the brand mark, the start of the line. */
.track-stops a::after,.track-origin::after{content:"";position:absolute;left:50%;bottom:2px;width:10px;height:10px;margin-left:-5px;border-radius:50%;border:2px solid var(--ln);background:var(--bg);box-sizing:border-box;transition:border-color .16s,background-color .16s}
.track-origin::after{left:14px}
.track-stops a:hover::after{border-color:var(--mint)}
.track-stops a[aria-current="page"]::after,.track-origin[aria-current="page"]::after{background:var(--ln)}
.track-tools{gap:8px}
/* The terminus: the line ends at a buffer stop under the right edge of Start free. */
.track-term::after{content:"";position:absolute;right:0;bottom:0;width:2px;height:14px;background:var(--ln)}
.track-term .btn{padding:8px 15px}
/* The terminus answers to this file alone, so a page's own .btn or a{} rules cannot repaint it:
   the filled teal button, or the drawn-line one on a page whose hero already carries the filled one. */
.track-term .btn.btn-primary{background:var(--mint-fill);border-color:var(--mint-fill);color:var(--on-mint)}
.track-term .btn.btn-ghost{background:transparent;border-color:var(--ln);color:var(--ink)}
.track-term .btn.btn-ghost:hover{border-color:var(--mint);color:var(--mint)}
.beta{display:inline-block;font-family:var(--display);font-stretch:80%;font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--mint);border:1px solid currentColor;border-radius:var(--radius);padding:1px 6px;line-height:1.5}

/* The theme control. An icon drawn by /theme-toggle.js; the name of the mode is its label. */
.themebtn{display:inline-grid;place-items:center;width:34px;height:34px;padding:0;background:transparent;border:1px solid var(--line);border-radius:var(--radius);color:var(--muted);font:inherit;font-size:13px;line-height:1;cursor:pointer;transition:border-color .16s,color .16s}
.themebtn:hover{border-color:var(--mint);color:var(--ink)}
.themebtn svg{display:block;width:16px;height:16px}

/* A phone: the stations move to a second row and keep their names, so the site can be walked from
   the top of any page. The line runs under that row; the terminus stays on the first. */
@media (max-width:760px){
  :root{--track-h:98px}
  .track-in{flex-wrap:wrap;align-content:flex-start;column-gap:10px;row-gap:0;padding:0 16px}
  .track-origin,.track-tools,.track-term{height:56px}
  .track-origin{margin-right:auto;font-size:16px}
  .track-origin::after{display:none}
  .track-stops{order:3;flex:1 0 100%;height:42px;margin:0;justify-content:space-between;gap:0}
  .track-stops a{font-size:14px;padding:0 2px 6px}
  .track-stops li:first-child a::after{left:6px}
  .track-stops li:last-child a::after{left:auto;right:1px;margin-left:0}
  .track-in::after{left:16px;right:16px}
  .track-term::after{display:none}
  .track-term .btn{padding:8px 13px;font-size:14px}
}
@media (max-width:380px){.track-origin .beta{display:none}}

/* Both ends of the line ship in every rail; the visitor marker (stamped by /app/theme.js before
   first paint) picks one. A browser where an account has been used gets Dashboard and no Log in;
   with no marker, no script or blocked storage it is Start free, the safe direction. */
.track-term .track-back{display:none}
:root[data-visitor="returning"] .track-term .track-new{display:none}
:root[data-visitor="returning"] .track-term .track-back{display:inline-block}
:root[data-visitor="returning"] .track-login{display:none}

/* "You are here": one filled mark that rides the line. The station's own mark stays a ring, so
   when the browser slides this from the station you left to the one you arrived at, the fill is
   seen to travel. */
.here{position:absolute;z-index:1;left:50%;bottom:2px;width:10px;height:10px;margin-left:-5px;border-radius:50%;background:var(--ln);pointer-events:none}
.track-stops a[aria-current="page"]::after,.track-origin[aria-current="page"]::after{background:var(--bg)}
.track-origin .here{left:14px}
.track-term{position:relative}
.track-term .here{left:50%}
@media (max-width:760px){
  .track-stops li:first-child .here{left:6px}
  .track-stops li:last-child .here{left:auto;right:1px;margin-left:0}
  /* A returning visitor's rail has no Log in, so Pricing is the station at the end of the line. */
  :root[data-visitor="returning"] .track-stops li:nth-last-child(2) a::after,
  :root[data-visitor="returning"] .track-stops li:nth-last-child(2) .here{left:auto;right:1px;margin-left:0}
  .track-origin .here{display:none}
}
/* The slide, page to page and tab to tab: View Transitions, no script. The rest of the page swaps
   at once (the root takes no transition), so only the mark moves. A browser without them, or a
   reader who asked for less motion, simply sees the mark where it now is. */
@media (prefers-reduced-motion:no-preference){
  @view-transition{navigation:auto}
  :root{view-transition-name:none}
  .track .here{view-transition-name:rail-here}
  .track-branch .here{view-transition-name:branch-here}
  ::view-transition-group(rail-here){animation-duration:.34s;animation-timing-function:cubic-bezier(.16,1,.3,1)}
  ::view-transition-group(branch-here){animation-duration:.22s;animation-timing-function:cubic-bezier(.16,1,.3,1)}
  /* Nothing else is captured, so nothing should wait on the slide: clicks go straight through. */
  ::view-transition{pointer-events:none}
}

/* The signed-in screens (/app/, /app/study/): the same rail with the account's tools and the
   dashboard as its terminus. Opaque, because work scrolls under it, and it never retracts: an
   Operate surface keeps its header. Sign out keeps its space before Clerk answers, so the rail
   does not shift when it appears. */
header.app-head{position:sticky;top:0;z-index:30}
nav.track.track-app{position:relative;background:var(--bg)}
.track-app .track-tools{gap:8px}
.track-app .track-term .track-back{display:inline-block}
.track-signout:not(.is-on){visibility:hidden}
@media (max-width:760px){
  /* One row on a phone: the mark, the tools and the way to the dashboard. The site's stations are
     a tap away on any public page; the dashboard's own branch line sits right under this. */
  :root:has(nav.track-app){--track-h:56px}
  .track-app .track-in{flex-wrap:nowrap}
  .track-app .track-stops{display:none}
  .track-app .track-origin{margin-right:auto}
  .track-app .track-in::after{left:16px}
}
@media (max-width:760px){
  .track-app .track-term .btn{padding:7px 12px}
  .track-app .track-signout{padding:6px 10px}
}
/* A phone has room for the mark, the tools and the way to the dashboard, not the name as well. */
@media (max-width:500px){.track-app .track-name,.track-app .beta{display:none}}

/* ---- the branch line: the dashboard's own stations, off the main rail ----
   The tabs of /app/ as stations on a second line that leaves the main one at a junction under the
   brand mark. The open tab is the filled mark, and a switch slides it (View Transitions). On a
   phone the stations scroll sideways: the junction stays where it is, and the line runs under
   every station however far they scroll, because it is drawn by the row of stations itself. */
/* Above the rail, so the junction can leave the origin's mark; nothing else of it reaches up. */
.track-branch{--branch-ln:color-mix(in srgb,var(--ln) 40%,transparent);position:relative;z-index:31;background:var(--bg)}
.track-branch-in{--jx:38px;--pad:56px;position:relative;max-width:1244px;height:46px;margin:0 auto;padding:0 24px 0 var(--pad)}
/* The junction: down from the main line, then along to where the stations begin. */
.track-branch-in::before{content:"";position:absolute;left:var(--jx);top:-2px;width:2px;height:calc(100% - 4px);background:var(--branch-ln)}
.track-branch-in::after{content:"";position:absolute;left:var(--jx);bottom:6px;width:calc(var(--pad) - var(--jx));height:2px;background:var(--branch-ln)}
.track-branch-scroll{height:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
.track-branch-scroll::-webkit-scrollbar{display:none}
.track-branch-stops{position:relative;display:flex;align-items:stretch;gap:clamp(16px,2.4vw,30px);width:max-content;min-width:100%;height:100%}
.track-branch-stops::after{content:"";position:absolute;left:0;right:0;bottom:6px;height:2px;background:var(--branch-ln);pointer-events:none}
.track-branch a{position:relative;display:flex;align-items:center;padding:0 0 8px;color:var(--muted);font-family:var(--display);font-weight:600;font-size:14px;white-space:nowrap;text-decoration:none;transition:color .16s}
.track-branch a:hover{color:var(--ink)}
.track-branch a[aria-current="page"]{color:var(--ink);font-weight:650}
.track-branch a::after{content:"";position:absolute;z-index:1;left:50%;bottom:2px;width:10px;height:10px;margin-left:-5px;border-radius:50%;border:2px solid color-mix(in srgb,var(--ln) 70%,transparent);background:var(--bg);box-sizing:border-box;transition:border-color .16s}
.track-branch a .here{z-index:2}
.track-branch a:hover::after{border-color:var(--mint)}
/* Drawn inside the station: the sideways scroller would clip a ring drawn outside it. */
.track-branch a:focus-visible{outline:2px solid var(--mint);outline-offset:-2px}
.track-branch a[hidden]{display:none}
/* The branch belongs to a signed-in account. Before the page knows (Clerk is still loading) it is
   drawn for a browser that has had one, so the dashboard keeps its shape from the first paint; it
   goes the moment the page knows nobody is signed in. */
.track-branch{display:none}
:root[data-visitor="returning"]:not([data-session]) .track-branch,:root[data-session="in"] .track-branch{display:block}
@media (max-width:760px){.track-branch-in{--jx:26px;--pad:44px;padding-right:16px}}

/* ---- the page sheet ----
   <main class="page-sheet"> and the footer's title block (.ft-sheet, footer.css) are one drawn
   sheet: the frame opens at the top of main and closes under the title block. Where the sheet
   floats in the night (a wide screen) it gets the rest of a drawing: an inset second frame line,
   zone marks between the two (/sheet.js), crop marks at the corners and a drafting grid that
   fades out before it reaches the words. On a narrower screen the sheet is the screen's width and
   keeps only its top and bottom frame lines. */
.page-sheet{position:relative;display:block;max-width:1244px;margin:var(--sheet-top,clamp(20px,4.6vw,64px)) auto 0;background-color:var(--sheet);border:2px solid var(--ln);border-bottom:0}
@media (max-width:1244px){.page-sheet{border-left-width:0;border-right-width:0}}
@media (min-width:1000px){
  .page-sheet{
    background-image:
      linear-gradient(90deg,transparent 0,var(--sheet) 19%,var(--sheet) 81%,transparent 100%),
      linear-gradient(90deg,var(--grid-major) 1px,transparent 1px),
      linear-gradient(var(--grid-major) 1px,transparent 1px),
      linear-gradient(90deg,var(--grid-minor) 1px,transparent 1px),
      linear-gradient(var(--grid-minor) 1px,transparent 1px);
    background-size:100% 100%,120px 120px,120px 120px,24px 24px,24px 24px;
    background-position:0 0,17px 17px,17px 17px,17px 17px,17px 17px;
  }
}
@media (min-width:1245px){
  .page-sheet{padding:18px 18px 0}
  .page-sheet::after{content:"";position:absolute;inset:17px 17px 0;border:1px solid color-mix(in srgb,var(--ln) 42%,transparent);border-bottom:0;pointer-events:none}
}
/* Crop marks, only where the night is wide enough to hold them without a sideways scroll. */
@media (min-width:1320px){
  .page-sheet::before{content:"";position:absolute;left:-28px;right:-28px;top:-28px;height:28px;pointer-events:none;
    --c:color-mix(in srgb,var(--ln) 60%,transparent);
    background:
      linear-gradient(var(--c),var(--c)) 0 100%/18px 1px no-repeat,
      linear-gradient(var(--c),var(--c)) 26px 0/1px 18px no-repeat,
      linear-gradient(var(--c),var(--c)) 100% 100%/18px 1px no-repeat,
      linear-gradient(var(--c),var(--c)) calc(100% - 26px) 0/1px 18px no-repeat}
}
/* The zone marks /sheet.js writes into the band between the two frame lines. */
.zones{position:absolute;inset:0;pointer-events:none;font-family:var(--display);font-stretch:80%;font-weight:600;font-size:9.5px;line-height:1;letter-spacing:.08em;color:color-mix(in srgb,var(--muted) 75%,transparent);
  --t:color-mix(in srgb,var(--ln) 34%,transparent)}
.zones span{position:absolute;transform:translate(-50%,-50%)}
.zones i{position:absolute;background:var(--t)}
@media (max-width:1244px){.zones{display:none}}

/* ---- a dimension line: a measured length, drawn the way a drawing dimensions a part ----
   Ticks at both ends, the measurement in the middle on the sheet's own ground. Only for a length
   that is true: the run of a video, the range of a figure. */
.dim{display:flex;align-items:center;gap:10px;font-family:var(--display);font-stretch:80%;font-weight:600;font-size:11px;line-height:1;letter-spacing:.09em;text-transform:uppercase;color:var(--muted);white-space:nowrap}
.dim::before,.dim::after{content:"";flex:1 1 auto;height:9px;
  background:linear-gradient(color-mix(in srgb,var(--ln) 55%,transparent),color-mix(in srgb,var(--ln) 55%,transparent)) 0 50%/100% 1px no-repeat}
.dim::before{border-left:1px solid color-mix(in srgb,var(--ln) 70%,transparent)}
.dim::after{border-right:1px solid color-mix(in srgb,var(--ln) 70%,transparent)}

/* ---- the stamp: "Checked by CodeTrain" once a check has passed ----
   The value in the title block's Checked by cell gets a drawn stamp: a teal frame, a tick and a
   slight turn, the way a checker's stamp lands on a sheet. Outline and a positioned tick, so the
   cell keeps its size and nothing under it moves. It lands once; with reduced motion it is
   simply there. */
.tblock .stamp{position:relative;align-self:flex-start;transform-origin:30% 60%}
.tblock .stamp.is-stamped{outline:2px solid var(--mint);outline-offset:2px;margin-right:22px;transform:translateY(3px) rotate(-2deg)}
.tblock .stamp.is-stamped::after{content:"";position:absolute;right:-17px;top:50%;width:10px;height:5px;border-left:2px solid var(--mint);border-bottom:2px solid var(--mint);transform:translateY(-70%) rotate(-45deg)}
.tblock .stamp.is-stamped.is-fresh{animation:stamp-land .38s var(--ease) both}
@keyframes stamp-land{0%{opacity:0;transform:translateY(3px) rotate(-2deg) scale(1.45)}60%{opacity:1}100%{opacity:1;transform:translateY(3px) rotate(-2deg) scale(1)}}
@media (prefers-reduced-motion:reduce){.tblock .stamp.is-stamped.is-fresh{animation:none}}

/* ---- the rain: the weather outside the sheet (web/rain.js) ----
   Fixed behind everything, so it shows only where there is night: above the sheet, in the margins
   beside it on a wide screen, and under it. On the day sheet it multiplies instead of screening:
   screen against a near-white page collapses to the page and erases the canvas entirely,
   whatever colour it draws, and rain.js carries the matching inverted colour ramp. */
.rain{position:fixed;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none;mix-blend-mode:screen}
:root[data-theme="light"] .rain{mix-blend-mode:multiply;opacity:.85}

/* ---- the stop line: where a lesson stands, one mark per step ----
   Shared by the lesson screen and the homepage lesson. A passed step is a filled mark joined to
   the next by a teal rule; the current one is ringed; a failed check turns it into the redline
   cross. The words are for a screen reader (.vh); the marks are for the eye. Scoped to .stops so
   the roadmap's own .stop rows never pick it up. */
.stops{display:flex;align-items:center;list-style:none;margin:0 0 16px;padding:0}
.stops>.stop{display:flex;align-items:center;flex:1 1 0;min-width:0;font-family:var(--display);font-stretch:80%;font-weight:600;font-size:12px;letter-spacing:.06em;color:var(--muted)}
.stops>.stop:last-child{flex:0 0 auto}
.stops>.stop .mk{margin-right:6px}
.stops>.stop:not(:last-child)::after{content:"";flex:1;min-width:10px;height:2px;margin:0 8px;background:var(--line)}
.stops>.stop.done:not(:last-child)::after{background:var(--mint)}
.stops>.stop.cur,.stops>.stop.fail{color:var(--ink)}
.stops>.stop.cur .mk{outline:2px solid var(--mint);outline-offset:2px}

/* ---- buttons: one corner, one weight, the same on every page ----
   The primary is the teal fill with its own ink; the ghost is drawn in the line colour. Nothing
   lifts or glows at rest; a hover answers with a brighter fill or a teal line. `background` is
   load-bearing on a <button>: without it a ghost falls back to the UA's light `buttonface`. */
.btn{display:inline-block;border-radius:var(--radius);padding:11px 18px;font-family:var(--display);font-weight:650;font-size:15px;line-height:1.3;text-decoration:none;border:1.5px solid transparent;cursor:pointer;transition:transform .16s var(--ease),filter .16s,border-color .16s,color .16s}
.btn-primary{background:var(--mint-fill);color:var(--on-mint);border-color:var(--mint-fill);font-weight:700}
.btn-primary:hover{filter:brightness(1.08);transform:translateY(-1px)}
.btn-ghost{background:transparent;border-color:var(--ln);color:var(--ink)}
.btn-ghost:hover{border-color:var(--mint);color:var(--mint);transform:translateY(-1px)}
/* A bare .btn, with no kind named, is the quiet one: drawn in the line colour. :where() keeps it at
   the specificity of .btn alone, so any page's own button rule still wins over it. */
.btn:where(:not(.btn-primary):not(.btn-ghost)){background:transparent;border-color:var(--ln);color:var(--ink)}
.btn:where(:not(.btn-primary):not(.btn-ghost)):hover{border-color:var(--mint);color:var(--mint)}
.btn[aria-disabled="true"]{pointer-events:none;opacity:.6;cursor:not-allowed}
@media (prefers-reduced-motion:reduce){.btn:hover{transform:none}}

/* ---- the paper and light control (web/theme-toggle.js) ----
   One popover from the theme button on every page: the paper, then the light. It sits in the top
   layer, drawn as a small sheet of its own. */
.paper-menu{position:fixed;inset:auto;margin:0;width:268px;max-width:calc(100vw - 16px);padding:14px 16px 16px;background:var(--sheet);color:var(--ink);border:2px solid var(--ln);border-radius:var(--radius);box-shadow:0 22px 48px -22px rgba(0,0,0,.6);font-family:var(--sans);font-size:14px}
.paper-menu fieldset{border:0;margin:0;padding:0;min-width:0}
.paper-menu fieldset+fieldset{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
.paper-menu legend{padding:0;margin:0 0 9px;font-family:var(--display);font-stretch:80%;font-weight:600;font-size:11px;letter-spacing:.09em;text-transform:uppercase;color:var(--muted)}
.paper-opts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.paper-opt{position:relative;display:flex;flex-direction:column;gap:6px;cursor:pointer;font-family:var(--display);font-weight:600;font-size:13px;line-height:1.25;color:var(--ink)}
.paper-opt input,.mode-opt input{position:absolute;opacity:0;width:1px;height:1px;margin:0;pointer-events:none}
/* A swatch is the paper drawn small: its sheet, its frame line and a stroke of its checked ink. */
/* Each swatch carries its own paper's tokens (the paper blocks above name it beside :root), so it
   is drawn from the paper itself and cannot fall out of step with it. */
.paper-sw{display:block;height:36px;border-radius:var(--radius);background:linear-gradient(var(--mint),var(--mint)) 12px 62%/42% 3px no-repeat,var(--sheet);box-shadow:inset 0 0 0 4px var(--sheet),inset 0 0 0 5px var(--ln),0 0 0 1px var(--line)}
.paper-opt input:checked+.paper-sw{box-shadow:inset 0 0 0 4px var(--sheet),inset 0 0 0 5px var(--ln),0 0 0 2px var(--mint)}
.paper-opt input:focus-visible+.paper-sw{outline:2px solid var(--mint);outline-offset:3px}
/* The light: three segments in one ruled row. */
.mode-opts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--line);border-radius:var(--radius)}
.mode-opt{position:relative;cursor:pointer}
.mode-opt+.mode-opt{border-left:1px solid var(--line)}
.mode-face{display:flex;align-items:center;justify-content:center;gap:6px;min-height:36px;padding:0 6px;font-family:var(--display);font-weight:600;font-size:13px;color:var(--muted);transition:background-color .16s,color .16s}
.mode-face svg{flex:0 0 auto;width:14px;height:14px}
.mode-opt:hover .mode-face{color:var(--ink)}
.mode-opt input:checked+.mode-face{background:var(--mint-fill);color:var(--on-mint)}
.mode-opt input:focus-visible+.mode-face{outline:2px solid var(--mint);outline-offset:2px}
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: 471kUpdated Claude CodeCodexVerifiedInstall
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: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
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 availableStars: 322kUpdated Claude CodeCodexVerifiedInstall