/* TommyAPI shared motion layer (2026-11-27). Linked on every public page by the publisher (detail_pages.motion_head),
   after each page's own stylesheets. Same header, footer, buttons, cursor light, heading entrances, picture reveals,
   counters and page transitions everywhere. CSS does the work where it can: scroll-driven animations for reveals
   (IntersectionObserver fallback in site-motion.js), cross-document View Transitions for page changes.
   Picture of the world: a gateway of white-gold light on a dark volcanic plain at blue hour; ink blue + warm gold. */

@font-face { font-family: "MX Serif SC"; src: url("/assets/tommy-motion/fonts/serif-sc.woff2?rev=20261129b") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "MX Instrument"; src: url("/assets/tommy-motion/fonts/instrument-italic.woff2?rev=20261129b") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

/* metric-matched fallback: the system serif is scaled to the subset's metrics so the swap does not shift layout */
@font-face { font-family: "MX Serif Fallback"; src: local("Songti SC"), local("STSong"), local("SimSun"), local("Noto Serif CJK SC"), local("Source Han Serif SC");
  size-adjust: 100%; ascent-override: 116%; descent-override: 29%; line-gap-override: 0%; }

:root {
  /* OKLCH palette taken from the film: ink blue night, warm gold light */
  --mx-bg: oklch(0.13 0.012 260); --mx-bg2: oklch(0.17 0.016 258); --mx-ink: oklch(0.95 0.015 80);
  --mx-muted: color-mix(in oklch, var(--mx-ink) 72%, transparent); --mx-dim: color-mix(in oklch, var(--mx-ink) 50%, transparent);
  --mx-line: color-mix(in oklch, var(--mx-ink) 12%, transparent); --mx-accent: oklch(0.81 0.12 70); --mx-accent-2: oklch(0.91 0.07 75);
  --mx-ease: cubic-bezier(.16, 1, .3, 1);
  --mx-serif: "MX Serif SC", "MX Serif Fallback", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  --mx-italic: "MX Instrument", "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mx-hero-name: kf-page;
  --mx-hero: image-set(url("/assets/tommy-motion/media/kf-page.avif?rev=20261129b") type("image/avif"), url("/assets/tommy-motion/media/kf-page.webp?rev=20261129b") type("image/webp"));
  interpolate-size: allow-keywords;
}
html[data-mx="models"], html[data-mx="detail"] { --mx-hero: image-set(url("/assets/tommy-motion/media/kf-array.avif?rev=20261129b") type("image/avif"), url("/assets/tommy-motion/media/kf-array.webp?rev=20261129b") type("image/webp")); }
html[data-mx="docs"], html[data-mx="opencode"], html[data-mx="guide"] { --mx-hero: image-set(url("/assets/tommy-motion/media/kf-braid.avif?rev=20261129b") type("image/avif"), url("/assets/tommy-motion/media/kf-braid.webp?rev=20261129b") type("image/webp")); }
html[data-mx="pricing"], html[data-mx="status"] { --mx-hero: image-set(url("/assets/tommy-motion/media/kf-lake.avif?rev=20261129b") type("image/avif"), url("/assets/tommy-motion/media/kf-lake.webp?rev=20261129b") type("image/webp")); }
@media (max-width: 760px) {
  :root { --mx-hero: image-set(url("/assets/tommy-motion/media/kf-page-m.avif?rev=20261129b") type("image/avif"), url("/assets/tommy-motion/media/kf-page-m.webp?rev=20261129b") type("image/webp")); }
  html[data-mx="models"], html[data-mx="detail"] { --mx-hero: image-set(url("/assets/tommy-motion/media/kf-array-m.avif?rev=20261129b") type("image/avif"), url("/assets/tommy-motion/media/kf-array-m.webp?rev=20261129b") type("image/webp")); }
  html[data-mx="docs"], html[data-mx="opencode"], html[data-mx="guide"] { --mx-hero: image-set(url("/assets/tommy-motion/media/kf-braid-m.avif?rev=20261129b") type("image/avif"), url("/assets/tommy-motion/media/kf-braid-m.webp?rev=20261129b") type("image/webp")); }
  html[data-mx="pricing"], html[data-mx="status"] { --mx-hero: image-set(url("/assets/tommy-motion/media/kf-lake-m.avif?rev=20261129b") type("image/avif"), url("/assets/tommy-motion/media/kf-lake-m.webp?rev=20261129b") type("image/webp")); }
}

/* typography details everywhere */
h1, h2, h3 { text-wrap: balance; }
.pg-hero p, .explore-hero p, .detail-intro p, .mx-film-sub, .mx-lead { text-wrap: pretty; }  /* only short hero copy: pretty-wrapping whole documents costs layout time */

/* long pages: skip rendering work for what is off screen */
.catalog-card { content-visibility: auto; contain-intrinsic-size: auto 400px; }
.log-entry, .pg-prose > section, .detail-content .code-card { content-visibility: auto; contain-intrinsic-size: auto 320px; }
.tm-footer { content-visibility: auto; contain-intrinsic-size: auto 360px; }

/* mobile menu and FAQ answers open with motion (no JS): @starting-style + interpolate-size */
.tm-menu[open] .tm-menu-panel { opacity: 1; transform: none; transition: opacity .35s var(--mx-ease), transform .45s var(--mx-ease); }
@starting-style { .tm-menu[open] .tm-menu-panel { opacity: 0; transform: translateY(-10px) scale(.98); } }
details::details-content { block-size: 0; overflow: clip; transition: block-size .5s var(--mx-ease), content-visibility .5s allow-discrete; }
details[open]::details-content { block-size: auto; }

/* ---------- page transitions: cross-document View Transitions (no JS, no delay) ---------- */
@view-transition { navigation: auto; }
.tm-header { view-transition-name: mx-header; }
::view-transition-old(root) { animation: mx-vt-out .42s cubic-bezier(.4, 0, .2, 1) both; }
::view-transition-new(root) { animation: mx-vt-in .7s cubic-bezier(.16, 1, .3, 1) both; }
::view-transition-group(mx-header) { animation-duration: .4s; }
@keyframes mx-vt-out { to { opacity: 0; transform: translateY(-18px) scale(.985); filter: blur(6px); } }
@keyframes mx-vt-in { from { opacity: 0; transform: translateY(26px) scale(1.01); filter: blur(8px); } }

/* ---------- shared header: dark glass, same on every page ---------- */
.tm-header { background: rgba(7,9,13,.82); border-bottom-color: rgba(243,238,229,.1); backdrop-filter: saturate(1.3) blur(14px); -webkit-backdrop-filter: saturate(1.3) blur(14px); }
.tm-header .tm-brand { color: var(--mx-ink); }
.tm-header .tm-nav a { position: relative; color: rgba(243,238,229,.74); background: transparent; }
.tm-header .tm-nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 1px; background: var(--mx-accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform .45s var(--mx-ease); }
.tm-header .tm-nav a:hover { color: #fff; background: transparent; }
.tm-header .tm-nav a:hover::after, .tm-header .tm-nav a[aria-current="page"]::after { transform: scaleX(1); }
.tm-header .tm-nav a[aria-current="page"] { color: #fff; background: transparent; }
.tm-header .tm-btn-quiet { background: transparent; color: var(--mx-ink); border-color: rgba(243,238,229,.28); }
.tm-header .tm-btn-quiet:hover { background: rgba(255,255,255,.08); }
.tm-header .tm-btn-primary, .tm-menu-panel .tm-btn-primary { background: var(--mx-accent); color: #14100a; border-color: var(--mx-accent); border-radius: 999px; }
.tm-header .tm-btn-primary:hover, .tm-menu-panel .tm-btn-primary:hover { background: #ffc477; border-color: #ffc477; color: #14100a; }
.tm-header .tm-btn-quiet { border-radius: 999px; }
.tm-menu summary { background: rgba(7,9,13,.5); border-color: rgba(243,238,229,.28); color: var(--mx-ink); }
.tm-menu-panel { background: #0d1118; border-color: rgba(243,238,229,.12); box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.tm-menu-panel a { color: var(--mx-ink); }
.tm-menu-panel a:hover, .tm-menu-panel a[aria-current="page"] { background: rgba(255,255,255,.06); }

/* ---------- shared footer: dark ---------- */
.tm-footer { background: var(--mx-bg); border-top-color: var(--mx-line); color: var(--mx-dim); }
.tm-footer h2, .tm-footer .tm-brand { color: var(--mx-ink); }
.tm-footer-grid a:not(.tm-brand), .tm-footer-brand p, .tm-footer-brand a { color: var(--mx-dim); }
.tm-footer-grid a:not(.tm-brand):hover { color: var(--mx-ink); }
.tm-footer-bottom { border-top-color: var(--mx-line); color: rgba(243,238,229,.42); }

/* ---------- cursor light (desktop) ---------- */
.mx-cursor { position: fixed; left: 0; top: 0; z-index: 5; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, rgba(255,205,140,.18), rgba(242,179,94,.07) 45%, rgba(242,179,94,0) 72%); mix-blend-mode: screen; transition: opacity .6s ease; }
.mx-cursor.is-on { opacity: 1; }
html:not([data-mx="home"]) .mx-cursor { mix-blend-mode: normal; background: radial-gradient(closest-side, rgba(242,179,94,.10), rgba(242,179,94,0) 70%); z-index: 1; }
@media (hover: none), (pointer: coarse) { .mx-cursor { display: none; } }

/* ---------- cinematic hero band for every inner template ---------- */
.pg-hero, .explore-hero, .detail-intro, html[data-mx="opencode"] .hero {
  position: relative; isolation: isolate; overflow: hidden; background: var(--mx-bg) !important; color: var(--mx-ink) !important;
  border-bottom: 0 !important; }
.pg-hero::before, .explore-hero::before, .detail-intro::before, html[data-mx="opencode"] .hero::before {
  content: ""; position: absolute; inset: -6% 0; z-index: -2; background: var(--mx-hero) 62% 55% / cover no-repeat; transform-origin: 62% 55%;
  animation: mx-kenburns 2.6s var(--mx-ease) both; }
.pg-hero::after, .explore-hero::after, .detail-intro::after, html[data-mx="opencode"] .hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(7,9,13,.92) 0%, rgba(7,9,13,.72) 38%, rgba(7,9,13,.25) 72%, rgba(7,9,13,.15) 100%),
              linear-gradient(0deg, rgba(7,9,13,.85) 0%, rgba(7,9,13,0) 40%); }
@keyframes mx-kenburns { from { transform: scale(1.14); opacity: .2; } to { transform: scale(1); opacity: 1; } }
@supports (animation-timeline: scroll()) {
  .pg-hero::before, .explore-hero::before, .detail-intro::before, html[data-mx="opencode"] .hero::before {
    animation: mx-kenburns 2.6s var(--mx-ease) both, mx-hero-drift linear both; animation-timeline: auto, scroll(root); animation-range: normal, 0 90vh; }
  @keyframes mx-hero-drift { to { transform: translateY(14%) scale(1.12); } }
}
.pg-hero { padding: 120px 0 104px !important; }
.explore-hero { padding: 120px 0 88px !important; }
.detail-intro { max-width: none !important; width: 100% !important; margin: 0 !important; padding: 72px max(32px, calc((100% - 1180px) / 2)) 64px !important; }
html[data-mx="opencode"] .hero { padding-top: 110px !important; padding-bottom: 90px !important; }
.pg-hero h1, .explore-hero h1, .detail-intro h1, html[data-mx="opencode"] .hero h1 {
  font-family: var(--mx-serif) !important; font-weight: 600 !important; letter-spacing: -.02em !important; line-height: 1.15 !important; color: var(--mx-ink) !important;
  text-wrap: balance; animation: mx-rise 1.2s var(--mx-ease) .08s both; }
.pg-hero h1, .explore-hero h1, html[data-mx="opencode"] .hero h1 { font-size: clamp(36px, 4.8vw, 68px) !important; max-width: 16em; }
.detail-intro h1 { font-size: clamp(32px, 4vw, 56px) !important; }
.pg-hero p, .explore-hero p, .detail-intro p, html[data-mx="opencode"] .hero p { color: var(--mx-muted) !important; animation: mx-rise 1.2s var(--mx-ease) .22s both; }
.pg-hero .pg-meta, .explore-hero .pg-meta, .detail-intro .detail-sync, .pg-hero .geo-updated { color: var(--mx-dim) !important; }
.pg-hero a:not(.tm-btn), .explore-hero a, .detail-intro a:not(.button) { color: var(--mx-accent-2) !important; }
.pg-eyebrow, html[data-mx="opencode"] .hero .eyebrow { display: inline-block; font-family: var(--mx-italic) !important; font-style: italic; font-size: 24px !important; letter-spacing: 0 !important; text-transform: none !important;
  color: var(--mx-accent-2) !important; background: none !important; border: 0 !important; padding: 0 !important; animation: mx-rise 1s var(--mx-ease) both; }
.detail-intro .breadcrumb, .detail-intro .breadcrumb a, .detail-intro .breadcrumb span { color: var(--mx-dim) !important; }
.detail-intro .breadcrumb a:hover { color: var(--mx-ink) !important; }
.detail-intro .detail-provider { color: var(--mx-accent-2) !important; letter-spacing: .1em; }
.detail-intro .button { border-radius: 999px !important; background: var(--mx-accent) !important; border-color: var(--mx-accent) !important; color: #14100a !important; }
.detail-intro .chip, .detail-intro .model-availability { background: rgba(243,238,229,.08) !important; border-color: rgba(243,238,229,.18) !important; color: var(--mx-ink) !important; }
.explore-hero .explore-search { background: rgba(7,9,13,.55) !important; border-color: rgba(243,238,229,.22) !important; backdrop-filter: blur(10px); animation: mx-rise 1.2s var(--mx-ease) .3s both; }
.explore-hero .explore-search input { color: var(--mx-ink) !important; background: transparent !important; }
.explore-hero .explore-search input::placeholder { color: var(--mx-dim); }
.explore-hero .explore-search svg { color: var(--mx-accent-2); }
html[data-mx="opencode"] .hero .pill { background: rgba(243,238,229,.08) !important; border-color: rgba(243,238,229,.18) !important; color: var(--mx-ink) !important; }
html[data-mx="opencode"] .hero code { background: rgba(243,238,229,.1) !important; color: var(--mx-accent-2) !important; }
@keyframes mx-rise { from { opacity: .01; transform: translate3d(0, 34px, 0); } }

/* the light content area meets the dark band with a soft edge */
.pg-hero + .pg-main, .explore-hero + .explore-body, .detail-intro + .detail-content { position: relative; }
.pg-hero + .pg-main::before, .explore-hero + .explore-body::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--mx-accent), transparent); opacity: .5; }

/* ---------- section titles inside content: serif ---------- */
.pg-prose h2, .pg-section-title, .detail-content h2, .log-entry h2, html[data-mx="opencode"] section h2 { font-family: var(--mx-serif); font-weight: 600; letter-spacing: -.01em; }

/* ---------- buttons: amber primary, magnetic in JS ---------- */
.pg-main .button-primary, .pg-btn-primary, .detail-content .button-primary { border-radius: 999px; }

/* ---------- reveals: CSS scroll-driven, falls back to IntersectionObserver (.mx-io / .mx-in) ---------- */
@supports (animation-timeline: view()) { @media (min-width: 761px) { /* phones use the IntersectionObserver path: a view timeline per block costs a full relayout right after first paint */
  .pg-main .pg-wrap > :not(article):not(.pg-docs), .pg-main .pg-wrap-wide > *, .pg-prose > *, .pg-toc,
  .catalog-card, .alias-head, .detail-content section, .detail-content .detail-layout > aside, .detail-content .detail-layout > div > *,
  html[data-mx="opencode"] body > section:not(.hero) > * { animation: mx-reveal-up linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
  .log-entry { animation: mx-reveal-side linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
  .detail-content .model-media-detail { animation: mx-reveal-clip linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
  .mx-track .catalog-card { animation: none; }
  .mx-reveal { animation: mx-reveal-up linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
  .mx-reveal-clip { animation: mx-reveal-clip linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
  .mx-reveal-side { animation: mx-reveal-side linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
}}
@keyframes mx-reveal-up { from { opacity: 0; transform: translate3d(0, 60px, 0) scale(.98); } }
@keyframes mx-reveal-clip { from { clip-path: inset(18% 8% 18% 8% round 14px); transform: scale(1.06); opacity: .3; } to { clip-path: inset(0 0 0 0 round 0); } }
@keyframes mx-reveal-side { from { opacity: 0; transform: translate3d(-48px, 0, 0); } }
.mx-io .mx-reveal, .mx-io .mx-reveal-side { opacity: 0; transform: translate3d(0, 50px, 0); transition: opacity .9s var(--mx-ease), transform 1.1s var(--mx-ease); }
.mx-io .mx-reveal-side { transform: translate3d(-40px, 0, 0); }
.mx-io .mx-reveal-clip { clip-path: inset(14% 8% 14% 8%); transition: clip-path 1.2s var(--mx-ease); }
.mx-io .mx-in { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }

/* cards lift toward the light */
.catalog-card { transition: transform .5s var(--mx-ease), box-shadow .5s var(--mx-ease), border-color .3s ease !important; }
.catalog-card:hover { transform: translateY(-6px); box-shadow: 0 26px 50px -24px rgba(7,9,13,.45), 0 0 0 1px rgba(242,179,94,.35); }
.catalog-card .model-cover { transition: transform 1.1s var(--mx-ease); }
.catalog-card:hover .model-cover { transform: scale(1.05); }

@media (max-width: 760px) {
  .pg-hero { padding: 84px 0 70px !important; }
  .explore-hero { padding: 84px 0 64px !important; }
  .detail-intro { padding: 48px 20px 46px !important; }
  .pg-hero::after, .explore-hero::after, .detail-intro::after, html[data-mx="opencode"] .hero::after {
    background: linear-gradient(0deg, rgba(7,9,13,.92) 0%, rgba(7,9,13,.7) 55%, rgba(7,9,13,.45) 100%); }
  .pg-eyebrow { font-size: 20px !important; }
}
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .pg-hero::before, .explore-hero::before, .detail-intro::before, html[data-mx="opencode"] .hero::before,
  .pg-hero h1, .explore-hero h1, .detail-intro h1, .pg-hero p, .explore-hero p, .detail-intro p, .pg-eyebrow, .mx-reveal, .mx-reveal-clip, .mx-reveal-side { animation: none !important; }
  .mx-io .mx-reveal, .mx-io .mx-reveal-clip, .mx-io .mx-reveal-side { opacity: 1; transform: none; clip-path: none; }
  .mx-cursor { display: none; }
}

/* shared-element morph: model card -> model page (names set per navigation by the head script) */
::view-transition-group(mx-media), ::view-transition-group(mx-title) { animation-duration: .7s; animation-timing-function: cubic-bezier(.16, 1, .3, 1); }
::view-transition-old(mx-media), ::view-transition-new(mx-media) { height: 100%; object-fit: cover; }

/* ======================= 2026-11-27 18:00 motion checklist (shared) ======================= */
:root { --mx-feel: cubic-bezier(.2, .8, .2, 1);
  /* spring as a CSS linear() curve (overshoot then settle) */
  --mx-spring: linear(0, .009, .035 2.1%, .141 4.4%, .723 12.9%, .938 16.7%, 1.017, 1.077 22.8%, 1.121 25.4%, 1.127, 1.124 29.6%, 1.082 34.6%, 1.026 41.4%, .992 49.4%, .985, .987 58.4%, 1.001 74.4%, 1); }

/* feel: every hover/state change 0.3s; press = shrink to .96 then spring back past 1 */
.tm-btn, .mx-btn, .pg-btn, .button, .pg-pills button, .copy-code, .mx-top { transition: transform .55s var(--mx-spring), background-color .3s var(--mx-feel), border-color .3s var(--mx-feel), color .3s var(--mx-feel), box-shadow .3s var(--mx-feel); }
.mx-press { transform: scale(.96) !important; transition-duration: .12s !important; }

/* sheen: a band of light sweeps across primary buttons */
.tm-btn-primary, .mx-btn-primary, .pg-btn-primary, .detail-intro .button { position: relative; overflow: hidden; isolation: isolate; }
.tm-btn-primary::after, .mx-btn-primary::after, .pg-btn-primary::after, .detail-intro .button::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; mix-blend-mode: soft-light;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.75) 50%, transparent 70%);
  transform: translateX(-130%); animation: mx-sheen 4.8s cubic-bezier(.2, .8, .2, 1) 1.6s infinite; }
@keyframes mx-sheen { 0% { transform: translateX(-130%); } 30%, 100% { transform: translateX(130%); } }  /* transform only: runs on the compositor */

/* links: underline draws in from the left, leaves to the right */
.pg-prose a, .pg-main p a, .mx-kind-body p a, .mx-faq details p a, .detail-content p a, .tm-footer-grid a:not(.tm-brand) {
  text-decoration: none !important; background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat;
  background-size: 0% 1px; background-position: 100% 100%; transition: background-size .45s cubic-bezier(.2, .8, .2, 1), color .3s ease; }
.pg-prose a:hover, .pg-main p a:hover, .mx-kind-body p a:hover, .mx-faq details p a:hover, .detail-content p a:hover, .tm-footer-grid a:not(.tm-brand):hover {
  background-size: 100% 1px; background-position: 0 100%; }
.pg-prose a, .pg-main p a, .detail-content p a, .mx-kind-body p a { box-shadow: inset 0 -1px 0 color-mix(in oklch, currentColor 30%, transparent); }

/* scroll progress: a thin gold line, pure CSS scroll() timeline */
@supports (animation-timeline: scroll()) {
  body::before { content: ""; position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 120; pointer-events: none; transform-origin: 0 50%;
    background: linear-gradient(90deg, var(--mx-accent), var(--mx-accent-2)); animation: mx-progress linear both; animation-timeline: scroll(root); }
  @keyframes mx-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* header hides on the way down, returns on the way up; nav indicator slides between items */
.tm-header { transition: transform .5s cubic-bezier(.2, .8, .2, 1), background-color .5s ease, border-color .5s ease; }
.mx-nav-hidden .tm-header { transform: translateY(-105%); }
.tm-nav { position: relative; }
.mx-nav-ind { position: absolute; left: 0; bottom: 2px; height: 2px; width: 100px; border-radius: 2px; background: var(--mx-accent); transform-origin: 0 50%; opacity: 0; pointer-events: none;
  transition: transform .5s var(--mx-spring), opacity .3s ease; }
.mx-nav-ind.is-on { opacity: 1; }
.mx-has-ind .tm-nav a::after { display: none; }

/* phones: full-screen menu, links come in one after another */
@media (max-width: 900px) {
  .tm-menu[open] .tm-menu-panel { position: fixed; left: 0; right: 0; bottom: 0; top: 60px; width: auto; border-radius: 0; border: 0; padding: 28px 24px; gap: 4px; background: color-mix(in oklch, var(--mx-bg) 96%, transparent); backdrop-filter: blur(16px); }
  .tm-menu[open] .tm-menu-panel a { font-family: var(--mx-serif); font-size: 28px; padding: 12px 4px; opacity: 1; transform: none; transition: opacity .5s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
  .tm-menu[open] .tm-menu-panel a.tm-btn { font-family: inherit; font-size: 16px; margin-top: 18px; padding: 14px; }
  @starting-style { .tm-menu[open] .tm-menu-panel a { opacity: 0; transform: translateY(24px); } }
  .tm-menu-panel a:nth-child(2) { transition-delay: .05s; } .tm-menu-panel a:nth-child(3) { transition-delay: .1s; }
  .tm-menu-panel a:nth-child(4) { transition-delay: .15s; } .tm-menu-panel a:nth-child(5) { transition-delay: .2s; }
  .tm-menu-panel a:nth-child(6) { transition-delay: .25s; } .tm-menu-panel a:nth-child(7) { transition-delay: .3s; }
}

/* custom cursor (desktop): a dot that grows over links and says View / Play over pictures and video */
.mx-dot { position: fixed; left: 0; top: 0; z-index: 400; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; pointer-events: none;
  background: var(--mx-accent-2); opacity: 0; display: grid; place-items: center; color: #14100a; font: 600 11px/1 Inter, system-ui, sans-serif; letter-spacing: .08em;
  transition: width .3s cubic-bezier(.2, .8, .2, 1), height .3s cubic-bezier(.2, .8, .2, 1), margin .3s cubic-bezier(.2, .8, .2, 1), opacity .3s ease, background-color .3s ease; }
.mx-dot.is-on { opacity: 1; }
.mx-dot.is-link { width: 36px; height: 36px; margin: -18px 0 0 -18px; background: color-mix(in oklch, var(--mx-accent-2) 35%, transparent); }
.mx-dot.is-view, .mx-dot.is-play { width: 72px; height: 72px; margin: -36px 0 0 -36px; background: var(--mx-accent); }
.mx-dot.is-view::after { content: "View"; } .mx-dot.is-play::after { content: "Play"; }
@media (hover: none), (pointer: coarse) { .mx-dot { display: none; } }

/* cards: tilt toward the pointer (max 6deg) with a light that follows it */
.catalog-card { --mx-x: 50%; --mx-y: 50%; position: relative; }
.catalog-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s ease;
  background: radial-gradient(280px circle at var(--mx-x) var(--mx-y), color-mix(in oklch, var(--mx-accent) 22%, transparent), transparent 60%); }
.catalog-card:hover::after { opacity: 1; }

/* tabs/pills: an indicator slides to the active one */
.pg-pills { position: relative; isolation: isolate; }
.mx-pill-ind { position: absolute; left: 0; top: 0; z-index: -1; border-radius: 999px; background: var(--mx-bg); pointer-events: none;
  transition: transform .5s var(--mx-spring), width .5s var(--mx-spring), height .3s ease; }
.mx-has-pill-ind button[aria-pressed="true"] { background: transparent !important; color: #fff !important; border-color: transparent !important; }

/* images: blurred placeholder clears when the picture arrives */
img.mx-lqip { filter: blur(14px); opacity: .55; transition: filter .8s cubic-bezier(.2, .8, .2, 1), opacity .6s ease; }
img.mx-lqip.is-loaded { filter: none; opacity: 1; }

/* keyboard focus: an animated, clearly visible ring */
:focus-visible { outline: 2px solid var(--mx-accent) !important; outline-offset: 4px; transition: outline-offset .25s cubic-bezier(.2, .8, .2, 1); }
input:focus-visible { outline-offset: 2px; }

/* back to top */
.mx-top { position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--mx-line); cursor: pointer;
  background: color-mix(in oklch, var(--mx-bg) 86%, transparent); color: var(--mx-ink); backdrop-filter: blur(10px); display: grid; place-items: center;
  opacity: 0; transform: translateY(20px) scale(.9); pointer-events: none; }
.mx-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
.mx-top svg { width: 18px; height: 18px; }

/* copy feedback: check mark + toast */
.copy-code.is-done { color: var(--mx-accent) !important; }
.mx-toast { position: fixed; left: 50%; bottom: 28px; z-index: 300; padding: 11px 18px; border-radius: 999px; background: var(--mx-bg); color: var(--mx-ink); font-size: 14px;
  box-shadow: 0 14px 40px rgba(0,0,0,.35); border: 1px solid color-mix(in oklch, var(--mx-accent) 40%, transparent); translate: -50% 0;
  transition: opacity .3s ease, transform .5s var(--mx-spring); }
@starting-style { .mx-toast { opacity: 0; transform: translateY(16px) scale(.96); } }
.mx-toast.is-out { opacity: 0; transform: translateY(10px); }

/* footer: a large outlined wordmark rises in */
.tm-footer { position: relative; overflow: hidden; }
.tm-footer::after { content: "TommyAPI"; display: block; text-align: center; font-family: var(--mx-italic); font-style: italic; font-size: clamp(64px, 16vw, 240px); line-height: .8; letter-spacing: -.02em;
  color: transparent; -webkit-text-stroke: 1px color-mix(in oklch, var(--mx-ink) 18%, transparent); margin: 10px 0 -0.12em; pointer-events: none; }
@supports (animation-timeline: view()) {
  .tm-footer::after { animation: mx-footer-rise linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
  @keyframes mx-footer-rise { from { transform: translateY(40%); opacity: 0; } }
}

/* inner heroes: picture opens with a mask, title clears from a blur */
.pg-hero::before, .explore-hero::before, .detail-intro::before, html[data-mx="opencode"] .hero::before {
  animation: mx-kenburns 2.6s cubic-bezier(.16, 1, .3, 1) both, mx-mask-open 1.6s cubic-bezier(.76, 0, .24, 1) both; }
@supports (animation-timeline: scroll()) {
  .pg-hero::before, .explore-hero::before, .detail-intro::before, html[data-mx="opencode"] .hero::before {
    animation: mx-kenburns 2.6s cubic-bezier(.16, 1, .3, 1) both, mx-mask-open 1.6s cubic-bezier(.76, 0, .24, 1) both, mx-hero-drift linear both;
    animation-timeline: auto, auto, scroll(root); animation-range: normal, normal, 0 90vh; }
}
@keyframes mx-mask-open { from { clip-path: inset(22% 30% 22% 30% round 24px); } to { clip-path: inset(0 0 0 0 round 0); } }
.pg-hero h1, .explore-hero h1, .detail-intro h1, html[data-mx="opencode"] .hero h1 { animation-name: mx-rise-blur; }
@keyframes mx-rise-blur { from { opacity: .01; transform: translate3d(0, 34px, 0); filter: blur(12px); } to { filter: blur(0); } }
.pg-hero > *, .explore-hero > *, .detail-intro > * { position: relative; z-index: 2; }

/* grain: an extremely light film grain on the dark heroes */
.mx-grain { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* direction-aware page transitions: forward slides left, back slides right */
html:active-view-transition-type(forward)::view-transition-old(root) { animation-name: mx-vt-out-fwd; }
html:active-view-transition-type(forward)::view-transition-new(root) { animation-name: mx-vt-in-fwd; }
html:active-view-transition-type(back)::view-transition-old(root) { animation-name: mx-vt-out-back; }
html:active-view-transition-type(back)::view-transition-new(root) { animation-name: mx-vt-in-back; }
@keyframes mx-vt-out-fwd { to { opacity: 0; transform: translateX(-4%); filter: blur(6px); } }
@keyframes mx-vt-in-fwd { from { opacity: 0; transform: translateX(6%); filter: blur(8px); } }
@keyframes mx-vt-out-back { to { opacity: 0; transform: translateX(4%); filter: blur(6px); } }
@keyframes mx-vt-in-back { from { opacity: 0; transform: translateX(-6%); filter: blur(8px); } }

/* 404: the number scrambles and the gate follows the pointer */
.mx-404 .pg-eyebrow { font-size: clamp(64px, 12vw, 160px) !important; line-height: 1 !important; font-variant-numeric: tabular-nums; }
.mx-404 .pg-hero::before { translate: var(--mx-px, 0) var(--mx-py, 0); transition: translate 1.2s cubic-bezier(.16, 1, .3, 1); }

@media (prefers-reduced-motion: reduce) {
  .tm-btn-primary::after, .mx-btn-primary::after, .pg-btn-primary::after, .detail-intro .button::after, body::before, .tm-footer::after { animation: none !important; }
  .mx-dot, .mx-grain { display: none; }
  img.mx-lqip { filter: none; opacity: 1; }
  .mx-nav-hidden .tm-header { transform: none; }
}

/* buttons inside the dark heroes (404, about...) */
.pg-hero .pg-btn { background: rgba(7,9,13,.35) !important; color: var(--mx-ink) !important; border: 1px solid color-mix(in oklch, var(--mx-ink) 30%, transparent) !important; border-radius: 999px !important; backdrop-filter: blur(6px); }
.pg-hero .pg-btn:hover { border-color: var(--mx-ink) !important; }
.pg-hero .pg-btn-primary { background: var(--mx-accent) !important; border-color: var(--mx-accent) !important; color: #14100a !important; }

/* phones: no blend modes, backdrop blurs or blur keyframes on first paint (main-thread raster cost on weak CPUs) */
@media (max-width: 760px) {
  .mx-film h1 span, .pg-hero h1, .explore-hero h1, .detail-intro h1 { animation-name: mx-rise !important; }
  .mx-film-glow, .mx-grain, .mx-embers { display: none !important; }
  .mx-status, .mx-btn-ghost, .mx-film-code, .tm-header, .explore-hero .explore-search { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  .tm-header { background: rgba(7,9,13,.94) !important; }
}

/* phones: hero pictures only fade in (no scale / clip animation of a full-screen image on first paint) */
@media (max-width: 760px) {
  .mx-film-pic img { animation: none !important; }
  .pg-hero::before, .explore-hero::before, .detail-intro::before, html[data-mx="opencode"] .hero::before { animation: mx-fade-in .8s ease both !important; clip-path: none !important; }
  @keyframes mx-fade-in { from { opacity: 0; } }
}

/* ======================= gate round 1 fixes ======================= */
/* model page: the price card follows the reader on desktop */
@media (min-width: 1041px) { .detail-purchase { position: sticky; top: 92px; align-self: start; } }
.faq-item summary { font-family: inherit !important; color: #171717 !important; }
.faq-item summary code { font-family: inherit; background: none; color: inherit; padding: 0; }
.model-media-detail .media-kind { top: 12px !important; bottom: auto !important; left: 12px !important; }
@media (max-width: 760px) {
  .code-card pre, .detail-content pre { white-space: pre-wrap; word-break: break-all; }
  .price-table, .spec-grid { font-size: 14px; }
  .price-table th, .price-table td, .spec-row dt { white-space: nowrap; }
}
/* hero headings never split inside a word */
.pg-hero h1, .explore-hero h1, .detail-intro h1 { word-break: keep-all; overflow-wrap: anywhere; }
.explore-hero p, .pg-hero p { max-width: 40em; }
.explore-hero::after, .pg-hero::after { background: linear-gradient(90deg, rgba(7,9,13,.94) 0%, rgba(7,9,13,.8) 42%, rgba(7,9,13,.35) 75%, rgba(7,9,13,.2) 100%), linear-gradient(0deg, rgba(7,9,13,.85) 0%, rgba(7,9,13,0) 40%); }

/* model page hero: the model's own sample shows through the world picture once it has loaded */
.mx-hero-sample { position: absolute; inset: 0; z-index: -1; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.2s cubic-bezier(.16, 1, .3, 1); }
.mx-hero-sample.is-on { opacity: .55; }

/* text and audio models: a typographic card (provider + model id) instead of a decorative picture */
.catalog-card[data-kind="text"] .model-cover, .catalog-card[data-kind="audio"] .model-cover { display: none; }
.catalog-card[data-kind="text"] .media-fallback, .catalog-card[data-kind="audio"] .media-fallback {
  display: flex !important; position: absolute; inset: 0; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 18px 20px;
  background: radial-gradient(120% 90% at 85% 10%, rgba(242,179,94,.16), transparent 60%), linear-gradient(160deg, #10151d, #07090d) !important; color: #f3eee5 !important; }
.catalog-card[data-kind="text"] .media-fallback span, .catalog-card[data-kind="audio"] .media-fallback span { font: 500 12px/1.2 "SFMono-Regular", Consolas, monospace; letter-spacing: .08em; color: rgba(243,238,229,.55) !important; }
.catalog-card[data-kind="text"] .media-fallback strong, .catalog-card[data-kind="audio"] .media-fallback strong { font-family: "MX Instrument", Georgia, serif; font-style: italic; font-weight: 400; font-size: clamp(26px, 2.4vw, 34px); line-height: 1.05; color: #ffd9a1 !important; word-break: break-all; }
.catalog-card[data-kind="text"] .media-fallback::after, .catalog-card[data-kind="audio"] .media-fallback::after {
  content: ""; position: absolute; left: 20px; right: 20px; top: 22px; height: 1px; background: linear-gradient(90deg, rgba(242,179,94,.6), transparent); }

/* always reachable: a compact "get API key" pill when the header slides away (desktop) or at the bottom (phones) */
.mx-fab { position: fixed; z-index: 95; right: 82px; bottom: 22px; display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 20px; border-radius: 999px;
  background: var(--mx-accent); color: #14100a !important; font: 650 15px/1 Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; text-decoration: none !important;
  box-shadow: 0 14px 40px rgba(0,0,0,.35); opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .35s ease, transform .55s var(--mx-spring); }
.mx-fab.is-on { opacity: 1; transform: none; pointer-events: auto; }
.mx-top { width: 44px; height: 44px; bottom: 24px; }
@media (max-width: 760px) {
  .mx-fab { left: 16px; right: 72px; bottom: max(14px, env(safe-area-inset-bottom)); justify-content: center; height: 50px; }
  .mx-top { right: 14px; bottom: max(17px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .mx-fab { transition: none; } }

/* home: text and audio kinds show their real model ids instead of a decorative picture */
.mx-kind-ids { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 28px 32px;
  background: radial-gradient(120% 90% at 85% 10%, rgba(242,179,94,.14), transparent 60%), linear-gradient(160deg, #10151d, #07090d); }
.mx-kind-ids span { font: 500 clamp(18px, 2vw, 26px)/1.25 "SFMono-Regular", Consolas, monospace; color: rgba(243,238,229,.86); }
.mx-kind-ids span:first-child { color: #ffd9a1; }
.mx-kind-ids span::before { content: "model: "; color: rgba(243,238,229,.38); }
.mx-kind-ids + figure, .mx-kind-media.has-ids figure { display: none; }

/* ======================= gate round 2 fixes (home) ======================= */
@media (min-width: 761px) { .mx-film { height: 500vh; } }
/* the first screen never stands still: the camera breathes and the gate light swells, before any scrolling */
@media (min-width: 761px) and (prefers-reduced-motion: no-preference) {
  .mx-film-video, .mx-film-pic img { animation: mx-breathe 9s ease-in-out infinite alternate; }
  .mx-film-glow { animation: mx-glow-swell 4.5s ease-in-out infinite alternate; }
  @keyframes mx-breathe { from { scale: 1; } to { scale: 1.055; } }
  @keyframes mx-glow-swell { from { opacity: .55; } to { opacity: 1; } }
}
.mx-film-glow { background: radial-gradient(420px 420px at var(--gx, 64%) var(--gy, 52%), rgba(255,206,140,.22), rgba(255,206,140,0) 70%); }
/* text on the film always sits on a calm, dark side */
.mx-film-shade { background: linear-gradient(90deg, rgba(7,9,13,.9) 0%, rgba(7,9,13,.72) 30%, rgba(7,9,13,.25) 58%, rgba(7,9,13,0) 100%),
  linear-gradient(0deg, rgba(7,9,13,.9) 0%, rgba(7,9,13,0) 30%), linear-gradient(180deg, rgba(7,9,13,.55) 0%, rgba(7,9,13,0) 18%); }
.mx-layer { padding-top: 120px; }
.mx-lead { font-size: 18px; color: rgba(243,238,229,.82); margin-top: 40px; }
.mx-trust { font-size: 15px; color: rgba(243,238,229,.7); }
.mx-film-sub { color: rgba(243,238,229,.82); }
.mx-why-statement .mx-w { color: rgba(243,238,229,.34); }
.mx-kind-note { margin: 56px 0 0; font-size: 14.5px; line-height: 1.8; color: rgba(243,238,229,.6); }
.mx-kind-note a { color: #ffd9a1 !important; }
/* closing call: the headline sits on a dark pool, not on the glow */
.mx-cta-inner { position: relative; }
.mx-cta-inner::before { content: ""; position: absolute; left: 50%; top: 50%; width: min(980px, 96vw); height: 120%; translate: -50% -50%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(7,9,13,.82), rgba(7,9,13,.55) 60%, rgba(7,9,13,0)); }

/* ======================= gate round 2 fixes (inner pages) ======================= */
/* the cursor light is for the dark home only; on light pages it read as a stain */
html:not([data-mx="home"]) .mx-cursor { display: none; }
/* model pages: a taller hero with the model's own sample moving behind it */
.detail-intro { min-height: min(68vh, 640px); display: flex; flex-direction: column; justify-content: flex-end; }
.mx-hero-video { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s cubic-bezier(.16, 1, .3, 1); }
.mx-hero-video.is-on { opacity: .5; }
.detail-intro .detail-heading-row > div > * { animation: mx-rise 1.1s cubic-bezier(.16, 1, .3, 1) both; }
.detail-intro .detail-heading-row > div > :nth-child(2) { animation-delay: .1s; } .detail-intro .detail-heading-row > div > :nth-child(3) { animation-delay: .22s; }
.detail-intro .detail-heading-row > .button { animation: mx-rise 1.1s cubic-bezier(.16, 1, .3, 1) .34s both; }
.detail-intro .chip-row { animation: mx-rise 1.1s cubic-bezier(.16, 1, .3, 1) .42s both; }
/* code blocks: a light scans down once as they arrive */
@supports (animation-timeline: view()) {
  .code-card, .mx-code { position: relative; }
  .code-card::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 40%; pointer-events: none;
    background: linear-gradient(180deg, transparent, rgba(242,179,94,.12), transparent); animation: mx-scan linear both; animation-timeline: view(); animation-range: entry 10% cover 60%; }
  @keyframes mx-scan { from { transform: translateY(-100%); opacity: 1; } 90% { opacity: 1; } to { transform: translateY(260%); opacity: 0; } }
}
@media (max-width: 760px) {
  .detail-intro { min-height: 0; }
  .detail-layout { display: flex !important; flex-direction: column; }
  .detail-layout > .detail-purchase { order: -1; }
  .catalog-card { animation: none !important; }
}
@media (max-width: 760px) { .mx-hero-sample, .mx-hero-video { display: none !important; } }

/* ======================= gate round 3 fixes ======================= */
/* one type family inside content: serif only for hero titles; FAQ and section titles in the page's sans */
.pg-prose h2, .pg-section-title, .detail-content h2, .log-entry h2, html[data-mx="opencode"] section h2 { font-family: inherit !important; font-weight: 700; letter-spacing: -.01em; }
.faq-item summary, .faq-item summary * { font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif !important; color: #171717 !important; font-weight: 600; }
/* phones: nothing may push the page sideways */
@media (max-width: 760px) {
  .detail-layout > *, .detail-showcase, .detail-purchase, .code-card, .spec-grid, .price-table, .faq-list { min-width: 0; max-width: 100%; }
  .code-card pre, .detail-content pre { overflow-x: auto; max-width: 100%; }
  .detail-content video, .detail-content img { max-width: 100%; }
  .spec-row { display: grid !important; grid-template-columns: 1fr !important; gap: 2px; }
  .spec-row dd { margin: 0; word-break: break-word; }
  .price-table table { width: 100%; table-layout: fixed; }
  .price-table th, .price-table td { white-space: normal !important; word-break: break-word; }
  body { padding-bottom: 76px; }
}
/* the floating call to action: small, top-right on desktop (where the header was), bottom safe area on phones */
@media (min-width: 761px) { .mx-fab { top: 16px; bottom: auto; right: 24px; height: 40px; padding: 0 16px; font-size: 14px; } }
.mx-fab.is-near-end { opacity: 0 !important; pointer-events: none !important; }

/* ======================= gate p07 round 1 fixes (inner pages) ======================= */
/* code tabs: curl / Python / Node.js in one block, a sliding pill marks the open one */
.mx-tabs { position: relative; display: inline-flex; gap: 4px; padding: 4px; margin: 4px 0 12px; border-radius: 999px; background: #10141c; isolation: isolate; }
.mx-tab { position: relative; z-index: 1; border: 0; background: none; color: rgba(243,238,229,.62); font: 600 14px/1 Inter, "Segoe UI", system-ui, sans-serif; padding: 10px 18px; border-radius: 999px; cursor: pointer; transition: color .3s ease; }
.mx-tab[aria-selected="true"] { color: #14100a; }
.mx-tab:focus-visible { outline: 2px solid var(--mx-accent-2); outline-offset: 2px; }
.mx-tabs-pill { position: absolute; z-index: 0; left: 0; top: 4px; bottom: 4px; width: 0; border-radius: 999px; background: var(--mx-accent);
  transition: transform .45s cubic-bezier(.34, 1.4, .64, 1), width .45s cubic-bezier(.34, 1.4, .64, 1); }
.code-card[role="tabpanel"]:not([hidden]) { animation: mx-tab-in .5s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes mx-tab-in { from { opacity: 0; transform: translate3d(0, 14px, 0); } }
.code-card pre code { font-size: 14px; line-height: 1.7; }

/* model page hero: a full first screen, the sample video alive behind it, a staggered entrance */
@media (min-width: 761px) {
  .detail-intro { min-height: calc(100svh - 64px) !important; justify-content: center !important; }
  .mx-hero-video.is-on { opacity: .78; animation: mx-hero-push 14s ease-in-out infinite alternate; }
  @keyframes mx-hero-push { from { transform: scale(1.02); } to { transform: scale(1.12) translate3d(-1.5%, -1%, 0); } }
  .detail-intro::after { background: linear-gradient(90deg, rgba(7,9,13,.9) 0%, rgba(7,9,13,.6) 42%, rgba(7,9,13,.1) 78%, rgba(7,9,13,0) 100%),
    linear-gradient(0deg, rgba(7,9,13,.9) 0%, rgba(7,9,13,0) 36%) !important; }
  .detail-intro .breadcrumb { font-size: 14px !important; animation: mx-rise .9s var(--mx-ease) 0s both; }
  .detail-intro .detail-provider { font-size: 15px !important; animation: mx-rise .9s var(--mx-ease) .12s both; }
  .detail-intro h1 { animation-delay: .24s !important; }
  .detail-intro .detail-lead { font-size: 18px !important; color: rgba(243,238,229,.86) !important; animation-delay: .38s !important; }
  .detail-intro .detail-sync { font-size: 14px !important; animation: mx-rise .9s var(--mx-ease) .5s both; }
  .detail-intro .chip-row { animation: mx-rise .9s var(--mx-ease) .62s both; }
  .detail-intro .button { animation: mx-rise .9s var(--mx-ease) .74s both; }
  /* leaving the hero: it recedes into a rounded card instead of sliding away whole */
  @supports (animation-timeline: view()) {
    .detail-intro { animation: mx-hero-recede linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; transform-origin: 50% 0%; }
    @keyframes mx-hero-recede { to { transform: scale(.9); border-radius: 0 0 40px 40px; opacity: .2; } }
  }
  /* reading sizes in the content */
  .detail-content p, .detail-content li, .spec-row dt, .spec-row dd, .price-table th, .price-table td, .code-note { font-size: 16px !important; line-height: 1.75; }
  .spec-row dt, .price-table th { color: #4a4f58 !important; }
  .spec-row dd, .price-table td { color: #16181d !important; }
  .detail-purchase .price-big, .detail-purchase .purchase-price, .detail-purchase strong { font-size: 30px; }
}

/* phones: no web fonts on first load. A web font that lands after first paint relayouts the whole CJK page (~0.7s on a
   mid phone), so headings use the system serif/sans there; the display faces stay a desktop treat. */
@media (max-width: 760px) {
  :root { --mx-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif; --mx-italic: Georgia, "Times New Roman", serif; }
}

/* compositing budget: no backdrop blur and no blend modes anywhere. Measured in software GL (no GPU) the home page ran at
   12 fps with them and 52 fps without; on low-end laptops they cost the same way. Glass becomes solid tinted panels. */
*, *::before, *::after { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.mx-film-glow, .mx-cta-mid, .mx-embers, .mx-cursor, .mx-grain { mix-blend-mode: normal !important; }
.mx-film-glow { opacity: .55 !important; }
.mx-embers { opacity: .8; }
.mx-grain { display: none !important; }
.tm-header { background: rgba(7, 9, 13, .86) !important; }
.mx-status, .mx-btn-ghost, .mx-film-code { background: rgba(12, 15, 22, .78) !important; }
.explore-hero .explore-search { background: rgba(7, 9, 13, .82) !important; }

/* related models as a strip of real samples (desktop), snapping horizontally, each card rising in turn */
.mx-related-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 16px; margin: 18px 0 28px; overflow-x: auto;
  scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
.mx-related-card { scroll-snap-align: start; display: grid; gap: 6px; text-decoration: none; color: #16181d; position: relative;
  animation: mx-tab-in .8s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--i, 0) * 90ms); }
@supports (animation-timeline: view()) {
  .mx-related-card { animation: mx-reveal-up linear both; animation-timeline: view(); animation-range: entry calc(var(--i, 0) * 4%) entry calc(60% + var(--i, 0) * 4%); }
}
.mx-related-pic { display: block; aspect-ratio: 3 / 2; border-radius: 14px; overflow: hidden; background: #0d1016; }
.mx-related-pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.16, 1, .3, 1), filter .5s ease; filter: saturate(.92); }
.mx-related-card:hover .mx-related-pic img { transform: scale(1.06); filter: saturate(1.08); }
.mx-related-proof { position: absolute; left: 10px; top: 10px; font: 600 12px/1 Inter, system-ui, sans-serif; padding: 6px 8px; border-radius: 999px; background: rgba(7, 9, 13, .72); color: #f3eee5; }
.mx-related-card b { font: 600 16px/1.3 Inter, "Segoe UI", system-ui, sans-serif; margin-top: 4px; }
.mx-related-card small { font-size: 13.5px; color: #5b616c; }

/* ======================= gate p07 round 2 fixes (inner pages) ======================= */
/* model page hero: actions under the title, a caption naming the background, dark fading into the light content */
.mx-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 6px; animation: mx-rise .9s var(--mx-ease) .5s both; }
.mx-hero-key { display: inline-flex; align-items: center; height: 46px; padding: 0 22px; border-radius: 999px; background: var(--mx-accent); color: #14100a !important;
  font-weight: 700; font-size: 15px; text-decoration: none; transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.mx-hero-key:hover { transform: translateY(-2px); }
.mx-hero-copy { height: 46px; padding: 0 20px; border-radius: 999px; border: 1px solid rgba(243,238,229,.3); background: rgba(12,15,22,.6); color: #f3eee5;
  font: 600 15px/1 ui-monospace, "Cascadia Code", Consolas, monospace; cursor: pointer; transition: border-color .3s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.mx-hero-copy:hover { border-color: var(--mx-accent-2); transform: translateY(-2px); }
.detail-intro a.button.mx-as-link { background: none !important; border: 0 !important; color: var(--mx-accent-2) !important; padding: 0 !important; height: auto !important;
  text-decoration: underline; text-underline-offset: 4px; font-weight: 600; }
.mx-hero-cap { position: absolute; right: max(32px, calc((100% - 1180px) / 2)); bottom: 22px; margin: 0; font-size: 13px !important; color: rgba(243,238,229,.7) !important;
  animation: mx-rise .9s var(--mx-ease) 1s both !important; }
@media (min-width: 761px) {
  .detail-intro + .detail-content { position: relative; }
  .detail-intro + .detail-content::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 180px; pointer-events: none; z-index: 0;
    background: linear-gradient(180deg, #07090d 0%, rgba(7,9,13,.55) 35%, rgba(255,255,255,0) 100%); }
  .detail-intro + .detail-content > * { position: relative; z-index: 1; }
}

/* model list: a shorter hero so the first row of cards shows on the first screen */
.explore-hero { padding: 104px 0 44px !important; }
@media (max-width: 760px) { .explore-hero { padding: 76px 0 34px !important; } }
.explore-hero h1 { font-size: clamp(32px, 3.6vw, 52px) !important; }

/* text and audio cards: the model id on one line, upright, nothing on top of it */
.catalog-card[data-kind="text"] .media-fallback strong, .catalog-card[data-kind="audio"] .media-fallback strong {
  font: 600 22px/1.2 ui-monospace, "Cascadia Code", Consolas, monospace !important; font-style: normal !important; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; display: block; word-break: normal !important; }
.catalog-card[data-kind="text"] .media-fallback, .catalog-card[data-kind="audio"] .media-fallback { padding: 44px 18px 18px !important; justify-content: flex-end !important; }
.catalog-card[data-kind="text"] .media-kind, .catalog-card[data-kind="audio"] .media-kind { top: 12px !important; bottom: auto !important; }

.detail-intro .mx-hero-actions a.mx-hero-key { color: #14100a !important; }

/* ======================= gate p07 round 3 fixes (inner pages) ======================= */
/* the header stays at the top while reading: the old `overflow-x: hidden` on html+body made body a scroll container,
   which silently disabled position: sticky; clip keeps the no-sideways-scroll guarantee without that side effect */
html, body { overflow-x: clip !important; }
.tm-header { position: sticky !important; top: 0; z-index: 500 !important; background: rgba(7, 9, 13, .94) !important; }

/* model page: the dark hero dissolves into the light page instead of a hard edge (desktop) */
@media (min-width: 761px) {
  .detail-intro + .detail-content::before { display: none !important; }
  .detail-intro { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 160px), rgba(0,0,0,.35) calc(100% - 40px), transparent);
    mask-image: linear-gradient(180deg, #000 calc(100% - 160px), rgba(0,0,0,.35) calc(100% - 40px), transparent); }
  .detail-purchase .price-big, .detail-purchase strong { font-size: 32px !important; }
}
.price-table td, .price-table th { font-family: inherit !important; }
.detail-intro .detail-lead { color: rgba(243,238,229,.86) !important; }

/* related samples: a full grid, no clipped card; duplicate text rows are hidden by the script */
.mx-related-strip { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); overflow: visible; }
.related-list li.mx-in-strip { display: none; }
.related-list span { font-size: 13.5px !important; color: #4a4f58 !important; }

/* model list: card badges in separate corners; text and audio cards half as tall */
.catalog-card .media-proof { left: auto !important; right: 10px !important; top: 10px !important; bottom: auto !important; }
.catalog-card[data-kind="text"] .model-media, .catalog-card[data-kind="audio"] .model-media { aspect-ratio: 16 / 6 !important; min-height: 0 !important; }
.catalog-card[data-kind="text"] .media-fallback, .catalog-card[data-kind="audio"] .media-fallback { padding: 40px 16px 14px !important; }

/* Lenis' required CSS (lenis.css 1.3.x): without it native smooth-scroll fights the per-frame scrollTo */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis.lenis-smooth, .lenis.lenis-smooth * { scroll-behavior: auto !important; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
/* looping decoration rests while its section is off screen (site-motion.js toggles .mx-off) */
.mx-off, .mx-off *, .mx-off::before, .mx-off::after, .mx-off *::before, .mx-off *::after { animation-play-state: paused !important; }

/* p07 round 4 */
.tm-header { background: #07090d !important; }
@media (min-width: 761px) { .detail-intro { -webkit-mask-image: none !important; mask-image: none !important; } }
.detail-intro.has-video::before { opacity: 0 !important; transition: opacity 1.2s ease; }
.catalog-card[data-kind="text"] .media-fallback strong, .catalog-card[data-kind="audio"] .media-fallback strong { line-height: 1.45 !important; padding-bottom: 2px; }

/* ======================= v3: model page chapter "next to its peers" ======================= */
.mx-compare { margin: 56px 0 40px; }
.mx-compare-pin { display: grid; gap: 28px; }
.mx-compare-media { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 18px; background: #0d1016; margin-bottom: 18px; }
.mx-compare-kicker { margin: 0; font: italic 400 20px/1.2 var(--mx-italic); color: #b5793a; }
.mx-compare h2 { margin: 6px 0 8px; font-size: clamp(24px, 2.4vw, 34px) !important; line-height: 1.25; }
.mx-compare-note { margin: 0; font-size: 14px !important; color: #5b616c; }
.mx-compare-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; align-content: start; }
.mx-compare-bars li { display: grid; grid-template-columns: minmax(150px, 42%) 1fr auto; align-items: center; gap: 12px; font-size: 15px; }
.mx-bar-name { font: 600 14px/1.3 ui-monospace, "Cascadia Code", Consolas, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-bar-name a { color: #16181d; text-decoration: none; }
.mx-bar-name a:hover { text-decoration: underline; }
.mx-bar-track { height: 12px; border-radius: 999px; background: #eceef2; overflow: hidden; }
.mx-bar-track i { display: block; height: 100%; width: calc(var(--w) * 100%); border-radius: inherit; background: #c9ccd3; transform-origin: 0 50%; }
.mx-compare-bars li.is-self .mx-bar-track i { background: linear-gradient(90deg, #f2b35e, #e0892e); }
.mx-compare-bars li.is-self .mx-bar-name { color: #b5631a; }
.mx-compare-bars b { font: 700 15px/1 Inter, system-ui, sans-serif; min-width: 64px; text-align: right; }
@media (min-width: 1041px) {
  /* pinned: the sample stays while the list scrolls past and each bar fills as it arrives */
  .mx-compare { margin: 88px 0 64px; }
  .mx-compare-pin { grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: start; }
  .mx-compare-left { position: sticky; top: 108px; }
  .mx-compare-bars { padding-top: 8px; padding-bottom: 0; gap: 30px; align-self: center; }
  .mx-compare-pin { align-items: center; }
  .mx-compare-left { position: static; }
  .mx-compare-bars li { font-size: 16px; }
}
@supports (animation-timeline: view()) {
  @media (min-width: 761px) {
    .mx-compare-bars li { animation: mx-reveal-up linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
    .mx-compare-bars li .mx-bar-track i { animation: mx-bar-fill linear both; animation-timeline: view(); animation-range: entry 20% cover 45%; }
    @keyframes mx-bar-fill { from { transform: scaleX(0); } }
  }
}

/* ======================= v3 round 2 (inner pages) ======================= */
/* model list hero: one centred axis for title, line and search */
.explore-hero { text-align: center; }
.explore-hero h1 { margin-left: auto !important; margin-right: auto !important; max-width: 18em; }
.explore-hero p { margin-left: auto !important; margin-right: auto !important; color: rgba(243,238,229,.86) !important; }
.explore-hero .explore-search { margin-left: auto !important; margin-right: auto !important; }
@media (max-width: 760px) { .explore-hero h1 { word-break: keep-all; line-break: strict; } }
/* text and audio cards: the whole id visible, nothing clipped */
.catalog-card[data-kind="text"] .media-fallback strong, .catalog-card[data-kind="audio"] .media-fallback strong {
  font-size: 17px !important; line-height: 1.6 !important; padding: 2px 0 !important; overflow: hidden; text-overflow: ellipsis; }
.catalog-card[data-kind="text"] .model-media, .catalog-card[data-kind="audio"] .model-media { aspect-ratio: 16 / 7 !important; }
/* cards finish arriving early, so a resting screen never shows half-faded cards */
@supports (animation-timeline: view()) { @media (min-width: 761px) { .catalog-card { animation-range: entry 0% entry 35% !important; } } }

/* model page: one primary style (amber) for "get a key" everywhere */
.detail-purchase .button-primary, .detail-purchase .detail-cta:not(.detail-cta-secondary) { background: var(--mx-accent, #f2b35e) !important; border-color: var(--mx-accent, #f2b35e) !important; color: #14100a !important; }
/* the caption sits top right, clear of the sample's own watermark */
.mx-hero-cap { bottom: auto !important; top: 22px; }
/* phones: the same real sample behind the title as on desktop */
@media (max-width: 760px) { .mx-hero-sample { display: block !important; } .mx-hero-sample.is-on { opacity: .45; } }
/* desktop hero: the price, base URL and price table link together on the right */
.mx-hero-price { position: absolute; right: max(32px, calc((100% - 1180px) / 2)); top: 50%; transform: translateY(-50%); width: 300px; padding: 22px 22px 18px;
  border-radius: 18px; background: rgba(7,9,13,.72); border: 1px solid rgba(243,238,229,.16); color: #f3eee5; display: grid; gap: 8px;
  animation: mx-rise .9s var(--mx-ease) .7s both; }
.mx-hero-price small { font-size: 13px; color: rgba(243,238,229,.64); }
.mx-hero-price b { font: 700 34px/1.1 Inter, system-ui, sans-serif; color: #ffd9a1; }
.mx-hero-price code { font: 500 13px/1.4 ui-monospace, Consolas, monospace; color: rgba(243,238,229,.82); background: rgba(243,238,229,.06); padding: 6px 8px; border-radius: 8px; }
.mx-hero-price a { color: var(--mx-accent-2) !important; font-size: 14px; font-weight: 600; }
@media (max-width: 1100px) { .mx-hero-price { display: none; } }
.detail-intro.has-price-card a.button.mx-as-link { display: none !important; }

/* ===================== 2026-11-28 r5: one dark cinematic world on model pages and the catalog ===================== */
/* model pages and the catalog stay in the hero's night instead of cutting to a white document */
html[data-mx="detail"] body, html[data-mx="models"] body { background: #07090d !important; color: #f3eee5; }
html[data-mx="detail"] main, html[data-mx="models"] main { background: #07090d; }
html[data-mx="detail"] .detail-content { color: rgba(243,238,229,.86); }
html[data-mx="detail"] .detail-content h2 { color: #f3eee5 !important; font-size: clamp(24px, 2.2vw, 32px); }
html[data-mx="detail"] .detail-content p, html[data-mx="detail"] .detail-content dd, html[data-mx="detail"] .detail-content li { color: rgba(243,238,229,.82); }
html[data-mx="detail"] .detail-content dt { color: rgba(243,238,229,.58); }
html[data-mx="detail"] .spec-grid, html[data-mx="detail"] .price-table, html[data-mx="detail"] .faq-item, html[data-mx="detail"] .detail-section,
html[data-mx="detail"] .detail-purchase { background: rgba(243,238,229,.035) !important; border-color: rgba(243,238,229,.12) !important; color: rgba(243,238,229,.86); }
html[data-mx="detail"] .spec-row, html[data-mx="detail"] .price-table th, html[data-mx="detail"] .price-table td { border-color: rgba(243,238,229,.1) !important; color: rgba(243,238,229,.86); background: transparent !important; }
html[data-mx="detail"] .price-table th { color: rgba(243,238,229,.6) !important; }
html[data-mx="detail"] .faq-item summary { color: #f3eee5 !important; }
html[data-mx="detail"] .detail-purchase h2, html[data-mx="detail"] .detail-purchase h3 { color: #f3eee5 !important; }
html[data-mx="detail"] .detail-price { color: #ffd9a1 !important; font-family: var(--mx-serif); font-size: 26px !important; }
html[data-mx="detail"] .detail-model-id, html[data-mx="detail"] .base-url, html[data-mx="detail"] .detail-content code:not(pre code) { background: rgba(243,238,229,.07) !important; color: #f3eee5 !important; border-color: rgba(243,238,229,.14) !important; }
html[data-mx="detail"] .detail-cta-secondary { background: transparent !important; color: #f3eee5 !important; border-color: rgba(243,238,229,.3) !important; }
html[data-mx="detail"] .model-availability { background: rgba(110,200,150,.12) !important; color: #9fe0b8 !important; border-color: rgba(110,200,150,.35) !important; }
html[data-mx="detail"] .related-list a, html[data-mx="detail"] .detail-content p a, html[data-mx="detail"] .detail-sync a { color: #ffd9a1 !important; }
html[data-mx="detail"] .related-list span { color: rgba(243,238,229,.6) !important; }
html[data-mx="detail"] .mx-related-card b { color: #f3eee5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
html[data-mx="detail"] .mx-related-card small { color: rgba(243,238,229,.6); }
html[data-mx="detail"] .code-note { color: rgba(243,238,229,.72) !important; }

/* hero: the model id is the headline; the rest of the H1 (same text) reads as its subtitle */
.detail-intro h1 .mx-h1-id { display: block; font-size: clamp(64px, 8.4vw, 132px); line-height: 1; letter-spacing: -.03em; color: #f3eee5; }
.detail-intro h1 .mx-h1-rest { display: block; margin-top: 14px; font-size: clamp(22px, 2.2vw, 32px); font-weight: 500; color: rgba(243,238,229,.82); letter-spacing: 0; }
@media (min-width: 761px) { .detail-intro { min-height: calc(100svh - 68px); display: flex !important; flex-direction: column; justify-content: flex-end; padding-bottom: 96px !important; } }
@media (max-width: 760px) { .detail-intro h1 .mx-h1-id { font-size: clamp(44px, 13vw, 64px); } .detail-intro h1 .mx-h1-rest { font-size: 19px; } }
.mx-hero-help { margin: 12px 0 0 !important; font-size: 12.5px !important; line-height: 1.6; color: rgba(243,238,229,.72) !important; }
.mx-hero-help b { color: #fff; font-weight: 600; }
html.mx-hero-live .detail-showcase > .model-media-detail { display: none; }
.mx-purchase-help { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(243,238,229,.12); font-size: 13px; line-height: 1.7; color: rgba(243,238,229,.78); }
.mx-purchase-help b { color: #fff; }

/* catalog: a full-screen hero with the real sample reel running behind the title, and the live counts as a fact line */
@media (min-width: 761px) { html[data-mx="models"] .explore-hero { min-height: calc(100svh - 68px); } }
html[data-mx="models"] .explore-hero { display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.mx-hero-reel { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; opacity: 0; transition: opacity 1s ease; pointer-events: none; }
.mx-hero-reel.is-on { opacity: 1; }
.explore-hero.has-reel::before, .detail-intro.has-reel::before { opacity: 0 !important; }
.explore-hero.has-reel::after { background: linear-gradient(180deg, rgba(7,9,13,.55) 0%, rgba(7,9,13,.35) 40%, rgba(7,9,13,.92) 100%), radial-gradient(60% 55% at 50% 50%, rgba(7,9,13,.55), rgba(7,9,13,0)) !important; opacity: 1 !important; }
.detail-intro.has-reel::after { background: linear-gradient(90deg, rgba(7,9,13,.86) 0%, rgba(7,9,13,.5) 45%, rgba(7,9,13,.15) 100%), linear-gradient(0deg, rgba(7,9,13,.9), rgba(7,9,13,0) 45%) !important; opacity: 1 !important; }
.mx-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 26px auto 0; padding: 0; list-style: none; }
.mx-facts li { padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(243,238,229,.2); background: rgba(7,9,13,.45); font-size: 14px; color: rgba(243,238,229,.86); }
.mx-facts b { font-family: var(--mx-serif); font-size: 20px; color: #fff; margin-right: 6px; font-weight: 600; }
.mx-reel-cap { position: absolute; right: 28px; bottom: 22px; z-index: 3; margin: 0 !important; font-size: 12px !important; color: rgba(243,238,229,.7) !important; }
html[data-mx="models"] .explore-body { background: #07090d !important; color: #f3eee5; }
html[data-mx="models"] .explore-filters, html[data-mx="models"] .filter-group { background: rgba(243,238,229,.03) !important; border-color: rgba(243,238,229,.12) !important; color: #f3eee5 !important; }
html[data-mx="models"] .filter-option, html[data-mx="models"] .filter-group summary, html[data-mx="models"] .results-bar, html[data-mx="models"] .results-bar * { color: rgba(243,238,229,.86) !important; }
html[data-mx="models"] .filter-option b { background: rgba(243,238,229,.08) !important; color: #f3eee5 !important; border-color: rgba(243,238,229,.14) !important; }
html[data-mx="models"] .sort-select, html[data-mx="models"] .sort-select select { background: rgba(243,238,229,.05) !important; color: #f3eee5 !important; border-color: rgba(243,238,229,.16) !important; }
html[data-mx="models"] .results-hint { background: rgba(242,179,94,.07) !important; border-color: rgba(242,179,94,.25) !important; color: rgba(243,238,229,.82) !important; }
html[data-mx="models"] .catalog-card { background: #10151d !important; border-color: rgba(243,238,229,.1) !important; }
html[data-mx="models"] .catalog-card h3 a { color: #f3eee5 !important; }
html[data-mx="models"] .card-provider, html[data-mx="models"] .card-price-note, html[data-mx="models"] .card-chips span, html[data-mx="models"] .card-price span { color: rgba(243,238,229,.62) !important; background: transparent; }
html[data-mx="models"] .card-chips span { border-color: rgba(243,238,229,.16) !important; background: rgba(243,238,229,.05) !important; }
html[data-mx="models"] .card-price b { color: #ffd9a1 !important; }
html[data-mx="models"] .card-foot { border-color: rgba(243,238,229,.1) !important; }
html[data-mx="models"] .alias-section, html[data-mx="models"] .catalog-notes { color: rgba(243,238,229,.8) !important; }
html[data-mx="models"] .alias-head h2, html[data-mx="models"] .alias-head p { color: #f3eee5 !important; }
/* text and audio models have designed covers, not samples: a slim band instead of a tall picture, so a screen shows more prices */
@media (min-width: 761px) {
  html[data-mx="models"] .catalog-card[data-kind="text"] .model-media, html[data-mx="models"] .catalog-card[data-kind="audio"] .model-media { aspect-ratio: auto !important; height: 92px; }
  html[data-mx="models"] .catalog-card[data-kind="text"] .model-media img, html[data-mx="models"] .catalog-card[data-kind="audio"] .model-media img { height: 100%; object-fit: cover; filter: brightness(.55) saturate(.8); }
  html[data-mx="models"] .catalog-card[data-kind="text"] .media-fallback strong, html[data-mx="models"] .catalog-card[data-kind="audio"] .media-fallback strong { display: none; }
}

.mx-fab-help { right: 248px; background: rgba(7,9,13,.72) !important; color: #f3eee5 !important; border: 1px solid rgba(243,238,229,.3) !important; }
@media (max-width: 760px) { .mx-fab { right: 168px; } .mx-fab-help { left: auto; right: 72px; width: auto; padding: 0 14px; } }

/* r5 pass 2 */
html[data-mx="detail"] .detail-content dd, html[data-mx="detail"] .detail-content td, html[data-mx="detail"] .detail-content li,
html[data-mx="detail"] .detail-content p, html[data-mx="detail"] .faq-item, html[data-mx="detail"] .faq-item p { color: rgba(243,238,229,.86) !important; }
html[data-mx="detail"] .detail-content dt, html[data-mx="detail"] .price-table th { color: rgba(243,238,229,.6) !important; }
html[data-mx="detail"] .detail-content h2 { font-size: 22px; }
html[data-mx="detail"] .detail-showcase > h2, html[data-mx="detail"] .detail-content > section > h2, html[data-mx="detail"] .mx-compare h2 { font-size: clamp(26px, 2.4vw, 34px) !important; }
html[data-mx="detail"] .detail-purchase h2, html[data-mx="detail"] .detail-purchase h3 { font-family: var(--mx-sans, system-ui) !important; font-size: 14px !important; letter-spacing: .08em; color: rgba(243,238,229,.62) !important; font-weight: 600; margin-top: 0; }
html[data-mx="detail"] .detail-section, html[data-mx="detail"] .detail-purchase { background: transparent !important; }
html[data-mx="detail"] .detail-purchase { border-color: transparent !important; }
html[data-mx="detail"] .detail-purchase .detail-section:first-child { padding: 22px; border-radius: 18px; border: 1px solid rgba(243,238,229,.14) !important; background: rgba(243,238,229,.04) !important; }
html[data-mx="detail"] .detail-model-id, html[data-mx="detail"] .base-url { background: rgba(243,238,229,.07) !important; }
.mx-hero-price .mx-hero-help, .mx-hero-price .mx-hero-help b { font-family: inherit !important; font-size: 12.5px !important; line-height: 1.6 !important; letter-spacing: 0 !important; }
.mx-hero-price .mx-hero-help b { color: #fff !important; font-weight: 600 !important; }
.mx-reel-shade { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 1s ease;
  background: linear-gradient(180deg, rgba(7,9,13,.7) 0%, rgba(7,9,13,.5) 45%, rgba(7,9,13,.95) 100%), radial-gradient(55% 50% at 50% 48%, rgba(7,9,13,.55), rgba(7,9,13,0)); }
.has-reel .mx-reel-shade { opacity: 1; }
.detail-intro .mx-reel-shade { background: linear-gradient(90deg, rgba(7,9,13,.88) 0%, rgba(7,9,13,.55) 45%, rgba(7,9,13,.2) 100%), linear-gradient(0deg, rgba(7,9,13,.92), rgba(7,9,13,0) 45%); }
.explore-hero > .mx-hero-reel, .detail-intro > .mx-hero-reel { position: absolute !important; inset: 0; z-index: 0 !important; }
.explore-hero > .mx-reel-shade, .detail-intro > .mx-reel-shade { position: absolute !important; inset: 0; z-index: 1 !important; }
.explore-hero > .mx-reel-cap, .detail-intro > .mx-reel-cap { position: absolute !important; }
.explore-hero p { color: rgba(243,238,229,.9) !important; }
html[data-mx="detail"] .detail-purchase > *:not(.detail-section), html[data-mx="detail"] .detail-purchase .detail-section:not(:first-child) { background: transparent !important; }

/* ===== r5 pass 3: model pages get a camera event on every screen (pure CSS scroll-driven, desktop) ===== */
@supports (animation-timeline: view()) {
  @media (min-width: 761px) and (prefers-reduced-motion: no-preference) {
    /* screen 1 -> 2: the hero stays pinned like a film plate while the page slides up over it; the plate pushes in and dims */
    html[data-mx="detail"] .detail-intro { position: sticky !important; top: 0; z-index: 0; }
    html[data-mx="detail"] .detail-content { position: relative; z-index: 1; background: #07090d; border-radius: 34px 34px 0 0;
      box-shadow: 0 -40px 80px -20px rgba(0,0,0,.85); padding-top: 56px !important; max-width: none !important; width: 100% !important;
      padding-left: max(32px, calc((100% - 1180px) / 2)) !important; padding-right: max(32px, calc((100% - 1180px) / 2)) !important; }
    html[data-mx="detail"] .detail-intro > .mx-hero-video, html[data-mx="detail"] .detail-intro > .mx-hero-reel {
      animation: mx-plate linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
    html[data-mx="detail"] main > *:not(.detail-intro) { position: relative; z-index: 1; background-color: #07090d; }
    @keyframes mx-plate { to { transform: scale(1.14); filter: brightness(.45); } }
    html[data-mx="detail"] .detail-intro .detail-heading-row, html[data-mx="detail"] .detail-intro .mx-hero-price {
      animation: mx-lift linear both; animation-timeline: scroll(root); animation-range: 0 80vh; }
    @keyframes mx-lift { to { transform: translateY(-90px); opacity: .15; } }

    /* overview rows slide in one after another as each enters */
    html[data-mx="detail"] .spec-row { animation: mx-row-in linear both; animation-timeline: view(); animation-range: entry 0% entry 90%; }
    html[data-mx="detail"] .spec-row:nth-child(even) { animation-name: mx-row-in-r; }
    @keyframes mx-row-in { from { transform: translateX(-60px); opacity: 0; } }
    @keyframes mx-row-in-r { from { transform: translateX(60px); opacity: 0; } }

    /* code prints from the top down while it scrolls into view */
    html[data-mx="detail"] .code-card pre { animation: mx-print linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
    @keyframes mx-print { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }

    /* price rows rise with a slight 3D turn */
    html[data-mx="detail"] .price-table tr { animation: mx-tr-in linear both; animation-timeline: view(); animation-range: entry 0% entry 100%; transform-origin: 50% 100%; }
    @keyframes mx-tr-in { from { transform: perspective(700px) rotateX(-55deg) translateY(30px); opacity: 0; } }

    /* related samples fly in from depth, fanned */
    html[data-mx="detail"] .mx-related-card { animation: mx-card-in linear both; animation-timeline: view(); animation-range: entry 0% entry 100%; }
    html[data-mx="detail"] .mx-related-card:nth-child(3n+1) { --mx-ry: 18deg; } html[data-mx="detail"] .mx-related-card:nth-child(3n) { --mx-ry: -18deg; }
    @keyframes mx-card-in { from { transform: perspective(1000px) translateZ(-260px) rotateY(var(--mx-ry, 0deg)) translateY(80px); opacity: 0; } }

    /* related name lists sweep in from the side */
    html[data-mx="detail"] .related-list li { animation: mx-row-in linear both; animation-timeline: view(); animation-range: entry 0% entry 100%; }

    /* the comparison bars grow with the scroll */
    html[data-mx="detail"] .mx-compare-bars li .mx-bar-track i { animation: mx-bar linear both; animation-timeline: view(); animation-range: entry 20% cover 45%; transform-origin: 0 50%; }
    @keyframes mx-bar { from { transform: scaleX(0); } }

    /* FAQ rows unfold from the left */
    html[data-mx="detail"] .faq-item { animation: mx-row-in linear both; animation-timeline: view(); animation-range: entry 0% entry 100%; }
  }
}
/* r5: comparison chapter on the dark page */
html[data-mx="detail"] .mx-bar-track { background: rgba(243,238,229,.08) !important; }
html[data-mx="detail"] .mx-bar-track i { background: rgba(243,238,229,.38) !important; }
html[data-mx="detail"] .mx-compare-bars li.is-self .mx-bar-track i { background: linear-gradient(90deg, #f2b35e, #ffd9a1) !important; }
html[data-mx="detail"] .mx-compare-bars li.is-self .mx-bar-name { color: #ffd9a1 !important; }
html[data-mx="detail"] .mx-compare-note { color: rgba(243,238,229,.66) !important; }
html[data-mx="detail"] .mx-compare-bars b { color: #f3eee5; }
html[data-mx="detail"] .mx-compare-bars .mx-bar-name, html[data-mx="detail"] .mx-compare-bars .mx-bar-name a { color: rgba(243,238,229,.86) !important; }
html[data-mx="detail"] .mx-compare-kicker { color: #f2b35e; font-family: inherit; font-style: normal; font-size: 13px; letter-spacing: .18em; }

/* ===== r5 pass 4 (round-1 fixes) ===== */
.mx-nw { white-space: nowrap; }
.mx-nav-help { margin-right: 2px; }
@media (max-width: 760px) { body { padding-bottom: 76px; } }
/* models: selected filter readable on the dark theme */
html[data-mx="models"] .filter-option:has(input:checked) { background: rgba(242,179,94,.12) !important; border: 1px solid rgba(242,179,94,.45) !important; }
html[data-mx="models"] .filter-option:has(input:checked) span { color: #ffd9a1 !important; }
html[data-mx="models"] .filter-option:has(input:checked) b { background: #f2b35e !important; color: #14100a !important; }
/* models: text and audio models have no sample, so no cover band at all: denser, more prices per screen */
html[data-mx="models"] .catalog-card[data-kind="text"] .model-media, html[data-mx="models"] .catalog-card[data-kind="audio"] .model-media { display: none !important; }
html[data-mx="models"] .catalog-card[data-kind="text"] .catalog-card-body, html[data-mx="models"] .catalog-card[data-kind="audio"] .catalog-card-body { padding-top: 22px; border-top: 3px solid rgba(242,179,94,.5); }
/* models hero: short hook, lighter veil, primary actions */
.mx-hook { margin: 0 auto 10px !important; font-family: var(--mx-serif); font-weight: 600; font-size: clamp(48px, 6.4vw, 96px) !important; line-height: 1.04; letter-spacing: -.02em; color: #fff !important; text-shadow: 0 2px 30px rgba(7,9,13,.6); }
html[data-mx="models"] .explore-hero h1 { font-size: clamp(20px, 1.9vw, 28px) !important; font-weight: 500 !important; color: rgba(243,238,229,.92) !important; max-width: none !important; word-break: keep-all; }
.explore-hero .mx-reel-shade { background: linear-gradient(180deg, rgba(7,9,13,.42) 0%, rgba(7,9,13,.18) 40%, rgba(7,9,13,.85) 100%), radial-gradient(48% 42% at 50% 46%, rgba(7,9,13,.5), rgba(7,9,13,0)) !important; }
.mx-hero-cta { display: flex; justify-content: center; gap: 12px; margin: 22px 0 0 !important; }
.mx-btn-sm { display: inline-flex; align-items: center; height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid rgba(243,238,229,.4); color: #f3eee5 !important; font-weight: 600; background: rgba(7,9,13,.4); text-decoration: none !important; }
.mx-btn-sm-primary { background: #f2b35e; border-color: #f2b35e; color: #14100a !important; }
@media (max-width: 760px) { .mx-hook { font-size: clamp(36px, 10vw, 46px) !important; } }
/* model pages: one price face everywhere, readable sidebar as a single card */
html[data-mx="detail"] .detail-price { font: 700 26px/1.2 Inter, system-ui, sans-serif !important; color: #ffd9a1 !important; }
html[data-mx="detail"] .detail-purchase { padding: 22px !important; border-radius: 20px; border: 1px solid rgba(243,238,229,.14) !important; background: rgba(243,238,229,.035) !important; }
html[data-mx="detail"] .detail-purchase .detail-section, html[data-mx="detail"] .detail-purchase .detail-section:first-child { padding: 0 0 18px !important; margin: 0 0 18px !important; border: 0 !important; border-bottom: 1px solid rgba(243,238,229,.1) !important; background: transparent !important; border-radius: 0 !important; }
html[data-mx="detail"] .detail-purchase .detail-section:last-child { border-bottom: 0 !important; margin-bottom: 0 !important; padding-bottom: 0 !important; }
html[data-mx="detail"] .detail-purchase h2 { margin-top: 16px !important; }
html[data-mx="detail"] .detail-purchase *, html[data-mx="detail"] .detail-purchase p { background-color: transparent; }
html[data-mx="detail"] .detail-model-id, html[data-mx="detail"] .detail-purchase code { background: rgba(243,238,229,.07) !important; }
html[data-mx="detail"] .detail-content h2 { font-family: var(--mx-serif) !important; font-weight: 600 !important; }
/* model pages: hero sample brighter, veil only on the text side */
html[data-mx="detail"] .detail-intro > .mx-hero-video { filter: brightness(1.12) contrast(1.06) saturate(1.1); }
.detail-intro.has-video::after { background: linear-gradient(90deg, rgba(7,9,13,.82) 0%, rgba(7,9,13,.45) 42%, rgba(7,9,13,0) 70%), linear-gradient(0deg, rgba(7,9,13,.75), rgba(7,9,13,0) 35%) !important; opacity: 1 !important; }
.mx-hero-price { animation: mx-card-in-r 1s cubic-bezier(.16,1,.3,1) .35s both !important; }
@keyframes mx-card-in-r { from { opacity: 0; transform: translate(40px, -50%); } to { opacity: 1; transform: translate(0, -50%); } }
.mx-clip-costs { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; position: relative; z-index: 2; }
.mx-clip-costs li { display: flex; flex-direction: column; gap: 2px; padding: 10px 16px; border-radius: 14px; border: 1px solid rgba(243,238,229,.18); background: rgba(7,9,13,.5); }
.mx-clip-costs span { font-size: 12.5px; color: rgba(243,238,229,.7); }
.mx-clip-costs b { font: 700 20px/1.2 Inter, system-ui, sans-serif; color: #ffd9a1; }
/* model pages: the sample band between the code and the prices */
.mx-band { position: relative; margin: 40px 0 34px; border-radius: 22px; overflow: hidden; aspect-ratio: 16 / 8; background: #0d1016; }
.mx-band video, .mx-band img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mx-band figcaption { position: absolute; left: 16px; bottom: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(7,9,13,.66); font-size: 12.5px; color: rgba(243,238,229,.86); }
@supports (animation-timeline: view()) { @media (min-width: 761px) and (prefers-reduced-motion: no-preference) {
  .mx-band { animation: mx-band-open linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
  .mx-band video, .mx-band img { animation: mx-band-push linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
  @keyframes mx-band-open { from { clip-path: inset(14% 18% 14% 18% round 28px); } to { clip-path: inset(0 0 0 0 round 22px); } }
  @keyframes mx-band-push { from { transform: scale(1.25); } to { transform: scale(1.02); } }
  html[data-mx="detail"] .faq-item { animation-range: entry 0% entry 50% !important; }
} }
.explore-hero a.mx-btn-sm-primary { color: #14100a !important; }
.explore-hero a.mx-btn-sm { color: #f3eee5; }
/* r5 pass 5: the models hero is filled by script (hook, facts, buttons, reel): reserve its final height so the catalog below does not jump (mobile CLS 0.30 -> ~0) */
html[data-mx="models"] .explore-hero { min-height: 832px; }
@media (max-width: 1100px) { html[data-mx="models"] .explore-hero { min-height: 700px; } }
@media (max-width: 760px) { html[data-mx="models"] .explore-hero { min-height: 716px; } }
/* r5 pass 6: hero is filled by script; keep the hero top-aligned and reserve the hook and facts rows until they exist, so nothing moves (models CLS) */
html[data-mx="models"] .explore-hero { justify-content: flex-start; }
html[data-mx="models"] .explore-wrap:not(:has(.mx-hook)) h1::before { content: ""; display: block; height: 157px; }
html[data-mx="models"] .explore-wrap:not(:has(.mx-facts)) .explore-search { margin-top: 76px; }
@media (max-width: 1100px) { html[data-mx="models"] .explore-wrap:not(:has(.mx-hook)) h1::before { height: 115px; } }
@media (max-width: 760px) { html[data-mx="models"] .explore-wrap:not(:has(.mx-hook)) h1::before { height: 142px; }
  html[data-mx="models"] .explore-wrap:not(:has(.mx-facts)) .explore-search { margin-top: 136px; } }

/* ===== 0.13 effect C: glass tilt ===== */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .mx-glass { transform: perspective(1100px) rotateX(var(--grx, 0deg)) rotateY(var(--gry, 0deg)); transform-style: flat; will-change: transform; backdrop-filter: blur(12px) saturate(1.1); -webkit-backdrop-filter: blur(12px) saturate(1.1); }
  .mx-glass::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
    background: radial-gradient(360px circle at var(--gx, 50%) var(--gy, -20%), rgba(255,236,205,.2), rgba(255,236,205,0) 60%); }
  .mx-glass:hover::after { opacity: 1; }
}
