  /* ── project hover card, right-side editorial panel ── */
  .project-hovercard {
    position: fixed;
    left: calc(50% + 290px);
    right: 6vw;
    top: 50%;
    transform: translateY(-50%) translateX(16px);
    max-width: 440px;
    font-family: var(--serif);
    color: var(--ink);
    text-align: left;
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease, transform .6s cubic-bezier(.2,.8,.2,1);
    z-index: 14;
  }
  .project-hovercard.show {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
  .project-hovercard .pc-chunk {
    opacity: 0;
    transition: opacity .55s ease, transform .6s cubic-bezier(.2,.8,.2,1);
    transform: translateY(4px);
    display: block;
  }
  .project-hovercard.show .pc-chunk {
    opacity: 1;
    transform: translateY(0);
  }
  .project-hovercard.show .pc-chunk:nth-child(1) { transition-delay: .12s; }
  .project-hovercard.show .pc-chunk:nth-child(2) { transition-delay: .28s; }
  .project-hovercard.show .pc-chunk:nth-child(3) { transition-delay: .44s; }
  .project-hovercard.show .pc-chunk:nth-child(4) { transition-delay: .6s; }
  .project-hovercard .pc-cover {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--bg-tint);
    border: 1px solid var(--line);
    margin-bottom: 20px;
  }
  .project-hovercard .pc-cover img,
  .project-hovercard .pc-cover video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .project-hovercard .pc-meta {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin-bottom: 14px;
  }
  .project-hovercard .pc-title {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 42px;
    line-height: 1.02;
    letter-spacing: -.02em;
    color: var(--ink);
    margin: 0 0 16px 0;
  }
  .project-hovercard .pc-summary {
    font-family: var(--serif);
    font-size: 20px;
    line-height: 1.5;
    color: var(--ink-soft);
    margin: 0;
    text-wrap: pretty;
  }

  /* ── overlay panel ─────────────────────────── */
  .panel-scrim {
    position: fixed; inset: 0;
    background: rgba(26,26,26,0);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    pointer-events: none;
    transition: background .4s, backdrop-filter .4s, -webkit-backdrop-filter .4s;
    z-index: 30;
  }
  .panel-scrim.show {
    background: rgba(26,26,26,.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: auto;
  }
  .panel {
    position: fixed;
    inset: 5vh 5vw;
    --media-width: min(calc(90vw - 128px), 1400px);
    background: var(--card);
    border: 1px solid var(--line);
    transform: scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition: transform .5s cubic-bezier(.2,.8,.2,1),
                opacity .4s,
                inset .5s cubic-bezier(.2,.8,.2,1),
                border-width .4s,
                border-radius .5s cubic-bezier(.2,.8,.2,1);
    z-index: 40;
    display: flex; flex-direction: column;
    box-shadow: 0 30px 80px -20px rgba(26,26,26,.28);
  }
  .panel.open {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
  }
  .panel.expanded {
    inset: 0;
    --media-width: min(calc(100vw - 192px), 1600px);
    border: 0;
    box-shadow: none;
  }

  /* On large screens, never let media or demos exceed the viewport height
     left over once the minimized project header (~80px) is accounted for.
     The demo frame's 1512:945 aspect ratio is the tightest, so we cap
     --media-width at (available-height × 1.6) — that keeps both the demo
     and the cover (16:9) fitting on screen with a small breathing margin. */
  @media (min-width: 1500px) {
    .panel {
      --media-width: min(calc(90vw - 128px), 1400px, calc((100vh - 100px) * 1.6));
    }
    .panel.expanded {
      --media-width: min(calc(100vw - 192px), 1600px, calc((100vh - 100px) * 1.6));
    }
    .panel .main-media .media-item img,
    .panel .main-media .media-item video,
    .panel .inline-figure img,
    .panel .inline-figure video {
      max-height: calc(100vh - 100px);
      width: auto;
      max-width: 100%;
      height: auto;
      margin-left: auto;
      margin-right: auto;
    }
  }

  .panel-head {
    padding: 36px 64px 24px 64px;
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 20px;
    border-bottom: 1px solid var(--line);
    transition: padding .3s cubic-bezier(.2,.8,.2,1);
  }
  .panel-eyebrow {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin-bottom: 10px;
    transition: opacity .3s, max-height .3s, margin .3s;
    overflow: hidden;
  }
  .panel-title {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 48px;
    line-height: 1.02;
    letter-spacing: -.02em;
    margin: 0 0 6px 0;
    transition: font-size .3s cubic-bezier(.2,.8,.2,1), margin .3s;
  }
  .panel-title em {
    color: var(--accent);
    font-weight: 500;
  }
  .panel-sub {
    font-family: var(--serif);
    font-size: 15px;
    color: var(--ink-soft);
    transition: opacity .3s, max-height .3s, margin .3s;
    overflow: hidden;
  }
  .panel.scrolled .panel-head {
    padding: 14px 64px 12px 64px;
    align-items: center;
  }
  .panel.expanded.scrolled .panel-head {
    padding: 16px 96px 14px 96px;
    align-items: center;
  }
  .panel.scrolled .panel-title {
    font-size: 20px;
    margin: 0;
  }
  .panel.scrolled .panel-eyebrow,
  .panel.scrolled .panel-sub {
    opacity: 0;
    max-height: 0;
    margin: 0;
  }
  .panel.expanded.scrolled .panel-title { font-size: 28px; }

  .panel-ctrls { display: flex; gap: 6px; flex-shrink: 0; }
  .ibtn {
    width: 34px; height: 34px;
    border: 1px solid var(--line);
    background: transparent;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--ink-soft);
    transition: background .2s, color .2s, border-color .2s;
  }
  .ibtn:hover {
    background: var(--ink);
    color: var(--bg);
    border-color: var(--ink);
  }
  .ibtn:disabled {
    opacity: .3;
    cursor: not-allowed;
  }
  .ibtn:disabled:hover {
    background: transparent;
    color: var(--ink-soft);
    border-color: var(--line);
  }
  .ibtn svg { width: 14px; height: 14px; }
  .nav-btn { display: inline-flex; }
  .nav-btn + .nav-btn { margin-right: 4px; }

  .panel-seg {
    display: inline-flex;
    align-items: stretch;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 2px;
    background: transparent;
    align-self: center;
    flex-shrink: 0;
  }
  .panel-seg button {
    padding: 0 10px;
    background: transparent;
    border: 0;
    color: var(--ink-mute);
    cursor: pointer;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .25s, color .25s;
  }
  .panel-seg button svg {
    width: 14px;
    height: 14px;
    display: block;
  }
  .panel-seg button:hover:not(.on) { color: var(--ink); }
  .panel-seg button.on {
    background: var(--ink);
    color: var(--bg);
  }

  .panel-body {
    display: block;
    overflow-y: auto;
    padding: 48px 64px 64px 64px;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
  }
  .panel-body::-webkit-scrollbar { width: 6px; }
  .panel-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
  .pb-cols { display: flex; flex-direction: column; }
  .main-media { margin: 8px 0 32px 0; }

  .panel .stat-row {
    max-width: 980px;
    margin: 0 auto 28px auto;
  }
  .panel .preview,
  .panel .media-stack {
    margin: 8px auto 40px auto;
    max-width: 1400px;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
  }
  .panel .preview { max-height: 40vh; }
  .panel .media-stack .media-item {
    max-height: 40vh;
    margin-left: auto;
    margin-right: auto;
  }
  /* Cover uses the same breakout width as inline body figures so they match */
  .panel .main-media {
    width: var(--media-width);
    max-width: none;
    margin-top: 8px;
    margin-bottom: 40px;
    margin-left: calc((100% - var(--media-width)) / 2);
    margin-right: calc((100% - var(--media-width)) / 2);
  }
  .panel .main-media .media-item {
    width: 100%;
    margin: 0;
  }
  .panel .main-media .media-item img,
  .panel .main-media .media-item video {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    border: 1px solid var(--line);
    background: var(--bg-tint);
  }
  .panel .lede {
    max-width: 980px;
    margin: 0 auto 24px auto;
  }
  .panel .pb-cols {
    max-width: 680px;
    margin: 0 auto;
  }

  /* Slide wrapper is neutral in modal & presentation modes */
  .panel .slide { display: block; }

  /* Slides mode, fullscreen, section-by-section scroll-snap */
  .panel.slides {
    inset: 0;
    border: 0;
    box-shadow: none;
  }
  .panel.slides .panel-head {
    padding: 24px 56px 18px 56px;
  }
  .panel.slides .panel-title { font-size: 26px; }
  .panel.slides .panel-body {
    padding: 0;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
  }
  .panel.slides .pb-cols { display: block; max-width: none; margin: 0; }
  .panel.slides .pb-main,
  .panel.slides .pb-side { max-width: none; margin: 0; }
  .panel.slides .slide {
    min-height: calc(100vh - 72px);
    padding: 8vh 10vw;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    max-width: none;
  }
  .panel.slides .slide > * {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }
  .panel.slides .slide-body > .body-section { margin-top: 0; }
  .panel.slides .body-heading { font-size: 44px; line-height: 1.12; }
  .panel.slides .body-text { font-size: 22px; line-height: 1.5; }
  .panel.slides .body-list { font-size: 22px; line-height: 1.5; }
  .panel.slides .body-caption { font-size: 11px; margin-bottom: 14px; }
  .panel.slides .lede { font-size: 32px; line-height: 1.3; }
  .panel.slides .stat-row { max-width: 980px; }
  .panel.slides .main-media { max-width: 980px; margin: 24px auto 0 auto; }
  .panel.slides .slide-intro .main-media { max-height: 60vh; }
  .panel.slides .slide-tags .section-head {
    font-size: 12px;
    margin-bottom: 20px;
  }

  /* Presentation mode, fullscreen, bigger padding and content caps */
  .panel.expanded .panel-body {
    padding: 72px 96px 96px 96px;
  }
  .panel.expanded .panel-head {
    padding: 56px 96px 28px 96px;
  }
  .panel.expanded .panel-title { font-size: 64px; }
  .panel.expanded .stat-row,
  .panel.expanded .lede {
    max-width: 1200px;
  }
  .panel.expanded .preview,
  .panel.expanded .media-stack {
    max-width: 1600px;
  }
  .panel.expanded .preview { max-height: 50vh; }
  .panel.expanded .media-item { max-height: 50vh; }
  .panel.expanded .pb-cols {
    max-width: 780px;
  }

  .stat-row {
    display: flex; gap: 32px;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
    margin-bottom: 28px;
  }
  .stat { display: flex; flex-direction: column; gap: 4px; }
  .stat .k {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-mute);
  }
  .stat .v {
    font-family: var(--serif);
    font-size: 16px;
    color: var(--ink);
  }

  .lede {
    font-family: var(--serif);
    font-size: 22px;
    line-height: 1.4;
    letter-spacing: -.005em;
    color: var(--ink);
    margin: 0 0 28px 0;
    text-wrap: pretty;
  }
  .lede::first-letter {
    color: var(--accent);
  }
  .body-text {
    font-family: var(--serif);
    font-size: 19px;
    line-height: 1.6;
    color: var(--ink);
    margin-bottom: 26px;
    text-wrap: pretty;
  }
  .body-heading {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 26px;
    line-height: 1.2;
    letter-spacing: -.015em;
    color: var(--ink);
    margin: 68px 0 16px 0;
    text-wrap: pretty;
  }
  .body-section { margin: 68px 0 18px 0; }
  .body-section .body-heading { margin: 0; }
  .body-caption {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin-bottom: 8px;
  }
  .body-list {
    font-family: var(--serif);
    font-size: 19px;
    line-height: 1.6;
    color: var(--ink);
    margin: 8px 0 30px 0;
    padding-left: 22px;
  }
  .body-list li {
    margin-bottom: 6px;
    text-wrap: pretty;
  }

  /* Changelog list — date column on the left, entry on the right. */
  .body-changelog {
    list-style: none;
    margin: 8px 0 30px 0;
    padding: 0;
    border-top: 1px solid var(--line);
  }
  .body-changelog-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 24px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
  }
  .body-changelog-date {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink-mute);
    padding-top: 3px;
  }
  .body-changelog-body { min-width: 0; }
  .body-changelog-title {
    font-family: var(--serif);
    font-size: 18px;
    line-height: 1.4;
    color: var(--ink);
  }
  .body-changelog-note {
    font-family: var(--serif);
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink-soft);
    margin-top: 4px;
  }
  @media (max-width: 720px) {
    .body-changelog-row { grid-template-columns: 76px 1fr; gap: 16px; padding: 14px 0; }
    .body-changelog-title { font-size: 16px; }
    .body-changelog-note { font-size: 14px; }
  }
  .inline-figure {
    margin: 24px 0 28px 0;
    padding: 0;
  }
  .panel .inline-figure {
    /* break out of the reading column to match the main-media (cover) width */
    width: var(--media-width);
    max-width: none;
    margin-left: calc((100% - var(--media-width)) / 2);
    margin-right: calc((100% - var(--media-width)) / 2);
  }
  .inline-figure img,
  .inline-figure video {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
    background: var(--bg-tint);
  }

  /* link card, used when a site can't be embedded in an iframe */
  .inline-link {
    margin: 16px 0;
    display: block;
    padding: 18px 22px;
    border: 1px solid var(--line);
    background: var(--bg-tint);
    text-decoration: none;
    color: inherit;
    transition: background 140ms ease, transform 140ms ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
  }
  .inline-link:hover {
    background: #fff;
  }
  .inline-link .il-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .inline-link .il-title {
    display: block;
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.3;
  }
  .inline-link .il-desc {
    display: block;
    font-size: 13px;
    color: var(--ink-soft);
    line-height: 1.4;
  }
  .inline-link .il-arrow {
    flex: none;
    color: var(--ink-soft);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
  }
  .inline-link:hover .il-arrow { color: var(--accent); }

  /* CTA — bold call-to-action card for visiting an external site */
  .inline-cta {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 28px;
    margin: 28px 0 32px 0;
    padding: 28px 32px;
    background: var(--accent);
    color: var(--card);
    text-decoration: none;
    border-radius: 14px;
    overflow: hidden;
    transition: transform 220ms cubic-bezier(.2,.7,.2,1), box-shadow 220ms ease, background 220ms ease;
    box-shadow: 0 1px 0 rgba(26,26,26,.06);
    isolation: isolate;
  }
  .inline-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(140% 100% at 100% 0%, rgba(255,255,255,0.22), transparent 55%);
    pointer-events: none;
    z-index: 0;
  }
  .inline-cta:hover {
    background: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(26,26,26,0.18);
  }
  .inline-cta .ic-body {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .inline-cta .ic-eyebrow {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    opacity: 0.82;
  }
  .inline-cta .ic-title {
    font-family: var(--serif);
    font-size: 30px;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.01em;
  }
  .inline-cta .ic-desc {
    font-size: 14px;
    line-height: 1.55;
    opacity: 0.92;
    max-width: 38ch;
  }
  .inline-cta .ic-action {
    position: relative;
    z-index: 1;
    flex: none;
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
  }
  .inline-cta .ic-host {
    transition: opacity 200ms ease;
  }
  .inline-cta .ic-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    transition: transform 220ms cubic-bezier(.2,.7,.2,1), background 220ms ease;
  }
  .inline-cta .ic-glyph svg {
    width: 20px;
    height: 20px;
  }
  .inline-cta:hover .ic-glyph {
    transform: translateX(4px);
    background: rgba(255,255,255,0.28);
  }
  @media (max-width: 640px) {
    .inline-cta {
      flex-direction: column;
      align-items: flex-start;
      gap: 22px;
      padding: 24px 22px;
    }
    .inline-cta .ic-title {
      font-size: 26px;
    }
    .inline-cta .ic-action {
      align-self: stretch;
      justify-content: space-between;
    }
  }

  /* interactive demo (iframe), same breakout width as inline-figure */
  .inline-demo-wrap {
    position: relative;
    margin: 24px 0 28px 0;
  }
  .inline-demo {
    margin: 0;
    padding: 0;
    width: 100%;
  }
  .panel .inline-demo-wrap {
    width: var(--media-width);
    max-width: none;
    margin-left: calc((100% - var(--media-width)) / 2);
    margin-right: calc((100% - var(--media-width)) / 2);
  }
  .demo-badge {
    position: absolute;
    top: -28px;
    left: -22px;
    width: 92px;
    height: 92px;
    z-index: 4;
    pointer-events: none;
    background: #c6efb1;
    border-radius: 50%;
    box-shadow: 0 10px 24px -6px rgba(120,180,90,.45), 0 2px 6px rgba(120,180,90,.22), 0 1px 0 rgba(255,255,255,.55) inset;
  }
  .demo-badge-spin {
    width: 100%;
    height: 100%;
    animation: demo-badge-spin 9s linear infinite;
  }
  @keyframes demo-badge-spin {
    to { transform: rotate(360deg); }
  }
  .demo-badge-text {
    font-family: var(--mono);
    font-size: 8.5px;
    letter-spacing: .22em;
    text-transform: uppercase;
    fill: #1a1a1a;
  }
  .demo-badge-logo {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
  }
  .demo-badge-logo svg {
    width: 22px;
    height: 22px;
    display: block;
  }
  .demo-badge-tip {
    position: absolute;
    top: 100%;
    left: 0;
    transform: translateY(10px);
    background: var(--ink, #15151c);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-family: var(--sans, "Inter", system-ui, sans-serif);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    white-space: normal;
    width: max-content;
    max-width: 220px;
    text-align: left;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 160ms ease, transform 160ms ease;
    box-shadow: 0 8px 22px -8px rgba(0,0,0,0.35);
    z-index: 5;
  }
  .demo-badge-tip::before {
    content: "";
    position: absolute;
    top: -4px;
    left: 42px;
    transform: rotate(45deg);
    width: 8px;
    height: 8px;
    background: inherit;
  }
  @media (hover: hover) and (pointer: fine) {
    .demo-badge { pointer-events: auto; cursor: help; }
    .demo-badge:hover .demo-badge-tip {
      opacity: 1;
      visibility: visible;
      transform: translateY(4px);
    }
  }
  .inline-demo-frame {
    container-type: inline-size;
    aspect-ratio: 1512 / 945;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #fff;
    position: relative;
    box-shadow: 0 4px 14px rgba(16,24,40,.06);
  }
  .inline-demo-frame iframe {
    width: 1512px;
    height: 945px;
    border: 0;
    display: block;
    transform: scale(calc(100cqi / 1512px));
    transform-origin: top left;
    background: #fff;
  }
  .inline-demo-video,
  .inline-demo-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    background: #fff;
    z-index: 1;
  }
  .inline-demo-video {
    object-fit: contain;
  }
  .inline-demo[data-mode="watch"] .inline-demo-iframe { display: none; }
  .inline-demo[data-mode="play"]  .inline-demo-video,
  .inline-demo[data-mode="play"]  .inline-demo-poster { display: none; }
  .inline-demo-toggle-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
  }
  .inline-demo-toggle {
    display: inline-flex;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px;
  }
  .inline-demo-toggle button {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    padding: 9px 18px;
    background: transparent;
    border: 0;
    color: var(--ink-mute);
    cursor: pointer;
    border-radius: 999px;
    transition: background .22s, color .22s;
  }
  .inline-demo-toggle button:hover { color: var(--ink); }
  .inline-demo-toggle button.on {
    background: var(--ink);
    color: var(--bg);
  }
  .inline-demo-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px 5px 9px;
    background: rgba(255,255,255,.95);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink);
    z-index: 2;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(16,24,40,.06);
  }
  .inline-demo-badge .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 var(--accent);
    animation: demo-pulse 2.4s ease-out infinite;
  }
  @keyframes demo-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(217,119,87,.55); }
    70%  { box-shadow: 0 0 0 8px rgba(217,119,87,0); }
    100% { box-shadow: 0 0 0 0 rgba(217,119,87,0); }
  }
  .inline-demo-caption {
    margin-top: 10px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-mute);
  }

  /* copy block, sample text for the user to paste into a demo */
  .body-copy-block {
    margin: 22px 0 26px 0;
  }
  .body-copy-label {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin-bottom: 8px;
  }
  .body-copy-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 12px 12px 16px;
    background: var(--bg-tint);
    border: 1px solid var(--line);
    border-radius: 10px;
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.45;
    color: var(--ink);
  }
  .body-copy-text {
    flex: 1;
    min-width: 0;
  }
  .body-copy-btn {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 7px 11px;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .body-copy-btn:hover {
    background: var(--ink);
    color: var(--bg);
    border-color: var(--ink);
  }
  .body-copy-btn.copied {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
  }
  .inline-figure figcaption {
    margin-top: 10px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-mute);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
  }
  .inline-figure figcaption > span:first-child {
    flex: 1;
    min-width: 0;
  }
  .inline-figure .figure-link {
    flex: none;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--ink-soft);
    padding-bottom: 1px;
    white-space: nowrap;
  }
  .inline-figure .figure-link:hover {
    color: var(--accent);
    border-color: var(--accent);
  }
  .preview {
    background: var(--bg-tint);
    aspect-ratio: 4 / 3;
    margin: 8px 0 28px 0;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
  }
  .preview::before {
    content: "";
    position: absolute; inset: 0;
    background-image: repeating-linear-gradient(135deg,
      transparent 0, transparent 11px,
      rgba(26,26,26,.05) 11px, rgba(26,26,26,.05) 12px);
  }
  .preview-label {
    position: absolute;
    left: 16px; bottom: 14px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-mute);
  }
  .section-head {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin: 32px 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
  }
  .tags { display: flex; flex-wrap: wrap; gap: 6px; }
  .tag {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
  }

  /* hint */
  .hint {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-mute);
    display: flex; gap: 16px; align-items: center;
    z-index: 15;
    pointer-events: none;
    opacity: 1;
    transition: opacity .4s;
  }
  .hint.hidden { opacity: 0; }
  .hint .key {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px;
    border: 1px solid var(--line);
    border-radius: 3px;
    font-size: 10px;
    color: var(--ink-soft);
  }
  .hint span { display: inline-flex; align-items: center; gap: 5px; }

  /* tweaks panel */
  .tweaks {
    position: fixed;
    right: 24px; bottom: 24px;
    width: 260px;
    background: var(--card);
    border: 1px solid var(--line);
    padding: 18px;
    z-index: 50;
    font-family: var(--mono);
    font-size: 11px;
    box-shadow: 0 20px 40px -20px rgba(26,26,26,.2);
    display: none;
  }
  .tweaks.show { display: block; }
  .tweaks h4 {
    margin: 0 0 14px 0;
    font-family: var(--serif);
    font-weight: 500;
    font-size: 16px;
  }
  .tweak-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 10px;
  }
  .tweak-row label {
    color: var(--ink-soft);
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: 10px;
  }
  .seg { display: inline-flex; border: 1px solid var(--line); }
  .seg button {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 4px 8px;
    background: transparent;
    border: 0;
    color: var(--ink-soft);
    cursor: pointer;
  }
  .seg button.on {
    background: var(--ink);
    color: var(--bg);
  }

  @media (max-width: 1100px) {
    .plabel .plabel-main { font-size: 12px; }
    .anchor-label .role { font-size: 17px; }
  }

  /* ── view switcher ─────────────────────────── */
  .view-switcher {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    display: inline-flex;
    background: var(--card);
    border: 1px solid var(--line);
    padding: 5px;
    border-radius: 999px;
    z-index: 25;
    box-shadow: 0 18px 44px -20px rgba(26,26,26,.28);
    transition: opacity .35s ease, transform .35s ease;
  }
  body.view-timeline:not(.scrolled) .view-switcher {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(28px);
  }
  .view-switcher button {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: .16em;
    text-transform: uppercase;
    padding: 14px 24px;
    background: transparent;
    border: 0;
    color: var(--ink-mute);
    cursor: pointer;
    border-radius: 999px;
    transition: background .25s, color .25s;
  }
  .view-switcher button:hover { color: var(--ink); }
  .view-switcher button.on {
    background: var(--ink);
    color: var(--bg);
  }

  /* ── view switcher: "⋯ more" overflow (Memory / Pixel / Story) ── */
  .vs-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 14px 22px;
    background: transparent;
    border: 0;
    border-radius: 999px;
    color: var(--ink-mute);
    cursor: pointer;
    transition: background .25s, color .25s;
  }
  .vs-more i {
    width: 4px; height: 4px;
    border-radius: 50%;
    background: currentColor;
  }
  .vs-more:hover { color: var(--ink); }
  .vs-more.on { background: var(--ink); color: var(--bg); }

  .vs-more-menu {
    position: fixed;
    z-index: 26;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 18px 44px -20px rgba(26,26,26,.32);
    transform-origin: bottom right;
    animation: vsMoreIn .16s ease;
  }
  .vs-more-menu[hidden] { display: none; }
  @keyframes vsMoreIn {
    from { opacity: 0; transform: translateY(6px) scale(.98); }
    to   { opacity: 1; transform: none; }
  }
  .vs-more-menu button {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: .16em;
    text-transform: uppercase;
    text-align: left;
    padding: 12px 20px;
    background: transparent;
    border: 0;
    border-radius: 999px;
    color: var(--ink-mute);
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s, color .2s;
  }
  .vs-more-menu button:hover { color: var(--ink); background: var(--bg-tint); }
  .vs-more-menu button.on { background: var(--ink); color: var(--bg); }

