/* BuildTube — first look. A light, calm page with one dark cinematic stage. */

:root {
  --paper: #f5f4ef;
  --paper-2: #eceae3;
  --card: #ffffff;
  --ink: #121318;
  --ink-2: #3a3c44;
  --mute: #666873;
  --line: #e2e0d8;
  --accent: #4a43d6;
  --accent-soft: #a9b1ff;
  --stage: #0a0c11;
  --stage-ink: #f3f1ea;
  --stage-mute: #a3a7b3;

  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --r-card: 18px;
  --gutter: 40px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
html.locked { overflow: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video { max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.stage :focus-visible { outline-color: var(--accent-soft); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 10px; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.ic { flex: none; display: block; }

/* ── Header ─────────────────────────────────────────────────────────── */

.top {
  position: sticky; top: 0; z-index: 40;
  background: var(--paper);
  -webkit-backdrop-filter: saturate(1.3) blur(14px);
  backdrop-filter: saturate(1.3) blur(14px);
}
.top-bar { height: 60px; display: flex; align-items: center; gap: 18px; }
.mark {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
  font: 600 18px/1 var(--sans); letter-spacing: -.02em;
}
/* BuildTube lockup: a play button stacked from blocks, "Build" strong, "Tube" quiet. */
.mark-ic { flex: none; display: block; }
.mark-word { letter-spacing: -.03em; }
.mark-word > span { font-weight: 400; color: var(--ink-2); }
.top-stamp { margin-right: auto; color: var(--mute); font-size: 13px; padding-left: 18px; border-left: 1px solid var(--line); }
.saved-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 8px 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); cursor: pointer;
  font-size: 14px; font-weight: 500;
  transition: background .2s, border-color .2s;
}
.saved-btn:hover { border-color: #cfccc2; }
.saved-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.saved-n {
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px;
  display: inline-grid; place-items: center;
  background: var(--paper-2); color: var(--ink); font-size: 12px; font-variant-numeric: tabular-nums;
}
.saved-btn[aria-pressed="true"] .saved-n { background: rgba(255, 255, 255, .16); color: var(--paper); }

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

.hero { padding: 4px 20px 0; }
.stage {
  position: relative; isolation: isolate; overflow: hidden;
  max-width: 1400px; margin: 0 auto;
  min-height: min(640px, calc(100vh - 80px));
  padding: 64px 64px 52px;
  border-radius: 30px;
  background: var(--stage);
  color: var(--stage-ink);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6.2fr);
  gap: 56px; align-items: center;
}
.stage-glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 70% at 78% 42%, rgba(98, 96, 240, .26), transparent 70%),
    radial-gradient(40% 50% at 8% 100%, rgba(38, 170, 160, .12), transparent 70%),
    radial-gradient(30% 40% at 40% 0%, rgba(255, 255, 255, .05), transparent 70%);
}
.stage-glow::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.3px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(70% 80% at 70% 45%, #000, transparent 75%);
  mask-image: radial-gradient(70% 80% at 70% 45%, #000, transparent 75%);
}

.hero-copy h1 {
  font: 400 clamp(40px, 5vw, 72px)/1.0 var(--serif);
  letter-spacing: -.012em;
  text-wrap: balance;
}
.hero-contrast { margin-top: 26px; font-size: 20px; line-height: 1.5; color: var(--stage-mute); }
.c-line { display: block; }
.c-line + .c-line { color: var(--stage-ink); }
.c-code {
  font: 500 .86em/1 var(--mono); color: #d7dbe4;
  padding: 3px 7px 4px; border-radius: 6px; background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .1);
}
.hero-contrast em {
  font: italic 400 1.32em/1 var(--serif); color: #fff;
  background: linear-gradient(90deg, var(--accent-soft), #8fe3d6) 0 100% / 100% 2px no-repeat;
  padding-bottom: 2px;
}
.hero-cta {
  margin-top: 34px; display: inline-flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 20px; border-radius: 999px;
  background: var(--stage-ink); color: var(--stage); text-decoration: none;
  font-weight: 600; font-size: 15px;
  transition: transform .25s var(--ease), background .2s;
}
.hero-cta:hover { transform: translateY(-1px); background: #fff; }

/* The translator */
.tr { position: relative; min-width: 0; }
.tr-mode {
  display: inline-flex; align-items: center; gap: 12px;
  margin: 0 0 14px 2px; font-size: 13px; font-weight: 500; letter-spacing: .01em;
}
.tr-mode-a, .tr-mode-b {
  padding: 6px 12px; border-radius: 999px; color: var(--stage-mute);
  border: 1px solid transparent; transition: color .5s, background .5s, border-color .5s;
}
.tr-mode-a { font-family: var(--mono); font-size: 12px; }
.tr[data-phase="code"] .tr-mode-a,
.tr--static .tr-mode-a { color: #e6e9ef; background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .12); }
.tr[data-phase="card"] .tr-mode-b { color: var(--stage); background: var(--stage-ink); }
.tr-mode-rail { position: relative; width: 58px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .14); }
.tr-mode-rail i {
  position: absolute; top: -3px; left: 0; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-soft); box-shadow: 0 0 12px var(--accent-soft);
  transition: transform 1s var(--ease);
}
.tr[data-phase="morph"] .tr-mode-rail i,
.tr[data-phase="card"] .tr-mode-rail i { transform: translateX(50px); }
.tr--static .tr-mode { display: none; }

.tr-frame { position: relative; height: 504px; }
.tr-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s var(--ease); pointer-events: none; }
.tr-slide.is-on { opacity: 1; pointer-events: auto; }

