/*
 * MasterFrame's website: the Studio's own design system, on the public pages. Not a second palette — the tokens below are
 * aligned with `packages/masterframe/studio/ui/src/globals.css` (the file the desktop app and the web edition both load),
 * so a person moving between masterframe.net and the app does not cross a seam:
 *
 *   · dark is the default (the app is a dark studio, `theme.js` says so before the first paint), light is the toggle;
 *   · surfaces are the app's ground/panel/raised ladder, text is `--text`/`--text-muted`/`--text-faint`, lines are the
 *     app's hairline pair, and the one accent is the brand teal for what is picked, focused or current;
 *   · type is the app's: Inter Variable, Noto Sans Arabic Variable (the Arabic chrome) and Noto Kufi Arabic Variable
 *     (Arabic headings), self-hosted from the same font files the app bundles — no external request;
 *   · controls are the app's controls: the 32 px row, 6-12 px radii, `--primary` ink for the main action, a quiet
 *     `--bg-hover` for the pointer, the accent as the focus ring.
 *
 * The identity is monochrome (`--brand-ink`): the mark and the wordmark are pure ink, and the header lockup carries the
 * app's BrandLockup motion (settle 460/640 ms, hover tilt -4° 180 ms, press stamp, reduced-motion off).
 *
 * Pure CSS, logical properties only (the whole page mirrors in Arabic), `prefers-reduced-motion` respected. Scale: 4 px
 * spacing grid; content 1200 px; page gutter 24 px; header 60 px.
 */

/* ── the app's faces, served from this origin ─────────────────────────────── */

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Noto Sans Arabic Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/fonts/noto-sans-arabic-arabic-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC;
}
@font-face {
  font-family: 'Noto Sans Arabic Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/fonts/noto-sans-arabic-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Noto Kufi Arabic Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/fonts/noto-kufi-arabic-arabic-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC;
}
@font-face {
  font-family: 'Noto Kufi Arabic Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/fonts/noto-kufi-arabic-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Alexandria';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url('/assets/fonts/Alexandria-Medium.ttf') format('truetype');
}
@font-face {
  font-family: 'Alexandria';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url('/assets/fonts/Alexandria-SemiBold.ttf') format('truetype');
}
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('/assets/fonts/Tajawal-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url('/assets/fonts/Tajawal-Medium.ttf') format('truetype');
}
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url('/assets/fonts/Tajawal-Bold.ttf') format('truetype');
}

/* ── tokens: 96% Cinema Editorial Monochrome + <= 4% Whisper-Subtle Sage ─── */

:root,
:root[data-theme='dark'] {
  color-scheme: dark;

  --bg-app: #090A0B;
  --bg-panel: #101214;
  --bg-raised: #15181B;
  --bg-field: rgba(255, 255, 255, 0.035);
  --bg-hover: rgba(255, 255, 255, 0.05);
  --bg-pressed: rgba(255, 255, 255, 0.085);
  --bg-picked: #1B1E23;
  --on-picked: #F4F6F5;
  --card-blend: rgba(255, 255, 255, 0.018);

  --mint-wash: rgba(56, 152, 130, 0.045);
  --mint-pill: rgba(56, 152, 130, 0.055);
  --mint-pill-text: #CBD5D2;
  --mint-pill-border: rgba(82, 158, 136, 0.18);

  --text: #F4F6F5;
  --text-muted: #98A0AA;
  --text-faint: #687078;

  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);

  --primary: #F4F6F5;
  --primary-hover: #FFFFFF;
  --on-primary: #090A0B;

  --accent: #529E88;
  --accent-bright: #7BC0AC;
  --accent-primary: #F4F6F5;
  --accent-emerald: #FFFFFF;
  --accent-soft: rgba(56, 152, 130, 0.05);
  --on-accent: #090A0B;
  --switch-on: #529E88;
  --text-selection: rgba(255, 255, 255, 0.16);

  --gold: #E2BA5A;
  --gold-soft: rgba(226, 186, 90, 0.09);
  --gold-border: rgba(226, 186, 90, 0.24);

  --ok: #529E88;
  --warn: #EAB044;
  --err: #EC6A63;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-lg: 0 24px 56px -16px rgba(0, 0, 0, 0.56);
  --shadow-card: 0 12px 32px -16px rgba(0, 0, 0, 0.36);

  /* NLE graphite timeline clips + whisper sage audio */
  --clip-video: #23272E;
  --clip-page: #1C2026;
  --clip-text: #C59B27;
  --clip-audio: rgba(82, 158, 136, 0.16);
  --tl-lane: #121518;
  --tl-playhead: #F4F6F5;
  --tl-select: #529E88;

  /* strict 2D monochrome logo rule: white on dark, #111417 on light */
  --brand-ink: #FFFFFF;

  --font-sans: 'Inter Variable', 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-arabic: 'Tajawal', 'Noto Sans Arabic Variable', 'Noto Naskh Arabic', 'Geeza Pro', 'Segoe UI', Tahoma, sans-serif;
  --font-arabic-display: 'Alexandria', 'Noto Kufi Arabic Variable', 'Tajawal', sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;

  --radius: 6px;
  --radius-button: 8px;
  --radius-panel: 10px;
  --radius-card: 14px;
  --radius-xl: 18px;
  --row: 34px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --fast: 120ms;
  --mid: 180ms;
  --slow: 260ms;

  --gutter: 24px;
  --content: 1220px;
  --head: 64px;
}

:root[data-theme='light'] {
  color-scheme: light;

  --bg-app: #FFFFFF;
  --bg-panel: #FFFFFF;
  --bg-raised: #F7F8FA;
  --bg-field: rgba(17, 20, 23, 0.035);
  --bg-hover: rgba(17, 20, 23, 0.045);
  --bg-pressed: rgba(17, 20, 23, 0.075);
  --bg-picked: #111417;
  --on-picked: #FFFFFF;
  --card-blend: #FAFAFC;

  --mint-wash: rgba(56, 152, 130, 0.045);
  --mint-pill: rgba(56, 152, 130, 0.055);
  --mint-pill-text: #2B4C43;
  --mint-pill-border: rgba(56, 152, 130, 0.18);

  --text: #111417;
  --text-muted: #525A65;
  --text-faint: #78808C;

  --border: rgba(17, 20, 23, 0.08);
  --border-strong: rgba(17, 20, 23, 0.16);

  --primary: #111417;
  --primary-hover: #262B31;
  --on-primary: #FFFFFF;

  --accent: #389882;
  --accent-primary: #111417;
  --accent-emerald: #262B31;
  --accent-soft: rgba(56, 152, 130, 0.05);
  --on-accent: #FFFFFF;
  --switch-on: #389882;
  --text-selection: rgba(17, 20, 23, 0.10);

  --gold: #9A6F08;
  --gold-soft: rgba(212, 175, 55, 0.09);
  --gold-border: rgba(184, 134, 11, 0.24);

  --ok: #389882;
  --warn: #B25E00;
  --err: #D1342F;

  --shadow-sm: 0 1px 2px rgba(17, 20, 23, 0.04);
  --shadow-lg: 0 20px 48px -16px rgba(17, 20, 23, 0.07);
  --shadow-card: 0 10px 28px -14px rgba(17, 20, 23, 0.05);

  --clip-video: #ECEEF2;
  --clip-page: #F3F4F6;
  --clip-text: #B8860B;
  --clip-audio: rgba(56, 152, 130, 0.12);
  --tl-lane: #F3F4F6;
  --tl-playhead: #111417;
  --tl-select: #389882;

  --brand-ink: #111417;
}

/* ── base ─────────────────────────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg-app);
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg-app);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.006em;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Arabic typography: Alexandria (500-600) for headings, Tajawal (400/500/700) for body/UI, zero letter-spacing */
html[lang='ar'],
[dir='rtl'] {
  --font-sans: var(--font-arabic);
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  letter-spacing: 0 !important;
}

html[lang='ar'] body,
[dir='rtl'] body,
html[lang='ar'] *,
[dir='rtl'] * {
  letter-spacing: 0 !important;
}

html[lang='ar'] body {
  line-height: 1.72;
}

html[lang='ar'] :is(h1, h2, h3, .display, .display-ar, .section-title, .feature-title, .bento-title, .card-title, .step-title, .engine-tab-title, .plan-name, .teaser-name, .cta-title, .access-title, .dash-title) {
  font-family: var(--font-arabic-display);
  font-weight: 600;
  letter-spacing: 0 !important;
}

html[lang='ar'] :is(code, kbd, samp, pre) {
  font-family: var(--font-mono);
}

html[lang='ar'] :is(.engine-tab-code, .field, input, textarea, select, .mockup-project-badge, .studio-panel-badge, .mockup-prop-val, .agent-line, .hv-stage-label, .hv-label, .manual-card-title),
[dir='rtl'] :is(.engine-tab-code, .field, input, textarea, select, .mockup-project-badge, .studio-panel-badge, .mockup-prop-val, .agent-line, .hv-stage-label, .hv-label, .manual-card-title),
html[lang='ar'] input::placeholder,
html[lang='ar'] textarea::placeholder,
[dir='rtl'] input::placeholder,
[dir='rtl'] textarea::placeholder {
  font-family: var(--font-arabic);
  letter-spacing: 0 !important;
}

html[lang='ar'] .engine-tab-code,
[dir='rtl'] .engine-tab-code {
  font-weight: 600;
}

html[lang='ar'] input[type='password']:placeholder-shown,
[dir='rtl'] input[type='password']:placeholder-shown {
  font-family: var(--font-arabic);
  direction: rtl;
  text-align: start;
  letter-spacing: 0 !important;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--border-strong);
  outline-offset: 2px;
  border-radius: 7px;
}

::selection {
  background: var(--text-selection);
}

.icon {
  display: block;
  flex: 0 0 auto;
}

/* the hidden attribute always wins over a component's display rule (prices, the mobile menu pieces) */
[hidden] {
  display: none !important;
}

/* a direction-encoding glyph mirrors in Arabic (arrows, chevrons): the app's one mirror utility */
.rtl-mirror {
  flex: 0 0 auto;
}

[dir='rtl'] .rtl-mirror {
  transform: scaleX(-1);
}

