/* Mason Kleinsorge resume site
   Concept: the page is a design-editor canvas. Sheets are artboards, magenta is
   reserved for snap guides, blue for selection, yellow for highlights. */

@property --i { syntax: '<number>'; inherits: false; initial-value: 0; }

:root {
  --board: #E7EAF0;
  --paper: #FFFFFF;
  --ink: #17173A;
  --ink-2: #5B6080;
  --line: #CDD2DE;
  --line-2: #E4E7EE;
  --guide: #FF2E88;
  --select: #2B66F6;
  --proof: #FFD12E;
  --pass: #1E7B5C;
  --deny: #C8323F;

  --display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --code: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --ruler: 0px;
  --pad: clamp(18px, 4vw, 56px);
  --snap: cubic-bezier(.2, .9, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.4l2.4 2.4 4.6-5.2' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

html { background: var(--board); }

body {
  position: relative;
  margin: 0;
  padding: var(--ruler) 0 0 var(--ruler);
  color: var(--ink);
  font: 400 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}

main { overflow-x: hidden; overflow-x: clip; } /* hidden is the fallback for Safari before 16 */

h1, h2, h3, h4, h5 { text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
code, pre { font-family: var(--code); }

:focus-visible { outline: 2px solid var(--select); outline-offset: 3px; }

.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ───────────── Rulers ───────────── */

.ruler, .ruler-corner { display: none; }

@media (min-width: 900px) and (pointer: fine) {
  :root { --ruler: 22px; }

  .ruler, .ruler-corner {
    display: block;
    position: fixed;
    z-index: 50;
    background-color: #F6F7FA;
    color: var(--ink-2);
    font: 500 10px/1 var(--body);
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    pointer-events: none;
  }
  .ruler-corner { top: 0; left: 0; width: var(--ruler); height: var(--ruler); z-index: 51; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }

  .ruler-x {
    top: 0; left: 0; right: 0; height: var(--ruler);
    border-bottom: 1px solid var(--line);
    background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 100px 100%, 10px 5px;
    background-position: var(--ruler) 0, var(--ruler) 100%;
    background-repeat: repeat-x;
  }
  .ruler-y {
    top: 0; left: 0; bottom: 0; width: var(--ruler);
    border-right: 1px solid var(--line);
    background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(var(--line) 1px, transparent 1px);
    background-size: 100% 100px, 5px 10px;
    background-position: 0 calc(var(--ruler) - var(--sy, 0px)), 100% calc(var(--ruler) - var(--sy, 0px));
    background-repeat: repeat-y;
  }
  .ruler span { position: absolute; }
  .ruler-x span { top: 3px; }
  .ruler-y span { left: 3px; writing-mode: vertical-rl; rotate: 180deg; }

  .ruler-x::after, .ruler-y::after { content: ""; position: absolute; background: var(--guide); }
  .ruler-x::after { top: 0; bottom: 0; width: 1px; left: var(--mx, -10px); }
  .ruler-y::after { left: 0; right: 0; height: 1px; top: var(--my, -10px); }
}

/* ───────────── Shared bits ───────────── */

.bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px var(--pad); }
.bar-name { font: 700 18px/1 var(--display); text-decoration: none; white-space: nowrap; }
@media (max-width: 720px) {
  .bar nav a:not(.btn) { display: none; }
}
@media (max-width: 360px) {
  .bar { gap: 10px; }
  .bar-name { font-size: 16px; }
  .bar .btn { padding-inline: 12px; font-size: 14px; }
}
.bar nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 26px); font-size: 15px; font-weight: 500; }
.bar nav a:not(.btn) { text-decoration: none; }
/* Hover styles only where there is a real hover: on a touchscreen :hover
   sticks after a tap and makes a button look held down. Touch gets :active. */