/* GitHub-style repository view (dark, like GitHub's own dark theme) */
.repo {
  position: absolute; inset: 0; overflow: hidden;
  background: #0d1117; border: 1px solid #262c36; border-radius: 16px;
  padding: 16px 18px; color: #c9d1d9; font-size: 13px; line-height: 1.45;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .9);
}
.repo::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 34px; pointer-events: none;
  background: linear-gradient(transparent, #0d1117 85%);
}
.repo [style] {
  opacity: 0; transform: translateY(6px);
  transition: opacity .45s var(--ease), transform .45s var(--ease), filter .45s var(--ease);
  transition-delay: var(--d);
}
.tr[data-phase="code"] .is-on .repo [style] { opacity: 1; transform: none; filter: none; }
.tr[data-phase="morph"] .is-on .repo [style] {
  opacity: 0; transform: translateY(-10px) scale(.98); filter: blur(6px);
  transition-duration: .5s; transition-delay: calc(var(--d) * .35);
}
.repo-head { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; }
.repo-book { color: #8b949e; display: inline-flex; }
.repo-path { font-size: 15px; color: #58a6ff; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repo-path b { font-weight: 600; }
.repo-sep { color: #8b949e; margin: 0 4px; }
.repo-pub { font-size: 11px; color: #8b949e; border: 1px solid #30363d; border-radius: 999px; padding: 0 7px; line-height: 18px; }
.repo-stars { margin-left: auto; font-size: 12px; color: #c9d1d9; border: 1px solid #30363d; border-radius: 6px; padding: 2px 8px; background: #161b22; white-space: nowrap; }
.repo-tabs { display: flex; gap: 18px; font-size: 13px; color: #8b949e; border-bottom: 1px solid #21262d; margin: 0 -18px; padding: 0 18px; white-space: nowrap; overflow: hidden; }
.repo-tabs span { padding: 6px 0 9px; }
.repo-tabs .on { color: #e6edf3; box-shadow: inset 0 -2px 0 #f78166; }
.repo-files { margin-top: 10px; border: 1px solid #30363d; border-radius: 8px; overflow: hidden; }
.repo-branch { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: #161b22; border-bottom: 1px solid #30363d; font-size: 12px; }
.repo-btn { border: 1px solid #30363d; border-radius: 6px; padding: 1px 8px; background: #21262d; color: #c9d1d9; }
.repo-btn--go { margin-left: auto; background: #238636; border-color: #2e9a40; color: #fff; }
.repo-count { color: #8b949e; }
.rf { display: flex; align-items: center; gap: 9px; padding: 4px 12px; border-top: 1px solid #21262d; font-size: 13px; color: #c9d1d9; white-space: nowrap; overflow: hidden; }
.repo-branch + .rf { border-top: 0; }
.rf svg { flex: none; }
.rf--more { color: #8b949e; font-size: 12px; }
.repo-readme { margin-top: 10px; border: 1px solid #30363d; border-radius: 8px; padding: 0 14px 12px; }
.rr-h { display: flex; align-items: center; gap: 7px; margin: 0 -14px 8px; padding: 6px 14px; border-bottom: 1px solid #21262d; font-size: 12px; color: #c9d1d9; }
.rr-h svg { color: #8b949e; }
.rr-l { font-size: 12.5px; color: #adb6c0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr-l + .rr-l { margin-top: 2px; }
.rr-code {
  margin: 10px 0 0; padding: 8px 12px; border-radius: 6px; background: #161b22;
  font: 400 12px/1.6 var(--mono); color: #e6edf3; white-space: pre; overflow: hidden;
}
.rr-code span { display: block; overflow: hidden; text-overflow: ellipsis; }
.rr-code i { font-style: normal; color: #7ee787; }

/* The BuildTube capability card that the repository turns into */
.cap {
  position: absolute; inset: 0;
  opacity: 0; transform: scale(.965) translateY(8px); filter: blur(10px);
  transition: opacity .7s var(--ease), transform .8s var(--ease), filter .7s var(--ease);
}
.tr[data-phase="morph"] .is-on .cap { opacity: 1; transform: none; filter: none; transition-delay: .42s; }
.tr[data-phase="card"] .is-on .cap { opacity: 1; transform: none; filter: none; }
.cap-card {
  height: 100%; display: flex; flex-direction: column;
  background: #fbfaf6; color: var(--ink); border-radius: 18px; overflow: hidden;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .06);
}
.cap-demo { position: relative; flex: 1; min-height: 0; background: #1a1c22; }
.cap-body { padding: 16px 20px 16px; }
.cap-line { font: 600 21px/1.28 var(--sans); letter-spacing: -.015em; text-wrap: balance; }
.cap-foot { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cap-more {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  border: 0; background: none; padding: 6px 2px; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--accent);
}
.cap-more:hover { text-decoration: underline; text-underline-offset: 3px; }

.scan {
  position: absolute; top: 0; bottom: 0; left: 0; width: 34%; z-index: 3; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(169, 177, 255, .22) 45%, rgba(220, 224, 255, .5) 50%, rgba(169, 177, 255, .22) 55%, transparent);
  opacity: 0; transform: translateX(-110%);
  mix-blend-mode: screen;
}
.tr[data-phase="morph"] .is-on .scan { animation: sweep 1s var(--ease) forwards; }
.tr.is-held .scan { animation-play-state: paused; }
@keyframes sweep {
  0% { opacity: 0; transform: translateX(-110%); }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateX(320%); }
}

.tr-foot { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.tr-dots { display: flex; gap: 6px; }
.tr-dot {
  width: 30px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer;
  display: grid; place-items: center;
}
.tr-dot i {
  position: relative; display: block; width: 100%; height: 4px; border-radius: 4px;
  background: rgba(255, 255, 255, .18); overflow: hidden;
}
.tr-dot i::after {
  content: ''; position: absolute; inset: 0; border-radius: 4px; background: var(--stage-ink);
  transform-origin: left; transform: scaleX(var(--p, 0));
}
.tr-dot[aria-current="true"] i { background: rgba(255, 255, 255, .28); }
.tr--static .tr-dot[aria-current="true"] i::after { transform: none; }
.tr-pause {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .04); color: var(--stage-ink); cursor: pointer;
  display: grid; place-items: center;
}
.tr-pause:hover { background: rgba(255, 255, 255, .1); }
.tr-pause .i-play, .tr-pause[aria-pressed="true"] .i-pause { display: none; }
.tr-pause[aria-pressed="true"] .i-play { display: block; }
.tr--static .tr-pause { display: none; }
.tr-note { margin-left: auto; font-size: 12.5px; color: var(--stage-mute); text-align: right; }

/* Reduced motion: a still Before / After, side by side */
.stage--static { grid-template-columns: 1fr; gap: 40px; }
.stage--static .hero-copy h1 { max-width: 22ch; }
.tr--static .tr-frame { height: auto; }
.tr-pair { position: relative; inset: auto; opacity: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 18px; align-items: stretch; }
.pair-col { display: flex; flex-direction: column; min-width: 0; }
.pair-lab { font-size: 13px; color: var(--stage-mute); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.pair-lab span {
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .16); color: #e6e9ef;
}
.pair-lab--b span { background: var(--stage-ink); color: var(--stage); border-color: var(--stage-ink); }
.pair-arrow { align-self: center; color: var(--accent-soft); padding-top: 24px; }
.tr--static .repo, .tr--static .cap { position: relative; inset: auto; height: 470px; }
.tr--static .repo [style] { opacity: 1; transform: none; transition: none; }
.tr--static .cap { opacity: 1; transform: none; filter: none; transition: none; }

/* ── Demo media & explainers (shared) ────────────────────────────────── */

.media { position: absolute; inset: 0; background: #e9e7e0; overflow: hidden; }
.media img, .media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media--still img { object-position: top center; }

.xp {
  --ic: 54px; --fw: 92px;
  position: absolute; inset: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 18px 16px;
  color: var(--tink);
  background:
    radial-gradient(90% 120% at 100% 100%, color-mix(in srgb, var(--tb) 70%, #fff), transparent 60%),
    linear-gradient(var(--ang, 135deg), var(--ta), var(--tb));
}
.xp::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .9; }
.xp--m-dots::before {
  background-image: radial-gradient(color-mix(in srgb, var(--tink) 18%, transparent) 1px, transparent 1.3px);
  background-size: 16px 16px;
  -webkit-mask-image: radial-gradient(60% 70% at 50% 50%, #000, transparent 80%);
  mask-image: radial-gradient(60% 70% at 50% 50%, #000, transparent 80%);
}
.xp--m-grid::before {
  background-image:
    linear-gradient(color-mix(in srgb, var(--tink) 9%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--tink) 9%, transparent) 1px, transparent 1px);
  background-size: 24px 24px; background-position: -1px -1px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 90%);
  mask-image: linear-gradient(180deg, #000, transparent 90%);
}
.xp--m-lines::before {
  background-image: repeating-linear-gradient(var(--ang, 135deg), color-mix(in srgb, var(--tink) 9%, transparent) 0 1px, transparent 1px 14px);
  -webkit-mask-image: radial-gradient(80% 90% at var(--gx) var(--gy), #000, transparent 75%);
  mask-image: radial-gradient(80% 90% at var(--gx) var(--gy), #000, transparent 75%);
}
.xp--m-rings::before {
  background-image: repeating-radial-gradient(circle at var(--gx) var(--gy), transparent 0 20px, color-mix(in srgb, var(--tink) 11%, transparent) 20px 21px);
  -webkit-mask-image: radial-gradient(70% 90% at var(--gx) var(--gy), #000, transparent 80%);
  mask-image: radial-gradient(70% 90% at var(--gx) var(--gy), #000, transparent 80%);
}
.xp--m-orbit::before {
  background:
    radial-gradient(circle at 50% 50%, transparent 0 36%, color-mix(in srgb, var(--tink) 12%, transparent) 36% calc(36% + 1px), transparent calc(36% + 1px)),
    radial-gradient(circle at 50% 50%, transparent 0 58%, color-mix(in srgb, var(--tink) 8%, transparent) 58% calc(58% + 1px), transparent calc(58% + 1px));
  background-size: 100% 180%; background-position: center; background-repeat: no-repeat;
}
.xp--m-glow::before {
  background:
    radial-gradient(40% 60% at var(--gx) var(--gy), color-mix(in srgb, var(--tink) 18%, transparent), transparent 70%),
    radial-gradient(35% 50% at 60% 90%, rgba(255, 255, 255, .7), transparent 70%);
  filter: blur(6px);
}
.xp-ghost {
  position: absolute; left: var(--gx); top: var(--gy); pointer-events: none;
  transform: translate(-30%, -30%) rotate(-10deg); opacity: .07; color: var(--tink);
}
.xp-ghost .ic { width: 200px; height: 200px; stroke-width: 1.1; }
.xp-row {
  position: relative; width: 100%; max-width: 330px;
  display: grid; grid-template-columns: minmax(0, 1fr) var(--fw) minmax(0, 1fr); align-items: start;
}
.xp-node { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; text-align: center; }
.xp-ic {
  width: var(--ic); height: var(--ic); border-radius: 30%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .55); border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: 0 8px 20px -14px var(--tink);
}
.xp-ic--out { background: #fff; box-shadow: 0 14px 30px -14px var(--tink), 0 0 0 4px rgba(255, 255, 255, .35); }
.xp-lab {
  font: 500 12.5px/1.3 var(--sans); color: color-mix(in srgb, var(--tink) 80%, #111);
  padding: 0 4px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.xp-flow { position: relative; height: 16px; margin-top: calc(var(--ic) / 2 - 8px); }
.xp-line { position: absolute; left: 6px; right: 16px; top: 50%; border-top: 1.5px dashed color-mix(in srgb, var(--tink) 34%, transparent); }
.xp-head { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); opacity: .6; }
.xp-flow i {
  position: absolute; top: 50%; left: 4px; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%;
  background: var(--tink); opacity: 0;
  animation: flow 2.4s linear infinite;
}
.xp-flow i:nth-of-type(2) { animation-delay: .8s; }
.xp-flow i:nth-of-type(3) { animation-delay: 1.6s; }
@keyframes flow {
  0% { transform: translateX(0) scale(.6); opacity: 0; }
  15% { opacity: .9; }
  80% { opacity: .9; }
  100% { transform: translateX(calc(var(--fw) - 26px)) scale(1); opacity: 0; }
}
.xp--solo .xp-ic { --ic: 72px; }
.xp--mini { --ic: 40px; --fw: 52px; padding: 12px 8px; }
.xp--mini .xp-lab { font-size: 11.5px; -webkit-line-clamp: 2; }
.xp--mini .xp-node { gap: 7px; }
.xp--mini .xp-ghost .ic { width: 140px; height: 140px; }
.xp--big { --ic: 78px; --fw: 130px; padding: 28px; }
.xp--big .xp-row { max-width: 460px; }
.xp--big .xp-lab { font-size: 15px; }
.xp--big .xp-node { gap: 14px; }
.xp--big .xp-ghost .ic { width: 300px; height: 300px; }
.cap-demo .xp { --ic: 64px; --fw: 110px; }
.cap-demo .xp-lab { font-size: 14px; }

/* ── "I want to…" ─────────────────────────────────────────────────────── */

.browse { padding-top: 44px; }
.want { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 18px; }
.want-lab { font: italic 400 30px/1 var(--serif); letter-spacing: -.01em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 520px; min-width: 0; }
.chip {
  height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
  font-size: 14.5px; font-weight: 500;
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.chip:hover { border-color: #c9c6bb; color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.search {
  position: relative; display: flex; align-items: center; gap: 10px;
  height: 44px; width: 320px; max-width: 100%; padding: 0 14px; margin-left: auto;
  border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--mute);
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none;
  font: 400 15px/1 var(--sans); color: var(--ink);
}
.search input::placeholder { color: #8c8e97; }
.search input::-webkit-search-cancel-button { display: none; }
.search-x { width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--paper-2); cursor: pointer; display: grid; place-items: center; }
.filter-note:empty { display: none; }
.filter-note { margin-top: 16px; font-size: 14px; color: var(--mute); }
.filter-note span { color: var(--ink); font-weight: 600; }
.link { border: 0; background: none; padding: 0; margin-left: 6px; cursor: pointer; color: var(--accent); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

/* ── Sections ─────────────────────────────────────────────────────────── */

.sec { margin-top: 44px; }
.sec + .sec { margin-top: 84px; }
.sec-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 22px; }
.sec-head h2 { font: 400 42px/1.05 var(--serif); letter-spacing: -.012em; }
.sec-sub { color: var(--mute); font-size: 15.5px; }
.sec-tag { margin-left: auto; font-size: 12.5px; color: var(--mute); }

.grid { display: grid; gap: 22px; }
.grid--start { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid--rising { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 26px 22px; }

.card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--card); border-radius: var(--r-card); overflow: hidden;
  box-shadow: 0 0 0 1px var(--line);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px #d8d5cb, 0 22px 44px -26px rgba(20, 20, 45, .38); }
.card:hover .media img { transform: scale(1.025); }
.media img { transition: transform .8s var(--ease); }
.card-demo { position: relative; aspect-ratio: 16 / 10; background: var(--paper-2); overflow: hidden; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 14px 16px 12px; }
.card-title { font: 600 16px/1.35 var(--sans); letter-spacing: -.01em; }
.card-title button {
  all: unset; cursor: pointer; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-title button::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: var(--r-card); }
.card-title button:focus-visible { outline: none; }
.card:has(.card-title button:focus-visible) { box-shadow: 0 0 0 2px var(--accent), 0 22px 44px -26px rgba(20, 20, 45, .38); }
.card-foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.use { display: inline-flex; align-items: flex-start; gap: 7px; min-width: 0; font-size: 13px; color: var(--mute); }
.use span { overflow: visible; white-space: normal; word-break: break-word; line-height: 1.35; }
.use .ic { color: var(--ink-2); flex: none; margin-top: 2px; }
.save {
  position: relative; z-index: 2; flex: none;
  width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; cursor: pointer;
  display: grid; place-items: center; color: var(--mute);
  transition: background .2s, color .2s;
}
.save:hover { background: var(--paper-2); color: var(--ink); }
.save[aria-pressed="true"] { color: var(--accent); }
.rise { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; font-size: 12.5px; font-weight: 500; color: var(--accent); }
.rise .ic { flex: none; }

.card--lead { grid-column: span 3; }
.card--lead .card-demo { aspect-ratio: 16 / 9; }
.card--lead .card-body { padding: 18px 22px 16px; }
.card--lead .card-title { font-size: 22px; line-height: 1.25; letter-spacing: -.02em; }
.card--start { grid-column: span 2; }
.card--start .card-title { font-size: 17px; }

.sec--emerging {
  background: var(--paper-2); border-radius: 26px; padding: 34px 34px 36px;
}
.shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.card--emerging .card-demo { aspect-ratio: 16 / 9; }
.card--emerging .card-title { font-size: 15px; }
.card-why { margin-top: 6px; font-size: 13px; line-height: 1.45; color: var(--mute); }

.more { display: flex; justify-content: center; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 999px; cursor: pointer; text-decoration: none;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font-size: 15px; font-weight: 500;
  transition: border-color .2s, background .2s;
}
.btn:hover { border-color: #c9c6bb; }
.btn--ink { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.empty { text-align: center; padding: 70px 20px 40px; max-width: 520px; margin: 0 auto; }
.empty-art { color: #b3b0a6; display: grid; place-items: center; margin-bottom: 14px; }
.empty h2 { font: 400 34px/1.1 var(--serif); }
.empty p { margin: 12px 0 22px; color: var(--mute); }

/* ── Footer ───────────────────────────────────────────────────────────── */

.foot { margin-top: 100px; border-top: 1px solid var(--line); }
.foot-in { display: grid; grid-template-columns: 160px 1fr 1.2fr; gap: 28px; padding-top: 34px; padding-bottom: 56px; font-size: 14px; color: var(--mute); }
.foot-in strong { color: var(--ink); font-weight: 600; }
.foot-mark { display: flex; align-items: center; gap: 7px; align-self: start; font-weight: 600; color: var(--ink); line-height: 1; }
.foot-src { grid-column: 2 / -1; font-size: 13px; }
.foot a { color: var(--ink-2); }

/* ── Drawer ───────────────────────────────────────────────────────────── */

.scrim {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(10, 12, 17, .42);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: fade .3s var(--ease);
}
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 60;
  width: min(580px, 100vw);
  display: flex; flex-direction: column;
  background: #fbfaf6;
  box-shadow: -30px 0 80px -30px rgba(10, 12, 20, .45);
  transform: translateX(40px); opacity: 0;
  transition: transform .4s var(--ease), opacity .3s var(--ease);
}
.drawer.is-open { transform: none; opacity: 1; }
.drawer-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.d-save {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 14px; font-weight: 500;
}
.d-save[aria-pressed="true"] { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.d-close { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); cursor: pointer; display: grid; place-items: center; }
.d-close:hover, .d-save:hover { border-color: #c9c6bb; }
.drawer-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 22px 28px 44px; }

.d-demo > .media, .d-demo > .xp { position: relative; inset: auto; aspect-ratio: 16 / 10; border-radius: 16px; }
.d-demo > .media { background: #16181e; }
.d-demo .media--still img { object-fit: contain; object-position: center; background: #efede7; }
.d-demo video { object-fit: contain; background: #0c0d11; }
.d-credit { margin-top: 8px; font-size: 12px; color: var(--mute); }
.d-head { padding: 22px 0 6px; }
.d-head h2 { font: 400 36px/1.08 var(--serif); letter-spacing: -.012em; text-wrap: balance; }
.d-sum { margin-top: 12px; font-size: 16.5px; line-height: 1.55; color: var(--ink-2); }
.d-sec { padding: 22px 0 4px; }
.d-sec + .d-sec { border-top: 1px solid var(--line); margin-top: 18px; }
.d-sec h3 { font: 600 13px/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); margin-bottom: 14px; }
.d-could { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.d-could li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.45; }
.d-could .ic { color: var(--accent); margin-top: 1px; }
.d-use { display: grid; gap: 12px; }
.use--big { font-size: 15px; font-weight: 600; color: var(--ink); padding: 10px 14px; border-radius: 12px; background: var(--card); box-shadow: 0 0 0 1px var(--line); justify-self: start; max-width: 100%; }
.use--big span { white-space: normal; }
.d-needs, .d-limits { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.d-needs b, .d-limits b { display: block; font-size: 13px; color: var(--ink); margin-bottom: 2px; }
.d-why-lead { display: flex; gap: 8px; align-items: center; font-size: 16px; font-weight: 500; color: var(--ink); }
.d-why-lead .ic { color: var(--accent); }
.d-tag { margin-top: 4px; font-size: 12px; color: var(--mute); }
.d-nums { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14.5px; color: var(--ink-2); }
.d-nums li { font-variant-numeric: tabular-nums; }
.d-asof { margin-top: 10px; font-size: 12.5px; color: var(--mute); }
/* Creator credit: round picture (initials underneath as the fallback), name, platform mark. */
.cr-ava {
  position: relative; flex: none; width: var(--s, 22px); height: var(--s, 22px); border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: var(--paper-2); box-shadow: 0 0 0 1px rgba(18, 19, 24, .08);
}
.cr-ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--card); }
.cr-ini { font: 600 calc(var(--s, 22px) * .42)/1 var(--sans); color: var(--ink-2); letter-spacing: .01em; }
.cr-ava:not(.is-fallback) .cr-ini { visibility: hidden; }
.cr-plat { flex: none; color: var(--mute); }

.cr {
  position: relative; z-index: 2; align-self: flex-start; max-width: 100%;
  display: inline-flex; align-items: center; gap: 7px; margin: 8px 0 0; padding: 2px 8px 2px 2px;
  border-radius: 999px; color: var(--ink-2); text-decoration: none; font-size: 13px; line-height: 1.2;
  transition: background .2s, color .2s;
}
.cr:hover { background: var(--paper-2); color: var(--ink); }
.cr:hover .cr-name { text-decoration: underline; text-underline-offset: 2px; }
.cr:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 999px; }
.cr-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cap-body .cr { margin-top: 10px; }

.d-maker { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.d-mk-text { min-width: 0; }
.d-mk-name { font-weight: 600; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.d-mk-link { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--mute); text-underline-offset: 2px; }
.d-mk-link:hover { color: var(--ink); }
.btn--line { margin-top: 16px; height: 42px; font-size: 14px; }
.d-caution { margin-top: 18px; font-size: 12.5px; color: var(--mute); }

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 1180px) {
  .stage { padding: 52px 44px 44px; gap: 40px; }
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  :root { --gutter: 28px; }
  .stage { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy h1 { max-width: 16ch; }
  .grid--start { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card--lead, .card--start { grid-column: span 1; }
  .card--start:last-child { grid-column: span 2; }
  .foot-in { grid-template-columns: 1fr; }
  .foot-src { grid-column: auto; }
  .search { margin-left: 0; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .top-bar { height: 56px; }
  .top-stamp { display: none; }
  .mark { margin-right: auto; }
  .hero { padding: 0 8px; }
  .stage { padding: 34px 16px 18px; border-radius: 24px; gap: 26px; }
  .hero-copy h1 { font-size: 40px; line-height: 1.02; }
  .hero-contrast { margin-top: 16px; font-size: 17px; }
  .hero-cta { display: none; }
  .tr-mode { margin-bottom: 10px; font-size: 12.5px; gap: 8px; }
  .tr-mode-rail { width: 40px; }
  .tr[data-phase="morph"] .tr-mode-rail i, .tr[data-phase="card"] .tr-mode-rail i { transform: translateX(32px); }
  .tr-frame { height: 404px; }
  .repo { padding: 12px 13px; font-size: 12px; }
  .repo-tabs { margin: 0 -13px; padding: 0 13px; gap: 14px; font-size: 12px; }
  .repo-tabs .x-sm, .repo-count { display: none; }
  .repo-path { font-size: 14px; }
  .repo-pub { display: none; }
  .repo-files > .rf:nth-child(n+5) { display: none; }
  .rf { padding: 4px 10px; font-size: 12px; }
  .rr-l { font-size: 12px; }
  .rr-code { font-size: 11px; }
  .cap-body { padding: 13px 15px 12px; }
  .cap-line { font-size: 17.5px; }
  .cap-more { font-size: 13px; }
  .tr-foot { flex-wrap: wrap; gap: 8px 10px; margin-top: 12px; }
  .tr-note { margin-left: 0; width: 100%; text-align: left; font-size: 12px; }

  .tr-pair { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .pair-arrow { justify-self: center; transform: rotate(90deg); padding: 0; }
  .tr--static .repo { height: 404px; }
  .tr--static .cap { height: 360px; }

  .browse { padding-top: 30px; }
  .want { gap: 12px; }
  .want-lab { font-size: 26px; width: 100%; }
  .chips { flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 4px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { height: 38px; font-size: 14px; }
  .search { width: 100%; }

  .sec + .sec { margin-top: 60px; }
  .sec-head h2 { font-size: 34px; }
  .sec-tag { margin-left: 0; }
  .grid--start { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .card--start:last-child { grid-column: auto; }
  .card--lead .card-title { font-size: 19px; }
  .grid--rising { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .sec--emerging { padding: 24px 14px 18px; border-radius: 20px; margin-left: -4px; margin-right: -4px; }
  .shelf { grid-template-columns: minmax(0, 1fr); gap: 14px; }

  .drawer {
    top: auto; left: 0; width: 100%; height: calc(100% - 28px);
    border-radius: 20px 20px 0 0;
    transform: translateY(30px);
  }
  .drawer-bar { padding: 12px 16px; }
  .drawer-scroll { padding: 16px 16px 40px; }
  .d-head h2 { font-size: 30px; }
}

/* ── New · Try it · The Jev wave ─────────────────────────────────────── */

.new-tag {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .88); color: var(--ink);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 0 0 1px rgba(18, 19, 24, .07), 0 4px 12px -6px rgba(18, 19, 24, .3);
  font: 600 11.5px/1.4 var(--sans); letter-spacing: .01em;
  pointer-events: none;
}
.new-tag--inline { position: static; display: inline-block; margin-right: 8px; box-shadow: 0 0 0 1px var(--line); background: var(--card); backdrop-filter: none; }

.use--try {
  align-items: center;
  color: var(--accent); font-weight: 600;
  padding: 4px 11px 4px 7px; margin-left: -7px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}
.use--try .ic { color: var(--accent); margin-top: 0; }
.use--try span { white-space: nowrap; }

.d-try {
  margin-top: 22px; padding: 18px 18px 16px; border-radius: 16px;
  background: color-mix(in srgb, var(--accent) 7%, var(--card));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}
.d-try + .d-sec { border-top: 1px solid var(--line); margin-top: 22px; }
.btn--try {
  height: 52px; padding: 0 24px; gap: 10px;
  background: var(--accent); border-color: var(--accent); color: #fff;
  font-size: 16px; font-weight: 600;
  box-shadow: 0 12px 26px -14px var(--accent);
  transition: background .2s, transform .25s var(--ease);
}
.btn--try:hover { background: #3b34bd; border-color: #3b34bd; transform: translateY(-1px); }
.d-try-note { margin-top: 10px; font-size: 12.5px; color: var(--mute); }
.d-why-sub { margin-top: 8px; font-size: 14.5px; font-weight: 400; color: var(--ink-2); }
.d-why-lead + .d-tag { margin-bottom: 4px; }
.d-why-lead + .d-why-lead { margin-top: 8px; }
.d-tag + .d-why-lead { margin-top: 10px; }

.jev {
  --jev: #135c52; --jev-bg: #e5ede7;
  position: relative; isolation: isolate; overflow: hidden;
  padding: 44px 0 40px; border-radius: 26px;
  background: linear-gradient(160deg, #edf3ee, var(--jev-bg) 60%, #dfe9e4);
}
.jev-wave { position: absolute; left: 0; top: 0; width: 100%; height: 120px; color: var(--jev); opacity: .22; z-index: -1; }
.jev-head {
  position: relative; padding: 0 44px;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 14px 56px; align-items: start;
}
.jev-kicker {
  display: flex; align-items: flex-start; gap: 9px; margin-bottom: 14px; max-width: 34ch;
  font: 500 14px/1.45 var(--sans); color: var(--jev);
}
.jev-kicker .ic { margin-top: 1px; }
.jev-head h2 { font: 400 58px/.98 var(--serif); letter-spacing: -.018em; color: #0d2b27; }
.jev-body { padding-top: 4px; }
.jev-what { font-size: 16px; line-height: 1.6; color: #2f3b38; max-width: 62ch; }
.jev-src { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; font-size: 13.5px; }
.jev-src-lab { font-size: 12px; color: #5d6b67; width: 100%; }
.jev-src a { display: inline-flex; align-items: baseline; gap: 5px; color: var(--jev); font-weight: 500; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--jev) 35%, transparent); text-underline-offset: 3px; }
.jev-src a:hover { text-decoration-color: var(--jev); }
.jev-src a .ic { align-self: center; }
.jev-note { margin-top: 12px; font-size: 12px; line-height: 1.5; color: #5d6b67; }
.jev-title { grid-column: 1; grid-row: 1; }
.jev-body { grid-column: 2; grid-row: 1 / span 2; }
.jev-nav { grid-column: 1; grid-row: 2; align-self: end; display: flex; gap: 8px; }
.jev-arrow {
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  border: 0; background: #fff; color: var(--jev); box-shadow: 0 0 0 1px color-mix(in srgb, var(--jev) 20%, transparent);
}
.jev-arrow:disabled { opacity: .4; cursor: default; }
.jev-arrow:not(:disabled):hover { background: var(--jev); color: #fff; }
.jev-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: 276px; gap: 18px;
  margin-top: 30px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 44px;
  padding: 4px 44px 10px;
  scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--jev) 30%, transparent) transparent;
}
.jev-row:focus-visible { outline: 2px solid var(--jev); outline-offset: -2px; }
.card--jev { scroll-snap-align: start; box-shadow: 0 0 0 1px color-mix(in srgb, var(--jev) 14%, transparent); }
.card--jev .card-demo { aspect-ratio: 16 / 10; }
.card--jev .card-title { font-size: 15.5px; }
.card--jev .card-body { padding-top: 12px; }
.jev-num { font: italic 400 26px/1 var(--serif); color: var(--jev); margin-bottom: 6px; }
.card--jev .card-why {
  margin-top: 8px; padding-left: 10px; border-left: 2px solid color-mix(in srgb, var(--jev) 45%, transparent);
  color: #3a4643; font-size: 13.5px;
}
.card--jev:has(.card-title button:focus-visible) { box-shadow: 0 0 0 2px var(--jev); }

@media (max-width: 980px) {
  .jev { padding: 34px 0 30px; }
  .jev-head { grid-template-columns: minmax(0, 1fr); padding: 0 30px; }
  .jev-title, .jev-body { grid-column: 1; grid-row: auto; }
  .jev-row { padding: 4px 30px 10px; scroll-padding: 0 30px; }
  .jev-nav { display: none !important; }
}
@media (max-width: 640px) {
  .jev { padding: 28px 0 22px; border-radius: 20px; margin-left: -4px; margin-right: -4px; }
  .jev-head { padding: 0 18px; }
  .jev-head h2 { font-size: 42px; }
  .jev-kicker { font-size: 13.5px; }
  .jev-what { font-size: 15px; }
  .jev-row { grid-auto-columns: 82%; margin-top: 22px; padding: 4px 18px 8px; scroll-padding: 0 18px; gap: 14px; }
  .use--try { margin-left: -5px; }
  .btn--try { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .card, .media img, .hero-cta, .drawer, .chip { transition: none !important; }
  .card:hover { transform: none; }
  .card:hover .media img { transform: none; }
  .xp-flow i { animation: none; opacity: .7; transform: none; }
  .xp-flow i:nth-of-type(1) { left: 10%; }
  .xp-flow i:nth-of-type(2) { left: 40%; }
  .xp-flow i:nth-of-type(3) { left: 70%; }
  .scrim { animation: none; }
}

/* ── Launch layer: preview note, badge, About link, feedback ─────────── */

.pv-note { background: var(--ink); color: #dcdde3; font-size: 13.5px; }
.pv-in { min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 12px; padding-top: 6px; padding-bottom: 6px; }
.pv-in p { text-align: center; }
.pv-link {
  border: 0; background: none; padding: 0; cursor: pointer; color: #fff; font-weight: 600;
  text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .4); text-underline-offset: 3px;
}
.pv-link:hover { text-decoration-color: #fff; }
.pv-note :focus-visible { outline-color: var(--accent-soft); }
.pv-x {
  flex: none; width: 26px; height: 26px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: rgba(255, 255, 255, .08); color: #dcdde3;
}
.pv-x:hover { background: rgba(255, 255, 255, .16); color: #fff; }

.pv-badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px;
  font: 600 11px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
  margin-left: -8px; white-space: nowrap;
}
.pv-badge--quiet { margin: 0 6px 0 0; height: 20px; font-size: 10.5px; vertical-align: 1px; }
.top-link {
  display: inline-flex; align-items: center; height: 38px; padding: 0 6px;
  font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none; border-radius: 8px;
}
.top-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.foot-links { grid-column: 2 / -1; font-size: 13px; }
.foot-btn {
  border: 0; background: none; padding: 0; cursor: pointer; font-size: inherit; color: var(--ink-2);
  text-decoration: underline; text-underline-offset: 2px;
}
.d-creator { margin-top: 10px; font-size: 12.5px; color: var(--mute); }
.d-creator .link { font-size: inherit; margin-left: 2px; }

/* The feedback pill: quiet, bottom-right, steps aside from anything pressable. */
.fb-pill {
  position: fixed; right: 18px; bottom: 18px; z-index: 50;
  display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 15px 0 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--card) 92%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--ink-2); font-size: 13.5px; font-weight: 500;
  box-shadow: 0 10px 28px -16px rgba(18, 19, 24, .45);
  transition: transform .3s var(--ease), opacity .25s var(--ease), border-color .2s, color .2s;
}
.fb-pill:hover { color: var(--ink); border-color: #cfccc2; }
.fb-pill[aria-expanded="true"] { color: var(--ink); border-color: var(--ink); }
.fb-pill.is-tucked { opacity: 0; transform: translateY(14px); pointer-events: none; }
.fb-pill.is-tucked:focus-visible { opacity: 1; transform: none; pointer-events: auto; }

.fb-panel {
  position: fixed; right: 18px; bottom: 70px; z-index: 70;
  width: min(390px, calc(100vw - 36px)); max-height: calc(100vh - 96px); overflow-y: auto; overscroll-behavior: contain;
  padding: 18px 20px 18px; border-radius: 20px;
  background: #fbfaf6; color: var(--ink);
  box-shadow: 0 0 0 1px var(--line), 0 30px 70px -30px rgba(10, 12, 20, .5);
  transform: translateY(10px); opacity: 0;
  transition: transform .3s var(--ease), opacity .25s var(--ease);
}
.fb-panel.is-open { transform: none; opacity: 1; }
.fb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.fb-head h2 { font: 400 25px/1.1 var(--serif); letter-spacing: -.01em; }
.fb-x { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); cursor: pointer; display: grid; place-items: center; }
.fb-x:hover { border-color: #c9c6bb; }
.fb-form { display: grid; gap: 14px; }
.fb-mode { display: grid; gap: 14px; }
.fb-field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.fb-field > label, .fb-field > legend { font-size: 14px; font-weight: 600; color: var(--ink); padding: 0; }
.fb-field > legend { margin-bottom: 6px; }
.fb-opt { font-weight: 400; color: var(--mute); font-size: 12.5px; margin-left: 4px; }
.fb-hint { font-size: 12.5px; color: var(--mute); }
.fb-lead { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.fb-form textarea, .fb-form input[type="email"], .fb-form input[type="url"], .fb-form input[type="text"] {
  width: 100%; min-width: 0; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card);
  font: 400 15px/1.45 var(--sans); color: var(--ink); resize: vertical;
}
.fb-form textarea:focus, .fb-form input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.fb-form [aria-invalid="true"] { border-color: #b2422c; }
.fb-switch {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; cursor: pointer;
  background: var(--paper-2); font-size: 13.5px; line-height: 1.4; color: var(--ink-2);
}
.fb-switch input { margin: 2px 0 0; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.fb-switch b { color: var(--ink); font-weight: 600; }
.fb-rate-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.fb-rate-opt { position: relative; cursor: pointer; }
.fb-rate-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.fb-rate-opt span[aria-hidden] {
  display: grid; place-items: center; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--card);
  font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2); transition: background .15s, color .15s, border-color .15s;
}
.fb-rate-opt:hover span[aria-hidden] { border-color: #c9c6bb; }
.fb-rate-opt input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.fb-rate-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.fb-rate-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--mute); }
.fb-ask { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.fb-ask > legend { width: 100%; }
.fb-ask label { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; cursor: pointer; }
.fb-ask input { accent-color: var(--accent); margin: 0; }
.fb-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.fb-msg:empty { display: none; }
.fb-msg { font-size: 13.5px; line-height: 1.45; padding: 9px 12px; border-radius: 10px; background: var(--paper-2); color: var(--ink-2); }
.fb-msg[data-kind="error"] { background: #fbe9e4; color: #8e2f1d; }
.fb-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.fb-send { height: 42px; padding: 0 22px; }
.fb-send:disabled { opacity: .6; cursor: progress; }
.fb-privacy { flex: 1 1 160px; font-size: 12px; color: var(--mute); line-height: 1.4; }
.fb-done { display: grid; gap: 10px; padding: 6px 0 2px; }
.fb-done-title { font: 400 24px/1.15 var(--serif); }
.fb-done-title:focus { outline: none; }
.fb-done-body { font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.fb-done-close { justify-self: start; height: 40px; margin-top: 4px; }

@media (max-width: 980px) {
  .foot-links { grid-column: auto; }
}
@media (max-width: 640px) {
  .top-bar { gap: 10px; }
  .mark { margin-right: 0; }
  .top-bar .pv-badge { margin-left: -2px; margin-right: auto; height: 20px; padding: 0 7px; font-size: 10px; }
  .top-link { padding: 0 2px; }
  .saved-btn { padding: 0 6px 0 11px; gap: 6px; }
  .pv-note { font-size: 13px; }
  .pv-in { justify-content: space-between; }
  .pv-in p { text-align: left; }
  .fb-pill { right: 12px; bottom: 12px; height: 38px; padding: 0 13px 0 11px; font-size: 13px; }
  .fb-panel {
    left: 0; right: 0; bottom: 0; width: 100%; max-height: calc(100% - 40px);
    border-radius: 20px 20px 0 0; padding: 16px 16px calc(18px + env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: reduce) {
  .fb-pill, .fb-panel { transition: none !important; }
}
@media (max-width: 400px) {
  /* Keep the header on one line: the bookmark icon and count stay, the word is kept for screen readers. */
  .saved-btn > span:not(.saved-n) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .saved-btn { padding: 0 6px 0 10px; }
}

/* ── Live counter: "● 7 here now · 23,461 views" ─────────────────────── *
 * Filled by launch.js from /api/presence on the published site only; it stays
 * hidden (no space taken) until the first good answer and on any error. */
.live {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  height: 26px; padding: 0 11px 0 10px; border-radius: 999px;
  font: 500 12.5px/1 var(--sans); color: var(--ink-2); white-space: nowrap;
  font-variant-numeric: tabular-nums;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line);
  animation: live-in .5s var(--ease) both;
}
.live[hidden] { display: none; }
.live-n { font-weight: 600; color: var(--ink); display: inline-block; }
.live-sep { color: var(--mute); }
.live-short { display: none; }
.live-dot {
  position: relative; flex: none; width: 7px; height: 7px; border-radius: 50%;
  background: #1f9a5b;
}
.live-dot::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: #1f9a5b; opacity: .45;
  animation: live-pulse 2.8s ease-out infinite;
}
.live-n.is-tick { animation: live-tick .45s var(--ease); }
@keyframes live-pulse { 0% { transform: scale(1); opacity: .45; } 70%, 100% { transform: scale(2.8); opacity: 0; } }
@keyframes live-tick { from { opacity: .25; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@keyframes live-in { from { opacity: 0; } to { opacity: 1; } }

/* The stage copy is for phones only; on wider screens the header pill shows. */
.live--stage { display: none; }

/* Tablets: the pill takes the place of the "92 projects · updated …" note. */
@media (min-width: 641px) and (max-width: 980px) {
  .top-bar:has(> .live:not([hidden])) .top-stamp { display: none; }
  .top-bar > .live { margin-left: auto; }
}
@media (min-width: 641px) and (max-width: 760px) {
  .top-bar > .live .live-views { display: none; } /* small tablets: just "● 7 here now" */
}

/* Phones: the header has no room, so the pill sits at the top of the dark stage. */
@media (max-width: 640px) {
  .top-bar > .live { display: none; }
  .stage { padding-top: 50px; }
  .live--stage {
    position: absolute; top: 14px; left: 16px; z-index: 1;
    display: inline-flex; height: 24px; padding: 0 10px 0 9px; gap: 6px; font-size: 12px;
    color: var(--stage-mute); background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
  }
  .live--stage[hidden] { display: none; }
  .live--stage .live-n { color: var(--stage-ink); }
  .live--stage .live-sep { color: var(--stage-mute); }
  .live--stage .live-dot, .live--stage .live-dot::after { background: #3ddc84; }
}
@media (prefers-reduced-motion: reduce) {
  .live, .live-n.is-tick { animation: none; }
  .live-dot::after { animation: none; opacity: 0; }
}
