/* ===== course components (from the UX Lead Course build); the site layer below bridges and overrides them ===== */
/* ---------- prose ---------- */
.prose{font:400 18px/1.65 var(--serif);font-optical-sizing:auto;max-width:68ch}
:where(.prose)>*:first-child{margin-top:0}
:where(.prose) p{margin:0 0 1.05em;text-wrap:pretty}
:where(.prose) h2{position:relative;font:600 29px/1.2 var(--serif);letter-spacing:-.015em;margin:2.4em 0 .6em;text-wrap:balance}
:where(.prose) h3{position:relative;font:650 17.5px/1.35 var(--sans);letter-spacing:-.005em;margin:2em 0 .55em}
:where(.prose) h4{font:650 15.5px/1.4 var(--sans);margin:1.6em 0 .4em;color:var(--ink-2)}
.prose .anchor{display:inline-grid;place-items:center;width:24px;height:24px;margin-left:6px;vertical-align:middle;border-radius:6px;color:var(--ink-3);opacity:0;transition:opacity .15s}
.prose .anchor .i{width:14px;height:14px}
.prose h2:hover .anchor,.prose h3:hover .anchor,.prose .anchor:focus-visible{opacity:1}
:where(.prose) ul,:where(.prose) ol{padding-left:1.25em;margin:0 0 1.1em}
:where(.prose) li{margin:.3em 0;padding-left:.15em}
:where(.prose) li::marker{color:var(--ink-3)}
:where(.prose) ol>li::marker{font:600 .85em var(--sans);font-variant-numeric:tabular-nums}
:where(.prose) strong{font-weight:650}
:where(.prose) em{font-style:italic}
:where(.prose) hr{border:0;height:1px;background:var(--line);margin:3em 0}
:where(.prose) blockquote{margin:1.4em 0;padding:4px 0 4px 22px;box-shadow:inset 2px 0 0 var(--line-2);color:var(--ink-2);font-style:italic}
:where(.prose) blockquote p:last-child{margin-bottom:0}
:where(.prose) code{font:500 .82em ui-monospace,"SF Mono",Menlo,monospace;background:var(--tone);padding:.12em .4em;border-radius:5px}
:where(.prose) pre{background:var(--tone);border-radius:var(--r);padding:16px 20px;overflow-x:auto;line-height:1.55;margin:1.4em 0}
:where(.prose) pre code{background:none;padding:0;font-size:13.5px}
:where(.prose) a{text-decoration-color:color-mix(in srgb,var(--accent) 40%,transparent)}
:where(.prose) a:hover{text-decoration-color:currentColor}
.table-wrap{overflow-x:auto;margin:1.6em 0;font:400 15px/1.5 var(--sans)}
table{border-collapse:collapse;width:100%}
th,td{text-align:left;padding:10px 16px 10px 0;border-bottom:1px solid var(--line);vertical-align:top}
th{font-weight:600;font-size:13px;color:var(--ink-3);border-bottom-color:var(--line-2)}
td{font-variant-numeric:tabular-nums}
td.num{text-align:right}
tr:last-child td{border-bottom:0}
li.task{list-style:none;margin-left:-1.25em}
li.task input{margin-right:8px}


/* key-value meta (framework cards, module footers) */
.meta{margin:1.8em 0;padding:0;font:400 15px/1.55 var(--sans);display:grid;gap:0}
.meta>div{display:grid;grid-template-columns:150px 1fr;gap:16px;padding:10px 0;border-top:1px solid var(--line)}
.meta>div:last-child{border-bottom:1px solid var(--line)}
.meta dt{color:var(--ink-3);font-size:13.5px;padding-top:1px}
.meta dd{margin:0}
@media (max-width:640px){.meta>div{grid-template-columns:1fr;gap:2px}}


/* callouts: a tone step, no edge */
.callout{margin:1.8em 0;padding:16px 20px 6px;border-radius:12px;background:var(--tone);font:400 15.5px/1.6 var(--sans)}
.c-title{display:flex;gap:10px;align-items:center;font-weight:650;font-size:14.5px;color:var(--c,var(--ink));margin-bottom:8px}
.c-title .i{width:18px;height:18px}
.c-body>*:first-child{margin-top:0}
.c-body p{margin:0 0 .7em}
.c-body ul,.c-body ol{margin:0 0 .8em;padding-left:1.2em}
.c-body li{margin:.25em 0}
.c-body .table-wrap{font-size:14.5px;margin:.6em 0 1em}
.c-abstract,.c-ai,.c-tip,.c-success{--c:var(--accent);background:var(--accent-soft)}
.c-abstract{padding:20px 24px 10px}
.c-info,.c-note{--c:var(--info);background:var(--info-soft)}
.c-warning,.c-danger{--c:var(--warn);background:var(--warn-soft)}
.c-example,.c-question,.c-quote{--c:var(--ink)}


/* ---------- framework card components ---------- */

/* ladder diagram */
.dg{margin:8px 0 2.2em;padding:28px 28px 22px;border-radius:16px;background:var(--raised);box-shadow:inset 0 0 0 1px var(--line);font-family:var(--sans)}
.rungs{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(var(--n,4),1fr);gap:0 2px;align-items:end}
.rung{margin:0;padding:0;display:flex;flex-direction:column;justify-content:flex-end;height:100%}
.step{height:calc(36px + var(--lvl) * 120px / var(--n,4));display:flex;align-items:flex-start;padding:12px 14px;border-radius:10px 10px 0 0;background:color-mix(in srgb,var(--accent) calc(var(--lvl) * 88% / var(--n,4) + 6%),var(--raised));color:var(--ink)}
.rung.on-dark .step{color:var(--accent-ink)}
.rn{font:650 15.5px/1.2 var(--sans);letter-spacing:-.005em}
.rung dl{margin:0;padding:14px 14px 4px 2px;display:grid;gap:10px;align-content:start;min-height:210px;border-top:2px solid var(--accent)}
.rung dl div{display:grid;gap:1px}
.rung dt{font-size:12.5px;font-weight:550;color:var(--ink-3)}
.rung dd{margin:0;font-size:14px;line-height:1.45;color:var(--ink)}
.rung .ex dd{color:var(--ink-2);font-style:normal}
.ladder-axis{display:flex;align-items:center;gap:12px;margin:10px 0 0;font-size:12.5px;color:var(--ink-3)}
.ladder-axis i{flex:1;height:1.5px;background:var(--line-2);position:relative}
.ladder-axis i::after{content:"";position:absolute;right:-1px;top:-4px;border:solid var(--line-2);border-width:1.5px 1.5px 0 0;width:7px;height:7px;transform:rotate(45deg)}
.ladder-owner{display:flex;align-items:center;gap:8px;margin:18px 0 0;padding:12px 16px;border-radius:10px;background:var(--accent-soft);color:var(--accent);font-weight:600;font-size:14.5px}
.dg figcaption{margin-top:12px;font-size:13px;color:var(--ink-3)}


/* ladders with 5+ levels: stacked rows, step bar grows */
.rungs[style*="--n:5"],.rungs[style*="--n:6"],.rungs[style*="--n:7"]{grid-template-columns:1fr;gap:6px}
.rungs[style*="--n:5"] .rung,.rungs[style*="--n:6"] .rung,.rungs[style*="--n:7"] .rung{display:grid;grid-template-columns:230px 1fr;align-items:center;gap:18px;height:auto}
.rungs[style*="--n:5"] .step,.rungs[style*="--n:6"] .step,.rungs[style*="--n:7"] .step{min-height:44px;height:auto;width:calc(30% + var(--lvl) * 70% / var(--n));border-radius:8px;align-items:center;padding:10px 12px;white-space:nowrap}
.rungs[style*="--n:5"] dl,.rungs[style*="--n:6"] dl,.rungs[style*="--n:7"] dl{min-height:0;border-top:0;padding:6px 0;grid-template-columns:1fr 1fr;gap:4px 18px;border-bottom:1px solid var(--line)}
.rungs[style*="--n:5"] .rung:last-child dl,.rungs[style*="--n:6"] .rung:last-child dl,.rungs[style*="--n:7"] .rung:last-child dl{border-bottom:0}


/* how-to steps */
.prose ol.steps{list-style:none;padding:0;margin:1.2em 0 1.6em;counter-reset:st}
.prose ol.steps>li{counter-increment:st;position:relative;margin:0;padding:2px 0 22px 52px;font-size:17px}
.prose ol.steps>li::before{content:counter(st);position:absolute;left:0;top:0;width:32px;height:32px;display:grid;place-items:center;border-radius:50%;background:var(--accent-soft);color:var(--accent);font:650 14px/1 var(--sans);font-variant-numeric:tabular-nums}
.prose ol.steps>li::after{content:"";position:absolute;left:15.5px;top:38px;bottom:4px;width:1.5px;background:var(--line)}
.prose ol.steps>li:last-child::after{display:none}
.prose ol.steps>li:last-child{padding-bottom:4px}
.prose ol.steps em{display:block;margin-top:6px;font:500 13.5px/1.45 var(--sans);font-style:normal;color:var(--ink-3)}


/* ladder mapper widget */
.mapper{margin:1em 0 2em;padding:22px 24px;border-radius:16px;background:var(--raised);box-shadow:inset 0 0 0 1px var(--line);font-family:var(--sans)}
.mapper-intro{margin:0 0 16px!important;font-size:15px;color:var(--ink-2)}
.mapper-intro strong{color:var(--ink)}
.mapper-grid{display:grid;gap:0}
.mg-row{display:grid;grid-template-columns:200px repeat(4,1fr);align-items:center;min-height:52px;border-bottom:1px solid var(--line);border-radius:8px;transition:background-color .15s}
.mg-row.sel{background:var(--tone)}
.mg-row.sel .mg-task{color:var(--accent)}
.mg-row:last-child{border-bottom:0}
.mg-head{min-height:34px;font-size:12.5px;color:var(--ink-3);font-weight:550}
.mg-head span:nth-child(n+2):nth-child(-n+5){text-align:center}
.mg-task{font-size:14.5px;font-weight:550;padding:0 12px}
.mg-cell{position:relative;height:52px;border:0;background:none;cursor:pointer;display:grid;place-items:center;padding:0}
.mg-cell .tr,.mg-cell .tf{position:absolute;left:0;right:0;top:50%;height:4px;margin-top:-2px;background:var(--tone-2)}
.mg-cell .tf{background:var(--accent);display:none}
.mg-cell:first-of-type .tr,.mg-cell:first-of-type .tf{left:50%}
.mg-cell:last-of-type .tr{right:50%}
.mg-cell.fill .tf{display:block}
.mg-cell.cur .tf{display:block;right:50%}
.mg-cell.cur:first-of-type .tf{display:none}
.mg-dot{position:relative;width:14px;height:14px;border-radius:50%;background:var(--raised);box-shadow:inset 0 0 0 2px var(--line-2);transition:transform .15s var(--ease),box-shadow .15s}
.mg-cell.fill .mg-dot{box-shadow:inset 0 0 0 2px var(--accent);background:var(--raised)}
.mg-cell.cur .mg-dot{width:22px;height:22px;background:var(--accent);box-shadow:0 0 0 4px var(--accent-soft)}
.mg-cell:hover .mg-dot{transform:scale(1.25)}
.mg-cell:focus-visible{outline:none}
.mg-cell:focus-visible .mg-dot{box-shadow:0 0 0 3px var(--ground),0 0 0 5px var(--accent)}
.mg-next{padding-left:18px;font-size:13.5px;line-height:1.45;color:var(--ink-2)}
.mg-cell .lb{display:none}
@media (max-width:760px){.mg-cell .lb{display:block}}
.mg-next b{display:block;color:var(--ink);font-weight:600;font-size:13.5px}
.mapper-foot{margin-top:16px;border-radius:12px;background:var(--accent-soft);overflow:hidden}
.mf-move{padding:16px 18px 14px}
.mf-move .mf-k{font-size:12.5px;color:var(--ink-3);font-weight:550}
.mf-move b{display:block;margin:2px 0 3px;font:600 17px/1.3 var(--serif);color:var(--ink)}
.mf-move p{margin:0!important;font-size:14.5px;line-height:1.5;color:var(--ink-2)}
.mf-goal{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 18px;box-shadow:inset 0 1px 0 var(--accent-line)}
.mapper-goal{margin:0!important;font-size:14px;color:var(--ink)}
.mapper-goal b{color:var(--accent)}
.mapper-reset{flex:none;height:32px;padding:0 14px;border:0;border-radius:999px;background:var(--raised);color:var(--ink-2);font-size:13px;cursor:pointer}
.mapper-reset:hover{color:var(--ink)}


/* code blocks with copy */
.code{position:relative}
.copy-btn{position:absolute;top:10px;right:10px;height:28px;padding:0 12px;border:0;border-radius:999px;background:var(--raised);color:var(--ink-2);font:500 12.5px var(--sans);cursor:pointer;opacity:.85}
.copy-btn:hover{opacity:1;color:var(--ink)}
.copy-btn.ok{color:var(--accent)}

@media (max-width:760px){
  .dg{padding:20px 16px 16px}
  .rungs{grid-template-columns:1fr;gap:14px}
  .rung{display:grid;grid-template-columns:1fr;height:auto}
  .step{height:40px;width:calc(40% + var(--lvl) * 60% / var(--n,4));border-radius:8px;align-items:center}
  .rung dl{min-height:0;border-top:0;padding:8px 0 0 2px}
  .ladder-axis{display:none}
  .mapper{padding:18px 14px}
  .mg-head{display:none}
  .mg-row{grid-template-columns:repeat(4,1fr);row-gap:2px;padding:12px 0}
  .mg-task{grid-column:1/-1}
  .mf-goal{flex-direction:column;align-items:flex-start}
  .mg-cell{height:44px}
  .mg-cell .lb{position:absolute;bottom:-2px;font-size:11px;color:var(--ink-3)}
}