/* text that is always left-to-right inside a right-to-left sentence: a command, a path, a version */
.bidi-ltr {
  direction: ltr;
  unicode-bidi: isolate;
}

/* ── layout ───────────────────────────────────────────────────────────────── */

.shell {
  width: min(var(--content), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.section {
  padding-block: clamp(68px, 8vw, 96px);
  border-block-start: 1px solid var(--border);
}

.section-compact {
  padding-block: clamp(28px, 3.5vw, 44px);
}

.section-alt {
  background: color-mix(in srgb, var(--bg-panel) 64%, var(--bg-app));
}

:root[data-theme='light'] .section-alt {
  background: #FAFAFC;
}

.section-plain {
  border-block-start: 0;
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  max-width: 680px;
  margin-inline: auto;
  margin-block-end: clamp(36px, 4.5vw, 52px);
}

.eyebrow {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-muted);
}

.section-title {
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.24;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  text-wrap: balance;
}

[dir='rtl'] .section-title {
  line-height: 1.38;
}

.section-lead {
  font-size: clamp(15px, 1.25vw, 17px);
  line-height: 1.72;
  color: var(--text-muted);
  max-width: 60ch;
  margin-inline: auto;
}

[dir='rtl'] .section-lead {
  line-height: 1.82;
}

.muted {
  color: var(--text-muted);
}

/* ── links and buttons: the app's control language ────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--row);
  padding-inline: 12px;
  border-radius: var(--radius-button);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.006em;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease), opacity var(--fast);
}

.btn:hover {
  background: var(--bg-hover);
}

.btn:active {
  background: var(--bg-pressed);
}

.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.4;
  pointer-events: none;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-primary:active {
  background: var(--primary-hover);
}

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  background: var(--bg-hover);
}

.btn-small {
  height: 28px;
  padding-inline: 10px;
  border-radius: var(--radius);
  font-size: 12px;
}

.head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.head-actions .btn {
  height: 36px;
  padding-inline: 14px;
  font-size: 13.5px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border-block-end: 1px solid transparent;
  padding-block-end: 1px;
  width: fit-content;
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.text-link:hover {
  color: var(--text);
  border-block-end-color: var(--border-strong);
}

.text-link .icon {
  color: var(--text-faint);
  transition: transform var(--fast) var(--ease);
}

.text-link:hover .icon {
  transform: translateX(2px);
}

[dir='rtl'] .text-link:hover .icon {
  transform: translateX(-2px) scaleX(-1);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}

.icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}

/* ── the brand lockup: the app's, in the header and the footer ────────────── */

/* The same parts and timings as `components/BrandLockup.tsx` in the app: the mark settles in once (460 ms) and the
   name rises a beat later (640 ms, +90 ms in Arabic); hovering the lockup tilts the mark -4° (180 ms); pressing it
   stamps the frame (240 ms). Every layer is its own span so the animations never fight over one transform, and
   `prefers-reduced-motion` removes all of it. Pure ink (`--brand-ink`), transform and opacity only. */
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--brand-ink);
  cursor: pointer;
}

.brand-mark {
  display: inline-flex;
  color: var(--brand-ink);
  animation: brand-mark-in 460ms var(--ease) both;
}

.brand-mark-settle {
  display: inline-flex;
  transform-origin: 50% 50%;
  transition: transform 220ms var(--ease);
}

.brand-lockup:hover .brand-mark-settle {
  transform: rotate(-4deg) scale(1.05);
  transition-duration: 180ms;
}

.brand-mark-idle {
  display: inline-flex;
  animation: brand-breathe 6s ease-in-out 1.6s infinite;
}

.brand-lockup.is-stamping .brand-mark-settle {
  animation: brand-stamp 240ms var(--ease);
}

.brand-word {
  font-family: var(--font-sans);
  font-weight: 650;
  font-size: 13px;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--brand-ink);
  animation: brand-word-in 640ms var(--ease) both;
}

.brand-word-ar {
  font-family: var(--font-arabic-display);
  font-weight: 650;
  font-size: 13.5px;
  line-height: 1;
  letter-spacing: 0;
  color: var(--brand-ink);
  animation: brand-word-in-rtl 640ms var(--ease) 90ms both;
}

html[dir='rtl'] .brand-word {
  animation-name: brand-word-in-rtl;
}

@keyframes brand-mark-in {
  from { opacity: 0; transform: scale(0.86) rotate(-8deg); }
  to { opacity: 1; transform: none; }
}

@keyframes brand-word-in {
  from { opacity: 0; transform: translateX(-5px); letter-spacing: 0.14em; }
  to { opacity: 1; transform: none; letter-spacing: -0.01em; }
}

@keyframes brand-word-in-rtl {
  from { opacity: 0; transform: translateX(5px); letter-spacing: 0.14em; }
  to { opacity: 1; transform: none; letter-spacing: 0; }
}

@keyframes brand-breathe {
  0%, 100% { transform: scale(1); opacity: 0.97; }
  50% { transform: scale(1.018); opacity: 1; }
}

@keyframes brand-stamp {
  0% { transform: scale(1) rotate(0deg); }
  32% { transform: scale(0.9) rotate(-2deg); }
  68% { transform: scale(1.035) rotate(1deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* ── the head ─────────────────────────────────────────────────────────────── */

.skip {
  position: fixed;
  inset-block-start: -100px;
  inset-inline-start: 16px;
  z-index: 100;
  height: 32px;
  padding-inline: 12px;
  display: inline-flex;
  align-items: center;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
}

.skip:focus {
  inset-block-start: 12px;
}

.site-head {
  position: sticky;
  inset-block-start: 0;
  z-index: 50;
  height: var(--head);
  background: color-mix(in srgb, var(--bg-app) 84%, transparent);
  backdrop-filter: blur(16px);
  border-block-end: 1px solid var(--border);
}

.site-head-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  height: 100%;
}

.site-head-brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  width: fit-content;
  border-radius: var(--radius);
  padding: 4px 6px;
  margin-inline-start: -6px;
}

.site-head-brand:hover {
  background: var(--bg-hover);
}

.site-head-brand .brand-word {
  font-size: 14.5px;
}

.site-head-brand .brand-word-ar {
  font-size: 15px;
}

.site-head-brand .brand-mark svg {
  width: 20px;
  height: 20px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 20px;
  min-width: 0;
}

.nav-link {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 6px 2px;
  border-radius: 0;
  border-block-end: 1px solid transparent;
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.nav-link:hover {
  color: var(--text);
  background: transparent;
}

.nav-link.is-current {
  color: var(--text);
  background: transparent;
  border-block-end-color: rgba(82, 158, 136, 0.52);
  font-weight: 600;
}

.site-head-tools {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
}

.site-head-tools .icon {
  width: 16px;
  height: 16px;
}

.lang-link {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding-inline: 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.lang-link:hover {
  color: var(--text);
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.head-signin-link {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding-inline: 10px;
  border-radius: var(--radius-button);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}

.head-signin-link:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.head-cta.btn-primary {
  height: 34px;
  padding-inline: 16px;
  border-radius: 999px;
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
  font-size: 13px;
  font-weight: 600;
}

.head-cta.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--on-primary);
}

.nav-open {
  display: none;
}

/* ── the hero (Pure Centered Symmetry + Wide Interactive Studio Mockup) ─────── */

.hero {
  padding-block: 0 clamp(56px, 6.5vw, 84px);
  border-block-end: 1px solid var(--border);
  overflow: clip;
  background: radial-gradient(ellipse 68% 42% at 50% 0%, rgba(255, 255, 255, 0.026), transparent 70%);
}

:root[data-theme='light'] .hero {
  background: transparent;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.hero-copy,
.hero-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 780px;
  width: 100%;
  margin-inline: auto;
  padding-block: clamp(48px, 6vw, 72px) clamp(28px, 3.5vw, 44px);
  gap: 18px;
  min-width: 0;
}

.hero-copy .hero-pill-row {
  justify-content: center;
}

.hero-copy .release-pill {
  background: var(--mint-pill);
  border: 1px solid var(--mint-pill-border);
  color: var(--mint-pill-text);
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 14px;
}

:root[data-theme='light'] .hero-copy .release-pill {
  background: var(--mint-pill);
  border-color: var(--mint-pill-border);
  color: var(--mint-pill-text);
}

.display {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.24;
  font-weight: 600;
  letter-spacing: -0.022em;
  text-wrap: balance;
  color: var(--text);
}

[dir='rtl'] .display {
  line-height: 1.32;
  letter-spacing: 0 !important;
}

.display-tail {
  display: inline-block;
  color: var(--text-muted);
  font-weight: 500;
}

.lead {
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 640px;
  margin-inline: auto;
  text-wrap: pretty;
}

[dir='rtl'] .lead {
  line-height: 1.74;
}

.hero .head-actions {
  justify-content: center;
  gap: 12px;
  margin-block-start: 6px;
}

.hero .head-actions .btn {
  height: 44px;
  min-width: 184px;
  padding-inline: 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}

.hero .head-actions .btn-ghost {
  background: var(--bg-field);
  border-color: var(--border);
}

.hero .head-actions .btn-ghost:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.hero-art,
.hero-mockup-container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  min-width: 0;
}

.hero-note {
  font-size: 12.5px;
  color: var(--text-faint);
  max-width: 36em;
  margin-inline: auto;
}

/* the product picture: the app's own editor, in miniature — a stage, a timeline of clips in the app's clip colors and
   a playhead. Pure CSS/SVG, no image request; `prefers-reduced-motion` stops the playhead. */
.hero-visual {
  margin: 0;
  min-width: 0;
}

.hv-window {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--bg-panel);
  box-shadow: var(--shadow-lg);
}

.hv-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding-inline: 12px;
  border-block-end: 1px solid var(--border);
  background: var(--bg-panel);
}

.hv-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-strong);
}

.hv-title {
  margin-inline-start: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}

.hv-body {
  display: flex;
  min-height: 250px;
}

.hv-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 24%;
  padding: 14px 12px;
  border-inline-end: 1px solid var(--border);
  background: var(--bg-panel);
}

.hv-line {
  height: 5px;
  border-radius: 2px;
  background: var(--bg-pressed);
  width: 60%;
}

