/* ═══════════════════════════════════════════════════════════
   TrueDentalLibrary — prototype v2 (test build)
   Visual identity carried over from the live site:
   Outfit (headings, light weights) + Inter (body), neutral greys,
   thin borders, small radii, generous whitespace.
═══════════════════════════════════════════════════════════ */

:root {
  --bg:       #FAFAFA;
  --bg2:      #F4F4F4;
  --surface:  #FFFFFF;
  --border:   #EAEAEA;
  --border-2: #DADADA;
  --text:     #1A1A1A;
  --text-2:   #6B6B6B;
  --text-3:   #8A8A8A;
  --ink:      #121212;
  --tbc:      #8A6A1F;   /* "to be confirmed" marker */
  --tbc-bg:   #FBF6E9;
  --tbc-bd:   #E9DDB8;
  --r:        2px;
  --r-card:   6px;
  --sh:       0 1px 3px rgba(0,0,0,0.05), 0 6px 20px rgba(0,0,0,0.06);
  --sh-lg:    0 2px 8px rgba(0,0,0,0.05), 0 16px 48px rgba(0,0,0,0.09);
  --f-head:   'Outfit', system-ui, sans-serif;
  --f-body:   'Inter', system-ui, sans-serif;
  --nav-h:    60px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  overflow-x: hidden; /* on html only — body overflow-x breaks iOS scrolling */
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.005em;
}

img, video { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

.wrap    { max-width: 1120px; margin: 0 auto; padding: 0 40px; }
.wrap-sm { max-width:  680px; margin: 0 auto; padding: 0 40px; }

.label {
  display: inline-block;
  font-size: 10px; font-weight: 400;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-3);
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ── Prototype banner ─────────────────────────────── */
.proto-bar {
  background: var(--ink); color: rgba(255,255,255,0.78);
  font-size: 11.5px; letter-spacing: 0.02em; line-height: 1.5;
  text-align: center; padding: 7px 16px;
}
.proto-bar strong { color: #fff; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; font-size: 10px; margin-right: 8px; }

/* ── "To be confirmed" + placeholder markers ──────── */
.tbc {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--tbc); background: var(--tbc-bg); border: 1px solid var(--tbc-bd);
  border-radius: 100px; padding: 3px 10px; line-height: 1.4; white-space: nowrap;
  vertical-align: middle;
}
.tbc::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.tbc-note {
  font-size: 12.5px; color: var(--tbc); background: var(--tbc-bg);
  border: 1px dashed var(--tbc-bd); border-radius: var(--r-card);
  padding: 10px 14px; line-height: 1.6;
}

.placeholder {
  position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; gap: 10px;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(0,0,0,0.025) 14px 15px),
    var(--bg2);
  border: 1px dashed var(--border-2);
  color: var(--text-3); padding: 24px;
}
.placeholder-title { font-family: var(--f-head); font-size: 17px; font-weight: 300; color: var(--text-2); }
.placeholder-sub { font-size: 12px; max-width: 300px; line-height: 1.6; }
.placeholder .tbc { position: absolute; top: 12px; left: 12px; }

/* ── Navigation ───────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(250,250,250,0.94);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.site-nav .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-logo {
  font-family: var(--f-head); font-size: 14.5px; font-weight: 400;
  letter-spacing: 0.08em; color: var(--text); text-decoration: none; text-transform: uppercase;
  white-space: nowrap;
}
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a {
  font-size: 12.5px; font-weight: 400; color: var(--text-2);
  text-decoration: none; letter-spacing: 0.03em; transition: color 0.2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none; width: 40px; height: 40px; border: 1px solid var(--border);
  background: var(--surface); border-radius: var(--r); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 16px; height: 1.5px; background: var(--text); position: relative; content: '';
}
.nav-toggle span::before { position: absolute; top: -5px; }
.nav-toggle span::after  { position: absolute; top:  5px; }

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--f-body); font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 14px 28px; min-height: 46px;
  border: 1px solid transparent; border-radius: var(--r); cursor: pointer;
  text-decoration: none; transition: opacity 0.2s, transform 0.2s, background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { opacity: 0.8; transform: translateY(-1px); }
.btn-line { background: var(--surface); color: var(--text); border-color: var(--border-2); }
.btn-line:hover { border-color: var(--text); }
.btn-sm { padding: 9px 18px; min-height: 38px; font-size: 11px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--border-2);
  padding: 2px 0; font-size: 13px; letter-spacing: 0.02em; font-weight: 400;
  transition: border-color 0.2s;
}
.btn-ghost:hover { border-color: var(--text); }

/* ── Sections ─────────────────────────────────────── */
section { padding: 104px 0; }
.sec-head { margin-bottom: 52px; }
.sec-head.center { text-align: center; }
.sec-head .label { margin-bottom: 16px; display: block; }
.sec-title {
  font-family: var(--f-head);
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 200; line-height: 1.12; letter-spacing: -0.02em; color: var(--text);
}
.sec-title strong { font-weight: 400; }
.sec-body {
  font-size: 15px; color: var(--text-2);
  max-width: 520px; margin: 14px auto 0; line-height: 1.8;
}
.sec-head:not(.center) .sec-body { margin-left: 0; }

