:root {
  color-scheme: light;
  --bg: #f9f9f7;
  --surface: #fcfcfb;
  --card: #ffffff;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #6f6d68;
  --line: #e1e0d9;
  --line-2: #c3c2b7;
  --accent: #2a78d6;
  --accent-ink: #ffffff;
  --code-bg: #f3f2ee;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --good-ink: #006300;
  --critical-ink: #a32424;
  --j-key: #1c5cab;
  --j-str: #0f6b3f;
  --j-num: #a34a12;
  --j-lit: #6250d6;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d0d0d; --surface: #1a1a19; --card: #161615; --ink: #f0efec; --ink-2: #c3c2b7; --muted: #9a988f;
    --line: #2c2c2a; --line-2: #383835; --accent: #3987e5; --code-bg: #20201e;
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
    --good-ink: #0ca30c; --critical-ink: #e66767;
    --j-key: #86b6ef; --j-str: #6fcf97; --j-num: #f0a46c; --j-lit: #9085e9;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0d0d; --surface: #1a1a19; --card: #161615; --ink: #f0efec; --ink-2: #c3c2b7; --muted: #9a988f;
  --line: #2c2c2a; --line-2: #383835; --accent: #3987e5; --code-bg: #20201e;
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
  --good-ink: #0ca30c; --critical-ink: #e66767;
  --j-key: #86b6ef; --j-str: #6fcf97; --j-num: #f0a46c; --j-lit: #9085e9;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  display: flex; flex-direction: column;
}
h2 { font-size: 1.05rem; margin: 1.2rem 0 .5rem; }
h2:first-child { margin-top: .2rem; }
h3 { font-size: .95rem; margin: 1rem 0 .4rem; }
h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); margin: 1rem 0 .3rem; }
code, .mono, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }
code { background: var(--code-bg); padding: 0 .25em; border-radius: 4px; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.spacer { flex: 1; }
.fatal { background: var(--critical); color: #fff; padding: 1rem; margin: 0; }

/* ---------- page frame: header, sidebar, footer ---------- */
.top { flex: none; display: flex; align-items: center; gap: 1.2rem; height: 56px; padding: 0 1.1rem; border-bottom: 1px solid var(--line); background: var(--card); }
.brand { display: flex; align-items: center; gap: .6rem; flex: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 1.05rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1rem; letter-spacing: -.01em; }
.brand-text span { font-size: .74rem; color: var(--muted); }
.crumb { display: flex; align-items: center; gap: .45rem; min-width: 0; padding-left: 1.2rem; border-left: 1px solid var(--line); font-size: .88rem; color: var(--muted); white-space: nowrap; overflow: hidden; }
.crumb b { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.crumb-sep { color: var(--line-2); }
@media (max-width: 1200px) { #crumbGroup, .crumb-sep { display: none; } }
.top-right { margin-left: auto; display: flex; gap: .6rem; align-items: center; flex: none; }
.pill { font-size: .8rem; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: .15rem .6rem; }
.pill.status { display: inline-flex; align-items: center; gap: .45rem; background: var(--surface); }
.pill.status::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--good); }

.shell { flex: 1; min-height: 0; display: grid; grid-template-columns: 252px minmax(0, 1fr); }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: .9rem .6rem; display: flex; flex-direction: column; gap: 1.1rem; overflow-y: auto; }
.side-group { display: flex; flex-direction: column; gap: .15rem; }
.side-label { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 0 .6rem .3rem; }
.side-item { position: relative; display: flex; gap: .6rem; align-items: center; text-align: left; background: none; border: 0; border-radius: 8px; padding: .5rem .6rem; cursor: pointer; color: var(--ink); }
.side-item:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.side-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.side-item[aria-current="page"] { background: var(--card); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgb(0 0 0 / .06); }
.side-item[aria-current="page"]::before { content: ''; position: absolute; left: 0; top: .55rem; bottom: .55rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.side-num { flex: none; width: 1.55rem; height: 1.55rem; border-radius: 6px; display: grid; place-items: center; font-weight: 700; font-size: .78rem; background: var(--card); border: 1px solid var(--line-2); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.side-item[aria-current="page"] .side-num { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.side-text { display: flex; flex-direction: column; gap: .05rem; min-width: 0; flex: 1; }
.side-title { display: flex; align-items: center; gap: .35rem; }
.side-text b { font-size: .86rem; font-weight: 600; line-height: 1.25; }
.side-text small { font-size: .72rem; color: var(--muted); line-height: 1.3; }

.foot { flex: none; display: flex; align-items: center; gap: 1rem; padding: .35rem 1.1rem; border-top: 1px solid var(--line); background: var(--card); font-size: .74rem; color: var(--muted); }
.foot-right { margin-left: auto; display: flex; gap: .45rem; align-items: center; }
.foot code { font-size: .72rem; }
.layout { min-height: 0; display: grid; grid-template-columns: minmax(340px, min(42%, 600px)) minmax(0, 1fr); }  /* zoomed out, the left column stops at 600px */
.left { display: flex; flex-direction: column; min-height: 0; padding: .8rem; gap: .6rem; border-right: 1px solid var(--line); overflow-y: auto; }  /* every module's left column scrolls inside the frame: zoomed in, a short window must not push it past the footer */
.right { display: flex; flex-direction: column; min-height: 0; }
/* Zoom: browser zoom changes the width the page has. 900-1279px (about 110-160% on a laptop): the sidebar shows only the
   module numbers, so the work gets the room; under 900px the page stacks. Zoomed out, panel content stops at 1280px. */
.layout:has(> .split) { grid-template-columns: var(--leftcol, minmax(340px, min(42%, 600px))) 8px minmax(0, 1fr); }  /* the learner can drag the divider */
.split { position: relative; cursor: col-resize; touch-action: none; margin-left: -1px; }
.split::before { content: ''; position: absolute; top: 50%; left: 2px; width: 4px; height: 40px; border-radius: 3px; background: var(--line-2); transform: translateY(-50%); }
.split:hover, .split:focus-visible, body.resizing .split { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.split:hover::before, body.resizing .split::before { background: var(--accent); }
.split:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
body.resizing { cursor: col-resize; user-select: none; }
@media print { .split { display: none; } }
@media (min-width: 901px) and (max-width: 1279px) {
  .shell { grid-template-columns: 64px minmax(0, 1fr); }
  .sidebar { padding: .6rem .5rem; gap: .5rem; }
  .side-label, .side-text { display: none; }
  .side-group + .side-group { border-top: 1px solid var(--line); padding-top: .5rem; }
  .side-item { justify-content: center; padding: .45rem 0; }
}
.right .panel > * { max-width: 1280px; }
.twrap { overflow-x: auto; max-width: 100%; }  /* every table: it fills its panel, and scrolls on its own when it cannot fit */
@media print { .twrap { overflow: visible; } }
@media (max-width: 900px) {
  html, body { height: auto; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { flex-direction: row; gap: .3rem; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; padding: .4rem; }
  .side-group { flex-direction: row; gap: .3rem; }
  .side-label, .side-text small { display: none; }
  .side-item { flex: none; white-space: nowrap; }
  .side-item[aria-current="page"]::before { left: .6rem; right: .6rem; top: auto; bottom: 0; width: auto; height: 3px; border-radius: 3px 3px 0 0; }
  .crumb { display: none; }
  .top { height: auto; padding: .5rem .8rem; flex-wrap: wrap; gap: .6rem; }
  .foot { flex-wrap: wrap; gap: .3rem; padding: .45rem .8rem; }
  .foot-right { margin-left: 0; flex-wrap: wrap; }
  .left { overflow: visible; }
  .layout, .layout:has(> .split) { grid-template-columns: minmax(0, 1fr); }
  .split { display: none; }  /* stacked on a phone: nothing to resize */
  .left { border-right: 0; border-bottom: 1px solid var(--line); }
  .chat { min-height: 300px; max-height: 70vh; }
  .panel { overflow: visible; }
}
select, input { max-width: 100%; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .7rem .8rem; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: .4rem; }
label { font-size: .85rem; color: var(--ink-2); display: inline-flex; align-items: center; gap: .35rem; }
label.block { display: flex; flex-direction: column; align-items: stretch; gap: .2rem; margin-bottom: .4rem; }
label.check { cursor: pointer; }
input, select, textarea, button { font: inherit; color: inherit; }
input[type=number], input[type=text], input[type=password], input:not([type]), select, textarea {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 6px; padding: .3rem .45rem;
}
input[type=number] { width: 6.5rem; }
textarea { width: 100%; resize: vertical; }
.btn { background: var(--surface); border: 1px solid var(--line-2); border-radius: 6px; padding: .35rem .8rem; cursor: pointer; text-decoration: none; color: var(--ink); font-size: .9rem; display: inline-block; white-space: nowrap; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--critical-ink); }
.btn.small { padding: .1rem .5rem; font-size: .8rem; }
.btn:disabled { opacity: .5; cursor: wait; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.settings textarea { font-size: .85rem; }
.chat { flex: 1; min-height: 12rem; overflow-y: auto; display: flex; flex-direction: column; gap: .5rem; padding: .2rem; }
.msg { max-width: 92%; padding: .55rem .75rem; border-radius: 10px; white-space: pre-wrap; word-wrap: break-word; }
.msg.user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); }
.msg.assistant { align-self: flex-start; background: var(--card); border: 1px solid var(--line); }
.msg.error { align-self: flex-start; background: var(--card); border: 1px solid var(--critical); }
.msg.note { align-self: center; font-size: .85rem; color: var(--muted); }
.msg .meta { white-space: normal; margin-top: .4rem; font-size: .78rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .2rem .7rem; align-items: center; }
.reasoning { white-space: pre-wrap; font-size: .82rem; color: var(--muted); border-left: 3px solid var(--line-2); padding-left: .5rem; margin-bottom: .4rem; max-height: 10rem; overflow-y: auto; }
.reasoning::before { content: "Reasoning (billed as output tokens)\A"; font-weight: 600; }
.composer textarea { border: 0; padding: .2rem 0; background: transparent; outline: none; }
@media (min-width: 901px) {  /* the left column scrolls, but where you type stays in view at the bottom */
  .left > .composer { position: sticky; bottom: 0; z-index: 1; box-shadow: 0 -8px 14px -12px rgb(0 0 0 / .35); }
}
.composer-bar { display: flex; gap: .5rem; align-items: center; }
.chips { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .3rem; }
.chip { font-size: .78rem; border: 1px solid var(--line-2); border-radius: 999px; padding: .05rem .55rem; background: transparent; cursor: pointer; color: var(--ink-2); }
.chip:hover { border-color: var(--accent); color: var(--ink); }

.tabs { display: flex; gap: .1rem; padding: .4rem .6rem 0; border-bottom: 1px solid var(--line); overflow-x: auto; background: var(--card); }
.tabs button { border: 0; background: none; padding: .5rem .7rem; cursor: pointer; color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.panel { flex: 1; min-height: 0; overflow-y: auto; padding: 1rem; }
.subtabs { display: flex; gap: .3rem; margin: .6rem 0; flex-wrap: wrap; }
.subtabs button { border: 1px solid var(--line-2); background: var(--surface); border-radius: 6px; padding: .2rem .6rem; cursor: pointer; font-size: .85rem; }
.subtabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.insp-head { display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: center; font-size: .9rem; }
.method { font-weight: 700; font-family: ui-monospace, Menlo, monospace; }
.badge { display: inline-block; border-radius: 5px; padding: 0 .45rem; font-size: .8rem; font-weight: 600; border: 1px solid; }
.badge.ok { color: var(--good-ink); border-color: var(--good); }
.badge.bad { color: var(--critical-ink); border-color: var(--critical); }
.badge.warn { color: var(--ink); border-color: var(--warning); background: color-mix(in srgb, var(--warning) 25%, transparent); }
.badge.pending { color: var(--ink-2); border-color: var(--line-2); }
.note { background: color-mix(in srgb, var(--series-1) 9%, var(--card)); border-radius: 8px; padding: .5rem .7rem; font-size: .88rem; }
.explain { border: 1px solid var(--critical); border-radius: 8px; padding: .5rem .7rem; margin: .6rem 0; font-size: .9rem; }
.harness { margin: .5rem 0; padding: .4rem .7rem .4rem 1.6rem; background: color-mix(in srgb, var(--warning) 14%, var(--card)); border-radius: 8px; font-size: .85rem; }

pre { background: var(--code-bg); border-radius: 8px; padding: .6rem .7rem; overflow: auto; max-height: 28rem; margin: .3rem 0; white-space: pre-wrap; word-break: break-word; }
pre.raw { max-height: 22rem; font-size: .78rem; }
.jk { color: var(--j-key); } .js { color: var(--j-str); } .jn { color: var(--j-num); } .jl { color: var(--j-lit); }

table { border-collapse: collapse; width: 100%; font-size: .85rem; margin: .3rem 0; }
th, td { text-align: left; padding: .3rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--ink-2); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.sel td { background: color-mix(in srgb, var(--series-1) 10%, transparent); font-weight: 600; }
tr.hl td { background: color-mix(in srgb, var(--warning) 16%, transparent); }
tr.click { cursor: pointer; }
tr.click:hover td { background: color-mix(in srgb, var(--series-1) 7%, transparent); }
tr.total td { font-weight: 700; border-top: 2px solid var(--line-2); }
td.key { word-break: break-all; }

.tokens { line-height: 2.1; padding: .4rem 0; }
.tok { border-radius: 4px; padding: .12rem .1rem; margin-right: 2px; white-space: pre; font-family: ui-monospace, Menlo, monospace; font-size: .9rem; }
.tok.t0 { background: color-mix(in srgb, var(--series-1) 22%, transparent); }
.tok.t1 { background: color-mix(in srgb, var(--series-2) 22%, transparent); }
.tok.t2 { background: color-mix(in srgb, var(--series-3) 22%, transparent); }
.tok.t3 { background: color-mix(in srgb, var(--series-4) 26%, transparent); }
.stats { margin: .4rem 0; font-size: .9rem; }

.meter { position: relative; display: flex; gap: 2px; height: 30px; border-radius: 6px; overflow: hidden; background: var(--line); margin: .6rem 0 .3rem; }
.seg { min-width: 3px; height: 100%; }
.seg.s1, .sw.s1 { background: var(--series-1); }
.seg.s2, .sw.s2 { background: var(--series-2); }
.seg.s3, .sw.s3 { background: var(--series-3); }
.seg.s4, .sw.s4 { background: var(--series-4); }
.seg.free { background: transparent; }
.meter .limit { position: absolute; top: 0; bottom: 0; width: 3px; background: var(--critical); }
.sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .82rem; color: var(--ink-2); margin: .3rem 0; }
.over { color: var(--critical-ink); font-weight: 600; }
.dropped td { color: var(--muted); text-decoration: line-through; }

.chart { width: 100%; max-width: 640px; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; }
.chart .lbl { fill: var(--ink-2); font-size: 11px; font-weight: 600; }
.chart .s1 { fill: var(--series-1); }
.chart .s2 { fill: var(--series-2); }

.cols3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .8rem; margin-top: .8rem; }
.shape ul { padding-left: 1.1rem; font-size: .85rem; margin: .3rem 0; }
.lab { margin-bottom: .8rem; }
.lab h3 { margin-top: 0; }
.lab .result { margin-top: .5rem; font-size: .88rem; }
.answer { white-space: pre-wrap; max-height: 14rem; overflow-y: auto; font-size: .9rem; margin: .4rem 0; }
.tag { font-size: .72rem; font-weight: 600; border: 1px solid var(--good); color: var(--good-ink); border-radius: 999px; padding: 0 .45rem; margin-left: .3rem; }

dialog { border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); color: var(--ink); max-width: 560px; width: calc(100% - 32px); }
dialog::backdrop { background: rgb(0 0 0 / .4); }
.dlg input { width: 100%; }

/* ---------- Module 2 ---------- */
.part { margin-top: .8rem; margin-bottom: .3rem; font-size: .85rem; color: var(--ink-2); }
.part b { color: var(--ink); }
.frow, .exrow { display: grid; gap: .35rem; align-items: start; margin-bottom: .35rem; }
.frow { grid-template-columns: minmax(0, 1fr) 6.5rem minmax(0, 1.6fr) auto; }
.exrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 1.4rem auto; }
.exrow textarea { font-size: .8rem; }
.ex-ok { font-weight: 700; padding-top: .3rem; text-align: center; }
.ex-ok.ok { color: var(--good-ink); }
.ex-ok.bad { color: var(--critical-ink); cursor: help; }
.lbadge { display: inline-block; font-size: .75rem; border-radius: 5px; padding: 0 .4rem; margin-right: .25rem; border: 1px solid var(--line-2); white-space: nowrap; }
.lbadge.ok { color: var(--good-ink); border-color: var(--good); }
.lbadge.bad { color: var(--critical-ink); border-color: var(--critical); }
.lbadge.skip { color: var(--muted); }
.verdict { border: 1px solid var(--line-2); border-radius: 8px; padding: .4rem .6rem; margin: .4rem 0; }
.verdict.pass { border-color: var(--good); }
.verdict.fail { border-color: var(--critical); }
.verdict ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.score { border-radius: 8px; padding: .5rem .7rem; margin: .6rem 0; border: 1px solid; }
.score.pass { border-color: var(--good); background: color-mix(in srgb, var(--good) 10%, var(--card)); }
.score.fail { border-color: var(--critical); background: color-mix(in srgb, var(--critical) 8%, var(--card)); }
code.out { display: block; white-space: pre-wrap; word-break: break-word; font-size: .78rem; background: none; padding: 0; }
.diff { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; white-space: pre-wrap; word-break: break-word; background: var(--code-bg); border-radius: 8px; padding: .5rem .7rem; max-height: 28rem; overflow: auto; }
.diff .add { background: color-mix(in srgb, var(--good) 22%, transparent); display: block; }
.diff .del { background: color-mix(in srgb, var(--critical) 18%, transparent); display: block; text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--critical) 60%, transparent); }
.diff .same { color: var(--muted); display: block; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .2rem .8rem; margin: .4rem 0 .6rem; }
.copyrow { display: flex; justify-content: space-between; align-items: center; margin-top: .6rem; }
.copyrow h4 { margin: 0; }
td input, td select { width: 100%; }
td input:not([type=checkbox]):not([type=radio]) { min-width: 7rem; }  /* zoomed in, a box in a table keeps room for a few words */
td select { min-width: 5.5rem; }
table.results td:nth-child(2) { width: 30%; }
table.results td:nth-child(3) { width: 50%; }
#t-table td:nth-child(2) { width: 45%; }
#t-table td select { width: auto; max-width: 9rem; }
label { max-width: 100%; }
label > select, label > input { min-width: 0; flex: 0 1 auto; }
.rrow { border: 1px solid var(--line); border-radius: 8px; padding: .45rem .55rem; margin-bottom: .45rem; background: var(--surface); }
.rline { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin-bottom: .3rem; }
.rline .r-del { margin-left: auto; }
.rword { min-width: 2.4rem; font-size: .85rem; }
.rline input { flex: 1 1 6rem; min-width: 5rem; }
.r-cat { width: 100%; font-size: .82rem; }
.rdesc { color: var(--ink-2); font-style: italic; }
.rdesc .over { font-style: normal; }