.hv-line.is-long {
  width: 86%;
}

.hv-line.is-short {
  width: 38%;
}

.hv-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 10px;
  min-width: 0;
  background: var(--bg-app);
}

.hv-stage {
  position: relative;
  flex: 1;
  min-height: 116px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #000000;
  display: grid;
  place-items: center;
  overflow: hidden;
}

:root[data-theme='light'] .hv-stage {
  background: #ffffff;
}

.hv-stage-label {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-start: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
}

.hv-type {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
}

.hv-safe {
  position: absolute;
  inset: 12%;
  border: 1px dashed var(--border-strong);
  border-radius: 2px;
  opacity: 0.6;
}

/* the timeline is the app's: a container so the playhead can be animated with a transform (composited, never a
   layout read) in either direction */
.hv-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-block-start: 2px;
  container-type: inline-size;
}

.hv-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
}

.hv-ruler {
  display: flex;
  justify-content: space-between;
  height: 9px;
  align-items: flex-end;
}

.hv-ruler span {
  width: 1px;
  height: 4px;
  background: var(--border-strong);
}

.hv-ruler span:nth-child(3n + 1) {
  height: 8px;
}

.hv-track {
  position: relative;
  height: 16px;
  border-radius: 3px;
  background: var(--tl-lane);
}

.hv-track.is-tall {
  height: 22px;
}

.hv-clip {
  position: absolute;
  inset-block: 2px;
  border-radius: 3px;
  background: var(--bg-pressed);
}

.hv-clip.is-page {
  background: var(--clip-page);
}

.hv-clip.is-video {
  background: var(--clip-video);
}

.hv-clip.is-audio {
  background: var(--clip-audio);
}

.hv-clip.is-c1 {
  inset-inline-start: 8%;
  width: 26%;
}

.hv-clip.is-c2 {
  inset-inline-start: 36%;
  width: 14%;
}

.hv-clip.is-c3 {
  inset-inline-start: 52%;
  width: 22%;
}

.hv-clip.is-c4 {
  inset-inline-start: 76%;
  width: 16%;
}

.hv-playhead {
  position: absolute;
  inset-block: 12px 34px;
  inset-inline-start: 12%;
  width: 1px;
  background: var(--tl-playhead);
  animation: hv-sweep 7s var(--ease) infinite alternate;
}

.hv-playhead::before {
  content: '';
  position: absolute;
  inset-block-start: -3px;
  inset-inline-start: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tl-playhead);
}

@keyframes hv-sweep {
  from { transform: translateX(0); }
  to { transform: translateX(46cqw); }
}

[dir='rtl'] .hv-playhead {
  animation-name: hv-sweep-rtl;
}

@keyframes hv-sweep-rtl {
  from { transform: translateX(0); }
  to { transform: translateX(-46cqw); }
}

.hero-caption {
  margin-block-start: 10px;
  font-size: 12px;
  color: var(--text-faint);
  max-width: 46em;
}

/* ── page heads (the other pages) ─────────────────────────────────────────── */

.page-head {
  padding-block: clamp(48px, 6vw, 80px) clamp(28px, 3vw, 40px);
  text-align: center;
}

.page-head .shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 820px;
}

.page-head .display {
  font-size: clamp(28px, 3.8vw, 44px);
}

.page-head .lead {
  margin-block-start: 12px;
  margin-inline: auto;
}

.page-head .head-actions {
  margin-block-start: 22px;
  justify-content: center;
}

.page-head.is-compact {
  padding-block: clamp(28px, 3.5vw, 48px) 4px;
  text-align: start;
}

.page-head.is-compact .shell {
  align-items: flex-start;
  max-width: var(--content);
}

/* a dashboard's cards start close to their head: the page is a tool, not a landing page */
.page-head.is-compact + .section {
  padding-block-start: clamp(12px, 1.5vw, 20px);
}

.page-head + .section-plain {
  padding-block-start: clamp(16px, 2vw, 28px);
}

/* ── cards, steps, features (Flat 4-Sided Background-Blended & Symmetrical) ─ */

.seamless-card,
.bento-card,
.spotlight-card,
.card,
.plan-card,
.teaser-card,
.step,
.pack-card,
.checkout-note {
  background: var(--card-blend);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: none;
}

:root[data-theme='light'] :is(.seamless-card, .bento-card, .spotlight-card, .card, .plan-card, .teaser-card, .step, .pack-card, .checkout-note) {
  background: var(--card-blend);
  border: 1px solid var(--border);
  box-shadow: none;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  transition: border-color var(--mid) var(--ease), background var(--mid) var(--ease);
}

.card:hover {
  border-color: var(--border-strong);
}

.section-alt :is(.card, .bento-card, .spotlight-card, .plan-card, .teaser-card, .pack-card) {
  background: var(--bg-panel);
}

:root[data-theme='light'] .section-alt :is(.card, .bento-card, .spotlight-card, .plan-card, .teaser-card, .pack-card) {
  background: #FFFFFF;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-field);
  color: var(--text);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--text);
}

[dir='rtl'] .card-title {
  letter-spacing: 0 !important;
  line-height: 1.45;
}

.card-body {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.68;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-block-start: auto;
  padding-block-start: 8px;
}

.tag {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-field);
  color: var(--text-muted);
}

.step-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  padding-block-start: 24px;
  border-block-start: 1px solid var(--border);
}

.step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 26px;
  min-width: 0;
  transition: border-color var(--mid) var(--ease), background var(--mid) var(--ease);
}

.step:hover {
  border-color: var(--border-strong);
}

.section-alt .step {
  background: var(--bg-panel);
}

:root[data-theme='light'] .section-alt .step {
  background: #FFFFFF;
}

.step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding-inline: 10px;
  border-radius: 999px;
  background: var(--bg-field);
  color: var(--text);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.step-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.step-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text);
}

.step-body p {
  font-size: 13.5px;
  line-height: 1.68;
  color: var(--text-muted);
}

.step-note {
  font-size: 12px;
  color: var(--text-faint);
}

.point-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-block-start: 6px;
}

.point-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
}

.point-list .icon {
  color: var(--text-faint);
  margin-block-start: 3px;
}

.point-list.is-wide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 32px;
  max-width: 1000px;
}

/* the agents' board beside their copy */
.agent-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.94fr);
  gap: clamp(28px, 4.5vw, 64px);
  align-items: center;
}

.agent-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.agent-board {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-raised);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-card);
}

.agent-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-block-end: 10px;
  border-block-end: 1px solid var(--border);
  margin-block-end: 2px;
}

.agent-chip {
  font-size: 11px;
  font-weight: 500;
  border: 0;
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--bg-field);
  color: var(--text-muted);
}

.agent-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
}

.agent-line.is-quiet {
  color: var(--text-faint);
}

.agent-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

/* feature rows with an illustration */
.feature-stack {
  display: flex;
  flex-direction: column;
  gap: clamp(36px, 5vw, 72px);
}

.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

.feature-row.is-reverse .feature-copy {
  order: 2;
}

.feature-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.feature-title {
  font-size: clamp(19px, 2.3vw, 26px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

[dir='rtl'] .feature-title {
  letter-spacing: 0;
  line-height: 1.4;
}

.feature-lead {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

.feature-visual {
  display: grid;
  place-items: center;
  min-width: 0;
}

.visual-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-panel);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  overflow: hidden;
}

.visual-frame.has-illustration {
  color: var(--text);
  padding: 12%;
}

.visual-frame .illustration {
  display: grid;
  place-items: center;
  width: 100%;
}

.visual-frame .illustration svg {
  width: 100%;
  height: auto;
}

.visual-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.6;
  mask-image: radial-gradient(circle at 50% 50%, transparent 0, black 78%);
  pointer-events: none;
}

.visual-number {
  position: absolute;
  inset-block-end: 10px;
  inset-inline-end: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}

.manual-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-raised);
  box-shadow: var(--shadow-card);
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.manual-card-title {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-faint);
}

/* ── the plan catalog ─────────────────────────────────────────────────────── */

.billing-toggle {
  display: flex;
  width: fit-content;
  margin-inline: auto;
  gap: 0;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-panel);
  margin-block-end: 28px;
}

.billing-btn {
  height: auto;
  padding: 6px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}

.billing-btn:hover {
  color: var(--text);
}

.billing-btn.is-active {
  background: var(--bg-picked);
  color: var(--on-picked);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.plan-card {
  position: relative;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  transition: border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}

.plan-card:hover {
  border-color: var(--border-strong);
}

/* the featured plan gets a crisp monochrome elevated surface + subtle hairline */
.plan-card.is-featured,
.teaser-card.is-featured {
  border-color: var(--border-strong);
  background: var(--bg-raised);
}

:root[data-theme='light'] :is(.plan-card.is-featured, .teaser-card.is-featured) {
  border-color: var(--border-strong);
  background: #FFFFFF;
  box-shadow: var(--shadow-card);
}

.plan-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.plan-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.plan-badge {
  align-self: flex-start;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-pressed);
  color: var(--text-muted);
}

.plan-price {
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-wrap: wrap;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  margin-block-start: 4px;
}

.plan-per {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-faint);
  letter-spacing: 0;
}

.plan-note {
  font-size: 11.5px;
  color: var(--text-faint);
  min-height: 17px;
}

.plan-saving {
  display: inline-block;
  font-weight: 500;
  color: var(--text-muted);
}

.plan-lines {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-block: 2px;
  flex: 1;
}

.plan-lines li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}

.plan-lines .icon {
  margin-block-start: 2px;
  color: var(--ok);
}

.plan-btn {
  width: 100%;
  height: 36px;
  border-radius: var(--radius-button);
  font-size: 12.5px;
}

.billing-note {
  margin-block-start: 20px;
  font-size: 12.5px;
  color: var(--text-faint);
  text-align: center;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-panel);
}

.section-alt .table-wrap {
  background: var(--bg-raised);
}

.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 640px;
}

.compare th,
.compare td {
  text-align: start;
  padding: 9px 12px;
  border-block-end: 1px solid var(--border);
  vertical-align: middle;
}

.compare thead th {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-faint);
  background: var(--bg-field);
  position: sticky;
  inset-block-start: 0;
}