/* matrix 2x2 */
.mx{display:grid;grid-template-columns:auto 1fr;grid-template-rows:1fr auto;gap:10px 12px}
.mx-y{grid-row:1;grid-column:1;display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:8px;font-size:12.5px;color:var(--ink-3);padding:6px 0;width:28px}
.mx-y b{writing-mode:vertical-rl;transform:rotate(180deg);white-space:nowrap}
.mx-y b,.mx-x b{font-weight:600;color:var(--ink-2)}
.mx-x{grid-row:2;grid-column:2;display:flex;justify-content:space-between;font-size:12.5px;color:var(--ink-3);padding:0 4px}
.mx-grid{grid-row:1;grid-column:2;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:4px}
.q{padding:16px 18px;border-radius:6px;background:var(--tone);min-height:130px;display:flex;flex-direction:column;gap:4px}
.mx-grid .q:nth-child(1){border-top-left-radius:12px}.mx-grid .q:nth-child(2){border-top-right-radius:12px}.mx-grid .q:nth-child(3){border-bottom-left-radius:12px}.mx-grid .q:nth-child(4){border-bottom-right-radius:12px}
.q b{font:600 16px/1.3 var(--serif);color:var(--ink)}
.q p{margin:0;font-size:13.5px;line-height:1.45;color:var(--ink-2)}
.q em{margin-top:auto;padding-top:6px;font-style:normal;font-size:12.5px;color:var(--ink-3)}
.q.good{background:var(--accent);}.q.good b,.q.good p,.q.good em{color:var(--accent-ink)}
.q.warn{background:var(--warn-soft)}.q.warn b{color:var(--warn)}

/* flow / cycle */
.flow{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(var(--n,4),1fr);gap:28px}
.flow>li{position:relative;min-width:0;margin:0;padding:16px 16px 14px;border-radius:12px;background:var(--tone);display:flex;flex-direction:column;gap:4px}
.flow>li:not(:last-child)::after{content:"";position:absolute;right:-20px;top:50%;width:10px;height:10px;margin-top:-5px;border:solid var(--ink-3);border-width:1.75px 1.75px 0 0;transform:rotate(45deg)}
.flow b{font:600 17px/1.25 var(--serif);color:var(--ink)}
.flow .k{font:600 30px/1 var(--serif);color:var(--accent);margin-bottom:6px}
.flow[style*="--n:5"]{gap:16px}.flow[style*="--n:5"]>li{padding:14px 10px 12px}.flow[style*="--n:5"]>li:not(:last-child)::after{right:-12px;width:8px;height:8px;margin-top:-4px}.flow[style*="--n:5"] b{font-size:13px;letter-spacing:-.015em}
.flow b{hyphens:auto;-webkit-hyphens:auto}
.flow p{margin:0;font-size:13.5px;line-height:1.45;color:var(--ink-2)}
.flow em{margin-top:auto;padding-top:6px;font-size:13px;color:var(--ink-3);font-style:italic;font-family:var(--serif)}
.flow-loop{display:flex;align-items:center;gap:8px;margin:14px 0 0;font-size:13px;color:var(--ink-3)}
.flow-loop::before{content:"";width:28px;height:12px;border:1.75px solid var(--ink-3);border-top:0;border-radius:0 0 10px 10px}

/* timeline */
.tl{list-style:none;margin:0;padding:0;display:flex;gap:4px}
.tl>li{flex:var(--min) 1 0;min-width:0;}
.tl>li:has(b){min-width:112px}
.tl>li{margin:0;display:flex;flex-direction:column;gap:6px}
.tl .dg-bar{height:40px;border-radius:6px;background:color-mix(in srgb,var(--accent) var(--tint,40%),var(--raised));display:flex;align-items:center;padding:0 10px;font:600 13px var(--sans);color:var(--ink);white-space:nowrap;overflow:hidden}
.tl>li:first-child .dg-bar{border-radius:10px 6px 6px 10px}.tl>li:last-child .dg-bar{border-radius:6px 10px 10px 6px}
.tl b{font:600 15px/1.3 var(--serif);color:var(--ink);padding:0 2px}
.tl p{margin:0;font-size:13px;line-height:1.45;color:var(--ink-2);padding:0 2px}
.tl-total{margin:12px 0 0;font-size:13px;color:var(--ink-3)}

/* canvas: role / factor cards */
.dg-cv{display:grid;grid-template-columns:repeat(var(--n,4),1fr);gap:10px}
.cv-cell{padding:16px 16px 14px;border-radius:12px;background:var(--tone);display:flex;flex-direction:column;gap:4px}
.cv-cell.hl{background:var(--accent-soft)}
.cv-l{font:600 34px/1 var(--serif);color:var(--accent);margin-bottom:6px}
.cv-cell b{font:600 16px/1.3 var(--serif);color:var(--ink)}
.cv-cell p{margin:0;font-size:13.5px;line-height:1.45;color:var(--ink-2)}
.cv-cell em{margin-top:auto;padding-top:6px;font-style:normal;font-size:12.5px;color:var(--ink-3)}
.cv-formula{margin:16px 0 0;padding:12px 16px;border-radius:10px;background:var(--accent-soft);font:500 15px var(--sans);color:var(--ink);text-align:center}
@media (max-width:760px){
  .flow,.dg-cv{grid-template-columns:1fr;gap:22px}.dg-cv{gap:8px}
  .flow>li:not(:last-child)::after{right:auto;left:50%;top:auto;bottom:-15px;margin:0 0 0 -5px;transform:rotate(135deg)}
  .rungs[style*="--n:5"] .rung,.rungs[style*="--n:6"] .rung,.rungs[style*="--n:7"] .rung{grid-template-columns:1fr;gap:6px}
  .rungs[style*="--n:5"] dl,.rungs[style*="--n:6"] dl,.rungs[style*="--n:7"] dl{grid-template-columns:1fr}
  .tl{flex-direction:column}.tl>li{flex:none}.tl .dg-bar{width:calc(30% + var(--min) * 4%);max-width:100%}
  .mx-grid{grid-template-columns:1fr}.mx-grid .q{border-radius:10px!important}.mx-y,.mx-x{display:none}
}
.prose ol.flow,.prose ol.tl,.prose ol.rungs,.prose .glance ol{padding:0;margin:0}


/* rollout fixes */
.tl{flex-wrap:wrap;row-gap:14px}
.tl>li:has(b){min-width:88px}
.tl-total{margin-top:16px}
.prose ol.flow+ol.flow{margin-top:16px}
.flow b{font-size:16px;hyphens:auto;-webkit-hyphens:auto}
.flow[style*="--n:4"]>li{padding:16px 12px 14px}.flow[style*="--n:4"] b{font-size:15px}



/* diagram footers: beat .prose p margins */
.prose .dg p.cv-formula,.prose .dg p.flow-loop,.prose .dg p.tl-total{margin:16px 0 0}
.prose .dg p.ladder-owner{margin:18px 0 0}
.prose .dg figcaption{margin-top:14px}


/* ---------- self-assessment (editable) ---------- */
.sa-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px;margin:1.4em 0;padding:12px 14px 12px 18px;border-radius:12px;background:var(--accent-soft);font-family:var(--sans)}
.sa-st{display:flex;flex-direction:column;gap:1px;font-size:13.5px}
.sa-st b{font-weight:600;color:var(--ink)}
.sa-st span{color:var(--ink-2);font-variant-numeric:tabular-nums}
.sa-actions{display:flex;flex-wrap:wrap;gap:6px}
.sa-actions button,.sa-imp{height:32px;padding:0 14px;border:0;border-radius:999px;background:var(--raised);color:var(--ink);font:500 13px var(--sans);cursor:pointer;display:inline-flex;align-items:center}
.sa-actions button:hover,.sa-imp:hover{color:var(--accent)}
.sa-actions .sa-danger{background:transparent;color:var(--ink-3)}
.sa-actions .sa-danger:hover{color:var(--warn)}
.sa-table td{vertical-align:middle}
.sa-table td:nth-child(3),.sa-table td:nth-child(4){width:70px}
.sa-table td:nth-child(5){min-width:180px;width:34%}




tr.sa-low td:first-child::after{content:" · lowest";color:var(--warn);font-weight:600;font-size:12.5px}
tr.sa-gap td:last-child{color:var(--warn);font-weight:650}
tr.sa-gap td:last-child::after{content:" · biggest gap";font-weight:500;font-size:12.5px}
@media print{.sa-bar{display:none}.sa-sel,}


/* ---------- checklists ---------- */
.prose li.task{list-style:none;margin-left:-1.25em;padding-left:0}
.tk{display:flex;align-items:flex-start;gap:10px;cursor:pointer}
.tk input{appearance:none;-webkit-appearance:none;flex:none;width:19px;height:19px;margin:.22em 0 0;border-radius:6px;background:var(--raised);box-shadow:inset 0 0 0 1.5px var(--line-2);cursor:pointer;display:grid;place-items:center;transition:background-color .15s,box-shadow .15s}
.tk input::after{content:"";width:5px;height:10px;margin-top:-2px;border:solid var(--accent-ink);border-width:0 2px 2px 0;transform:rotate(45deg) scale(0);transition:transform .15s var(--ease)}
.tk input:checked{background:var(--accent);box-shadow:none}
.tk input:checked::after{transform:rotate(45deg) scale(1)}
.tk:hover input:not(:checked){box-shadow:inset 0 0 0 1.5px var(--accent)}
.tk input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.tk span{flex:1;min-width:0}
li.task.done>.tk span{color:var(--ink-3);text-decoration:line-through;text-decoration-color:var(--line-2)}


/* ---------- self-assessment info toggletips ---------- */
.sa-info{display:inline-grid;place-items:center;width:22px;height:22px;padding:0;line-height:0;margin-left:2px;vertical-align:-5px;border:0;border-radius:50%;background:none;color:var(--ink-3);cursor:pointer;transition:color .15s,background-color .15s}
.sa-info .i{width:16px;height:16px;display:block}
.sa-info:hover,.sa-info[aria-expanded=true]{color:var(--accent);background:var(--accent-soft)}
.sa-tip{position:fixed;z-index:60;width:min(360px,calc(100vw - 24px));padding:16px 18px 14px;border-radius:14px;background:var(--raised);color:var(--ink);box-shadow:var(--float);font:400 14px/1.5 var(--sans);animation:enter .18s var(--ease)}
.sa-tip[hidden]{display:none}
.sa-tip-h{display:flex;gap:10px;align-items:baseline;margin-bottom:8px}
.sa-tip-h span{font-weight:650;color:var(--accent);font-variant-numeric:tabular-nums}
.sa-tip-h b{font:600 16px/1.3 var(--serif)}
.sa-tip p{margin:0 0 10px}
.sa-tip-k{font-size:12.5px;font-weight:600;color:var(--ink-3);margin-bottom:2px}
.sa-tip ul{margin:0 0 10px;padding-left:1.1em}
.sa-tip li{margin:2px 0}
.sa-tip-l{display:flex;flex-wrap:wrap;gap:6px;padding-top:10px;box-shadow:inset 0 1px 0 var(--line)}
.sa-tip-l a{font-size:12.5px;padding:3px 10px;border-radius:999px;background:var(--tone);color:var(--ink-2);text-decoration:none}
.sa-tip-l a:hover{background:var(--accent-soft);color:var(--accent)}
@media print{.sa-info,.sa-tip{display:none!important}}