/* ---------- Module 3 ---------- */
.tcard { border: 1px solid var(--line-2); border-radius: 8px; padding: .5rem .6rem; margin-bottom: .5rem; background: var(--surface); }
.tcard .t-name { flex: 1 1 8rem; font-weight: 600; }
.tcard textarea { margin: .2rem 0; }
.prow { display: grid; grid-template-columns: minmax(0, 1fr) 5.8rem minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: .3rem; margin-bottom: .3rem; }
.t-lookup, .t-calc, .t-action { margin-top: .4rem; }
.lbadge.warn { color: var(--ink); border-color: var(--warning); background: color-mix(in srgb, var(--warning) 20%, transparent); }
.scard { border: 1px solid var(--line); border-radius: 10px; padding: .5rem .7rem; margin: .5rem 0; background: var(--card); }
.scard.compact { padding: .35rem .5rem; margin: .3rem 0; }
.shead { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.s-plan, .s-act, .s-upd { margin-top: .35rem; font-size: .88rem; }
.ptag { display: inline-block; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 .3rem; margin-right: .3rem; }
.tcall { margin: .3rem 0 .3rem .4rem; padding-left: .5rem; border-left: 2px solid var(--line-2); }
.tcall code, .s-plan code, .approval code { word-break: break-all; }
.approval { border: 2px solid var(--warning); border-radius: 8px; padding: .5rem .6rem; margin: .4rem 0; background: color-mix(in srgb, var(--warning) 10%, var(--card)); }
.cols2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .6rem; }