.compare thead th:not(:first-child) {
  text-align: center;
}

.compare tbody th {
  font-weight: 400;
  color: var(--text-muted);
  white-space: nowrap;
}

.compare td {
  color: var(--text-muted);
  text-align: center;
}

.compare tbody tr:last-child th,
.compare tbody tr:last-child td {
  border-block-end: 0;
}

.compare td.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--text);
}

/* the skills table is a document, not a comparison: its summary reads as body text */
.skills-table td {
  text-align: start;
  color: var(--text-muted);
  line-height: 1.6;
}

.skills-table th[scope='row'] {
  font-weight: 500;
  color: var(--text);
}

.checkout-note {
  margin-block-start: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-raised);
  max-width: 820px;
}

.checkout-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.checkout-note p {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-muted);
}

.teaser-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.teaser-card {
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.teaser-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.teaser-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.teaser-price {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.teaser-lines {
  margin-block: 4px 8px;
}

.teaser-btn {
  margin-block-start: auto;
  height: 36px;
  border-radius: 999px;
}

.teaser-line {
  font-size: 12.5px;
  color: var(--text-muted);
}

.teaser-actions {
  margin-block-start: 24px;
  display: flex;
  justify-content: center;
}

/* Quiet, minimal inline payment gateway trust strip (`Stripe · Moyasar ميسّر · Apple Pay · Tap · PayPal`) */
.gateway-trust-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-block-start: 28px;
  margin-inline: auto;
  max-width: 960px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-panel) 55%, transparent);
}

.gateway-trust-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.gateway-trust-label .icon {
  color: var(--text-muted);
}

.gateway-trust-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.gateway-trust-sep {
  color: var(--text-faint);
  font-size: 13px;
  opacity: 0.65;
  user-select: none;
}

.gateway-trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text-muted);
  transition: color var(--fast) var(--ease);
}

.gateway-trust-pill:hover {
  color: var(--text);
}

.gateway-trust-pill .icon {
  color: var(--text-faint);
}

.gateway-trust-pill strong {
  font-weight: 600;
  color: var(--text);
}

.gateway-trust-sub {
  color: var(--text-muted);
  font-size: 11px;
}

.pack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 960px;
  margin-inline: auto;
}

.pack-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.pack-credits {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.pack-price {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* FAQ: centered symmetrical hairline list (max-width: 760px) */
.faq {
  display: flex;
  flex-direction: column;
  border-block-start: 1px solid var(--border);
  max-width: 760px;
  width: 100%;
  margin-inline: auto;
}

.faq-item {
  border-block-end: 1px solid var(--border);
  padding-block: 18px;
}

.faq-item summary {
  cursor: pointer;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 16px;
  font-weight: 400;
  color: var(--text-faint);
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item p {
  margin-block-start: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 70ch;
}

.enterprise-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  background: var(--bg-raised);
  flex-wrap: wrap;
}

.enterprise-band .section-title {
  font-size: clamp(18px, 2vw, 24px);
}

/* ── learn ────────────────────────────────────────────────────────────────── */

.cmd-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 860px;
}

.cmd-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  background: var(--bg-panel);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cmd {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  overflow-x: auto;
  white-space: pre;
  text-align: start;
  direction: ltr;
  unicode-bidi: isolate;
}

.cmd-body {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
}

.cmd-copy {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-end: 8px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.cmd-copy:hover {
  background: var(--bg-hover);
  color: var(--text);
  border-color: var(--border);
}

.cmd-copy.is-copied {
  color: var(--accent);
}

.learn-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-block-start: 16px;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.skill-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}

.skill-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-hover);
}

.skill-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.skill-summary {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
}

.skill-icon {
  display: inline-flex;
  vertical-align: -3px;
  margin-inline-end: 6px;
  color: var(--text-faint);
}

.manual-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: clamp(28px, 4.5vw, 56px);
  align-items: start;
}

.manual-body {
  min-width: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
}

.manual-body h1 {
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-block: 0 14px;
}

.manual-body h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-block: 28px 8px;
}

.manual-body h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-block: 20px 6px;
}

.manual-body p,
.manual-body ul {
  margin-block: 0 10px;
}

.manual-body ul {
  padding-inline-start: 20px;
}

.manual-body li {
  margin-block-end: 4px;
}

.manual-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-field);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--text);
}

.manual-body pre.code {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  padding: 12px;
  overflow-x: auto;
  margin-block: 0 12px;
}

.manual-body pre.code code {
  background: none;
  padding: 0;
  white-space: pre;
}

.manual-body a {
  color: var(--text);
  border-block-end: 1px solid var(--border-strong);
}

.manual-body a:hover {
  border-block-end-color: var(--accent);
}

.manual-aside {
  position: sticky;
  inset-block-start: calc(var(--head) + 16px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aside-title {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-faint);
}

/* ── sign in ──────────────────────────────────────────────────────────────── */

.access-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.access-grid.is-small {
  margin-block-start: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.access-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-panel);
  min-width: 0;
}

.access-grid.is-small .access-card {
  padding: 16px;
}

.access-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.access-body {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
}

.access-note {
  font-size: 12px;
  color: var(--text-faint);
}

.access-label {
  margin-block-start: 4px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-faint);
}

.access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* an action inside a card is the app's compact button, never a stretched bar */
.access-card > .btn {
  align-self: flex-start;
}

/* ── the footer ───────────────────────────────────────────────────────────── */

.site-foot {
  border-block-start: 1px solid var(--border);
  padding-block: 40px 24px;
  background: var(--bg-app);
}

.site-foot-top {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr);
  gap: clamp(24px, 4vw, 56px);
  padding-block-end: 28px;
  border-block-end: 1px solid var(--border);
}

.site-foot-logo {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius);
  padding: 4px 6px;
  margin-inline-start: -6px;
}

.site-foot-logo:hover {
  background: var(--bg-hover);
}

.site-foot-logo .brand-word {
  font-size: 12px;
}

.site-foot-logo .brand-word-ar {
  font-size: 12.5px;
}

.site-foot-logo .brand-mark svg {
  width: 16px;
  height: 16px;
}

.site-foot-line {
  margin-block-start: 8px;
  font-size: 12px;
  color: var(--text-faint);
  max-width: 26em;
}

.site-foot-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.foot-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.foot-title {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-faint);
  margin-block-end: 2px;
}

.foot-col a {
  font-size: 13px;
  color: var(--text-muted);
  width: fit-content;
  border-radius: 4px;
  transition: color var(--fast) var(--ease);
}

.foot-col a:hover {
  color: var(--text);
}

.site-foot-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block-start: 18px;
  font-size: 12px;
  color: var(--text-faint);
  flex-wrap: wrap;
}

.site-foot-bottom p {
  max-width: 72ch;
}

.foot-top {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
  color: var(--text-muted);
}

.foot-top:hover {
  color: var(--text);
}

/* ── the dashboard and the admin: the app's settings pages, on the web ────── */

.source-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding-inline: 8px;
  border-radius: 999px;
  border: 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-pressed);
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-block-end: 12px;
}

.dash-grid:has(> :nth-child(2):last-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dash-card,
.dash-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px;
  background: var(--bg-panel);
  min-width: 0;
}

.dash-block {
  margin-block-end: 12px;
}

.dash-block-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-block-end: 10px;
}

.dash-label {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-faint);
  margin-block-end: 6px;
}

.dash-big {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.dash-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.dash-note {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-block-start: 4px;
}

.dash-note.is-quiet {
  color: var(--text-faint);
}

.facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin-block: 12px 4px;
  border-block-start: 1px solid var(--border);
}

.fact {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-block: 6px;
  border-block-end: 1px solid var(--border);
  font-size: 12px;
}

.fact dt {
  color: var(--text-muted);
}

.fact dd {
  margin: 0;
  font-weight: 500;
  color: var(--text);
  text-align: end;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.dash-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  border-block-start: 1px solid var(--border);
}

.dash-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 8px;
  border-block-end: 1px solid var(--border);
  min-width: 0;
}

.dash-row-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.dash-row-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  overflow-wrap: anywhere;
}

.dash-row-meta {
  font-size: 11px;
  color: var(--text-faint);
}

.empty-state {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
  background: var(--bg-panel);
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.empty-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.empty-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.empty-action {
  margin-block-start: 6px;
}

.admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-block-end: 12px;
  flex-wrap: wrap;
}

.inline-form {
  margin: 0;
}

.admin-gate {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-panel);
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-block-start: 4px;
}

.field-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.field {
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-button);
  background: transparent;
  color: var(--text);
  padding-inline: 12px;
  font-size: 13.5px;
  font-family: var(--font-sans);
  transition: border-color var(--fast) var(--ease);
}

.field:hover {
  border-color: var(--border-strong);
}

.field:focus-visible {
  outline: none;
  border-color: var(--text-muted);
}

.form-error {
  font-size: 12.5px;
  color: var(--err);
  border: 1px solid var(--err);
  border-radius: var(--radius-button);
  padding: 8px 10px;
  background: transparent;
}

.security-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-faint);
  margin-block-start: 16px;
}

/* ── 404 ──────────────────────────────────────────────────────────────────── */

.section-404 {
  min-height: 56vh;
  display: grid;
  align-items: center;
}

.not-found {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.not-found-code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
}

/* ── motion: the app's one language, and it stops when asked ──────────────── */

.js .reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
}

.js .reveal.is-in,
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* the theme button: the page is dark by default, so the sun (go light) shows until light is chosen */
.theme-moon {
  display: none;
}

[data-theme='light'] .theme-moon {
  display: block;
}

[data-theme='light'] .theme-sun {
  display: none;
}

/* ── Vercel / Next.js Architectural Grid, Bento Cards & Telemetry ─────────── */

.arch-frame {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-panel);
  padding: clamp(18px, 2.6vw, 32px);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.grid-cross {
  position: absolute;
  width: 11px;
  height: 11px;
  pointer-events: none;
  color: var(--text-faint);
  opacity: 0.65;
}

.grid-cross::before,
.grid-cross::after {
  content: '';
  position: absolute;
  background: currentColor;
}

