/* richknop.com — RK-101: Accessible by design
   A course player printed like a two-color riso workbook.
   Inks: riso blue, fluorescent pink, yellow, on cool paper. Text pairs meet WCAG 2.2 AA. */

@font-face { font-family: "Shoulders"; src: url("fonts/big-shoulders-display-latin-900-normal.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Shoulders"; src: url("fonts/big-shoulders-display-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --paper: #f6f7f9;
  --sheet: #ffffff;
  --ink: #161a3d;
  --muted: #4b5275;
  --rule: #c9cddd;
  --blue: #3255a4;
  --pink: #ff48b0;
  --yellow: #ffe800;
  --pass: #0d6b45;
  --fail: #a3122a;

  --display: "Shoulders", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Atkinson", "Segoe UI", system-ui, sans-serif;

  --halftone-pink: radial-gradient(circle, var(--pink) 2.2px, transparent 2.6px) 0 0 / 8px 8px;
  --halftone-blue: radial-gradient(circle, var(--blue) 1.6px, transparent 2px) 0 0 / 7px 7px;

  --s-1: 0.92rem;
  --s0: 1.0625rem;
  --s1: 1.3rem;
  --s2: clamp(1.6rem, 1.3rem + 1vw, 2rem);
  --s3: clamp(2.5rem, 1.6rem + 3.2vw, 4.25rem);
  --s4: clamp(3.75rem, 2rem + 7vw, 8.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--s0)/1.6 var(--body); }
img, svg { max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1; }
h1, h2 { font-family: var(--display); font-weight: 900; letter-spacing: -0.005em; }
h3 { font-family: var(--body); font-weight: 700; font-size: var(--s1); line-height: 1.25; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--blue); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { text-decoration-thickness: 0.18em; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; box-shadow: 0 0 0 6px var(--ink); border-radius: 3px; }
[tabindex="-1"]:focus { outline: none; box-shadow: none; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 1rem; top: -5rem; z-index: 100; background: var(--yellow); color: var(--ink); padding: 0.75rem 1rem; font-weight: 700; border: 2px solid var(--ink); }
.skip:focus { top: 1rem; }

/* ------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 48px; padding: 0.65rem 1.4rem;
  font: 700 var(--s0)/1.2 var(--body); color: var(--ink); background: var(--sheet); text-decoration: none; cursor: pointer;
  border: 2px solid var(--ink); border-radius: 6px; position: relative;
}
.btn:hover { background: var(--yellow); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); }
.btn-small { min-height: 40px; padding: 0.35rem 0.9rem; font-size: var(--s-1); }

/* ------------------------------------------------ top bar */
.topbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 2rem; justify-content: space-between;
  padding: 0.75rem clamp(1rem, 3vw, 2rem); background: var(--ink); color: #fff;
}
.brand-h1 { margin: 0; font: inherit; }
.brand { display: inline-flex; align-items: baseline; gap: 0.75rem; color: #fff; text-decoration: none; }
.brand-code { font: 900 1.65rem/1 var(--display); color: var(--yellow); letter-spacing: 0.01em; }
.brand-title { font-weight: 700; }
.progress { display: flex; align-items: center; gap: 0.75rem; flex: 1 1 16rem; max-width: 30rem; font-size: var(--s-1); }
.progress-label { color: #d9dcef; white-space: nowrap; }
.progress-track { flex: 1; height: 12px; border: 2px solid #fff; border-radius: 99px; overflow: hidden; background: transparent; }
.progress-fill { display: block; height: 100%; width: 0; background: var(--pink); transition: width 300ms ease; }
.progress-text { font-weight: 700; white-space: nowrap; }
.topbar-actions { display: flex; gap: 0.5rem; align-items: center; }
.tool {
  display: inline-flex; align-items: center; gap: 0.45rem; min-height: 44px; padding: 0.4rem 0.9rem; border-radius: 6px;
  border: 2px solid #5a6090; background: transparent; color: #fff; font: 700 var(--s-1)/1 var(--body); text-decoration: none; cursor: pointer;
}
.tool:hover { border-color: var(--yellow); }
.tool svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.tool svg circle { fill: currentColor; stroke: none; }
.tool[aria-expanded="true"] { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.topbar :focus-visible { outline-color: var(--yellow); box-shadow: none; }

/* ------------------------------------------------ player */
.player { display: grid; grid-template-columns: 16.5rem minmax(0, 1fr); max-width: 90rem; margin: 0 auto; align-items: start; }

.menu { position: sticky; top: 0; padding: 2rem 1rem 2rem clamp(1rem, 3vw, 2rem); }
.menu-list { list-style: none; display: grid; gap: 0.25rem; }
.menu-list a {
  display: grid; grid-template-columns: 2rem 1fr auto; align-items: center; gap: 0.6rem; min-height: 48px; padding: 0.4rem 0.6rem;
  color: var(--ink); text-decoration: none; border-radius: 6px; border: 2px solid transparent; font-weight: 700;
}
.menu-list a:hover { border-color: var(--ink); }
.menu-num { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; border: 2px solid var(--ink); font: 900 1.15rem/1 var(--display); }
.menu-list a[aria-current="step"] { background: var(--blue); color: #fff; border-color: var(--blue); }
.menu-list a[aria-current="step"] .menu-num { border-color: #fff; }
.menu-status { font-size: 0.8rem; font-weight: 700; }
.menu-list a.is-viewed .menu-num { background: var(--yellow); color: var(--ink); border-color: var(--ink); }
.menu-list a.is-viewed .menu-status::before { content: ""; display: inline-block; width: 1rem; height: 1rem; vertical-align: -0.15em; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3L13 4.5' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3L13 4.5' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.menu-toggle { display: none; }
html.js .menu-toggle:not([hidden]) {
  width: 100%; min-height: 48px; justify-content: space-between; align-items: center; padding: 0.5rem 1rem;
  font: 700 var(--s0)/1 var(--body); background: var(--sheet); color: var(--ink); border: 2px solid var(--ink); border-radius: 6px; cursor: pointer;
}
.menu-where { font-weight: 400; color: var(--muted); }

.stage { padding: 2rem clamp(1rem, 3vw, 2.5rem) 3rem clamp(0.5rem, 2vw, 1.5rem); outline: none; }
.lesson {
  position: relative; background: var(--sheet); border: 2px solid var(--ink); border-radius: 4px;
  padding: clamp(1.5rem, 4vw, 3.5rem); margin-bottom: 2.5rem;
}
/* misregistered pink halftone "second ink" behind every page */
.lesson::before { content: ""; position: absolute; inset: 12px -12px -12px 12px; background: var(--halftone-pink); z-index: -1; border-radius: 4px; }
.stage { position: relative; z-index: 0; }
html.js .lesson { margin-bottom: 0; }

.lesson h2 { font-size: var(--s3); line-height: 0.95; max-width: 16ch; margin-bottom: 1.75rem; }
.lesson h3 { margin-bottom: 0.75rem; }
.lead { font-size: var(--s1); line-height: 1.5; max-width: 40rem; }
.lead + p { margin-top: 1rem; max-width: 40rem; }
.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.split-top { align-items: start; margin-top: 2.75rem; }

.lesson-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; }
.lesson-nav .btn { min-width: 9rem; }
.lesson-nav .is-placeholder { visibility: hidden; }

/* ------------------------------------------------ welcome */
.welcome-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem; align-items: center; }
.lesson .riso-title {
  font-size: var(--s4); line-height: 0.86; color: var(--blue); max-width: 8ch; letter-spacing: -0.01em;
  text-shadow: 0.05em 0.04em 0 var(--pink);
}
.subtitle { margin-top: 1.5rem; font-size: var(--s1); line-height: 1.45; max-width: 34rem; }
.course-facts { margin: 2rem 0 0; display: grid; gap: 0; border-top: 2px solid var(--ink); max-width: 34rem; }
.course-facts > div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
.course-facts dt { font-weight: 700; }
.course-facts dd { margin: 0; }
.welcome-art { width: 100%; max-width: 24rem; justify-self: center; }
.art-multiply { mix-blend-mode: multiply; }
.art-key { font: 900 64px var(--display); fill: var(--ink); }
.lesson .objectives-title { font-size: var(--s1); margin: 2.75rem 0 1rem; line-height: 1.3; }
.objectives { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem 2rem; }
.objectives li { padding: 0.75rem 0 0.75rem 2.25rem; position: relative; border-top: 1px solid var(--rule); }
.objectives li::before { content: ""; position: absolute; left: 0; top: 1.3rem; width: 1.4rem; height: 0.5rem; border-radius: 1px; background: var(--blue); box-shadow: 3px 3px 0 var(--pink); }

/* ------------------------------------------------ accessibility */
.waffle-fig { margin: 0; }
.waffle { display: grid; grid-template-columns: repeat(10, 1fr) auto; gap: 4px; max-width: 22rem; align-items: end; }
.waffle i { display: block; aspect-ratio: 1; background: var(--blue); border-radius: 2px; }
.waffle i:nth-child(10n+1) { grid-column: 1; }
.waffle b { grid-column: 11; grid-row: 9 / span 2; align-self: end; font: 900 3.4rem/0.75 var(--display); color: var(--pink); padding-left: 0.4rem; }
.waffle-fig figcaption { margin-top: 0.75rem; color: var(--muted); font-size: var(--s-1); max-width: 22rem; }

.checklist { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.5rem; margin-top: 0.5rem; }
.checklist li { padding: 0.9rem 0 0.9rem 2.4rem; border-top: 2px solid var(--ink); position: relative; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 1rem; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--halftone-blue); border: 2px solid var(--blue); }
.lesson > h3 { margin-top: 2.75rem; }

.service-list { list-style: none; display: grid; gap: 0.9rem; margin-bottom: 1.5rem; }
.service-list li { padding-left: 1rem; border-left: 5px solid var(--pink); }

.activity { background: var(--paper); border: 2px dashed var(--ink); border-radius: 4px; padding: clamp(1.25rem, 3vw, 1.75rem); }
.activity h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 0.4rem; }
.activity-tag { display: inline-block; background: var(--pink); color: var(--ink); font-size: var(--s-1); padding: 0.1rem 0.6rem; border-radius: 3px; border: 2px solid var(--ink); }
.activity-intro { color: var(--muted); }

.cc-pickers { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: center; margin-top: 1rem; }
.cc-pickers label { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; }
.cc-pickers input[type="color"] { width: 3rem; height: 2.6rem; padding: 2px; border: 2px solid var(--ink); border-radius: 6px; background: var(--sheet); cursor: pointer; }
.cc-sample { margin-top: 1rem; padding: 1rem 1.25rem; border: 2px solid var(--ink); border-radius: 4px; }
.cc-big { font: 900 1.9rem/1.05 var(--display); margin-bottom: 0.3rem; }
.cc-ratio { margin-top: 1rem; font: 900 clamp(3rem, 2rem + 3vw, 4.25rem)/1 var(--display); }
.cc-unit { color: var(--muted); }
.cc-results { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: 0.4rem; margin-top: 0.75rem; }
.cc-results span, .q-feedback span, .scn-feedback span { min-width: 0; }
.cc-results li, .q-feedback, .scn-feedback { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.45rem 0.7rem; border-radius: 4px; font-weight: 700; font-size: var(--s-1); border: 2px solid; }
.pass { border-color: var(--pass); background: #e4f5ec; color: var(--pass); }
.fail { border-color: var(--fail); background: #fdeaed; color: var(--fail); }
.cc-results svg, .q-feedback svg, .scn-feedback svg { width: 1.15rem; height: 1.15rem; flex: none; margin-top: 0.1rem; }

/* ------------------------------------------------ instructional design */
.stack { list-style: none; display: grid; gap: 0; margin-top: 1.25rem; max-width: 30rem; }
.stack li {
  width: 90%; padding: 0.5rem 0.9rem; margin-top: -2px; border: 2px solid var(--ink); border-radius: 3px 8px 8px 3px;
  font: 800 1.35rem/1.15 var(--display); letter-spacing: 0.01em; box-shadow: inset 6px 0 0 rgba(22, 26, 61, 0.18);
}
.stack li:nth-child(1) { width: 96%; margin-left: 2%; }
.stack li:nth-child(2) { width: 88%; margin-left: 6%; }
.stack li:nth-child(3) { width: 92%; }
.stack li:nth-child(4) { width: 84%; margin-left: 9%; }
.stack li:nth-child(5) { width: 90%; margin-left: 3%; }
.stack li:nth-child(6) { width: 95%; margin-left: 1%; }
.stack li:nth-child(7) { width: 86%; margin-left: 7%; }
.stack li:nth-child(8) { width: 93%; margin-left: 2%; }
.stack li:nth-child(9) { width: 82%; margin-left: 8%; }
.stack li:nth-child(10) { width: 100%; }
.b-blue { background: var(--blue); color: #fff; }
.b-yellow { background: var(--yellow); color: var(--ink); }
.b-paper { background: var(--sheet); color: var(--ink); }
.b-pink { background: var(--pink); color: var(--ink); }
.b-ink { background: var(--ink); color: #fff; }
.stack-note { font: 400 var(--s-1) var(--body); }

.scn-email { margin-top: 1rem; background: var(--sheet); border: 2px solid var(--ink); border-radius: 4px; padding: 0.85rem 1rem; display: grid; gap: 0.25rem; font-size: var(--s-1); }
.scn-from { overflow-wrap: anywhere; }
.scn-choices { display: grid; gap: 0.5rem; margin-top: 1rem; }
.choice {
  text-align: left; min-height: 48px; padding: 0.6rem 0.9rem; font: 700 var(--s0)/1.3 var(--body); color: var(--ink);
  background: var(--sheet); border: 2px solid var(--ink); border-radius: 6px; cursor: pointer;
}
.choice:hover { background: var(--yellow); }
.choice[aria-pressed="true"] { background: var(--blue); color: #fff; border-color: var(--blue); }
.scn-feedback { margin-top: 1rem; font-weight: 400; font-size: var(--s0); line-height: 1.5; }
.scn-feedback strong { display: block; }

/* ------------------------------------------------ power platform */
.apps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 2.25rem; border-top: 2px solid var(--ink); }
.apps li { padding: 1.25rem 1.5rem 1.25rem 0; }
.apps li + li + li { padding-left: 1.5rem; border-left: 1px solid var(--rule); }
.apps h3 { font: 900 1.9rem/1 var(--display); margin-bottom: 0.6rem; }
.pill { display: inline-block; margin-top: 0.4rem; padding: 0 0.55rem; border: 2px solid var(--ink); background: var(--yellow); border-radius: 3px; font-weight: 700; font-size: var(--s-1); }
.aside-note { margin-top: 2rem; padding: 1rem 1.25rem; background: var(--paper); border-left: 5px solid var(--blue); max-width: 46rem; }

/* ------------------------------------------------ off hours */
.topology { margin: 0; }
.topology svg { display: block; width: 100%; height: auto; border: 2px solid var(--ink); border-radius: 4px; background: var(--paper); }
.topology figcaption { margin-top: 0.75rem; color: var(--muted); font-size: var(--s-1); }
.t-line path { stroke: var(--ink); stroke-width: 3; stroke-dasharray: 6 6; fill: none; }
.t-box rect { fill: var(--sheet); stroke: var(--ink); stroke-width: 2; }
.t-host { fill: var(--blue); }
.t-chip rect { fill: var(--yellow); stroke: var(--ink); stroke-width: 2; }
.t-text text, text.t-text { font: 700 15px var(--body); fill: var(--ink); text-anchor: middle; }
text.t-small { font-size: 13px; font-weight: 400; fill: var(--muted); }
text.t-bold { font: 900 24px var(--display); fill: #fff; }
.hobbies { list-style: none; display: grid; }
.hobbies li { padding: 0.85rem 0; border-bottom: 1px solid var(--rule); font-size: var(--s1); line-height: 1.35; }
.hobbies li:first-child { border-top: 2px solid var(--ink); }
.hobbies strong { font: 800 1.6rem/1 var(--display); letter-spacing: 0.01em; display: block; margin-bottom: 0.15rem; }

/* ------------------------------------------------ knowledge check */
.quiz { display: grid; gap: 1.25rem; margin-top: 1.75rem; max-width: 46rem; }
.quiz fieldset { margin: 0; border: 2px solid var(--ink); border-radius: 4px; padding: 1rem 1.25rem 1.25rem; display: grid; gap: 0.4rem; }
.quiz legend { font-weight: 700; padding: 0 0.4rem; margin-left: -0.4rem; font-size: var(--s1); line-height: 1.35; }
.quiz label { display: flex; align-items: center; gap: 0.7rem; min-height: 44px; padding: 0.25rem 0.5rem; border-radius: 4px; cursor: pointer; }
.quiz label:hover { background: var(--paper); }
.quiz input[type="radio"] { width: 1.3rem; height: 1.3rem; accent-color: var(--blue); flex: none; }
.q-feedback { margin-top: 0.5rem; font-weight: 400; font-size: var(--s0); }
.quiz-error { color: var(--fail); font-weight: 700; }
.quiz-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.quiz-score { font: 900 var(--s2)/1.1 var(--display); }

.certificate { margin-top: 2.5rem; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 2rem; align-items: end; }
.cert-paper {
  position: relative; text-align: center; padding: 2.5rem 2rem; background: var(--sheet);
  border: 3px double var(--ink); outline: 10px solid var(--yellow); outline-offset: -18px;
}
.cert-title { font: 900 var(--s3)/0.95 var(--display); color: var(--blue); text-shadow: 0.04em 0.035em 0 var(--pink); margin-bottom: 1rem; }
.cert-line { margin-top: 0.5rem; }
.cert-name { font: 900 clamp(2rem, 1.5rem + 2vw, 3rem)/1.05 var(--display); margin: 0.4rem auto; border-bottom: 2px solid var(--ink); display: inline-block; padding: 0 1rem 0.2rem; max-width: 100%; overflow-wrap: anywhere; }
.cert-sign { margin-top: 1.5rem; font-style: italic; color: var(--muted); }
.cert-tools { display: grid; gap: 0.5rem; min-width: 0; }
.cert-tools label { font-weight: 700; }
.cert-tools input { width: 100%; min-width: 0; min-height: 48px; padding: 0.5rem 0.75rem; font: inherit; border: 2px solid var(--ink); border-radius: 6px; }
.cert-tools .btn { justify-self: start; }

.contact { margin-top: 3rem; padding-top: 2rem; border-top: 2px solid var(--ink); }
.contact h3 { font: 900 var(--s3)/0.95 var(--display); margin-bottom: 0.75rem; }
.contact p { margin-top: 0.75rem; max-width: 38rem; }
.contact .mail { font: 900 clamp(2rem, 1.2rem + 3.5vw, 3.5rem)/1.05 var(--display); overflow-wrap: anywhere; max-width: none; }
.contact .mail a { color: var(--blue); text-decoration-color: var(--pink); text-decoration-thickness: 0.1em; }

/* ------------------------------------------------ footer */
.site-footer { max-width: 90rem; margin: 0 auto; padding: 1.5rem clamp(1rem, 3vw, 2rem) 2.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between; color: var(--muted); font-size: var(--s-1); }

/* ------------------------------------------------ accessibility tools panel */
.toolkit {
  position: fixed; right: 1rem; top: 4.75rem; z-index: 70; width: min(23rem, calc(100vw - 2rem)); max-height: calc(100vh - 6rem); overflow: auto;
  background: var(--ink); color: #fff; border-radius: 6px; padding: 1.25rem; border: 2px solid var(--yellow);
}
.toolkit :focus-visible { outline-color: var(--yellow); box-shadow: none; }
.tk-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.tk-head h2 { font: 900 1.9rem/1 var(--display); }
.tk-close { width: 44px; height: 44px; border-radius: 6px; border: 2px solid #5a6090; background: transparent; color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.tk-intro { margin: 0.5rem 0 1rem; color: #d9dcef; font-size: var(--s-1); }
.tk-list { list-style: none; display: grid; gap: 0.45rem; }
.tk-toggle {
  width: 100%; text-align: left; display: grid; grid-template-columns: 2.6rem 1fr; column-gap: 0.75rem;
  padding: 0.6rem 0.8rem; border-radius: 6px; border: 2px solid #3a4073; background: #20254f; color: #fff; cursor: pointer; font: inherit;
}
.tk-toggle::before {
  content: ""; grid-row: 1 / span 2; align-self: center; width: 2.4rem; height: 1.4rem; border-radius: 99px; background: #5a6090;
  background-image: radial-gradient(circle at 0.7rem 50%, #fff 0.5rem, transparent 0.55rem);
}
.tk-toggle[aria-pressed="true"] { border-color: var(--yellow); }
.tk-toggle[aria-pressed="true"]::before { background-color: var(--yellow); background-image: radial-gradient(circle at 1.7rem 50%, var(--ink) 0.5rem, transparent 0.55rem); }
.tk-name { font-weight: 700; }
.tk-desc { font-size: var(--s-1); color: #d9dcef; }
.tk-reset { margin-top: 0.85rem; background: none; border: 0; color: var(--yellow); font: 700 var(--s-1) var(--body); text-decoration: underline; cursor: pointer; padding: 0.5rem 0; }

#tk-layer { position: absolute; inset: 0 auto auto 0; width: 100%; pointer-events: none; z-index: 50; }
.tk-badge { position: absolute; transform: translateY(-100%); white-space: nowrap; max-width: 24rem; overflow: hidden; text-overflow: ellipsis; font: 700 12px/1.4 var(--body); padding: 2px 7px; border-radius: 3px; background: var(--ink); color: #fff; }
.tk-badge.is-landmark { background: var(--blue); transform: none; }
.tk-badge.is-tab { transform: translate(-40%, -60%); min-width: 22px; text-align: center; border-radius: 99px; background: var(--yellow); color: var(--ink); border: 2px solid var(--ink); }
.tk-badge.is-alt { transform: none; background: var(--yellow); color: var(--ink); border: 2px solid var(--ink); white-space: normal; }
.tk-box { position: absolute; border: 2px dashed var(--pink); border-radius: 3px; }
.tk-box.is-landmark { border: 3px solid var(--blue); }
html.tk-grayscale body > :not(.toolkit) { filter: grayscale(1); }
html.tk-zoom { font-size: 200%; }

/* ------------------------------------------------ responsive */
@media (max-width: 960px) {
  .player { grid-template-columns: minmax(0, 1fr); }
  .menu { position: static; padding: 1rem clamp(1rem, 3vw, 2rem) 0; }
  html.js .menu-toggle:not([hidden]) { display: flex; }
  html.js .menu-list:not(.is-open) { display: none; }
  html.js .menu-list { margin-top: 0.5rem; background: var(--sheet); border: 2px solid var(--ink); border-radius: 6px; padding: 0.4rem; }
  .stage { padding: 1.25rem clamp(1rem, 3vw, 2rem) 2.5rem; }
  .split, .welcome-grid, .certificate { grid-template-columns: 1fr; }
  .apps { grid-template-columns: 1fr; }
  .apps li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .welcome-art { max-width: 16rem; justify-self: start; }
}
@media (max-width: 640px) {
  .objectives, .checklist { grid-template-columns: 1fr; }
  .progress-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .lesson::before { inset: 8px -6px -8px 6px; }
  .course-facts > div { grid-template-columns: 1fr; gap: 0.1rem; }
  .brand-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .toolkit { top: auto; bottom: 1rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; } }
@media (forced-colors: active) {
  .lesson, .btn, .choice, .tool, .menu-list a, .activity, .stack li { border: 2px solid CanvasText; }
  .menu-list a[aria-current="step"] { outline: 3px solid Highlight; }
  .riso-title, .cert-title { text-shadow: none; }
}

/* ------------------------------------------------ print: just the certificate when one exists */
@media print {
  body.printing-cert > *:not(.player), body.printing-cert .menu, body.printing-cert .lesson-nav { display: none !important; }
  body.printing-cert .lesson > *:not(.certificate) { display: none !important; }
  body.printing-cert .cert-tools { display: none !important; }
  body.printing-cert .lesson, body.printing-cert .lesson::before { border: 0; background: none; }
  .player { display: block; }
}

/* ------------------------------------------------ inner pages */
.page { max-width: 48rem; margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 3vw, 2rem) 3rem; }
.page h1 { font-size: var(--s3); line-height: 0.95; color: var(--blue); text-shadow: 0.04em 0.035em 0 var(--pink); }
.page h2 { font-size: var(--s2); margin-top: 2.5rem; }
.page p, .page ul { margin-top: 0.9rem; }
.page ul { margin-left: 1.25rem; display: grid; gap: 0.35rem; }
.page .updated { color: var(--muted); margin-top: 3rem; font-size: var(--s-1); }
.page-nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.page-nav a { color: #fff; font-weight: 700; }
.page-nav { list-style: none; margin: 0; }
.page-nav a[aria-current="page"] { color: var(--yellow); }
.page .lead { font-size: var(--s1); line-height: 1.5; }
.resume-head { border-bottom: 3px solid var(--ink); padding-bottom: 1.25rem; }
.resume-role { font-size: var(--s1); font-weight: 700; margin-top: 0.75rem !important; }
.resume-contact a { font-weight: 700; }
.resume .job { margin-top: 1.5rem; }
.resume h3 { font-size: var(--s1); }
.resume .plain { list-style: none; margin-left: 0; }
.skills { margin: 1rem 0 0; display: grid; gap: 0; }
.skills > div { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; padding: 0.6rem 0; border-top: 1px solid var(--rule); }
.skills dt { font-weight: 700; }
.skills dd { margin: 0; }
@media (max-width: 640px) { .skills > div { grid-template-columns: 1fr; gap: 0.1rem; } }
@media print {
  .topbar, .site-footer, .skip, .resume-actions { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .page { padding: 0; max-width: none; }
  .page h1 { text-shadow: none; color: var(--ink); font-size: 30pt; }
  .page h2 { font-size: 17pt; margin-top: 1.2rem; }
  a { color: var(--ink); text-decoration: none; }
}

/* featured app + award */
.apps li.app-feature { grid-column: 1 / -1; padding: 1.5rem 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 0.5rem 2.5rem; align-items: start; }
.apps li.app-feature h3 { grid-column: 1 / -1; font-size: clamp(2rem, 1.4rem + 2vw, 2.9rem); color: var(--blue); }
.apps li.app-feature + li { padding-left: 0; border-left: 0; }
.award {
  display: flex; gap: 0.75rem; align-items: flex-start; padding: 1rem 1.1rem; background: var(--yellow); border: 2px solid var(--ink); border-radius: 4px;
  font-weight: 700; box-shadow: 6px 6px 0 var(--pink);
}
.award svg { width: 2rem; height: 2rem; flex: none; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.resume .job-meta { color: var(--muted); margin-top: 0.35rem !important; font-size: var(--s-1); }
.resume .job ul ul { margin-top: 0.4rem; list-style: circle; }
.resume .job > p:not(.job-meta) { margin-top: 0.6rem; }
@media (max-width: 960px) { .apps li.app-feature { grid-template-columns: 1fr; } }
