/* skills-section.css: section 08, "Daily skills for my work" (seven skills, one story each).
   Markup: tools/build_skills_section.mjs writes it into index.html from the story.json file of each skill in showcase/skills.
   Behaviour: js/skills-section.js (loaded when the section is near). Everything is scoped under
   .skills-section and reads the tokens in css/site.css; decoration reads --accent only. */

.skills-section {
  --sk-bar-h: 58px;
  --sk-top: calc(var(--header-h) + var(--sk-bar-h) + 20px);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --thai: Poppins, "Noto Sans Thai", Thonburi, "Leelawadee UI", Tahoma, sans-serif;
  /* faint text in this section: --ink-faint (.38) is 3.3 to 1 here, this is 5.9 to 1 on --bg and --bg-2 */
  --sk-faint: rgba(242, 244, 247, .56);
  /* the four skill families (SPEC.md A.6); css/site.css owns the tokens, these are the fallbacks */
  --sk-learn: var(--fam-learn, #5fd39a); --sk-organise: var(--fam-organise, #b58cff); --sk-make: var(--fam-make, #3d8bff); --sk-think: var(--fam-think, #ff8a4c);
  position: relative; background: var(--bg); padding: clamp(96px, 14vh, 160px) var(--gutter) 0;
}
/* zero-specificity resets, so every class rule below wins */
:where(.skills-section) :where(ul, ol) { list-style: none; margin: 0; padding: 0; }
:where(.skills-section) :where(p, h3, h4, figure, dl, dd) { margin: 0; }
:where(.skills-section) :where(button) { font: inherit; color: inherit; }
/* a fallback hidden once its style module is ready stays hidden, whatever its display rule */
.skills-section [hidden] { display: none !important; }
.skills-section :where(a, button, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* the site's micro line (11 px, --ink-faint) is too small and too faint for the notes in here */
.skills-section .micro { font-size: 12px; color: var(--ink-dim); }

/* ------------------------------------------------------------ head */
.sk-head { max-width: 1600px; }
.sk-title { margin-top: 22px; font-size: clamp(44px, 7.4vw, 124px); font-weight: 600; letter-spacing: -.045em; line-height: .94; max-width: 11ch; text-wrap: balance; }
.sk-intro { margin-top: clamp(26px, 4vh, 44px); display: grid; gap: 14px; max-width: 60ch; }
.sk-lead { font-size: clamp(18px, 1.55vw, 22px); line-height: 1.45; color: var(--ink); max-width: 44ch; }

/* the map: four families, seven skills, wired like the deck's signature slide */
.sk-map { position: relative; margin-top: clamp(56px, 9vh, 104px); padding-top: 22px; border-top: 1px solid var(--line); }
.sk-map-label { color: var(--ink-dim); }
.sk-map-cols { position: relative; z-index: 1; margin-top: 26px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: clamp(28px, 4.2vw, 88px); }
.sk-map-col { display: grid; grid-template-rows: auto auto 1fr; min-width: 0; }
.sk-map-fam { display: flex; gap: 10px; font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.sk-map-fam span { color: var(--sk-faint); font-variant-numeric: tabular-nums; }
.sk-map-line { margin-top: 6px; font-size: 13px; color: var(--ink-dim); line-height: 1.4; }
.sk-map-col ul { margin-top: 26px; display: grid; gap: 30px; align-content: center; }
.sk-map-item { position: relative; display: grid; grid-template-columns: 14px auto 1fr; column-gap: 12px; row-gap: 2px; align-items: baseline; text-decoration: none; color: var(--ink); padding: 4px 0; }
.sk-map-dot { grid-row: 1; align-self: center; width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--accent); background: var(--bg); box-shadow: 0 0 0 4px var(--bg); transition: background-color var(--t-ui) var(--ease-soft), box-shadow var(--t-ui) var(--ease-soft); }
.sk-map-n { grid-row: 1; font-size: 11px; letter-spacing: .1em; color: var(--sk-faint); font-variant-numeric: tabular-nums; }
.sk-map-item b { grid-row: 1; font-size: 17px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; min-width: 0; }
.sk-map-short { grid-column: 3; font-size: 13px; color: var(--ink-dim); line-height: 1.4; }
.sk-map-item:hover .sk-map-dot, .sk-map-item:focus-visible .sk-map-dot, .sk-map-item.is-hot .sk-map-dot { background: var(--accent); box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px var(--accent-soft); }
.sk-map-item:hover b, .sk-map-item.is-hot b { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; text-decoration-thickness: 1px; }
.sk-map-wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.sk-map-wires path { fill: none; stroke: var(--ink); stroke-opacity: .2; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; transition: stroke var(--t-ui) var(--ease-soft), stroke-opacity var(--t-ui) var(--ease-soft); }
.sk-map-wires path.is-hot { stroke: var(--accent); stroke-opacity: 1; }
/* the loop back from thinking to making: drawn at the same weight as the forks, with an arrowhead */
.sk-map-loop { position: absolute; z-index: 1; font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--accent); white-space: nowrap; transform: translate(-50%, 0); visibility: hidden; }
.sk-map.is-wired .sk-map-loop { visibility: visible; }
/* the wires draw themselves once the map is revealed; the loop, its arrowhead and its label come last */
.skills-section.is-ready:not(.is-reduced) .sk-map-wires path:not(.is-head) { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1100ms var(--ease-out) var(--dl, 0ms), stroke var(--t-ui) var(--ease-soft), stroke-opacity var(--t-ui) var(--ease-soft); }
.skills-section.is-ready:not(.is-reduced) .sk-map.is-in .sk-map-wires path:not(.is-head) { stroke-dashoffset: 0; }
.skills-section.is-ready:not(.is-reduced) .sk-map-wires path.is-head, .skills-section.is-ready:not(.is-reduced) .sk-map-loop { opacity: 0; transition: opacity 600ms var(--ease-soft) var(--dl, 1500ms), stroke var(--t-ui) var(--ease-soft); }
.skills-section.is-ready:not(.is-reduced) .sk-map.is-in .sk-map-wires path.is-head, .skills-section.is-ready:not(.is-reduced) .sk-map.is-in .sk-map-loop { opacity: 1; }

/* ------------------------------------------------------------ sticky index (seven story bars) */
.sk-chapters { position: relative; margin-top: clamp(88px, 13vh, 150px); }
.sk-bar {
  position: sticky; top: var(--header-h); z-index: 30; height: var(--sk-bar-h);
  margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter);
  display: flex; align-items: stretch; gap: clamp(16px, 2vw, 32px);
  background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.sk-bar-now { flex: none; width: clamp(150px, 15vw, 230px); display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-content: center; min-width: 0; }
.sk-bar-idx { font-size: 11px; font-weight: 500; letter-spacing: .14em; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.sk-bar-fam { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-dim); }
.sk-bar-name { grid-column: 1 / -1; font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk-bar-list { flex: 1; display: flex; gap: 6px; min-width: 0; }
.sk-bar-list li { flex: 1 1 0; min-width: 0; }
.sk-bar-list li.is-fam-start:not(:first-child) { margin-left: clamp(8px, 1vw, 18px); }
.sk-bar-list a { height: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; align-content: end; padding-bottom: 12px; text-decoration: none; color: var(--ink-dim); transition: color var(--t-micro) var(--ease-soft); }
.sk-bar-list a:hover { color: var(--ink); }
.sk-bar-list a[aria-current="true"] { color: var(--ink); }
.sk-bar-n { font-size: 11px; font-weight: 500; letter-spacing: .1em; font-variant-numeric: tabular-nums; }
.sk-bar-t { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk-bar-track { grid-column: 1 / -1; justify-self: stretch; margin-top: 8px; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.sk-bar-track i { display: block; height: 100%; background: var(--fam, var(--accent)); transform: scaleX(var(--p, 0)); transform-origin: left; }
.sk-bar-list a[aria-current="true"] .sk-bar-track { background: color-mix(in srgb, var(--fam, var(--accent)) 26%, transparent); }
.sk-bar-f, .sk-bar-toggle { display: none; }
@media (max-width: 1279px) { .sk-bar-t { display: none; } .sk-bar-list a { grid-template-columns: auto; } }
/* where the names show, each tab is as wide as its name and the spare room is shared, so no name is cut */
@media (min-width: 1280px) { .sk-bar-list li { flex: 1 1 auto; } }

/* ------------------------------------------------------------ chapters */
/* each family owns one colour: the chapter number's outline, the family label, the index track and the
   "with" bar of the comparison. Focus rings and hover states keep --accent. */
.skills-section [data-fam="learn"] { --fam: var(--sk-learn); }
.skills-section [data-fam="organise"] { --fam: var(--sk-organise); }
.skills-section [data-fam="make"] { --fam: var(--sk-make); }
.skills-section [data-fam="think"] { --fam: var(--sk-think); }
.sk-ch { position: relative; padding-top: clamp(76px, 11vh, 132px); scroll-margin-top: calc(var(--header-h) + var(--sk-bar-h) + 36px - clamp(76px, 11vh, 132px));
  /* off screen chapters skip layout and paint (smoothness audit, item 12) */
  content-visibility: auto; contain-intrinsic-size: auto 1500px; }
/* placeholder heights close to each chapter's real height once its proof has mounted (measured
   20 Nov 2026 at 1440 and 375), so the section does not shrink by thousands of pixels on first view */
#skill-be-me { contain-intrinsic-size: auto 870px; }
#skill-extract-me { contain-intrinsic-size: auto 920px; }
#skill-skill-organiser { contain-intrinsic-size: auto 1465px; }
#skill-present-like-peter { contain-intrinsic-size: auto 950px; }
#skill-video-like-peter { contain-intrinsic-size: auto 800px; }
#skill-first-principle-thinking { contain-intrinsic-size: auto 1405px; }
#skill-crazy-one { contain-intrinsic-size: auto 1525px; }
@media (max-width: 820px) {
  #skill-be-me { contain-intrinsic-size: auto 1690px; }
  #skill-extract-me { contain-intrinsic-size: auto 1790px; }
  #skill-skill-organiser { contain-intrinsic-size: auto 1745px; }
  #skill-present-like-peter { contain-intrinsic-size: auto 1555px; }
  #skill-video-like-peter { contain-intrinsic-size: auto 1540px; }
  #skill-first-principle-thinking { contain-intrinsic-size: auto 1585px; }
  #skill-crazy-one { contain-intrinsic-size: auto 2060px; }
}
.sk-ch-meta { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 6px 16px; }
.sk-ch-num { font-size: clamp(76px, 8.4vw, 140px); font-weight: 600; line-height: .78; letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 1.2px var(--fam, var(--accent)); font-variant-numeric: tabular-nums; margin-right: 4px; }
.sk-ch-fam { font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--fam, var(--accent)); }
.sk-slug { font-family: var(--mono); font-size: 12px; color: var(--ink-dim); }
.sk-ch-name { margin-top: 26px; font-size: clamp(38px, 4.4vw, 68px); font-weight: 600; letter-spacing: -.035em; line-height: 1; text-wrap: balance; }
.sk-ch-tag { margin-top: 16px; font-size: clamp(19px, 1.7vw, 25px); font-weight: 500; letter-spacing: -.015em; line-height: 1.25; color: var(--ink-dim); max-width: 26ch; text-wrap: balance; }

/* the four beats */
.sk-beats { display: grid; gap: clamp(44px, 6.4vh, 68px); margin-top: clamp(40px, 6vh, 64px); min-width: 0; }
.sk-beat-label { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-dim); }
.sk-beat-label::before { content: ""; width: 22px; height: 1px; background: var(--accent); }
.sk-problem { font-size: 16px; line-height: 1.6; color: var(--ink-dim); max-width: 50ch; }
.sk-insight { margin-top: 32px; padding-left: 20px; border-left: 2px solid var(--fam, var(--accent)); font-size: clamp(19px, 1.5vw, 23px); font-weight: 500; letter-spacing: -.012em; line-height: 1.4; color: var(--ink); max-width: 36ch; }

/* why it exists: the problem and the insight. On wide screens it is always open and has no summary
   row, so it reads as two plain beats; on a phone (the script folds it) it is a disclosure that sits
   under the numbers, next to How it works */
.sk-why-body { display: grid; gap: clamp(44px, 6.4vh, 68px); }
.sk-why[open] .sk-more-v { transform: scaleY(0); }
@media (min-width: 761px) { .sk-why > .sk-why-sum { display: none; } }


/* steps: a rail that lights as you read */
.sk-steps { position: relative; display: grid; }
.sk-steps::before, .sk-steps::after { content: ""; position: absolute; left: 14px; top: 18px; width: 1px; }
.sk-steps::before { bottom: 18px; background: var(--line); }
.sk-steps::after { height: var(--fill, 0px); background: var(--accent); transition: height 600ms var(--ease-out); }
.sk-steps li { position: relative; display: grid; grid-template-columns: 29px minmax(0, 1fr); column-gap: 16px; padding: 9px 0; transition: opacity var(--t-ui) var(--ease-soft); }
.sk-step-n { grid-row: 1 / span 2; position: relative; z-index: 1; width: 29px; height: 29px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); display: grid; place-items: center; font-size: 12px; font-weight: 500; letter-spacing: .06em; color: var(--ink-dim); font-variant-numeric: tabular-nums; transition: background-color var(--t-ui) var(--ease-soft), border-color var(--t-ui) var(--ease-soft), color var(--t-ui) var(--ease-soft); }
.sk-steps b { padding-top: 4px; font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.sk-step-body { margin-top: 4px; font-size: 14px; line-height: 1.55; color: var(--ink-dim); }
.skills-section.is-ready .sk-steps.is-live li:not(.is-now) b { color: var(--ink-dim); }
.skills-section.is-ready .sk-steps.is-live li:not(.is-now) .sk-step-body { color: color-mix(in srgb, var(--ink) 56%, transparent); }
.sk-steps b, .sk-step-body { transition: color var(--t-ui) var(--ease-soft); }
.sk-steps li.is-past .sk-step-n { border-color: var(--accent); color: var(--accent); }
.sk-steps li.is-now .sk-step-n { border-color: var(--accent); background: var(--accent); color: var(--bg); }

/* what it made: in, out, the real numbers */
.sk-io { display: grid; gap: 12px; }
.sk-in, .sk-out { padding: 18px 20px 20px; border-radius: var(--r-lg); min-width: 0; }
.sk-in { box-shadow: inset 0 0 0 1px var(--line); background: var(--card); }
.sk-out { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 42%, var(--line)); background: color-mix(in srgb, var(--accent) 5%, transparent); }
.sk-io-k { font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.sk-io-label { margin-top: 8px; font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.sk-io-text { margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--ink-dim); }
.sk-out-list { margin-top: 10px; display: grid; gap: 9px; }
.sk-out-list li { position: relative; padding-left: 18px; font-size: 14px; line-height: 1.55; color: var(--ink-dim); }
.sk-out-list li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 1px; background: var(--accent); }
.sk-out-figure { margin-top: 16px; }
.sk-out-figure img { display: block; width: 100%; height: auto; border-radius: 8px; box-shadow: 0 0 0 1px var(--line); }
.sk-out-figure figcaption { margin-top: 8px; color: var(--ink-dim); }
.sk-nums { margin-top: 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 28px; }
.sk-nums li { min-width: 0; padding-top: 14px; border-top: 1px solid var(--line); }
.sk-nums b { display: block; font-size: clamp(30px, 2.7vw, 44px); font-weight: 600; letter-spacing: -.035em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sk-nums li > span { display: block; margin-top: 10px; font-size: 13px; line-height: 1.45; color: var(--ink-dim); max-width: 26ch; }
.sk-num-q { font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--ink-dim); }

/* how it works: one click away, closed by default */
.sk-more { margin-top: 32px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sk-more-sum { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; min-height: 56px; padding: 18px 40px 16px 0; cursor: pointer; list-style: none; }
.sk-more-sum::-webkit-details-marker { display: none; }
.sk-more-sum::marker { content: ""; }
.sk-more-k { font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); }
.sk-more-n { font-size: 14px; line-height: 1.45; color: var(--ink-dim); }
.sk-more-ico { position: absolute; right: 6px; top: 50%; margin-top: -8px; color: var(--accent); }
.sk-more-v { transform-box: fill-box; transform-origin: center; transition: transform var(--t-ui) var(--ease-out); }
.sk-more[open] .sk-more-v { transform: scaleY(0); }
.sk-more-sum:hover .sk-more-k { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; text-decoration-thickness: 1px; }
.sk-more-body { display: grid; gap: clamp(30px, 4.4vh, 44px); padding: 4px 0 28px; }

/* ------------------------------------------------------------ stage (the live proof) */
.sk-stage { position: relative; container-type: inline-size; margin-top: 36px; padding: clamp(14px, 1.7vw, 24px); border-radius: var(--r-lg); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.sk-stage-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 16px; }
.sk-live { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); }
.sk-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sk-stage-note { font-size: 12px; line-height: 1.4; color: var(--ink-dim); }
.sk-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 500; border-bottom: 1px solid var(--line); transition: border-color var(--t-ui) var(--ease-soft); }
.sk-link .sk-arrow { flex: none; transition: transform var(--t-ui) var(--ease-soft); }
.sk-link:hover, .sk-link:focus-visible { border-color: var(--accent); }
.sk-link:hover .sk-arrow, .sk-link:focus-visible .sk-arrow { transform: translate(2px, -2px); }