/* ═══════════════════════════════════════════════════
   HOME — HERO (v4: full-screen opening)
   Prototype bar + nav + hero = the initial viewport (--chrome-h is
   measured by js/site.js; 91px fallback). The video keeps 16:9 —
   no crop — and is sized to the space right of the text column,
   flush with the right edge of the viewport. Page background =
   the video's own black (1,1,1). Edge feathering is a mask on the
   video's own frame edges only (no colour filter on the teeth).
   Current: hero_v2.mp4 + posters/hero_v2.jpg + posters/hero_v2-still.jpg (use new names on the next update).
═══════════════════════════════════════════════════ */
:root { --hero-bg: #010101; --chrome-h: 91px; }
.hero {
  position: relative; overflow: hidden;
  background: var(--hero-bg); color: #fff;
  min-height: calc(100vh - var(--chrome-h));
  min-height: calc(100svh - var(--chrome-h));
  display: flex; align-items: center;
  padding: 40px 0;
}
.hero-grid { position: relative; z-index: 2; width: 100%; }
.hero-copy { max-width: 380px; }
.hero h1 {
  font-family: var(--f-head);
  font-size: clamp(40px, 4.4vw, 64px);
  font-weight: 300; line-height: 1.02; letter-spacing: -0.03em; color: #fff;
}
.hero-for {
  font-family: var(--f-head); font-weight: 200;
  font-size: clamp(26px, 2.6vw, 38px); letter-spacing: -0.02em; line-height: 1.15;
  color: rgba(255,255,255,0.78); margin: 6px 0 22px;
}
.hero-line { font-size: 15px; line-height: 1.65; color: rgba(255,255,255,0.6); margin-bottom: 30px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-ctas .btn { padding-left: 20px; padding-right: 20px; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.32); }
.btn-outline-light:hover { border-color: #fff; }

/* left edge of the media area = page gutter + text column */
.hero-media {
  /* v13: media sits inside the shared content grid (.wrap: 1120px incl. 40px padding), right edge = grid edge.
     Percentages resolve against the hero's width, so a desktop scrollbar does not skew the margins. */
  --gutter: max(40px, calc((100% - 1120px) / 2 + 40px));
  --avail-h: calc(100svh - var(--chrome-h) - 24px);
  position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%);
  width: min(calc(100% - 2 * var(--gutter) - 380px - 28px), calc(var(--avail-h) * 16 / 9));
  aspect-ratio: 16 / 9; line-height: 0; z-index: 1;
}
.hero-media video {
  width: 100%; height: 100%; display: block; object-fit: contain; background: var(--hero-bg);
  /* soften only the frame edges where close-ups are cut (left/top/bottom);
     the right edge is the viewport edge */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 10%, #000 92%, transparent 100%),
                      linear-gradient(to bottom, transparent 0, #000 7%, #000 93%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to right, transparent 0, #000 10%, #000 92%, transparent 100%),
                      linear-gradient(to bottom, transparent 0, #000 7%, #000 93%, transparent 100%);
          mask-composite: intersect;
}
.hero-anim > * { opacity: 0; animation: up 0.7s ease forwards; }
.hero-anim > *:nth-child(2) { animation-delay: 0.06s; }
.hero-anim > *:nth-child(3) { animation-delay: 0.12s; }
.hero-anim > *:nth-child(4) { animation-delay: 0.18s; }
.hero-fade { opacity: 0; animation: fadein 1s ease 0.15s forwards; }
@keyframes fadein { to { opacity: 1; } }

@media (max-width: 860px) {
  .hero {
    flex-direction: column; justify-content: center; align-items: stretch;
    gap: 18px; padding: 20px 0 36px;
    min-height: 0;                    /* mobile: size to content — no empty black bands */
  }
  .hero-copy { max-width: none; }
  .hero h1 { font-size: clamp(36px, 10.5vw, 52px); }
  .hero-for { font-size: clamp(24px, 7vw, 32px); margin: 4px 0 16px; }
  .hero-line { margin-bottom: 22px; }
  .hero-media {
    position: relative; top: auto; right: auto; transform: none;
    width: 100%; order: -1;            /* video first, text below */
  }
  .hero-media video {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 7%, #000 93%, transparent 100%);
            mask-image: linear-gradient(to bottom, transparent 0, #000 7%, #000 93%, transparent 100%);
  }
}
@media (max-width: 520px) {
  .hero-ctas .btn { flex: 1 1 0; padding-left: 10px; padding-right: 10px; }
}
@media (prefers-reduced-motion: reduce) { .hero-fade { opacity: 1; animation: none; } }

/* ═══════════════════════════════════════════════════
   LIBRARY CARDS
═══════════════════════════════════════════════════ */
#libraries { background: var(--bg); }
.lib-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.lib-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-card); overflow: hidden; box-shadow: var(--sh);
  transition: box-shadow 0.25s, transform 0.25s;
}
.lib-card:hover { box-shadow: var(--sh-lg); }
.lib-media { aspect-ratio: 16 / 9; background: #000; line-height: 0; overflow: hidden; }
.lib-media video, .lib-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-media.placeholder { background-color: var(--bg2); line-height: 1.5; border: none; border-bottom: 1px dashed var(--border-2); }
.lib-text { padding: 24px 26px 26px; display: flex; flex-direction: column; flex: 1; }
.lib-name { font-family: var(--f-head); font-size: 22px; font-weight: 300; letter-spacing: -0.01em; margin-bottom: 2px; }
.lib-by { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3); margin-bottom: 14px; display: block; }
.lib-desc { font-size: 14px; color: var(--text-2); line-height: 1.75; margin-bottom: 18px; }
.lib-versions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.lib-version { border: 1px solid var(--border); border-radius: var(--r-card); padding: 10px 12px; background: var(--bg); }
.lib-version .v-name { display: block; font-size: 10px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text); margin-bottom: 2px; }
.lib-version .v-what { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.lib-version.is-free { background: var(--surface); border-color: var(--text); }
.lib-meta { font-size: 12.5px; color: var(--text-2); margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.lib-meta span::before { content: ''; display: inline-block; width: 10px; height: 1px; background: var(--text-3); vertical-align: middle; margin-right: 7px; }
.lib-link { margin-top: auto; align-self: flex-start; }

/* ═══════════════════════════════════════════════════
   CUTBACK IN SECONDS (workflow video)
═══════════════════════════════════════════════════ */
.workflow { background: #111111; color: #fff; padding: 96px 0; }   /* = how_it_works.mp4 background (17,17,17) */
.workflow-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.workflow .label { color: rgba(255,255,255,0.45); margin-bottom: 18px; display: block; }
.workflow h2 {
  font-family: var(--f-head); font-size: clamp(34px, 4vw, 56px);
  font-weight: 200; line-height: 1.04; letter-spacing: -0.022em; margin-bottom: 22px;
}
.workflow h2 strong { font-weight: 400; display: block; }
.workflow-sub { font-size: 14px; color: rgba(255,255,255,0.6); line-height: 1.8; }
.workflow-sub span { display: block; }
.workflow-note { margin-top: 26px; font-size: 12.5px; color: rgba(255,255,255,0.5); line-height: 1.7; }
.workflow-note a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.35); }
.workflow-media {
  line-height: 0; background: #111111;   /* no border or shadow: the recording blends into the section */
}
.workflow-media video { width: 100%; height: auto; display: block; }

/* ═══════════════════════════════════════════════════
   AUTHORS
═══════════════════════════════════════════════════ */
#about { background: var(--bg); border-top: 1px solid var(--border); }
.authors-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.author-card {
  display: flex; gap: 28px; align-items: flex-start;
  padding: 32px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--sh);
}
.author-portrait {
  width: 180px; flex-shrink: 0; border-radius: var(--r-card); overflow: hidden;
  background: var(--bg2); border: 1px solid var(--border); line-height: 0;
}
.author-portrait img { width: 100%; height: auto; display: block; }
.author-info { flex: 1; min-width: 0; padding-top: 4px; }
.author-name { font-family: var(--f-head); font-size: 19px; font-weight: 300; margin-bottom: 4px; }
.author-role { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; }
.author-note { font-size: 14px; color: var(--text-2); line-height: 1.7; margin-bottom: 14px; }
.authors-foot { text-align: center; margin-top: 28px; font-size: 12.5px; color: var(--text-3); }

/* ═══════════════════════════════════════════════════
   CHROMA MAP
═══════════════════════════════════════════════════ */
#chroma-map { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.chroma-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.chroma-inner .label { display: block; margin-bottom: 20px; }
.chroma-headline {
  font-family: var(--f-head); font-size: clamp(26px, 2.8vw, 40px);
  font-weight: 200; line-height: 1.12; letter-spacing: -0.018em; margin-bottom: 20px;
}
.chroma-headline strong { font-weight: 400; }
.chroma-body { font-size: 14px; color: var(--text-2); line-height: 1.8; margin-bottom: 30px; max-width: 460px; }
.chroma-collab {
  margin-bottom: 30px; padding: 14px 18px;
  border: 1px solid var(--border); border-radius: var(--r-card);
  background: var(--bg2); width: fit-content; max-width: 100%;
}
.chroma-collab-label { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.chroma-collab-brands { font-size: 13px; font-weight: 500; color: var(--text); letter-spacing: 0.03em; }
.chroma-cta {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text); text-decoration: none; border-bottom: 1px solid var(--text); padding-bottom: 2px;
}
.chroma-cta:hover { opacity: 0.6; }
.chroma-visual {
  display: block; position: relative; border-radius: var(--r-card); overflow: hidden;
  box-shadow: var(--sh-lg); transition: transform 0.3s ease, box-shadow 0.3s ease; line-height: 0;
  max-width: 440px; justify-self: center;
}
.chroma-visual:hover { transform: translateY(-4px); }
.chroma-visual img { width: 100%; height: auto; display: block; }

/* ═══════════════════════════════════════════════════
   OFFER
═══════════════════════════════════════════════════ */
#offer { background: var(--bg); }
.offer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.offer-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 30px 28px; box-shadow: var(--sh);
}
.offer-kicker { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.offer-name { font-family: var(--f-head); font-size: 23px; font-weight: 300; letter-spacing: -0.01em; margin-bottom: 14px; }
.offer-price { font-family: var(--f-head); font-size: 19px; font-weight: 300; color: var(--text); margin-bottom: 4px; }
.offer-price-note { font-size: 11.5px; color: var(--text-3); margin-bottom: 20px; }
.offer-list { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-bottom: 24px; font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
.offer-list li { display: flex; gap: 10px; align-items: baseline; }
.offer-list li::before { content: ''; flex: 0 0 10px; height: 1px; background: var(--text-3); transform: translateY(-3px); }
.offer-actions { margin-top: auto; display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.offer-actions .btn-ghost { align-self: center; font-size: 12.5px; }

.offer-bundle {
  margin-top: 20px;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(220px, 0.8fr);
  gap: 32px; align-items: center;
  background: var(--surface); border: 1px solid var(--text);
  border-radius: var(--r-card); padding: 32px 36px; box-shadow: var(--sh-lg);
  position: relative;
}
.offer-badge {
  display: inline-block; background: var(--text); color: #fff;
  border-radius: 100px; padding: 4px 12px; margin-bottom: 12px;
  font-size: 9.5px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
}
.offer-bundle .offer-name { font-size: 28px; margin-bottom: 6px; }
.offer-bundle p { font-size: 13.5px; color: var(--text-2); line-height: 1.7; }
.offer-bundle .offer-list { margin-bottom: 0; }
.offer-foot { text-align: center; margin-top: 30px; font-size: 12px; color: var(--text-3); line-height: 1.8; }
.offer-foot a { color: var(--text-2); text-decoration: none; border-bottom: 1px solid var(--border-2); }

/* ═══════════════════════════════════════════════════
   WORKING WITH (unchanged from live, plus responsive fixes)
═══════════════════════════════════════════════════ */
#trusted { background: var(--surface); border-top: 1px solid var(--border); padding: 104px 0; }
.trusted-head { text-align: center; margin-bottom: 16px; }
.trusted-head .label { display: block; margin-bottom: 16px; }
.trusted-title { font-family: var(--f-head); font-size: clamp(26px, 2.8vw, 40px); font-weight: 200; letter-spacing: -0.015em; margin-bottom: 8px; }
.trusted-subtitle { font-size: 13px; color: var(--text-3); letter-spacing: 0.04em; margin-bottom: 56px; }
.profiles-grid { display: flex; flex-wrap: nowrap; justify-content: space-between; align-items: flex-start; }
.profile-item { display: flex; flex-direction: column; align-items: center; gap: 11px; flex: 1; min-width: 0; transition: opacity 0.22s; }
.profile-item:hover { opacity: 0.65; }
.profile-item > a { text-decoration: none; }
.profile-avatar {
  width: 68px; height: 68px; border-radius: 50%; padding: 2px;
  background: linear-gradient(135deg, #d0d0d0 0%, #a0a0a0 100%);
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}
.profile-avatar-inner { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: var(--bg2); border: 2px solid var(--surface); }
.profile-avatar-inner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-handle { font-size: 11px; color: var(--text-2); text-align: center; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }
.profile-handle a { color: inherit; text-decoration: none; }
.trusted-more { text-align: center; margin-top: 48px; font-size: 11px; color: var(--text-3); letter-spacing: 0.14em; text-transform: uppercase; }
.trusted-more::before, .trusted-more::after { content: ''; display: inline-block; width: 20px; height: 1px; background: var(--border); vertical-align: middle; margin: 0 10px; }

/* ═══════════════════════════════════════════════════
   FAQ — compact accordion (native <details>)
═══════════════════════════════════════════════════ */
#faq { background: var(--bg); border-top: 1px solid var(--border); padding: 88px 0; }
#faq .sec-head { margin-bottom: 32px; }
.faq-list { max-width: 680px; margin: 0 auto; border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 16px 0; font-size: 14.5px; font-weight: 400; color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--text-2); }
.faq-icon {
  flex-shrink: 0; width: 20px; height: 20px; border: 1px solid var(--border-2); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--text-3);
  font-size: 14px; line-height: 1; transition: transform 0.25s;
}
.faq-item[open] .faq-icon { transform: rotate(45deg); }
.faq-a { padding: 0 36px 18px 0; font-size: 13.5px; color: var(--text-2); line-height: 1.8; }
.faq-a p + p { margin-top: 8px; }
.faq-a a { color: var(--text); }

/* ═══════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════ */
footer { border-top: 1px solid var(--border); padding: 44px 0 56px; background: var(--surface); }
.foot-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.foot-logo { font-family: var(--f-head); font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text); text-decoration: none; }
.foot-links { display: flex; gap: 10px 22px; list-style: none; flex-wrap: wrap; }
.foot-links a { font-size: 11.5px; color: var(--text-3); text-decoration: none; letter-spacing: 0.03em; }
.foot-links a:hover { color: var(--text); }
.foot-copy { font-size: 10.5px; color: var(--text-3); letter-spacing: 0.06em; width: 100%; }

/* ═══════════════════════════════════════════════════
   LIBRARY PAGES
═══════════════════════════════════════════════════ */
.crumb { font-size: 12px; color: var(--text-3); margin-bottom: 22px; }
.crumb a { color: var(--text-2); text-decoration: none; border-bottom: 1px solid var(--border-2); }

.p-hero { background: var(--surface); border-bottom: 1px solid var(--border); padding: 44px 0 64px; }
.p-hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.p-hero h1 { font-family: var(--f-head); font-size: clamp(34px, 4vw, 54px); font-weight: 200; line-height: 1.06; letter-spacing: -0.025em; margin-bottom: 6px; }
.p-by { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3); margin-bottom: 20px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.p-intro { font-size: 15.5px; color: var(--text-2); line-height: 1.8; margin-bottom: 26px; max-width: 480px; }
.p-price { font-family: var(--f-head); font-size: 18px; font-weight: 300; margin-bottom: 18px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.p-ctas { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }

/* Preview stage (video now, 3D viewer later) */
.stage {
  position: relative; border-radius: var(--r-card); overflow: hidden;
  background: #000; aspect-ratio: 16 / 10; line-height: 0;
  border: 1px solid var(--border); box-shadow: var(--sh-lg);
}
.stage video, .stage img { width: 100%; height: 100%; object-fit: contain; display: block; }
.stage-tag {
  position: absolute; left: 12px; top: 12px; line-height: 1.4;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500;
  background: rgba(255,255,255,0.92); color: var(--text); padding: 4px 10px; border-radius: 100px;
}
.stage-caption { font-size: 12px; color: var(--text-3); margin-top: 12px; line-height: 1.6; }
.stage.placeholder { background-color: var(--bg2); line-height: 1.5; box-shadow: none; }
.stage.placeholder .tbc { top: 14px; left: 14px; }
.stage-icon { width: 44px; height: 44px; border: 1px solid var(--border-2); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-3); margin-bottom: 4px; }

.p-section { padding: 88px 0; border-bottom: 1px solid var(--border); }
.p-section.alt { background: var(--surface); }
.p-section .sec-head { margin-bottom: 40px; }

.options-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.option {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 26px 26px 24px;
}
.option h3 { font-family: var(--f-head); font-size: 20px; font-weight: 300; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.option p { font-size: 14px; color: var(--text-2); line-height: 1.75; }

.examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.example { margin: 0; }
.example-media { border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--border); background: #000; line-height: 0; aspect-ratio: 16 / 9; }
.example-media video, .example-media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.example figcaption { font-size: 12.5px; color: var(--text-3); margin-top: 10px; }
.example.wide { grid-column: 1 / -1; }
.example.wide .example-media { aspect-ratio: auto; }
.example.wide .example-media img { height: auto; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--border); align-items: start; }
.step { padding: 28px 24px 0; border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.step:first-child { padding-left: 0; }
.step:last-child { border-right: none; padding-right: 0; }
.step-n { font-family: var(--f-head); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; display: block; }
.step-title { font-size: 17px; font-weight: 500; margin-bottom: 8px; }
.step-body { font-size: 14px; color: var(--text-2); line-height: 1.72; margin-bottom: 20px; min-height: 5.2em; }
.step-img { border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--border); line-height: 0; background: var(--bg2); }
.step-img img { width: 100%; height: auto; display: block; }
.steps-note { font-size: 12px; color: var(--text-3); margin-top: 18px; }

.info-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
.info-block h3 { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); font-weight: 500; margin-bottom: 16px; }
.check-list { list-style: none; border-top: 1px solid var(--border); }
.check-list li { display: flex; gap: 14px; align-items: baseline; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--text); }
.check-list li span:first-child { display: flex; gap: 12px; align-items: baseline; }
.check-list li span:first-child::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--text-3); flex: 0 0 4px; transform: translateY(-3px); }
.check-list small { font-size: 12.5px; color: var(--text-3); }
.info-block p { font-size: 14px; color: var(--text-2); line-height: 1.8; }
.info-block p + p { margin-top: 10px; }