/* ---------- colorize: text-on-colour roles (audit fixes) ---------- */
:root{--core:#8f5414;--step-deep:#0f2f2b;--on-color-mix:#1b1a17}
:root:not([data-mode="light"]){--core:#ddac6c;--step-deep:#b3e2da}
@media (prefers-color-scheme:dark){:root:not([data-mode="light"]){--core:#ddac6c;--step-deep:#b3e2da}}
/* upper ladder steps deepen (light) or brighten (dark) toward a fixed pole, so their text always clears 4.5:1 */
.rung.on-dark .step{background:color-mix(in srgb,var(--accent) calc(100% - var(--lvl) * 35% / var(--n,4)),var(--step-deep))}
/* category colour carrying text: a deeper shade of the same hue */
.fx-next .cx-next{background:color-mix(in srgb,var(--pc) 76%,var(--on-color-mix))}
.fx-next .cx-next .cx-k,.fx-next .cx-next .cx-d{color:rgba(244,239,225,.93)}
/* accent card: secondary text at near full strength */
.cx-next .cx-k,.cx-next .cx-d{color:color-mix(in srgb,var(--accent-ink) 92%,transparent)}
/* dark theme: keep light text readable on mid-tone data colours */
:root:not([data-mode="light"]) .tl .dg-bar{background:color-mix(in srgb,var(--accent) calc(var(--tint,40%) * .55),var(--raised))}
:root:not([data-mode="light"]) .rung:not(.on-dark) .step{background:color-mix(in srgb,var(--accent) calc(var(--lvl) * 50% / var(--n,4) + 4%),var(--raised))}
@media (prefers-color-scheme:dark){
  :root:not([data-mode="light"]) .tl .dg-bar{background:color-mix(in srgb,var(--accent) calc(var(--tint,40%) * .55),var(--raised))}
  :root:not([data-mode="light"]) .rung:not(.on-dark) .step{background:color-mix(in srgb,var(--accent) calc(var(--lvl) * 50% / var(--n,4) + 4%),var(--raised))}
}


/* ===== widgets ===== */
.pcv{margin:1.2em 0 2em;font-family:var(--sans)}
.pcv-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px;padding:12px 14px 12px 18px;border-radius:12px;background:var(--accent-soft);margin-bottom:18px}
.pcv-diag{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:22px}
.pcv label{display:flex;flex-direction:column;gap:5px}
.pcv label span,.pcv-h span{font-size:13px;font-weight:600;color:var(--ink-2)}
.pcv textarea,.pcv input{width:100%;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:var(--raised);color:var(--ink);font:400 14px/1.45 var(--sans);resize:none;overflow:hidden}
.pcv textarea::placeholder,.pcv input::placeholder{color:var(--ink-3)}
.pcv textarea:focus,.pcv input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--sel)}
.pcv-h{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;margin-bottom:10px}
.pcv-h small{font-size:13px;color:var(--ink-3)}
.prose ol.pcv-list{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:1fr 1fr;gap:12px}
.prose .pcv-list li.pcv-p{margin:0;padding:14px 16px 12px;border-radius:14px;background:var(--tone);display:flex;flex-direction:column;gap:10px}
.pcv-ph{display:flex;align-items:center;gap:10px}
.pcv-n{flex:none;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:var(--accent);color:var(--accent-ink);font:650 13px var(--sans)}
.pcv-ph input{font:600 16px/1.3 var(--serif);border-color:transparent;background:var(--raised)}
.pcv-rm{flex:none;height:28px;padding:0 10px;border:0;border-radius:999px;background:none;color:var(--ink-3);font:500 12.5px var(--sans);cursor:pointer}
.pcv-rm:hover{color:var(--warn)}
.pcv-score{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
.pcv-score span{font-size:12.5px;font-weight:600;color:var(--ink-3);margin-right:6px}
.pcv-score button{width:30px;height:30px;border:0;border-radius:8px;background:var(--raised);color:var(--ink-2);font:600 13px var(--sans);font-variant-numeric:tabular-nums;cursor:pointer;box-shadow:inset 0 0 0 1px var(--line)}
.pcv-score button:hover{color:var(--accent)}
.pcv-score button[aria-pressed=true]{background:var(--accent);color:var(--accent-ink);box-shadow:none}
.pcv-add{margin-top:12px;height:36px;padding:0 16px;border:1px dashed var(--line-2);border-radius:999px;background:none;color:var(--accent);font:550 14px var(--sans);cursor:pointer}
.pcv-add:hover{border-color:var(--accent);background:var(--accent-soft)}
.pcv-add[hidden]{display:none}
.pcv-health{margin-top:20px}
.pcv-hh{font-size:13px;font-weight:600;color:var(--ink-2);margin-bottom:8px}
.pcv-hr{display:grid;grid-template-columns:minmax(120px,220px) 1fr 40px;align-items:center;gap:12px;padding:5px 0;font-size:14px}
.pcv-hr span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pcv-hr i{height:8px;border-radius:9px;background:var(--tone-2);overflow:hidden}
.pcv-hr b{display:block;height:100%;border-radius:9px;background:var(--accent);transition:width .3s var(--ease)}
.pcv-hr em{font-style:normal;font-size:13px;color:var(--ink-3);font-variant-numeric:tabular-nums;text-align:right}
@media (max-width:760px){.pcv-diag,.prose ol.pcv-list{grid-template-columns:1fr}}
@media print{.pcv-bar,.pcv-add,.pcv-rm{display:none}}
.pcv .pcv-ph input{flex:1 1 0;width:0;min-width:0}
.pcv-score span{width:100%;margin:0 0 2px}
.pcv .sa-imp{flex-direction:row;gap:0}
.pcv-rm{width:28px;padding:0!important;display:grid;place-items:center}.pcv-rm .i{width:15px;height:15px}

/* design system ROI estimate widget */
.ds-roi-calculator-grid{display:grid;grid-template-columns:1.25fr 1fr;gap:16px;align-items:start}
.ds-roi-calculator-part{display:grid;grid-template-columns:1fr 104px;align-items:center;gap:8px 12px;margin:0;padding:14px 16px;border:1px solid var(--line);border-radius:12px;min-width:0}
.ds-roi-calculator-part legend{padding:0 6px;margin-left:-6px;font:600 15px/1.3 var(--serif);color:var(--ink)}
.ds-roi-calculator-part label{font-size:13.5px;line-height:1.35;color:var(--ink-2)}
.ds-roi-calculator-in{width:100%;min-width:0}   /* look: .input in styles.css */
.ds-roi-calculator-in:invalid{border-color:var(--attn);box-shadow:inset 0 0 0 1px var(--attn)}
.ds-roi-calculator-note{grid-column:1 / -1;margin:4px 0 0!important;font-size:13px;line-height:1.4;color:var(--ink-3)}
.mapper[data-widget="ds-roi-calculator"] .mf-move b{font-size:28px;color:var(--accent)}

@media (max-width:760px){
  .ds-roi-calculator-grid{grid-template-columns:1fr}
  .ds-roi-calculator-part{grid-template-columns:1fr 96px}
}

/* scrim calculator widget */
.scrim-calculator-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:stretch}
.scrim-calculator-part{display:grid;grid-template-columns:1fr 72px;align-items:center;gap:10px 12px;margin:0;padding:14px 16px;border:1px solid var(--line);border-radius:12px;min-width:0}
.scrim-calculator-part legend{padding:0 6px;margin-left:-6px;font:600 15px/1.3 var(--serif);color:var(--ink)}
.scrim-calculator-part label{font-size:13.5px;line-height:1.35;color:var(--ink-2)}
.scrim-calculator-in{width:100%;min-width:0;padding:.3rem .4rem;cursor:pointer}   /* look: .input in styles.css */
.scrim-calculator-preview{display:grid;grid-template-columns:1fr 1fr;gap:10px;min-width:0}
.scrim-calculator-pv{display:flex;flex-direction:column;justify-content:space-between;gap:12px;min-height:120px;padding:12px 14px;border-radius:12px;border:1px solid var(--line);background:var(--scrim-calculator-bg,var(--tone));color:var(--scrim-calculator-fg,var(--ink))}
.scrim-calculator-pv-k{font-size:12.5px;line-height:1.3}
.scrim-calculator-pv-t{font:600 22px/1.15 var(--serif);overflow-wrap:anywhere}
.mapper[data-widget="scrim-calculator"] .mf-move b{font-size:28px;color:var(--accent)}

@media (max-width:760px){
  .scrim-calculator-grid{grid-template-columns:1fr}
  .scrim-calculator-pv{min-height:96px}
}

/* sus calculator widget */
.sus-calculator-list{list-style:none;margin:0!important;padding:0!important;font-size:14px;line-height:1.4}
.sus-calculator-list li{display:grid;grid-template-columns:1fr 190px;align-items:center;gap:12px;margin:0!important;padding:8px 0;border-bottom:1px solid var(--line)}
.sus-calculator-list li:last-child{border-bottom:0}
.sus-calculator-list label{display:flex;gap:10px;color:var(--ink)}
.sus-calculator-n{flex:none;width:22px;font:600 15px/1.3 var(--serif);color:var(--ink-3)}
.sus-calculator-in{width:100%}   /* look: .input in styles.css */
.mapper[data-widget="sus-calculator"] .mf-move b{font-size:28px;color:var(--accent)}
.mapper[data-widget="sus-calculator"] .mf-move p.sus-calculator-sub{margin-top:6px!important;font-size:13px;color:var(--ink-3)}
.mapper[data-widget="sus-calculator"] .mf-move p.sus-calculator-sub b{display:inline;margin:0;font:inherit;font-weight:600;color:var(--ink-2)}
.sus-calculator-many{margin-top:16px}
.sus-calculator-label{display:block;margin-bottom:6px;font-size:13px;font-weight:550;color:var(--ink-2)}
.sus-calculator-row{display:flex;gap:10px;align-items:flex-start}
.sus-calculator-text{flex:1;min-width:0;resize:vertical}
.mapper .sus-calculator-add{border:1px solid var(--line)}
.sus-calculator-mean{margin:8px 0 0!important;font-size:14px;color:var(--ink-2)}
.sus-calculator-mean b{color:var(--accent)}

@media (max-width:760px){
  .sus-calculator-list li{grid-template-columns:1fr;gap:6px}
  .sus-calculator-row{flex-direction:column;align-items:stretch}
}

/* spring parameter guide widget */
.spring-visualizer-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);gap:16px;align-items:start}
.spring-visualizer-part{display:grid;grid-template-columns:1fr 96px;align-items:center;gap:8px 12px;margin:0;padding:14px 16px;border:1px solid var(--line);border-radius:12px;min-width:0}
.spring-visualizer-part legend{padding:0 6px;margin-left:-6px;font:600 15px/1.3 var(--serif);color:var(--ink)}
.spring-visualizer-part label{font-size:13.5px;line-height:1.35;color:var(--ink-2)}
.spring-visualizer-in{width:100%;min-width:0}   /* look: .input in styles.css */
.spring-visualizer-in:invalid{border-color:var(--attn);box-shadow:inset 0 0 0 1px var(--attn)}
.spring-visualizer-note{grid-column:1 / -1;margin:4px 0 0!important;font-size:13px;line-height:1.4;color:var(--ink-3)}
.spring-visualizer-view{display:grid;gap:10px;min-width:0}
.spring-visualizer-plot{display:block;width:100%;height:auto;background:var(--tone);border-radius:12px}
.spring-visualizer-curve{fill:none;stroke:var(--accent);stroke-width:2;stroke-linejoin:round}
.spring-visualizer-target{stroke:var(--ink-3);stroke-width:1;stroke-dasharray:4 4}
.spring-visualizer-axis{stroke:var(--line-2);stroke-width:1}
.spring-visualizer-label{fill:var(--ink-3);font-size:11px}
.spring-visualizer-run{display:flex;align-items:center;gap:12px}
.spring-visualizer-track{position:relative;flex:1;height:24px;border-radius:12px;background:var(--tone-2)}
.spring-visualizer-dot{position:absolute;left:2px;top:2px;width:20px;height:20px;border-radius:50%;background:var(--accent)}
.spring-visualizer-play{height:34px;padding:0 14px;font:inherit;font-weight:600;color:var(--accent-ink);background:var(--accent);border:0;border-radius:17px;cursor:pointer}
.spring-visualizer-play:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.spring-visualizer-still{margin:0!important;font-size:13px;line-height:1.4;color:var(--ink-3)}
.mapper[data-widget="spring-visualizer"] .mf-move b{font-size:28px;color:var(--accent)}

@media (max-width:760px){
  .spring-visualizer-grid{grid-template-columns:1fr}
  .spring-visualizer-part{grid-template-columns:1fr 96px}
}