/* Three chapter shapes (SPEC.md E.3). The markup is in phone order: head, stage, insight, numbers, the
   one disclosure. Split (Learn, Make): the copy runs down one side, the proof sticks on the other.
   Wide (Organise, Think): head and insight over the stage, the stage the full width and not sticky,
   then the numbers and "Why and how" side by side. */
@media (min-width: 1100px) {
  .sk-ch { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(32px, 3.4vw, 64px); align-items: start; }
  .sk-ch.is-split { grid-template-rows: auto auto auto 1fr; }
  .sk-ch.is-split .sk-ch-head { grid-column: 1 / span 5; grid-row: 1; }
  .sk-ch.is-split .sk-insight { grid-column: 1 / span 5; grid-row: 2; margin-top: clamp(40px, 6vh, 64px); }
  .sk-ch.is-split .sk-nums { grid-column: 1 / span 5; grid-row: 3; margin-top: clamp(40px, 6vh, 56px); }
  .sk-ch.is-split .sk-more { grid-column: 1 / span 5; grid-row: 4; margin-top: clamp(40px, 6vh, 56px); }
  .sk-ch.is-split .sk-stage { grid-column: 6 / span 7; grid-row: 1 / span 4; margin-top: 0; position: sticky; top: var(--sk-top); }
  .sk-ch.is-split.is-flip :is(.sk-ch-head, .sk-insight, .sk-nums, .sk-more) { grid-column: 8 / span 5; }
  .sk-ch.is-split.is-flip .sk-stage { grid-column: 1 / span 7; }
  .sk-stage.is-tall { position: relative; top: auto; }
  .sk-ch.is-wide { align-items: end; }
  .sk-ch.is-wide .sk-ch-head { grid-column: 1 / span 5; grid-row: 1; }
  .sk-ch.is-wide .sk-insight { grid-column: 7 / span 6; grid-row: 1; margin-top: 0; padding-bottom: 6px; max-width: 40ch; }
  .sk-ch.is-wide .sk-stage { grid-column: 1 / -1; grid-row: 2; margin-top: clamp(36px, 5vh, 56px); }
  .sk-ch.is-wide .sk-nums { grid-column: 1 / span 5; grid-row: 3; align-self: start; margin-top: clamp(32px, 5vh, 48px); }
  .sk-ch.is-wide .sk-nums:has(> li:only-child) { grid-template-columns: minmax(0, 1fr); }
  .sk-ch.is-wide .sk-more { grid-column: 7 / span 6; grid-row: 3; align-self: start; margin-top: clamp(32px, 5vh, 48px); }
  .sk-ch.is-wide .sk-nums:not(:has(li)) + .sk-more, .sk-ch.is-wide .sk-stage + .sk-insight + .sk-more { grid-column: 1 / span 6; }
}
@media (min-width: 821px) and (max-width: 1099px) { .sk-stage { max-width: 820px; } }

