/* Catalyst8: one colour per skill, shared by the site (site.css) and the step player (player.css).
   Each page sets <html data-skill="1".."8"> (the hub uses "hub"). --c main · --c-t tint · --c-d darker (button step). */
/* one colour per skill (light) */
[data-skill="hub"] { --c: #E8407A; --c-t: #FCE4EE; --c-d: #B32A5C; }
[data-skill="1"] { --c: #6547BD; --c-t: #EEE8FB; --c-d: #47308F; }   /* Observation: violet */
[data-skill="2"] { --c: #0E7C78; --c-t: #DDF2F0; --c-d: #0A5B58; }   /* Comparing: teal */
[data-skill="3"] { --c: #2E7A4E; --c-t: #E1F2E7; --c-d: #1F5A38; }   /* Specimen drawing: leaf green */
[data-skill="4"] { --c: #1F6C9E; --c-t: #E0EEF8; --c-d: #154E74; }   /* Measuring: blue */
[data-skill="5"] { --c: #B26A00; --c-t: #FDF0CC; --c-d: #855000; }   /* Calculating: amber */
[data-skill="6"] { --c: #C2402F; --c-t: #FCE4E0; --c-d: #932E21; }   /* Variables: coral red */
[data-skill="7"] { --c: #B3306A; --c-t: #FBE3EC; --c-d: #86224F; }   /* Communicating: rose */
[data-skill="8"] { --c: #3D4A9E; --c-t: #E5E8F8; --c-d: #2B3576; }   /* Graphs: indigo */

/* dark: lighter skill colours */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  &[data-skill="hub"] { --c: #F27CA8; --c-t: rgba(242,124,168,.15); --c-d: #F27CA8; }
  &[data-skill="1"] { --c: #B9A4F6; --c-t: rgba(185,164,246,.14); --c-d: #B9A4F6; }
  &[data-skill="2"] { --c: #6FD6CE; --c-t: rgba(111,214,206,.14); --c-d: #6FD6CE; }
  &[data-skill="3"] { --c: #72D19A; --c-t: rgba(114,209,154,.14); --c-d: #72D19A; }
  &[data-skill="4"] { --c: #82C3EC; --c-t: rgba(130,195,236,.14); --c-d: #82C3EC; }
  &[data-skill="5"] { --c: #F5C84B; --c-t: rgba(245,200,75,.13); --c-d: #F5C84B; }
  &[data-skill="6"] { --c: #F68D80; --c-t: rgba(246,141,128,.14); --c-d: #F68D80; }
  &[data-skill="7"] { --c: #F27CA8; --c-t: rgba(242,124,168,.14); --c-d: #F27CA8; }
  &[data-skill="8"] { --c: #A3AEF5; --c-t: rgba(163,174,245,.14); --c-d: #A3AEF5; }
} }
:root[data-theme="dark"] {
  &[data-skill="hub"] { --c: #F27CA8; --c-t: rgba(242,124,168,.15); --c-d: #F27CA8; }
  &[data-skill="1"] { --c: #B9A4F6; --c-t: rgba(185,164,246,.14); --c-d: #B9A4F6; }
  &[data-skill="2"] { --c: #6FD6CE; --c-t: rgba(111,214,206,.14); --c-d: #6FD6CE; }
  &[data-skill="3"] { --c: #72D19A; --c-t: rgba(114,209,154,.14); --c-d: #72D19A; }
  &[data-skill="4"] { --c: #82C3EC; --c-t: rgba(130,195,236,.14); --c-d: #82C3EC; }
  &[data-skill="5"] { --c: #F5C84B; --c-t: rgba(245,200,75,.13); --c-d: #F5C84B; }
  &[data-skill="6"] { --c: #F68D80; --c-t: rgba(246,141,128,.14); --c-d: #F68D80; }
  &[data-skill="7"] { --c: #F27CA8; --c-t: rgba(242,124,168,.14); --c-d: #F27CA8; }
  &[data-skill="8"] { --c: #A3AEF5; --c-t: rgba(163,174,245,.14); --c-d: #A3AEF5; }
}


/* worksheet levels: the same colours as the Catalyst8 worksheets (_build/c8style.py LEVELS) */
.tier-f { --t: #C0392B; --t-d: #A93226; --t-t: #FDEDEC; }   /* Foundation: red */
.tier-c { --t: #D68910; --t-d: #B9770C; --t-t: #FDF3E3; }   /* Core: amber */
.tier-e { --t: #27865B; --t-d: #1E6B49; --t-t: #E8F5EE; }   /* Extension: green */
/* Catalyst8 loading animation: the flask with its liquid rippling and bubbles rising inside, and "Loading…".
   Used by every page (site.css) and by the step players (player.css). The element is made by site.ts / player.ts.
   It fades in only after .3 s, so quick page changes never flash it; it fades out at once. */
.c8-loading { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; pointer-events: none; opacity: 0;
  background: color-mix(in srgb, var(--paper, #F7F6FB) 72%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: opacity .2s ease 0s; }
.c8-loading.on { opacity: 1; pointer-events: auto; transition: opacity .3s ease .3s; }
.c8-loading .ld-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 30px 18px; border-radius: 26px;
  background: var(--surface, #fff); border: 1px solid var(--line, #E2E0EC); box-shadow: 0 30px 54px -26px rgba(40, 30, 80, .5); }
.c8-loading svg { width: 84px; height: 84px; overflow: visible; }
.c8-loading .ld-txt { font: 800 18px "Baloo 2", "Arial Rounded MT Bold", "Segoe UI", sans-serif; letter-spacing: .04em; color: var(--ink, #1E1B2E); }
.c8-loading .ld-txt::after { content: ""; display: inline-block; width: 1.2em; text-align: left; animation: ld-dots 1.2s steps(4) infinite; }
.c8-loading .ld-wave { animation: ld-wave 1.4s linear infinite; }
.c8-loading .ld-fill { animation: ld-fill 2.8s ease-in-out infinite alternate; }
.c8-loading .ld-b { transform-box: fill-box; transform-origin: center; animation: ld-rise 1.6s ease-in infinite; opacity: 0; }
.c8-loading .ld-b:nth-of-type(2) { animation-delay: .55s; }
.c8-loading .ld-b:nth-of-type(3) { animation-delay: 1.1s; }
.c8-loading .ld-spark { transform-box: fill-box; transform-origin: center; animation: ld-spark 1.6s ease-in-out infinite; }
@keyframes ld-wave { to { transform: translateX(-16px); } }
@keyframes ld-fill { from { transform: translateY(2px); } to { transform: translateY(-3px); } }
@keyframes ld-rise { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(-24px) scale(1.1); opacity: 0; } }
@keyframes ld-spark { 0%, 100% { transform: scale(.7) rotate(0); opacity: .6; } 50% { transform: scale(1.15) rotate(45deg); opacity: 1; } }
@keyframes ld-dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
@media (prefers-reduced-motion: reduce) { .c8-loading * { animation: none !important; } .c8-loading .ld-b { opacity: .8; } }
/* Catalyst8 skill-videos site: shared styles. Each page sets <html data-skill="1..8"> (the hub uses data-skill="hub");
   the skill's colour drives buttons, badges, chips, rising bubbles and the header stripe.
   Type: Baloo 2 (display, rounded, from exam.smlk.cc) + Atkinson Hyperlegible Next (body, from blossoms.ilmu.st). */
:root {
  color-scheme: light;
  --paper: #F7F6FB; --paper-2: #EEEDF6; --surface: #FFFFFF; --ink: #1E1B2E; --ink-2: #4C4762; --ink-3: #7A7590;
  --line: #E2E0EC; --dot: rgba(30,27,46,.07);
  --spark-a: #FF8A3D; --spark-b: #E8407A;             /* the Catalyst8 mark: a reaction gradient, same on every page */
  --display: "Baloo 2", "Arial Rounded MT Bold", "Segoe UI Black", sans-serif;
  --body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --gut: clamp(16px, 4vw, 40px); --max: 1100px; --ease: cubic-bezier(.2,.75,.2,1);
  --shadow: 0 1px 0 rgba(30,27,46,.04), 0 18px 40px -28px rgba(40,30,80,.45);
  --shadow-up: 0 1px 0 rgba(30,27,46,.04), 0 30px 54px -26px rgba(40,30,80,.5);
  --on-c: #FFFFFF;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  color-scheme: dark; --paper: #15131F; --paper-2: #1E1B2B; --surface: #232033; --ink: #F3F1FA; --ink-2: #CFCAE0; --ink-3: #A29CB8;
  --line: #36324A; --dot: rgba(255,255,255,.06); --on-c: #15131F;
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 18px 40px -26px rgba(0,0,0,.85); --shadow-up: 0 1px 0 rgba(0,0,0,.3), 0 30px 54px -24px rgba(0,0,0,.9);
} }
:root[data-theme="dark"] {
  color-scheme: dark; --paper: #15131F; --paper-2: #1E1B2B; --surface: #232033; --ink: #F3F1FA; --ink-2: #CFCAE0; --ink-3: #A29CB8;
  --line: #36324A; --dot: rgba(255,255,255,.06); --on-c: #15131F;
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 18px 40px -26px rgba(0,0,0,.85); --shadow-up: 0 1px 0 rgba(0,0,0,.3), 0 30px 54px -24px rgba(0,0,0,.9);
}
* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; }   /* nothing may push the page sideways (iOS ignores overflow-x: hidden on body) */
body {
  font-family: var(--body); color: var(--ink); background: var(--paper); min-height: 100vh;
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.4px),
    radial-gradient(55% 45% at 8% 0%, color-mix(in srgb, var(--c) 14%, transparent), transparent 70%),
    radial-gradient(45% 40% at 96% 12%, color-mix(in srgb, var(--spark-a) 10%, transparent), transparent 70%);
  background-size: 22px 22px, 100% 100%, 100% 100%;
}
/* rising soap bubbles (a nod to effervescence): a layer behind the content and a few in front of everything.
   Each bubble = span.bubble (rises and wobbles) > i (the soap film) + ::before / ::after (the light reflections).
   The film is a rainbow (thin-film colours) masked to a ring that is strongest at the rim and almost clear in the
   middle; its angle --h turns as the bubble rises, so the colours swirl like a real bubble moving through light. */
@property --h { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.bubbles { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bubbles.front { z-index: 40; }                      /* above the header, cards and text; taps go straight through */
.bubble { position: absolute; bottom: -90px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%;
  animation: rise var(--dur) linear var(--delay) infinite; }
.bubble i { position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from var(--h), #ff7ac6, #ffd27a, #8affc1, #7ad6ff, #b88aff, #ff7ac6);
  -webkit-mask: radial-gradient(circle at 50% 50%, rgba(0,0,0,.10) 46%, rgba(0,0,0,.55) 64%, #000 71%, rgba(0,0,0,.85) 100%);
          mask: radial-gradient(circle at 50% 50%, rgba(0,0,0,.10) 46%, rgba(0,0,0,.55) 64%, #000 71%, rgba(0,0,0,.85) 100%);
  animation: film calc(var(--dur) / 3) linear var(--delay) infinite, wobble 2.6s ease-in-out infinite alternate; opacity: .55; }
.bubble::before { content: ""; position: absolute; left: 20%; top: 14%; width: 34%; height: 22%; border-radius: 50%; z-index: 1;
  background: radial-gradient(closest-side, rgba(255,255,255,.95), rgba(255,255,255,0)); transform: rotate(-32deg); }
.bubble::after { content: ""; position: absolute; right: 22%; bottom: 18%; width: 12%; height: 12%; border-radius: 50%; z-index: 1;
  background: radial-gradient(closest-side, rgba(255,255,255,.75), rgba(255,255,255,0)); }
/* in front: bigger and clearer (not blurred), so they read as nearer than the page */
.bubbles.front .bubble i { opacity: .9; }
.bubbles.front .bubble { filter: drop-shadow(0 6px 14px rgba(40, 30, 80, .12)); }
:root[data-theme="dark"] .bubble i { mix-blend-mode: screen; opacity: .7; }
:root[data-theme="dark"] .bubbles.front .bubble i { opacity: 1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bubble i { mix-blend-mode: screen; opacity: .7; }
  :root:not([data-theme="light"]) .bubbles.front .bubble i { opacity: 1; } }
@keyframes film { to { --h: 360deg; } }
/* skill pages (skillN.html and its worksheets): the bubbles take the skill's colour, with just a hint of iridescence
   (the film swirls between the skill colour and slight shifts towards gold, blue and white) */
:root[data-skill]:not([data-skill="hub"]) .bubble i {
  background: conic-gradient(from var(--h), var(--c), color-mix(in srgb, var(--c) 72%, #ffd27a), var(--c),
    color-mix(in srgb, var(--c) 72%, #7ad6ff), color-mix(in srgb, var(--c) 60%, #ffffff), var(--c)); }
@keyframes wobble { from { transform: scale(1, .96) rotate(-4deg); } to { transform: scale(.96, 1) rotate(4deg); } }
@keyframes rise { 0% { transform: translate(0, 0); opacity: 0; } 8% { opacity: 1; }
  50% { transform: translate(var(--dx), -55vh); } 92% { opacity: 1; } 100% { transform: translate(0, -112vh); opacity: 0; } }

header.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px var(--gut); background: color-mix(in srgb, var(--paper) 84%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); }
header.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 30%, transparent)); }
.logo { display: flex; flex: none; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo .word { white-space: nowrap; }
.logo svg.mark { width: 44px; height: 44px; flex: none; }
.logo .word { font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1; letter-spacing: -.01em; display: block; }
/* the boxed 8, as in catalyst8-logo.svg (_build/make_logo.py): the 8 is a normal letter of the word (same size and
   baseline, so it lines up with the capital C) and only the box behind it tilts. In Baloo 2 at line-height 1 the 8 runs
   from .152em to .795em; the box adds .11em above and below and .145em at the sides (logo A: flat, tilted 8deg). */
.logo .eight { position: relative; display: inline-block; line-height: 1; margin-left: .26em; margin-right: .12em; color: #fff; z-index: 0; }
.logo .eight::before { content: ""; position: absolute; z-index: -1; left: -.145em; right: -.145em; top: .042em; height: .863em;
  border-radius: .233em; transform: rotate(-8deg); background: linear-gradient(135deg, var(--spark-a), var(--spark-b)); }
.logo small { display: block; font: 700 11px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--c); margin-top: 3px; }
/* top navigation: Skills · About · Resources (the current page is a filled pill in the skill colour) */
.nav { display: flex; gap: 4px; margin-left: auto; margin-right: 6px; padding: 4px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); }
.nav a { padding: 8px 16px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font: 700 15px var(--body); transition: background .2s var(--ease), color .2s var(--ease); }
@media (hover: hover) { .nav a:hover { color: var(--c); } }
.nav a[aria-current="page"] { background: var(--c); color: var(--on-c); box-shadow: 0 2px 0 var(--c-d); }
.nav a:not([href]), .logo:not([href]) { cursor: default; }   /* the page you are on (site.ts) */
.nav a:focus-visible { outline: 3px solid var(--c); outline-offset: 2px; }
/* phones: the flask mark alone, so the logo, the three links and the theme button always fit on one row */
@media (max-width: 640px) { header.top { gap: 8px; } .logo .word { display: none; } .logo svg.mark { width: 40px; height: 40px; }
  .nav { margin-left: auto; margin-right: 0; min-width: 0; } .nav a { padding: 7px 11px; font-size: 14px; } }
@media (max-width: 360px) { .nav a { padding: 6px 8px; font-size: 13px; } .iconbtn { width: 40px; height: 40px; } }
.iconbtn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); }
.iconbtn svg { width: 20px; height: 20px; }
main { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; padding: clamp(28px, 6vw, 60px) var(--gut) 80px; }
/* back button: a pill in the skill colour that fills in on hover (same look as the player's back button, player.css) */
.crumb { display: flex; width: max-content; align-items: center; gap: 6px; min-height: 44px; padding: 0 18px 0 12px; margin-bottom: 20px;
  border-radius: 999px; border: 2px solid color-mix(in srgb, var(--c) 40%, transparent); background: var(--c-t); color: var(--c);
  text-decoration: none; font: 700 16px var(--body); box-shadow: 0 3px 0 color-mix(in srgb, var(--c) 30%, transparent);
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease); animation: rise-in .5s var(--ease) both; }
.crumb svg { transition: transform .2s var(--ease); }
@media (hover: hover) { .crumb:hover { background: var(--c); color: var(--on-c); border-color: var(--c); } }
@media (hover: hover) { .crumb:hover svg { transform: translateX(-3px); } }
.crumb:active { transform: translateY(2px); box-shadow: 0 1px 0 color-mix(in srgb, var(--c) 30%, transparent); }
.crumb:focus-visible { outline: 3px solid var(--c); outline-offset: 3px; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .14em; font-size: 13px; color: var(--c);
  text-transform: uppercase; margin: 0 0 10px; animation: rise-in .6s var(--ease) both; }
.kicker .dotc { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
h1 { font-family: var(--display); font-weight: 800; font-size: clamp(40px, 7.4vw, 72px); line-height: 1; margin: 0 0 14px; letter-spacing: -.015em;
  animation: rise-in .7s var(--ease) .05s both; }
h1 em { font-style: normal; color: var(--c); background: linear-gradient(var(--c-t), var(--c-t)) no-repeat 0 90% / 100% .36em; animation: swipe 1s var(--ease) .45s both; }
.lede { font-size: clamp(17px, 2.2vw, 20px); color: var(--ink-2); max-width: 48ch; margin: 0 0 22px; line-height: 1.5; animation: rise-in .7s var(--ease) .12s both; }
.note { display: flex; gap: 12px; align-items: flex-start; max-width: 640px; padding: 14px 16px; border-radius: 18px; background: var(--c-t);
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); font-size: 16px; line-height: 1.45; animation: rise-in .7s var(--ease) .2s both; }
.note svg { flex: none; width: 22px; height: 22px; color: var(--c); margin-top: 1px; }
@keyframes rise-in { 0% { opacity: 0; translate: 0 16px; } }
@keyframes swipe { 0% { background-size: 0% .36em; } }
@keyframes slipIn { 0% { opacity: 0; transform: translateY(18px) rotate(var(--rot, 0deg)); } }
@keyframes stkIn { 0% { transform: rotate(8deg) scale(.2); opacity: 0; } }

/* hub: skill tiles. Only ever eight skills, so big tiles: 4 across (two rows) on wider screens, 2 across on a phone */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(10px, 2vw, 20px); margin-top: 30px; list-style: none; padding: 0; }
@media (min-width: 860px) { .skills { grid-template-columns: repeat(4, 1fr); } }
.skill { animation: slipIn .6s var(--ease) both; animation-delay: calc(.15s + var(--i) * .06s); }
.skill a, .skill .soon { display: flex; flex-direction: column; gap: 12px; height: 100%; min-height: clamp(190px, 22vw, 260px); padding: clamp(14px, 2.2vw, 24px); border-radius: 24px; text-decoration: none;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.skill a::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--c); }
@media (hover: hover) { .skill a:hover { transform: translateY(-4px) rotate(-.5deg); box-shadow: var(--shadow-up); } }
.skill .ic { width: clamp(46px, 6vw, 72px); height: clamp(46px, 6vw, 72px); border-radius: 22px; display: grid; place-items: center; background: var(--c-t); color: var(--c); }
.skill .ic svg { width: 52%; height: 52%; }
.skill .num { font: 700 clamp(12px, 1.2vw, 14px) var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--c); }
/* the name scales with the tile so the longest one ('Communicating') stays on one line; two-word names wrap between words */
.skill a, .skill .soon { container-type: inline-size; }
.skill .name { font-family: var(--display); font-weight: 800; font-size: clamp(17px, 13.2cqi, 32px); line-height: 1.05; }
@media (max-width: 480px) { .skill a, .skill .soon { gap: 8px; } .skill .ic { border-radius: 14px; } }
.skill .meta { font-size: 15px; color: var(--ink-3); margin-top: auto; }
.skill .soon { opacity: .62; box-shadow: none; border-style: dashed; }
.skill .soon .ic { filter: grayscale(.4); }

/* skill page: video cards */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: clamp(18px, 3vw, 28px); margin-top: 32px; }
.card { --rot: -.5deg; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 28px;
  box-shadow: var(--shadow); overflow: hidden; animation: slipIn .7s var(--ease) both; animation-delay: var(--d, .25s);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.card + .card { --rot: .5deg; --d: .38s; }
@media (hover: hover) { .card:hover { transform: translateY(-4px) rotate(var(--rot)); box-shadow: var(--shadow-up); } }
.thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--paper-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge { position: absolute; bottom: 12px; left: 14px; padding: 6px 14px 5px; border-radius: 999px; font: 800 15px var(--display); letter-spacing: .05em;
  text-transform: uppercase; background: var(--c); color: var(--on-c); box-shadow: 0 3px 0 var(--c-d); transform: rotate(-4deg);
  animation: stkIn .5s var(--ease) both; animation-delay: calc(var(--d, .25s) + .35s); }
/* level badges follow the worksheet colours (skills.css .tier-f / .tier-c / .tier-e) */
.badge[class*="tier-"] { background: var(--t); color: #fff; box-shadow: 0 3px 0 var(--t-d); }
.card[class*="tier-"] { border-top: 6px solid var(--t); }
.dur { position: absolute; right: 12px; bottom: 12px; padding: 4px 10px; border-radius: 10px; font-size: 14px; font-weight: 700; background: rgba(20,16,30,.72); color: #fff; }
.body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.body h2 { font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1.05; margin: 0 0 6px; }
.body p { margin: 0 0 14px; color: var(--ink-2); line-height: 1.5; font-size: 17px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.chips li { padding: 5px 12px; border-radius: 999px; background: var(--c-t); color: var(--c); font-weight: 700; font-size: 14px; }
.actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: auto; }   /* always side by side: no stacked buttons to mis-tap */
.actions .btn { justify-content: center; padding: 0 12px; white-space: nowrap; }
.btn svg.play { color: #E0262B; }                      /* the red play triangle */
.btn.soon svg.play { color: var(--ink-3); }
@media (max-width: 460px) { .actions { gap: 8px; } .actions .btn { font-size: 15px; gap: 5px; padding: 0 6px; } .actions .btn svg { width: 17px; height: 17px; } }
@media (max-width: 340px) { .actions .btn { font-size: 14px; } }
.btn { display: inline-flex; align-items: center; gap: 9px; min-height: 48px; padding: 0 20px; border-radius: 999px; font: 700 17px var(--body);
  text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: transform .2s var(--ease); }
.btn svg { width: 20px; height: 20px; }
.btn.primary { background: var(--c); color: var(--on-c); box-shadow: 0 4px 0 var(--c-d); }
.btn.primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--c-d); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
@media (hover: hover) { .btn.ghost:hover { border-color: var(--c); color: var(--c); } }
.btn.soon, .btn.soon:hover { color: var(--ink-3); border-style: dashed; border-color: var(--line); cursor: default; }
.btn:focus-visible, .iconbtn:focus-visible, .skill a:focus-visible { outline: 3px solid var(--c); outline-offset: 3px; }
dialog { border: 0; padding: 0; width: min(1100px, 96vw); border-radius: 22px; background: #000; box-shadow: var(--shadow-up); }
dialog::backdrop { background: rgba(15,12,24,.72); backdrop-filter: blur(4px); }
dialog video { display: block; width: 100%; height: auto; }
dialog .close { position: absolute; top: 10px; right: 10px; z-index: 2; }
footer { position: relative; z-index: 1; text-align: center; color: var(--ink-3); font-size: 14px; padding: 0 var(--gut) 40px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .bubbles { display: none; } }

/* scroll motion (site.ts adds .rv + a kind, and .in while the block is on screen; data-out = the side it left by) */
@media (prefers-reduced-motion: no-preference) {
  .rv { transition: opacity .5s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
  .rv.pop { transition-timing-function: var(--ease), cubic-bezier(.34, 1.56, .64, 1); }      /* a little overshoot */
  .rv:not(.in) { opacity: 0; transition-delay: 0s; }
  .rv.up:not(.in) { transform: translateY(32px); }
  .rv.up[data-out="above"]:not(.in) { transform: translateY(-32px); }
  .rv.left:not(.in) { transform: translateX(-48px); }
  .rv.right:not(.in) { transform: translateX(48px); }
  .rv.pop:not(.in) { transform: scale(.82); }
  .rv.fade { transition-duration: .7s; }
  .rv.fade:not(.in) { transform: translateY(10px); }
}
@media print { .rv { opacity: 1 !important; transform: none !important; } }

/* step by step in a full-page layer (site.ts openSteps) */
html.steps-open, html.steps-open body { overflow: hidden; overscroll-behavior: none; }
.steps-layer { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: var(--paper); overscroll-behavior: contain; }
.steps-bar { flex: none; display: flex; align-items: center; gap: 8px; height: 46px; padding: env(safe-area-inset-top) 6px 0 16px;
  box-sizing: content-box; background: var(--c); color: var(--on-c); }
.steps-bar .t { flex: 1; min-width: 0; font: 800 15px var(--display); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steps-bar button { flex: none; display: flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border: 0; border-radius: 10px;
  background: color-mix(in srgb, #fff 16%, transparent); color: inherit; font: 700 14px var(--body); cursor: pointer; }
.steps-bar button svg { width: 18px; height: 18px; }
@media (hover: hover) { .steps-bar button:hover { background: color-mix(in srgb, #fff 28%, transparent); } }
.steps-bar button:focus-visible { outline: 3px solid #fff; outline-offset: 1px; }
@media (max-width: 420px) { .steps-bar .fs span { display: none; } }
@media (max-height: 420px) { .steps-bar { height: 38px; } .steps-bar button { min-height: 32px; } }   /* phone on its side */
.steps-layer iframe { flex: 1 1 auto; width: 100%; min-height: 0; border: 0; display: block; background: var(--paper); }