@media (hover: hover) {
  .bar nav a:not(.btn):hover { text-decoration: underline; text-decoration-color: var(--guide); text-decoration-thickness: 2px; text-underline-offset: 5px; }
  .btn:hover { background: var(--select); }
  .link:hover { text-decoration-color: var(--guide); }
  .btn-mini:hover { background: var(--ink); color: #fff; }
  .email-fit:hover { color: var(--select); }
}
.btn:active { background: var(--select); }
.link:active { text-decoration-color: var(--guide); }
.email-fit:active { color: var(--select); }

.btn {
  display: inline-flex; align-items: center;
  padding: 10px 16px;
  background: var(--ink); color: var(--btn-ink, #fff);
  border-radius: 8px;
  font: 600 15px/1.2 var(--body);
  white-space: nowrap;
  text-decoration: none;
  transition: background .15s;
}

.link { font-weight: 500; text-decoration: underline; text-decoration-color: var(--select); text-decoration-thickness: 2px; text-underline-offset: 5px; }

.btn-mini {
  font: 600 13px/1 var(--body);
  padding: 8px 10px;
  border: 1.5px solid var(--ink); border-radius: 6px;
  background: #fff; color: var(--ink);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-mini:active, .btn-mini[aria-pressed="true"] { background: var(--ink); color: #fff; }

.frame-label { font: 500 13px/16px var(--body); color: var(--ink-2); margin: 0 0 8px; }

.sheet, .stage { background: var(--paper); border: 1px solid var(--line); }
.stage { position: relative; overflow: hidden; transition: border-color .35s, box-shadow .35s; }

/* The one demo that is playing right now reads as the selected artboard. */
.stage.is-live { border-color: var(--live, var(--select)); box-shadow: 0 0 0 1px var(--live, var(--select)); }
.piece .frame-label { transition: color .35s; }
.piece:has(.stage.is-live) .frame-label { color: var(--select); }

.cursor { position: absolute; left: 0; top: 0; width: 20px; height: 24px; z-index: 9; pointer-events: none; opacity: 0; transition: opacity .25s; }
.cursor path { fill: var(--ink); stroke: #fff; stroke-width: 1.5; stroke-linejoin: round; }
.cursor.on { opacity: 1; }

mark {
  color: inherit;
  background: linear-gradient(var(--proof), var(--proof)) no-repeat 0 88% / 0% 46%;
  transition: background-size .35s var(--snap);
}
mark.on { background-size: 100% 46%; }

.hint { color: var(--ink-2); font-size: 15px; }

/* Instructions and controls adapt to how the visitor points. */
.for-touch { display: none; }
@media (pointer: coarse) {
  .for-mouse { display: none; }
  .for-touch { display: inline; }

  /* comfortable tap targets */
  .btn { min-height: 44px; }
  .btn-mini { min-height: 44px; padding-inline: 14px; font-size: 14px; }
  .link { padding-block: 10px; }
  .bar-name { padding-block: 13px; }
  .email-fit { padding-block: 4px; }
  .bar nav a:not(.btn) { padding-block: 13px; }

  /* the scripted demos show a fingertip instead of a mouse arrow */
  .cursor { width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 2px solid #fff; background: rgba(43, 102, 246, .35); box-shadow: 0 0 0 1.5px var(--select); }
  .cursor path { display: none; }
}

/* ───────────── Hero ───────────── */

.hero { max-width: 1380px; margin-inline: auto; padding: 8px var(--pad) 88px; }

.canvas {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(210px, 1fr);
  gap: 24px clamp(24px, 4vw, 64px);
  align-items: start;
  padding: clamp(22px, 4.5vw, 64px);
  padding-bottom: 26px;
  min-height: min(780px, calc(100vh - 150px));
}

.name {
  margin: 0;
  width: fit-content;
  font: 700 clamp(3.4rem, 10.4vw, 11rem)/.84 var(--display);
  font-stretch: 80%;
  letter-spacing: -.022em;
}
.name span { display: block; }

.hero-copy { margin-top: clamp(20px, 3vw, 40px); max-width: 60ch; transition: opacity .5s .05s, translate .6s .05s var(--snap); }
.role { font: 600 clamp(1.15rem, 2vw, 1.5rem)/1.25 var(--display); margin: 0 0 12px; text-wrap: balance; }
.summary { margin: 0 0 22px; }
.hero-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin: 0; }
@media (max-width: 380px) {
  /* Three across no longer fits: give the button its own row so one link is not orphaned. */
  .hero-links .btn { flex-basis: 100%; justify-content: center; }
}

.hero-side { display: flex; flex-direction: column; align-items: center; gap: 28px; padding-top: 8px; }

.photo {
  margin: 0;
  width: min(250px, 100%);
  padding: 10px 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 30px -20px rgba(23, 23, 58, .55);
  rotate: 3deg;
}

.stickers { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.sticker {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 148px; aspect-ratio: 1; padding: 14px;
  border-radius: 50%;
  text-align: center;
}
.sticker b { font: 700 2.3rem/1 var(--display); font-stretch: 85%; letter-spacing: -.02em; }
.sticker span { font-size: 13px; line-height: 1.25; font-weight: 500; margin-top: 4px; }
.s-commits { background: var(--proof); rotate: -6deg; width: 164px; }
.s-releases { background: var(--select); color: #fff; rotate: 5deg; }
.s-upgrades { background: #fff; border: 2px dashed var(--guide); rotate: -3deg; margin-top: -18px; }

.obj { cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; position: relative; }
.obj.dragging { cursor: grabbing; z-index: 4; }
.obj.homing { transition: translate .45s var(--snap); }
.obj.lifted { scale: 1.04; }
.photo img { pointer-events: none; }
.photo, .sticker { transition: opacity .4s, scale .5s var(--spring); }
@media (hover: hover) {
  .obj:hover { outline: 1.5px solid var(--select); outline-offset: 5px; }
}
/* the selection frame replaces the outline; never both */
.obj.is-selected, .obj.is-selected:hover, .obj.is-selected:focus-visible { outline: none; }

.canvas-hint {
  grid-column: 1 / -1; align-self: end;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  margin: 0; font-size: 14px; color: var(--ink-2);
  transition: opacity .5s .6s;
}
/* "Put everything back" is always there, and greyed out until something has
   been dragged, so the sheet is the same size before and after. */
.btn-mini:disabled { border-color: var(--line); background: transparent; color: var(--ink-2); opacity: .7; cursor: default; }

.guide { position: absolute; background: var(--guide); pointer-events: none; opacity: 0; z-index: 5; }
.guide-v { top: 0; bottom: 0; left: 0; width: 1px; }
.guide-h { left: 0; right: 0; top: 0; height: 1px; }
.guide.on { opacity: 1; }

.sel { position: absolute; left: 0; top: 0; border: 1.5px solid var(--select); pointer-events: none; z-index: 6; display: none; }
.sel.on { display: block; }
.sel i, .h-sel i { position: absolute; width: 9px; height: 9px; background: #fff; border: 1.5px solid var(--select); }
.sel i:nth-child(1), .h-sel i:nth-child(1) { left: -5px; top: -5px; }
.sel i:nth-child(2), .h-sel i:nth-child(2) { right: -5px; top: -5px; }
.sel i:nth-child(3), .h-sel i:nth-child(3) { left: -5px; bottom: -5px; }
.sel i:nth-child(4), .h-sel i:nth-child(4) { right: -5px; bottom: -5px; }
.sel b {
  position: absolute; left: -1.5px; bottom: calc(100% + 7px);
  background: var(--select); color: #fff;
  font: 600 11px/1 var(--body); font-variant-numeric: tabular-nums;
  padding: 4px 6px; border-radius: 3px; white-space: nowrap;
}

.cursor-wrap { position: absolute; left: 0; top: 0; width: 0; height: 0; }

/* intro: the name starts off its mark; everything else waits for the snap */
.js .hero.is-intro .name { translate: min(14vw, 150px) 54px; }
.js .hero.is-intro .hero-copy { opacity: 0; translate: 0 18px; }
.js .hero.is-intro .photo, .js .hero.is-intro .sticker { opacity: 0; scale: .6; }
.js .hero.is-intro .canvas-hint { opacity: 0; }
.s-commits { transition-delay: .12s; }
.s-releases { transition-delay: .2s; }
.s-upgrades { transition-delay: .28s; }

@media (max-width: 820px) {
  .canvas { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-side { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 16px; }
  .photo { width: 150px; }
  .stickers { justify-content: flex-start; gap: 6px; }
  .sticker { width: 118px; padding: 10px; }
  .s-commits { width: 128px; }
  .sticker b { font-size: 1.7rem; }
  .sticker span { font-size: 11.5px; }
  .s-upgrades { margin-top: 0; }
}

/* ───────────── Bands ───────────── */

.band { max-width: 1380px; margin-inline: auto; padding: 24px var(--pad) 104px; scroll-margin-top: 30px; }

.snap-h {
  position: relative;
  width: fit-content;
  margin: 0 0 44px;
  font: 700 clamp(2.7rem, 6.4vw, 5.4rem)/1 var(--display);
  font-stretch: 82%;
  letter-spacing: -.022em;
}
.snap-h::before, .snap-h::after { content: ""; position: absolute; background: var(--guide); opacity: 0; pointer-events: none; }
/* guides run along the selection frame's bottom and left edges, as in the hero */
.snap-h::before { left: -100vw; right: -100vw; top: 100%; height: 1px; translate: 0 var(--fy, 0px); }
.snap-h::after { left: 0; top: -45vh; bottom: -45vh; width: 1px; translate: var(--fx, 0px) 0; }
.h-sel { position: absolute; inset: 0; border: 1.5px solid var(--select); pointer-events: none; opacity: 0; }
.js .snap-h { translate: 44px -18px; }
.js .snap-h .h-sel { opacity: 1; }
.js .snap-h.snapped { translate: 0 0; transition: translate .9s var(--snap); }
.js .snap-h.snapped .h-sel { opacity: 0; transition: opacity .3s 1.5s; }
.js .snap-h.snapped::before, .js .snap-h.snapped::after { animation: guide-flash 1.2s .5s both; }
@keyframes guide-flash { 0% { opacity: 0; } 12%, 70% { opacity: 1; } 100% { opacity: 0; } }

.job-head {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; align-items: baseline;
  border-top: 3px solid var(--ink); padding-top: 18px;
}
.job-head h3 { margin: 0; font: 700 clamp(1.5rem, 2.8vw, 2.2rem)/1.1 var(--display); letter-spacing: -.01em; }
.at { font-weight: 400; color: var(--ink-2); }
/* a second title held at the same time, under the first, with its own dates */
.job-also { margin: 0; font: 600 clamp(1.15rem, 1.9vw, 1.45rem)/1.2 var(--display); }
.dates { margin: 0; color: var(--ink-2); font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.job-lead { grid-column: 1 / -1; max-width: 70ch; margin: 8px 0 0; }
.job-plain { margin-top: 96px; }

.project { margin-top: 72px; }
.project-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 6px 24px; flex-wrap: wrap;
  border-top: 1px solid var(--ink); padding-top: 14px; margin-bottom: 36px;
}
.project-head h4 { margin: 0; font: 600 clamp(1.25rem, 2.1vw, 1.65rem)/1.2 var(--display); }

/* One column until 900px: twelve columns carry eleven 32px gaps, a 352px
   floor that is wider than a small phone. */
.pieces { display: grid; grid-template-columns: minmax(0, 1fr); gap: 64px 32px; }
.piece { min-width: 0; }
.piece > p, .piece-under p { margin: 14px 0 0; max-width: 64ch; }
.piece-text p { margin: 0 0 14px; }
.piece-under { display: grid; gap: 0 40px; }

@media (min-width: 900px) {
  .pieces { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .piece { grid-column: span 12; }
  .p-7 { grid-column: span 7; }
  .p-6 { grid-column: span 6; }
  .p-5 { grid-column: span 5; }
  .p-4 { grid-column: span 4; }
  .piece-split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px; align-items: start; }
  .piece-split .piece-text { position: sticky; top: 60px; }
  .piece-split .piece-text p:first-of-type { font-size: 1.13rem; }
  .piece-under { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}

/* ───────────── Demo A: imprint editor ───────────── */

.imprint {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(16px, 4vw, 56px);
  padding: 40px 24px 64px;
  min-height: 500px;
}
.cover {
  position: relative;
  flex: 0 1 340px; width: 340px; max-width: 100%;
  aspect-ratio: 5 / 6;
  background-color: #1F5A48;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .055) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .09) 0 1px, transparent 1px 3px);
  border-radius: 2px 7px 7px 2px;
  box-shadow: inset 12px 0 14px -10px rgba(0, 0, 0, .5), 0 22px 30px -24px rgba(23, 23, 58, .7);
}
.safe { position: absolute; inset: 9%; border: 1px dashed transparent; transition: border-color .2s; pointer-events: none; }
.imprint.is-dragging .safe, .imprint.show-safe .safe { border-color: rgba(255, 255, 255, .5); }

.imp-line {
  position: absolute; left: 50%; top: 0;
  height: 38px; padding: 0 5px;
  border: 0; border-radius: 2px;
  font: 600 22px/38px var(--display);
  white-space: nowrap;
  color: #E9CD7C;
  background: linear-gradient(100deg, #C9A04A, #F8E7A8 38%, #CDA552 62%, #F1DB94);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  cursor: grab;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  transition: transform .3s var(--snap), opacity .25s, font-size .5s var(--snap), scale .15s;
}
.imp-line.dragging { transition: scale .15s; cursor: grabbing; z-index: 3; }
.imp-line.lifted { scale: 1.07; }
.imp-line.off { opacity: 0; pointer-events: none; }
.imp-line.selected, .imp-line:focus-visible { outline: 1.5px solid #9CBDFF; outline-offset: 1px; }
.imp-line.nofit { transition: transform .3s var(--snap), opacity .25s; }

.g { position: absolute; left: 0; top: 0; background: var(--guide); opacity: 0; pointer-events: none; z-index: 2; }
.g-v { bottom: 0; width: 1px; }
.g-h { right: 0; height: 1px; }
.g.on { opacity: 1; }

.measure {
  position: absolute; left: 50%; top: 0; height: 12px; width: 0; z-index: 4;
  translate: -50% 0;
  border-inline: 1.5px solid var(--proof);
  opacity: 0; pointer-events: none;
  transition: width .5s var(--snap), opacity .2s;
}
.measure::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; margin-top: -.75px; background: var(--proof); }
.imprint.fitting .imp-line:not(.focus) { opacity: .2; }
.measure span { position: absolute; left: 50%; top: 16px; translate: -50% 0; padding: 4px 7px; border-radius: 3px; background: var(--ink); color: #fff; font: 600 11px/1 var(--body); font-variant-numeric: tabular-nums; white-space: nowrap; }
.measure.on { opacity: 1; }

.phone {
  flex: 0 0 176px; aspect-ratio: 9 / 17.5;
  padding: 7px;
  border: 2px solid var(--ink); border-radius: 26px;
  background: #fff;
}
.phone-screen { position: relative; height: 100%; border-radius: 17px; overflow: hidden; background: var(--board); }
.mini-cover {
  position: absolute; left: 24%; right: 24%; top: 8%; aspect-ratio: 5 / 6;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  background: #1F5A48; border-radius: 1px 3px 3px 1px;
}
.mini-cover i { height: 3px; border-radius: 2px; background: #E9CD7C; transition: width .3s; }
.bs {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0 10px 10px;
  background: #fff; border-radius: 14px 14px 0 0;
  box-shadow: 0 -8px 18px -10px rgba(23, 23, 58, .4);
  transform: translateY(calc(100% - var(--peek, 66px)));
  transition: transform .55s var(--snap);
}
.bs.open { transform: none; }
.bs-handle { position: relative; display: block; width: 100%; padding: 16px 0 6px; border: 0; background: none; color: inherit; text-align: center; font: 600 11px/1 var(--body); cursor: pointer; }
.bs-handle::before { content: ""; position: absolute; left: 50%; top: 6px; width: 30px; height: 3px; margin-left: -15px; border-radius: 2px; background: var(--line); }
.bs-total { display: flex; justify-content: space-between; margin: 6px 0 8px; padding-bottom: 8px; border-bottom: 1.5px solid var(--ink); font-size: 11px; }
.bs-total b { font-variant-numeric: tabular-nums; }
.bs-list { list-style: none; margin: 0; padding: 0; font-size: 10px; line-height: 1.3; }
.bs-list li { display: flex; justify-content: space-between; gap: 6px; padding: 5px 0; border-bottom: 1px solid var(--line-2); }
.bs-list li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-list li span:last-child { font-variant-numeric: tabular-nums; color: var(--ink-2); }

.price-tag { position: absolute; left: 18px; bottom: 14px; margin: 0; display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--ink-2); }
.price-tag b { color: var(--ink); font: 700 22px/1 var(--display); font-variant-numeric: tabular-nums; }
.price-tag b.bump { animation: bump .35s var(--spring); }
@keyframes bump { 0% { scale: 1; } 40% { scale: 1.22; } 100% { scale: 1; } }

/* On a phone there is no phone mock: the sheet becomes a real bottom sheet
   attached to the stage, with a handle you can tap. */
@media (max-width: 560px) {
  .imprint { padding: 24px 16px 116px; min-height: 0; gap: 0; }
  .phone { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; height: 0; flex: none; aspect-ratio: auto; padding: 0; border: 0; border-radius: 0; background: none; }
  .phone-screen { position: static; height: auto; overflow: visible; border-radius: 0; background: none; }
  .mini-cover, .price-tag { display: none; }
  .bs { --peek: 88px; padding: 0 16px 12px; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; box-shadow: 0 -12px 24px -14px rgba(23, 23, 58, .4); }
  .bs-handle { padding: 22px 0 10px; font-size: 14px; }
  .bs-handle::before { top: 9px; width: 38px; height: 4px; margin-left: -19px; }
  .bs-total { margin: 4px 0 10px; padding-bottom: 12px; font-size: 15px; line-height: 1.5; }
  .bs-list { font-size: 14px; }
  .bs-list li { padding: 9px 0; }
}

/* ───────────── Demo B: layers ───────────── */

.layers { display: grid; grid-template-columns: minmax(0, 1fr) 196px; min-height: 400px; }
.iso-wrap { display: grid; place-items: center; perspective: 1500px; padding: 40px 12px; overflow: hidden; }
.iso {
  --gap: 0px;
  position: relative;
  width: min(360px, 76%); aspect-ratio: 32 / 20;
  margin-top: 56px;
  transform: rotateX(57deg) rotateZ(-32deg);
  transform-style: preserve-3d;
}
.lyr { position: absolute; inset: 0; transform: translateZ(calc(var(--i) * var(--gap))); transition: --i .55s var(--snap); }
.lyr-fabric {
  --i: 0;
  display: grid; grid-template-columns: 45fr 10fr 45fr;
  background-color: #DCCDB4;
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, .25) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgba(23, 23, 58, .06) 0 1px, transparent 1px 3px);
  box-shadow: 0 0 0 1px rgba(23, 23, 58, .3), -14px 18px 26px -8px rgba(23, 23, 58, .28);
}
.lyr-fabric i { border-right: 1px dashed rgba(23, 23, 58, .4); }
.lyr-fabric i:last-child { border: 0; }
.lyr-photo { --i: 1; }
.lyr-text { --i: 2; }
.lyr-photo, .lyr-text { outline: 1px solid rgba(43, 102, 246, .55); background: rgba(43, 102, 246, .035); }
.pic {
  position: absolute; left: 30%; right: 0; top: 0; bottom: 0;
  background:
    radial-gradient(circle at 62% 56%, #FFD12E 0 12%, transparent 12.6%),
    linear-gradient(#FF8A5C 0%, #FF2E88 56%, #2B66F6 56.4%, #17173A 100%);
  clip-path: inset(0 0 0 var(--clip, 0%));
}
.clip-box { position: absolute; left: 55%; right: 0; top: 0; bottom: 0; outline: 1.5px dashed var(--guide); opacity: var(--clip-o, 0); }
.front-t { position: absolute; left: 55%; right: 0; top: 13%; text-align: center; color: var(--ink); font: 700 22px/1 var(--display); }
.spine-t { position: absolute; left: 45%; width: 10%; top: 0; bottom: 0; display: grid; place-items: center; writing-mode: vertical-rl; color: var(--ink); font: 700 11px/1 var(--display); }
.layers.merged .lyr-text { --i: 1; }

.strip { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-left: 1px solid var(--line); background: #FAFBFC; }
.strip-title { margin: 0; font: 600 13px/1.2 var(--body); color: var(--ink-2); }
.strip ol { list-style: none; margin: 0; padding: 0; }
.strip li {
  display: grid; grid-template-columns: 28px 1fr; gap: 8px; align-items: center;
  max-height: 64px; padding: 8px 0; overflow: hidden;
  border-bottom: 1px solid var(--line-2);
  font-size: 13px; line-height: 1.25;
  transition: max-height .4s var(--snap), padding .4s var(--snap), opacity .25s;
}
.layers.merged .row-text { max-height: 0; padding-block: 0; opacity: 0; border-bottom-width: 0; }
.th { display: grid; place-items: center; width: 28px; height: 20px; border: 1px solid var(--line); font: 700 12px/1 var(--display); font-style: normal; }
.th-photo { background: linear-gradient(#FF8A5C, #FF2E88 56%, #2B66F6 57%); }
.th-fabric { background: #DCCDB4; }
.strip .btn-mini { margin-top: auto; }

@media (max-width: 560px) {
  .layers { grid-template-columns: minmax(0, 1fr); }
  .iso-wrap { min-height: 300px; }
  .strip { border-left: 0; border-top: 1px solid var(--line); }
  /* room for all three rows, so merging two does not resize the box */
  .strip ol { min-height: 112px; }
}

/* ───────────── Demo C: wrapping paper ───────────── */

.pat-dots {
  --pat: radial-gradient(circle, #FFD12E 0 24%, transparent 26%) 0 0 / 30px 30px, radial-gradient(circle, #fff 0 11%, transparent 13%) 15px 15px / 30px 30px, #2B66F6;
  --ribbon: #FF2E88;
}
.pat-stripes { --pat: repeating-linear-gradient(45deg, #FF2E88 0 10px, #fff 10px 20px); --ribbon: #FFC61A; }
.pat-confetti {
  --pat:
    radial-gradient(circle at 20% 28%, #FF2E88 0 5px, transparent 6px) 0 0 / 50px 50px,
    radial-gradient(circle at 72% 18%, #fff 0 4px, transparent 5px) 0 0 / 50px 50px,
    radial-gradient(circle at 46% 74%, #1E7B5C 0 5px, transparent 6px) 0 0 / 50px 50px,
    radial-gradient(circle at 88% 66%, #17173A 0 3px, transparent 4px) 0 0 / 50px 50px,
    #FFD12E;
  --ribbon: #2B66F6;
}

.wrap { display: grid; grid-template-rows: 1fr auto; min-height: 400px; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.wrap.grabbing { cursor: grabbing; }
.scene { position: relative; display: grid; place-items: center; min-height: 310px; perspective: 800px; }
.spin { transform-style: preserve-3d; transform: rotateX(var(--rx, -24deg)); }
.box3d { --s: 150px; position: relative; width: var(--s); height: var(--s); transform-style: preserve-3d; transform: rotateY(var(--ry, 32deg)); }
.f { position: absolute; inset: 0; background: var(--pat); filter: brightness(var(--b, 1)); }
.f::before, .f::after { content: ""; position: absolute; background: var(--ribbon); }
.f::before { left: 42%; width: 16%; top: 0; bottom: 0; }
.f::after { top: 42%; height: 16%; left: 0; right: 0; }
.f-front { transform: translateZ(calc(var(--s) / 2)); --b: var(--b0, 1); }
.f-right { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); --b: var(--b1, .86); }
.f-back { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); --b: var(--b2, .8); }
.f-left { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); --b: var(--b3, .86); }
.f-top { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); --b: 1.07; }
.f-bottom { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); --b: .7; }
.box-shadow { position: absolute; left: 50%; bottom: 7%; width: 230px; height: 30px; margin-left: -115px; background: radial-gradient(closest-side, rgba(23, 23, 58, .3), transparent); }
/* The lit three.js scene (gift.js) fades in over the CSS cube once it has drawn. */
.gift-gl { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; transition: opacity .45s; }
.spin, .box-shadow { transition: opacity .3s .15s, visibility 0s .45s; }
.wrap.gl .gift-gl { opacity: 1; }
.wrap.gl .spin, .wrap.gl .box-shadow { opacity: 0; visibility: hidden; }
/* only promise the moving light once the lit scene is actually showing */
.if-lit { display: none; }
.piece:has(.wrap.gl) .if-lit { display: inline; }

.swatches { display: flex; justify-content: center; gap: 12px; padding: 0 16px 20px; }
.sw { width: 38px; height: 38px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: var(--pat); box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; }
.sw[aria-pressed="true"] { box-shadow: 0 0 0 2.5px var(--ink); }
.wrap { -webkit-tap-highlight-color: transparent; }
@media (pointer: coarse) {
  .sw { width: 44px; height: 44px; }
}

/* ───────────── Demo D: serializer migration ───────────── */

.json { display: flex; flex-direction: column; gap: 16px; padding: 22px; min-height: 380px; }
.code {
  margin: 0; padding: 14px 16px;
  background: var(--ink); color: #E7EAF0;
  border-radius: 6px;
  font: 400 12.5px/1.75 var(--code);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
/* Each source line is a block with a hanging indent, so a line that has to
   wrap on a phone reads as a continuation. A renamed call is one unit: it
   drops to the next line whole instead of splitting mid-identifier. */
.code .ln { display: block; padding-left: 2ch; text-indent: -2ch; }
.code .ln .swap { display: inline-block; max-width: 100%; text-indent: 0; vertical-align: top; }
@media (max-width: 400px) {
  .json { padding: 16px; }
  .code { padding: 12px; font-size: 11.5px; }
}
.swap { color: #FF9CC6; transition: color .3s; }
.swap.done { color: #8FE3C0; }
.golden { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13px; }
.golden code { padding: 4px 8px; border-radius: 4px; background: var(--board); font-size: 12.5px; }
.g-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--pass); font-weight: 600; }
.g-badge::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--pass) var(--check) center / 10px no-repeat; }
.g-badge.pulse::before { animation: bump .4s var(--spring); }
.bridge { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-top: auto; }
.lib { font: 500 12px/1 var(--code); transition: color .3s; }
.lib-from.done { color: var(--ink-2); text-decoration: line-through; }
.lib-to { color: var(--ink-2); }
.lib-to.done { color: var(--pass); }
.miles { list-style: none; display: flex; gap: 3px; margin: 0; padding: 0; }
.miles li { flex: 1; height: 20px; border-radius: 2px; background: var(--line-2); transition: background .2s, scale .25s var(--spring); }
.miles li.done { background: var(--pass); }
.miles li.tip { scale: 1 1.35; }
.mile-count { margin: 0; font-size: 14px; color: var(--ink-2); }
.mile-count b { color: var(--ink); font-variant-numeric: tabular-nums; }

@media (max-width: 560px) {
  .bridge { grid-template-columns: minmax(0, 1fr); }
}

/* ───────────── Demo E: releases ───────────── */

.releases { display: flex; flex-direction: column; gap: 12px; padding: 22px; min-height: 380px; }
.jobs { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; font-size: 13px; font-weight: 500; }
.jobs li { display: flex; align-items: center; gap: 7px; padding: 5px 12px 5px 7px; border: 1px solid var(--line); border-radius: 999px; }
.ring { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); }
.jobs li.run .ring { border-top-color: var(--ink); animation: spin .8s linear infinite; }
.jobs li.ok .ring { border-color: var(--pass); background: var(--pass) var(--check) center / 10px no-repeat; }
@keyframes spin { to { rotate: 360deg; } }
.graph { width: 100%; height: auto; margin-block: auto; overflow: visible; }
.graph .main { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.graph .hump { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .4s ease-out; }
.graph .hump.on { stroke-dashoffset: 0; }
.graph .rel { stroke: var(--select); }
.graph .hot { stroke: var(--guide); }
.graph .dot { fill: #fff; stroke: var(--ink); stroke-width: 2; scale: 0; transform-box: fill-box; transform-origin: center; transition: scale .25s var(--spring) .25s; }
.graph .dot.on { scale: 1; }
.graph .tick { stroke: var(--line); stroke-width: 1; }
.tally { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 0; }
.tally div { display: flex; flex-direction: column-reverse; }
.tally dt { font-size: 13px; color: var(--ink-2); }
.tally dd { margin: 0; font: 700 2.4rem/1 var(--display); font-variant-numeric: tabular-nums; }
.t-rel dd { color: var(--select); }
.t-hot dd { color: var(--guide); }

/* ───────────── Demo G: notifications ───────────── */

.notify {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px 12px;
  padding: 26px 16px;
  align-items: center;
}
.wires { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.wire { fill: none; stroke: var(--line); stroke-width: 2; }
.wire.socket { stroke: var(--pass); stroke-dasharray: 5 6; animation: march .9s linear infinite; }
@keyframes march { to { stroke-dashoffset: -22; } }
.pkt { fill: var(--select); stroke: #fff; stroke-width: 1.5; }

.node { position: relative; z-index: 1; min-width: 0; padding: 12px; background: #fff; border: 1.5px solid var(--ink); border-radius: 8px; transition: box-shadow .2s; }
.node.hit { animation: node-hit .55s; }
@keyframes node-hit { 0% { box-shadow: 0 0 0 0 rgba(43, 102, 246, .55); } 100% { box-shadow: 0 0 0 12px rgba(43, 102, 246, 0); } }
.node-t { margin: 0 0 8px; font: 600 13px/1.2 var(--body); }
.n-event, .n-dispatch, .n-strategy, .n-prefs { grid-column: 1 / -1; justify-self: center; width: min(100%, 300px); }

.evt { display: block; margin-bottom: 10px; padding: 6px 8px; border-radius: 4px; background: var(--board); font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.queue { display: flex; gap: 4px; min-height: 12px; }
.queue i { width: 12px; height: 12px; border-radius: 3px; background: var(--select); animation: pop .25s var(--spring); }
.recips { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.recips li { padding: 3px 8px; border: 1px solid var(--line-2); border-radius: 4px; transition: background .2s, border-color .2s; }
.recips li.on { background: var(--proof); border-color: var(--ink); }

.tog { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 13px; cursor: pointer; border-radius: 4px; }
.tog input { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 30px; height: 18px; margin: 0; border-radius: 9px; background: var(--line); cursor: pointer; transition: background .2s; }
.tog input::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: translate .2s var(--snap); }
.tog input:checked { background: var(--pass); }
.tog input:checked::after { translate: 12px 0; }
.tog.blocked span { animation: blocked .5s; }
@keyframes blocked { 0%, 100% { translate: 0; color: inherit; } 25% { translate: -3px 0; color: var(--guide); } 75% { translate: 3px 0; color: var(--guide); } }

.n-chan { text-align: center; padding: 10px 6px; }
.n-chan .node-t { margin: 0; }
.n-dev { border-color: var(--line); background: #FAFBFC; font-size: 13px; }
.n-dev p { margin: 0; }
.n-dev p { font-weight: 600; font-variant-numeric: tabular-nums; }
.d-inbox, .d-phone { display: flex; align-items: center; justify-content: center; gap: 8px; }
.ico { flex: none; width: 24px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.d-inbox.hit .ico { animation: bump .4s var(--spring); }
.d-phone.hit .ico { animation: buzz .45s; }
@keyframes buzz { 0%, 100% { rotate: 0deg; } 20% { rotate: -14deg; } 40% { rotate: 12deg; } 60% { rotate: -9deg; } 80% { rotate: 6deg; } }

.d-browser { padding: 0; overflow: hidden; }
.b-chrome { display: flex; align-items: center; gap: 4px; padding: 6px 8px; border-bottom: 1px solid var(--line); background: #fff; }
.b-chrome > i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.live { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; font-size: 11px; font-weight: 600; color: var(--pass); }
.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--pass); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.bell { position: relative; margin-left: auto; display: inline-flex; }
.bell svg { width: 16px; height: 16px; fill: var(--ink); }
.bell b { position: absolute; left: 9px; top: -5px; min-width: 14px; padding: 2px 3px; border-radius: 7px; background: var(--guide); color: #fff; font: 700 9px/1 var(--body); text-align: center; }
.bell.ring-it svg { animation: buzz .45s; transform-origin: 50% 0; }
/* A fixed height, so the diagram never resizes as toasts come and go. In the
   stacked layout the column is narrow and each toast wraps to two lines. */
.toasts { display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; height: 92px; padding: 6px; overflow: hidden; }
.toast { flex: none; }
.toast { padding: 5px 7px; border-radius: 5px; background: var(--ink); color: #fff; font-size: 11px; line-height: 1.25; animation: toast-in .35s var(--snap); }
@keyframes toast-in { from { opacity: 0; translate: 0 10px; } }
@keyframes pop { from { scale: 0; } }

/* Stacked layout (phones and tablets): keep the flow short enough to follow
   from event to delivery, and line each preference up over its channel. */
@media (max-width: 999px) {
  .n-event, .n-dispatch, .n-strategy { width: min(100%, 420px); }
  .n-event { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
  .n-event .node-t { grid-column: 1 / -1; margin: 0; }
  .n-event .evt { margin: 0; }
  .n-dispatch { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .n-dispatch .node-t { margin: 0; }
  .recips { flex-direction: row; }
  .recips li { flex: 1; padding-inline: 4px; text-align: center; }
  .n-prefs { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; padding-inline: 0; }
  .n-prefs .node-t { grid-column: 1 / -1; padding-inline: 12px; margin-bottom: 2px; }
  .n-prefs .tog { flex-direction: column; justify-content: center; gap: 4px; padding: 6px 0; }
}
@media (max-width: 480px) {
  .d-inbox, .d-phone { flex-direction: column; gap: 4px; padding: 10px 4px; text-align: center; }
}
@media (max-width: 360px) {
  .notify { padding-inline: 10px; column-gap: 8px; }
  .n-chan .node-t { font-size: 12px; }
  .b-chrome { padding-inline: 6px; }
  .b-chrome > i { display: none; }
  .live { margin-left: 0; }
}
@media (pointer: coarse) {
  .tog { min-height: 44px; }
}

@media (min-width: 1000px) {
  .notify {
    grid-template-columns: 1.2fr 1fr 1fr 1fr .9fr 1.35fr;
    grid-template-rows: repeat(3, auto);
    gap: 20px 46px;
    padding: 44px 28px;
    min-height: 430px;
  }
  .n-event, .n-dispatch, .n-strategy, .n-prefs { grid-row: 1 / 4; width: auto; justify-self: stretch; }
  .n-event { grid-column: 1; } .n-dispatch { grid-column: 2; } .n-strategy { grid-column: 3; } .n-prefs { grid-column: 4; }
  .n-hub { grid-column: 5; grid-row: 1; } .n-ses { grid-column: 5; grid-row: 2; } .n-sns { grid-column: 5; grid-row: 3; }
  .d-browser { grid-column: 6; grid-row: 1; } .d-inbox { grid-column: 6; grid-row: 2; } .d-phone { grid-column: 6; grid-row: 3; }
  .tog { padding: 6px 0; }
  .toasts { height: 64px; }
}

/* ───────────── Demo F: claims ───────────── */

.claims { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); min-height: 400px; }
.c-left { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-right: 1px solid var(--line); background: #FAFBFC; }
.wizard { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.wizard li { position: relative; flex: 1; height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.wizard li::after { content: ""; position: absolute; inset: 0; background: var(--select); transform: scaleX(0); transform-origin: left; transition: transform .35s ease-out; }
.wizard li.on::after { transform: none; }
.wizard.reset li::after { transition: none; }
.c-queue { list-style: none; display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; }
.c-queue li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 13px; line-height: 1.3; transition: border-color .2s, box-shadow .2s; }
.c-queue li small { grid-column: 1; color: var(--ink-2); font-size: 12px; }
.c-queue li .chip { grid-column: 2; grid-row: 1 / 3; }
.c-queue li.new { animation: row-in .45s var(--snap); }
.c-queue li.picked { border-color: var(--select); box-shadow: 0 0 0 1px var(--select); }
@keyframes row-in { from { opacity: 0; translate: 0 -12px; } }

.chip { display: inline-block; padding: 3px 9px; border-radius: 999px; background: var(--board); font: 600 12px/1.3 var(--body); white-space: nowrap; }
.chip[data-s="Filed"] { background: #FFF0B0; color: #5F4A00; }
.chip[data-s="Authorized"] { background: #DCE7FF; color: #1A46B8; }
.chip[data-s="Approved"] { background: #D3F0E3; color: #125C43; }
.chip[data-s="Denied"] { background: #FBDDE0; color: #9B1E2A; }
.chip.stamp { animation: stamp .4s var(--spring); }
@keyframes stamp { from { scale: 1.7; opacity: 0; rotate: -8deg; } }

.c-right { display: flex; flex-direction: column; gap: 10px; padding: 18px; min-width: 0; }
.c-detail { padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.c-num { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; font: 700 20px/1.2 var(--display); }
.lock { display: inline-flex; align-items: center; gap: 5px; font: 500 12px/1 var(--body); color: var(--ink-2); opacity: 0; transition: opacity .3s; }
.lock svg { width: 11px; height: 13px; fill: var(--ink-2); stroke: var(--ink-2); stroke-width: 1.5; }
.lock.on { opacity: 1; }
.c-status { margin: 8px 0 12px; min-height: 28px; }
.c-status .chip { padding: 5px 12px; font-size: 14px; }
.c-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.audit { list-style: none; display: flex; flex-direction: column; gap: 4px; min-height: 80px; margin: 0; padding: 0; font-size: 12.5px; line-height: 1.35; color: var(--ink-2); }
.audit li { animation: row-in .35s var(--snap); }
.audit b { color: var(--ink); font-weight: 600; }

@media (max-width: 560px) {
  .claims { grid-template-columns: minmax(0, 1fr); }
  .c-left { border-right: 0; border-bottom: 1px solid var(--line); }
}
/* On a narrow phone the lock note only just fits beside the claim number, and
   whether it wraps would depend on the digits. It gets its own line instead. */
@media (max-width: 400px) {
  .c-num .lock { flex-basis: 100%; }
}

/* ───────────── Demo H: form engine ───────────── */

.formd { min-height: 400px; }
.tpl { list-style: none; display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #FAFBFC; font-size: 13px; }
.tpl li { padding: 3px 8px; border-left: 3px solid var(--line); color: var(--ink-2); transition: border-color .25s, color .25s, background .25s; }
.tpl .sub { margin-left: 18px; }
.tpl li.on { border-left-color: var(--guide); background: #fff; color: var(--ink); }
.insp { padding: 18px; }
.insp-title { margin: 0 0 12px; font: 700 19px/1.2 var(--display); }
.insp fieldset { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.insp legend { float: left; width: 100%; margin-bottom: 8px; padding: 0; font-weight: 600; font-size: 15px; }
.seg { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: inline-block; padding: 7px 20px; border: 1.5px solid var(--ink); border-radius: 6px; font-weight: 600; font-size: 14px; transition: background .15s, color .15s; }
.seg input:checked + span { background: var(--ink); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--select); outline-offset: 3px; }
/* The follow-up always keeps its space and is unrolled into it, so answering
   the question never moves what is below the form. */
.follow-in { opacity: 0; visibility: hidden; clip-path: inset(0 0 100% 0); translate: 0 -6px; transition: clip-path .45s var(--snap), opacity .3s, translate .45s var(--snap), visibility 0s .45s; }
.follow.open .follow-in { opacity: 1; visibility: visible; clip-path: inset(0 -4px -4px -4px); translate: 0 0; transition: clip-path .45s var(--snap), opacity .3s, translate .45s var(--snap), visibility 0s; }
.fld { display: block; margin-top: 16px; font-weight: 600; font-size: 14px; }
/* 16px keeps iOS from zooming the page when the field is focused */
.fld input { display: block; width: 100%; margin-top: 6px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 6px; font: 16px/1.3 var(--body); color: var(--ink); }
@media (pointer: coarse) {
  .seg span { padding: 11px 26px; }
  .fld input { padding-block: 11px; }
}
.fld input:focus { border-color: var(--select); outline: none; }
.drop { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin: 12px 0 2px; padding: 12px; border: 1.5px dashed var(--line); border-radius: 6px; font-size: 13px; color: var(--ink-2); }
.file { padding: 3px 8px; border-radius: 4px; background: var(--board); color: var(--ink); font: 12px/1.3 var(--code); scale: 0; transition: scale .3s var(--spring); }
.file.on { scale: 1; }

/* ───────────── Demo I: HiLo ───────────── */

.hilo { display: flex; flex-direction: column; gap: 12px; padding: 18px; min-height: 330px; container-type: inline-size; }
.db { align-self: center; display: flex; flex-direction: column; align-items: center; padding: 8px 16px; border: 1.5px solid var(--ink); border-radius: 8px; font-size: 12.5px; }
.db b { font: 700 24px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.db.hit, .srv.hit { animation: node-hit .55s; }
.servers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.srv { padding: 8px 10px; border: 1px solid var(--line); border-top: 4px solid var(--select); border-radius: 6px; font-size: 13px; }
.srv-b { border-top-color: var(--guide); }
.srv p { margin: 0; font-weight: 600; }
.srv span { display: block; min-height: 1.4em; font: 12px/1.4 var(--code); color: var(--ink-2); }
/* in a narrow box a full range wraps to a second line and a single number does not */
@container (max-width: 330px) { .srv span { min-height: 2.8em; } }
.stream { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 5px; min-height: 84px; }
.stream b { padding: 3px 6px; border-radius: 4px; background: var(--select); color: #fff; font: 500 12px/1.3 var(--code); animation: pop .3s var(--spring); }
.stream b.b { background: var(--guide); }
/* in the narrowest box (three demos side by side on a small laptop) the numbers take a fourth row */
@container (max-width: 232px) { .stream { min-height: 102px; } }
/* two lines of room: the tally wraps once its numbers get longer */
.hilo-note { margin: auto 0 0; min-height: 3.2em; min-height: 2lh; font-size: 13px; color: var(--ink-2); }
.hilo-note b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ───────────── Demo J: upgrades ───────────── */

.upgrade { display: flex; flex-direction: column; gap: 16px; padding: 18px; min-height: 330px; }
.rollers { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.roller { display: flex; align-items: center; gap: 8px; font: 700 26px/1 var(--display); }
.digit { width: 36px; height: 46px; overflow: hidden; border-radius: 6px; background: var(--ink); color: #fff; }
.digit.wide { width: 54px; }
.col { display: flex; flex-direction: column; transition: transform .8s var(--snap); }
.col b { height: 46px; line-height: 46px; text-align: center; font-weight: 700; }
.col.rolled { transform: translateY(-46px); }
.code.sig { font-size: 12px; min-height: 4.6em; }
/* on a narrow phone the two lines wrap differently before and after the migration */
@media (max-width: 400px) { .upgrade { min-height: 356px; } }
.adds { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 7px 10px; margin: auto 0 0; padding: 0; font-size: 13px; line-height: 1.25; }
.adds li { display: flex; align-items: center; gap: 6px; color: var(--ink-2); transition: color .3s; }
.adds li::before { content: ""; flex: none; width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--line); transition: background-color .3s, border-color .3s; }
.adds li.on { color: var(--ink); }
.adds li.on::before { border-color: var(--pass); background: var(--pass) var(--check) center / 10px no-repeat; }

/* ───────────── Demo K: access control ───────────── */

.pii { display: flex; flex-direction: column; gap: 16px; padding: 18px; min-height: 330px; }
.viewas { align-self: flex-start; display: inline-flex; border: 1.5px solid var(--ink); border-radius: 8px; overflow: hidden; }
.viewas button { padding: 7px 12px; border: 0; background: #fff; color: var(--ink); font: 600 13px/1 var(--body); cursor: pointer; transition: background .15s, color .15s; }
.viewas button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.viewas button:focus-visible { outline-offset: -3px; outline-color: var(--proof); }
@media (pointer: coarse) {
  .viewas button { min-height: 44px; padding-inline: 16px; font-size: 14px; }
}
.record { display: flex; flex-direction: column; gap: 7px; margin: 0; font-size: 14px; line-height: 1.35; }
.record div { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 8px; }
.record dt { color: var(--ink-2); }
.record dd { margin: 0; }
.record dd span { position: relative; display: inline-block; }
.pii-f dd span::after { content: ""; position: absolute; inset: 1px -4px; border-radius: 2px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.7, 0, .2, 1); }
.pii-f:nth-child(2) dd span::after { transition-delay: .08s; }
.pii-f:nth-child(3) dd span::after { transition-delay: .16s; }
.pii.dealer .pii-f dd span::after { transform: none; }
.perms { list-style: none; display: flex; flex-direction: column; gap: 5px; margin: auto 0 0; padding: 0; font-size: 13px; }
.perms li { display: flex; align-items: center; gap: 7px; transition: color .3s; }
.perms li::before { content: ""; flex: none; width: 15px; height: 15px; border-radius: 50%; background: var(--pass) var(--check) center / 10px no-repeat; transition: background-color .3s; }
.perms li.no { color: var(--ink-2); text-decoration: line-through; }
.perms li.no::before { background: var(--line) linear-gradient(var(--ink-2), var(--ink-2)) center / 7px 1.8px no-repeat; }

/* ───────────── Skills, education, contact ───────────── */

.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 44px 32px; }
.skill-group h3, .edu h3 { margin: 0 0 16px; padding-top: 12px; border-top: 3px solid var(--ink); font: 700 1.3rem/1.2 var(--display); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.chips li { padding: 7px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--chip, #fff); font-size: 15px; font-weight: 500; line-height: 1.3; }
.js .chips li { translate: var(--tx, 0) var(--ty, 0); rotate: var(--tr, 0deg); transition: translate .55s var(--snap) var(--d, 0ms), rotate .55s var(--snap) var(--d, 0ms); }
.js .chips.snapped li { translate: 0 0; rotate: 0deg; }

.edu { margin-top: 72px; max-width: 520px; }
.edu p { margin: 0; }
.edu-degree { font-weight: 600; }

/* ───────────── Currently learning ───────────── */

.learn { display: grid; grid-template-columns: minmax(0, 1fr); gap: 44px 32px; }
.learn-lead { margin: -20px 0 28px; max-width: 44ch; font-size: 1.13rem; }
.books { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--ink); }
.book { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.book p { margin: 0; }
.book-ico {
  grid-row: 1 / 4; align-self: start; position: relative;
  width: 36px; height: 48px; margin-top: 2px;
  border-radius: 2px 4px 4px 2px;
  background: var(--c, var(--select));
  box-shadow: inset 6px 0 0 rgba(23, 23, 58, .22), 0 8px 10px -7px rgba(23, 23, 58, .55);
}
.book-ico::after { content: ""; position: absolute; left: 12px; right: 6px; top: 9px; height: 9px; border-radius: 1px; background: rgba(255, 255, 255, .82); }
.book:nth-child(1) .book-ico { --c: var(--select); --r: -9deg; }
.book:nth-child(2) .book-ico { --c: var(--proof); --r: 7deg; --d: 70ms; }
.book:nth-child(3) .book-ico { --c: var(--pass); --r: -6deg; --d: 140ms; }
/* The books lean until the list scrolls in, then stand up straight, like the skill chips. */
.js .book-ico { rotate: var(--r, 0deg); translate: 0 -3px; transition: rotate .55s var(--spring) var(--d, 0ms), translate .55s var(--snap) var(--d, 0ms); }
.js .books.snapped .book-ico { rotate: 0deg; translate: 0 0; }
.book-t { font: 600 1.15rem/1.25 var(--display); }
.book-a { color: var(--ink-2); font-size: 14px; }
.book-d { padding-top: 6px; font-size: 15px; }

.train { padding: 22px; container-type: inline-size; }
.train-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@container (min-width: 620px) {
  .train-in { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: center; }
}
.t-plot { display: block; width: 100%; height: auto; border: 1px solid var(--line-2); border-radius: 6px; background: #FAFBFC; cursor: crosshair; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.t-grid line { stroke: var(--line-2); stroke-width: 1; }
.t-grid line.axis { stroke: var(--line); }
.t-res line { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 2 3; transition: stroke .2s, stroke-width .2s; }
/* while the walk-through is on `pred = model(x)`, the gaps it measures stand out */
.train.at-pred .t-res line { stroke: var(--guide); stroke-width: 1.75; }
.t-fit { stroke: var(--select); stroke-width: 3; stroke-linecap: round; }
.t-pts circle { fill: var(--ink); stroke: #fff; stroke-width: 1.5; transform-box: fill-box; transform-origin: center; }
.t-pts circle.mine { fill: var(--proof); stroke: var(--ink); }
.t-pts circle.new { animation: pop .3s var(--spring); }
.t-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; justify-items: start; }
.t-side .code { justify-self: stretch; }
.train .code .ln { margin-inline: -8px; padding-left: calc(8px + 2ch); padding-right: 8px; border-radius: 3px; transition: background .2s, color .2s; }
.train .code .ln.on { background: rgba(255, 209, 46, .2); color: #fff; }
.t-read { display: flex; align-items: flex-end; gap: 8px 24px; margin: 0; justify-self: stretch; }
.t-read p { display: flex; flex-direction: column; margin: 0; }
.t-read span { font-size: 13px; color: var(--ink-2); }
.t-read b { min-width: 2ch; font: 700 1.9rem/1 var(--display); font-variant-numeric: tabular-nums; }
.t-spark { flex: 1; min-width: 60px; height: 38px; overflow: visible; }
.t-spark polyline { fill: none; stroke: var(--ink); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.t-eq { margin: 0; font: 500 13px/1.7 var(--code); color: var(--ink-2); font-variant-numeric: tabular-nums; }
#demo-train .hint { margin: 14px 0 0; max-width: 64ch; }
#demo-train .hint code { font-size: .92em; }

@media (min-width: 900px) {
  .learn { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
  .learn .piece { grid-column: auto; }
}

.contact-lead { margin: -20px 0 28px; }
.email-fit {
  display: block; width: fit-content;
  font: 700 clamp(1.25rem, 6.6vw, 6.4rem)/1.05 var(--display);
  font-stretch: 78%;
  letter-spacing: -.018em;
  white-space: nowrap;
  text-decoration: none;
  transition: color .15s;
}
.contact-links { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin: 36px 0 0; }

.foot { padding: 0 var(--pad) 40px; max-width: 1380px; margin-inline: auto; color: var(--ink-2); font-size: 14px; }
.foot p { margin: 0; padding-top: 16px; border-top: 1px solid var(--line); }

/* ───────────── Demo: payment gateway ───────────── */

.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.job-pieces { margin-top: 44px; }
#demo-pay .hint { margin: 14px 0 0; max-width: 72ch; }

.pay { padding: 22px; container-type: inline-size; }
.pay-in { display: grid; gap: 28px; }
@container (min-width: 700px) {
  .pay-in { grid-template-columns: minmax(0, 270px) minmax(0, 1fr); gap: 56px; align-items: center; max-width: 1000px; margin-inline: auto; padding: 14px 10px; }
}

/* the checkout */
.till { display: flex; flex-direction: column; gap: 12px; }
.till-top { display: flex; justify-content: space-between; align-items: baseline; margin: 0; font-size: 14px; color: var(--ink-2); }
.till-top b { font: 700 1.7rem/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.plastic {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 12px;
  padding: 14px 16px; border-radius: 12px; background: var(--ink); color: #fff;
}
.plastic-chip { width: 30px; height: 22px; border-radius: 5px; background: linear-gradient(135deg, var(--proof), #E2A400); }
.plastic-no { font: 500 14.5px/1 var(--code); letter-spacing: .02em; white-space: nowrap; transition: color .25s; }
.plastic small { grid-column: 1 / -1; font-size: 12px; opacity: .7; }
.plastic.sending .plastic-no { color: var(--guide); }
.plastic.bad { animation: blocked .5s; }
.pay .viewas { align-self: stretch; }
.pay .viewas button { flex: 1; }
.pay-btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 16px;
  border: 0; border-radius: 8px; background: var(--select); color: #fff;
  font: 600 15px/1 var(--body); cursor: pointer;
  transition: background .25s, scale .12s;
}
.pay-btn:active, .pay-btn.pressed { scale: .97; }
.pay-btn .ring { display: none; border-color: rgba(255, 255, 255, .4); }
.pay-btn.busy { background: var(--ink); }
.pay-btn.busy .ring { display: block; border-top-color: #fff; animation: spin .8s linear infinite; }
.pay-btn.ok { background: var(--pass); }
.pay-btn.ok .ring { display: block; border-color: #fff; background: var(--check) center / 10px no-repeat; }
.pay-btn.bad { background: var(--deny); }
.pay-status { margin: -2px 0 0; min-height: 1.4em; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.pay-status.ok { color: var(--pass); }
.pay-status.bad { color: var(--deny); }

/* the sequence diagram: three lifelines, one message per row */
.seq { min-width: 0; }
.lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.lanes span {
  justify-self: center; display: grid; place-items: center;
  max-width: calc(100% - 6px); padding: 7px 10px;
  border: 1.5px solid var(--ink); border-radius: 8px; background: #fff;
  font: 600 13px/1.2 var(--body); text-align: center; text-wrap: balance;
}
.lanes span.hit { animation: node-hit .55s; }
.msgs {
  list-style: none; margin: 0; padding: 18px 0 14px;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 15px;
  background:
    linear-gradient(var(--line), var(--line)) 16.667% 0 / 1.5px 100% no-repeat,
    linear-gradient(var(--line), var(--line)) 50% 0 / 1.5px 100% no-repeat,
    linear-gradient(var(--line), var(--line)) 83.333% 0 / 1.5px 100% no-repeat;
}
.msg { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 4px; color: var(--ink); font: 500 12.5px/1.25 var(--body); opacity: 0; transition: opacity .25s; }
/* a message draws itself in; when the diagram resets it only fades */
.msg.on { opacity: 1; }
.m-13 { grid-column: 2 / 6; }
.m-12 { grid-column: 2 / 4; }
.m-23 { grid-column: 4 / 6; }
/* one message per row, in the order they are sent */
.msg:nth-child(1) { grid-row: 1; } .msg:nth-child(2) { grid-row: 2; } .msg:nth-child(3) { grid-row: 3; }
.msg:nth-child(4) { grid-row: 4; } .msg:nth-child(5) { grid-row: 5; } .msg:nth-child(6) { grid-row: 6; }
.msg-t { padding: 0 6px; background: #fff; white-space: nowrap; opacity: 0; translate: 0 4px; transition: opacity 0s .25s, translate 0s .25s; }
.msg-l { justify-self: stretch; height: 2px; background: currentColor; transform-origin: 0 50%; scale: 0 1; transition: scale 0s .25s; }
.msg.back .msg-l { transform-origin: 100% 50%; }
.msg::after {
  content: ""; position: absolute; bottom: -4px; right: -1px;
  border: 5px solid transparent; border-right: 0; border-left: 8px solid currentColor;
  opacity: 0; transition: opacity 0s .25s;
}
.msg.back::after { right: auto; left: -1px; border-left: 0; border-right: 8px solid currentColor; }
.msg.on .msg-t { opacity: 1; translate: 0 0; transition: opacity .3s .12s, translate .3s .12s; }
.msg.on .msg-l { scale: 1 1; transition: scale .5s var(--snap); }
.msg.on::after { opacity: 1; transition: opacity .15s .32s; }
/* the card number crosses the server's lifeline without touching it */
.msg.over { color: var(--guide); gap: 12px; }
.msg.over .msg-t { justify-self: start; margin-left: 9%; }
.msg.over .msg-l { background: linear-gradient(90deg, currentColor calc(50% - 8px), transparent 0, transparent calc(50% + 8px), currentColor 0); }
.msg.over::before {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 18px; height: 10px; translate: -50% 0;
  border: 2px solid currentColor; border-bottom: 0; border-radius: 10px 10px 0 0;
  opacity: 0; transition: opacity 0s .25s;
}
.msg.over.on::before { opacity: 1; transition: opacity .2s .2s; }
.msg.good { color: var(--pass); }
.msg.bad { color: var(--deny); }
.msg.good .msg-t, .msg.bad .msg-t { font-weight: 600; }

.pay-note { margin: 18px 0 0; padding-top: 12px; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--ink-2); }
.pay-note b { color: var(--ink); font-variant-numeric: tabular-nums; }

@media (max-width: 400px) {
  .pay { padding: 16px 12px; }
  .lanes span { padding-inline: 6px; font-size: 12px; }
  .msg { font-size: 12px; }
  .msg-t { padding-inline: 3px; }
}

/* ───────────── Themes ─────────────
   The page passes through four worlds, and each one is more than a palette:
   it has its own frame around the page, its own surface, its own way of
   holding a demo and its own thing to do.

     Photo project   a design editor: rulers, a dotted canvas, artboards
     Automotive      a drive at night: a dash strip that reads your scrolling,
                     asphalt and lane paint, demos as dash screens
     Internship      a pinboard over a first desk: a rail that counts the
                     months, cork, a legal pad, an ID badge that swings
     Learning        a chalkboard: a wooden frame and chalk tray, hand
                     lettering, demos as sheets under magnets, chalk that draws

   themes.js puts the theme classes on (so the page is plain without it) and
   measures where the board changes. Stages and sheets are paper wherever they
   are, so every demo keeps the palette it was drawn in. */

.backdrop {
  --b-base: #E7EAF0; --b-auto: #15171B; --b-intern: #C9A572; --b-shade: #5F4528; --b-learn: #1F3B34;
  position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: linear-gradient(180deg,
    var(--b-base) 0, var(--b-base) var(--y1, 100%),
    var(--b-auto) var(--y2, 100%), var(--b-auto) var(--y3, 100%),
    var(--b-intern) var(--y4, 100%), var(--b-intern) var(--y5, 100%),
    var(--b-shade) calc(var(--y5, 100%) + var(--seam3, 0px) * .55),
    var(--b-learn) var(--y6, 100%), var(--b-learn) 100%);
}
@supports (background: linear-gradient(in oklab, red, blue)) {
  .backdrop {
    background: linear-gradient(180deg in oklab,
      var(--b-base) 0, var(--b-base) var(--y1, 100%),
      var(--b-auto) var(--y2, 100%), var(--b-auto) var(--y3, 100%),
      var(--b-intern) var(--y4, 100%), var(--b-intern) var(--y5, 100%),
      var(--b-shade) calc(var(--y5, 100%) + var(--seam3, 0px) * .55),
      var(--b-learn) var(--y6, 100%), var(--b-learn) 100%);
  }
}
/* The surfaces are laid in stretches, top to bottom. A texture's long run is
   plain tiling; only the short strip where it fades in or out is masked, so
   no page-tall layer ever needs a mask. Each tile is offset by where its
   stretch starts, so a fading strip meets the run beside it without a step. */
.backdrop {
  --grit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .39 -.177'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --smear: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='960' height='720'%3E%3Cfilter id='s' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0035 .012' numOctaves='3' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .96 0 0 0 0 .95 0 0 0 0 .9 0 0 0 .6 -.255'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)'/%3E%3C/svg%3E");
  --dust: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='5' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 -.47'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --cork: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='d' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.42' numOctaves='3' seed='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .33 0 0 0 0 .2 0 0 0 0 .08 0 0 0 2.4 -1.14'/%3E%3C/filter%3E%3Cfilter id='l' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.5' numOctaves='3' seed='9' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .92 0 0 0 0 .74 0 0 0 2.2 -1.12'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23d)'/%3E%3Crect width='100%25' height='100%25' filter='url(%23l)'/%3E%3C/svg%3E");
  --fade-in: linear-gradient(180deg, transparent, #000);
  --fade-out: linear-gradient(180deg, #000, transparent);
}
.backdrop > i { display: none; position: absolute; left: 0; right: 0; }
.themed .backdrop > i { display: block; }
/* the editor's canvas dots, which stop where the road starts */
.backdrop > .bd-dots { display: block; top: 0; height: var(--y1, 100%); }
.bd-dots, .bd-dots-out { background: radial-gradient(circle, #C2C8D6 1px, transparent 1.3px) 0 0 / 24px 24px; }
.bd-dots-out { top: var(--y1); height: calc(var(--seam) * .45); background-position: 0 calc(-1 * var(--y1)); -webkit-mask-image: var(--fade-out); mask-image: var(--fade-out); }
/* the last light on the horizon, low in the stretch where day turns to night */
.bd-glow {
  top: calc(var(--y1) + var(--seam) * .3); height: calc(var(--seam) * .48);
  background: linear-gradient(180deg, transparent, rgba(255, 150, 60, .2) 52%, rgba(255, 178, 36, .1) 75%, transparent);
}
/* asphalt: a fine light grit */
.bd-grit-in, .bd-grit, .bd-grit-out { background: var(--grit) 0 0 / 240px 240px; }
.bd-grit-in { top: var(--y1); height: var(--seam); background-position: 0 calc(-1 * var(--y1)); -webkit-mask-image: var(--fade-in); mask-image: var(--fade-in); }
.bd-grit { top: var(--y2); height: calc(var(--y3) - var(--y2)); background-position: 0 calc(-1 * var(--y2)); }
.bd-grit-out { top: var(--y3); height: var(--seam2); background-position: 0 calc(-1 * var(--y3)); -webkit-mask-image: var(--fade-out); mask-image: var(--fade-out); }
/* the road's two edge lines, down both sides of the page */
.bd-edge {
  --at: 4px; --w: 2px; --paint: rgba(233, 230, 220, .78);
  --run: linear-gradient(180deg, transparent, var(--paint) calc(var(--seam) - 60px), var(--paint) calc(100% - var(--seam2) + 80px), transparent);
  top: calc(var(--y1) + 60px); height: calc(var(--y4) - var(--y1) - 140px);
  background: var(--run) left var(--at) top / var(--w) 100% no-repeat, var(--run) right var(--at) top / var(--w) 100% no-repeat;
}
@media (min-width: 900px) { .bd-edge { --at: 9px; --w: 3px; } }
/* sunrise, low in the stretch where the night road ends */
.bd-dawn {
  top: calc(var(--y3) + var(--seam2) * .12); height: calc(var(--seam2) * .62);
  background: linear-gradient(180deg, transparent, rgba(255, 138, 110, .3) 45%, rgba(255, 196, 120, .34) 72%, transparent);
}
/* cork: dark and pale flecks */
.bd-cork-in, .bd-cork, .bd-cork-out { background: var(--cork) 0 0 / 300px 300px; }
.bd-cork-in { top: var(--y3); height: var(--seam2); background-position: 0 calc(-1 * var(--y3)); -webkit-mask-image: var(--fade-in); mask-image: var(--fade-in); }
.bd-cork { top: var(--y4); height: calc(var(--y5) - var(--y4)); background-position: 0 calc(-1 * var(--y4)); }
.bd-cork-out { top: var(--y5); height: calc(var(--seam3) * .6); background-position: 0 calc(-1 * var(--y5)); -webkit-mask-image: var(--fade-out); mask-image: var(--fade-out); }
/* the board: long eraser smears under a film of chalk dust */
.bd-smear-in, .bd-smear { background: var(--smear) 0 0 / 960px 720px, var(--dust) 0 0 / 240px 240px; }
.bd-smear-in { top: var(--y5); height: var(--seam3); background-position: 0 calc(-1 * var(--y5)), 0 calc(-1 * var(--y5)); -webkit-mask-image: var(--fade-in); mask-image: var(--fade-in); }
.bd-smear { top: var(--y6); bottom: 0; background-position: 0 calc(-1 * var(--y6)), 0 calc(-1 * var(--y6)); }
.backdrop > svg { position: absolute; inset: 0; }
.defs { position: absolute; }

/* paper is paper in every world */
.stage, .sheet {
  --ink: #17173A; --ink-2: #5B6080; --line: #CDD2DE; --line-2: #E4E7EE;
  --guide: #FF2E88; --select: #2B66F6; --proof: #FFD12E;
  color: var(--ink);
}

/* what the two dark worlds have in common */
.theme-auto, .theme-learn {
  --ink: #F3F1EA; --ink-2: #A9AEBB;
  --line: rgba(255, 255, 255, .22); --line-2: rgba(255, 255, 255, .12);
  --chip: rgba(255, 255, 255, .07);
  --btn-ink: #15171B;
  color: var(--ink);
}

/* ── The seams: empty stretches where one world becomes the next ── */

.seam { display: none; position: relative; }
.themed .seam { display: block; }

/* day falls to night, and a lane line picks up and runs to the stop bar */
.seam-night { height: clamp(240px, 40vh, 380px); margin-top: 40px; }
.seam-night::before {
  content: ""; position: absolute; left: 50%; top: 14%; bottom: 0; width: 6px; margin-left: -3px;
  background: repeating-linear-gradient(0deg, transparent 0 24px, #FFC94D 24px 66px, transparent 66px 82px);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 60%);
  mask-image: linear-gradient(180deg, transparent, #000 60%);
}
/* night ends: the lane line runs out as the sun comes up over the pinboard */
.seam-dawn { height: clamp(230px, 36vh, 330px); margin-top: 40px; }
.seam-dawn::before {
  content: ""; position: absolute; left: 50%; top: 0; height: 62%; width: 6px; margin-left: -3px;
  background: repeating-linear-gradient(180deg, #FFC94D 0 42px, transparent 42px 76px);
  -webkit-mask-image: linear-gradient(180deg, #000 25%, transparent); mask-image: linear-gradient(180deg, #000 25%, transparent);
}
/* a line of ballpoint wanders off the desk, turns to chalk and points at the board */
.seam-board { height: clamp(230px, 36vh, 330px); margin-top: 56px; }
.themed #experience { padding-bottom: 12px; }
.seam-board svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.seam-board path { fill: none; }
.seam-ink { stroke: #1F3FA6; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.seam-chalk { stroke: #F4F1E8; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; filter: url(#chalk); }

/* ── The page's frame ── */

/* the design-editor rulers belong to the first world and leave with it */
.ruler, .ruler-corner { transition: opacity .5s; }
html[data-zone]:not([data-zone="base"]) .ruler, html[data-zone]:not([data-zone="base"]) .ruler-corner { opacity: 0; }

/* the dash: a strip of instruments along the top, driven by scrolling */
.dash {
  --sign: "Barlow Condensed", "Arial Narrow", sans-serif;
  position: fixed; z-index: 52; top: 0; left: 0; right: 0; height: 26px;
  display: flex; align-items: center; gap: 16px; padding: 0 12px;
  background: linear-gradient(#191B20, #0C0D10); border-bottom: 1px solid #2B2F37;
  color: #8E939F; font: 600 12px/1 var(--sign); letter-spacing: .09em; text-transform: uppercase; font-variant-numeric: tabular-nums;
  white-space: nowrap; pointer-events: none;
  translate: 0 -110%; visibility: hidden; transition: translate .45s var(--snap), visibility 0s .45s;
}
html[data-zone="auto"] .dash { translate: 0 0; visibility: visible; transition: translate .45s var(--snap); }
.dash small { font-size: 10px; }
.dash-gear { display: flex; gap: 6px; font-size: 13px; }
.dash-gear b { color: #454952; transition: color .15s, text-shadow .15s; }
.dash-gear b.on { color: #FFB224; text-shadow: 0 0 8px rgba(255, 178, 36, .8); }
.dash-speed { display: flex; align-items: center; gap: 7px; }
/* a bar of segments; the last quarter is the red line */
.dash-bar, .dash-bar i { display: block; height: 8px; }
.dash-bar {
  width: 64px; background: #2A2D34;
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 3px, transparent 3px 4px);
  mask-image: repeating-linear-gradient(90deg, #000 0 3px, transparent 3px 4px);
}
.dash-bar i { background: linear-gradient(90deg, #FFB224 0 75%, #FF5A3C 75%); clip-path: inset(0 calc(100% - var(--v, 0) * 1%) 0 0); }
.dash-speed b { min-width: 3ch; text-align: right; color: #F3F1EA; font-size: 14px; letter-spacing: .04em; }
.dash-now { flex: 1; min-width: 0; display: none; align-items: center; gap: 7px; overflow: hidden; }
.dash-now span { overflow: hidden; text-overflow: ellipsis; }
.dash-lamp { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #3A3E46; transition: background .3s, box-shadow .3s; }
.dash-now.on { color: #F3F1EA; }
.dash-now.on .dash-lamp { background: #FFB224; box-shadow: 0 0 8px 1px rgba(255, 178, 36, .8); }
.dash-trip { display: flex; align-items: center; gap: 6px; margin-left: auto; }
/* a mechanical odometer: each digit is a drum */
.odo { display: flex; gap: 1px; }
.odo i { display: block; width: 9px; height: 14px; overflow: hidden; border-radius: 1.5px; background: #000; color: #F3F1EA; font: 600 12px/14px var(--sign); letter-spacing: 0; text-align: center; box-shadow: inset 0 3px 2px -2px rgba(255, 255, 255, .2), inset 0 -3px 2px -2px rgba(255, 255, 255, .2); }
.odo i:last-child { background: #ECE9DF; color: #15171B; }
.odo b { display: block; font-weight: inherit; translate: 0 calc(var(--d, 0) * -14px); }
.odo span { display: block; height: 14px; }
@media (min-width: 560px) { .dash-now { display: flex; } .dash-bar { width: 96px; } .dash { gap: 22px; } }
@media (min-width: 900px) and (pointer: fine) { .dash { height: var(--ruler); } }

/* the pinboard's rail: the internship laid out month by month, with a marker
   that walks along it as the page scrolls through that job */
.tenure {
  position: fixed; z-index: 52; top: 0; left: 0; right: 0; height: 26px;
  display: flex; align-items: center; gap: 12px; padding: 0 12px;
  background: linear-gradient(#ECEEF1, #C6CAD1); border-bottom: 1px solid #9BA1AB; box-shadow: 0 2px 5px rgba(40, 22, 6, .35);
  color: #3B3F4C; font: 500 12px/1 var(--body); font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none;
  translate: 0 -130%; visibility: hidden; transition: translate .45s var(--snap), visibility 0s .45s;
}
html[data-zone="intern"] .tenure { translate: 0 0; visibility: visible; transition: translate .45s var(--snap); }
.tenure-what { display: none; font-weight: 600; color: #17173A; }
.tenure-track {
  position: relative; flex: 1; min-width: 40px; height: 9px;
  background: linear-gradient(90deg, #6D7380 1px, transparent 1px) 0 0 / calc((100% - 1px) / 27) 100%, linear-gradient(#8E949E, #8E949E) 0 100% / 100% 1px no-repeat;
}
.tenure-track i { position: absolute; top: -3px; left: calc(var(--p, 0) * 100%); width: 11px; height: 11px; margin-left: -5px; border-radius: 50%; background: radial-gradient(circle at 36% 30%, #7FE0D2, #0E8C7F 56%, #075F56); box-shadow: 1px 2px 2px rgba(40, 22, 6, .5); }
.tenure b { min-width: 8.6ch; text-align: right; color: #17173A; font-weight: 700; }
@media (min-width: 560px) { .tenure-what { display: inline; } .tenure { gap: 16px; } }
@media (min-width: 900px) and (pointer: fine) { .tenure { height: var(--ruler); } }

/* the board's wooden frame, with a tray of chalk along the bottom */
.wood { display: none; }
@media (min-width: 900px) and (pointer: fine) {
  .wood {
    display: block; position: fixed; z-index: 50; pointer-events: none;
    opacity: 0; visibility: hidden; transition: opacity .5s, visibility 0s .5s;
    background-color: #8A5B33;
  }
  html[data-zone="learn"] .wood { opacity: 1; visibility: visible; transition: opacity .5s; }
  .wood-t, .tray {
    left: 0; right: 0;
    background-image: repeating-linear-gradient(0deg, rgba(0, 0, 0, .08) 0 1px, transparent 1px 4px, rgba(255, 255, 255, .05) 4px 5px, transparent 5px 9px), linear-gradient(180deg, #A06D3D, #7C4F2B);
  }
  .wood-t { top: 0; height: var(--ruler); box-shadow: 0 2px 6px rgba(0, 0, 0, .45); z-index: 51; }
  .wood-l, .wood-r {
    top: 0; bottom: 0; width: var(--ruler);
    background-image: repeating-linear-gradient(90deg, rgba(0, 0, 0, .08) 0 1px, transparent 1px 4px, rgba(255, 255, 255, .05) 4px 5px, transparent 5px 9px), linear-gradient(90deg, #946339, #7C4F2B);
  }
  .wood-l { left: 0; box-shadow: 2px 0 6px rgba(0, 0, 0, .45); }
  .wood-r { right: 0; box-shadow: -2px 0 6px rgba(0, 0, 0, .45); }
  /* round the pinboard the same side rails are aluminium */
  html[data-zone="intern"] .wood-l, html[data-zone="intern"] .wood-r { opacity: 1; visibility: visible; transition: opacity .5s; background: linear-gradient(90deg, #C6CAD1, #ECEEF1 45%, #BFC4CC); box-shadow: 0 0 5px rgba(40, 22, 6, .4); }
  .tray {
    bottom: 0; height: 34px; z-index: 51; pointer-events: auto; cursor: default;
    display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 0 calc(var(--ruler) + 18px);
    box-shadow: 0 -2px 6px rgba(0, 0, 0, .45), inset 0 2px 0 rgba(255, 255, 255, .16);
  }
  .tray-note { margin: 0 auto 0 0; color: #2E1B0C; font-size: 13px; font-weight: 500; }
  .chalk-pick {
    width: 44px; height: 12px; padding: 0; border: 0; border-radius: 3px 5px 4px 3px; cursor: pointer;
    background: var(--c); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .14), 0 3px 3px -1px rgba(0, 0, 0, .5);
    transition: translate .25s var(--spring), rotate .25s var(--spring);
  }
  .chalk-pick[data-chalk="white"] { --c: #F4F1E8; rotate: -2deg; }
  .chalk-pick[data-chalk="yellow"] { --c: #FFE27A; rotate: 3deg; width: 36px; }
  .chalk-pick[data-chalk="pink"] { --c: #FF9EC4; rotate: -1deg; width: 40px; }
  .chalk-pick[data-chalk="blue"] { --c: #8CCBFF; rotate: 2deg; width: 30px; }
  .chalk-pick[aria-pressed="true"] { translate: 0 -9px; rotate: -9deg; }
  .chalk-pick:focus-visible, .eraser:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
  .eraser {
    display: flex; align-items: center; gap: 8px; margin-left: 14px; padding: 0; border: 0; background: none; cursor: pointer;
    color: #2E1B0C; font: 600 13px/1 var(--body); transition: opacity .2s;
  }
  .eraser i { width: 44px; height: 17px; border-radius: 3px; background: linear-gradient(180deg, #E3C08A 0 38%, #26262B 38%); box-shadow: 0 3px 3px -1px rgba(0, 0, 0, .5); transition: translate .2s var(--spring), rotate .2s var(--spring); }
  .eraser:disabled { opacity: .5; cursor: default; }
  .eraser:not(:disabled):hover i { translate: 0 -3px; rotate: -4deg; }

  /* over the bare board the pointer is a stick of chalk */
  :where(html[data-zone="learn"]) body { cursor: var(--chalk-cur), crosshair; }
  :where(html[data-zone="learn"]) :where(p, h1, h2, h3, h4, h5, li, pre, .stage, .theme-auto, .theme-intern, .bar, .seam) { cursor: auto; }
}
:root {
  --chalk-cur: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cpath d='M4.5 23.5l4 4L26 10l-4-4z' fill='%23F4F1E8' stroke='%2315171B' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E") 5 26;
}
/* what the visitor draws, on the board and under everything else */
.scribble { width: 100%; height: 100%; transition: opacity .45s; }
.scribble.wipe { opacity: 0; }
.scribble path { fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* ── Automotive: a drive at night ── */

.theme-auto {
  --select: #FFB224; --live: #FFB224; --guide: #FF5A3C; --proof: rgba(255, 178, 36, .36);
  --sign: "Barlow Condensed", "Arial Narrow", var(--display);
  --paint: #ECE9DF;
}
.theme-auto.project { margin-top: 0; }
/* a stop bar across the road opens each stretch, in place of the hairline */
.theme-auto .project-head { border-top: 7px solid var(--paint); padding-top: 20px; align-items: center; }
/* headings are lettered like road signs */
.theme-auto .project-head h4 { font: 600 clamp(1.75rem, 3.5vw, 2.6rem)/1.02 var(--sign); letter-spacing: .012em; text-transform: uppercase; }
/* dates are pressed into a licence plate */
.theme-auto .dates {
  padding: 4px 11px 3px; border-radius: 5px;
  background: linear-gradient(#F7F4EB, #E2DED2); color: #15171B;
  font: 600 17px/1.15 var(--sign); letter-spacing: .07em; text-transform: uppercase;
  box-shadow: inset 0 0 0 2px #F7F4EB, inset 0 0 0 3.5px #15171B, 0 2px 0 #000;
}
/* each demo is a screen set in the dash; its lamp comes on while it plays */
.theme-auto .frame-label { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font: 600 15px/16px var(--sign); letter-spacing: .06em; text-transform: uppercase; }
.theme-auto .frame-label::before {
  content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: #3A3E46; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .5);
  transition: background .35s, box-shadow .35s;
}
.theme-auto .piece:has(.stage.is-live) .frame-label::before { background: var(--live); box-shadow: 0 0 9px 1px rgba(255, 178, 36, .85); }
.theme-auto .stage {
  border-radius: 10px; border-color: #2B2F37;
  box-shadow: 0 0 0 5px #0B0C0F, 0 0 0 6px #2B2F37, 0 22px 44px -22px #000;
}
.theme-auto .stage.is-live {
  border-color: var(--live);
  box-shadow: 0 0 0 5px #0B0C0F, 0 0 0 6.5px var(--live), 0 0 38px -4px rgba(255, 178, 36, .55);
}
.theme-auto .piece > p, .theme-auto .piece-under p { margin-top: 22px; }

/* ── Internship: a pinboard over a first desk ──
   Everything here is pinned, taped or hung, and every word sits on paper, so
   the ink stays the page's ordinary dark ink. */

.theme-intern {
  --select: #0B7F74; --live: #0B7F74; --guide: #E0457B; --proof: rgba(255, 122, 172, .42);
  --hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  --pen: #1F3FA6; --lanyard: #0E8C7F;
  --ink: #17173A; --ink-2: #4A4F6E;
}
.themed .job-plain.theme-intern { margin-top: 0; }
/* a pushpin, seen head-on */
.pin, .theme-intern .pad::before, .theme-intern .hint::before {
  position: absolute; width: 17px; height: 17px; border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, var(--p1, #FF9AA5), var(--p2, #D8323F) 56%, var(--p3, #9A1E2A));
  box-shadow: 2px 5px 4px -1px rgba(40, 22, 6, .55);
}

.theme-intern .job-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; align-items: start; border-top: 0; padding-top: 0; }
/* the badge takes the room it needs first; the pad has what is left, up to a comfortable measure */
@media (min-width: 900px) { .theme-intern .job-head { grid-template-columns: minmax(0, 800px) auto; justify-content: start; gap: 0 clamp(36px, 7vw, 120px); } }

/* the job is written up on a legal pad. Every line is a whole number of
   rules tall (30px), so the text stays sitting on the lines. */
.pad { display: contents; }
.theme-intern .pad {
  --m: 34px;
  display: grid; grid-template-columns: minmax(0, 1fr); align-items: start;
  position: relative; padding: 52px 18px 30px calc(var(--m) + 14px);
  color: var(--ink);
  background:
    linear-gradient(#7C2F2B, #5C201D) top / 100% 22px no-repeat,
    linear-gradient(90deg, transparent var(--m), #E79090 var(--m) calc(var(--m) + 1px), transparent calc(var(--m) + 1px) calc(var(--m) + 4px), #E79090 calc(var(--m) + 4px) calc(var(--m) + 5px), transparent calc(var(--m) + 5px)),
    repeating-linear-gradient(180deg, transparent 0 14px, #A9C0EA 14px 15px, transparent 15px 30px),
    #FFF4A6;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .18), 0 18px 28px -18px rgba(50, 28, 8, .8), 12px 20px 22px -22px rgba(50, 28, 8, .7);
}
.theme-intern .pad::before { content: ""; top: 3px; left: calc(50% - 8px); }
.theme-intern .pad h3 { position: relative; top: 6px; font: 700 clamp(2.1rem, 4.3vw, 2.9rem)/60px var(--hand); letter-spacing: 0; color: var(--pen); }
.theme-intern .pad .at { color: inherit; font-weight: 600; opacity: .82; }
.theme-intern .pad .dates { position: relative; top: 3px; font: 600 1.5rem/30px var(--hand); color: var(--pen); }
/* one ruled line is left empty between the handwriting and the paragraph */
.theme-intern .pad .job-lead { margin: 30px 0 0; max-width: none; line-height: 30px; }
@media (min-width: 700px) { .theme-intern .pad { --m: 56px; padding-right: 30px; } }

/* the ID badge: a card on a lanyard, hung from a pushpin. Sizes are in em so
   the whole thing scales with one font size. It is two links: the strap turns
   about the pin (--a), and the clip and card turn about the strap's end (--b). */
.badge-hang { display: none; }
.theme-intern .badge-hang {
  --p1: #7FE0D2; --p2: #0E8C7F; --p3: #075F56; --strap: 3.9em;
  display: block; position: relative; justify-self: center; width: 11em; height: calc(8px + var(--strap) + 14.4em);
  font-size: 12.5px; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
.theme-intern .badge-hang.held { cursor: grabbing; }
.badge-hang .pin { left: calc(50% - 8.5px); top: 0; }
.badge-rig { position: absolute; inset: 0; transform-origin: 50% 8.5px; rotate: var(--a, 0deg); will-change: rotate; }
.badge-strap {
  position: absolute; left: calc(50% - .5em); top: 8px; width: 1em; height: var(--strap);
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .13) 0 2px, transparent 2px 4px), var(--lanyard);
  box-shadow: inset 1px 0 0 rgba(0, 0, 0, .18), inset -1px 0 0 rgba(0, 0, 0, .18), 2px 4px 5px -2px rgba(40, 22, 6, .5);
}
.badge-swing { position: absolute; left: 0; right: 0; top: calc(8px + var(--strap) - .3em); bottom: 0; transform-origin: 50% .3em; rotate: var(--b, 0deg); will-change: rotate; }
.badge-clip { position: absolute; left: calc(50% - .45em); top: 0; width: .9em; height: 1.5em; border-radius: .2em .2em .45em .45em; background: linear-gradient(90deg, #8E949E, #E3E6EA 45%, #9BA1AB); box-shadow: 1px 2px 3px rgba(40, 22, 6, .45); }
.badge {
  position: absolute; left: 0; right: 0; top: .9em; bottom: 0; overflow: hidden;
  display: grid; justify-items: center; align-content: start; row-gap: .15em;
  border-radius: .7em; background: #FDFDFB; color: #17173A; text-align: center; line-height: 1.2;
  box-shadow: 0 0 0 1px rgba(23, 23, 58, .12), 4px 12px 16px -8px rgba(40, 22, 6, .7);
}
/* the slot the clip goes through */
.badge::before { content: ""; position: absolute; top: .55em; left: calc(50% - 1.2em); width: 2.4em; height: .5em; border-radius: .25em; background: #8D6B42; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .45); }
.badge-co { align-self: stretch; justify-self: stretch; padding: 1.55em 0 .5em; background: var(--lanyard); color: #fff; font: 700 1.02em/1 var(--display); letter-spacing: .01em; }
.badge img { width: 4.4em; height: 4.4em; margin: .7em 0 .35em; border-radius: .5em; object-fit: cover; box-shadow: 0 0 0 1px rgba(23, 23, 58, .15); pointer-events: none; }
.badge-name { font: 700 1em/1.15 var(--display); }
.badge-role { font-size: .84em; font-weight: 500; }
.badge-dates { font-size: .76em; color: #5B6080; font-variant-numeric: tabular-nums; }
.badge-code { width: 62%; height: .9em; margin-top: .45em; background: repeating-linear-gradient(90deg, #17173A 0 1px, transparent 1px 3px, #17173A 3px 5px, transparent 5px 6px, #17173A 6px 7px, transparent 7px 10px); }
.badge-band { position: absolute; left: 0; right: 0; bottom: 0; padding: .42em 0 .4em; background: #17173A; color: #FFE566; font: 700 .86em/1 var(--body); letter-spacing: .22em; text-transform: uppercase; text-indent: .22em; }
@media (min-width: 900px) { .theme-intern .badge-hang { --strap: 6.5em; font-size: 16px; justify-self: start; } }

/* the demo is a sheet taped to the board; its name is on a sticky note */
.theme-intern .piece { position: relative; padding-top: 30px; }
.theme-intern .piece::before, .theme-intern .piece::after {
  content: ""; position: absolute; z-index: 3; top: 22px; width: 88px; height: 25px; pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, .25), transparent 12% 88%, rgba(255, 255, 255, .25)), rgba(241, 228, 190, .88);
  box-shadow: 0 1px 2px rgba(40, 22, 6, .3);
}
.theme-intern .piece::before { left: -34px; rotate: -40deg; }
.theme-intern .piece::after { right: -34px; rotate: 40deg; }
.theme-intern .frame-label {
  position: absolute; z-index: 2; top: 0; left: 64px; max-width: calc(100% - 128px); margin: 0; padding: 10px 16px 13px; rotate: -2.5deg;
  background: linear-gradient(176deg, #FFEC7A, #FFDF4A); color: #2B2412;
  font: 700 23px/1.05 var(--hand);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .1), 3px 9px 10px -6px rgba(40, 22, 6, .6);
}
@media (min-width: 900px) { .theme-intern .frame-label { left: 110px; } }
.theme-intern .stage { border-color: transparent; border-radius: 1px; box-shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 20px 30px -20px rgba(50, 28, 8, .85), 14px 22px 24px -24px rgba(50, 28, 8, .7); }
.theme-intern .stage.is-live { border-color: transparent; box-shadow: 0 0 0 2px var(--live), 0 20px 30px -20px rgba(50, 28, 8, .85), 14px 22px 24px -24px rgba(50, 28, 8, .7); }
/* the note about the demo is an index card: a red line, then blue rules every 26px */
.theme-intern .hint {
  --p1: #FFE98A; --p2: #F2B600; --p3: #A87900;
  position: relative; margin-top: 34px; max-width: 62ch; padding: 34px 22px 16px;
  color: var(--ink-2); line-height: 26px;
  background:
    linear-gradient(#E26D6D, #E26D6D) 0 26px / 100% 1.5px no-repeat,
    linear-gradient(#FFFEF8, #FFFEF8) top / 100% 26px no-repeat,
    repeating-linear-gradient(180deg, transparent 0 4px, #C9D8F3 4px 5px, transparent 5px 26px),
    #FFFEF8;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .18), 0 14px 20px -14px rgba(50, 28, 8, .8);
}
.theme-intern .hint::before { content: ""; top: 5px; left: calc(50% - 8px); }

/* ── Learning: a chalkboard ── */

.theme-learn {
  --ink: #F4F1E8; --ink-2: #C2CFC7;
  --line: rgba(244, 241, 232, .3); --line-2: rgba(244, 241, 232, .16);
  --select: #FFE27A; --live: #FFE27A; --guide: #FF9EC4; --proof: rgba(255, 226, 122, .3);
  --btn-ink: #1F3B34;
  --chalk: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  /* one wobbly stroke of chalk, stretched to whatever it rules off */
  --stroke: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 8' preserveAspectRatio='none'%3E%3Cpath d='M2 4.6C52 2.4 96 5.8 150 4.1S262 2.6 318 4.4 372 3.2 398 4' fill='none' stroke='%23F4F1E8' stroke-width='2.2' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  --stroke-y: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 12' preserveAspectRatio='none'%3E%3Cpath d='M3 7.5C60 3.5 108 9 168 6.2S286 3.4 336 6.8 380 5 397 6.2' fill='none' stroke='%23FFE27A' stroke-width='4' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
}
/* section headings are written on, left to right, then underlined. The
   reveal is a mask, not a clip: a clipped heading has no visible area, so the
   observer that starts it would never fire. Padding keeps tall strokes inside
   the mask. */
.theme-learn .snap-h {
  margin: -.14em 0 40px -.04em; padding: .14em .14em .18em .04em;
  font: 700 clamp(3.5rem, 9.4vw, 7.2rem)/.95 var(--chalk); font-stretch: normal; letter-spacing: 0;
  filter: url(#chalk);
}
.theme-learn .snap-h .h-sel, .theme-learn .snap-h::before { display: none; }
.theme-learn .snap-h::after {
  left: 0; right: 0; top: auto; bottom: .02em; width: auto; height: .14em; translate: none; opacity: 1;
  background: var(--stroke-y) center / 100% 100% no-repeat;
}
.js .theme-learn .snap-h {
  translate: 0 0;
  -webkit-mask: linear-gradient(90deg, #000 calc(100% - 30px), transparent) no-repeat 0 0 / 0% 100%;
  mask: linear-gradient(90deg, #000 calc(100% - 30px), transparent) no-repeat 0 0 / 0% 100%;
}
.js .theme-learn .snap-h.snapped {
  -webkit-mask-size: calc(100% + 30px) 100%; mask-size: calc(100% + 30px) 100%;
  transition: -webkit-mask-size 1.1s cubic-bezier(.45, .05, .3, 1), mask-size 1.1s cubic-bezier(.45, .05, .3, 1);
}
.js .theme-learn .snap-h::after { clip-path: inset(0 100% 0 0); }
.js .theme-learn .snap-h.snapped::after { clip-path: inset(0); transition: clip-path .5s 1s ease-out; animation: none; }

/* skills are listed on the board: lettered headings, hand-drawn boxes */
.theme-learn .skill-group h3, .theme-learn .edu h3 {
  padding: 0 0 10px; border-top: 0;
  font: 700 2.1rem/1 var(--chalk);
  background: var(--stroke) left bottom / 100% 7px no-repeat;
}
.theme-learn .chips li { background: transparent; border: 1.5px solid rgba(244, 241, 232, .78); border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px; }
.theme-learn .chips li:nth-child(2n) { border-radius: 15px 225px 15px 255px / 255px 15px 225px 15px; }
.theme-learn .chips li:nth-child(3n) { border-radius: 225px 25px 255px 20px / 20px 255px 25px 225px; }

.theme-learn .books { border-top: 0; padding-top: 6px; background: var(--stroke) left top / 100% 7px no-repeat; }
.theme-learn .book { border-bottom: 0; background: var(--stroke) left bottom / 100% 5px no-repeat; }
.theme-learn .book:nth-child(1) .book-ico { --c: #8CCBFF; }
.theme-learn .book:nth-child(2) .book-ico { --c: #FFE27A; }
.theme-learn .book:nth-child(3) .book-ico { --c: #FF9EC4; }

/* a demo is a sheet of paper held to the board by two magnets */
.theme-learn .frame-label { margin-bottom: 10px; font: 600 24px/22px var(--chalk); color: var(--ink); }
.theme-learn .stage { border-color: transparent; border-radius: 2px; box-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 18px 30px -18px rgba(0, 0, 0, .8), 16px 24px 26px -26px rgba(0, 0, 0, .7); }
.theme-learn .stage.is-live { border-color: transparent; box-shadow: 0 0 0 2px var(--live), 0 18px 30px -18px rgba(0, 0, 0, .8), 16px 24px 26px -26px rgba(0, 0, 0, .7); }
.theme-learn .stage::before, .theme-learn .stage::after {
  content: ""; position: absolute; z-index: 3; top: 5px; width: 15px; height: 15px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 36% 30%, var(--m1), var(--m2) 58%, var(--m3));
  box-shadow: 0 2px 3px rgba(0, 0, 0, .45);
}
.theme-learn .stage::before { left: 7px; --m1: #FF9AA5; --m2: #D8323F; --m3: #9A1E2A; }
.theme-learn .stage::after { right: 7px; --m1: #9CC3FF; --m2: #2B66F6; --m3: #1B3F9E; }

/* a sketch of what the demo beside it does */
.doodle { display: none; }
.theme-learn { position: relative; }
@media (min-width: 1100px) {
  .theme-learn .doodle { display: block; position: absolute; right: var(--pad); top: 6px; width: 290px; height: auto; overflow: visible; filter: url(#chalk); }
}
.doodle path { fill: none; stroke: #F4F1E8; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.doodle .dd-axis { stroke-width: 2.5; }
.doodle .dd-hop { stroke: #FFE27A; stroke-width: 2.2; stroke-dasharray: 5 6; }
.doodle .dd-dot { fill: #FFE27A; }
.doodle .dd-arrow { stroke: #FF9EC4; stroke-width: 2.5; }
.doodle .dd-t { fill: #F4F1E8; font: 600 24px var(--chalk); }
.doodle .dd-note { fill: #FF9EC4; }

/* contact: the address is written across the board */
.theme-learn .email-fit { font-family: var(--chalk); font-stretch: normal; letter-spacing: 0; filter: url(#chalk); }
.theme-learn .btn { background: transparent; color: var(--ink); border: 2px solid var(--ink); border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px; }
@media (hover: hover) { .theme-learn .btn:hover { background: rgba(244, 241, 232, .14); } }
.theme-learn .btn:active { background: rgba(244, 241, 232, .14); }
.theme-learn.foot p { border-top: 0; padding-top: 20px; background: var(--stroke) left top / 100% 6px no-repeat; }
@media (min-width: 900px) and (pointer: fine) { .theme-learn.foot { padding-bottom: 64px; } }

/* ───────────── Reduced motion ───────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .snap-h { translate: 0 0; }
  .js .snap-h .h-sel { display: none; }
  .js .snap-h::before, .js .snap-h::after { display: none; }
  .js .theme-learn .snap-h { -webkit-mask: none; mask: none; }
  .js .theme-learn .snap-h::after { clip-path: none; }
  .js .theme-learn .snap-h::after { display: block; }
  .js .chips li { translate: 0 0; rotate: 0deg; }
  .js .book-ico { rotate: 0deg; translate: 0 0; }
}