/* Free vs Full comparison */
.compare { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; font-size: 14px; }
.compare th, .compare td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.compare thead th { font-family: var(--f-head); font-weight: 300; font-size: 20px; background: var(--bg); }
.compare thead th small { display: block; font-family: var(--f-body); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); font-weight: 400; margin-bottom: 2px; }
.compare tbody th { font-weight: 400; color: var(--text-2); width: 38%; }
.compare td { color: var(--text); }
.compare tr:last-child td, .compare tr:last-child th { border-bottom: none; }
.compare .yes::before { content: '✓'; margin-right: 8px; font-weight: 500; }
.compare .no { color: var(--text-3); }
.compare .no::before { content: '—'; margin-right: 8px; }
.compare tfoot td { background: var(--bg); }
.compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.buy-band { background: var(--surface); border-bottom: 1px solid var(--border); padding: 72px 0; }
.buy-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; border: 1px solid var(--border); border-radius: var(--r-card); padding: 32px 36px; box-shadow: var(--sh); background: var(--surface); }
.buy-box h2 { font-family: var(--f-head); font-weight: 300; font-size: 26px; margin-bottom: 6px; }
.buy-box p { font-size: 14px; color: var(--text-2); }
.buy-box .p-ctas { justify-content: flex-end; }
.bundle-link { margin-top: 20px; font-size: 13px; color: var(--text-2); text-align: center; }
.bundle-link a { color: var(--text); }

.other-libs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.other-lib { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); text-decoration: none; transition: border-color 0.2s; }
.other-lib:hover { border-color: var(--text-3); }
.other-lib strong { font-family: var(--f-head); font-weight: 300; font-size: 18px; display: block; }
.other-lib span { font-size: 12.5px; color: var(--text-3); }

/* ═══════════════════════════════════════════════════
   DEMO FREE-DOWNLOAD FLOW
═══════════════════════════════════════════════════ */
.demo-flag {
  display: flex; gap: 14px; align-items: flex-start;
  border: 1px dashed var(--tbc-bd); background: var(--tbc-bg); color: var(--tbc);
  border-radius: var(--r-card); padding: 14px 18px; font-size: 13px; line-height: 1.65; margin-bottom: 28px;
}
.demo-flag strong { font-weight: 600; }
.flow { display: flex; gap: 8px; list-style: none; flex-wrap: wrap; font-size: 11.5px; color: var(--text-3); margin-top: 6px; }
.flow li { display: flex; align-items: center; gap: 8px; }
.flow li + li::before { content: '→'; color: var(--tbc-bd); }