/* ---------- Module 4 ---------- */
.ecard { border: 1px solid var(--line-2); border-radius: 8px; padding: .5rem .6rem; margin-bottom: .5rem; background: var(--surface); }
.ecard textarea { margin: .25rem 0; }
.egrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .3rem .6rem; }
.egrid label { flex-direction: column; align-items: stretch; gap: .1rem; font-size: .78rem; }
table.policy td { font-size: .82rem; }
table.policy select { width: 100%; }
table.results4 td:nth-child(2) { width: 32%; }
table.results4 td:nth-child(4) { width: 28%; }

/* ---------- Module 5 ---------- */
.stepper { display: flex; flex-direction: column; gap: .35rem; margin-top: .3rem; }
.sgroup { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; }
.sglabel { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); width: 5.2rem; flex: none; }
.spill { font-size: .78rem; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: .1rem .55rem; cursor: pointer; white-space: nowrap; }
.spill:hover { border-color: var(--accent); }
.spill[aria-current="step"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.spill b { font-weight: 700; }
.spill.ok b { color: var(--good-ink); }
.spill.bad b { color: var(--critical-ink); }
.spill.warn b { color: var(--warning); }
.spill[aria-current="step"] b { color: inherit; }
.wstep h2 { margin-top: 0; }
.why { font-size: .88rem; background: color-mix(in srgb, var(--series-1) 8%, var(--card)); border-radius: 8px; padding: .45rem .65rem; margin: 0 0 .7rem; }
.concept { border-top: 1px solid var(--line); padding: .5rem 0 .3rem; }
.concept h3 { margin: .2rem 0 .3rem; }
.concept p { margin: .3rem 0; font-size: .9rem; }
.slide { font-size: .7rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 .3rem; vertical-align: 1px; }
.ex { color: var(--ink-2); font-style: italic; }
.vs { border: 1px solid var(--line-2); border-radius: 8px; padding: .4rem .6rem; }
.vs.bad { border-color: var(--critical); }
.vs.good { border-color: var(--good); }
.vs p { margin: .2rem 0 0; }
.quiz { margin: .5rem 0 .3rem; padding: .4rem .6rem; border: 1px dashed var(--line-2); border-radius: 8px; }
.quiz p { margin: .2rem 0; }
.qopts { display: flex; flex-direction: column; gap: .25rem; margin: .3rem 0; }
.qopt { text-align: left; font-size: .85rem; border: 1px solid var(--line-2); background: var(--surface); border-radius: 6px; padding: .3rem .55rem; cursor: pointer; }
.qopt:hover { border-color: var(--accent); }
.qopt.right { border-color: var(--good); background: color-mix(in srgb, var(--good) 12%, var(--card)); }
.qopt.wrong { border-color: var(--critical); background: color-mix(in srgb, var(--critical) 10%, var(--card)); }
ol.method { list-style: none; padding: 0; margin: .5rem 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .4rem; counter-reset: m; }
ol.method li { border: 1px solid var(--line-2); border-radius: 8px; padding: .4rem .55rem; counter-increment: m; display: flex; flex-direction: column; gap: .15rem; font-size: .85rem; }
ol.method li b::before { content: counter(m) " · "; color: var(--muted); }
ol.method li span { color: var(--ink-2); font-size: .8rem; }
.session-ex p { font-size: .88rem; margin: .35rem 0; }
mark { background: color-mix(in srgb, var(--warning) 30%, transparent); color: inherit; border-radius: 3px; padding: 0 .15rem; }
table.fd td:first-child { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; }
.lrow { margin-bottom: .35rem; }
.lcells { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.lcells input { flex: 1 1 7rem; min-width: 0; }
.lcells input.wide { flex: 3 1 12rem; }
.lcells input.full { flex: 1 1 100%; }
.lcells input.tiny { flex: 0 0 3.2rem; }
.lhint { color: var(--critical-ink); }
.lhint:empty { display: none; }
label.auto { display: flex; align-items: flex-start; gap: .5rem; margin: .45rem 0; color: var(--ink); font-size: .9rem; cursor: pointer; }
label.auto input { margin-top: .25rem; flex: none; }
.block { border: 1px solid var(--line); border-radius: 8px; padding: .3rem .6rem; margin: .4rem 0; }
.bhead { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; font-size: .9rem; }
.ftree { display: flex; flex-wrap: wrap; gap: .3rem; margin: .6rem 0; }
.fitem { display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--line-2); background: var(--surface); border-radius: 6px; padding: .2rem .5rem; cursor: pointer; color: var(--ink); }
.fitem small { color: var(--muted); font-size: .72rem; }
.fitem.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--card)); }
ul.lint, ul.sublist { list-style: none; padding: 0; margin: .3rem 0 .6rem; font-size: .86rem; }
ul.lint li, ul.sublist li { margin: .25rem 0; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-size: .8rem; text-decoration: underline; }
.wnav { margin-top: .2rem; }
.diff .fhead { display: block; font-weight: 700; margin-top: .4rem; }
.diff .hunk { display: block; color: var(--series-1); }
.presets .chip { font-size: .8rem; }
details.stage { border: 1px solid var(--line); border-radius: 8px; padding: .3rem .6rem; margin: .4rem 0; background: var(--card); }
details.stage.current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
details.stage summary { cursor: pointer; font-size: .9rem; padding: .15rem 0; }
details.stage[open] summary { margin-bottom: .2rem; }
.cmd { margin: .4rem 0; }
.cmd .copyrow { margin-top: 0; }
.cmd pre { margin: .15rem 0 0; }