.grid-cross::before {
  inset-block-start: 5px;
  inset-inline: 0;
  height: 1px;
}

.grid-cross::after {
  inset-inline-start: 5px;
  inset-block: 0;
  width: 1px;
}

.grid-cross-tl { inset-block-start: 8px; inset-inline-start: 8px; }
.grid-cross-tr { inset-block-start: 8px; inset-inline-end: 8px; }
.grid-cross-bl { inset-block-end: 8px; inset-inline-start: 8px; }
.grid-cross-br { inset-block-end: 8px; inset-inline-end: 8px; }

.pill-badge,
.release-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--mint-pill-border);
  background: var(--mint-pill);
  color: var(--mint-pill-text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.pill-mint {
  background: var(--mint-pill);
  color: var(--mint-pill-text);
  border-color: var(--mint-pill-border);
}

.pill-gold {
  background: var(--gold-soft);
  color: var(--gold);
  border-color: var(--gold-border);
}

.pill-outline {
  background: var(--bg-field);
  color: var(--text-muted);
  border-color: var(--border);
}

.metrics-strip {
  display: block;
  padding-block: 36px;
  border-block-end: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-panel) 50%, transparent);
  margin-block: 0;
}

.glass-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--bg-panel) 88%, transparent);
  backdrop-filter: blur(12px);
}

.stat-ticker {
  display: inline-block;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding-inline: 16px;
  border-inline-start: 1px solid var(--border);
  min-width: 0;
}

.metric-item:first-child {
  border-inline-start: 0;
}

.metric-value {
  font-size: clamp(24px, 2.5vw, 32px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.metric-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.bento-card,
.spotlight-card {
  grid-column: span 4;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 14px;
  padding: 30px;
  min-width: 0;
  transition: border-color var(--mid) var(--ease), background var(--mid) var(--ease);
}

.bento-card:hover,
.spotlight-card:hover {
  border-color: var(--border-strong);
}

.span-3, .col-span-3 { grid-column: span 3; }
.span-4, .col-span-4 { grid-column: span 4; }
.span-5, .col-span-5 { grid-column: span 5; }
.span-6, .col-span-6 { grid-column: span 6; }
.span-7, .col-span-7 { grid-column: span 7; }
.span-8, .col-span-8 { grid-column: span 8; }
.span-12, .col-span-12 { grid-column: span 12; }

.bento-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.bento-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.bento-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

.bento-body {
  font-size: 14.5px;
  line-height: 1.72;
  color: var(--text-muted);
}

.bento-visual {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  background: var(--bg-raised);
  padding: 14px;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
}

.bento-meta,
.bento-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-block-start: auto;
}

.bento-stat {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* ── 3D Hero Stage & 3D Aperture Visualizer Shells ────────────────────────── */

.hero-stage-shell,
.stage-3d-shell,
.stage-3d-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  background: var(--bg-panel);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  min-width: 0;
}

.stage-3d-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-block-end: 1px solid var(--border);
  background: var(--bg-raised);
  flex-wrap: wrap;
}

.stage-3d-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.stage-3d-tab,
[data-scene-select] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding-inline: 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.stage-3d-tab:hover,
[data-scene-select]:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.stage-3d-tab.is-active,
[data-scene-select].is-active {
  background: var(--bg-picked);
  color: var(--on-picked);
  border-color: var(--border-strong);
  font-weight: 600;
}

.stage-3d-viewport,
.engine-3d-viewport {
  position: relative;
  width: 100%;
  background: var(--bg-app);
  overflow: hidden;
}

.hero-3d-canvas,
canvas[data-hero-3d],
canvas[data-stage-3d] {
  display: block;
  width: 100%;
  height: clamp(270px, 34vw, 430px);
  max-width: 100%;
}

.stage-3d-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-block-start: 1px solid var(--border);
  background: var(--bg-raised);
  font-size: 12px;
  flex-wrap: wrap;
}

.stage-3d-prompt,
[data-scene-prompt] {
  color: var(--text-muted);
  font-size: 12px;
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}

.stage-3d-timecode,
[data-scene-timecode] {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
  padding: 2px 8px;
  border-radius: var(--radius);
  background: var(--bg-field);
  direction: ltr;
  unicode-bidi: isolate;
}

.engine-3d-shell {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.engine-3d-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px);
  align-items: center;
}

.engine-3d-tabs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.engine-tab,
[data-engine-tab],
[data-layer-tab] {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  text-align: start;
  padding: 20px 22px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--card-blend);
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}

:root[data-theme='light'] :is(.engine-tab, [data-engine-tab], [data-layer-tab]) {
  background: #FFFFFF;
}

.engine-tab:hover,
[data-engine-tab]:hover,
[data-layer-tab]:hover {
  border-color: var(--border-strong);
}

.engine-tab.is-active,
[data-engine-tab].is-active,
[data-layer-tab].is-active {
  border-color: var(--border-strong);
  border-inline-start: 2px solid var(--accent);
  background: var(--bg-panel);
}

:root[data-theme='light'] :is(.engine-tab.is-active, [data-engine-tab].is-active, [data-layer-tab].is-active) {
  border-color: var(--border-strong);
  border-inline-start: 2px solid var(--accent);
  background: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

.engine-tab-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.engine-tab-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.engine-tab-body {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-muted);
}

.engine-3d-visual {
  min-width: 0;
  width: 100%;
}

.arch-3d-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-panel);
  overflow: hidden;
  min-width: 0;
}

:root[data-theme='light'] .arch-3d-card {
  background: #FFFFFF;
}

.arch-3d-viewport {
  padding: 14px 14px 0;
  display: grid;
  place-items: center;
  min-width: 0;
}

.aperture-3d-canvas,
canvas[data-aperture-3d],
canvas[data-bezier-3d] {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-app);
}

.arch-3d-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 18px;
  flex-wrap: wrap;
}

.arch-3d-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-field);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 600;
}

.arch-3d-caption {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ── Interactive MasterFrame Studio Mockup (`studio-showcase.mjs`) ────────── */

.studio-mockup-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  min-width: 0;
}

.studio-mockup-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.studio-mockup-stages {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.mockup-stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding-inline: 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.mockup-stage-pill:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--bg-hover);
}

.mockup-stage-pill.is-active {
  background: var(--bg-picked);
  color: var(--on-picked);
  border-color: var(--border-strong);
  font-weight: 600;
}

.mockup-stage-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  opacity: 0.72;
}

.mockup-stage-pill.is-active .mockup-stage-num {
  opacity: 0.92;
  color: currentColor;
}

:root[data-theme='light'] .mockup-stage-pill.is-active .mockup-stage-num {
  color: currentColor;
}

.mockup-mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding-inline: 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-field);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color var(--fast) var(--ease), color var(--fast) var(--ease), background var(--fast) var(--ease);
}

.mockup-mode-pill:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.mockup-mode-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
  flex: 0 0 auto;
}

.mockup-mode-pill.is-auto {
  border-color: var(--border-strong);
  color: var(--text);
}

.mockup-mode-pill.is-auto .mockup-mode-dot {
  background: var(--accent);
}

.studio-mockup-window {
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  background: var(--bg-panel);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  min-width: 0;
}

:root[data-theme='light'] .studio-mockup-window {
  border-color: rgba(17, 20, 23, 0.085);
}

.studio-mockup-topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 8px 16px;
  border-block-end: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-raised) 65%, var(--bg-panel));
}

.mockup-window-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
}

.mockup-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
  opacity: 0.55;
}

.mockup-window-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  justify-self: center;
  min-width: 0;
}

.mockup-brand-icon {
  display: inline-flex;
  color: var(--brand-ink);
  flex: 0 0 auto;
}

.mockup-project-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mockup-project-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding-inline: 8px;
  border-radius: 999px;
  background: var(--bg-field);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.mockup-window-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
  min-width: 0;
}

.mockup-status-pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding-inline: 10px;
  border-radius: 999px;
  background: var(--mint-pill);
  border: 1px solid var(--mint-pill-border);
  color: var(--mint-pill-text);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.mockup-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding-inline: 12px;
  border-radius: 999px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--on-primary);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.mockup-export-btn:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* 3-Zone Symmetrical Studio Workspace: 240px Agent | 1fr 16:9 Stage | 240px Inspector */
.studio-mockup-workspace {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 240px;
  align-items: stretch;
  border-block-end: 1px solid var(--border);
  min-width: 0;
}

.studio-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--bg-panel);
  min-width: 0;
  text-align: start;
}

.studio-panel-agent {
  border-inline-end: 1px solid var(--border);
}

.studio-panel-inspector {
  border-inline-start: 1px solid var(--border);
}

.studio-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.studio-panel-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}

.studio-panel-title .icon {
  color: var(--text-muted);
}

.studio-panel-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding-inline: 7px;
  border-radius: 999px;
  background: var(--bg-field);
  border: 1px solid var(--border);
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
}

.mockup-prompt-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-app);
}

.mockup-prompt-text {
  font-size: 12.5px;
  line-height: 1.62;
  color: var(--text);
}

.mockup-prompt-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-block-start: 6px;
  border-block-start: 1px solid var(--border);
}

.mockup-prompt-status {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.mockup-control-block {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.mockup-control-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-faint);
}

.mockup-preset-group,
.mockup-accent-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mockup-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 27px;
  padding-inline: 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-field);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.mockup-chip:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.mockup-chip.is-active {
  background: var(--bg-picked);
  color: var(--on-picked);
  border-color: var(--border-strong);
  font-weight: 600;
}

.mockup-voice-strip {
  margin-block-start: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--bg-field);
  border: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text);
}

.mockup-voice-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}

.mockup-voice-label {
  min-width: 0;
  line-height: 1.4;
}

.studio-stage-viewport {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-app);
  min-width: 0;
}

.studio-canvas-wrap {
  position: relative;
  width: 100%;
  padding: 14px 14px 0;
  display: grid;
  place-items: center;
  min-width: 0;
}

.studio-stage-canvas.hero-3d-canvas,
canvas.studio-stage-canvas[data-hero-3d] {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: 440px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-app);
  cursor: grab;
  touch-action: none;
}

.studio-stage-canvas.hero-3d-canvas:active {
  cursor: grabbing;
}