.dl-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 48px; align-items: start; }
.dl-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 32px; box-shadow: var(--sh); }
.dl-card h2 { font-family: var(--f-head); font-weight: 300; font-size: 24px; margin-bottom: 6px; }
.dl-card > p { font-size: 13.5px; color: var(--text-2); margin-bottom: 22px; }
.stepper { display: flex; gap: 0; list-style: none; margin-bottom: 26px; border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.stepper li { flex: 1; padding: 10px 14px; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); background: var(--bg); }
.stepper li + li { border-left: 1px solid var(--border); }
.stepper li[aria-current="step"] { color: var(--text); background: var(--surface); font-weight: 500; }
.stepper li.done { color: var(--text-2); }

.field { margin-bottom: 8px; }
.field label { display: block; font-size: 12px; font-weight: 500; color: var(--text); margin-bottom: 6px; letter-spacing: 0.02em; }
.field label .opt { font-weight: 300; color: var(--text-3); }
.field label .req { color: var(--text-3); font-weight: 400; }
.field input {
  width: 100%; font: inherit; font-size: 15px; font-weight: 300; color: var(--text);
  padding: 11px 13px; border: 1px solid var(--border-2); border-radius: var(--r); background: var(--surface);
}
.field input:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px rgba(0,0,0,0.06); }
.field input[aria-invalid="true"] { border-color: #B3261E; }
.field-err { display: block; font-size: 12px; line-height: 18px; color: #B3261E; margin-top: 4px; min-height: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-note { font-size: 12px; color: var(--text-3); line-height: 1.6; margin-top: 14px; }

.dl-side h3 { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); font-weight: 500; margin-bottom: 14px; }
.dl-side .check-list { margin-bottom: 26px; }

.install-steps { list-style: none; counter-reset: s; margin: 18px 0 8px; }
.install-steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--border); font-size: 14px; color: var(--text-2); line-height: 1.65; }
.install-steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--f-head); font-size: 12px; color: var(--text-3); padding-top: 2px; }
.dl-placeholder { display: flex; flex-direction: column; gap: 8px; align-items: stretch; margin: 22px 0 6px; }
.dl-placeholder small { font-size: 12px; color: var(--text-3); text-align: center; }

/* ═══════════════════════════════════════════════════
   DEMO CHECKOUT MODAL
═══════════════════════════════════════════════════ */
dialog.demo-modal {
  border: 1px solid var(--border); border-radius: var(--r-card); padding: 0;
  width: min(440px, calc(100vw - 32px)); box-shadow: var(--sh-lg); color: var(--text);
  margin: auto;
}
dialog.demo-modal::backdrop { background: rgba(18,18,18,0.45); backdrop-filter: blur(2px); }
.modal-body { padding: 30px 30px 26px; }
.modal-body h2 { font-family: var(--f-head); font-weight: 300; font-size: 22px; margin: 12px 0 8px; }
.modal-body p { font-size: 14px; color: var(--text-2); line-height: 1.7; }
.modal-body p + p { margin-top: 8px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }

/* ── Reveal + animations ─────────────────────────── */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.on { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@keyframes up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .reveal, .hero-anim > * { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════ */
@media (max-width: 1020px) {
  .offer-grid { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .offer-bundle { grid-template-columns: 1fr; max-width: 560px; margin: 20px auto 0; gap: 20px; padding: 30px 28px; }
  .lib-grid { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .authors-inner { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
}

@media (max-width: 860px) {
  :root { --nav-h: 56px; }
  section { padding: 72px 0; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--sh);
    padding: 6px 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 13px 24px; font-size: 14px; }

  .p-hero-grid { grid-template-columns: 1fr; }
  .workflow { padding: 72px 0; }
  .workflow-grid { grid-template-columns: 1fr; }
  .chroma-inner { grid-template-columns: 1fr; gap: 40px; }
  .chroma-visual { max-width: 320px; }
  .info-grid, .dl-grid { grid-template-columns: 1fr; gap: 36px; }
  .examples, .options-grid, .other-libs { grid-template-columns: 1fr; }
  .buy-box { grid-template-columns: 1fr; padding: 26px 22px; }
  .buy-box .p-ctas { justify-content: flex-start; }
  .p-section { padding: 64px 0; }
  .profiles-grid { flex-wrap: wrap; justify-content: center; gap: 28px 12px; }
  .profile-item { flex: 0 0 96px; width: 96px; }
  .profile-avatar { width: 58px; height: 58px; }
}

@media (max-width: 640px) {
  .steps { grid-template-columns: 1fr; }
  .step, .step:first-child, .step:last-child { padding: 24px 0; border-right: none; border-bottom: 1px solid var(--border); }
  .step-body { min-height: 0; }
  .author-card { flex-direction: column; gap: 20px; padding: 24px; }
  .author-portrait { width: 100%; max-width: 240px; }
  .compare th, .compare td { padding: 12px 12px; font-size: 13px; }
  .compare thead th { font-size: 16px; }
}

@media (max-width: 520px) {
  .wrap, .wrap-sm { padding: 0 20px; }
  .nav-right .btn { padding: 8px 12px; font-size: 10px; letter-spacing: 0.08em; }
  .nav-logo { font-size: 12.5px; letter-spacing: 0.05em; }
  .lib-versions { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .dl-card { padding: 24px 20px; }
  .stage { aspect-ratio: 4 / 3; }
}

@media (max-width: 380px) {
  .nav-logo { font-size: 11px; }
  .nav-right { gap: 8px; }
}

/* ── Small-screen fixes (nav fit, comparison table fit) ── */
.nav-right .btn { text-transform: uppercase; gap: 0; }
@media (max-width: 640px) {
  .compare { table-layout: fixed; }
  .compare tbody th { width: 34%; }
  .compare .tbc { white-space: normal; letter-spacing: 0.04em; font-size: 9.5px; }
  .compare th, .compare td { padding: 12px 10px; word-wrap: break-word; }
  .compare tfoot .btn { white-space: normal; width: 100%; padding: 8px 6px; font-size: 10px; letter-spacing: 0.06em; }
}
@media (max-width: 440px) {
  .hide-xs { display: none; }
  .site-nav .wrap { gap: 10px; }
  .nav-right { gap: 8px; }
  .nav-toggle { width: 38px; height: 38px; }
}
.example-media.placeholder { background-color: var(--bg2); }
#step-details > p, #step-download > p:not(.tbc-note) { font-size: 13.5px; color: var(--text-2); }
#step-details > p:first-of-type, #step-download > p:first-of-type { margin-bottom: 22px; }


/* ═══════════════════════════════════════════════════
   v3 ADDITIONS — compact pricing, media switch, dedication
═══════════════════════════════════════════════════ */
.demo-tag {
  display: inline-block; font-size: 8.5px; font-weight: 600; letter-spacing: 0.14em;
  padding: 2px 6px; border-radius: 100px; margin-left: 8px;
  background: var(--tbc-bg); color: var(--tbc); border: 1px solid var(--tbc-bd); vertical-align: middle;
}
.btn-light .demo-tag, .btn-line .demo-tag { background: var(--tbc-bg); }

#offer .sec-head { margin-bottom: 36px; }
.price-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.price-card {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 22px 22px 20px; box-shadow: var(--sh);
}
.price-card h3 { font-family: var(--f-head); font-size: 20px; font-weight: 300; letter-spacing: -0.01em; }
.price-card .what { font-size: 13px; color: var(--text-2); line-height: 1.5; min-height: 2.9em; }
.price-card .amount { font-family: var(--f-head); font-size: 34px; font-weight: 200; letter-spacing: -0.02em; line-height: 1.1; margin: 4px 0 12px; }
.price-card .btn { margin-top: auto; width: 100%; padding-left: 10px; padding-right: 10px; }
.price-card.is-free { background: var(--bg); box-shadow: none; }

.price-bundle {
  margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 28px; align-items: center;
  background: var(--surface); border: 1px solid var(--text); border-radius: var(--r-card);
  padding: 22px 28px; box-shadow: var(--sh-lg);
}
.price-bundle h3 { font-family: var(--f-head); font-size: 22px; font-weight: 400; }
.price-bundle .what { font-size: 13px; color: var(--text-2); }
.price-bundle .amount { font-family: var(--f-head); font-size: 38px; font-weight: 200; letter-spacing: -0.02em; line-height: 1; text-align: right; }
.price-bundle .save { display: block; font-family: var(--f-body); font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); margin-top: 6px; }
.price-note { text-align: center; margin-top: 22px; font-size: 12px; color: var(--text-3); }
.price-note a { color: var(--text-2); }

/* Video / 3D switch on library pages */
.media-switch { display: inline-flex; border: 1px solid var(--border-2); border-radius: 100px; padding: 3px; margin-bottom: 12px; background: var(--surface); }
.media-switch button {
  font: inherit; font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  border: 0; background: transparent; color: var(--text-2); padding: 6px 16px; border-radius: 100px; cursor: pointer;
}
.media-switch button[aria-selected="true"] { background: var(--text); color: #fff; }
.stage-panel[hidden] { display: none !important; }
.stage.is-dark-bg { background: var(--hero-bg); }

/* Tony dedication — compact, light */
.dedication {
  display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 22px; align-items: center;
  max-width: 640px; margin: 0 auto; padding: 22px 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
}
.dedication-portrait {
  width: 88px; height: 88px; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 9.5px; line-height: 1.3; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3);
  background: var(--bg2); border: 1px dashed var(--border-2); padding: 8px;
}
.dedication .label { display: block; margin-bottom: 6px; }
.dedication p { font-size: 14.5px; color: var(--text); line-height: 1.65; }
.dedication .tbc { margin-top: 8px; }

@media (max-width: 1020px) {
  .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .price-bundle { grid-template-columns: 1fr auto; gap: 14px 20px; padding: 20px; }
  .price-bundle .btn { grid-column: 1 / -1; width: 100%; }
  .dedication { grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding: 18px; }
  .dedication-portrait { width: 64px; height: 64px; font-size: 8px; }
}
@media (max-width: 420px) {
  .price-grid { grid-template-columns: 1fr; }
  .price-card .what { min-height: 0; }
}
.dedication .tbc { white-space: normal; line-height: 1.4; }


/* ═══════════════════════════════════════════════════
   v4 ADDITIONS
═══════════════════════════════════════════════════ */
.lib-kicker, .price-kicker { display: block; font-family: var(--f-body); font-size: 10px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.lib-memo { font-size: 13px; color: var(--text-2); margin: -6px 0 18px; }
.lib-version .v-name { white-space: nowrap; }

/* FAQ — a narrow full-width near-black disclosure strip */
#faq { padding: 0; background: #0b0b0b; border-top: 0; color: #fff; }
.faq-outer { max-width: 680px; margin: 0 auto; }
.faq-outer-sum {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px 0;
}
.faq-outer-sum::-webkit-details-marker { display: none; }
.faq-outer-title { font-family: var(--f-head); font-size: 18px; font-weight: 300; letter-spacing: 0.01em; color: #fff; }
#faq .faq-icon { border-color: rgba(255,255,255,0.35); color: #fff; }
.faq-outer[open] > .faq-outer-sum .faq-icon { transform: rotate(45deg); }
.faq-outer > .faq-list { margin: 0 0 18px; border-top: 1px solid rgba(255,255,255,0.14); }
#faq .faq-item { border-bottom: 1px solid rgba(255,255,255,0.14); }
#faq .faq-item summary { color: rgba(255,255,255,0.92); }
#faq .faq-item summary:hover { color: #fff; }
#faq .faq-a { color: rgba(255,255,255,0.66); }
#faq .faq-a a { color: #fff; }
.faq-outer-sum:focus-visible, #faq .faq-item summary:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

/* Library pages — step selector */
.stepper-x { display: grid; grid-template-columns: minmax(0, 72fr) minmax(0, 28fr); gap: 28px; align-items: start; }
.stepper-img {
  position: relative; margin: 0; border-radius: var(--r-card); overflow: hidden;
  border: 1px solid var(--border); background: #0b0b0b; line-height: 0;
  aspect-ratio: 1410 / 632;                 /* all three step images share this ratio */
}
.stepper-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.stepper-img button.zoom {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; cursor: zoom-in;
}
.stepper-img .zoom-hint {
  position: absolute; right: 10px; bottom: 10px; line-height: 1.4; pointer-events: none;
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500;
  background: rgba(255,255,255,0.9); color: var(--text); padding: 4px 9px; border-radius: 100px;
}
.stepper-tabs { display: flex; flex-direction: column; gap: 6px; }
.stepper-tabs button {
  display: flex; align-items: baseline; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 400; color: var(--text-2);
  background: transparent; border: 1px solid var(--border); border-radius: var(--r-card); padding: 11px 14px;
}
.stepper-tabs button .n { font-family: var(--f-head); font-size: 11px; letter-spacing: 0.18em; color: var(--text-3); }
.stepper-tabs button[aria-selected="true"] { color: var(--text); border-color: var(--text); background: var(--surface); font-weight: 500; }
.stepper-desc { margin-top: 18px; }
.stepper-desc h3 { font-size: 17px; font-weight: 500; margin-bottom: 6px; }
.stepper-desc p { font-size: 14px; color: var(--text-2); line-height: 1.72; }
dialog.zoom-modal { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 92vh; margin: auto; }
dialog.zoom-modal::backdrop { background: rgba(10,10,10,0.82); }
dialog.zoom-modal img { display: block; max-width: 96vw; max-height: 86vh; width: auto; height: auto; border-radius: var(--r-card); }
dialog.zoom-modal .zoom-close { display: block; margin: 10px auto 0; }

@media (max-width: 760px) {
  .stepper-x { grid-template-columns: 1fr; gap: 14px; }
  .stepper-tabs { flex-direction: row; }
  .stepper-tabs button { flex: 1 1 0; flex-direction: column; gap: 2px; padding: 9px 8px; font-size: 13.5px; min-width: 0; }
  .stepper-desc { margin-top: 12px; }
  .stepper-img .zoom-hint { display: none; }
}

/* Tony dedication uses the author-card layout */
.p-section.author-dark { background: #0b0b0b; border-bottom: 0; }
.author-dark .author-card { background: #141414; border-color: rgba(255,255,255,0.08); box-shadow: none; }
.author-dark .author-portrait { width: 180px; aspect-ratio: 312 / 405; border-color: rgba(255,255,255,0.1); background: #1a1a1a; }
.author-dark .author-portrait img { width: 100%; height: 100%; object-fit: cover; }
.author-dark .label { color: rgba(255,255,255,0.5); display: block; margin-bottom: 10px; }
.author-dark .author-name { color: #fff; font-size: 21px; }
.author-dark .author-role { color: rgba(255,255,255,0.55); }
.author-dark .author-note { color: rgba(255,255,255,0.72); }
@media (max-width: 640px) { .author-dark .author-portrait { width: 160px; } }


/* ═══════════════════════════════════════════════════
   v5 ADDITIONS
═══════════════════════════════════════════════════ */
/* How it works — compact header above a near-full-width video */
.workflow { padding: 72px 0 80px; }
.workflow-stack .workflow-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 48px; align-items: end; margin-bottom: 28px;
}
.workflow-stack .workflow-head h2 { margin-bottom: 0; }
.workflow-stack .workflow-head h2 strong { display: inline; }
.workflow-stack .workflow-sub span { display: inline; }
.workflow-stack .workflow-sub span + span::before { content: ' '; }
.workflow-stack .workflow-note { margin-top: 10px; }
.workflow-stack .workflow-media { position: relative; width: 100%; }
.workflow-stack .workflow-media video { width: 100%; height: auto; aspect-ratio: 1560 / 1026; }
.video-fs {
  position: absolute; right: 12px; bottom: 12px; line-height: 1.4;
  font: 500 10.5px/1.4 var(--f-body); letter-spacing: 0.12em; text-transform: uppercase;
  color: #fff; background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.25); border-radius: 100px;
  padding: 6px 12px; cursor: pointer;
}
.video-fs:hover { background: rgba(0,0,0,0.8); }
@media (max-width: 760px) {
  .workflow-stack .workflow-head { grid-template-columns: 1fr; }
  .workflow-stack .workflow-media { margin: 0 -20px; width: auto; }
}

/* 3D viewer */
.stage.viewer-stage { background: #000; }
.stage.viewer-stage.is-dark-bg { background: var(--hero-bg); }
.stage.viewer-on { line-height: 1.5; }
.viewer-canvas { position: absolute; inset: 0; }
.viewer-canvas canvas { width: 100% !important; height: 100% !important; display: block; touch-action: none; cursor: grab; outline: none; }
.viewer-canvas canvas:active { cursor: grabbing; }
.viewer-status {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 20px; text-align: center; color: rgba(255,255,255,0.78); font-size: 13px;
}
.viewer-status[hidden] { display: none; }
.viewer-status.is-loading p::before {
  content: ''; display: block; width: 26px; height: 26px; margin: 0 auto 10px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.18); border-top-color: #fff; animation: vspin 0.9s linear infinite;
}
@keyframes vspin { to { transform: rotate(360deg); } }
.viewer-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.viewer-bar {
  position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; pointer-events: none;
}
.viewer-hint { font-size: 11px; color: rgba(255,255,255,0.5); letter-spacing: 0.02em; }
.viewer-reset {
  pointer-events: auto; font: 500 10.5px/1.4 var(--f-body); letter-spacing: 0.12em; text-transform: uppercase;
  color: #fff; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.25); border-radius: 100px;
  padding: 6px 12px; cursor: pointer;
}
.viewer-reset:hover:not([disabled]) { background: rgba(255,255,255,0.16); }
.viewer-reset[disabled] { opacity: 0.4; cursor: default; }
@media (max-width: 520px) { .viewer-hint { display: none; } .viewer-bar { justify-content: flex-end; } }

/* ═══════════════════════════════════════════════════
   v6 ADDITIONS
═══════════════════════════════════════════════════ */
/* Library cards — identical media boxes on pure black, full anatomy (no crop) */
.lib-card .lib-media { aspect-ratio: 16 / 9; background: #000; }
.lib-card .lib-media video { object-fit: contain; background: #000; }
.lib-text { padding: 24px 26px 26px; }
.lib-name { margin-bottom: 6px; }
/* authorship and dedication share one position and style */
.lib-card .lib-by { font-size: 12.5px; letter-spacing: 0.01em; text-transform: none; color: var(--text-2); margin-bottom: 12px; }
.lib-card .lib-desc { min-height: 3.5em; margin-bottom: 14px; }
.lib-card .lib-meta { margin-bottom: 18px; }
.lib-card .lib-link { margin-top: auto; }

/* Library pages — one large example video panel */
.example-panel { aspect-ratio: 16 / 9; background: #000; border-radius: var(--r-card); overflow: hidden; line-height: 0; }
.example-panel video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.stage-panel { background: #000; }

/* Video play affordance (autoplay blocked or reduced motion) */
.vplay {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 11px/1 var(--f-body); letter-spacing: 0.12em; text-transform: uppercase;
  color: #fff; background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.35); border-radius: 100px;
  padding: 10px 16px; cursor: pointer; backdrop-filter: blur(4px);
}
.vplay::before { content: ''; width: 0; height: 0; border-left: 8px solid #fff; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.vplay.is-playing::before { width: 8px; height: 10px; border: 0; border-left: 3px solid #fff; border-right: 3px solid #fff; box-sizing: border-box; }
.vplay.is-playing { opacity: 0; }
*:hover > .vplay.is-playing, .vplay.is-playing:focus-visible { opacity: 1; }
/* v7: .hero-media removed from this rule — it overrode the hero's position:absolute (v6 regression).
   The hero media is already a positioned container, so its play button still anchors correctly. */
.lib-media, .example-panel, .stage-panel { position: relative; }

/* Homepage — How it works in Exocad (shared, auto-cycling) */
.wf-home {
  background: var(--surface); border-top: 1px solid var(--border);
  min-height: calc(100svh - var(--nav-h)); display: flex; align-items: center;
  padding: 56px 0;
}
.wf-home > .wrap { width: 100%; }
.wf-home .sec-head { margin-bottom: 28px; }
.wf-cycle.stepper-x { grid-template-columns: minmax(0, 75fr) minmax(0, 25fr); gap: 28px; align-items: center; }
.wf-cycle .stepper-img { aspect-ratio: 1410 / 632; }
.wf-cycle .stepper-img img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  opacity: 0; transition: opacity 0.7s ease;
}
.wf-cycle .stepper-img img.is-on { opacity: 1; }
.wf-cycle .stepper-img button.zoom { z-index: 2; }
.wf-cycle .stepper-img .zoom-hint { z-index: 3; }
.wf-cycle .stepper-tabs button { position: relative; overflow: hidden; align-items: center; }
.wf-cycle .stepper-tabs .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: transparent; }
.wf-cycle .stepper-tabs .bar i { display: block; height: 100%; width: 0; background: var(--text); }
.wf-cycle .stepper-tabs button[aria-selected="false"] .bar i { width: 0 !important; }
.wf-toggle {
  margin-top: 16px; display: inline-flex; align-items: center; gap: 8px;
  font: 500 10.5px/1 var(--f-body); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text); background: transparent; border: 1px solid var(--border-2); border-radius: 100px;
  padding: 8px 14px; cursor: pointer;
}
.wf-toggle:hover { border-color: var(--text); }
.wf-toggle .ico { width: 8px; height: 10px; border-left: 2.5px solid currentColor; border-right: 2.5px solid currentColor; box-sizing: border-box; }
.wf-toggle[aria-pressed="true"] .ico { width: 0; height: 0; border-right: 0; border-left: 8px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
@media (prefers-reduced-motion: reduce) { .wf-cycle .stepper-img img { transition: none; } }
@media (max-width: 760px) {
  .wf-home { min-height: 0; display: block; padding: 64px 0; }
  .wf-cycle.stepper-x { grid-template-columns: 1fr; gap: 14px; }
  .wf-cycle .stepper-tabs button .t { font-size: 13px; }
}

/* Pricing — aligned cards; temporary blank, non-interactive black CTA placeholders */
.price-grid { align-items: stretch; }
.price-card { min-width: 0; }
.price-card h3 { min-height: 2.5em; line-height: 1.25; overflow-wrap: anywhere; }
.price-card .what { min-height: 3em; }
.price-card .amount { margin: 6px 0 16px; }
/* v16: the black CTA slots are now the live Stripe checkout links (same size and position as the approved placeholders) */
.price-cta { display: flex; margin-top: auto; width: 100%; min-height: 46px; padding-left: 12px; padding-right: 12px; }
.price-bundle { grid-template-columns: minmax(0, 1fr) auto minmax(160px, 220px); }
.price-cta.price-cta-bundle { width: 100%; margin-top: 0; }
@media (min-width: 1021px) and (max-width: 1200px) { .price-card h3 { font-size: 17.5px; } }
@media (max-width: 420px) { .price-card h3, .price-card .what { min-height: 0; } }
@media (max-width: 640px) {
  .price-bundle { grid-template-columns: minmax(0, 1fr) auto; }
  .price-cta.price-cta-bundle { grid-column: 1 / -1; }
}
@media (max-width: 1100px) { .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; margin-left: auto; margin-right: auto; } .price-bundle { max-width: 640px; margin-left: auto; margin-right: auto; grid-template-columns: minmax(0, 1fr) auto; } .price-cta.price-cta-bundle { grid-column: 1 / -1; } }
@media (max-width: 420px) { .price-grid { grid-template-columns: 1fr; } }

/* ═══════════════════════════════════════════════════
   v7 ADDITIONS
═══════════════════════════════════════════════════ */
/* Homepage cards — three-state anatomy comparison (stable 16:9 frame, contain, crossfade only) */
.cmp-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block;
  background: #000; opacity: 0; transition: opacity 0.2s ease;
}
.cmp-media img.is-on { opacity: 1; }
.cmp-ctrl { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 26px 0; }
.cmp-ctrl button, .sv-group button {
  font: 400 11.5px/1.2 var(--f-body); letter-spacing: 0.01em; color: var(--text-2);
  background: transparent; border: 1px solid var(--border-2); border-radius: 100px;
  padding: 6px 11px; cursor: pointer; white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.cmp-ctrl button:hover, .sv-group button:hover { border-color: var(--text); color: var(--text); }
.cmp-ctrl button[aria-pressed="true"], .sv-group button[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: #fff; }
.lib-card .lib-text { padding-top: 16px; }
.cmp-bar { display: flex; justify-content: center; margin: -28px 0 22px; }
.cmp-bar .wf-toggle { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .cmp-media img { transition: none; } }

/* How it works — one continuous black section: 01 video, then 02 / 03 photos */
.workflow .step-tag { display: block; font: 500 10.5px/1.4 var(--f-body); letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.55); margin-bottom: 12px; }
.how-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 48px; scroll-margin-top: calc(var(--nav-h) + 16px); }
.how-photo { margin: 0; }
.how-zoom { display: block; width: 100%; padding: 0; border: 0; background: #000; cursor: zoom-in; border-radius: var(--r-card); overflow: hidden; line-height: 0; }
.how-zoom img { width: 100%; height: auto; display: block; }
.how-zoom:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@media (max-width: 760px) { .how-photos { grid-template-columns: 1fr; gap: 28px; margin-top: 36px; } }

/* Library pages — manual still-image viewer */
.sv-stage { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r-card); overflow: hidden; line-height: 0; }
.sv-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.sv-zoom {
  position: absolute; right: 12px; bottom: 12px; line-height: 1.4;
  font: 500 10.5px/1.4 var(--f-body); letter-spacing: 0.12em; text-transform: uppercase;
  color: #fff; background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.3); border-radius: 100px; padding: 6px 12px; cursor: zoom-in;
}
.sv-zoom:hover { background: rgba(0,0,0,0.8); }
.sv-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 16px; }
.sv-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sv-label { font: 500 10px/1 var(--f-body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); margin-right: 4px; }

/* Lightbox (still viewer + workflow photos) */
dialog.lb { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; margin: 0; }
dialog.lb::backdrop { background: rgba(0,0,0,0.92); }
.lb-inner { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 56px 16px 20px; box-sizing: border-box; }
.lb-inner img { max-width: 100%; max-height: calc(100vh - 120px); width: auto; height: auto; object-fit: contain; display: block; background: #000; }
.lb-cap { color: rgba(255,255,255,0.7); font-size: 13px; text-align: center; }
.lb-close {
  position: fixed; top: 14px; right: 14px; z-index: 2;
  font: 500 11px/1 var(--f-body); letter-spacing: 0.14em; text-transform: uppercase;
  color: #111; background: #fff; border: 0; border-radius: 100px; padding: 11px 16px; cursor: pointer;
}
.lb-close:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.lb-hint { color: rgba(255,255,255,0.45); font-size: 11.5px; }

/* ═══════════════════════════════════════════════════
   v8 ADDITIONS — library cards: link cards + left-to-right wipe
═══════════════════════════════════════════════════ */
#libraries .lib-grid-wide { gap: 20px; }
@media (min-width: 1240px) { #libraries .lib-grid-wide { margin-left: -48px; margin-right: -48px; max-width: none; } }
a.lib-card { text-decoration: none; color: inherit; cursor: pointer; }
a.lib-card:hover { box-shadow: var(--sh-lg); }
a.lib-card:hover .lib-link { border-color: var(--text); }
a.lib-card:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }

/* image panel: identical size in every card (crop aspect 2.2:1 from the shared per-library crop) */
.lib-card .wipe-media, .wipe-media { aspect-ratio: 1056 / 480; background: #000; position: relative; overflow: hidden; line-height: 0; }
.wipe-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block;
  visibility: hidden;
}
.wipe-media img.is-base { visibility: visible; z-index: 1; }
.wipe-media img.is-next {
  visibility: visible; z-index: 2;
  -webkit-clip-path: inset(0 100% 0 0); clip-path: inset(0 100% 0 0);     /* fully hidden at the left edge */
}
.wipe-media img.is-next.is-revealing {
  -webkit-clip-path: inset(0 0 0 0); clip-path: inset(0 0 0 0);
  transition: clip-path 0.8s cubic-bezier(0.65, 0, 0.35, 1), -webkit-clip-path 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}

/* compact text: the image leads */
a.lib-card .lib-text { padding: 18px 22px 20px; display: flex; flex-direction: column; flex: 1; }
a.lib-card .lib-name { margin-bottom: 0; font-size: 22px; }
a.lib-card .lib-free { font-size: 13px; color: var(--text); margin: 8px 0 2px; font-weight: 400; }
a.lib-card .lib-memo { font-size: 12.5px; color: var(--text-2); margin: 0; line-height: 1.5; }
a.lib-card .lib-link {
  margin-top: auto; align-self: flex-start;            /* bottom-aligned across all cards */
  font-size: 13px; letter-spacing: 0.02em; font-weight: 400; color: var(--text);
  border-bottom: 1px solid var(--border-2); line-height: 1.6;
}
a.lib-card .lib-text > :nth-last-child(2) { margin-bottom: 16px; }   /* space before the Explore cue */

/* discreet section-level toggle, outside the cards */
.wipe-bar { display: flex; justify-content: flex-end; margin-top: 14px; }
.wipe-toggle {
  font: 400 11.5px/1 var(--f-body); letter-spacing: 0.04em; color: var(--text-3);
  background: none; border: 0; border-bottom: 1px solid transparent; padding: 4px 0; cursor: pointer;
}
.wipe-toggle:hover { color: var(--text); border-bottom-color: var(--border-2); }
.wipe-toggle:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
@media (min-width: 1240px) { .wipe-bar { margin-right: -48px; } }

/* ═══════════════════════════════════════════════════
   v11 — LIBRARY PAGES: black full-screen intro
   Header (prototype bar + nav, --chrome-h) + intro = one viewport.
   Same black as the homepage hero (--hero-bg). The media panel has no
   frame: its black is the section's black. Video framing per library is
   done in js/site.js from data-frame (teeth bounding box over the loop).
═══════════════════════════════════════════════════ */
.lib-intro {
  background: #000; color: #fff;   /* v13: = the library videos' own black (0,0,0); the homepage hero video is (1,1,1) */
  min-height: calc(100vh - var(--chrome-h));
  min-height: calc(100svh - var(--chrome-h));
  display: flex; align-items: center;
  padding: 24px 0 28px;
}
/* left edge aligned with the nav logo (same gutter as the homepage hero); media runs wider to the right */
/* v13: shared centred content grid — the standard .wrap (1120px incl. 40px padding), equal outer margins */
.lib-intro .wrap { width: 100%; }
.lib-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);          /* ≈ one-third text, two-thirds media */
  grid-template-rows: 1fr auto auto 1fr;                          /* text block centred against the media column */
  grid-template-areas: ". media" "copy media" "actions media" ". media";
  column-gap: clamp(40px, 4.5vw, 64px); row-gap: 0; align-items: center;
}
.li-copy { grid-area: copy; align-self: end; margin-top: 54px; }   /* 54px = Video/3D switch above the panel → text centred on the panel */
.li-media { grid-area: media; min-width: 0; }
.li-actions { grid-area: actions; align-self: start; margin-top: 30px; display: flex; flex-direction: column; align-items: stretch; gap: 10px; max-width: 300px; }
.lib-intro h1 {
  font-family: var(--f-head); font-weight: 300; color: #fff;
  font-size: clamp(36px, 3.5vw, 52px); line-height: 1.04; letter-spacing: -0.03em;
}
.li-line { margin-top: 16px; font-size: 15px; line-height: 1.65; color: rgba(255,255,255,0.62); max-width: 34ch; }
.li-actions .btn { padding-left: 20px; padding-right: 20px; }
.li-actions .btn-outline-light .demo-tag { background: transparent; color: rgba(255,255,255,0.7); border-color: rgba(255,255,255,0.3); }

/* Video / 3D switch on black */
.lib-intro .media-switch { background: transparent; border-color: rgba(255,255,255,0.22); margin-bottom: 10px; }
.lib-intro .media-switch button { color: rgba(255,255,255,0.66); min-height: 34px; padding: 6px 18px; }
.lib-intro .media-switch button[aria-selected="true"] { background: #fff; color: #111; }
.lib-intro .media-switch button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Media panel — frameless, blends into the section */
.lib-intro .stage {
  width: 100%; aspect-ratio: 16 / 10;
  max-height: calc(100svh - var(--chrome-h) - 52px - 54px);
  min-height: 300px;
  background: #000; border: 0; border-radius: 0; box-shadow: none;
}
.lib-intro .stage video[data-frame] { transform-origin: 50% 50%; will-change: transform; }

@media (max-width: 860px) {
  .lib-intro { display: block; padding: 22px 0 22px; }
  .lib-intro-grid {
    display: flex; flex-direction: column; align-items: stretch; gap: 18px;
    min-height: calc(100vh - var(--chrome-h) - 44px);
    min-height: calc(100svh - var(--chrome-h) - 44px);
  }
  .li-copy, .li-actions { flex: none; align-self: stretch; margin-top: 0; }
  .lib-intro .wrap { padding-left: 40px; padding-right: 40px; }
  .li-media { flex: 1 1 0; display: flex; flex-direction: column; margin: 0 -40px; }
  .lib-intro .media-switch { align-self: flex-start; margin-left: 40px; }
  .lib-intro .stage { flex: 1 1 0; aspect-ratio: auto; max-height: 125vw; min-height: 62vw; }
  .lib-intro h1 { font-size: clamp(32px, 8.6vw, 46px); }
  .li-line { margin-top: 10px; font-size: 14.5px; max-width: none; }
  .li-actions { max-width: none; }
  .li-actions .btn { min-height: 50px; }
}
@media (max-width: 520px) {
  .lib-intro .wrap { padding-left: 20px; padding-right: 20px; }
  .li-media { margin: 0 -20px; }
  .lib-intro .media-switch { margin-left: 20px; }
}

/* ═══════════════════════════════════════════════════
   v11 — HOMEPAGE: full-screen mobile hero
   ≤860px: prototype bar + nav + hero = the initial (small) viewport.
   svh = viewport with browser bars shown, so nothing below peeks in at
   load and nothing jumps when the bars collapse. The video area takes
   the remaining height up to 4:3 (object-fit: cover, centred); the
   desktop hero rules above are untouched.
═══════════════════════════════════════════════════ */
@media (max-width: 860px) {
  .hero {
    min-height: calc(100vh - var(--chrome-h));
    min-height: calc(100svh - var(--chrome-h));
    justify-content: center; gap: 22px;
    padding: 12px 0 max(28px, env(safe-area-inset-bottom));
  }
  .hero-media {
    flex: 1 1 0; display: flex; align-items: center;
    min-height: 56.25vw; max-height: 75vw; aspect-ratio: auto;
  }
  .hero-media video { height: 100%; width: 100%; object-fit: cover; object-position: 50% 50%; }
  .hero-copy { flex: none; }
}

/* ═══════════════════════════════════════════════════
   v11 — HOMEPAGE: compact mobile "Behind the libraries"
   ≤640px only: two portraits side by side, names, one shared line.
   Desktop cards (.authors-inner) unchanged.
═══════════════════════════════════════════════════ */
.authors-compact { display: none; }
@media (max-width: 640px) {
  #about .sec-head { margin-bottom: 26px; }
  #about .authors-inner { display: none; }
  .authors-compact { display: block; }
  .ac-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .ac-person { display: block; text-decoration: none; color: inherit; text-align: center; }
  .ac-person img { width: 100%; height: auto; aspect-ratio: 312 / 405; object-fit: cover; display: block; border-radius: var(--r-card); background: var(--bg2); }
  .ac-name { display: block; margin-top: 10px; font-family: var(--f-head); font-size: 16px; font-weight: 300; line-height: 1.3; overflow-wrap: anywhere; }
  .ac-person:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; border-radius: var(--r-card); }
  .ac-line { margin-top: 18px; text-align: center; font-size: 13.5px; color: var(--text-2); }
}

/* ═══════════════════════════════════════════════════
   v12 — FRIENDS OF THE PROJECT (#trusted): one heading, four profiles.
   Desktop: one centred row. ≤640px: balanced 2 × 2 grid.
═══════════════════════════════════════════════════ */
#trusted .trusted-head { margin-bottom: 48px; }
#trusted .trusted-title { margin-bottom: 0; }
.profiles-grid.profiles-four {
  display: grid; grid-template-columns: repeat(4, 140px); justify-content: center;
  gap: 32px 48px; align-items: start;
}
.profiles-four .profile-item { flex: none; width: 140px; }
.profiles-four .profile-avatar { width: 84px; height: 84px; }
.profiles-four .profile-handle { font-size: 12px; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  #trusted { padding: 72px 0; }
  #trusted .trusted-head { margin-bottom: 36px; }
  .profiles-grid.profiles-four { grid-template-columns: repeat(2, minmax(0, 150px)); gap: 32px 24px; }
  .profiles-four .profile-item { width: auto; }
  .profiles-four .profile-avatar { width: 80px; height: 80px; }
}

/* ═══════════════════════════════════════════════════
   v14 — WIDER, FLUID INTRO SCREENS (desktop / laptop, >860px)
   Homepage hero + library intros use nearly the full viewport width:
   equal outer margins (--edge ≈ 3.5vw), a compact text column (--tw)
   and the rest for the media. The media is also capped by the available
   height; when that cap binds (ultrawide / short screens) the whole
   composition is centred, so the left and right margins stay equal.
   ≤860px keeps the approved stacked mobile layouts.
═══════════════════════════════════════════════════ */
/* also used for short landscape windows (landscape phones, small laptop windows): two columns fit better than stacking */
@media (min-width: 861px), (min-width: 600px) and (orientation: landscape) and (max-height: 560px) {
  .hero, .lib-intro { --edge: max(24px, 3.5vw); }

  /* Homepage hero: grid of [text | 16:9 media] */
  .hero {
    --tw: clamp(290px, 25vw, 400px);
    --gap: clamp(28px, 3vw, 64px);
    --avail-h: calc(100svh - var(--chrome-h) - 64px);
    display: grid; align-items: center; justify-content: center;
    grid-template-columns: var(--tw) min(calc(100% - var(--tw) - var(--gap)), calc(var(--avail-h) * 16 / 9));
    column-gap: var(--gap);
    padding: 32px var(--edge);
  }
  .hero .hero-grid { display: contents; }
  .hero .hero-copy { max-width: none; padding-left: clamp(14px, 2vw, 40px); }   /* v15: text group sits a little further in from the edge; column (and video) unchanged */
  .hero-media { position: relative; top: auto; right: auto; transform: none; width: 100%; }

  /* Library intros: grid of [text | media column (Video/3D switch + 16:10 panel)] */
  .lib-intro { --tw: clamp(270px, 23vw, 360px); --gap: clamp(32px, 3.5vw, 72px);
               --avail-h: calc(100svh - var(--chrome-h) - 52px - 54px); }
  .lib-intro .wrap { max-width: none; padding-left: var(--edge); padding-right: var(--edge); }
  .lib-intro-grid {
    grid-template-columns: var(--tw) min(calc(100% - var(--tw) - var(--gap)), calc(var(--avail-h) * 1.6));
    column-gap: var(--gap); justify-content: center;
  }
  .lib-intro .stage { max-height: var(--avail-h); }
}

/* Short landscape windows ≤860px wide use the two-column layout above; undo the stacked-mobile specifics there. */
@media (max-width: 860px) and (min-width: 600px) and (orientation: landscape) and (max-height: 560px) {
  .hero { gap: 0; padding-top: 20px; padding-bottom: 20px; min-height: calc(100svh - var(--chrome-h)); }
  .hero-media { order: 0; display: block; flex: none; min-height: 0; max-height: none; aspect-ratio: 16 / 9; }
  .hero-media video {
    object-fit: contain; height: 100%;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 10%, #000 92%, transparent 100%),
                        linear-gradient(to bottom, transparent 0, #000 7%, #000 93%, transparent 100%);
    -webkit-mask-composite: source-in;
            mask-image: linear-gradient(to right, transparent 0, #000 10%, #000 92%, transparent 100%),
                        linear-gradient(to bottom, transparent 0, #000 7%, #000 93%, transparent 100%);
            mask-composite: intersect;
  }
  .hero h1 { font-size: clamp(30px, 4.6vw, 40px); }
  .hero-for { font-size: clamp(20px, 3vw, 26px); margin: 2px 0 12px; }
  .hero-line { margin-bottom: 16px; }
  .lib-intro { display: flex; padding: 16px 0 18px; --avail-h: calc(100svh - var(--chrome-h) - 34px - 54px); }
  .lib-intro-grid { display: grid; min-height: 0; gap: 0; column-gap: var(--gap); align-items: center; }
  .li-media { margin: 0; display: block; flex: none; }
  .lib-intro .media-switch { margin-left: 0; }
  .lib-intro .stage { flex: none; aspect-ratio: 16 / 10; min-height: 0; }
  .li-copy { margin-top: 54px; } .li-actions { margin-top: 18px; }
  .lib-intro h1 { font-size: clamp(26px, 4vw, 34px); }
  .li-line { font-size: 13.5px; margin-top: 8px; }
  .li-actions .btn { min-height: 44px; }
}

/* v14 — Friends of the project: six equal circular avatars.
   One row on wide desktops, 3 × 2 on intermediate widths, 2 × 3 on phones. */
.profiles-grid.profiles-six { grid-template-columns: repeat(6, minmax(0, 140px)); gap: 36px clamp(16px, 2.6vw, 48px); }
.profiles-six .profile-item { width: auto; }
.profiles-six .profile-avatar-inner { background: #fff; }
@media (max-width: 1000px) {
  .profiles-grid.profiles-six { grid-template-columns: repeat(3, minmax(0, 160px)); gap: 36px 40px; }
}
@media (max-width: 640px) {
  .profiles-grid.profiles-six { grid-template-columns: repeat(2, minmax(0, 150px)); gap: 32px 24px; }
}

/* v15 — Friends of the project on the FAQ's black (#0b0b0b): one continuous dark area, no divider.
   Avatar images are untouched; only the ring/gap around them and the text adapt to the dark ground. */
#trusted { background: #0b0b0b; border-top: 0; color: #fff; }
#trusted .trusted-title { color: #fff; }
#trusted .profile-avatar { background: linear-gradient(135deg, #5a5a5a 0%, #3a3a3a 100%); box-shadow: none; }
#trusted .profile-avatar-inner { border-color: #0b0b0b; }
#trusted .profile-handle { color: rgba(255,255,255,0.72); }
#trusted .profile-item:hover { opacity: 1; }
#trusted .profile-item:hover .profile-handle, #trusted .profile-handle a:hover { color: #fff; }
#trusted .profile-item:hover .profile-avatar { background: linear-gradient(135deg, #9a9a9a 0%, #6a6a6a 100%); }
#trusted a:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 6px; }
#trusted .profile-item > a:focus-visible { border-radius: 50%; }

/* v16 — "Other libraries" block at the bottom of each library page: black, like the sections around it */
.p-section.other-libs-sec { background: #0b0b0b; border-bottom: 0; color: #fff; }
.other-libs-sec .label { color: rgba(255,255,255,0.5); }
.other-libs-sec .other-lib { background: #141414; border-color: rgba(255,255,255,0.1); color: #fff; box-shadow: none; }
.other-libs-sec .other-lib span { color: rgba(255,255,255,0.6); }
.other-libs-sec .other-lib:hover { border-color: rgba(255,255,255,0.35); }
.other-libs-sec .other-lib:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* v17 — header CTA "Explore the libraries" → The Libraries section (sticky header offset) */
#libraries { scroll-margin-top: -12px; }   /* html already has scroll-padding-top: nav + 12px → section starts exactly under the sticky header */
/* Pricing CTAs: longer labels may wrap inside narrow cards instead of overflowing */
.price-cta { white-space: normal; text-align: center; line-height: 1.35; }
.nav-explore { gap: 0; }
/* four-column pricing: one-line labels at equal height (slightly tighter tracking for the longer labels) */
@media (min-width: 1101px) {
  .price-card .price-cta, .price-cta.price-cta-bundle { font-size: 10.5px; letter-spacing: 0.08em; padding-left: 8px; padding-right: 8px; white-space: nowrap; }
  .price-bundle { grid-template-columns: minmax(0, 1fr) auto minmax(200px, 250px); }
}
/* very narrow phones: "Explore libraries" so logo, CTA and menu button always fit on one row */
@media (max-width: 374px) { .nav-explore-the { display: none; } .nav-right .btn.nav-explore { padding-left: 10px; padding-right: 10px; } }