/* ---------- Module 6 ---------- */
.xkeys { max-height: 18rem; overflow-y: auto; }
.xkeys td.key, td.key { word-break: break-all; }
.xlog { max-height: 22rem; overflow-y: auto; font-size: .8rem; }
.xl { border-bottom: 1px solid var(--line); padding: .25rem 0; word-break: break-all; }
.xl .mono { white-space: pre-wrap; }
input.grow { flex: 1 1 14rem; min-width: 0; }
.demo { font-size: .88rem; margin: .3rem 0; display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.key { word-break: break-all; }
.pane .mchat { max-height: 16rem; overflow-y: auto; display: flex; flex-direction: column; gap: .35rem; margin: .4rem 0; }
.pane .msg { max-width: 100%; font-size: .88rem; }
ol.hist { padding-left: 1.2rem; margin: .2rem 0; }
ol.steps6 { padding-left: 1.2rem; margin: .4rem 0; font-size: .88rem; }
ol.steps6 li { margin: .2rem 0; }
.chart circle.ok { fill: var(--good); stroke: var(--card); stroke-width: 2; }
.chart circle.no { fill: var(--critical); stroke: var(--card); stroke-width: 2; }
.ck { margin-bottom: .4rem; }
.ck-note { width: 100%; margin-left: 1.6rem; max-width: calc(100% - 1.6rem); }
.tscroll { overflow-x: auto; max-width: 100%; }
.tscroll table { min-width: 620px; }
.ostep { margin: .5rem 0; } .ostep .copyrow { margin-top: .2rem; }

/* ---------- Lab sheets ---------- */
.lsheet { padding: .4rem .7rem; flex: none; border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.ls-head { width: 100%; display: flex; gap: .4rem; align-items: center; background: none; border: 0; padding: .2rem 0; cursor: pointer; color: var(--ink); font-size: .9rem; text-align: left; }
.ls-caret { margin-left: auto; color: var(--muted); font-size: 1rem; line-height: 1; }
.ls-list { list-style: none; padding: 0; margin: .3rem 0 0; display: flex; flex-direction: column; gap: .35rem; max-height: 17rem; overflow-y: auto; }
.ls-list li { border-top: 1px solid var(--line); padding-top: .35rem; }
.ls-list li.done .ls-text { color: var(--muted); }
.ls-row { display: flex; gap: .45rem; align-items: flex-start; font-size: .86rem; }
.ls-row input { margin-top: .2rem; flex: none; }
.ls-num { flex: none; width: 1.3rem; height: 1.3rem; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 700; background: var(--line); }
.ls-list li.done .ls-num { background: var(--good); color: #fff; }
.ls-text { flex: 1; }
.ls-q { display: flex; flex-direction: column; align-items: stretch; gap: .2rem; margin: .3rem 0 0 3.1rem; }
.ls-q textarea { font-size: .84rem; }
.ls-foot { margin-top: .4rem; color: var(--muted); }
.side-prog { margin-left: auto; flex: none; font-size: .68rem; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 0 .4rem; font-weight: 600; }
.side-prog.full { color: var(--good-ink); border-color: var(--good); }
.side-prog:empty { display: none; }
.ls-flash { animation: lsflash 1.6s ease-out; }
@keyframes lsflash { 0%, 40% { box-shadow: 0 0 0 3px var(--warning); } 100% { box-shadow: 0 0 0 3px transparent; } }
ol.ls-print { padding-left: 1.2rem; } ol.ls-print li { margin: .3rem 0; }

/* ---------- Module 7 ---------- */
.seg.s5, .sw.s5 { background: #8a63d2; }
.seg.s6, .sw.s6 { background: #6f6d68; }
.seg.rsv, .sw.rsv { background: repeating-linear-gradient(45deg, var(--line-2), var(--line-2) 4px, transparent 4px, transparent 8px); }
.chart polyline.ln1 { stroke: var(--series-1); } .chart polyline.ln2 { stroke: var(--series-2); }
.chart polyline.ln3 { stroke: var(--series-3); } .chart polyline.ln4 { stroke: var(--series-4); }
.sw.ln1bg { background: var(--series-1); } .sw.ln2bg { background: var(--series-2); } .sw.ln3bg { background: var(--series-3); } .sw.ln4bg { background: var(--series-4); }
#mod-7 .meter { height: 26px; }
.tech { color: var(--muted); font-size: .85em; font-weight: 400; }  /* the technical term beside an everyday word */
#mod-7 label.grow { flex: 1; } #mod-7 label.grow > input.grow { flex: 1; min-width: 12rem; }
.k7-analogy, .k7-learn, .k7-notice, .k7-practice { border-radius: 10px; padding: .6rem .8rem; margin: .6rem 0; }
.k7-analogy { background: color-mix(in srgb, var(--accent) 8%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); }
.k7-learn { background: color-mix(in srgb, var(--series-1) 8%, var(--card)); }
.k7-try { margin: .4rem 0 .8rem; } .k7-try ol { margin: .3rem 0 0; padding-left: 1.3rem; } .k7-try li { margin: .15rem 0; }
.k7-notice:empty { display: none; }
.k7-notice { background: color-mix(in srgb, var(--good) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--good) 35%, var(--line)); }
.k7-notice p { margin: .25rem 0 0; }
.k7-practice { background: var(--surface); border: 1px dashed var(--line-2); }
.k7-stepno { margin: 0; color: var(--ink-2); font-size: .85rem; } .k7-head h2 { margin: .1rem 0 .4rem; }
.k7-techbox { margin: .5rem 0; } .k7-techbox summary { cursor: pointer; font-size: .85rem; color: var(--ink-2); }
.k7-pic { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: .5rem 0 1rem; }
.k7-sheet { border: 1px solid var(--line-2); border-radius: 10px; padding: .5rem .7rem; background: var(--card); min-width: 260px; flex: 1 1 280px; max-width: 420px; }
.k7-sheet-h { font-weight: 600; margin-bottom: .3rem; }
.k7-part { font-size: .85rem; padding: .15rem 0; } .k7-part .sw { margin-right: .35rem; }
.k7-arrow { font-size: 1.5rem; color: var(--muted); }
.k7-box { border: 1px solid var(--line-2); border-radius: 10px; padding: .6rem .9rem; background: var(--surface); text-align: center; font-weight: 600; }
.k7-path { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .5rem; margin: .4rem 0; }
.k7-stepbtn { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  border: 1px solid var(--line-2); border-radius: 10px; padding: .55rem .7rem; background: var(--card); }
.k7-stepbtn:hover { border-color: var(--accent); } .k7-stepbtn.done { border-color: var(--good); }
.k7-stepbtn .small { color: var(--ink-2); }
.k7-gloss td { vertical-align: top; }
:is(#mod-7, #mod-8) .right table > tbody { display: table; width: 100%; }

/* ---------- Module 8 ---------- */
.flow8 { width: 100%; max-width: 760px; display: block; margin: .3rem 0; }
.flow8 .arrows line, .flow8 marker path { stroke: var(--muted); stroke-width: 1.2; }
.flow8 .node8 { cursor: pointer; }
.flow8 .node8 rect { fill: var(--card); stroke: var(--line-2); stroke-width: 1; }
.flow8 .node8.mod rect { fill: color-mix(in srgb, var(--series-1) 10%, var(--card)); stroke: var(--series-1); }
.flow8 .node8.new rect { fill: color-mix(in srgb, var(--series-3) 12%, var(--card)); stroke: var(--series-3); }
.flow8 .node8.own rect { fill: var(--surface); stroke: var(--muted); }
.flow8 .node8.sel rect { stroke-width: 2.5; }
.flow8 .node8.ok rect { stroke-width: 2; }
.flow8 .node8.step.on rect { fill: color-mix(in srgb, var(--series-1) 8%, var(--card)); stroke: var(--series-1); }
.flow8 .node8.step.off rect { fill: none; stroke: var(--line-2); stroke-dasharray: 4 3; }
.flow8 .node8.step.off text { fill: var(--muted); }
.flow8 .node8.bad rect { stroke: var(--critical); stroke-width: 2; }
.flow8 .node8:focus-visible rect { stroke: var(--accent); stroke-width: 3; }
.flow8 text.t { font-size: 13px; font-weight: 600; fill: var(--ink); }
.flow8 text.s { font-size: 11px; fill: var(--ink-2); }
.sw.w8mod { background: color-mix(in srgb, var(--series-1) 25%, var(--card)); border: 1px solid var(--series-1); }
.sw.w8new { background: color-mix(in srgb, var(--series-3) 25%, var(--card)); border: 1px solid var(--series-3); }
.sw.w8own { background: var(--surface); border: 1px solid var(--muted); }
ol.notes8 { padding-left: 1.2rem; margin: .4rem 0; } ol.notes8 li { margin: .15rem 0; }
.grid8 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .5rem .8rem; margin-bottom: .6rem; }
.in8 { font-size: .85rem; display: flex; flex-direction: column; gap: .2rem; }
.in8 input, .in8 select, .in8 textarea { width: 100%; }
.dcard { margin: .5rem 0; } .dcard.made { border-color: var(--line-2); }
.dcard h4 { margin: 0; }
.suggest8 { background: color-mix(in srgb, var(--good) 8%, var(--card)); border-radius: 8px; padding: .35rem .6rem; margin: .3rem 0 .4rem; }
.qopt.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
.dcard select { max-width: 100%; }
ul.lint { list-style: none; padding: 0; margin: .4rem 0; } ul.lint li { margin: .3rem 0; font-size: .9rem; }
ul.files8 { list-style: none; padding: 0; margin: 0; } ul.files8 li { margin: .15rem 0; } ul.files8 .cur { font-weight: 700; }
.k8-cols { grid-template-columns: minmax(250px, 1fr) 3fr; align-items: start; }
.ms8 summary { cursor: pointer; }
pre.review8 { white-space: pre-wrap; }
#w8-diagram, #w8-runtime { overflow-x: auto; }
.phases8 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .6rem; margin: .3rem 0 .5rem; }
.phase8 { display: flex; flex-direction: column; gap: .3rem; border: 1px solid var(--line); border-radius: 10px; padding: .5rem; background: var(--surface); }
.phase8 h4 { margin: 0; } .phase8 > p { margin: 0 0 .2rem; }
button.node8 { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; text-align: left; font: inherit; font-size: .85rem; color: var(--ink); cursor: pointer;
  border: 1px solid var(--line-2); border-radius: 8px; padding: .35rem .55rem; background: var(--card); }
button.node8 .small { color: var(--ink-2); }
button.node8.mod { background: color-mix(in srgb, var(--series-1) 10%, var(--card)); border-color: var(--series-1); }
button.node8.new { background: color-mix(in srgb, var(--series-3) 12%, var(--card)); border-color: var(--series-3); }
button.node8.own { background: var(--surface); border-color: var(--muted); }
button.node8.ok { border-width: 2px; } button.node8.bad { border-color: var(--critical); border-width: 2px; }
button.node8.off { background: none; border-style: dashed; border-color: var(--line-2); } button.node8.off b, button.node8.off .small { color: var(--muted); }
button.node8.sel { outline: 2px solid var(--accent); outline-offset: 1px; }
.stepper .sgroup .ph8 { min-width: 6.5rem; }
.spill.off { opacity: .55; border-style: dashed; }
.wide8 { grid-column: 1 / -1; }
.in8 input[type=checkbox] { width: auto; }
table.list8, table.matrix8 { width: 100%; font-size: .85rem; }
table.list8 td { padding: .15rem .2rem; vertical-align: top; }
table.list8 textarea { width: 100%; min-width: 7rem; }
table.list8 select { width: auto; min-width: 100%; }  /* as wide as its longest option: the column grows to fit it */
#b8-stage textarea { resize: none; overflow: hidden; line-height: 1.35; }  /* each box grows with its text */
#mod-8 table.list8.cards8, #mod-8 table.list8.cards8 > tbody, table.list8.cards8 td { display: block; width: 100%; }  /* too wide for its column: one card per row */
table.list8.cards8 tr:first-child { display: none; }
table.list8.cards8 tr { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .35rem .6rem; border: 1px solid var(--line); border-radius: 8px; padding: .5rem; margin: .45rem 0; }
table.list8.cards8 td { padding: 0; text-align: left; }
table.list8.cards8 td[data-label]::before { content: attr(data-label); display: block; font-size: .75rem; color: var(--muted); margin-bottom: .1rem; }
table.list8.cards8 select, table.list8.cards8 textarea { width: 100%; min-width: 0; }
table.list8.cards8 td.rm8 { grid-column: 1 / -1; text-align: right; }
table.list8 td.c, table.matrix8 .c { text-align: center; }
table.list8 input[type=number] { width: 100%; min-width: 4.5rem; }
.checks8 { display: flex; flex-direction: column; gap: .2rem; margin: .2rem 0; }
.qual8 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .5rem; }
.qcard8, .uc8, .confirm8 { margin: .3rem 0; } .qcard8 p { margin: .2rem 0; }
.qcard8.made, .confirm8.made { border-color: var(--accent); }
.uc8 h4 { margin: 0; }
@media (max-width: 900px) { .flow8 { min-width: 560px; } }  /* on a phone the diagram scrolls instead of shrinking its text */

/* ---------- Setup check ---------- */
.layout.single { grid-template-columns: minmax(0, 1fr); }
#su-panel { max-width: 980px; }
.su-row { display: flex; gap: .7rem; align-items: flex-start; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.su-row > .badge { flex: none; min-width: 4.6rem; text-align: center; margin-top: .1rem; }
.su-body { flex: 1; min-width: 0; font-size: .9rem; }
.su-fix { margin-top: .3rem; } .su-fix code { display: inline-block; white-space: pre-wrap; word-break: break-word; }
.su-mods td:first-child { white-space: nowrap; }
.side-num.su-ready { color: var(--good-ink); border-color: var(--good); }
.side-num.su-todo { color: var(--critical-ink); border-color: var(--critical); }

/* ---------- Exams ---------- */
#x9-panel, #t10-panel { max-width: 1100px; }
.x9-bar { position: sticky; top: 0; z-index: 2; display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; padding: .5rem 0; background: var(--bg); border-bottom: 1px solid var(--line); }
#x9-timer { font-variant-numeric: tabular-nums; }
.x9-grid input, .x9-grid select { width: 100%; min-width: 4rem; }
.x9-doc { border-bottom: 1px solid var(--line); padding: .35rem 0; }
.x9-meter { height: 10px; }
.x9-answer li { margin: .3rem 0; }
@media print { .top, .sidebar, .foot, .x9-bar, #x9-home, [data-x9home], .lsheet { display: none !important; } .panel { overflow: visible; } }

/* Module 11: Skills & Agent Lab */
.s11-item { display: block; width: 100%; text-align: left; background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: .4rem .55rem; margin: 0 0 .35rem; cursor: pointer; color: var(--ink); }
.s11-item:hover { border-color: var(--line-2); }
.s11-item.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.s11-diagram { display: grid; grid-template-columns: 1fr 1.3fr 1.3fr; gap: .6rem; align-items: start; margin: .4rem 0; }
.s11-col { display: flex; flex-direction: column; gap: .35rem; }
.s11-agent { border: 1px dashed var(--line-2); border-radius: 10px; padding: .45rem; }
.s11-label { font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.s11-box { display: flex; flex-direction: column; gap: .1rem; border: 1px solid var(--line); border-radius: 8px; padding: .35rem .5rem; background: var(--card); }
.s11-box small { font-size: .68rem; letter-spacing: .04em; color: var(--muted); }
.s11-skill.on { border-color: var(--good); box-shadow: inset 3px 0 0 var(--good); }
.s11-steps { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; margin: .3rem 0 .5rem; }
.s11-steps li { border: 1px solid var(--line); border-radius: 999px; padding: .1rem .6rem; font-size: .82rem; }
.s11-steps li b { color: var(--accent); margin-right: .2rem; }
.s11-steps li.done { border-color: var(--good); }
.s11-checks { list-style: none; padding: 0; }
.s11-checks li { margin: .2rem 0; }
.s11-file { border: 1px solid var(--line); border-radius: 8px; padding: .35rem .5rem; margin: .3rem 0; }
.s11-file textarea { width: 100%; }
@media (max-width: 900px) { .s11-diagram { grid-template-columns: 1fr; } }
.s11-ok { color: var(--good-ink); }
.s11-nowrap { white-space: nowrap; }
.s11-startcard { border-color: var(--accent); }
.s11-ownpromo .row { margin-top: .4rem; }

/* Module 5: plain language or technical */
#w-body.plain .techv, #w-body.tech .plainv { display: none; }
.w-viewrow { gap: .5rem; }
.seg5 { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.seg5 button { border: 0; background: none; padding: .2rem .75rem; cursor: pointer; color: var(--ink-2); font-size: .85rem; }
.seg5 button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.pvrow { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin: .3rem 0; }
.pvrow input { flex: 1 1 10rem; min-width: 0; }