.studio-stage-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px 12px;
  font-size: 12px;
  flex-wrap: wrap;
}

.mockup-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding-inline: 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.mockup-play-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.mockup-icon-pause:not([hidden]),
.mockup-icon-play:not([hidden]) {
  display: inline-flex;
  align-items: center;
  color: var(--text);
}

.mockup-timecode {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-field);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.mockup-timecode-sep {
  color: var(--text-faint);
}

.mockup-stage-hint {
  font-size: 11.5px;
  color: var(--text-faint);
  margin-inline-start: auto;
}

.mockup-prop-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mockup-prop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--bg-app);
  border: 1px solid var(--border);
  font-size: 11.5px;
}

.mockup-prop-key {
  color: var(--text-muted);
}

.mockup-prop-val {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Scrubbable Multi-Track SVG Timeline */
.studio-mockup-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px 14px;
  background: var(--bg-panel);
  min-width: 0;
}

.mockup-timeline-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  flex-wrap: wrap;
}

.mockup-track-tag {
  font-weight: 600;
  color: var(--text);
}

.mockup-timeline-stage {
  color: var(--text-muted);
  font-size: 12px;
}

.mockup-timeline-svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: ew-resize;
  user-select: none;
  touch-action: none;
}

.tl-bg {
  fill: #090A0B;
}

.tl-sidebar-bg {
  fill: #101214;
}

:root[data-theme='light'] .tl-bg {
  fill: #FAFAFC;
}

:root[data-theme='light'] .tl-sidebar-bg {
  fill: #F3F4F6;
}

.tl-divider {
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 1;
}

:root[data-theme='light'] .tl-divider {
  stroke: rgba(17, 20, 23, 0.08);
}

.tl-tick {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1;
}

.tl-tick.is-major {
  stroke: rgba(255, 255, 255, 0.24);
}

:root[data-theme='light'] .tl-tick {
  stroke: rgba(17, 20, 23, 0.12);
}

:root[data-theme='light'] .tl-tick.is-major {
  stroke: rgba(17, 20, 23, 0.24);
}

.tl-ruler-text {
  fill: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
}

.tl-stage-highlight {
  fill: rgba(255, 255, 255, 0.038);
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 1;
  transition: x 240ms var(--ease), width 240ms var(--ease);
}

:root[data-theme='light'] .tl-stage-highlight {
  fill: rgba(17, 20, 23, 0.035);
  stroke: rgba(17, 20, 23, 0.14);
}

.tl-track-label {
  fill: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
}

.tl-clip-primary {
  fill: rgba(255, 255, 255, 0.085);
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 1;
}

.tl-clip-emerald {
  fill: rgba(255, 255, 255, 0.07);
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 1;
}

.tl-clip-gold {
  fill: rgba(226, 186, 90, 0.16);
  stroke: rgba(226, 186, 90, 0.36);
  stroke-width: 1;
}

.tl-clip-secondary {
  fill: rgba(255, 255, 255, 0.052);
  stroke: rgba(255, 255, 255, 0.13);
  stroke-width: 1;
}

.tl-clip-audio {
  fill: rgba(82, 158, 136, 0.10);
  stroke: rgba(82, 158, 136, 0.26);
  stroke-width: 1;
}

:root[data-theme='light'] .tl-clip-primary {
  fill: #ECEEF2;
  stroke: rgba(17, 20, 23, 0.16);
}

:root[data-theme='light'] .tl-clip-emerald {
  fill: #F1F3F6;
  stroke: rgba(17, 20, 23, 0.14);
}

:root[data-theme='light'] .tl-clip-gold {
  fill: #FDF6E4;
  stroke: rgba(184, 134, 11, 0.30);
}

:root[data-theme='light'] .tl-clip-secondary {
  fill: #F3F4F6;
  stroke: rgba(17, 20, 23, 0.12);
}

:root[data-theme='light'] .tl-clip-audio {
  fill: rgba(56, 152, 130, 0.08);
  stroke: rgba(56, 152, 130, 0.24);
}

.tl-clip-text {
  fill: #F4F6F5;
  font-size: 10.5px;
  font-weight: 600;
  pointer-events: none;
}

:root[data-theme='light'] .tl-clip-text {
  fill: #111417;
}

.tl-keyframe {
  fill: var(--text);
}

.tl-wave-bar {
  fill: var(--accent);
  opacity: 0.58;
}

.tl-playhead-cap {
  fill: var(--tl-playhead);
}

.tl-playhead-line {
  stroke: var(--tl-playhead);
  stroke-width: 1.5;
}

.tl-playhead-dot {
  fill: var(--tl-playhead);
  stroke: var(--bg-panel);
  stroke-width: 1.5;
}

/* ── Gold Shimmer Tier Accents & Plan Emblems (Pro / Studio / Creator) ────── */

.plan-emblem {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-field);
  color: var(--text);
  border: 1px solid var(--border);
  margin-block-end: 4px;
}

.emblem-mint,
.tier-free .plan-emblem {
  background: var(--bg-field);
  color: var(--text-muted);
  border-color: var(--border);
}

.emblem-gold,
.tier-pro .plan-emblem,
.tier-studio .plan-emblem {
  background: var(--gold-soft);
  color: var(--gold);
  border-color: var(--gold-border);
}

.plan-card.tier-pro,
.plan-card.is-featured {
  border-color: var(--border-strong);
  box-shadow: none;
}

.plan-card.tier-studio {
  border-color: var(--gold-border);
  background: var(--bg-panel);
}

:root[data-theme='light'] .plan-card.tier-studio {
  background: #FFFFFF;
}

.btn-mint {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.btn-mint:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--on-primary);
}

.btn-block {
  width: 100%;
}

/* ── Auth, OAuth 2.0 & Desktop PKCE Connect (`/sign-in`, `/register`, `/account/connect`) ── */

.auth-shell {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.auth-card,
.connect-device-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-panel);
  padding: clamp(20px, 3vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-card);
  min-width: 0;
}

.auth-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-button);
  background: var(--bg-field);
  border: 1px solid var(--border);
}

.auth-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  border-radius: var(--radius);
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

.auth-tab.is-active {
  background: var(--bg-panel);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.oauth-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.oauth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 42px;
  padding-inline: 16px;
  border-radius: var(--radius-button);
  border: 1px solid var(--border-strong);
  background: var(--bg-raised);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}

.oauth-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.oauth-google {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

.oauth-google:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--on-primary);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-faint);
  font-size: 12px;
  margin-block: 4px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field-hint {
  font-size: 11.5px;
  color: var(--text-faint);
}

select.field,
textarea.field {
  font-family: var(--font-sans);
  padding-block: 8px;
}

textarea.field {
  min-height: 76px;
  height: auto;
  resize: vertical;
}

.notice-banner,
.announcement-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-button);
  border: 1px solid var(--border-strong);
  background: var(--bg-raised);
  color: var(--text);
  font-size: 13px;
  margin-block-end: 14px;
  flex-wrap: wrap;
}

.notice-ok {
  border-color: var(--mint-pill-border);
  background: var(--mint-pill);
  color: var(--text);
}

.notice-warn {
  border-color: var(--warn);
  background: rgba(240, 176, 60, 0.10);
  color: var(--warn);
}

.notice-err {
  border-color: var(--err);
  background: rgba(242, 102, 95, 0.10);
  color: var(--err);
}

.connect-device-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-button);
  background: var(--bg-field);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text);
  width: fit-content;
}

.connect-device-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: var(--radius-button);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  font-size: 12.5px;
}

.connect-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-block-start: 6px;
}

/* ── Creator Dashboard & Executive Admin Control Center (`/dashboard`, `/admin`) ── */

.user-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-panel);
  margin-block-end: 16px;
  flex-wrap: wrap;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-picked);
  color: var(--on-picked);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
  flex: 0 0 auto;
  border: 1px solid var(--border-strong);
  overflow: hidden;
}

.user-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.user-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
}

.user-email {
  font-size: 12px;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-block-end: 16px;
}

.kpi-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px;
  background: var(--bg-panel);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.kpi-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.kpi-value {
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.kpi-delta,
.kpi-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-block-end: 12px;
  margin-block-end: 16px;
  border-block-end: 1px solid var(--border);
}

.admin-tab {
  height: 32px;
  padding-inline: 12px;
  border-radius: var(--radius-button);
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}

.admin-tab:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.admin-tab.is-active {
  background: var(--bg-picked);
  color: var(--on-picked);
  border-color: var(--border-strong);
  font-weight: 600;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 620px;
}

.data-table th,
.data-table td {
  text-align: start;
  padding: 10px 12px;
  border-block-end: 1px solid var(--border);
  vertical-align: middle;
}

.data-table thead th {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-faint);
  background: var(--bg-field);
}

.status-pill,
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-field);
  color: var(--text-muted);
}

.status-active,
.role-admin {
  background: var(--mint-pill);
  color: var(--mint-pill-text);
  border-color: var(--mint-pill-border);
}

.status-suspended,
.status-revoked {
  background: rgba(242, 102, 95, 0.12);
  color: var(--err);
  border-color: var(--err);
}

.settings-grid,
.plan-switch-grid,
.topup-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.settings-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px;
  background: var(--bg-panel);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.svg-meter {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-block: 8px;
}

.meter-ring {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
}

.meter-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--bg-field);
  overflow: hidden;
  margin-block: 8px;
}

.meter-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--text);
}

.chart-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px;
  background: var(--bg-panel);
  margin-block-end: 14px;
  min-width: 0;
}

.chart-svg {
  width: 100%;
  height: auto;
  max-height: 180px;
  display: block;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  margin-block-start: 8px;
}

.device-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.device-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-button);
  background: var(--bg-raised);
  flex-wrap: wrap;
}

.device-key {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  direction: ltr;
  unicode-bidi: isolate;
}

.brand-glyph {
  display: block;
  color: currentColor;
}

.site-foot-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.ledger td.num {
  font-family: var(--font-mono);
}

.section-cta {
  background: transparent;
}

.cta-band {
  position: relative;
  max-width: 820px;
  margin-inline: auto;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: clamp(36px, 5vw, 56px);
  background: var(--bg-panel);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  box-shadow: none;
  overflow: hidden;
}

