:root {
  --phm-pink: #ff2b91;
  --phm-yellow: #e8ff19;
  --phm-blue: #438ee8;
  --phm-slate: #191b20;
  --phm-line: color-mix(in srgb, var(--pb-accent) 44%, transparent);
}

html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
.phm-page { background: var(--pb-bg); font-family: var(--font-body); }
.phm-page main { overflow: hidden; }
.phm-section { width: min(1180px, calc(100% - 3rem)); margin-inline: auto; }
.phm-section-label {
  margin-bottom: var(--space-3);
  color: var(--pb-accent);
  font: 500 var(--text-xs)/1.4 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.phm-page h2 { color: var(--pb-heading); font-size: clamp(2.5rem, 5.5vw, 5.25rem); }
.phm-page p { font-size: var(--text-body); }
.phm-small { color: var(--pb-muted); font-size: var(--text-sm) !important; }

.phm-hero {
  position: relative;
  min-height: min(940px, 100svh);
  display: grid;
  grid-template-columns: minmax(300px, .78fr) minmax(520px, 1.22fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 6rem);
  width: min(1440px, calc(100% - 4rem));
  margin-inline: auto;
  padding: clamp(5rem, 10vh, 8rem) 0;
}
.phm-hero::before {
  content: "";
  position: absolute;
  inset: 12% -20% auto 33%;
  height: 72%;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--pb-rust) 44%, transparent), transparent 67%);
  pointer-events: none;
}
.phm-hero-copy { position: relative; z-index: 2; }
.phm-pebblab {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: clamp(2.5rem, 7vh, 5.5rem);
  color: var(--pb-muted);
  font: var(--text-xs) var(--font-mono);
  letter-spacing: .08em;
  text-decoration: none;
}
.phm-pebblab img { width: 54px; height: 54px; border: 1px dashed var(--pb-accent); border-radius: 50%; }
.phm-pebblab:hover { color: var(--pb-heading); }
.phm-kicker { color: var(--pb-accent); font: 500 var(--text-xs) var(--font-mono); letter-spacing: .13em; text-transform: uppercase; }
.phm-hero h1 {
  margin: 0;
  color: var(--pb-heading);
  font-size: clamp(4.5rem, 9vw, 9.5rem);
  line-height: .72;
  letter-spacing: -.035em;
}
.phm-hero h1 span { display: inline-block; margin-left: .42em; color: var(--pb-accent); }
.phm-deck { margin: 2.3rem 0 .75rem; color: var(--pb-heading); font: clamp(1.6rem, 3vw, 2.75rem)/1.1 var(--font-display); }
.phm-intro { max-width: 35rem; color: var(--pb-muted); font-size: var(--text-lede) !important; }
.phm-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.5rem; margin-top: 2rem; }
.phm-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .72rem 1.15rem;
  border: 1px dashed var(--pb-accent);
  border-radius: var(--radius-md);
  color: var(--pb-heading);
  font-weight: 700;
  text-decoration: none;
}
.phm-button--primary { background: var(--pb-accent); color: #28231c; }
.phm-button:hover { transform: translateY(-2px); box-shadow: 0 9px 24px rgb(0 0 0 / .2); }
.phm-text-link { min-height: 44px; display: inline-flex; align-items: center; color: var(--pb-muted); text-underline-offset: 5px; }

.phm-hero-visual { position: relative; z-index: 1; padding: 8%; }
.phm-screen {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--pb-accent) 58%, #333);
  border-radius: var(--radius-md);
  background: var(--phm-slate);
  box-shadow: 0 28px 70px rgb(0 0 0 / .48);
  color: white;
  text-decoration: none;
}
.phm-screen img { display: block; width: 100%; height: auto; }
.phm-screen--hero { transform: rotate(1.6deg); box-shadow: 0 40px 90px rgb(0 0 0 / .58), 0 0 0 8px rgb(255 255 255 / .025); }
.phm-screen:focus-visible { outline-offset: 8px; }
.phm-window-bar { height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 11px; background: #111319; border-bottom: 1px solid #393b42; }
.phm-window-bar i { width: 7px; height: 7px; border-radius: 50%; background: #686b73; }
.phm-window-bar i:first-child { background: var(--phm-pink); }
.phm-window-bar b { margin-left: auto; color: #9a9ca4; font: 400 .68rem var(--font-mono); letter-spacing: .05em; }
.phm-expand { position: absolute; right: .65rem; bottom: .65rem; padding: .35rem .55rem; border-radius: 5px; background: rgb(10 11 14 / .84); color: #fff; font: .7rem var(--font-mono); opacity: 0; transition: opacity .2s; }
.phm-screen:hover .phm-expand, .phm-screen:focus-visible .phm-expand { opacity: 1; }
.phm-orbit { position: absolute; border: 1px dashed color-mix(in srgb, var(--pb-accent) 40%, transparent); border-radius: 50%; pointer-events: none; }
.phm-orbit--one { inset: 0; transform: rotate(-9deg); }
.phm-orbit--two { inset: 8% -4%; transform: rotate(14deg); }
.phm-lobster { position: absolute; right: 0; top: -1%; z-index: 3; display: grid; place-items: center; width: 72px; height: 72px; border: 1px dashed var(--phm-pink); border-radius: 50%; background: var(--pb-bg-soft); font-size: 2rem; transform: rotate(8deg); }
.phm-visual-note { margin: 1.2rem 0 0; text-align: center; color: var(--pb-muted); font: var(--text-xs) var(--font-mono) !important; }
.phm-dot { display: inline-block; width: 9px; height: 9px; margin: 0 .3rem 0 .8rem; border-radius: 50%; }
.phm-dot--reference { background: var(--pb-accent); }
.phm-dot--learner { background: var(--phm-blue); }

.phm-problem,
.phm-suite,
.phm-visible,
.phm-progress,
.phm-local,
.phm-open,
.phm-software { border-top: 1px dashed var(--phm-line); }
.phm-problem { padding: clamp(6rem, 12vw, 11rem) 0; }
.phm-problem-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr); gap: clamp(3rem, 10vw, 8rem); align-items: end; }
.phm-problem h2 { max-width: 800px; margin-bottom: 1.5rem; }
.phm-problem-grid > div > p { max-width: 680px; color: var(--pb-muted); font-size: var(--text-lede); }
.phm-problem q { color: var(--pb-body); }
.phm-quote { margin: 0; padding: 2rem; border: 1px dashed var(--pb-accent); border-radius: 48% 52% 46% 54% / 52% 45% 55% 48%; text-align: center; transform: rotate(2deg); }
.phm-quote p { margin: 0; color: var(--pb-heading); font: clamp(1.7rem, 3vw, 2.5rem)/1.15 var(--font-display); }
.phm-quote footer { margin-top: .7rem; color: var(--pb-muted); font: var(--text-xs) var(--font-mono); }

.phm-visible { padding: clamp(5rem, 10vw, 9rem) 0; }
.phm-visible-grid { display: grid; grid-template-columns: minmax(280px, .68fr) minmax(480px, 1.32fr); gap: clamp(3rem, 7vw, 6rem); align-items: start; }
.phm-sticky-copy { position: sticky; top: 5rem; }
.phm-visible h2 { margin-bottom: 1.5rem; font-size: clamp(3rem, 5vw, 4.8rem); }
.phm-sticky-copy > p { color: var(--pb-muted); }
.phm-measure-list { list-style: none; margin: 2rem 0; padding: 0; border-top: 1px dashed var(--phm-line); }
.phm-measure-list li { display: grid; grid-template-columns: 3.2rem 1fr; gap: 1rem; padding: .8rem 0; border-bottom: 1px dashed var(--phm-line); color: var(--pb-muted); }
.phm-measure-list span { color: var(--phm-yellow); font-family: var(--font-mono); }
:root[data-theme="light"] .phm-measure-list span { color: #725520; }
.phm-screen--large { margin-top: 3rem; transform: rotate(-.7deg); }

.phm-suite { padding: clamp(6rem, 12vw, 10rem) 0; }
.phm-suite-head { display: grid; grid-template-columns: 1fr minmax(260px, 420px); align-items: end; gap: 3rem; margin-bottom: 3rem; }
.phm-suite-head h2 { margin: 0; }
.phm-suite-head p { color: var(--pb-muted); font-size: var(--text-lede); }
.phm-tool-list { list-style: none; margin: 0; padding: 0; border-top: 1px dashed var(--pb-accent); }
.phm-tool-list li { display: grid; grid-template-columns: 50px 1fr minmax(170px, .45fr); gap: 1.5rem; align-items: center; padding: 1.4rem .5rem; border-bottom: 1px dashed var(--phm-line); }
.phm-tool-no { color: var(--pb-accent); font: var(--text-xs) var(--font-mono); }
.phm-tool-list h3 { margin: 0 0 .2rem; color: var(--pb-heading); font-size: clamp(1.5rem, 2.5vw, 2.15rem); }
.phm-tool-list p { margin: 0; color: var(--pb-muted); }
.phm-tool-list code { justify-self: end; color: var(--pb-accent); font-size: var(--text-xs); text-align: right; }

.phm-progress { display: grid; grid-template-columns: minmax(480px, 1.25fr) minmax(280px, .75fr); gap: clamp(3rem, 8vw, 7rem); align-items: center; padding: clamp(6rem, 12vw, 11rem) 0; }
.phm-progress-art { position: relative; }
.phm-progress-art::before { content: ""; position: absolute; inset: 15% -10% -15% 12%; border: 1px dashed var(--pb-accent); border-radius: 50%; transform: rotate(-8deg); }
.phm-progress-art .phm-screen { transform: rotate(1deg); }
.phm-progress-copy h2 { margin-bottom: 1.3rem; }
.phm-progress-copy p { color: var(--pb-muted); }
.phm-hand { margin-top: 2rem; color: var(--pb-heading) !important; font: clamp(1.7rem, 3vw, 2.5rem) var(--font-display) !important; transform: rotate(-2deg); }

.phm-story { padding-top: 4rem; background: color-mix(in srgb, var(--pb-bg-soft) 76%, var(--pb-bg)); border-top: 1px dashed var(--phm-line); }
.phm-story-head { padding: clamp(5rem, 10vw, 9rem) 0 4rem; }
.phm-eyebrow { margin: 0 0 1rem; color: var(--pb-accent); font: clamp(1.45rem, 2.5vw, 2.1rem) var(--font-display) !important; }
.phm-story-head h2 { max-width: 1020px; }
.phm-cinema { position: relative; margin: 0 auto; }
.phm-cinema--wide { width: min(1400px, calc(100% - 2rem)); }
.phm-cinema img { display: block; width: 100%; height: auto; border-radius: var(--radius-md); box-shadow: 0 25px 65px rgb(0 0 0 / .38); }
.phm-cinema figcaption { position: absolute; left: clamp(1rem, 4vw, 3rem); bottom: clamp(1rem, 4vw, 3rem); max-width: min(520px, calc(100% - 2rem)); padding: .65rem .85rem; border-left: 2px solid var(--pb-accent); background: rgb(18 18 18 / .8); color: #ddd; font-size: var(--text-sm); backdrop-filter: blur(5px); }
.phm-cinema figcaption span { display: block; margin-bottom: .15rem; color: #f0ce83; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; }
.phm-story-copy { max-width: 780px; padding: clamp(4rem, 9vw, 8rem) 0; }
.phm-story-copy p { color: var(--pb-muted); font-size: var(--text-lede); }
.phm-story-copy p:first-child::first-letter { float: left; margin: .02em .12em 0 0; color: var(--pb-accent); font: 5.2rem/.75 var(--font-display); }
.phm-story-pair { display: grid; grid-template-columns: minmax(450px, 1.15fr) minmax(280px, .65fr); gap: clamp(3rem, 7vw, 6rem); align-items: center; padding-bottom: clamp(5rem, 10vw, 9rem); }
.phm-cinema--portrait { width: 100%; }
.phm-story-aside p { color: var(--pb-muted); }
.phm-story-aside blockquote { margin: 2rem 0; color: var(--pb-heading); font: clamp(2rem, 4vw, 3.5rem)/1.1 var(--font-display); transform: rotate(-2deg); }
.phm-cinema--dream { padding-bottom: clamp(4rem, 8vw, 7rem); }

.phm-real { padding: clamp(7rem, 12vw, 11rem) 0; }
.phm-real-head { max-width: 920px; }
.phm-real-head p { max-width: 700px; color: var(--pb-muted); font-size: var(--text-lede); }
.phm-launcher-row { display: grid; grid-template-columns: minmax(480px, 1.25fr) minmax(220px, .55fr); gap: clamp(3rem, 7vw, 6rem); align-items: center; margin-top: 4rem; }
.phm-screen--launcher { transform: rotate(-1deg); }
.phm-three-words { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; color: var(--pb-heading); font: clamp(2.7rem, 5vw, 5rem)/.95 var(--font-display); }
.phm-three-words span:nth-child(2) { margin-left: .45em; color: var(--pb-accent); }
.phm-three-words span:nth-child(3) { margin-left: .1em; }

.phm-local { display: grid; grid-template-columns: minmax(260px, .6fr) minmax(400px, 1fr); gap: clamp(3rem, 9vw, 8rem); align-items: center; padding: clamp(6rem, 12vw, 10rem) 0; }
.phm-local-mark { aspect-ratio: 1; display: grid; place-items: center; align-content: center; border: 1px dashed var(--pb-accent); border-radius: 48% 52% 49% 51%; transform: rotate(-4deg); }
.phm-waveform { width: min(180px, 58%); height: auto; overflow: visible; }
.phm-waveform path { fill: none; stroke: var(--pb-accent); stroke-width: 2.5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.phm-waveform .phm-waveform-baseline { opacity: .35; stroke-width: 1; }
.phm-device { color: var(--pb-muted); font: var(--text-xs) var(--font-mono); }
.phm-local h2 { font-size: clamp(2.8rem, 5vw, 4.8rem); }
.phm-local p { max-width: 680px; color: var(--pb-muted); }

.phm-open { display: grid; grid-template-columns: minmax(320px, .7fr) minmax(520px, 1.3fr); gap: clamp(3rem, 7vw, 6rem); align-items: center; padding: clamp(6rem, 12vw, 11rem) 0; }
.phm-open h2 { margin-bottom: 1rem; }
.phm-open-copy > p { color: var(--pb-muted); }
.phm-facts { margin: 2rem 0; border-block: 1px dashed var(--phm-line); }
.phm-facts div { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 0; border-bottom: 1px dashed var(--phm-line); }
.phm-facts div:last-child { border: 0; }
.phm-facts dt { color: var(--pb-muted); font: var(--text-xs) var(--font-mono); }
.phm-facts dd { margin: 0; color: var(--pb-heading); }
.phm-caveat { margin-top: 1.5rem; font-size: var(--text-sm) !important; }
.phm-cinema--closing { width: 100%; transform: rotate(1deg); }

.phm-footer { width: min(1400px, calc(100% - 3rem)); margin-inline: auto; display: grid; grid-template-columns: 1fr auto 1fr; gap: 2rem; align-items: end; padding: 5rem 0 3rem; border-top: 1px dashed var(--pb-accent); }
.phm-footer > div { display: flex; align-items: center; gap: 1rem; }
.phm-lobster-footer { font-size: 2.3rem; }
.phm-footer p { margin: 0; color: var(--pb-muted); font-size: var(--text-sm); }
.phm-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.3rem; }
.phm-footer a { min-height: 44px; display: inline-flex; align-items: center; color: var(--pb-heading); text-underline-offset: 5px; }
.phm-footer-note { text-align: right; font-family: var(--font-mono); font-size: var(--text-xs) !important; }

:root[data-theme="light"] .phm-screen { border-color: #7b6950; box-shadow: 0 24px 55px rgb(50 39 25 / .22); }
:root[data-theme="light"] .phm-story { background: color-mix(in srgb, var(--pb-bg-soft) 80%, #d4d0c9); }

@media (max-width: 980px) {
  .phm-hero { min-height: auto; grid-template-columns: 1fr; width: min(760px, calc(100% - 3rem)); padding-top: 5rem; }
  .phm-hero-copy { max-width: 660px; }
  .phm-hero-visual { margin-top: 1rem; }
  .phm-visible-grid, .phm-progress, .phm-story-pair, .phm-launcher-row, .phm-local, .phm-open { grid-template-columns: 1fr; }
  .phm-sticky-copy { position: static; max-width: 700px; }
  .phm-screen--large { margin-top: 0; }
  .phm-progress-copy { grid-row: 1; max-width: 700px; }
  .phm-story-pair { width: min(760px, calc(100% - 3rem)); }
  .phm-three-words { align-items: center; }
  .phm-local-mark { width: min(380px, 80vw); justify-self: center; }
  .phm-open-copy { max-width: 700px; }
  .phm-footer { grid-template-columns: 1fr 1fr; }
  .phm-footer nav { justify-content: flex-end; }
  .phm-footer-note { grid-column: 1 / -1; text-align: center; }
}

@media (max-width: 680px) {
  .phm-section, .phm-footer { width: calc(100% - 1.5rem); }
  .phm-hero { width: calc(100% - 1.5rem); padding: 4.5rem 0 4rem; }
  .phm-pebblab { margin-bottom: 3rem; }
  .phm-pebblab span { max-width: 140px; }
  .phm-hero h1 { font-size: clamp(4.1rem, 23vw, 6.5rem); }
  .phm-hero h1 span { margin-left: .16em; }
  .phm-hero-visual { padding: 7% 2% 8%; }
  .phm-lobster { width: 54px; height: 54px; right: -2%; top: -5%; font-size: 1.55rem; }
  .phm-orbit--two { inset: 8% 0; }
  .phm-problem-grid, .phm-suite-head { grid-template-columns: 1fr; gap: 2rem; }
  .phm-page h2 { font-size: clamp(2.5rem, 14vw, 4rem); }
  .phm-quote { max-width: 330px; justify-self: center; }
  .phm-tool-list li { grid-template-columns: 34px 1fr; gap: 1rem; padding-block: 1.1rem; }
  .phm-tool-list code { grid-column: 2; justify-self: start; text-align: left; }
  .phm-window-bar { height: 28px; }
  .phm-screen--hero, .phm-screen--large, .phm-progress-art .phm-screen, .phm-screen--launcher, .phm-cinema--closing { transform: none; }
  .phm-cinema--wide { width: 100%; }
  .phm-cinema img { border-radius: 0; }
  .phm-cinema figcaption { position: static; max-width: none; background: #171717; }
  .phm-story-copy { padding-inline: .75rem; }
  .phm-story-pair { width: calc(100% - 1.5rem); }
  .phm-cinema--portrait img { border-radius: var(--radius-md); }
  .phm-cinema--portrait figcaption { border-radius: 0 0 var(--radius-md) var(--radius-md); }
  .phm-three-words { font-size: clamp(2.8rem, 15vw, 4.5rem); }
  .phm-footer { grid-template-columns: 1fr; text-align: center; }
  .phm-footer > div, .phm-footer nav { justify-content: center; }
  .phm-footer-note { grid-column: auto; }
  .phm-expand { opacity: 1; }
  .pb-theme-toggle { top: .75rem; right: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .phm-button:hover { transform: none; }
}

@media (forced-colors: active) {
  .phm-screen, .phm-quote, .phm-local-mark, .phm-button { border: 1px solid CanvasText; }
}

/* Long-form story, expanded product proof, and closing horizon. */
.phm-deck {
  max-width: 42rem;
  font-size: clamp(2rem, 3.5vw, 3.35rem) !important;
  line-height: 1.04;
}

.phm-story-lede {
  max-width: 780px;
  color: var(--pb-muted);
  font-size: var(--text-lede) !important;
}
.phm-teaser {
  display: grid;
  grid-template-columns: 1.15fr .85fr 1fr;
  gap: clamp(.75rem, 2vw, 1.5rem);
  padding-bottom: 3rem;
}
.phm-teaser figure,
.phm-proof-grid figure,
.phm-progress-gallery figure { margin: 0; }
.phm-teaser figure:nth-child(2) { transform: translateY(1.5rem) rotate(-1deg); }
.phm-teaser figure:nth-child(3) { transform: rotate(1deg); }
.phm-teaser img {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: 0 22px 54px rgb(0 0 0 / .32);
}
.phm-teaser figcaption,
.phm-proof-grid figcaption,
.phm-progress-gallery figcaption {
  margin-top: .65rem;
  color: var(--pb-muted);
  font: var(--text-xs) var(--font-mono);
  letter-spacing: .04em;
}
.phm-fairy { border-block: 1px dashed var(--phm-line); }
.phm-fairy > summary {
  min-height: 72px;
  width: min(1180px, calc(100% - 3rem));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  color: var(--pb-heading);
  font: 700 var(--text-lede) var(--font-body);
  cursor: pointer;
  list-style: none;
}
.phm-fairy > summary::-webkit-details-marker { display: none; }
.phm-fairy > summary:focus-visible { outline: 2px dashed var(--pb-accent); outline-offset: 7px; }
.phm-summary-mark { color: var(--pb-accent); font-size: 2rem; font-weight: 400; transition: transform .2s ease; }
.phm-summary-close { display: none; }
.phm-fairy[open] .phm-summary-open { display: none; }
.phm-fairy[open] .phm-summary-close { display: inline; }
.phm-fairy[open] .phm-summary-mark { transform: rotate(45deg); }
.phm-story-note { padding: 2rem 0 0; }
.phm-story-note p {
  max-width: 760px;
  margin: 0;
  padding: 1rem 1.2rem;
  border-left: 2px solid var(--pb-accent);
  color: var(--pb-muted);
  font-size: var(--text-sm);
}
.phm-fairy-canonical {
  width: min(820px, calc(100% - 3rem));
  margin-inline: auto;
  padding: clamp(4rem, 8vw, 7rem) 0;
  font-family: var(--font-body);
}
.phm-fairy-canonical > h1 {
  margin: 0 0 3rem;
  color: var(--pb-heading);
  font: clamp(3.2rem, 7vw, 6rem)/.95 var(--font-display);
  text-align: center;
}
.phm-fairy-canonical h3 {
  margin: 5rem 0 1.25rem;
  color: var(--pb-heading);
  font: clamp(2.3rem, 5vw, 4rem)/1 var(--font-display);
}
.phm-fairy-canonical h4 {
  margin: 3rem 0 1rem;
  color: var(--pb-accent);
  font: 700 clamp(1.25rem, 2vw, 1.6rem)/1.3 var(--font-body);
}
.phm-fairy-canonical p,
.phm-fairy-canonical li { color: var(--pb-muted); font-size: var(--text-lede); }
.phm-fairy-canonical em { color: var(--pb-body); }
.phm-fairy-canonical strong { color: var(--pb-heading); }
.phm-fairy-canonical blockquote {
  margin: 2.5rem 0;
  padding: 1.5rem 1.75rem;
  border-left: 2px solid var(--pb-accent);
  background: color-mix(in srgb, var(--pb-bg) 55%, transparent);
}
.phm-fairy-canonical blockquote p { margin: 0; font-size: var(--text-body); }
.phm-fairy-canonical code { color: var(--phm-yellow); }
.phm-fairy-canonical ul { margin: 1rem 0 2rem; }
.phm-fairy-canonical .story-break { width: 55%; margin: 4rem auto; border: 0; border-top: 1px dashed var(--phm-line); }
.phm-fairy-canonical .false-end { text-align: center; letter-spacing: .08em; }
.phm-fairy-canonical .lobster-box {
  width: fit-content;
  margin: 2rem auto;
  padding: 1rem 1.4rem;
  border: 1px dashed var(--phm-pink);
  border-radius: var(--radius-md);
  font-size: 3rem;
}
.phm-fairy-figure {
  width: min(730px, calc(100vw - 3rem));
  margin: clamp(2rem, 4vw, 3.5rem) 0 clamp(2.5rem, 5vw, 4rem) 50%;
  transform: translateX(-50%);
}
.phm-fairy-figure:nth-of-type(5) { width: min(490px, calc(100vw - 3rem)); }
.phm-fairy-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
  box-shadow: 0 25px 65px rgb(0 0 0 / .38);
}
.phm-fairy-figure figcaption {
  margin-top: .7rem;
  color: var(--pb-muted);
  font: var(--text-xs) var(--font-mono);
  letter-spacing: .04em;
}
.phm-story-close-wrap { display: flex; justify-content: center; padding: 0 0 5rem; }

.phm-trace { padding: clamp(6rem, 12vw, 11rem) 0; border-top: 1px dashed var(--phm-line); }
.phm-trace-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(3rem, 8vw, 7rem); align-items: end; }
.phm-trace h2 { margin: 0; }
.phm-trace-grid p { color: var(--pb-muted); font-size: var(--text-lede); }
.phm-trace-grid p:first-child { color: var(--pb-heading); font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.6rem); }

.phm-reference-column { padding-top: 3rem; }
.phm-reference-card {
  padding: clamp(1.4rem, 3vw, 2.3rem);
  border: 1px dashed var(--pb-accent);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--pb-bg-soft) 84%, transparent);
  transform: rotate(.5deg);
}
.phm-example-tag { color: var(--pb-accent); font: var(--text-xs) var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.phm-reference-card h3 { margin: 1rem 0 1.5rem; color: var(--pb-heading); font-size: clamp(1.8rem, 3vw, 2.5rem); }
.phm-reference-card dl { margin: 0 0 1.5rem; border-top: 1px dashed var(--phm-line); }
.phm-reference-card dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px dashed var(--phm-line); }
.phm-reference-card dt { color: var(--pb-muted); font: var(--text-xs) var(--font-mono); }
.phm-reference-card dd { margin: 0; color: var(--pb-heading); text-align: right; }
.phm-reference-card p { margin-bottom: 0; color: var(--pb-muted); font-size: var(--text-sm); }

.phm-suite-proof { padding-top: clamp(6rem, 11vw, 10rem); }
.phm-real-head { max-width: 900px; }
.phm-real-head h2 { margin-bottom: 1.2rem; }
.phm-real-head > p:last-child { max-width: 700px; color: var(--pb-muted); font-size: var(--text-lede); }
.phm-proof-grid { display: grid; grid-template-columns: 1.06fr .94fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; margin-top: 4rem; }
.phm-proof-grid figure:nth-child(2) { margin-top: 6rem; }
.phm-proof-grid .phm-screen { transform: rotate(-.7deg); }
.phm-proof-grid figure:nth-child(2) .phm-screen { transform: rotate(.8deg); }

.phm-progress {
  display: grid;
  grid-template-columns: .78fr 1.22fr;
  gap: clamp(3rem, 7vw, 6rem);
  align-items: start;
  padding: clamp(7rem, 12vw, 11rem) 0;
}
.phm-progress-label { grid-column: 1 / -1; margin-bottom: -1rem; }
.phm-progress-copy { position: sticky; top: 4rem; }
.phm-progress-copy h2 { margin-bottom: 1.5rem; }
.phm-progress-copy p { color: var(--pb-muted); }
.phm-progress-copy strong { color: var(--pb-heading); }
.phm-progress-gallery { display: grid; gap: 3rem; }
.phm-progress-gallery figure:nth-child(2) { margin-left: 8%; }
.phm-screen--light { border-color: #8b806e; background: #eee; }

.phm-local .phm-three-words { margin-top: 3rem; font-size: clamp(2.4rem, 4vw, 4.5rem); }
.phm-source-note {
  min-height: 340px;
  display: grid;
  place-content: center;
  padding: 2rem;
  border: 1px dashed var(--pb-accent);
  border-radius: 49% 51% 46% 54%;
  color: var(--pb-muted);
  text-align: center;
  transform: rotate(2deg);
}
.phm-source-note span { color: var(--phm-blue); font: clamp(2.6rem, 6vw, 6rem) var(--font-mono); }
.phm-source-note p { font-family: var(--font-display); font-size: clamp(1.6rem, 2.5vw, 2.3rem); }

.phm-future { padding: clamp(5rem, 10vw, 9rem) 0 clamp(6rem, 10vw, 9rem); background: color-mix(in srgb, var(--pb-bg-soft) 72%, var(--pb-bg)); border-top: 1px dashed var(--phm-line); }
.phm-future-copy { display: grid; grid-template-columns: .7fr 1.3fr; column-gap: clamp(3rem, 8vw, 7rem); }
.phm-future-copy .phm-section-label { grid-column: 1 / -1; }
.phm-future-copy h2 { grid-row: span 2; margin: 0; }
.phm-future-copy p { color: var(--pb-muted); font-size: var(--text-lede); }
.phm-cinema--future { width: min(1080px, calc(100% - 3rem)); margin: 4rem auto 0; }

:root[data-theme="light"] .phm-fairy-canonical blockquote,
:root[data-theme="light"] .phm-reference-card { background: color-mix(in srgb, var(--pb-bg-soft) 88%, white); }
:root[data-theme="light"] .phm-future { background: color-mix(in srgb, var(--pb-bg-soft) 82%, #d4d0c9); }
:root[data-theme="light"] .phm-fairy-canonical code { color: #725520; }

@media (max-width: 980px) {
  .phm-trace-grid,
  .phm-proof-grid,
  .phm-progress,
  .phm-future-copy { grid-template-columns: 1fr; }
  .phm-progress-label { grid-column: auto; }
  .phm-progress-copy { position: static; }
  .phm-proof-grid figure:nth-child(2) { margin-top: 1rem; }
  .phm-future-copy .phm-section-label { grid-column: auto; }
  .phm-future-copy h2 { grid-row: auto; }
  .phm-source-note { min-height: 260px; }
}

@media (max-width: 680px) {
  .phm-deck { font-size: clamp(1.9rem, 10vw, 2.7rem) !important; }
  .phm-teaser { grid-template-columns: 1fr 1fr; }
  .phm-teaser figure:nth-child(2), .phm-teaser figure:nth-child(3) { transform: none; }
  .phm-teaser figure:first-child { grid-column: 1 / -1; }
  .phm-fairy > summary,
  .phm-fairy-canonical { width: calc(100% - 1.5rem); }
  .phm-fairy-canonical > h1 { font-size: 3.1rem; }
  .phm-fairy-canonical h3 { margin-top: 4rem; }
  .phm-fairy-canonical p,
  .phm-fairy-canonical li { font-size: var(--text-body); }
  .phm-fairy-figure { width: 100vw; }
  .phm-fairy-figure img { border-radius: 0; }
  .phm-reference-card { transform: none; }
  .phm-reference-card dl div { display: block; }
  .phm-reference-card dd { margin-top: .2rem; text-align: left; }
  .phm-progress-gallery figure:nth-child(2) { margin-left: 0; }
  .phm-cinema--future { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .phm-summary-mark { transition: none; }
}

/* Review pass: compact navigation, reordered content, and software gallery. */
.phm-hero-nav {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem .9rem;
  border: 1px dashed var(--pb-accent);
  border-radius: var(--radius-md);
  color: var(--pb-heading);
  font: 700 var(--text-body) var(--font-body);
  text-decoration: none;
}
.phm-hero-nav:hover { background: color-mix(in srgb, var(--pb-accent) 10%, transparent); transform: translateY(-1px); }
.phm-hero-nav span { color: var(--pb-accent); }

.phm-teaser {
  display: block;
  max-width: 1080px;
  padding-bottom: 3rem;
}
.phm-teaser img {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}
.phm-teaser figcaption {
  margin-top: .7rem;
  color: var(--pb-muted);
  font: var(--text-xs) var(--font-mono);
  letter-spacing: .04em;
}

.phm-trace { padding: clamp(4rem, 8vw, 7rem) 0; }
.phm-trace-bubble {
  width: min(880px, 92%);
  margin: 1rem auto 0;
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px dashed var(--pb-accent);
  border-radius: 48% 52% 46% 54% / 52% 45% 55% 48%;
  text-align: center;
  transform: rotate(-.7deg);
}
.phm-trace-bubble h2 { margin: 0; font-size: clamp(2.4rem, 5vw, 4.5rem); }
.phm-trace-bubble p {
  max-width: 580px;
  margin: 1rem auto 0;
  color: var(--pb-muted);
  font-size: var(--text-lede);
}

.phm-progress-data {
  margin-top: 2rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px dashed var(--pb-accent);
  border-radius: var(--radius-md);
  transform: rotate(.5deg);
}
.phm-progress-data p { color: var(--pb-muted); }
.phm-progress-data strong { color: var(--pb-heading); font-size: var(--text-lede); }
.phm-data-evidence { display: grid; gap: .8rem; margin-top: 1.5rem; }
.phm-data-evidence figure { margin: 0; overflow: hidden; border: 1px solid var(--phm-line); border-radius: var(--radius-md); background: #24262c; }
.phm-data-evidence figure:first-child { width: 100%; }
.phm-data-evidence figure:last-child { width: min(68%, 360px); justify-self: end; transform: rotate(-1deg); }
.phm-data-evidence img { width: 100%; height: auto; display: block; }

.phm-software { padding: clamp(7rem, 12vw, 11rem) 0; }
.phm-software-head { max-width: 920px; }
.phm-software-head h2 { margin: 0 0 1.25rem; }
.phm-software-head > p:last-child { max-width: 720px; color: var(--pb-muted); font-size: var(--text-lede); }
.phm-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
  margin-top: 4rem;
}
.phm-gallery figure { margin: 0; }
.phm-gallery-trigger {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--pb-accent) 58%, #333);
  border-radius: var(--radius-md);
  background: #15171c;
  box-shadow: 0 18px 42px rgb(0 0 0 / .32);
  cursor: zoom-in;
}
.phm-gallery-trigger img { width: 100%; height: 100%; display: block; object-fit: contain; }
.phm-gallery-trigger:hover { border-color: var(--pb-accent); transform: translateY(-2px); }
.phm-gallery-trigger:focus-visible { outline: 2px dashed var(--pb-accent); outline-offset: 5px; }
.phm-gallery figcaption {
  margin-top: .65rem;
  color: var(--pb-heading);
  font: var(--text-sm) var(--font-mono);
}

.phm-lightbox {
  width: auto;
  max-width: none;
  height: auto;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: white;
  overflow: visible;
}
.phm-lightbox::backdrop { background: rgb(7 8 10 / .9); backdrop-filter: blur(5px); }
.phm-lightbox-panel {
  position: relative;
  width: min(94vw, 1500px);
  height: 92vh;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 1rem;
}
.phm-lightbox figure {
  min-width: 0;
  max-height: 90vh;
  margin: 0;
  display: grid;
  justify-items: center;
  gap: .75rem;
}
.phm-lightbox figure img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
  box-shadow: 0 28px 80px rgb(0 0 0 / .65);
}
.phm-lightbox figcaption { color: #eee; font: var(--text-sm) var(--font-mono); text-align: center; }
.phm-lightbox button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid rgb(255 255 255 / .55);
  border-radius: 50%;
  background: rgb(20 21 24 / .84);
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}
.phm-lightbox button:hover { border-color: var(--pb-accent); color: var(--pb-accent); }
.phm-lightbox button:focus-visible { outline: 2px dashed var(--pb-accent); outline-offset: 4px; }
.phm-lightbox-close { position: absolute; z-index: 2; top: 0; right: 0; }

.phm-jump-nav {
  position: fixed;
  z-index: 30;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.phm-jump-nav a {
  min-width: 58px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .45rem .6rem;
  border: 1px solid color-mix(in srgb, var(--pb-accent) 55%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--pb-bg-soft) 92%, transparent);
  color: var(--pb-heading);
  box-shadow: 0 8px 24px rgb(0 0 0 / .22);
  text-decoration: none;
  backdrop-filter: blur(8px);
}
.phm-jump-nav a:hover { border-color: var(--pb-accent); }
.phm-jump-nav a:focus-visible { outline: 2px dashed var(--pb-accent); outline-offset: 4px; }
.phm-jump-nav span { color: var(--pb-accent); font-size: 1.1rem; }
.phm-jump-nav small { font: .67rem var(--font-mono); }

.phm-problem-responses { display: grid; gap: 1.5rem; justify-items: center; }
.phm-learner-response {
  max-width: 360px;
  margin: 0;
  color: var(--pb-heading);
  font: clamp(1.6rem, 2.7vw, 2.3rem)/1.15 var(--font-display) !important;
  transform: rotate(-1deg);
}
.phm-local-line { color: var(--pb-heading) !important; font: clamp(2rem, 3.5vw, 3.2rem)/1.05 var(--font-display) !important; }

:root[data-theme="light"] .phm-gallery-trigger { border-color: #8b806e; background: #e8e5df; }
:root[data-theme="light"] .phm-progress-data { background: color-mix(in srgb, var(--pb-bg-soft) 88%, white); }

@media (max-width: 980px) {
  .phm-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phm-lightbox-panel { width: 96vw; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: .4rem; }
}

@media (max-width: 680px) {
  .phm-teaser figure:first-child { grid-column: auto; }
  .phm-trace-bubble { width: 100%; padding: 2rem 1rem; transform: none; }
  .phm-gallery { grid-template-columns: 1fr 1fr; gap: .8rem; }
  .phm-gallery figcaption { font-size: .7rem; }
  .phm-jump-nav { right: .6rem; bottom: .6rem; }
  .phm-jump-nav a { min-width: 44px; padding: .35rem; }
  .phm-jump-nav small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .phm-lightbox-panel { grid-template-columns: 42px minmax(0, 1fr) 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .phm-gallery-trigger:hover, .phm-hero-nav:hover { transform: none; }
}