/* ---------- be-me: the contact card that flips to its draft */
.bm { display: grid; gap: 16px; }
.bm-request { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; justify-self: start; max-width: 100%; padding: 9px 16px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--line); }
.bm-k { font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-dim); }
.bm-v { font-size: 15px; font-weight: 500; color: var(--ink); }
.bm-deck { display: grid; gap: 14px; perspective: 1600px; }
.bm-flip { display: grid; gap: 12px; }
.bm-face { min-width: 0; padding: 20px 22px; border-radius: 14px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.bm-back { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 48%, var(--line)); }
.bm-card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; }
.bm-card-head b { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.bm-close { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.bm-pips { display: inline-flex; gap: 4px; }
.bm-pips i { width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--ink-faint); }
.bm-pips i.on { background: var(--accent); box-shadow: none; }
.bm-facts { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.bm-facts dt { font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-dim); }
.bm-facts dd { margin-top: 4px; font-size: 15px; line-height: 1.35; color: var(--ink); font-family: var(--thai); }
.bm-traits { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 6px; }
.bm-traits li { padding: 5px 11px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; line-height: 1.3; color: var(--ink-dim); }
.bm-draft { margin-top: 16px; font-family: var(--thai); font-size: clamp(19px, 3.4cqi, 24px); line-height: 1.55; color: var(--ink); }
.bm-gloss { margin-top: 8px; font-size: 13px; line-height: 1.5; color: var(--ink-dim); }
.bm-shaped { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bm-shaped span { margin-right: 4px; font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-dim); }
.bm-shaped i { font-style: normal; padding: 4px 10px; border-radius: var(--r-pill); background: var(--accent-soft); font-size: 12px; color: var(--ink); font-family: var(--thai); }
.bm-hold { margin-top: 16px; display: flex; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-dim); }
.bm-hold span { width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--accent); }
.bm-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bm-controls:empty { display: none; }
.bm-to, .bm-turn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: var(--r-pill); background: transparent; font-size: 13px; font-weight: 500; color: var(--ink-dim); cursor: pointer; transition: border-color var(--t-micro) var(--ease-soft), color var(--t-micro) var(--ease-soft), background-color var(--t-micro) var(--ease-soft); }
.bm-to .bm-pips i { width: 5px; height: 5px; }
.bm-to[aria-pressed="true"] .bm-pips i { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bg) 55%, transparent); }
.bm-to[aria-pressed="true"] .bm-pips i.on { background: var(--bg); box-shadow: none; }
.bm-to:hover, .bm-turn:hover { border-color: var(--accent); color: var(--ink); }
.bm-to[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.bm-turn { margin-left: auto; color: var(--ink); }
.bm-turn svg { transition: transform var(--t-ui) var(--ease-out); }
.bm-turn[aria-pressed="true"] svg { transform: rotate(180deg); }
.bm-scale { padding-top: 14px; border-top: 1px solid var(--line); }
.bm-scale-k { font-size: 12px; color: var(--ink-dim); }
.bm-levels { margin-top: 10px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.bm-levels li { display: grid; gap: 6px; padding: 8px 8px 10px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line); }
.bm-lv { font-size: 11px; font-weight: 500; letter-spacing: .1em; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.bm-row { display: flex; flex-wrap: wrap; gap: 4px; }
.bm-who { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 11px; font-weight: 600; color: var(--ink-dim); box-shadow: inset 0 0 0 1px var(--line); transition: background-color var(--t-ui) var(--ease-soft), color var(--t-ui) var(--ease-soft); }
.bm-who.has-draft { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-faint); }
.bm-who.is-sel { background: var(--accent); color: var(--bg); box-shadow: none; }
.bm-note { color: var(--ink-dim); line-height: 1.5; }
/* with the script: one card at a time, and it turns over. The deck takes the height of the card
   on show (its taller face), not of the tallest card, so no card carries empty space; the script
   eases the height between cards. Each face keeps its footer line at the bottom. */
.skills-section.is-ready .bm-deck { position: relative; display: block; }
.skills-section.is-ready .bm-deck.is-sizing { transition: height 420ms var(--ease-out); }
.skills-section.is-ready .bm-face { display: flex; flex-direction: column; }
.skills-section.is-ready .bm-traits, .skills-section.is-ready .bm-hold { margin-top: auto; }
.skills-section.is-ready .bm-facts { margin-bottom: 20px; }
.skills-section.is-ready .bm-shaped { margin-bottom: 16px; }
.skills-section.is-ready .bm-card { position: absolute; left: 0; right: 0; top: 0; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity 360ms var(--ease-soft), transform 700ms var(--ease-out), visibility 0s linear 360ms; }
.skills-section.is-ready .bm-card.is-current { position: relative; opacity: 1; visibility: visible; transform: none; transition: opacity 420ms var(--ease-soft), transform 700ms var(--ease-out), visibility 0s; }
.skills-section.is-ready:not(.is-reduced) .bm-flip { gap: 0; transform-style: preserve-3d; transition: transform 820ms var(--ease-out); }
.skills-section.is-ready:not(.is-reduced) .bm-face { grid-area: 1 / 1; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.skills-section.is-ready:not(.is-reduced) .bm-back { transform: rotateY(180deg); }
.skills-section.is-ready:not(.is-reduced) .bm-card.is-flipped .bm-flip { transform: rotateY(180deg); }
.skills-section.is-reduced .bm-turn { display: none; }

/* ---------- extract-me: the scan, the bars, the receipts */
.xm-scan { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 13px; font-size: 12px; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.xm-scan span:not(.xm-k) { white-space: nowrap; }
.xm-k { font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.xm-k2 { margin: 16px 0 9px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); }
.xm-k2 span { font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink-dim); }
.xm-bars { display: grid; gap: 5px; }
.xm-bars li { display: grid; grid-template-columns: 84px minmax(0, 1fr) 38px; column-gap: 12px; align-items: center; transition: opacity var(--t-ui) var(--ease-soft); }
.xm-name { font-size: 13px; color: var(--ink); white-space: nowrap; }
.xm-bar { height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 7%, transparent); overflow: hidden; }
.xm-bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); transform: scaleX(var(--v)); transform-origin: left; }
.xm-val { font-size: 12px; text-align: right; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.xm-sub { grid-column: 2 / -1; font-size: 12px; color: var(--ink-dim); }
.xm-strengths { display: grid; gap: 8px; }
.xm-why { margin-top: 8px; font-size: 12px; line-height: 1.45; color: var(--ink-dim); }
.xm-strengths li { display: block; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); transition: opacity var(--t-ui) var(--ease-soft), box-shadow var(--t-ui) var(--ease-soft); }
.xm-rank { font-size: 11px; font-weight: 500; letter-spacing: .1em; color: var(--accent); font-variant-numeric: tabular-nums; padding-top: 2px; }
.xm-s { display: grid; align-content: start; gap: 3px; min-width: 0; }
.xm-s b { font-size: 13px; font-weight: 600; line-height: 1.3; }
.xm-s span { font-size: 12.5px; line-height: 1.4; color: var(--ink); }
.xm-s small { font-size: 12px; line-height: 1.45; color: var(--ink-dim); }
.xm.is-linking .xm-bars li:not(.is-hot), .xm.is-linking .xm-strengths li:not(.is-hot) { opacity: .32; }
.xm.is-linking .xm-strengths li.is-hot { box-shadow: inset 0 0 0 1px var(--accent); }
@container (min-width: 480px) { .xm-strengths { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 640px) { .xm-strengths { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.skills-section.is-ready .xm-sub { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skills-section.is-ready:not(.is-reduced) .xm-bar i { transform: scaleX(0); transition: transform 1100ms var(--ease-out) calc(var(--i) * 70ms); }
.skills-section.is-ready:not(.is-reduced) .xm.is-on .xm-bar i { transform: scaleX(var(--v)); }
.skills-section.is-ready:not(.is-reduced) .xm-strengths li { opacity: 0; transform: translateY(8px); transition: opacity 600ms var(--ease-soft) calc(500ms + var(--i) * 80ms), transform 800ms var(--ease-out) calc(500ms + var(--i) * 80ms), box-shadow var(--t-ui) var(--ease-soft); }
.skills-section.is-ready:not(.is-reduced) .xm.is-on .xm-strengths li { opacity: 1; transform: none; }
.skills-section.is-ready:not(.is-reduced) .xm.is-on.is-linking .xm-strengths li:not(.is-hot) { opacity: .32; transition-delay: 0s; }
.xm-hint { min-height: 1.5em; margin-top: 6px; font-size: 12px; color: var(--ink-dim); }

/* ---------- skill-organiser: the real map */
.so { display: grid; gap: 12px; }
.so-modes { display: flex; flex-wrap: wrap; gap: 6px; }
.so-modes button { min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-pill); background: transparent; font-size: 13px; font-weight: 500; color: var(--ink-dim); cursor: pointer; transition: border-color var(--t-micro) var(--ease-soft), color var(--t-micro) var(--ease-soft), background-color var(--t-micro) var(--ease-soft); }
.so-modes button:hover { border-color: var(--accent); color: var(--ink); }
.so-modes button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.so-readout { min-height: 1.5em; font-size: 13px; line-height: 1.5; color: var(--ink-dim); }
.so-map { position: relative; height: min(100cqi, 620px); }
@media (min-width: 1100px) and (min-height: 700px) { .so-map { height: clamp(300px, calc(100svh - var(--sk-top) - 300px), 620px); } }
.skills-section:not(.is-ready) .so-map, .skills-section:not(.is-ready) .so-legend, .skills-section:not(.is-ready) .so-modes { display: none; }
.so-sq { position: absolute; top: 0; bottom: 0; left: 50%; aspect-ratio: 1 / 1; transform: translateX(-50%); }
.so-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.so-e { fill: none; stroke: var(--ink); stroke-opacity: .1; stroke-width: 1.7; transition: stroke-opacity var(--t-ui) var(--ease-soft), stroke var(--t-ui) var(--ease-soft); }
.so-e.k1 { stroke-opacity: .17; }
.so-e.k2 { stroke: var(--accent); stroke-opacity: 1; stroke-width: 3.6; stroke-linecap: round; }
.so-n { fill: var(--ink); fill-opacity: .6; transition: fill-opacity var(--t-ui) var(--ease-soft), fill var(--t-ui) var(--ease-soft); }
.so-n.is-orphan { fill-opacity: .3; }
.so-n.is-chain { fill: var(--accent); fill-opacity: 1; }
.so[data-mode="links"] .so-e { stroke-opacity: .26; }
.so[data-mode="links"] .so-e.k1 { stroke: var(--accent); stroke-opacity: .5; }
.so[data-mode="orphans"] .so-e { stroke-opacity: .04; }
.so[data-mode="orphans"] .so-e.k2 { stroke-opacity: .25; }
.so[data-mode="orphans"] .so-n { fill-opacity: .14; }
.so[data-mode="orphans"] .so-n.is-orphan { fill: var(--accent); fill-opacity: 1; }
.so[data-mode="oversized"] .so-e { stroke-opacity: .05; }
.so[data-mode="oversized"] .so-e.k2 { stroke-opacity: .25; }
.so[data-mode="oversized"] .so-n { fill-opacity: .14; }
.so[data-mode="oversized"] .so-n.is-big { fill: var(--accent); fill-opacity: 1; }
/* Chains, the default view: only the chain skills and their handoffs are lit (and named on the map),
   every other dot and link steps back to 15 percent */
.so[data-mode="chains"] .so-n:not(.is-chain) { fill-opacity: .15; }
.so[data-mode="chains"] .so-e { stroke-opacity: .05; }
.so[data-mode="chains"] .so-e.k2 { stroke-opacity: .15; }
.so[data-mode="chains"] .so-e.k2.is-ch { stroke-opacity: 1; }
.so[data-mode] .so-e.is-hot { stroke: var(--accent); stroke-opacity: .9; }
.so[data-mode] .so-n.is-hot { fill: var(--ink); fill-opacity: 1; }
.so-ring { fill: none; stroke: var(--accent); stroke-width: 1.6; opacity: 0; transition: opacity var(--t-micro) var(--ease-soft); }
.so-ring.is-on { opacity: 1; }
.so-pulse { fill: var(--ink); opacity: 0; }
/* labels: only the selected chain is named, placed by the script so no two labels touch (a thin
   leader line when one has to move away from its dot); every other dot is named on hover */
.so-labs { position: absolute; inset: 0; pointer-events: none; }
.so-lab { position: absolute; left: 0; top: 0; font-family: var(--mono); font-size: 12px; line-height: 1; white-space: nowrap; color: var(--ink); padding: 3px 6px; border-radius: 4px; background: color-mix(in srgb, var(--bg-2) 86%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); opacity: 0; visibility: hidden; transition: opacity var(--t-ui) var(--ease-soft), visibility 0s linear var(--t-ui); }
.so-lab.is-on { opacity: 1; visibility: visible; transition: opacity var(--t-ui) var(--ease-soft), visibility 0s; }
.so-lead { stroke: var(--accent); stroke-opacity: .7; stroke-width: 1.4; opacity: 0; transition: opacity var(--t-ui) var(--ease-soft); }
.so-lead.is-on { opacity: 1; }
.so[data-mode="orphans"] .so-lab, .so[data-mode="oversized"] .so-lab, .so[data-mode="orphans"] .so-lead, .so[data-mode="oversized"] .so-lead { opacity: .25; }
/* both chains stay lit; the one picked below the map is the brighter of the two */
.so[data-mode="chains"] .so-svg.has-sel .so-n.is-chain:not(.is-sel) { fill-opacity: .62; }
.so[data-mode="chains"] .so-svg.has-sel .so-e.k2.is-ch:not(.is-sel) { stroke-opacity: .6; }
.so[data-mode="chains"] .so-lab.is-alt.is-on { opacity: .82; }
/* the plain count, beside the map */
.so-count { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; line-height: 1.3; color: var(--ink-dim); }
.so-count b { font-size: 22px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.so-field .so-count { position: absolute; left: 0; top: 0; z-index: 1; flex-direction: column; gap: 8px; pointer-events: none; }
.skills-section:not(.is-ready) .so-field .so-count { position: static; flex-direction: row; }
@container (max-width: 520px) {
  .so-modes button { min-height: 44px; }
  .so-lab, .so-lead { display: none; }
  .so-field .so-count { position: static; flex-direction: row; gap: 4px 16px; margin-bottom: 6px; }
  .so-count b { font-size: 19px; }
  /* on a phone the chains lead and the map supports them */
  .so-chainbox { order: -1; padding: 0 0 12px; border-top: 0; border-bottom: 1px solid var(--line); }
}
.so-tip { position: absolute; z-index: 2; left: 0; top: 0; pointer-events: none; min-width: 150px; max-width: 220px; padding: 9px 11px; border-radius: 8px; background: var(--bg); box-shadow: 0 0 0 1px var(--line), 0 10px 30px rgba(0, 0, 0, .4); font-size: 12px; line-height: 1.45; color: var(--ink-dim); opacity: 0; transition: opacity var(--t-micro) var(--ease-soft); }
.so-tip.is-on { opacity: 1; }
.so-tip b { display: block; font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--ink); }
.so-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--ink-dim); }
.so-field { position: relative; }
.so-field .so-legend { position: absolute; left: 0; bottom: 0; z-index: 1; flex-direction: column; gap: 4px; pointer-events: none; }
/* on a phone the legend sits under the map, not on top of its lower ring (this has to follow the rule above) */
@container (max-width: 520px) { .so-field .so-legend { position: static; flex-direction: row; margin-top: 10px; } }
.so-l { display: inline-flex; align-items: center; gap: 8px; }
.so-l::before { content: ""; width: 16px; height: 2px; border-radius: 2px; background: var(--ink-faint); }
.so-l--hand::before { height: 3px; background: var(--accent); }
.so-l--men::before { opacity: .55; }
.so-l--orph::before { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-faint); }
.so-chainbox { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.so-chains-k { font-size: 12px; line-height: 1.4; color: var(--ink-dim); }
.so-chains { display: grid; gap: 6px; }
.so-chains li, .so-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.so-chain { width: 100%; min-height: 44px; margin: 0; padding: 6px 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; text-align: left; cursor: pointer; transition: border-color var(--t-micro) var(--ease-soft), background-color var(--t-micro) var(--ease-soft); }
.so-chain:hover { border-color: var(--line); }
.so-chain[aria-pressed="true"] { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.so-chain[aria-pressed="true"] .so-pill { background: var(--accent-soft); }
.so-pill { padding: 4px 10px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, var(--line)); font-family: var(--mono); font-size: 12px; line-height: 1.4; color: var(--ink); }
.so-to { position: relative; width: 14px; height: 1px; background: var(--accent); }
.so-to::after { content: ""; position: absolute; right: 0; top: -3px; width: 6px; height: 6px; border-top: 1px solid var(--accent); border-right: 1px solid var(--accent); transform: rotate(45deg); }
.so-chains li.is-hot .so-pill { background: var(--accent-soft); }
/* assemble: nodes fly in from scattered spots, links draw after them */
.so.is-armed .so-n { opacity: 0; transform: translate(var(--sx), var(--sy)); }
.so.is-armed .so-e { stroke-dasharray: 1; stroke-dashoffset: 1; }
.so.is-armed.is-on .so-n { opacity: 1; transform: none; transition: transform 1100ms var(--ease-out) var(--dl), opacity 500ms var(--ease-soft) var(--dl), fill-opacity var(--t-ui) var(--ease-soft), fill var(--t-ui) var(--ease-soft); }
.so.is-armed.is-on .so-e { stroke-dashoffset: 0; transition: stroke-dashoffset 1000ms var(--ease-out) var(--dl), stroke-opacity var(--t-ui) var(--ease-soft), stroke var(--t-ui) var(--ease-soft); }

/* ---------- present-like-peter: the deck it built */
.pp { display: grid; gap: 14px; }
.pp-screen { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); isolation: isolate; }
.pp-screen img, .pp-screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; object-fit: cover; }
.pp-screen iframe { z-index: 1; background: var(--bg); opacity: 0; transition: opacity var(--t-ui) var(--ease-soft); }
.pp-screen iframe.is-shown { opacity: 1; }
.pp-screen::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px var(--line); }
.pp-play { position: absolute; z-index: 3; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: var(--r-pill); background: color-mix(in srgb, var(--bg) 72%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; transition: border-color var(--t-micro) var(--ease-soft); }
.pp-play:hover { border-color: var(--accent); }
/* the critic's real scores, round 1 and 2 quieter than the final round */
.pp-gate-k { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); }
.pp-gate-k span { font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink-dim); }
.pp-gate { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: -4px; }
.pp-gate li { display: grid; gap: 6px; justify-items: center; align-content: start; padding: 10px 4px 11px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line); text-align: center; }
.pp-axis { font-size: 12px; line-height: 1.25; color: var(--ink-dim); }
.pp-trail { display: inline-flex; align-items: baseline; gap: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pp-trail i { font-style: normal; font-size: 12px; color: var(--ink-dim); }
.pp-trail i::after { content: "\2192"; margin-left: 4px; font-size: 11px; color: var(--sk-faint); }
.pp-trail b { font-size: 19px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); }
/* what each round changed, then who the critic was */
.pp-rounds { display: grid; gap: 8px; }
.pp-rounds li { position: relative; padding-left: 18px; font-size: 13px; line-height: 1.5; color: var(--ink-dim); }
.pp-rounds li::before { content: ""; position: absolute; left: 1px; top: .55em; width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--accent); }
.pp-rounds li:last-child::before { background: var(--accent); }
.pp-rounds b { font-weight: 600; color: var(--ink); }
.pp-rounds span { color: var(--ink); }
.pp-critic { padding-top: 10px; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.5; color: var(--ink-dim); }
.pp-critic b { font-weight: 600; color: var(--ink); }
.pp-links { display: flex; flex-wrap: wrap; gap: 4px 28px; }
@container (max-width: 520px) { .pp-gate { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.skills-section.is-ready:not(.is-reduced) .pp-gate li { opacity: 0; transform: translateY(8px); transition: opacity 500ms var(--ease-soft) calc(300ms + var(--i, 0) * 70ms), transform 700ms var(--ease-out) calc(300ms + var(--i, 0) * 70ms); }
.skills-section.is-ready:not(.is-reduced) .pp.is-on .pp-gate li { opacity: 1; transform: none; }

/* ---------- video-like-peter: the clip, 17 styles, the vision demo */
.vp { display: grid; gap: 12px; }
.vp-top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); gap: 8px; align-items: center; }
.vp-screen { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.vp-poster, .vp-video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.vp-video { opacity: 0; transition: opacity var(--t-ui) var(--ease-soft); }
.vp-video.is-shown { opacity: 1; }
.vp-screen::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px var(--line); }
.vp-toggle { position: absolute; z-index: 2; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-pill); background: color-mix(in srgb, var(--bg) 72%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 12px; font-weight: 500; color: var(--ink); cursor: pointer; }
.vp-toggle:hover { border-color: var(--accent); }
.vp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.vp-grid a { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 5px; overflow: hidden; background: var(--bg); box-shadow: 0 0 0 1px var(--line); }
.vp-grid img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-ui) var(--ease-out); }
.vp-grid a:hover img, .vp-grid a:focus-visible img { transform: scale(1.08); }
.vp-grid a:hover, .vp-grid a:focus-visible, .vp-grid a.is-hot { box-shadow: 0 0 0 1px var(--accent); }
.vp-all a { display: grid; place-items: center; align-content: center; gap: 2px; text-decoration: none; color: var(--ink); font-size: 12px; font-weight: 600; background: var(--accent-soft); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 50%, var(--line)); }
.vp-all .sk-arrow { width: 13px; height: 13px; }
.vp-cap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 2px 16px; font-size: 12.5px; line-height: 1.45; color: var(--ink-dim); }
.vp-cap-t { flex: 1 1 260px; min-height: 2.9em; }
.vp-cap-t b { font-weight: 600; color: var(--ink); }
.vp-cap .sk-link { min-height: 36px; font-size: 13px; }
.vp-vision { display: grid; grid-template-columns: minmax(112px, 27%) minmax(0, 1fr); gap: 14px; align-items: center; padding: 8px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; color: inherit; transition: box-shadow var(--t-ui) var(--ease-soft); }
.vp-vision:hover, .vp-vision:focus-visible { box-shadow: inset 0 0 0 1px var(--accent); }
.vp-vision-img { display: block; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--bg); }
.vp-vision-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); }
.vp-vision:hover .vp-vision-img img { transform: scale(1.04); }
.vp-vision-t { display: grid; gap: 4px; min-width: 0; }
.vp-vision-t b { font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.vp-vision-t > span:not(.sk-link) { font-size: 12.5px; line-height: 1.45; color: var(--ink-dim); }
.vp-vision-t .sk-link { justify-self: start; min-height: 32px; font-size: 13px; }
.vp-vision:hover .sk-link { border-color: var(--accent); }
@container (max-width: 560px) {
  .vp-top { grid-template-columns: minmax(0, 1fr); }
  .vp-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .vp-toggle { right: 8px; bottom: 8px; width: 44px; min-height: 44px; padding: 0; justify-content: center; }
  .vp-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pp-play { left: 10px; bottom: 10px; min-height: 44px; padding: 0 14px; font-size: 12px; }
  .vp-cap .sk-link { min-height: 44px; }
}
/* phones: seven styles and the gallery tile, four across, every tile a 44 px target */
@container (max-width: 520px) {
  .vp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .vp-grid a { min-height: 44px; }
  .vp-grid li:nth-child(n + 8):not(.vp-all) { display: none; }
}
.skills-section.is-ready:not(.is-reduced) .vp-grid li { opacity: 0; transform: translateY(10px) scale(.94); transition: opacity 500ms var(--ease-soft) calc(200ms + var(--i) * 40ms), transform 800ms var(--ease-out) calc(200ms + var(--i) * 40ms); }
.skills-section.is-ready:not(.is-reduced) .vp.is-on .vp-grid li { opacity: 1; transform: none; }

/* ---------- first-principle-thinking: the assumption funnel */
.fp { display: grid; gap: 14px; }
.fp-funnel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.fp-funnel button { width: 100%; height: 100%; display: grid; grid-template-rows: auto auto 1fr; gap: 6px; padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: 10px; background: transparent; text-align: left; color: var(--ink-dim); cursor: pointer; transition: border-color var(--t-micro) var(--ease-soft); }
.fp-funnel button:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.fp-funnel button[aria-pressed="true"] { border-color: var(--accent); }
.fp-dots { display: grid; grid-template-columns: repeat(5, 7px); grid-auto-rows: 7px; gap: 4px; align-content: start; height: 29px; margin-bottom: 4px; }
.fp-dots i { border-radius: 50%; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 75%, transparent); transition: background-color var(--t-ui) var(--ease-soft); }
.fp-funnel button[aria-pressed="true"] .fp-dots i { background: var(--accent); box-shadow: none; }
.fp-funnel b { font-size: clamp(22px, 4.4cqi, 30px); font-weight: 600; letter-spacing: -.03em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.fp-funnel span:not(.fp-dots) { font-size: 12px; line-height: 1.35; }
.fp-short { display: none; }
.fp-view { min-width: 0; }
.fp-pane { min-width: 0; display: grid; gap: 10px; align-content: start; }
.fp-pane + .fp-pane { margin-top: 18px; }
.fp-pane-k { font-size: 12px; color: var(--ink-dim); }
/* every category is named in words and has its own glyph; the border style is only a third cue */
.fp-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--ink-dim); }
.fp-t { display: inline-flex; align-items: center; gap: 7px; }
.fp-t::before, .fp-a-tag::before { content: ""; flex: none; display: inline-block; width: 7px; height: 7px; box-sizing: border-box; }
.fp-t--physics::before, .fp-a--physics .fp-a-tag::before { border-radius: 50%; background: var(--accent); }
.fp-t--data::before, .fp-a--data .fp-a-tag::before { border-radius: 1px; background: var(--accent); }
.fp-t--convention::before, .fp-a--convention .fp-a-tag::before { border: 1px solid currentColor; transform: rotate(45deg) scale(.86); }
.fp-t--habit::before, .fp-a--habit .fp-a-tag::before { border: 1px solid currentColor; border-radius: 50%; }
.fp-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.fp-a { --fp-cut: #8d9096; display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: start; gap: 4px 6px; min-width: 0; padding: 8px 9px 10px; border-radius: 8px; border: 1px solid var(--ink-faint); transition: border-color var(--t-ui) var(--ease-soft), box-shadow var(--t-ui) var(--ease-soft); }
.fp-a--convention { border-style: dashed; }
.fp-a--habit { border-style: dotted; }
.fp-a--physics, .fp-a--data { border-color: var(--accent); }
.fp-a-id { font-size: 11px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.fp-a-st { justify-self: end; align-self: center; font-size: 12px; font-weight: 600; line-height: 1; color: var(--ink); visibility: hidden; }
.fp-a-tag { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 6px; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-dim); }
.fp-a-tag::before { margin-top: .32em; }
.fp-a-t { grid-column: 1 / -1; font-size: 12px; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }
.fp-cons li, .fp-hyp li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: start; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.5; color: var(--ink); }
.fp-id { font-size: 12px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; padding-top: 2px; }
.fp-hyp li { grid-template-columns: 32px minmax(0, 1fr) auto; }
.fp-h { display: grid; gap: 3px; min-width: 0; }
.fp-h b { font-size: 14px; font-weight: 600; }
.fp-h span { font-size: 13px; color: var(--ink-dim); }
.fp-h small { font-size: 12px; color: var(--ink-dim); }
.fp-first { align-self: start; padding: 4px 10px; border-radius: var(--r-pill); background: var(--accent); color: var(--bg); font-size: 12px; font-weight: 600; white-space: nowrap; }
@container (max-width: 560px) { .fp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .fp-funnel button { position: relative; padding: 9px 8px 10px; } .fp-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .fp-short { display: block; } .fp-hyp li { grid-template-columns: 32px minmax(0, 1fr); } .fp-first { grid-column: 2; justify-self: start; } }
@container (max-width: 520px) { .fp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fp-a { padding: 9px 10px 11px; } }
/* with the script: one stage of the funnel at a time */
.skills-section.is-ready .fp-view { display: grid; }
.skills-section.is-ready .fp-pane { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity 420ms var(--ease-soft), transform 700ms var(--ease-out), visibility 0s linear 420ms; }
.skills-section.is-ready .fp-pane + .fp-pane { margin-top: 0; }
.skills-section.is-ready .fp[data-step="1"] .fp-pane--a, .skills-section.is-ready .fp[data-step="2"] .fp-pane--a,
.skills-section.is-ready .fp[data-step="3"] .fp-pane--c, .skills-section.is-ready .fp[data-step="4"] .fp-pane--h { opacity: 1; visibility: visible; transform: none; transition: opacity 420ms var(--ease-soft) 120ms, transform 700ms var(--ease-out) 120ms, visibility 0s; }
/* released cards stay readable (#8d9096 on the stage is 5.8 to 1): the word and the strikethrough carry it */
.fp[data-step="2"] .fp-a-st { visibility: visible; }
.fp[data-step="2"] .fp-a.is-cut { border-color: color-mix(in srgb, var(--ink) 24%, transparent); }
.fp[data-step="2"] .fp-a.is-cut :is(.fp-a-id, .fp-a-st, .fp-a-tag, .fp-a-t) { color: var(--fp-cut); }
.fp[data-step="2"] .fp-a.is-cut .fp-a-t { text-decoration: line-through; text-decoration-color: var(--fp-cut); }
.fp[data-step="2"] .fp-a.is-kept { box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft); }
.fp[data-step="2"] .fp-a.is-kept .fp-a-st { color: var(--accent); }
.skills-section.is-ready:not(.is-reduced) .fp-cons li, .skills-section.is-ready:not(.is-reduced) .fp-hyp li { opacity: 0; transform: translateX(-8px); transition: opacity 400ms var(--ease-soft), transform 600ms var(--ease-out); }
.skills-section.is-ready:not(.is-reduced) .fp[data-step="3"] .fp-cons li, .skills-section.is-ready:not(.is-reduced) .fp[data-step="4"] .fp-hyp li { opacity: 1; transform: none; transition-delay: calc(180ms + var(--i) * 70ms); }