:root[data-theme='light'] .cta-band {
  background: #FAFAFC;
}

.cta-title {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
  text-wrap: balance;
}

.cta-lead {
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.72;
  color: var(--text-muted);
  max-width: 58ch;
  margin-inline: auto;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  align-items: center;
  margin-block-start: 8px;
}

/* ── Aria Icons System (16 / 20 / 24 / 32) ───────────────────────────────── */

.aria-icon {
  display: inline-block;
  vertical-align: middle;
  flex: 0 0 auto;
  color: currentColor;
}

.icon-16 { width: 16px; height: 16px; }
.icon-20 { width: 20px; height: 20px; }
.icon-24 { width: 24px; height: 24px; }
.icon-32 { width: 32px; height: 32px; }

/* ── CMS Layer Blocks & Live Studio Selection Highlights ─────────────────── */

.cms-layer-block,
[data-cms-layer-id] {
  position: relative;
  transition: outline-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}

[data-studio-preview] [data-cms-layer-id]:hover {
  outline: 1px dashed var(--accent);
  outline-offset: -1px;
  cursor: pointer;
}

[data-cms-layer-id][data-cms-selected='true'] {
  outline: 2px solid var(--accent) !important;
  outline-offset: -2px;
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

/* Surface & padding modifiers for CMS blocks (both `surface-*` and `cms-surface-*` aliases) */
.cms-surface-charcoal-elevated,
.surface-charcoal-elevated { background: var(--bg-raised); }
.cms-surface-mint-soft,
.surface-mint-soft { background: var(--mint-wash); }
.cms-surface-glass,
.surface-glass { background: color-mix(in srgb, var(--bg-panel) 84%, transparent); backdrop-filter: blur(12px); }
.cms-surface-spotlight,
.surface-spotlight { background: linear-gradient(180deg, var(--mint-wash) 0%, var(--bg-panel) 65%); }

.cms-pad-compact,
.pad-compact { padding-block: clamp(24px, 3vw, 40px); }
.cms-pad-normal,
.pad-normal { padding-block: clamp(44px, 5.5vw, 76px); }
.cms-pad-spacious,
.pad-spacious { padding-block: clamp(64px, 8vw, 112px); }
.cms-pad-hero,
.pad-hero { padding-block: clamp(56px, 7vw, 96px); }

.cms-align-start,
.align-start { text-align: start; }
.cms-align-center,
.align-center { text-align: center; }
.cms-align-center .section-head,
.align-center .section-head { margin-inline: auto; align-items: center; }
.cms-align-end,
.align-end { text-align: end; }

/* ── MUIcn Component Family Blocks ───────────────────────────────────────── */

section.muicn-card-grid,
section.muicn-tabs-showcase,
section.muicn-accordion-group,
section.muicn-stats-progress,
section.muicn-testimonial-wall,
section.muicn-form-lead,
section.muicn-button-bar,
section.muicn-badge-strip,
section.muicn-data-table,
header.muicn-breadcrumb-header {
  display: block;
}

.muicn-alert-callout:not(section) {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-strong);
  background: var(--mint-wash);
  color: var(--text);
}

.muicn-divider-spacer {
  padding-block: 16px;
}

.muicn-divider-spacer hr {
  height: 1px;
  background: var(--border);
  margin: 0;
  border: 0;
}

/* ── Payment Gateways & Checkout (`/admin`, `/checkout/start`) ───────────── */

.gateway-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-block: 12px;
}

.gateway-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px;
  background: var(--bg-panel);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.gateway-card.is-active {
  border-color: var(--border-strong);
  background: var(--bg-raised);
}

.gateway-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gateway-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-field);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.studio-launch-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-strong);
  background: var(--bg-raised);
  margin-block-end: 16px;
  flex-wrap: wrap;
}

.checkout-shell {
  max-width: 640px;
  margin-inline: auto;
}

/* ── Legal & Security Pages (`/privacy`, `/terms`) ───────────────────────── */

.legal-prose {
  max-width: 820px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text-muted);
}

.legal-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  background: var(--card-blend);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.legal-card p {
  margin: 0;
}

.legal-card code,
.card-body code,
.point-list code,
.faq-body code {
  overflow-wrap: anywhere;
}

.legal-card h2,
.legal-prose h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

/* the read-only textarea the copy fallback uses: on the page, never seen */
.copy-area {
  position: fixed;
  inset-block-start: 0;
  inset-inline-start: -9999px;
  opacity: 0;
}

/* ── Additional Component, Stage, Plan & CMS Preview Helpers ────────────── */

.no-js .reveal {
  opacity: 1;
  transform: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.oauth-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.oauth-github {
  border-color: var(--border);
}

.plan-mark-pro,
.plan-mark-studio,
.plan-mark-enterprise,
.plan-mark-free,
.emblem-silver {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--text-muted);
  flex-shrink: 0;
}

.plan-mark-pro,
.plan-mark-studio {
  border-color: var(--gold-border);
  background: var(--gold-soft);
  color: var(--gold);
}

.emblem-silver,
.plan-mark-enterprise {
  border-color: var(--border-strong);
  color: var(--text);
}

.plan-title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.plan-desc {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0;
}

.plan-checkout-form,
.pack-checkout-form {
  margin-block-start: auto;
  padding-block-start: 10px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-checkout-form .btn,
.pack-checkout-form .btn {
  width: 100%;
  justify-content: center;
}

.hv-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stage-3d-badges {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stage-3d-prompt-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-block-start: 1px solid var(--border);
  background: var(--bg-raised);
  flex-wrap: wrap;
}

.stage-3d-prompt-text {
  font-size: 12.5px;
  color: var(--text);
  font-weight: 500;
}

.stage-3d-layers {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.engine-tab-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
}

.engine-tab-code {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  width: fit-content;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metric-detail {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.hero-pill-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

table.muicn-data-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--bg-panel);
}

.is-studio-preview {
  position: relative;
}

.bento-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.connect-permissions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-raised);
  font-size: 12.5px;
  color: var(--text-muted);
}

.studio-preview-stage-root,
.cms-published-layers {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

[data-cms-layer-id][data-surface="charcoal-elevated"],
[data-cms-layer-id][data-surface="panel"] {
  background: var(--bg-panel);
}

[data-cms-layer-id][data-surface="mint-wash"] {
  background: var(--accent-soft);
}

[data-cms-layer-id][data-padding="compact"] {
  padding-block: 36px;
}

[data-cms-layer-id][data-padding="spacious"],
[data-cms-layer-id][data-padding="hero"] {
  padding-block: 88px;
}

[data-cms-layer-id][data-align="center"] {
  text-align: center;
}

[data-cms-layer-id][data-align="end"] {
  text-align: end;
}

/* ── Header Notification Bell, Developers Hub, Community, Profiles & Vault ── */

.head-bell-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  min-width: 30px;
  padding-inline: 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.head-bell-link:hover {
  color: var(--text);
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.head-bell-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding-inline: 5px;
  border-radius: 999px;
  background: var(--mint-pill);
  border: 1px solid var(--mint-pill-border);
  color: var(--mint-pill-text);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1;
}

.head-bell-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}

.checkout-gateway-select {
  height: 34px;
  font-size: 12px;
  padding-inline: 10px;
  padding-block: 4px;
  border-radius: var(--radius-button);
  border: 1px solid var(--border);
  background: var(--bg-field);
  color: var(--text-muted);
  width: 100%;
}

.checkout-gateway-select:hover,
.checkout-gateway-select:focus-visible {
  color: var(--text);
  border-color: var(--border-strong);
}

.plan-points-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-field);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 600;
}

.dev-cli-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.dev-code-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.dev-code-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-panel);
  overflow: hidden;
  min-width: 0;
}

.dev-code-card > .card-body {
  padding: 0 16px 16px;
  margin: 0;
}

.dev-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-block-end: 1px solid var(--border);
  background: var(--bg-raised);
}

.dev-code-head .cmd-copy {
  position: static;
  inset: auto;
  flex-shrink: 0;
}

.dev-code-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
}

.dev-code-pre,
.dev-pre {
  margin: 0;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.62;
  color: var(--text);
  overflow-x: auto;
  white-space: pre;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: start;
  flex: 1;
}

.dev-endpoint-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-field);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
  direction: ltr;
  unicode-bidi: isolate;
}

.dev-points-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--mint-pill);
  border: 1px solid var(--mint-pill-border);
  color: var(--mint-pill-text);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* Creator Community & Public Profiles (`/community`, `/u/:handle`) */
.community-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-block-end: 24px;
}

.community-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-block-end: 24px;
}

.community-filter-pill,
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding-inline: 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.community-filter-pill:hover,
.filter-pill:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.community-filter-pill.is-active,
.filter-pill.is-active {
  background: var(--bg-picked);
  color: var(--on-picked);
  border-color: var(--border-strong);
  font-weight: 600;
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

.community-card,
.community-work-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--card-blend);
  overflow: hidden;
  min-width: 0;
  transition: border-color var(--mid) var(--ease);
}

:root[data-theme='light'] .section-alt .community-card,
:root[data-theme='light'] .section-alt .community-work-card {
  background: #FFFFFF;
}

.community-card:hover,
.community-work-card:hover {
  border-color: var(--border-strong);
}

.community-preview,
.community-preview-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.045), transparent 72%), var(--bg-raised);
  border-block-end: 1px solid var(--border);
  overflow: hidden;
}

:root[data-theme='light'] .community-preview,
:root[data-theme='light'] .community-preview-frame {
  background: radial-gradient(circle at 50% 35%, rgba(17, 20, 23, 0.035), transparent 72%), #F4F5F8;
}

.community-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.community-aspect-badge,
.community-preview-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
}

.community-preview-center,
.community-preview-mark {
  display: grid;
  place-items: center;
  color: var(--text-muted);
  opacity: 0.72;
}

.community-body,
.community-work-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.community-creator-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.community-creator-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  text-decoration: none;
}

.community-creator-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  font-size: 12.5px;
  line-height: 1.35;
}

.community-creator-name {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
}

.community-avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-picked);
  color: var(--on-picked);
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 700;
  flex-shrink: 0;
}