/* rice calculator widget */
.rice-calculator-wrap{overflow-x:auto}
.rice-calculator-table{font-size:14px;line-height:1.4}
.rice-calculator-cap{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.rice-calculator-table thead th{padding:6px 8px 8px 0;font-size:12.5px;font-weight:550;white-space:nowrap}
.rice-calculator-table thead th span{display:block;font-weight:400;color:var(--ink-3)}
.rice-calculator-table tbody th,.rice-calculator-table tbody td{padding:10px 8px 10px 0;vertical-align:middle;border-bottom:1px solid var(--line)}
.rice-calculator-table tbody tr:last-child th,.rice-calculator-table tbody tr:last-child td{border-bottom:0}
.rice-calculator-table tbody tr{transition:background-color .15s}
.rice-calculator-item{font-size:14px;font-weight:550;color:var(--ink);min-width:96px}
.rice-calculator-rank{width:44px;padding-left:10px!important;font:600 18px/1 var(--serif);color:var(--ink-3)}
.rice-calculator-score{min-width:56px;text-align:right;padding-right:12px!important;font:600 18px/1 var(--serif);color:var(--ink)}
.rice-calculator-in{box-sizing:border-box;width:68px;min-width:0;height:34px;padding:0 6px;font:inherit;color:var(--ink);background:var(--raised);border:1px solid var(--line);border-radius:8px}
.rice-calculator-in:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
select.rice-calculator-in{width:100%;min-width:76px;padding-right:2px}
.rice-calculator-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.rice-calculator-table tr.rice-calculator-top{background:var(--accent-soft)}
.rice-calculator-table tr.rice-calculator-top th,.rice-calculator-table tr.rice-calculator-top td{border-bottom-color:transparent}
.rice-calculator-top .rice-calculator-rank,.rice-calculator-top .rice-calculator-score{color:var(--accent)}
.rice-calculator-bad .rice-calculator-score{font:500 13px var(--sans);color:var(--warn)}
.rice-calculator-bad [data-f="effort"]{border-color:var(--warn);background:var(--warn-soft)}
.mapper[data-widget="rice-calculator"] .mf-move strong{color:var(--accent)}

@media (max-width:760px){
  .rice-calculator-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .rice-calculator-table,.rice-calculator-table tbody{display:block}
  .rice-calculator-table tbody tr{display:grid;grid-template-columns:1fr 1fr;gap:8px 10px;padding:12px;border-radius:12px;border-bottom:1px solid var(--line)}
  .rice-calculator-table tbody th,.rice-calculator-table tbody td{display:block;padding:0!important;border:0!important;text-align:left}
  .rice-calculator-item{grid-column:1 / -1;order:-1;min-width:0}
  .rice-calculator-rank,.rice-calculator-score{width:auto;font-size:16px}
  .rice-calculator-table tbody td[data-label]::before{content:attr(data-label);display:block;margin-bottom:3px;font:550 12px var(--sans);color:var(--ink-3)}
  .rice-calculator-in,select.rice-calculator-in{min-width:0;width:100%}
}
select.rice-calculator-in[data-f="impact"]{min-width:104px}

/* delegation picker widget */
.delegation-picker-controls{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px}
.delegation-picker-group{margin:0;padding:0;border:0;min-width:0}
.delegation-picker-group legend{padding:0;margin-bottom:8px;font-size:13px;font-weight:550;color:var(--ink-3)}
.delegation-picker-opts{display:flex;gap:8px}
.delegation-picker-opts button{flex:1;font:inherit;font-size:14px;height:34px;padding:0 12px;border-radius:8px;border:1px solid var(--line);background:var(--raised);color:var(--ink-2);cursor:pointer}
.delegation-picker-opts button:hover{color:var(--ink);border-color:var(--line-2)}
.delegation-picker-opts button[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:var(--accent-ink);font-weight:600}
.delegation-picker-opts button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.delegation-picker-scale{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin:0;padding:0;list-style:none}
.delegation-picker-scale li{margin:0;padding:8px 6px;border-radius:8px;background:var(--tone);color:var(--ink-3);font-size:12.5px;font-weight:550;text-align:center}
.delegation-picker-scale li.delegation-picker-fill{background:var(--tone-2);color:var(--ink-2)}
.delegation-picker-scale li.delegation-picker-on{background:var(--accent);color:var(--accent-ink)}
@media (max-width:760px){
  .delegation-picker-controls{grid-template-columns:1fr}
  .delegation-picker-scale{grid-template-columns:1fr;gap:4px}
  .delegation-picker-scale li{text-align:left;padding:6px 10px}
}

/* margin of error calculator widget */
.moe-calculator-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.moe-calculator-part{display:grid;grid-template-columns:1fr 120px;align-items:center;gap:8px 12px;margin:0;padding:14px 16px;border:1px solid var(--line);border-radius:12px;min-width:0}
.moe-calculator-part legend{padding:0 6px;margin-left:-6px;font:600 15px/1.3 var(--serif);color:var(--ink)}
.moe-calculator-part label{font-size:13.5px;line-height:1.35;color:var(--ink-2)}
.moe-calculator-in{width:100%;min-width:0}   /* look: .input in styles.css */
.moe-calculator-in:invalid{border-color:var(--attn);box-shadow:inset 0 0 0 1px var(--attn)}
.mapper[data-widget="moe-calculator"] .mf-move b{font-size:28px;color:var(--accent)}
.mapper[data-widget="moe-calculator"] .mf-move p.moe-calculator-adj{margin-top:6px!important;font-size:13px;color:var(--ink-3)}

@media (max-width:760px){
  .moe-calculator-grid{grid-template-columns:1fr}
  .moe-calculator-part{grid-template-columns:1fr 104px}
}

/* ===== site layer ===== */
/* Study area (marcusandrey.com/study). A Read surface on the studio ground: the site's type and tokens,
   a long comfortable measure, a quiet sidebar and an "on this page" column. Course components (diagrams,
   ladders, matrices, widgets) follow below this block, bridged to the site tokens. */

/* ---------- bridge: course variables → site tokens ---------- */
.is-study {
  --raised: var(--surface);
  --tone: color-mix(in srgb, var(--ink) 6%, var(--ground));
  --tone-2: color-mix(in srgb, var(--ink) 11%, var(--ground));
  --pill: var(--tone-2); --seg-on: var(--surface-2);
  --ink-2: var(--ink-soft); --ink-3: var(--ink-soft);
  --line: color-mix(in srgb, var(--ink) 12%, transparent);
  --accent-hover: color-mix(in srgb, var(--accent) 78%, var(--ink));
  --accent-ink: var(--ground);
  --accent-soft: color-mix(in srgb, var(--accent) 14%, var(--ground));
  --accent-line: color-mix(in srgb, var(--accent) 40%, var(--ground));
  --info: var(--accent); --info-soft: var(--accent-soft);
  --warn: color-mix(in srgb, #d08a2e 70%, var(--ink)); --warn-soft: color-mix(in srgb, #d08a2e 14%, var(--ground)); --core: var(--warn);
  --sel: color-mix(in srgb, var(--accent) 25%, transparent);
  --serif: var(--display); --sans: var(--text);
  --top: var(--bar-h); --r: 10px; --ease: var(--ease-out);
}
.is-study .i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.is-study .i.inl { width: 1.05em; height: 1.05em; vertical-align: -.16em; margin-right: .3em; color: var(--accent); }
.is-study .switch .i.switch__icon { width: 1.05rem; height: 1.05rem; }

/* ---------- layout ---------- */
.st { padding: calc(var(--bar-h) + clamp(1.5rem, 3vw, 2.5rem)) 0 clamp(3rem, 6vw, 5rem); }
.st-grid { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr) 13rem; gap: clamp(1.5rem, 3vw, 3.5rem); align-items: start; }
.st-article { min-width: 0; max-width: 46rem; }
.st-side, .st-toc { position: sticky; top: calc(var(--bar-h) + 1.25rem); max-height: calc(100vh - var(--bar-h) - 2.5rem); overflow-y: auto; scrollbar-width: thin; font-size: var(--t-small); }
.st-side .st-side__track { display: grid; gap: .1rem; text-decoration: none; margin: 0 0 .5rem; padding: 0; color: var(--ink); }
.st-side .st-side__track:hover { background: none; }
.st-side__track span { color: var(--ink-soft); font-size: .8125rem; }
.st-side__track b { font: 600 1.25rem/1.1 var(--display); letter-spacing: -.02em; }
.st-side__prog { color: var(--ink-soft); margin-bottom: 1.25rem; min-height: 1.2em; }
.st-side__grp { margin-bottom: 1.25rem; }
.st-side__h { font-weight: 600; margin-bottom: .4rem; }
.st-side ol, .st-toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: .1rem; }
.st-side a, .st-toc a { display: block; padding: .3rem .6rem; margin-left: -.6rem; border-radius: 6px; color: var(--ink-soft); text-decoration: none; line-height: 1.3; }
.st-side a:hover, .st-toc a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.st-side a[aria-current="page"] { color: var(--ink); background: var(--surface); font-weight: 600; }
/* done state: an empty circle until the lesson is marked as done, then a filled circle with a check */
.st-side a[data-lesson], .st-done [data-done] { display: flex; align-items: flex-start; gap: .6rem; }
.st-done [data-done] { align-items: center; }
.st-side a[data-lesson]::before, .st-done [data-done]::before {
  content: ""; flex: none; width: 1rem; height: 1rem; margin-top: .1em; border-radius: 50%; box-sizing: border-box;
  border: 1.5px solid color-mix(in srgb, var(--ink) 38%, transparent); transition: background-color .2s var(--ease-out), border-color .2s var(--ease-out);
}
.st-done [data-done]::before { width: 1.15rem; height: 1.15rem; margin-top: 0; }
.st-side a.is-done::before, .st-done [data-done][aria-pressed="true"]::before {
  border: 0; background: var(--accent-fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.2 8.3 2.5 2.5 5.1-5.3'/%3E%3C/svg%3E") center / 100% no-repeat;
}
/* on the pressed button (accent fill), the mark turns white with an accent check */
.st-done [data-done][aria-pressed="true"]::before {
  background: var(--on-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%232547d0' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.2 8.3 2.5 2.5 5.1-5.3'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.st-side a[aria-current="page"]:not(.is-done)::before { border-color: var(--ink); }
@media (forced-colors: active) { .st-side a.is-done::before, .st-done [data-done][aria-pressed="true"]::before { background-color: CanvasText; } }
.st-side__all { margin-top: .5rem; color: var(--accent) !important; font-weight: 600; }
.st-toc__h { font-weight: 600; margin-bottom: .4rem; }
.st-toc a.is-here { color: var(--ink); box-shadow: inset 2px 0 0 var(--accent); border-radius: 0 6px 6px 0; }

.st-crumbs { display: flex; flex-wrap: wrap; gap: .4rem; font-size: var(--t-small); color: var(--ink-soft); margin-bottom: 1.25rem; }
.st-crumbs a { color: var(--ink-soft); }
.st-head { display: grid; gap: .9rem; margin-bottom: 2rem; }
.st-kind { font-size: var(--t-small); color: var(--ink-soft); }
.st-title { font: 700 clamp(2.4rem, 5vw, 4rem)/.98 var(--display); letter-spacing: -.035em; text-wrap: balance; }
.st-lead { font: 400 clamp(1.2rem, 1.6vw, 1.45rem)/1.4 var(--display); letter-spacing: -.01em; color: var(--ink); text-wrap: pretty; }

/* ---------- prose (overrides the course prose for the site's type) ---------- */
.st-body { font-size: 1.0625rem; line-height: 1.65; color: var(--ink); }
.st-body > * + * { margin-top: 1.1em; }
.st-body h2 { font: 600 clamp(1.6rem, 2.4vw, 2.1rem)/1.1 var(--display); letter-spacing: -.025em; margin-top: 2.6em; scroll-margin-top: calc(var(--bar-h) + 1rem); position: relative; }
.st-body h3 { font: 600 1.3rem/1.2 var(--display); letter-spacing: -.015em; margin-top: 2em; scroll-margin-top: calc(var(--bar-h) + 1rem); position: relative; }
.st-body h2 .anchor, .st-body h3 .anchor { opacity: 0; margin-left: .35rem; color: var(--ink-soft); vertical-align: middle; transition: opacity .15s; }
.st-body h2:hover .anchor, .st-body h3:hover .anchor, .st-body .anchor:focus-visible { opacity: 1; }
.st-body a { color: var(--accent); text-underline-offset: .18em; }
.st-body a.ext::after { content: "↗"; font-size: .8em; margin-left: .15em; }
.st-body ul, .st-body ol { padding-left: 1.3em; display: grid; gap: .35em; }
.st-body li::marker { color: var(--accent); }
.st-body strong { font-weight: 650; }
.st-body blockquote { margin: 1.6em 0; color: var(--ink); font: 400 clamp(1.25rem, 1.8vw, 1.45rem)/1.4 var(--display); letter-spacing: -.01em; text-wrap: pretty; }   /* a pull quote set by type, not by a side rule */
.st-body hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.st-body code { font: .92em ui-monospace, "SF Mono", Menlo, monospace; background: var(--tone); padding: .1em .35em; border-radius: 4px; }
.st-body .table-wrap { overflow-x: auto; margin-inline: -.25rem; }
.st-body table { width: 100%; border-collapse: collapse; font-size: .96rem; line-height: 1.45; }
.st-body th, .st-body td { text-align: left; vertical-align: top; padding: .6rem .75rem; border-bottom: 1px solid var(--line); }
.st-body th { font-weight: 600; color: var(--ink); border-bottom-color: var(--line-2); }
.st-body td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-body .callout { background: var(--surface); border-radius: 10px; padding: 1rem 1.15rem; }
.st-body .callout .c-title { display: flex; gap: .5rem; align-items: center; font-weight: 600; margin-bottom: .35rem; }
.st-body .callout .c-title .i { color: var(--accent); }
.st-body .callout .c-body > * + * { margin-top: .6em; }
.st-body .callout.c-tip, .st-body .callout.c-ai { background: var(--accent-soft); }
.st-body .callout.c-warning, .st-body .callout.c-danger { background: var(--warn-soft); }
.st-body li.task { list-style: none; margin-left: -1.3em; }
.st-body .tk { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; }
.st-body .tk input { margin-top: .35em; width: 1.05rem; height: 1.05rem; accent-color: var(--accent-fill); flex: none; }
.st-body li.done > .tk span { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: var(--line-2); }
.st-body .term { text-decoration-style: dotted; }

/* ---------- done, pager ---------- */
.st-done { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.st-done__note { font-size: var(--t-small); color: var(--ink-soft); }
.st-done [aria-pressed="true"] { background: var(--accent-fill); color: var(--on-accent); }
.st-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }
.st-pager a { display: grid; gap: .2rem; padding: 1rem 1.1rem; border-radius: 10px; background: var(--surface); text-decoration: none; font: 600 1.05rem/1.3 var(--display); }
.st-pager a span { font: 400 var(--t-small) var(--text); color: var(--ink-soft); }
.st-pager__next { text-align: right; grid-column: 2; }
.st-pager a:hover { background: var(--surface-2); }
.btn--quiet { background: color-mix(in srgb, var(--ink) 12%, transparent); color: var(--ink); border: 0; }

/* ---------- library and glossary ---------- */
.lib { list-style: none; padding: 0 !important; display: grid !important; gap: .75rem !important; }
.lib__item { display: grid; grid-template-columns: 4rem 1fr; gap: 1rem; padding: .9rem; border-radius: 10px; background: var(--surface); scroll-margin-top: calc(var(--bar-h) + 1rem); }
.lib__item:target { outline: 2px solid var(--accent); }
.lib__type { align-self: start; font-size: .8125rem; text-transform: capitalize; color: var(--ink-soft); padding-top: .2rem; }
.lib__title { font-weight: 600; }
.lib__meta, .lib__blurb { font-size: var(--t-small); color: var(--ink-soft); margin-top: .2rem; }
.lib__item { grid-template-columns: 4rem minmax(0, 1fr); }   /* long domains and code names must not widen the list on a phone */
.lib__txt { overflow-wrap: anywhere; }
.lib__item--bare { grid-template-columns: minmax(0, 1fr); }   /* the general library is grouped by type, so the type column would repeat the heading */
.lib .lib__txt p { margin-block-end: 0; }
.lib__in { font-size: var(--t-small); color: var(--ink-soft); margin-top: .35rem; }
.lib__in a { color: inherit; text-underline-offset: .18em; }
.lib-all a.lib__title { color: var(--accent); text-underline-offset: .18em; }
.lib a.lib__title { display: inline-block; min-height: 24px; line-height: 1.45; }   /* WCAG 2.2 target size */
.lib-noscript { font-size: var(--t-small); color: var(--ink-soft); }   /* same as the course libraries: cobalt marks what to press */
.lib-all a.lib__title.ext::after { content: "↗"; font-size: .8em; margin-left: .15em; }
.lib-all .lib__item[hidden], .lib-all [hidden] { display: none; }
/* filter (JS only) and the jump row */
.lib-filter { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem 1rem; margin-bottom: 1rem; max-width: 52rem; }
.lib-filter[hidden] { display: none; }
.lib-filter label { display: grid; gap: .3rem; font-size: var(--t-small); color: var(--ink-soft); }
.lib-filter__q { flex: 1 1 16rem; }
/* fields: .input; Clear: .text-btn with pill padding */
.lib-filter__clear { min-height: 2.75rem; padding: .55rem .9rem; border-radius: 999px; }
.lib-filter__n { flex-basis: 100%; font-size: var(--t-small); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.lib-jump { position: sticky; top: var(--bar-h); z-index: 2; margin: 0 calc(-1 * var(--margin)) clamp(1.5rem, 3vw, 2.5rem); padding: .6rem var(--margin); background: var(--ground); border-bottom: 1px solid var(--line); }
.lib-jump ul { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; list-style: none; padding: 0; margin: 0; }
.lib-jump a { color: var(--ink); text-decoration: none; font-size: var(--t-small); font-weight: 600; white-space: nowrap; }
.lib-jump a:hover { color: var(--accent); }
.lib-jump a span { font-weight: 400; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.lib-all h2 { scroll-margin-top: calc(var(--bar-h) + 4rem); }
.lib-all .lib__item { scroll-margin-top: calc(var(--bar-h) + 4.5rem); }   /* no content-visibility: its estimated heights moved jump targets while the page scrolled to them (19-11-2026); the lazy load keeps the first paint light */
@media (max-width: 767px) { .lib-jump ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: .1rem; } .lib-jump ul::-webkit-scrollbar { display: none; } }
/* the general library (/study/library.html): links to each course's own list, then every resource by type */
.lib-courses { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.lib-courses p { font-size: var(--t-small); color: var(--ink-soft); }
.lib-courses ul { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
/* course links: .pill (styles.css) */
.lib-courses a span, .lib-all__n { font-weight: 400; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.lib-all { max-width: 52rem; }
.cover { display: grid; align-content: space-between; aspect-ratio: 2 / 3; width: 4rem; padding: .4rem; border-radius: 3px; background: var(--accent-fill); color: var(--on-accent); font-size: .55rem; line-height: 1.15; overflow: hidden; }
.cover b { overflow-wrap: anywhere; hyphens: auto; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.cover i { font-style: normal; opacity: .8; }
.cover.g1 { background: var(--ink); color: var(--ground); }
.cover.g2 { background: var(--surface-2); color: var(--ink); }
.bk-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.bk-mini { display: flex; gap: .6rem; align-items: center; text-decoration: none; color: var(--ink) !important; font-size: var(--t-small); max-width: 16rem; }
.bk-mini .cover { width: 2.6rem; font-size: .42rem; }
.bk-mini > span:not(.cover) i { display: block; font-style: normal; color: var(--ink-soft); }
.term-entry { padding-top: .5rem; scroll-margin-top: calc(var(--bar-h) + 1rem); }
.term-entry:target h3 { color: var(--accent); }
.st-steps { list-style: none; padding: 0 !important; counter-reset: s; gap: 1.5rem !important; }
.st-steps > li ul { list-style: none; padding: 0; display: grid; gap: .6rem; margin-top: .75rem; }
.st-steps > li li { display: grid; gap: .15rem; padding: .85rem 1rem; background: var(--surface); border-radius: 10px; }
.st-steps > li li a { font-weight: 600; }
.st-steps > li li span { font-size: var(--t-small); color: var(--ink-soft); }

/* ---------- search ---------- */
.st-search { width: min(40rem, calc(100vw - 2rem)); margin: 12vh auto auto; padding: .5rem; border: 0; border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px -12px rgba(0,0,0,.6); }
.st-search::backdrop { background: rgba(0,0,0,.5); }
.st-search__in { display: grid; }
.st-search input { font: 400 1.25rem var(--text); padding: .6rem .75rem; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); outline: none; }
.st-search__res { list-style: none; margin: 0; padding: .4rem 0 0; max-height: 55vh; overflow-y: auto; }
.st-search__res a { display: grid; gap: .1rem; padding: .65rem .8rem; border-radius: 8px; text-decoration: none; color: var(--ink); }
.st-search__res a span { font-size: var(--t-small); color: var(--ink-soft); }
.st-search__res a[aria-selected="true"], .st-search__res a:hover { background: var(--surface-2); }
.st-search__hint { font-size: .8125rem; color: var(--ink-soft); padding: .6rem .75rem .4rem; }

/* ---------- hub ---------- */
.sh-head { display: grid; gap: 1rem; max-width: 52rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.sh-lead { font: 400 clamp(1.2rem, 1.7vw, 1.5rem)/1.4 var(--display); color: var(--ink-soft); }
.sh-tracks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); grid-auto-rows: 1fr; gap: 1rem; list-style: none; padding: 0; }   /* every row the same height, so the cards line up */
.sh-tracks > li { display: grid; }
@media (max-width: 767px) { .sh-tracks { grid-auto-rows: auto; } }   /* one column: no row to line up with */
.sh-track { display: flex; flex-direction: column; gap: .75rem; padding: 1.5rem; border-radius: 14px; background: var(--surface); text-decoration: none; color: var(--ink); }
.sh-track:hover { background: var(--surface-2); }
.sh-track__art { display: block; margin: -.5rem -.5rem .5rem; border-radius: 10px; background: var(--accent-soft); aspect-ratio: 20 / 9; overflow: hidden; }
.sh-track__art svg { display: block; width: 100%; height: 100%; }
.sh-track__art .a-l { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.sh-track__art .a-dim { stroke: color-mix(in srgb, var(--ink) 40%, transparent); }
.sh-track__art .a-s { fill: var(--ground); stroke: var(--ink); stroke-width: 2.5; }
.sh-track__art .a-f { fill: var(--accent); }
.sh-track__k { font-size: var(--t-small); color: var(--ink-soft); }
.sh-track__t { font: 700 2rem/1 var(--display); letter-spacing: -.03em; }
.sh-track__d { color: var(--ink-soft); }
.sh-track__go { margin-top: auto; }   /* .link-arrow */
.sh-track--soon { background: none; border: 1px dashed var(--line-2); }
.sh-track--soon .sh-track__t { color: var(--ink-soft); }
.sh-track--soon .sh-track__art { background: var(--tone); }
.sh-track--soon .sh-track__art .a-f { fill: var(--ink-soft); }
.sh-principle { margin-top: clamp(2.5rem, 5vw, 4rem); display: grid; gap: .5rem; max-width: 46rem; }
.sh-principle b { font: 600 1.4rem/1.2 var(--display); }
.sh-principle p { color: var(--ink-soft); }

/* ---------- responsive ---------- */
@media (max-width: 1199px) { .st-grid { grid-template-columns: 14rem minmax(0, 1fr); } .st-toc { display: none; } }
@media (max-width: 899px) {
  .st-grid { display: block; }
  .st-side { position: static; max-height: none; margin-bottom: 1.5rem; padding: 1rem; background: var(--surface); border-radius: 12px; }
  .st-side .st-side__grp, .st-side .st-side__all { display: none; }
  .st-side.is-open .st-side__grp, .st-side.is-open .st-side__all { display: block; }
  .st-side__toggle { display: inline-flex !important; }
  .st-pager { grid-template-columns: 1fr; }
  .st-pager__next { grid-column: 1; }
}
.st-side__toggle { display: none; margin-top: .25rem; background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; }

@media print {
  .bar, .foot, .st-side, .st-toc, .st-done, .st-pager, .st-search, .inspect, .skip, .anchor, .copy-btn { display: none !important; }
  .st { padding: 0; } .st-grid { display: block; } .st-article { max-width: none; }
  .st-body a.ext::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; }
}

/* ---------- study header (its own, not the portfolio's) ---------- */
.st-bar .bar__in { justify-content: space-between; }
.st-brand { display: inline-flex; align-items: baseline; gap: .4rem; text-decoration: none; color: inherit; font: 700 1.125rem/1 var(--display); letter-spacing: -.02em; }
.st-brand span { font-weight: 500; color: var(--accent); }

/* ---------- sidebar: accordions, collapse ---------- */
.st-side__top { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.st-side__hide { flex: none; display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border: 0; border-radius: 8px; background: none; color: var(--ink-soft); cursor: pointer; }
.st-side__hide:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); }
.st-side__hide:focus-visible, .st-side__h:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.st-side__grp { margin-bottom: .35rem; }
.st-side__h { display: flex; align-items: center; justify-content: space-between; gap: .5rem; list-style: none; cursor: pointer; padding: .4rem .6rem; margin: 0 0 .1rem -.6rem; border-radius: 6px; }
.st-side__h::-webkit-details-marker { display: none; }
.st-side__h::after { content: ""; flex: none; width: .45rem; height: .45rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); color: var(--ink-soft); margin-left: .25rem; }
.st-side__grp[open] > .st-side__h::after { transform: rotate(45deg); }
.st-side__h:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.st-side__n { margin-left: auto; font-weight: 400; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.st-side__grp ol { padding-bottom: .5rem; }
.st-side { overscroll-behavior: contain; }
.st-side__show { display: none; position: fixed; z-index: 20; left: var(--margin); top: calc(var(--bar-h) + 1rem); }
/* hiding the lesson list (html.st-collapsed, set before the first paint): the list's track shrinks to 0 and the
   article, centred in what is left, glides with it. --st-c runs 0 → 1 so the centring can be animated. */
@property --st-c { syntax: "<number>"; inherits: true; initial-value: 0; }
.st-grid { --side-w: 15.5rem; }
.st-side { width: var(--side-w); }
.st-article { margin-left: calc((100% - min(100%, 46rem)) * var(--st-c) / 2); }
html.st-collapsed .st-grid { grid-template-columns: 0rem minmax(0, 1fr) 13rem; --st-c: 1; }
html.st-collapsed .st-side { opacity: 0; visibility: hidden; transform: translateX(-.75rem); pointer-events: none; }
html.st-collapsed .st-side__show { display: inline-flex; }
@media (max-width: 1199px) { .st-grid { --side-w: 14rem; } html.st-collapsed .st-grid { grid-template-columns: 0rem minmax(0, 1fr); } }
@media (max-width: 899px) {
  .st-side__hide, .st-side__show, html.st-collapsed .st-side__show { display: none !important; }
  .st-side { width: auto; } .st-article { margin-left: 0; }
  html.st-collapsed .st-side { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
}

/* ---------- hub progress ---------- */
.sh-track__prog { font-size: var(--t-small); color: var(--ink-soft); }
.sh-track__prog a { color: var(--accent); font-weight: 600; }
.sh-reset { margin-top: 1.5rem; font-size: var(--t-small); color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }

/* plain pages that reuse the study type (privacy) */
.st-page { max-width: 48rem; }

/* mentoring invitation and page */
.st-mentor { display: grid; gap: .5rem; margin-top: 2.5rem; padding: 1.5rem 1.75rem; border-radius: 14px; background: var(--accent-soft); max-width: 46rem; }
.st-mentor__h { font: 600 1.4rem/1.2 var(--display); letter-spacing: -.015em; }
.st-mentor p:not(.st-mentor__h) { color: var(--ink); }
.st-mentor__go { justify-self: start; }   /* .link-arrow */
.sh-tracks + .st-mentor { margin-top: 2rem; max-width: none; }
.st-small { font-size: var(--t-small); color: var(--ink-soft); }
.st-body .btn--primary { color: var(--on-accent); text-decoration: none; }

/* Hairline figures on the hub cards: the figure wears the card's colours */
.sh-track__art--hl { aspect-ratio: 5 / 3.4; display: grid; place-items: center; --hairline-plate: var(--accent-soft); --hairline-hi: var(--ink); --hairline-edge: color-mix(in srgb, var(--ink) 55%, var(--accent-soft)); --hairline-mid: color-mix(in srgb, var(--ink) 32%, var(--accent-soft)); --hairline-lo: color-mix(in srgb, var(--ink) 16%, var(--accent-soft)); --hairline-stroke: 1; }
.sh-track--soon .sh-track__art--hl { --hairline-plate: var(--tone); --hairline-hi: var(--ink-soft); --hairline-edge: color-mix(in srgb, var(--ink) 40%, var(--tone)); --hairline-mid: color-mix(in srgb, var(--ink) 24%, var(--tone)); --hairline-lo: color-mix(in srgb, var(--ink) 12%, var(--tone)); }
.sh-hl { display: block; height: 100%; aspect-ratio: 5 / 4; max-width: 100%; }
/* Exploded draws low and left in its frame, to leave room for the layers to open upward: centre it on the card */
.sh-hl[data-hl="exploded"] { transform: translate(5%, -23%) scale(1.12); }

/* ===== study tools: My learning, Review, notes, Ask AI (learning.js, notes.js) ===== */
/* lesson list: the two tools under the progress line */
.st-side__tools { display: grid; gap: .1rem; margin: -.5rem 0 1.25rem; }
.st-side__toggle + .st-side__tools, .st-side__prog + .st-side__toggle { margin-top: .75rem; }
.st-side .st-side__tools a { display: flex; align-items: center; gap: .55rem; color: var(--ink); }
.st-side__tools .i { width: 1rem; height: 1rem; color: var(--accent); }
.st-side__due { margin-left: auto; min-width: 1.4rem; padding: 0 .4rem; border-radius: 999px; background: var(--accent-fill); color: var(--on-accent); font-size: .75rem; font-weight: 600; line-height: 1.4rem; text-align: center; font-variant-numeric: tabular-nums; }
.st-side__due[hidden] { display: none; }
.st-tool .btn { min-height: 2.75rem; padding: .6rem 1.2rem; font-size: 1rem; cursor: pointer; }
.st-tool .btn--quiet { background: var(--tone-2); color: var(--ink); border: 0; }
.st-tool .btn--quiet:hover { background: color-mix(in srgb, var(--ink) 16%, var(--ground)); }
.st-tool kbd, .rv kbd { display: inline-grid; place-items: center; min-width: 1.4em; margin-right: .45em; padding: 0 .3em; border-radius: 4px; background: color-mix(in srgb, currentColor 16%, transparent); font: 600 .75em/1.6 var(--text); }

/* my learning */
.db { display: grid; gap: 1rem; }
.db-k { display: block; font-size: var(--t-small); color: var(--ink-soft); }
.db-hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; }
.db-next, .db-review { display: grid; gap: .3rem; padding: 1.25rem 1.4rem; border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none; }
.db-next b { font: 600 1.35rem/1.2 var(--display); letter-spacing: -.015em; }
.db-go { margin-top: .3rem; }   /* .link-arrow */
a.db-next:hover, .db-review:hover { background: var(--surface-2); }
.db-next--done span:last-child { color: var(--ink-soft); }
.db-review { grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; background: var(--accent-soft); }
.db-review b { display: block; }
.db-review small { color: var(--ink-soft); font-size: var(--t-small); }
.db-review .i { width: 1.4rem; height: 1.4rem; color: var(--accent); }
.db-num { font: 700 2.6rem/1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.db-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; }
.db-tile { display: grid; gap: .35rem; padding: 1rem 1.1rem; border-radius: 12px; background: var(--surface); }
.db-tile b { font: 700 1.8rem/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.db-tile small { font: 400 1rem var(--text); color: var(--ink-soft); }
.db-bar { position: relative; display: block; height: 6px; border-radius: 999px; background: var(--tone-2); overflow: hidden; }
.db-bar b { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--accent); }
.db-bar.o b { background: var(--ink-soft); }
.db-days { display: grid; gap: .5rem; padding: 1rem 1.1rem; border-radius: 12px; background: var(--surface); }
.db-days > div { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; max-width: 30rem; }
.db-days i { aspect-ratio: 1; border-radius: 4px; background: var(--tone-2); }
.db-days i.on { background: var(--accent); }
.db-days i.today { box-shadow: 0 0 0 2px var(--ground), 0 0 0 3.5px var(--ink-soft); }
.db-h { margin-top: 2.25rem; font: 600 clamp(1.4rem, 2vw, 1.75rem)/1.1 var(--display); letter-spacing: -.02em; scroll-margin-top: calc(var(--bar-h) + 1rem); }
.db-sub { color: var(--ink-soft); }
.db-empty { display: grid; gap: .9rem; justify-items: start; padding: 1.25rem 1.4rem; border-radius: 12px; background: var(--tone); }
.db-empty p { color: var(--ink-soft); max-width: 40rem; }
.db-focus { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; }
.db-fcard { display: grid; gap: .7rem; align-content: start; padding: 1.25rem 1.4rem; border-radius: 14px; background: var(--surface); }
.db-fhead { display: flex; gap: .8rem; align-items: center; }
.db-fhead small { display: block; color: var(--ink-soft); font-size: var(--t-small); }
.db-area { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font: 700 1.1rem var(--display); }
.db-mod { display: flex; gap: .7rem; align-items: center; padding: .6rem .7rem; border-radius: 10px; background: var(--tone); color: var(--ink); text-decoration: none; }
.db-mod:hover { background: var(--tone-2); }
.db-mod small { display: block; color: var(--ink-soft); font-size: .8125rem; }
.db-mod.is-done small { color: var(--accent); }
.db-modn { flex: none; display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 8px; background: var(--surface-2); font: 600 .9rem var(--display); font-variant-numeric: tabular-nums; }
.db-comp, .db-res { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; font-size: var(--t-small); }
.db-comp span { display: inline-block; min-width: 2rem; margin-right: .4rem; font-weight: 600; color: var(--accent); }
.db-res small { display: block; color: var(--ink-soft); font-size: .8125rem; }
.db-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.db-chips a { padding: .3rem .7rem; border-radius: 999px; background: var(--tone); color: var(--ink); font-size: var(--t-small); text-decoration: none; }
.db-chips a:hover { background: var(--tone-2); }
.db-prof { display: grid; gap: .6rem; padding: 1.25rem 1.4rem; border-radius: 14px; background: var(--surface); }
.db-legend { display: flex; gap: 1.25rem; font-size: var(--t-small); color: var(--ink-soft); }
.db-legend i { display: inline-block; width: .8rem; height: .8rem; margin-right: .4rem; border-radius: 3px; vertical-align: -.1em; background: var(--accent); }
.db-legend i.o { background: var(--ink-soft); }
.db-pr { display: grid; grid-template-columns: minmax(10rem, 1.3fr) 2fr 4.5rem; gap: 1rem; align-items: center; font-size: var(--t-small); }
.db-pb { display: grid; gap: 4px; }
.db-pv { text-align: right; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.db-link { justify-self: start; margin-top: .3rem; }   /* .link-arrow */
.db-notes { display: grid; gap: .5rem; }
.db-note { display: grid; grid-template-columns: minmax(9rem, 1fr) 2.4fr auto; gap: 1rem; align-items: baseline; padding: .85rem 1rem; border-radius: 10px; background: var(--surface); color: var(--ink); text-decoration: none; font-size: var(--t-small); }
.db-note:hover { background: var(--surface-2); }
.db-note span { color: var(--ink-soft); }
.db-note small { color: var(--ink-soft); white-space: nowrap; }
.db-backup { display: grid; gap: .8rem; }
.db-backup > p:first-child { color: var(--ink-soft); max-width: 40rem; }
.db-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.db-imp { position: relative; }
.db-imp:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.db-danger { color: var(--warn) !important; }
.db-msg { min-height: 1.4em; font-size: var(--t-small); color: var(--ink-soft); }
@media (max-width: 767px) { .db-hero { grid-template-columns: 1fr; } .db-pr { grid-template-columns: 1fr 4rem; } .db-pb { grid-column: 1 / -1; grid-row: 2; } .db-note { grid-template-columns: 1fr; gap: .2rem; } }

/* review */
.rv { display: grid; gap: 1rem; max-width: 46rem; }
.rv-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .8rem 1.5rem; }
.rv-decks { display: flex; flex-wrap: wrap; gap: .4rem; }
.rv-decks:has(button:only-child) { display: none; }
.rv-stats { display: flex; gap: 1.1rem; font-size: var(--t-small); color: var(--ink-soft); }
.rv-stats b { color: var(--ink); font-variant-numeric: tabular-nums; }
.rv-prog { height: 4px; border-radius: 999px; background: var(--tone-2); overflow: hidden; }
.rv-prog i { display: block; height: 100%; background: var(--accent); transition: width .3s var(--ease-out); }
.rv-meta { font-size: var(--t-small); color: var(--ink-soft); }
.rv-card { display: grid; gap: 1rem; padding: clamp(1.25rem, 3vw, 2rem); border-radius: 16px; background: var(--surface); }
.rv-k { font-size: var(--t-small); color: var(--accent); font-weight: 600; }
.rv-q { font: 600 clamp(1.35rem, 2.2vw, 1.75rem)/1.2 var(--display); letter-spacing: -.02em; text-wrap: balance; }
.rv-hint { color: var(--ink-soft); }
.rv-a { display: grid; gap: .6rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.rv-a ul { margin: 0; padding-left: 1.2em; display: grid; gap: .3rem; }
.rv-a a { color: var(--accent); font-weight: 600; }
.rv-grade, .rv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.rv-grade span { margin-right: auto; color: var(--ink-soft); }
.rv-done { justify-items: start; }
.rv-done__ic .i { width: 2.2rem; height: 2.2rem; color: var(--accent); }
.rv-done h2 { font: 600 1.5rem/1.2 var(--display); }
.rv-done p { color: var(--ink-soft); }

/* notes, at the end of a lesson */
.st-notes { margin-top: 3rem; padding: 1.1rem 1.25rem 1.25rem; border-radius: 14px; background: var(--tone); scroll-margin-top: calc(var(--bar-h) + 1rem); }
.st-notes__h { display: flex; align-items: center; gap: .75rem; margin-bottom: .7rem; }
.st-notes__h h2 { display: flex; align-items: center; gap: .5rem; margin: 0; font: 600 1.15rem var(--display); }
.st-notes__h .i { width: 1.1rem; height: 1.1rem; color: var(--accent); }
.st-notes__st { margin-left: auto; font-size: .8125rem; color: var(--ink-soft); }
.st-notes__copy { padding: .3rem .8rem; border: 0; border-radius: 999px; background: var(--surface); color: var(--ink); font: 500 .8125rem var(--text); cursor: pointer; }
.st-notes__copy:hover { color: var(--accent); }
textarea.st-notes__ta { display: block; min-height: 120px; }   /* .input; same specificity as textarea.input so the 120px holds */
/* self-assessment table (UX Lead): score selects and evidence fields are .input; only their size here */
.sa-sel.input { width: 4.75rem; padding-inline: .6rem; font-variant-numeric: tabular-nums; cursor: pointer; }
textarea.sa-ev.input { display: block; min-height: 2.75rem; resize: none; overflow: hidden; }   /* grows with its text (app.js); one line at rest */
.sa-table td:nth-child(3), .sa-table td:nth-child(4) { width: 5.5rem; }   /* room for the 4.75rem select */
.st-notes + .st-done { margin-top: 1.5rem; }
.st-hl { position: fixed; z-index: 70; display: inline-flex; align-items: center; gap: .45rem; height: 2.25rem; padding: 0 .9rem; border: 0; border-radius: 999px; background: var(--ink); color: var(--ground); font: 600 .8125rem var(--text); box-shadow: 0 10px 30px -8px rgba(0,0,0,.5); cursor: pointer; }
.st-hl[hidden] { display: none; }
.st-hl .i { width: .95rem; height: .95rem; }
.st-toast { position: fixed; left: 50%; bottom: 1.5rem; z-index: 80; transform: translateX(-50%); max-width: min(36rem, calc(100vw - 2rem)); padding: .75rem 1.1rem; border-radius: 12px; background: var(--ink); color: var(--ground); font: 500 var(--t-small)/1.45 var(--text); box-shadow: 0 10px 30px -8px rgba(0,0,0,.5); }
.st-toast[hidden] { display: none; }
.st-toast a { color: inherit; font-weight: 700; margin-left: .4rem; }

/* Ask AI, under the lead */
.st-ask { position: relative; justify-self: start; }
.st-ask__btn .i { width: 1.05rem; height: 1.05rem; }
.st-ask__btn[aria-expanded="true"] { background: var(--accent-soft); color: var(--accent); }
.st-ask__menu { position: absolute; z-index: 30; top: calc(100% + .5rem); left: 0; width: min(22rem, calc(100vw - 2rem)); padding: .5rem; border-radius: 14px; background: var(--surface); box-shadow: 0 24px 60px -12px rgba(0,0,0,.6); }
.st-ask__menu[hidden] { display: none; }
.st-ask__menu button { display: grid; gap: .1rem; width: 100%; padding: .6rem .7rem; border: 0; border-radius: 9px; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.st-ask__menu button:hover, .st-ask__menu button:focus-visible { background: var(--surface-2); outline: none; }
.st-ask__menu button b { font-weight: 600; }
.st-ask__menu button span { font-size: .8125rem; color: var(--ink-soft); }
.st-ask__note { margin: .4rem .7rem .3rem; font-size: .8125rem; line-height: 1.45; color: var(--ink-soft); }
@media (pointer: coarse) { .st-hl { height: 2.6rem; padding: 0 1.1rem; } .st-ask__menu button { padding: .8rem .7rem; } }
@media print { .st-notes:not(:has(textarea:not(:placeholder-shown))), .st-ask, .st-hl, .st-toast, .st-side__tools, .st-notes__copy { display: none !important; } }
/* the tools draw after load: keep the footer below the fold until they do, so nothing shifts (CLS) */
.st-tool #dash { min-height: 160vh; } .st-tool #rv { min-height: 85vh; align-content: start; }
.st-tool #dash.db--short { min-height: 100vh; }

/* ===== motion in the study area ===== */
/* Lessons swap content, not scenes: the header and the lesson list stay put and only the page body crossfades.
   (The portfolio's curtain, in styles.css, stays for the portfolio.) */
.is-study .st-bar { view-transition-name: st-bar; }
@media (min-width: 900px) { .is-study .st-side { view-transition-name: st-side; } }
html:has(> body.is-study)::view-transition-old(root) { animation: st-vt-out .12s ease-in both; }
html:has(> body.is-study)::view-transition-new(root) { animation: st-vt-in .3s cubic-bezier(.16, 1, .3, 1) .1s both; }
html:has(> body.is-study)::view-transition-group(st-bar), html:has(> body.is-study)::view-transition-group(st-side) { animation-duration: .2s; animation-timing-function: cubic-bezier(.16, 1, .3, 1); }
html:has(> body.is-study)::view-transition-old(st-side), html:has(> body.is-study)::view-transition-new(st-side) { animation-duration: .16s; }
@keyframes st-vt-out { to { opacity: 0; } }
@keyframes st-vt-in { from { opacity: 0; transform: translateY(6px); } }

/* accordions open with their height (where ::details-content and interpolate-size exist; elsewhere they snap) */
.st-side { interpolate-size: allow-keywords; }
.st-side__grp::details-content { block-size: 0; overflow: clip; }
.st-side__grp[open]::details-content { block-size: auto; }

/* transitions start only once the page has settled (html.st-ready), so restoring a state on load never animates */
@media (prefers-reduced-motion: no-preference) {
  html.st-ready .st-side__h::after { transition: transform .3s cubic-bezier(.4, 0, .2, 1); }
  html.st-ready .st-side__grp::details-content { transition: block-size .3s cubic-bezier(.4, 0, .2, 1), content-visibility .3s allow-discrete; }
  html.st-ready .st-grid { transition: grid-template-columns .42s cubic-bezier(.16, 1, .3, 1), --st-c .42s cubic-bezier(.16, 1, .3, 1); }
  html.st-ready .st-side { transition: opacity .24s ease .14s, transform .42s cubic-bezier(.16, 1, .3, 1), visibility 0s; }
  html.st-ready.st-collapsed .st-side { transition: opacity .14s ease, transform .42s cubic-bezier(.16, 1, .3, 1), visibility 0s linear .14s; }
}
@media (max-width: 899px) { html.st-ready .st-grid, html.st-ready .st-side { transition: none; } }

/* reading progress, at the bottom of a lesson (study.js) */
.st-read { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; height: 3px; background: var(--tone-2); opacity: 0; pointer-events: none; transition: opacity .25s; }
.st-read.is-on { opacity: 1; }
.st-read i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .12s linear; }
.st-read span { position: absolute; right: var(--margin); bottom: .75rem; padding: .3rem .75rem; border-radius: 999px; background: var(--surface-2); color: var(--ink); font: 500 .8125rem var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s cubic-bezier(.16, 1, .3, 1); }
.st-read.is-show span { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .st-read i, .st-read span { transition: none; } }
@media print { .st-read { display: none; } }

/* ===== AI for UX diagrams: probability bars (.pb) and line chart (.lc) ===== */
.pb-prompt{margin:0 0 14px;font:500 17px/1.4 var(--display);color:var(--ink)}
.pb-gap{display:inline-block;min-width:2.2em;border-bottom:2px solid var(--accent);color:var(--accent);text-align:center}
.prose ol.pb{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.pb>li{display:grid;grid-template-columns:9.5em 1fr 3.2em;align-items:center;gap:12px;margin:0}
.pb b{font-weight:600;color:var(--ink);overflow-wrap:anywhere}
.pb i{display:block;height:22px;width:calc(var(--p) * 1%);min-width:4px;border-radius:6px;background:color-mix(in srgb,var(--accent) calc(30% + var(--p) * 1%),var(--tone))}
.pb span{font-variant-numeric:tabular-nums;color:var(--ink-soft);text-align:right}
.pb-dim b,.pb-dim span{color:var(--ink-soft);font-weight:400}.pb-dim i{background:var(--tone-2,var(--tone))}
.pb-note{margin:14px 0 0;font-size:var(--t-small,14px);color:var(--ink-soft)}
.lc{display:block;width:100%;height:auto;overflow:visible}
.lc-grid{stroke:var(--line,currentColor);stroke-opacity:.35;stroke-width:1}
.lc-ax{fill:var(--ink-soft);font:12px var(--text,inherit)}
.lc-zone{fill:var(--accent);fill-opacity:.07}
.lc-zt{fill:var(--accent);font:600 12px var(--text,inherit)}
.lc-train{fill:none;stroke:var(--ink-soft);stroke-width:2;stroke-dasharray:5 4}
.lc-val{fill:none;stroke:var(--accent);stroke-width:2.5}
.lc-dot-t{fill:var(--ink-soft)}.lc-dot-v{fill:var(--accent)}
.lc-best{fill:none;stroke:var(--accent);stroke-width:2}
.lc-lab{fill:var(--ink);font:600 13px var(--text,inherit)}
.lc-leg{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;margin:0 0 8px;font-size:var(--t-small,14px);color:var(--ink-soft)}
.lc-k{display:inline-block;width:22px;height:0;border-top:2.5px solid var(--accent);margin-right:-6px}.lc-k-t{border-top:2px dashed var(--ink-soft)}
@media (max-width:640px){.pb>li{grid-template-columns:7em 1fr 3em;gap:8px}}
/* a Hairline figure inside a lesson: the plate takes the diagram's tone */
.dg-hl { --hairline-plate: var(--tone); --hairline-hi: var(--ink); --hairline-edge: color-mix(in srgb, var(--ink) 55%, var(--tone)); --hairline-mid: color-mix(in srgb, var(--ink) 32%, var(--tone)); --hairline-lo: color-mix(in srgb, var(--ink) 16%, var(--tone)); --hairline-stroke: 1; }
.dg-hl .sh-hl { width: min(100%, 34rem); height: auto; margin: 0 auto; }
.st-article figure.dg-hl > figcaption { margin-inline: auto; }   /* the caption keeps its 70ch measure, centred under the drawing */
/* an openly licensed photo inside a lesson, credited in its caption */
.dg-img img { display: block; width: auto; max-width: 100%; height: auto; max-height: 34rem; margin-inline: auto; border-radius: 10px; }
/* two openly licensed photos side by side, each with a short label (a comparison); one column on phones */
.dg-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; margin: 0; }
.dg-pair__item { display: grid; gap: .5rem; margin: 0; }
.dg-pair__item img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; }
.dg-pair__k { font-size: var(--t-small, 14px); font-weight: 600; color: var(--ink); }
.dg-pair > figcaption { grid-column: 1 / -1; }
/* three to five photos in a row, each with a short label; the "nothing" option is an empty dashed frame */
.dg-pair--grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr)); }
@media (max-width: 560px) { .dg-pair--grid { grid-template-columns: 1fr 1fr; gap: .75rem; } }   /* phones: two small photos a row, not five tall ones */
.dg-pair__none { display: block; width: 100%; aspect-ratio: 3 / 2; border: 1.5px dashed color-mix(in srgb, var(--ink) 40%, transparent); border-radius: 10px; }
/* a filled-in audit sheet: small thumbnails in the first column */
.dg-audit { overflow-x: auto; margin: 0; }
.dg-audit table { min-width: 34rem; }
.dg-audit td:first-child img { display: block; width: 4.5rem; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; }
/* the thirds drawn over a photo: two lines each way, on the image's own box */
.dg-thirds { position: relative; display: block; }
.dg-thirds::after { content: ""; position: absolute; inset: 0; border-radius: 10px; pointer-events: none;
  background: linear-gradient(90deg, transparent calc(33.333% - .5px), rgb(255 255 255 / .85) calc(33.333% - .5px) calc(33.333% + .5px), transparent calc(33.333% + .5px) calc(66.666% - .5px), rgb(255 255 255 / .85) calc(66.666% - .5px) calc(66.666% + .5px), transparent calc(66.666% + .5px)),
              linear-gradient(180deg, transparent calc(33.333% - .5px), rgb(255 255 255 / .85) calc(33.333% - .5px) calc(33.333% + .5px), transparent calc(33.333% + .5px) calc(66.666% - .5px), rgb(255 255 255 / .85) calc(66.666% - .5px) calc(66.666% + .5px), transparent calc(66.666% + .5px)); }
/* a real headline set in a photo's empty sky: negative space used for words */
.dg-over { position: relative; margin: 0; }
.dg-over img { display: block; width: 100%; height: auto; border-radius: 10px; }
.dg-over__t { position: absolute; top: 12%; right: 7%; width: 46%; margin: 0; font: 600 clamp(1.1rem, 3.2vw, 2rem)/1.1 var(--display); letter-spacing: -.02em; color: #1a1712; }
.dg-over__s { display: block; margin-top: .4em; font: 500 clamp(.75rem, 1.6vw, .95rem)/1.35 var(--text); letter-spacing: 0; color: #3d372c; }
/* one photo, cropped to other screens: the ratio and where the crop is anchored */
.dg-crop .dg-pair__item img { aspect-ratio: var(--ar, 3 / 2); object-position: var(--op, 50% 50%); }
.dg-ar-169 { --ar: 16 / 9; } .dg-ar-916 { --ar: 9 / 16; } .dg-ar-11 { --ar: 1 / 1; } .dg-ar-45 { --ar: 4 / 5; }
.dg-op-focal { --op: 12% 50%; }
/* a label laid on a photo, for images that must say what they are (an AI-generated example) */
.dg-tagged { position: relative; display: block; }
.dg-tag { position: absolute; top: .55rem; left: .55rem; padding: .15rem .55rem; border-radius: 999px; background: rgb(14 14 16 / .78); color: #fff; font-size: .75rem; font-weight: 600; letter-spacing: .01em; }
/* one grade across a set: the same photos, one filter (the files are not changed) */
.dg-grade img { filter: grayscale(1) contrast(1.08); }
.dg-pair + .dg-pair { margin-top: 1rem; }
/* fixed columns for sets that read as a row (4 crops) or a square (4 kinds of light) */
.dg-pair--4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 1440px) { .dg-pair--4 { grid-template-columns: repeat(4, 1fr); } }   /* four in a row only when the figure can be wide */
.dg-pair--2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .dg-pair--4 { grid-template-columns: 1fr 1fr; gap: .75rem; } }
.dg-crop { align-items: end; }
/* Step 5 of the imagery course: live treatments on one photo. Each is CSS on an untouched file, so the code under the figure is the effect itself */
.dg-fx { position: relative; display: block; align-self: start; overflow: hidden; border-radius: 10px; isolation: isolate; }
.dg-fx img { border-radius: 0; }
.dg-fx::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.fx-warm img { filter: sepia(.3) saturate(1.25) brightness(1.03); }
.fx-cool img { filter: saturate(.8) brightness(1.04) contrast(.95); }
.fx-cool::after { background: #3d6fd6; mix-blend-mode: soft-light; opacity: .55; }
.fx-bw img { filter: grayscale(1) contrast(1.1); }
/* duotone: the light colour behind, the photo in grey multiplied over it, the dark colour lightened on top */
.fx-duo { background: #f2d36b; }
.fx-duo img { filter: grayscale(1) contrast(1.15); mix-blend-mode: multiply; }
.fx-duo::after { background: #2b2a6b; mix-blend-mode: lighten; }
.fx-duo--b { background: #9fe3d1; } .fx-duo--b::after { background: #3a1f3d; }
/* blend modes: one gradient layer over the photo, the mode is the only change */
.fx-blend::after { background: linear-gradient(135deg, #e5484d, #3e63dd); }
.bm-normal::after { mix-blend-mode: normal; opacity: .6; } .bm-multiply::after { mix-blend-mode: multiply; } .bm-screen::after { mix-blend-mode: screen; }
.bm-overlay::after { mix-blend-mode: overlay; } .bm-soft-light::after { mix-blend-mode: soft-light; } .bm-difference::after { mix-blend-mode: difference; }
.bm-color::after { mix-blend-mode: color; } .bm-luminosity::after { mix-blend-mode: luminosity; }
/* grain: SVG fractal noise (feTurbulence), drawn by the browser, laid over in overlay */
.fx-grain::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='table' tableValues='1 1'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); mix-blend-mode: overlay; opacity: var(--grain, .4); filter: contrast(var(--grain-c, 1.3)); }
.fx-grain--heavy { --grain: .7; --grain-c: 1.6; }
.fx-grain--heavy::after { background-size: 160px; }
/* a gradient, in visible steps (banding, exaggerated) and smooth with grain on top */
.fx-swatch { display: block; width: 100%; aspect-ratio: 3 / 2; border-radius: 10px; background: linear-gradient(90deg, #1d2b53, #7e2553, #ff7a59); }
.fx-swatch--banded { background: linear-gradient(90deg, #1d2b53 0 12.5%, #2f2a55 0 25%, #452856 0 37.5%, #5c2755 0 50%, #7e2553 0 62.5%, #a63a56 0 75%, #d25657 0 87.5%, #ff7a59 0); }
.fx-swatch.dg-fx { aspect-ratio: 3 / 2; }
/* masks: the photo stays whole, the browser hides part of it */
.fx-circle img { clip-path: circle(36% at 50% 50%); }
.fx-round img { clip-path: inset(7% round 1.5rem); }
.fx-fade img { mask-image: linear-gradient(to bottom, #000 45%, transparent 95%); }
.fx-scrim::after { background: linear-gradient(to top, rgb(10 10 12 / .85), rgb(10 10 12 / .55) 28%, rgb(10 10 12 / 0) 52%); }
.fx-text .fx-scrim__t { position: absolute; z-index: 1; left: 6%; right: 6%; bottom: 8%; margin: 0; color: #fff; font: 600 clamp(1rem, 2.6vw, 1.6rem)/1.15 var(--display); letter-spacing: -.01em; }
/* everything at once: the over-treated version of a photo */
.fx-much img { filter: saturate(1.9) contrast(1.35) hue-rotate(-18deg); }
.fx-much::after { background: radial-gradient(circle, transparent 35%, rgb(0 0 0 / .7)), linear-gradient(135deg, rgb(229 72 77 / .55), rgb(62 99 221 / .55)); mix-blend-mode: hard-light; }
.fx-light img { filter: saturate(.92) contrast(1.04) brightness(1.02); }
/* Step 6 of the imagery course: text over photos. The numbers in the labels were measured on the rendered figure */
/* the headline is sized by the photo, not the screen: one line at every size, so the measured spot stays the measured spot */
.fx-text { container-type: inline-size; }
@media (max-width: 560px) { .dg-pair--stack { grid-template-columns: 1fr; } }   /* phones: text-over-photo demos one per row, big enough to read */
.fx-text .fx-scrim__t { font-size: clamp(.75rem, 6.5cqi, 1.6rem); white-space: nowrap; }
.fx-text.fx-top .fx-scrim__t { bottom: auto; top: 8%; }
.fx-text.fx-ink .fx-scrim__t { color: #14120e; }
.fx-text.fx-right .fx-scrim__t { left: auto; right: 9%; text-align: right; }
/* the safe area: where text may go at every crop, drawn as a dashed frame */
.fx-safe::before { content: ""; position: absolute; inset: 7%; z-index: 2; border: 1.5px dashed rgb(255 255 255 / .9); border-radius: 8px; pointer-events: none; }
.dg-op-focal-tree { --op: 20% 50%; }
.fx-text.fx-safe .fx-scrim__t { left: 11%; right: 11%; } .fx-text.fx-safe.fx-top .fx-scrim__t { top: 11%; } .fx-text.fx-safe.fx-right .fx-scrim__t { left: auto; }
/* a page around a photo: light, or dark, whatever the site theme is */
.fx-page { display: block; padding: .9rem; border-radius: 10px; background: #f4f2ee; }
.fx-page--dark { background: #121214; }
.fx-page img { border-radius: 6px; }
.fx-dim img { filter: brightness(.85) contrast(1.05); }
/* Step 7 of the imagery course: images on the web. Every tile is the real file, at its real size */
.fx-zoom { display: block; overflow: hidden; border-radius: 10px; }
.fx-zoom img { transform: scale(3); transform-origin: 55% 62%; image-rendering: pixelated; border-radius: 0; }
/* a tiny page mock-up, to show what happens to the text when an image loads */
.fx-mock { display: grid; align-content: start; gap: .45rem; aspect-ratio: 3 / 4; padding: .7rem; overflow: hidden; border-radius: 10px; background: color-mix(in srgb, var(--ink) 6%, var(--tone)); }
.fx-mock__h { height: .7rem; width: 70%; border-radius: 4px; background: color-mix(in srgb, var(--ink) 55%, transparent); }
.fx-mock__l { height: .45rem; border-radius: 4px; background: color-mix(in srgb, var(--ink) 25%, transparent); }
.fx-mock__l--s { width: 62%; }
.fx-mock__box { aspect-ratio: 3 / 2; border-radius: 6px; background: color-mix(in srgb, var(--ink) 12%, transparent); }
.fx-mock__moved { outline: 2px dashed #e5484d; outline-offset: 3px; border-radius: 4px; display: grid; gap: .45rem; }
.fx-mock img { aspect-ratio: 3 / 2; border-radius: 6px; }
.dg-img picture { display: block; }
/* the labs of the imagery course: one treatment system across a set, and a focal point on the bakery photo */
.fx-system img { filter: sepia(.35) saturate(.9) contrast(1.1) brightness(1.03); }
.dg-op-bake { --op: 50% 74%; }
/* critique fixes of the imagery course (2026-11-17) */
/* photo figures and audit tables use the free space before "On this page" on wide screens; steps measured so they keep 2.5rem from it */
@media (min-width: 1440px) { .st-article figure.dg.dg-pair, .st-article figure.dg.dg-audit { margin-inline-end: -3.5rem; } }
@media (min-width: 1536px) { .st-article figure.dg.dg-pair, .st-article figure.dg.dg-audit { margin-inline-end: -9rem; } }
@media (min-width: 1600px) { .st-article figure.dg.dg-pair, .st-article figure.dg.dg-audit { margin-inline-end: -13rem; } }
@media (min-width: 1680px) { .st-article figure.dg.dg-pair, .st-article figure.dg.dg-audit { margin-inline-end: -17rem; } }
/* a tile's meaning, under its name: the teaching where the eye already is */
.dg-pair__m { display: block; margin-top: .1rem; font-size: .8rem; font-weight: 400; line-height: 1.35; color: var(--ink-soft); }
/* captions keep a reading measure even when the figure is wide */
.st-article figure.dg > figcaption { max-width: 70ch; }
/* the credit on its own quieter line, so the caption's first sentence carries the meaning */
.dg-credit { display: block; margin-top: .5rem; font-size: .75rem; line-height: 1.45; color: var(--ink-soft); }
/* audit tables: bigger thumbnails where the image is the subject, and cards up to tablet width */
.dg-audit--big td:first-child { width: 8rem; }
.dg-audit--big td:first-child img { width: 7.5rem; }
@media (max-width: 900px) {
  .dg-audit--cards table { min-width: 0; }
  .dg-audit--cards thead { display: none; }
  .dg-audit--cards tr { display: grid; gap: .3rem; padding: .8rem 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 15%, transparent); }
  .dg-audit--cards td { display: block; padding: 0; border: 0; }
  .dg-audit--cards td[data-k]::before { content: attr(data-k); display: block; font-size: .75rem; font-weight: 600; color: var(--ink-soft); }
  .dg-audit--cards code { white-space: normal; overflow-wrap: anywhere; }
  .dg-audit--big td:first-child img { width: 10rem; }
}
/* the course home: one photo, treated live with three switches (CSS only, :has) */
.fx-live { display: grid; gap: .8rem; margin: 0; }
.fx-live__stage { position: relative; display: block; overflow: hidden; border-radius: 12px; isolation: isolate; container-type: inline-size; }
.fx-live__stage img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; transition: filter .35s ease; }
.fx-live__stage::before, .fx-live__stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s ease; }
.fx-live__stage::before { z-index: 1; background: linear-gradient(to top, rgb(10 10 12 / .85), rgb(10 10 12 / .55) 28%, rgb(10 10 12 / 0) 52%); }
.fx-live__stage::after { z-index: 2; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='table' tableValues='1 1'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); mix-blend-mode: overlay; filter: contrast(1.3); }
.fx-live__t { position: absolute; z-index: 3; left: 6%; right: 6%; bottom: 8%; margin: 0; color: #fff; white-space: nowrap; font: 600 clamp(.95rem, 5.2cqi, 2.2rem)/1.1 var(--display); letter-spacing: -.02em; opacity: 0; transform: translateY(.4rem); transition: opacity .35s ease, transform .35s ease; }
.fx-live:has(.fx-live__in[value="grade"]:checked) .fx-live__stage img { filter: sepia(.35) saturate(.9) contrast(1.1) brightness(1.03); }
.fx-live:has(.fx-live__in[value="grain"]:checked) .fx-live__stage::after { opacity: .4; }
.fx-live:has(.fx-live__in[value="text"]:checked) .fx-live__stage::before { opacity: 1; }
.fx-live:has(.fx-live__in[value="text"]:checked) .fx-live__t { opacity: 1; transform: none; }
.fx-live__ctl { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; border: 0; }
.fx-live__ctl legend { padding: 0; margin-bottom: .4rem; font-size: var(--t-small); color: var(--ink-soft); }
.fx-live__in { width: 1rem; height: 1rem; margin: 0; accent-color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .fx-live__stage img, .fx-live__stage::before, .fx-live__stage::after, .fx-live__t { transition: none; } }

/* four or five cards: wrap into rows instead of squeezing five narrow columns */
.dg-cv[style*="--n:4"], .dg-cv[style*="--n:5"], .dg-cv[style*="--n:6"], .dg-cv[style*="--n:7"], .dg-cv[style*="--n:8"] { grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); }
/* diagram card labels that are words, not numbers: smaller, and allowed to wrap */
.cv-cell .cv-l--word { font-size: 1.25rem; line-height: 1.15; overflow-wrap: break-word; hyphens: auto; }

/* PT: long words (desenvolvedores, planejamento) break inside narrow diagram columns instead of spilling out */
:lang(pt) .dg :is(p, li, b, span) { hyphens: auto; overflow-wrap: break-word; }
/* …but never inside code (token names) or names and English terms marked .nohy (Figma, Storybook, major) */
.dg :is(.cv-formula, code, .nohy), :lang(pt) .dg :is(.cv-formula, code, .nohy, .mx-y span) { hyphens: manual; }   /* matrix axis labels are short words (Alta, Baixa) in a narrow column */

/* phones hide the text of icon switches; the language switch has no icon, so its two letters stay */
@media (max-width: 699px) { .switch.st-lang span[aria-hidden="true"] { position: static; width: auto; height: auto; overflow: visible; clip-path: none; } }

/* the affiliate note under a lesson's book list */
.st-aff { margin-top: .4rem; font-size: var(--t-small); color: var(--ink-soft); }

/* the imagery course's books: the shelf figure and a row of outlined cards, each card one link (no plate behind them: cards inside a card would be one box too many) */
.st-books { margin: 2.25rem 0 1.5rem; --hairline-plate: var(--ground); --hairline-hi: var(--ink); --hairline-edge: color-mix(in srgb, var(--ink) 55%, var(--ground)); --hairline-mid: color-mix(in srgb, var(--ink) 32%, var(--ground)); --hairline-lo: color-mix(in srgb, var(--ink) 16%, var(--ground)); --hairline-stroke: 1; }
.st-books__top { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; }
.st-books__fig { display: block; flex: none; width: 7.5rem; height: auto; aspect-ratio: 400 / 320; }
.st-books__h, .st-body .st-books__top h2 { margin: 0; font: 600 1.25rem/1.3 var(--display); letter-spacing: -.01em; }
.st-body .st-books__note { font: 400 var(--t-small) var(--text); color: var(--ink-soft); letter-spacing: 0; }
.st-body .st-books__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: .75rem; margin: 0; padding: 0; list-style: none; }
.st-body .st-books__list > li { margin: 0; padding: 0; }
.st-body .st-books__list > li::before, .st-body .st-books__list > li::marker { content: none; }
.st-book { display: flex; flex-direction: column; gap: .3rem; height: 100%; box-sizing: border-box; padding: 1rem 1.1rem 1.05rem; border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); border-radius: 12px; color: var(--ink); text-decoration: none; background-image: none; transition: border-color .2s ease, background-color .2s ease, transform .25s cubic-bezier(.16, 1, .3, 1); }
a.st-book:hover { border-color: color-mix(in srgb, var(--ink) 60%, transparent); background: color-mix(in srgb, var(--ink) 3%, transparent); transform: translateY(-2px); }
a.st-book:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.st-books .st-book__t { font: 600 1.05rem/1.3 var(--display); letter-spacing: -.005em; color: var(--ink); }
.st-books .st-book__a { font-size: var(--t-small); line-height: 1.35; color: var(--ink); }
.st-books .st-book__m { font-size: .8rem; line-height: 1.4; color: var(--ink-soft); }
.st-books .st-book__go { margin-top: auto; padding-top: .45rem; font-size: var(--t-small); font-weight: 600; color: var(--accent); }
.st-books .st-aff { margin: .75rem 0 0; font-size: var(--t-small); color: var(--ink-soft); }   /* the disclosure is small print, not body copy */
@media (prefers-reduced-motion: reduce) { .st-book { transition: border-color .2s ease, background-color .2s ease; } a.st-book:hover { transform: none; } }

/* tables inside a figure keep their own edges: the lesson-level negative margin clipped 4px in scrolling figure tables */
.st-body figure .table-wrap { margin-inline: 0; }

/* PT libraries: language chip before non-Portuguese titles, and its shared tip */
.lib__lang { display: inline-block; margin-right: .45rem; padding: .05rem .45rem; min-height: 24px; vertical-align: .1em; border: 1px solid var(--line-2); border-radius: 999px; background: none; color: var(--ink-soft); font: 600 .75rem/1.6 var(--text); letter-spacing: .04em; cursor: help; }
.lib__lang:hover { color: var(--ink); border-color: var(--ink-soft); }
.lib__lang:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lang-tip { position: fixed; inset: auto; margin: 0; width: min(22rem, calc(100vw - 16px)); padding: 1rem 1.1rem; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: var(--t-small); line-height: 1.5; box-shadow: 0 12px 32px rgba(0, 0, 0, .28); }
.lang-tip p + p, .lang-tip ul + p { margin-top: .5rem; }
.lang-tip ul { margin: .4rem 0 0; padding-left: 1.1rem; display: grid; gap: .25rem; }
.lib__amz { color: var(--accent); white-space: nowrap; }

/* glossaries: course pages (lesson layout) and the general one (/study/glossary.html) */
.gl { display: grid; gap: .75rem; margin: 0 0 2rem; }
.gl__item { padding: .9rem 1rem; border-radius: 10px; background: var(--surface); scroll-margin-top: calc(var(--bar-h) + 1rem); }
.gl-all .gl__item { scroll-margin-top: calc(var(--bar-h) + 4.5rem); }
.gl__item:target { outline: 2px solid var(--accent); }
.gl__item dt { font: 600 1.15rem/1.3 var(--display); }
.gl__item dd { margin: .35rem 0 0; }
.gl__item dd + dd { padding-top: .45rem; border-top: 1px solid var(--line); margin-top: .45rem; }
.gl__in { display: block; margin-top: .2rem; font-size: var(--t-small); color: var(--ink-soft); }
.gl__in a { color: inherit; text-underline-offset: .18em; }
.gl-az ul { display: flex; flex-wrap: wrap; gap: .25rem .9rem; list-style: none; padding: 0 !important; margin: 0 0 1.5rem !important; }
.gl-az a { font-weight: 600; text-decoration: none; }
.gl-all [hidden] { display: none; }
.fw__item dt a { text-underline-offset: .18em; }
.lib-jump a, .gl-az a { display: inline-block; min-width: 24px; min-height: 24px; line-height: 24px; text-align: center; }   /* WCAG 2.2 target size: single letters are narrow */

/* the general library in the Study top bar; on small phones the brand needs the room, and the hub card and each sidebar's Reference group still lead there */
.st-lib-link { text-decoration: none; }
.st-lib-link[aria-current="page"] { background: var(--surface-2); }
@media (max-width: 479px) { .st-lib-link { display: none; } }