/* ---------- crazy-one: every idea, placed by impact and feasibility */
.co { display: grid; gap: 16px; }
.co-field { display: grid; gap: 14px; min-width: 0; }
.co-plot { position: relative; margin: 0 0 24px 24px; aspect-ratio: 1.2 / 1; }
.co-grid { position: absolute; inset: 0; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line); background-image: linear-gradient(to right, var(--line) 1px, transparent 1px), linear-gradient(to top, var(--line) 1px, transparent 1px); background-size: 20% calc(100% / var(--rows, 5)); background-position: -1px 0, 0 1px; opacity: .7; }
.co-ax { position: absolute; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-dim); white-space: nowrap; }
.co-ax--x { left: 0; right: 0; bottom: -22px; text-align: center; }
.co-ax--x::after, .co-ax--y::after { content: " \2192"; letter-spacing: 0; }
.co-ax--y { left: -22px; bottom: 0; top: 0; writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; }
.co-ideas { position: absolute; inset: 0; }
.co { --sp: 34px; }
.co-ideas li { position: absolute; left: calc((var(--f) - .5) * 20%); bottom: calc((var(--i) - .5) * 100% / var(--rows, 5)); transform: translate(calc(-50% + var(--ox) * var(--sp)), calc(50% + var(--oy) * var(--sp))); }
.co-key { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: -4px 0 0 24px; font-size: 12px; line-height: 1.5; color: var(--ink-dim); }
.co-key-k { margin-right: 2px; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-dim); }
.co-key b { margin-right: 4px; font-weight: 600; color: var(--ink); }
.co-idea { --s: calc(24px + var(--c, 3) * 2.5px); display: grid; place-items: center; width: var(--s); height: var(--s); padding: 0; border: 1px solid var(--ink-faint); border-radius: 50%; background: var(--bg-2); font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--ink); cursor: pointer; transition: transform var(--t-micro) var(--ease-soft), box-shadow var(--t-micro) var(--ease-soft), background-color var(--t-micro) var(--ease-soft); }
/* every dot answers to a 44 px area around it, however small it is drawn */
.co-idea { position: relative; }
.co-idea::before { content: ""; position: absolute; inset: -9px; border-radius: 50%; }
.co-idea:hover { transform: scale(1.12); border-color: var(--accent); }
.co-idea.is-bet { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.co-idea.is-merged { border-style: dashed; color: var(--ink-dim); }
.co-idea[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--bg-2), 0 0 0 5px var(--accent); }
/* the bets in words, under the plot: each row selects its dot */
.co-bets-box { display: grid; gap: 8px; }
.co-bets-k { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.co-bets-k span { font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink-dim); }
.co-bets { display: grid; gap: 4px; }
.co-bet { width: 100%; min-height: 44px; display: grid; grid-template-columns: 70px minmax(0, 1fr); align-items: baseline; gap: 2px 10px; margin: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: transparent; text-align: left; cursor: pointer; transition: border-color var(--t-micro) var(--ease-soft), background-color var(--t-micro) var(--ease-soft); }
.co-bet:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.co-bet[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.co-bet-k { font-size: 12px; font-weight: 500; color: var(--accent); white-space: nowrap; }
.co-bet b { font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.co-bet-s { grid-column: 2; font-size: 12px; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.co-killed { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 12px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); }
.co-killed-k { flex: 1 1 180px; font-size: 12px; line-height: 1.4; color: var(--ink-dim); }
.co-killed-k b { font-size: 16px; font-weight: 600; color: var(--ink); margin-right: 4px; }
.co-killed-list { display: flex; flex-wrap: wrap; gap: 6px; }
.co-idea.is-killed { --s: 30px; border-style: dashed; background: transparent; color: var(--ink-dim); text-decoration: line-through; }
.co-detail { align-self: start; display: grid; gap: 10px; padding: 16px 18px; border-radius: 12px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.co-d-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.co-d-id { font-size: 24px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); }
.co-d-op { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-dim); }
.co-d-status { margin-left: auto; padding: 4px 10px; border-radius: var(--r-pill); background: var(--accent-soft); font-size: 12px; font-weight: 600; color: var(--ink); }
.co-d-idea { font-size: 16px; font-weight: 500; line-height: 1.4; color: var(--ink); }
.co-d-scores { font-size: 12px; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.co-d-first { padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.5; color: var(--ink-dim); }
.co-d-first span { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.co-d-first:empty { display: none; }
@container (min-width: 620px) { .co { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; } }
.skills-section.is-ready:not(.is-reduced) .co-ideas li { opacity: 0; transform: translate(calc(-50% + var(--ox) * var(--sp) - 40px), calc(50% + var(--oy) * var(--sp))); transition: opacity 500ms var(--ease-soft) var(--dl), transform 900ms var(--ease-out) var(--dl); }
.skills-section.is-ready:not(.is-reduced) .co.is-on .co-ideas li { opacity: 1; transform: translate(calc(-50% + var(--ox) * var(--sp)), calc(50% + var(--oy) * var(--sp))); }
@container (max-width: 520px) { .co { --sp: 25px; } .co-idea { --s: calc(21px + var(--c, 3) * 1.6px); font-size: 11px; } .co-idea.is-killed { --s: 28px; } .co-key { margin-left: 22px; } }
/* the killed ideas are on the page from the start: the box is never empty */

/* ------------------------------------------------------------ coda */
.sk-coda { margin-top: clamp(120px, 18vh, 210px); display: grid; gap: 18px; }
.sk-coda-copy { display: grid; gap: 18px; }
.sk-coda-title { font-size: clamp(34px, 4.8vw, 76px); font-weight: 600; letter-spacing: -.04em; line-height: 1; max-width: 14ch; text-wrap: balance; }
.sk-coda-note { max-width: 32ch; font-size: 15px; line-height: 1.5; color: var(--ink-dim); }
/* the index: seven rows, one proof each, each row a way back into its chapter */
.sk-index { margin-top: clamp(22px, 4vh, 44px); border-bottom: 1px solid var(--line); }
.sk-index-row { display: grid; grid-template-columns: 44px minmax(0, 16rem) minmax(0, 1fr) 18px; align-items: baseline; column-gap: 20px; min-height: 56px; padding: 15px 0 13px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.sk-index-n { font-size: 12px; font-weight: 500; letter-spacing: .1em; color: var(--accent); font-variant-numeric: tabular-nums; }
.sk-index-name { font-size: clamp(17px, 1.35vw, 20px); font-weight: 600; letter-spacing: -.012em; line-height: 1.3; }
.sk-index-proof { font-size: 14px; line-height: 1.45; color: var(--ink-dim); }
.sk-index-proof b { font-size: clamp(17px, 1.35vw, 20px); font-weight: 600; letter-spacing: -.012em; color: var(--ink); font-variant-numeric: tabular-nums; }
.sk-index-row .sk-arrow { align-self: center; color: var(--ink-dim); transition: transform var(--t-ui) var(--ease-soft), color var(--t-ui) var(--ease-soft); }
.sk-index-row:hover .sk-index-name, .sk-index-row:focus-visible .sk-index-name { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; text-decoration-thickness: 1px; }
.sk-index-row:hover .sk-arrow, .sk-index-row:focus-visible .sk-arrow { color: var(--accent); transform: translateY(-2px); }
@media (min-width: 1100px) {
  .sk-coda { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(32px, 3.4vw, 64px); align-items: end; }
  .sk-coda-copy { grid-column: 1 / span 8; }
  .sk-coda-side { grid-column: 9 / span 4; padding-bottom: 6px; }
  .sk-index { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .sk-index-row { grid-template-columns: 30px minmax(0, 1fr) 18px; row-gap: 3px; padding: 13px 0 12px; }
  .sk-index-name { grid-column: 2; }
  .sk-index-proof { grid-column: 2; grid-row: 2; }
  .sk-index-row .sk-arrow { grid-column: 3; grid-row: 1 / span 2; }
}
.sk-word { margin-top: clamp(72px, 12vh, 140px); color: var(--ink); opacity: .08; white-space: nowrap; pointer-events: none; user-select: none; }
.sk-word .ch { display: inline-block; }
.skills-section.is-ready:not(.is-reduced) .sk-word .ch { transform: translateY(40%); opacity: 0; transition: transform var(--t-reveal) var(--ease-out), opacity var(--t-reveal) var(--ease-out); transition-delay: calc(var(--i) * 30ms); }
.skills-section.is-ready:not(.is-reduced) .sk-word.is-in .ch { transform: none; opacity: 1; }

/* ------------------------------------------------------------ one-shot reveals (only once the script marks the section) */
.skills-section.is-ready:not(.is-reduced) [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity var(--t-reveal) var(--ease-out), transform var(--t-reveal) var(--ease-out); }
.skills-section.is-ready:not(.is-reduced) [data-reveal].is-in { opacity: 1; transform: none; }
.skills-section.is-ready:not(.is-reduced) .sk-ch-head .sk-ch-num { clip-path: inset(100% 0 0 0); transition: clip-path 1100ms var(--ease-out) 120ms; }
.skills-section.is-ready:not(.is-reduced) .sk-ch-head.is-in .sk-ch-num { clip-path: inset(-10% 0 -10% 0); }

/* ------------------------------------------------------------ tablet and mobile */
@media (max-width: 1099px) {
  .sk-map-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 44px; }
}
@media (min-width: 821px) and (max-width: 1099px) {
  .sk-map-wires, .sk-map-loop { display: none; }
}
@media (max-width: 820px) {
  .skills-section { --sk-bar-h: 62px; }
  .sk-title { font-size: clamp(42px, 12vw, 64px); }
  /* the map becomes one chain read top to bottom: a spine through every dot, a return arrow from Think to Make */
  .sk-map-cols { grid-template-columns: minmax(0, 1fr); row-gap: 28px; padding-right: 46px; }
  .sk-map-fam, .sk-map-line { padding-left: 22px; }
  .sk-map-col ul { margin-top: 14px; gap: 14px; }
  .sk-map-item { grid-template-columns: 12px minmax(0, 1fr); column-gap: 10px; }
  .sk-map-n { display: none; }
  .sk-map-item b { grid-column: 2; font-size: 15px; }
  .sk-map-short { grid-column: 2; font-size: 12px; }
  .sk-map-loop { writing-mode: vertical-rl; transform: translate(-50%, -50%) rotate(180deg); }
  .sk-bar { flex-direction: column; gap: 0; }
  .sk-bar-now { width: auto; display: flex; align-items: center; gap: 10px; height: 26px; margin-top: 4px; }
  .sk-bar-name { font-size: 13px; }
  .sk-bar-list { gap: 4px; }
  .sk-bar-list li.is-fam-start:not(:first-child) { margin-left: 8px; }
  .sk-bar-list a { padding-bottom: 9px; justify-items: start; }
  .sk-bar-track { margin-top: 5px; }
  /* with the script: one 44 px row (where you are, and seven segments), opening a sheet of all seven */
  .skills-section.is-ready { --sk-bar-h: 44px; }
  .skills-section.is-ready .sk-bar { flex-direction: row; padding: 0; }
  .skills-section.is-ready .sk-bar-now { display: none; }
  .skills-section.is-ready .sk-bar-toggle { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; height: 100%; min-height: 44px; margin: 0; padding: 0 var(--gutter); border: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
  .sk-bar-tn { flex: none; font-size: 11px; font-weight: 500; letter-spacing: .1em; color: var(--accent); font-variant-numeric: tabular-nums; }
  .sk-bar-tt { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sk-bar-segs { flex: none; display: flex; gap: 3px; }
  .sk-bar-segs i { position: relative; width: 11px; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
  .sk-bar-segs i.is-fam-start:not(:first-child) { margin-left: 4px; }
  .sk-bar-segs i::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(var(--p, 0)); transform-origin: left; }
  .sk-bar-chev { flex: none; color: var(--ink-dim); transition: transform var(--t-ui) var(--ease-out); }
  .sk-bar.is-open .sk-bar-chev { transform: rotate(180deg); }
  .skills-section.is-ready .sk-bar-list { position: absolute; left: 0; right: 0; top: 100%; display: none; flex-direction: column; gap: 0; max-height: calc(100svh - var(--header-h) - var(--sk-bar-h) - 12px); overflow-y: auto; overscroll-behavior: contain; padding: 6px 0 10px; background: var(--bg-2); border-bottom: 1px solid var(--line); box-shadow: 0 24px 48px rgba(0, 0, 0, .5); }
  .skills-section.is-ready .sk-bar.is-open .sk-bar-list { display: flex; }
  .skills-section.is-ready .sk-bar-list li { flex: none; }
  .skills-section.is-ready .sk-bar-list li.is-fam-start:not(:first-child) { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid var(--line); }
  .skills-section.is-ready .sk-bar-list a { grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; align-content: center; column-gap: 10px; min-height: 44px; padding: 0 var(--gutter); color: var(--ink-dim); }
  .skills-section.is-ready .sk-bar-t { display: block; font-size: 15px; }
  .skills-section.is-ready .sk-bar-f { display: block; font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--sk-faint); }
  .skills-section.is-ready .sk-bar-list .sk-bar-track { display: none; }
  .skills-section.is-ready .sk-bar-list a[aria-current="true"] { color: var(--ink); background: var(--accent-soft); }
  .sk-ch-name { margin-top: 20px; }
  .sk-nums { gap: 20px 18px; }
  .bm-face { padding: 16px; }
  .bm-turn { margin-left: 0; }
  .bm-levels li { padding: 6px 6px 8px; }
  .bm-who { width: 22px; height: 22px; }
  .co-plot { margin: 0 0 24px 22px; }
}

/* ------------------------------------------------------------ reduced motion */
@media (prefers-reduced-motion: reduce) {
  .skills-section *, .skills-section *::before, .skills-section *::after { transition-duration: 0s !important; transition-delay: 0s !important; animation: none !important; }
}
.skills-section.is-reduced *, .skills-section.is-reduced *::before, .skills-section.is-reduced *::after { transition-duration: 0s !important; transition-delay: 0s !important; }
.skills-section.is-reduced .sk-stage { position: relative; top: auto; }

/* ============================================================ masterpiece pass (SPEC.md B.8, D, E.3) */

/* extract-me: each strength is a disclosure; its receipts open on a click, a tap or Enter */
.xm-sum { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-content: start; gap: 8px; padding: 10px 11px; cursor: pointer; list-style: none; border-radius: 10px; }
.xm-sum::-webkit-details-marker { display: none; }
.xm-sum::marker { content: ""; }
.xm-sum:hover .xm-s b { text-decoration: underline; text-decoration-color: var(--fam, var(--accent)); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.xm-s b::after { content: "+"; margin-left: 6px; font-weight: 500; color: var(--ink-dim); }
.xm-sd[open] .xm-s b::after { content: "\2212"; }
.xm-rcpt { display: block; padding: 0 11px 11px 41px; font-size: 12px; line-height: 1.45; color: var(--ink-dim); }
.xm-bars li:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* present-like-peter: one short line per round at rest; the full notes sit in "Why and how" */
.pp-rounds:not(.pp-rounds--full) { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.pp-rounds--full { margin-bottom: 14px; }

/* video-like-peter: the seven styles this page uses carry a small mark */
.vp-used { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--sk-make); box-shadow: 0 0 0 2px rgba(11, 13, 18, .7); }

/* style module hosts (fx/bricks, fx/chalk, fx/comic): empty until a module mounts, then the old proof,
   the fallback, is hidden */
.sk-ch.is-wide .sk-stage { position: relative; top: auto; }

/* the with and without strip: the last row of every stage. This plain line is its fallback. */
.sk-ab { margin-top: 20px; }
.sk-ab-fallback { padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.5; color: var(--ink-dim); }
.sk-ab-fallback b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.sk-ab-k { margin-right: 10px; font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-dim); }
.sk-ab.fx-ab { margin-top: 20px; }

/* the coda: title, the board, the install row */
.sk-coda { grid-template-columns: minmax(0, 1fr); }
.sk-coda > * { grid-column: 1 / -1; }
.sk-board { margin-top: clamp(22px, 4vh, 40px); }
.sk-board-cap { font-size: 15px; color: var(--ink-dim); max-width: 46ch; }
.sk-board-fallback ol { margin-top: 18px; border-bottom: 1px solid var(--line); }
.sk-board-fallback a { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 20px; padding: 13px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.sk-board-fallback a b { font-weight: 600; }
.sk-board-fallback a span { color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.sk-board-close { margin-top: 22px; max-width: 70ch; font-size: 15px; line-height: 1.55; color: var(--ink-dim); }
.sk-install { position: relative; margin-top: clamp(40px, 7vh, 72px); padding-top: 26px; border-top: 1px solid var(--line); display: grid; gap: 16px; justify-items: start; }
.sk-install .sk-coda-note { max-width: none; font-size: clamp(17px, 1.4vw, 20px); font-weight: 500; letter-spacing: -.01em; color: var(--ink); }
.sk-inst-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sk-install .inst-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--r-pill, 999px); font-size: 14px; font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer; font-family: inherit;
  transition: background-color var(--t-micro) var(--ease-soft), border-color var(--t-micro) var(--ease-soft), box-shadow var(--t-ui) var(--ease-soft); }
.sk-install .inst-btn[hidden] { display: none; }
.sk-install .inst-logo, .sk-install .inst-ico { flex: none; width: 16px; height: 16px; display: block; }
.sk-install .inst-claude { background: #D97757; border-color: #D97757; color: #fff; }
.sk-install .inst-claude:hover { background: #E08766; border-color: #E08766; box-shadow: 0 0 0 5px rgba(217, 119, 87, .3); }
.sk-install .inst-gpt { background: #000; border-color: rgba(255, 255, 255, .24); color: #fff; }
.sk-install .inst-gpt:hover { background: #161616; border-color: rgba(255, 255, 255, .5); box-shadow: 0 0 0 5px rgba(255, 255, 255, .1); }
.sk-install .inst-copy { background: var(--card, rgba(255, 255, 255, .04)); border-color: rgba(242, 244, 247, .34); color: var(--ink); }
.sk-install .inst-copy:hover { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.sk-install .inst-copy .inst-ico-done { display: none; }
.sk-install .inst-copy.is-copied { border-color: var(--accent); }
.sk-install .inst-copy.is-copied .inst-ico-copy { display: none; }
.sk-install .inst-copy.is-copied .inst-ico-done { display: block; color: var(--accent); }
.sk-inst-pop { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 4; max-width: 560px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-2); box-shadow: 0 18px 50px rgba(0, 0, 0, .5); }
.sk-inst-pop[hidden] { display: none; }
.sk-inst-pop-k { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-dim); }
.sk-inst-text { display: block; width: 100%; margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); color: var(--ink); font: 13px/1.5 var(--mono); resize: vertical; }
.sk-inst-close { margin-top: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-pill, 999px); background: transparent; color: var(--ink); cursor: pointer; }
.sk-repo { font-size: 13px; color: var(--ink-dim); }
@media (max-width: 520px) {
  .sk-inst-row { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; }
  .sk-install .inst-btn { width: 100%; }
}
/* once a style module is ready, it takes the stage's whole width */
.co:has(> .co-page.fx-is-ready) { grid-template-columns: minmax(0, 1fr); }
.co > .co-page { grid-column: 1 / -1; }