.community-handle {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  direction: ltr;
  unicode-bidi: isolate;
}

.community-actions,
.community-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-block-start: 12px;
  margin-block-start: auto;
  border-block-start: 1px solid var(--border);
  flex-wrap: wrap;
}

.community-stat-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.community-stat-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding-inline: 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-field);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}

.community-stat-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--bg-hover);
}

.community-comments,
.community-comments-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-block-start: 10px;
  border-block-start: 1px solid var(--border);
}

.community-comment-row,
.community-comment-line {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-muted);
}

.community-comment-form {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.community-comment-form .field {
  flex: 1;
  height: 34px;
  font-size: 12.5px;
  min-width: 0;
}

.community-composer {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-panel);
  padding: 22px;
  margin-block-end: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-panel);
  padding: clamp(22px, 3.2vw, 34px);
  margin-block-end: 28px;
}

.profile-identity {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
}

.profile-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-picked);
  color: var(--on-picked);
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-meta-stack,
.profile-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.profile-stats-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-block-start: 6px;
}

.profile-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-size: 13px;
  color: var(--text-muted);
}

.profile-stat strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.profile-actions-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-raised);
  padding: 18px;
  min-width: 0;
}

/* Notifications Center & Claimable Gift Points */
.notif-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notif-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-panel);
  flex-wrap: wrap;
  min-width: 0;
}

.notif-card.is-unread {
  border-color: var(--border-strong);
  border-inline-start: 2px solid var(--accent);
}

.notif-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 220px;
}

.notif-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.notif-kind-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-field);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.notif-kind-gift {
  background: var(--mint-pill);
  border-color: var(--mint-pill-border);
  color: var(--mint-pill-text);
}

.notif-kind-offer {
  background: var(--gold-soft);
  border-color: var(--gold-border);
  color: var(--gold);
}

.notif-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* API Key Secret Reveal, Creator Memory Forms, Payment Gateways Showcase & Admin Provider Vault */
.apikey-secret-banner,
.secret-key-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-card);
  border: 1px solid var(--mint-pill-border);
  background: var(--mint-pill);
  margin-block: 10px;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

#admin-providers .memory-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.gateway-showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  margin-block-end: 24px;
}

.gateway-showcase-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--card-blend);
  min-width: 0;
  transition: border-color var(--mid) var(--ease);
}

:root[data-theme='light'] .section-alt .gateway-showcase-card {
  background: #FFFFFF;
}

.gateway-showcase-card:hover {
  border-color: var(--border-strong);
}

.gateway-showcase-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.apikey-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-button);
  border: 1px solid var(--border);
  background: var(--bg-app);
  flex-wrap: wrap;
}

.apikey-code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  overflow-wrap: anywhere;
  direction: ltr;
  unicode-bidi: isolate;
}

.vault-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-block: 12px;
}

.rate-matrix-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-block: 12px;
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-block: 12px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  /* the brand is then simply there, as the app's reduced-motion block says */
  .brand-lockup .brand-mark,
  .brand-lockup .brand-word,
  .brand-lockup .brand-word-ar,
  .brand-lockup .brand-mark-idle,
  .brand-lockup .brand-mark-settle {
    animation: none !important;
    transition: none !important;
  }
  .brand-lockup .brand-mark-settle,
  .brand-lockup:hover .brand-mark-settle {
    transform: none !important;
  }
  .hv-playhead {
    animation: none;
    inset-inline-start: 40%;
    transform: none;
  }
}

/* ── responsive: 1440px, 1024px, 768px, 390px (zero horizontal overflow) ──── */

@media (max-width: 1140px) {
  .site-head-inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
  }
  .site-nav {
    gap: 14px;
  }
  .head-signin-link {
    display: none;
  }
  .plan-grid,
  .teaser-grid,
  .step-list,
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dash-grid,
  .settings-grid,
  .plan-switch-grid,
  .topup-grid,
  .card-grid,
  .skill-grid,
  .gateway-grid,
  .gateway-showcase-grid,
  .dev-code-grid,
  .community-grid,
  .rate-matrix-grid,
  #admin-providers .memory-grid,
  .telemetry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bento-card,
  .spotlight-card,
  .span-3, .col-span-3,
  .span-4, .col-span-4,
  .span-5, .col-span-5,
  .span-6, .col-span-6,
  .span-7, .col-span-7,
  .span-8, .col-span-8 {
    grid-column: span 6;
  }
  .span-12, .col-span-12 {
    grid-column: span 12;
  }
}

@media (max-width: 1040px) {
  .studio-mockup-workspace {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .studio-stage-viewport {
    grid-column: 1 / -1;
    order: -1;
    border-block-end: 1px solid var(--border);
  }
  .studio-panel-inspector {
    border-inline-start: 0;
  }
  .mockup-status-pill {
    display: none;
  }
}

@media (max-width: 960px) {
  :root {
    --gutter: 20px;
    --head: 58px;
  }
  .site-head-inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .site-nav {
    display: none;
    position: fixed;
    inset-block-start: var(--head);
    inset-inline: 0;
    z-index: 49;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px var(--gutter) 18px;
    background: color-mix(in srgb, var(--bg-panel) 96%, var(--bg-app));
    backdrop-filter: blur(18px);
    border-block-end: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    height: auto;
    max-height: calc(100vh - var(--head));
    overflow-y: auto;
  }
  .site-head[data-nav-open] .site-nav {
    display: flex;
  }
  .site-nav .nav-link {
    padding-block: 11px;
    padding-inline: 12px;
    border-radius: 10px;
    border-block-end: 0;
    font-size: 14.5px;
  }
  .site-nav .nav-link.is-current {
    background: var(--bg-field);
    color: var(--text);
    border-inline-start: 2px solid var(--accent);
  }
  .nav-open {
    display: grid;
  }
  .head-cta {
    display: none;
  }
  .engine-3d-split,
  .feature-row,
  .feature-row.is-reverse,
  .agent-split,
  .manual-layout,
  .site-foot-top,
  .auth-shell,
  .profile-hero-card {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature-row.is-reverse .feature-copy {
    order: 0;
  }
  .manual-aside {
    position: static;
  }
  .site-foot-cols,
  .metrics-grid,
  .cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric-item:nth-child(odd) {
    border-inline-start: 0;
    padding-inline-start: 0;
  }
  .gateway-trust-strip {
    border-radius: 20px;
    padding: 14px 18px;
  }
}

@media (max-width: 680px) {
  .studio-mockup-toolbar {
    gap: 8px;
  }
  .studio-mockup-stages {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    padding-block-end: 2px;
    scrollbar-width: none;
  }
  .studio-mockup-stages::-webkit-scrollbar {
    display: none;
  }
  .studio-mockup-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-inline: 12px;
  }
  .mockup-window-dots,
  .mockup-project-badge,
  .mockup-stage-hint {
    display: none;
  }
  .mockup-window-brand {
    justify-self: start;
  }
  .studio-mockup-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .studio-panel-agent {
    border-inline-end: 0;
    border-block-end: 1px solid var(--border);
  }
  .studio-mockup-timeline {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .mockup-timeline-svg {
    min-width: 620px;
  }
  .step-list,
  .point-list.is-wide,
  .auth-grid,
  .field-row,
  .plan-grid,
  .teaser-grid,
  .pack-grid,
  .kpi-grid,
  .settings-grid,
  .plan-switch-grid,
  .topup-grid,
  .bento-grid,
  .access-grid,
  .access-grid.is-small,
  .dash-grid,
  .card-grid,
  .skill-grid,
  .gateway-grid,
  .gateway-showcase-grid,
  .dev-cli-grid,
  .dev-code-grid,
  .community-grid,
  .memory-grid,
  #admin-providers .memory-grid,
  .vault-grid,
  .rate-matrix-grid,
  .telemetry-grid,
  .metrics-grid,
  .cols-2,
  .cols-3 {
    grid-template-columns: minmax(0, 1fr);
  }
  .bento-card,
  .spotlight-card,
  .span-3, .col-span-3,
  .span-4, .col-span-4,
  .span-5, .col-span-5,
  .span-6, .col-span-6,
  .span-7, .col-span-7,
  .span-8, .col-span-8,
  .span-12, .col-span-12 {
    grid-column: 1 / -1;
  }
  .metric-item {
    border-inline-start: 0;
    padding-inline: 0;
    border-block-start: 1px solid var(--border);
    padding-block-start: 14px;
  }
  .metric-item:first-child {
    border-block-start: 0;
    padding-block-start: 0;
  }
  .compare,
  .data-table {
    min-width: 520px;
  }
  .display {
    font-size: clamp(27px, 7.2vw, 38px);
  }
}

@media (max-width: 480px) {
  :root {
    --gutter: 16px;
  }
  .site-head-tools {
    gap: 4px;
  }
  .site-head-tools .lang-link {
    padding-inline: 8px;
  }
  .head-signin-link {
    padding-inline: 6px;
    font-size: 12.5px;
  }
  .hero {
    padding-block: 0 36px;
  }
  .hero-copy,
  .hero-centered {
    padding-block: 32px 24px;
  }
  .hero .head-actions .btn {
    width: 100%;
    max-width: 320px;
  }
  .section {
    padding-block: 52px;
  }
  .card,
  .bento-card,
  .spotlight-card,
  .plan-card,
  .teaser-card,
  .step,
  .pack-card,
  .access-card,
  .auth-card,
  .connect-device-card,
  .dash-card,
  .dash-block,
  .empty-state,
  .admin-gate {
    padding: 20px;
  }
  .hv-body {
    min-height: 200px;
  }
  .hero-3d-canvas:not(.studio-stage-canvas),
  canvas[data-stage-3d] {
    height: 220px;
  }
  .studio-canvas-wrap {
    padding: 10px 10px 0;
  }
  .studio-stage-hud {
    padding: 8px 10px 10px;
  }
  .studio-mockup-timeline {
    padding: 10px 10px 12px;
  }
  .site-foot-cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .site-foot-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── print: the words matter, not the chrome ─────────────────────────────── */

@media print {
  .site-head,
  .site-foot,
  .hero-art,
  .billing-toggle,
  .cta-band,
  .skip {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
