:root {
  color-scheme: light;
  --bg: #f9f9ff;
  --bg-soft: #f0f3ff;
  --panel: #ffffff;
  --panel-2: #f0f3ff;
  --text: #111c2d;
  --muted: #464554;
  --muted-2: #767586;
  --line: #e2e8f0;
  --line-strong: #c7c4d7;
  --primary: #4648d4;
  --primary-dark: #2f2ebe;
  --primary-soft: #e1e0ff;
  --accent: #39b8fd;
  --secondary: #006591;
  --inverse: #263143;
  --good: #059669;
  --warn: #d97706;
  --bad: #dc2626;
  --canvas: #e7eeff;
  --shadow: 0 18px 42px rgba(30, 41, 59, 0.08);
  --shadow-soft: 0 10px 25px -5px rgba(30, 41, 59, 0.07);
  --radius: 16px;
}

@font-face {
  font-family: 'Inter';
  src: url('/dashboard/assets/fonts/Inter-Regular.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'AbrilFatface';
  src: url('/dashboard/assets/fonts/AbrilFatface-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Abril Fatface';
  src: url('/dashboard/assets/fonts/AbrilFatface-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Merriweather';
  src: url('/dashboard/assets/fonts/Merriweather-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'LibreBaskerville';
  src: url('/dashboard/assets/fonts/LibreBaskerville-Bold.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Libre Baskerville';
  src: url('/dashboard/assets/fonts/LibreBaskerville-Bold.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 84% -10%, rgba(192, 193, 255, 0.5), transparent 28rem),
    radial-gradient(circle at -10% 100%, rgba(137, 206, 255, 0.35), transparent 28rem),
    linear-gradient(180deg, #fff, var(--bg));
}

button, input, textarea, select { font: inherit; }
button {
  border: 0;
  border-radius: 12px;
  min-height: 42px;
  padding: 0.75rem 1rem;
  color: #fff;
  background: var(--primary);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(70, 72, 212, 0.16);
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease, border-color 120ms ease;
}
button:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(70, 72, 212, 0.2); }
button:active { transform: translateY(0) scale(0.99); }
button:disabled { cursor: not-allowed; opacity: 0.5; transform: none; }
button.secondary, button.ghost, button.danger, button.icon-button, button.tool-button, button.nav-item, button.tab-button, button.segment-button, button.link-button, button.auth-hero-button {
  box-shadow: none;
}
button.secondary {
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
}
button.ghost, button.icon-button, button.tool-button, button.nav-item, button.tab-button, button.segment-button {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
}
button.danger {
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #dc2626);
}
button.link-button {
  min-height: 0;
  padding: 0;
  color: var(--primary-dark);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-weight: 850;
}
button.link-button:hover { transform: none; box-shadow: none; text-decoration: underline; }
button.small { min-height: 34px; padding: 0.5rem 0.75rem; font-size: 0.88rem; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  min-height: 42px;
  padding: 0.72rem 0.85rem;
  outline: none;
}
textarea { resize: vertical; line-height: 1.45; }
input:focus, textarea:focus, select:focus { border-color: rgba(70, 72, 212, 0.72); box-shadow: 0 0 0 4px rgba(70, 72, 212, 0.1); }
pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }
pre { margin: 0; white-space: pre-wrap; word-break: break-word; }
a { color: var(--primary-dark); text-decoration: none; }
img { max-width: 100%; display: block; }

.hidden { display: none !important; }
.row { display: flex; }
.column { display: flex; flex-direction: column; }
.center { align-items: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.gap-xs { gap: 0.35rem; }
.gap-sm { gap: 0.65rem; }
.gap-md { gap: 1rem; }
.stack-xs > * + * { margin-top: 0.4rem; }
.stack-sm > * + * { margin-top: 0.7rem; }
.stack-md > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 1.35rem; }
.muted { color: var(--muted); }
.compact { margin: 0; }
.eyebrow {
  margin: 0 0 0.4rem;
  color: var(--primary-dark);
  font-size: 0.73rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.page-title { margin: 0; font-size: clamp(1.6rem, 3vw, 2.5rem); letter-spacing: -0.045em; }
.section-title { margin: 0; font-size: 1.15rem; letter-spacing: -0.02em; }
.pill, .chip, .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 28px;
  padding: 0.32rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}
.badge.global { color: #6d28d9; background: #f1eaff; border-color: #dccdff; }
.badge.user { color: #0f766e; background: #e8fbf7; border-color: #bdeee3; }
.badge.bad { color: var(--bad); background: #fff1f2; border-color: #fecdd3; }
.api-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0.22rem 0.5rem; border-radius: 999px; background: #2e1065; color: #fff; font-size: 0.68rem; font-weight: 900; letter-spacing: 0.06em; }
.message {
  position: fixed;
  z-index: 100;
  right: 1.2rem;
  bottom: 1.2rem;
  max-width: min(420px, calc(100vw - 2rem));
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 0.85rem 1rem;
  color: var(--text);
}
.message.good { border-color: #a7f3d0; }
.message.bad { border-color: #fecdd3; }
.message-inline { border-radius: 14px; padding: 0.75rem 0.85rem; border: 1px solid var(--line); background: #fff; }
.message-inline.bad { color: var(--bad); border-color: #fecdd3; background: #fff1f2; }

.landing-screen {
  min-height: 100vh;
  padding: clamp(1rem, 3vw, 2rem);
  background:
    radial-gradient(circle at 18% 8%, rgba(124, 58, 237, 0.18), transparent 28rem),
    radial-gradient(circle at 82% 22%, rgba(192, 38, 211, 0.13), transparent 24rem),
    linear-gradient(180deg, #fff, var(--bg));
}
.landing-nav {
  max-width: 1220px;
  margin: 0 auto 1.2rem;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem;
  border: 1px solid rgba(221, 212, 239, 0.75);
  border-radius: 24px;
  background: rgba(255,255,255,.74);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}
.landing-links { display: flex; align-items: center; gap: 0.85rem; flex-wrap: wrap; }
.landing-links a { color: var(--muted); font-weight: 800; font-size: 0.9rem; }
.landing-hero {
  max-width: 1220px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.72fr);
  gap: 1rem;
  align-items: stretch;
}
.landing-copy {
  min-height: 620px;
  border-radius: 34px;
  padding: clamp(1.5rem, 5vw, 4rem);
  color: #fff;
  background:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px),
    radial-gradient(circle at 78% 18%, rgba(255,255,255,.24), transparent 18rem),
    linear-gradient(135deg, #2e1065, #7c3aed 54%, #c026d3);
  background-size: 42px 42px, 42px 42px, auto, auto;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.landing-copy h1 { margin: 0; max-width: 820px; font-size: clamp(2.8rem, 7vw, 6.6rem); line-height: 0.9; letter-spacing: -0.085em; }
.landing-copy p { max-width: 660px; color: rgba(255,255,255,.78); font-size: 1.12rem; }
.landing-copy .secondary { color: #fff; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.24); }
.landing-proof .chip { color: rgba(255,255,255,.82); background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.18); }
.landing-auth-card { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.landing-section, .landing-use-case {
  max-width: 1220px;
  margin: 1rem auto 0;
  border: 1px solid rgba(221, 212, 239, 0.82);
  border-radius: 30px;
  background: rgba(255,255,255,.82);
  box-shadow: var(--shadow-soft);
  padding: clamp(1rem, 3vw, 2rem);
}
.landing-section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1rem; }
.landing-section-head h2, .landing-use-case h2 { margin: 0; max-width: 720px; font-size: clamp(1.8rem, 4vw, 3.8rem); line-height: 0.96; letter-spacing: -0.06em; }
.landing-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.85rem; }
.landing-card { min-height: 190px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(180deg, #fff, #faf7ff); padding: 1rem; }
.landing-card h3 { margin: 0 0 0.65rem; letter-spacing: -0.03em; }
.landing-card p { margin: 0; color: var(--muted); }
.landing-use-case { display: grid; grid-template-columns: minmax(0, .8fr) minmax(320px, 1fr); gap: 1rem; align-items: center; }
.workflow-card { display: grid; gap: 0.65rem; }
.workflow-card span { display: block; border: 1px solid var(--line); border-radius: 18px; background: #fff; padding: 1rem; font-weight: 900; box-shadow: var(--shadow-soft); }
.workflow-card span:nth-child(even) { margin-left: 2rem; background: var(--primary-soft); color: var(--primary-dark); }
.pricing-card { max-width: 520px; border: 1px solid var(--line); border-radius: 24px; background: #fff; padding: 1rem; }
.pricing-card strong { display: block; font-size: 1.4rem; letter-spacing: -0.03em; }

.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.8fr);
  gap: 2rem;
  align-items: center;
  padding: clamp(1rem, 4vw, 4rem);
}
.auth-hero {
  min-height: 620px;
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.94), rgba(192, 38, 211, 0.84)),
    #7c3aed;
  color: #fff;
  padding: clamp(1.5rem, 5vw, 4rem);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero::after {
  content: "";
  position: absolute;
  inset: auto -8rem -10rem auto;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}
.auth-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(135deg, #000, transparent 72%);
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(124, 58, 237, 0.24);
}
.auth-hero .brand-mark { background: rgba(255, 255, 255, 0.18); box-shadow: none; }
.auth-hero h1 { margin: 1rem 0 0; font-size: clamp(2.4rem, 7vw, 5.6rem); line-height: 0.94; letter-spacing: -0.075em; max-width: 780px; }
.auth-hero p { max-width: 620px; font-size: 1.1rem; color: rgba(255, 255, 255, 0.8); }
.auth-kicker {
  display: inline-flex;
  margin: 3.8rem 0 0;
  padding: 0.4rem 0.72rem;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  color: rgba(255,255,255,.86) !important;
  background: rgba(255,255,255,.12);
  font-size: 0.78rem !important;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.auth-actions { margin-top: 1.4rem; }
.auth-actions button { width: auto; padding-inline: 1.2rem; }
button.auth-hero-button {
  color: #fff;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.28);
}
.auth-showcase {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr 0.85fr;
  gap: 0.8rem;
  align-items: stretch;
}
.auth-preview-card {
  min-height: 132px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 24px;
  padding: 1rem;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-preview-card.primary {
  background:
    radial-gradient(circle at top right, rgba(255,255,255,.32), transparent 45%),
    rgba(255,255,255,.18);
}
.auth-preview-card span { color: rgba(255,255,255,.7); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.auth-preview-card strong { display: block; margin-top: 0.65rem; color: #fff; font-size: clamp(1.25rem, 2.6vw, 2.2rem); line-height: 1; letter-spacing: -0.045em; }
.auth-preview-card small { color: rgba(255,255,255,.72); }
.auth-card, .panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(221, 212, 239, 0.82);
  border-radius: 24px;
  padding: 1.2rem;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}
.auth-card { padding: 1.4rem; align-self: center; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-2);
}
.auth-tabs .segment-button { justify-content: center; border-radius: 14px; }
.auth-advanced {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.75rem;
  background: var(--panel-2);
}
.auth-advanced summary { cursor: pointer; color: var(--muted); font-size: 0.84rem; font-weight: 850; }
.auth-advanced .field-label { margin-top: 0.75rem; }
.auth-advanced button { margin-top: 0.65rem; }
.auth-note { color: var(--muted); text-align: center; }

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.76);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.brand-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.25rem; }
.brand-row strong { display: block; letter-spacing: -0.02em; }
.brand-row span { color: var(--muted); font-size: 0.82rem; }
.nav { display: grid; gap: 0.35rem; }
.nav-item {
  width: 100%;
  justify-content: flex-start;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border-radius: 14px;
  color: var(--muted);
  background: transparent;
  border-color: transparent;
  min-height: 44px;
}
.nav-item.active { color: var(--primary-dark); background: var(--primary-soft); border-color: #dccdff; }
.nav-icon { width: 1.2rem; text-align: center; }
.sidebar-card { margin-top: auto; border-radius: 18px; padding: 1rem; background: linear-gradient(135deg, #2e1065, #7c3aed); color: #fff; }
.sidebar-card p { color: rgba(255, 255, 255, 0.72); }
.main { min-width: 0; display: grid; grid-template-rows: auto 1fr; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 255, 0.86);
  backdrop-filter: blur(18px);
}
.topbar-title strong { display: block; }
.topbar-title span { color: var(--muted); font-size: 0.86rem; }
.content { padding: 1.25rem; min-width: 0; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.toolbar { display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; }
.search-row { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 0.7rem; margin-bottom: 1rem; }

.dashboard-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.metric strong { display: block; font-size: 2rem; letter-spacing: -0.05em; }
.hero-panel { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr); gap: 1rem; align-items: stretch; margin-bottom: 1rem; }
.hero-copy { padding: 1.2rem; border-radius: 22px; background: linear-gradient(135deg, #fff, #f3edff); }
.hero-copy h1 { margin: 0; font-size: clamp(2rem, 5vw, 4.5rem); line-height: 0.96; letter-spacing: -0.075em; }
.hero-preview { border-radius: 22px; min-height: 260px; background: linear-gradient(135deg, #2e1065, #7c3aed 58%, #e879f9); display: grid; place-items: center; color: #fff; overflow: hidden; }
.floating-card { width: 70%; aspect-ratio: 1 / 1.2; border-radius: 26px; background: rgba(255, 255, 255, 0.92); box-shadow: 0 30px 60px rgba(31, 14, 62, 0.28); padding: 1rem; color: var(--text); transform: rotate(-4deg); }
.floating-card div { border-radius: 18px; background: linear-gradient(135deg, #ede9fe, #fdf4ff); height: 58%; margin-bottom: 1rem; }
.floating-card strong { font-size: 1.25rem; letter-spacing: -0.04em; }

.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 320px)); gap: 1rem; align-items: stretch; }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.template-card, .preset-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.template-card { height: 460px; display: flex; flex-direction: column; }
.template-thumb, .preset-thumb {
  min-height: 210px;
  background: var(--primary-soft);
  padding: 1rem;
  display: grid;
  place-items: center;
}
.template-thumb { height: 218px; min-height: 218px; background: linear-gradient(135deg, #f6f0ff, #fff); overflow: hidden; }
.template-preview-img {
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(49, 27, 92, 0.16);
  background: #fff;
}
.preview-fallback { display: grid; gap: 0.55rem; place-items: center; color: var(--muted); }
.preview-fallback small { font-weight: 750; }
.preview-skeleton {
  width: min(180px, 78%);
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  background: linear-gradient(100deg, #fff 30%, #ede9fe 48%, #fff 66%);
  background-size: 220% 100%;
  animation: shimmer 1.2s linear infinite;
  box-shadow: 0 16px 36px rgba(49, 27, 92, 0.12);
  display: grid;
  align-content: end;
  gap: 0.45rem;
  padding: 1rem;
}
.preview-skeleton span { display: block; height: 10px; border-radius: 999px; background: rgba(124, 58, 237, 0.18); }
.preview-skeleton span:nth-child(2) { width: 74%; }
.preview-skeleton span:nth-child(3) { width: 52%; }
@keyframes shimmer { to { background-position: -220% 0; } }
.mini-template {
  position: relative;
  width: min(150px, 75%);
  aspect-ratio: var(--ratio, 1 / 1);
  border-radius: 18px;
  background: var(--mini-bg, #fff);
  box-shadow: 0 16px 36px rgba(49, 27, 92, 0.2);
  overflow: hidden;
}
.mini-layer { position: absolute; border-radius: 8px; background: rgba(124, 58, 237, 0.2); }
.mini-layer.text { height: 10px; background: #2e1065; }
.mini-layer.image { background: linear-gradient(135deg, #c4b5fd, #f0abfc); }
.template-body, .preset-body { padding: 1rem; }
.template-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.template-body h3, .preset-body h3 { margin: 0; letter-spacing: -0.02em; }
.template-body h3 { min-height: 2.7em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.template-meta { margin: 0.55rem 0 0; color: var(--primary-dark); font-weight: 850; }
.template-id { margin: 0.25rem 0 0; color: var(--muted-2); font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-actions { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-top: auto; padding-top: 0.85rem; }
.card-actions .card-primary { flex: 1 1 100%; }
.card-actions .card-secondary {
  color: var(--primary-dark);
  background: #f8f5ff;
  border: 1px solid #d9ccff;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(91, 33, 182, 0.08);
}
.card-actions .card-secondary:hover {
  background: #f0e8ff;
  border-color: #b99cff;
  box-shadow: 0 12px 24px rgba(91, 33, 182, 0.12);
}
.field-list { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.65rem; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(25, 19, 43, 0.42);
  backdrop-filter: blur(8px);
}
.modal {
  width: min(1120px, 100%);
  max-height: min(860px, calc(100vh - 2rem));
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.modal-header, .modal-footer { padding: 1rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.modal-footer { border-top: 1px solid var(--line); border-bottom: 0; }
.modal-body { padding: 1rem; }
.preset-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 1rem; }
.preset-sidebar { border-right: 1px solid var(--line); padding-right: 1rem; }
.tabbar, .segments { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tab-button.active, .segment-button.active { color: var(--primary-dark); background: var(--primary-soft); border-color: #dccdff; }
.preset-card { cursor: pointer; text-align: left; padding: 0; color: var(--text); box-shadow: var(--shadow-soft); border-radius: 22px; }
.preset-card.selected { outline: 3px solid rgba(124, 58, 237, 0.22); border-color: var(--primary); }
.create-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.65rem; }
.create-step { justify-content: flex-start; display: flex; align-items: center; gap: 0.55rem; color: var(--muted); background: #fff; border: 1px solid var(--line); box-shadow: none; }
.create-step span { width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark); font-size: 0.78rem; }
.create-step.active { color: var(--primary-dark); border-color: #c4b5fd; background: var(--primary-soft); }
.create-step.complete { color: var(--good); }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.choice-card { text-align: left; display: grid; gap: 0.3rem; color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-soft); padding: 1rem; }
.choice-card.selected { border-color: var(--primary); outline: 3px solid rgba(124, 58, 237, 0.16); }
.choice-card span { color: var(--primary-dark); font-weight: 850; }
.choice-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.simple-preset-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

.studio-shell { height: calc(100vh - 94px); min-height: 720px; display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: #fff; box-shadow: var(--shadow-soft); }
.studio-topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); background: #fff; }
.save-status { margin: 0.25rem 0 0; display: inline-flex; align-items: center; gap: 0.4rem; color: var(--muted); font-size: 0.82rem; font-weight: 750; }
.save-status.good { color: var(--good); }
.save-status.warn { color: var(--warn); }
.save-status.bad { color: var(--bad); }
.button-spinner { width: 0.9em; height: 0.9em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 999px; display: inline-block; animation: spin 0.75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.studio-body { min-height: 0; display: grid; grid-template-columns: 64px minmax(0, 1fr) 360px; }
.tool-rail { padding: 0.65rem; border-right: 1px solid var(--line); background: var(--panel-2); display: grid; align-content: start; gap: 0.5rem; }
.tool-button { width: 46px; height: 46px; padding: 0; border-radius: 15px; display: grid; place-items: center; font-size: 1.1rem; }
.tool-button.active { color: var(--primary-dark); background: var(--primary-soft); border-color: #dccdff; }
.canvas-workbench { min-width: 0; min-height: 0; overflow: auto; background: var(--canvas); display: grid; place-items: center; padding: 2rem; }
.canvas-shell { transform-origin: center; }
.canvas {
  position: relative;
  width: calc(var(--canvas-w) * 1px);
  height: calc(var(--canvas-h) * 1px);
  background: #fff;
  box-shadow: 0 30px 80px rgba(35, 20, 61, 0.22);
  overflow: hidden;
}
.canvas-preview-image, .canvas-live-preview { position: absolute; inset: 0; width: 100%; height: 100%; user-select: none; pointer-events: none; }
.canvas-preview-image { object-fit: fill; }
.canvas-live-layer { position: absolute; pointer-events: none; box-sizing: border-box; }
.canvas-live-image img { border: 0; user-select: none; pointer-events: none; }
.canvas-preview-status { position: absolute; left: 12px; bottom: 12px; z-index: 3; padding: 0.35rem 0.55rem; border-radius: 999px; color: var(--primary-dark); background: rgba(255,255,255,0.88); box-shadow: var(--shadow-soft); font-size: 0.75rem; font-weight: 850; pointer-events: none; }
.canvas-preview-status.bad { color: var(--bad); }
.canvas-preview-status.good { color: var(--good); }
.canvas-preview-status.syncing { color: var(--warn); }
.canvas-overlay { position: absolute; inset: 0; z-index: 2; }
.canvas-layer { position: absolute; cursor: grab; user-select: none; outline: 0 solid transparent; background: transparent; }
.canvas-layer:active { cursor: grabbing; }
.canvas-layer.locked { cursor: not-allowed; }
.canvas-layer.selected { outline: 2px solid var(--primary); }
.canvas-layer:hover { box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.35); }
.resize-handle { position: absolute; right: -6px; bottom: -6px; width: 14px; height: 14px; border: 2px solid #fff; border-radius: 50%; background: var(--primary); cursor: nwse-resize; box-shadow: 0 2px 8px rgba(0,0,0,0.18); }
.inspector { min-width: 0; overflow: auto; border-left: 1px solid var(--line); background: #fff; }
.inspector-section { padding: 1rem; border-bottom: 1px solid var(--line); }
.layer-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.65rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; }
.layer-row.active { border-color: var(--primary); background: var(--primary-soft); }
.layer-row.hidden-layer { opacity: 0.55; }
.layer-row.hidden-layer strong { text-decoration: line-through; }
.layer-row.dragging { opacity: 0.52; }
.layer-row.drop-target { border-color: var(--primary); box-shadow: inset 0 0 0 2px rgba(124, 58, 237, 0.18); }
.layer-row span:first-child { width: 24px; text-align: center; }
.drag-handle { color: var(--muted-2); cursor: grab; font-weight: 900; letter-spacing: -0.25em; }
.visibility-button { min-width: 34px; width: 34px; height: 34px; padding: 0 !important; color: var(--primary-dark) !important; background: #fff !important; display: inline-grid; place-items: center; }
.visibility-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.api-badge[title] { cursor: help; }
.mapping-card { border: 1px solid var(--line); border-radius: 16px; background: var(--panel-2); padding: 0.85rem; }
.mapping-card p { margin: 0.25rem 0; }
.prop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
.prop-grid .full { grid-column: 1 / -1; }
label.field-label { display: grid; gap: 0.35rem; font-size: 0.84rem; color: var(--muted); font-weight: 700; }
.color-control { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 0.45rem; align-items: center; }
.color-swatch, .color-preview { background: var(--swatch, #000); }
.color-swatch { min-height: 42px; width: 42px; padding: 0; border-radius: 12px; border: 1px solid var(--line-strong); box-shadow: none; }
.color-popover {
  position: fixed;
  z-index: 120;
  right: 390px;
  top: 120px;
  width: 280px;
  padding: 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.75rem;
}
.color-preview-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 0.5rem; align-items: center; }
.color-preview { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); }
.sv-plane {
  position: relative;
  height: 170px;
  border-radius: 16px;
  cursor: crosshair;
  background:
    linear-gradient(to top, #000, transparent),
    linear-gradient(to right, #fff, hsl(var(--picker-hue), 100%, 50%));
  overflow: hidden;
}
.sv-cursor { position: absolute; left: var(--picker-s); top: calc(100% - var(--picker-v)); width: 16px; height: 16px; border: 2px solid #fff; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 1px rgba(0,0,0,.35); pointer-events: none; }
.hue-slider { position: relative; height: 18px; border-radius: 999px; cursor: ew-resize; background: linear-gradient(to right, red, yellow, lime, cyan, blue, magenta, red); }
.hue-cursor { position: absolute; left: calc((var(--picker-hue) / 360) * 100%); top: 50%; width: 16px; height: 24px; border: 2px solid #fff; border-radius: 999px; background: transparent; transform: translate(-50%, -50%); box-shadow: 0 0 0 1px rgba(0,0,0,.35); pointer-events: none; }
.json-editor { min-height: 260px; font-size: 0.84rem; }

.playground-grid { display: grid; grid-template-columns: minmax(320px, 430px) minmax(0, 1fr); gap: 1rem; align-items: start; }
.render-preview { min-height: 420px; border: 1px dashed var(--line-strong); border-radius: 20px; background: var(--panel-2); display: grid; place-items: center; padding: 1rem; color: var(--muted); font-weight: 750; }
.render-preview.loading { background: linear-gradient(100deg, var(--panel-2), #f0e8ff, var(--panel-2)); background-size: 220% 100%; animation: shimmer 1.2s linear infinite; }
.render-preview img { max-height: 560px; object-fit: contain; border-radius: 16px; box-shadow: var(--shadow-soft); }
.code-block { position: relative; padding: 1rem; border-radius: 16px; border: 1px solid var(--line); background: #1e1630; color: #f7f2ff; overflow: auto; font-size: 0.84rem; }
.code-copy { float: right; margin: 0 0 0.75rem 0.75rem; color: #fff !important; background: rgba(255,255,255,0.12) !important; border-color: rgba(255,255,255,0.24) !important; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 0.8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
.docs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.empty-state { min-height: 220px; display: grid; place-items: center; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 20px; background: var(--panel-2); padding: 1rem; }

/* Technical Fluidity refresh */
.panel, .auth-card, .template-card, .preset-card, .modal, .choice-card {
  border-color: rgba(199, 196, 215, 0.65);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}
.page-title, .landing-copy h1, .landing-section-head h2, .landing-use-case h2 {
  color: var(--text);
  font-weight: 800;
}
.brand-mark {
  color: #fff;
  background: var(--primary);
  box-shadow: none;
}
.landing-screen {
  background:
    radial-gradient(circle at 88% 12%, rgba(192, 193, 255, 0.42), transparent 30rem),
    radial-gradient(circle at 8% 100%, rgba(137, 206, 255, 0.3), transparent 28rem),
    var(--bg);
}
.landing-nav {
  max-width: 1440px;
  border-radius: 0;
  border-width: 0 0 1px;
  background: rgba(249, 249, 255, 0.82);
  box-shadow: none;
}
.landing-links a { color: var(--muted); font-weight: 600; }
.landing-hero {
  max-width: 1180px;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.72fr);
  padding: clamp(2rem, 5vw, 4rem) 0 1rem;
}
.landing-copy {
  min-height: 560px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(199, 196, 215, 0.64);
  box-shadow: var(--shadow-soft);
}
.landing-copy::before { content: none; }
.landing-copy h1 {
  max-width: 820px;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
}
.landing-copy p { color: var(--muted); }
.auth-kicker {
  color: var(--primary-dark) !important;
  background: rgba(70, 72, 212, 0.08);
  border-color: rgba(70, 72, 212, 0.18);
}
.landing-copy .secondary { color: var(--text); background: #fff; border-color: var(--line); }
.landing-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0.85rem;
  align-items: center;
  margin-top: 1.4rem;
}
.flow-node {
  min-height: 150px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.45rem;
  text-align: center;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  padding: 1rem;
}
.flow-node span {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  color: var(--primary);
  background: rgba(70, 72, 212, 0.08);
  font-weight: 800;
}
.flow-node small { color: var(--muted); }
.flow-arrow { color: var(--muted-2); font-size: 1.35rem; }
.landing-auth-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
}
.landing-auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.password-field { position: relative; display: block; }
.password-field input { padding-right: 4.4rem; }
.input-action {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  min-height: 30px;
  padding: 0.25rem 0.55rem;
  color: var(--primary);
  background: transparent;
  border: 0;
  box-shadow: none;
  transform: translateY(-50%);
}
.input-action:hover { transform: translateY(-50%); box-shadow: none; }
.landing-section, .landing-use-case {
  max-width: 1180px;
  border-color: rgba(199, 196, 215, 0.64);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: none;
}
.landing-card {
  min-height: 210px;
  border-color: var(--line);
  background: #fff;
  box-shadow: none;
}
.workflow-card span { box-shadow: none; }

.app-shell { grid-template-columns: 268px minmax(0, 1fr); background: var(--bg); }
.sidebar {
  padding: 1.25rem;
  background: rgba(240, 243, 255, 0.9);
  border-color: rgba(199, 196, 215, 0.38);
  box-shadow: none;
}
.workspace-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.workspace-card strong { display: block; color: var(--primary); font-size: 1.16rem; letter-spacing: -0.03em; }
.workspace-card span { color: var(--muted); font-size: 0.78rem; }
.new-template-button {
  width: 100%;
  justify-content: center;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.8rem 0 1rem;
}
.new-template-button span { font-size: 1.35rem; line-height: 0; }
.nav { gap: 0.35rem; }
.nav-item {
  border: 0;
  border-radius: 12px;
  padding-inline: 0.9rem;
  color: var(--muted);
  font-weight: 650;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.72); box-shadow: none; transform: none; }
.nav-item.active {
  color: var(--primary);
  background: rgba(70, 72, 212, 0.1);
  border-color: transparent;
  transform: translateX(4px);
}
.nav-icon { color: currentColor; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(199, 196, 215, 0.45);
  display: grid;
  gap: 0.25rem;
}
.main { background: transparent; }
.topbar {
  min-height: 76px;
  border-color: rgba(199, 196, 215, 0.42);
  background: rgba(249, 249, 255, 0.82);
}
.topbar-title strong { font-size: 1.45rem; letter-spacing: -0.04em; }
.topbar-title span { color: var(--muted); }
.content {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2.5rem);
}
.page-header { margin-bottom: 1.6rem; }
.page-title {
  max-width: 780px;
  font-size: clamp(2rem, 5vw, 3.7rem);
  line-height: 0.98;
}
.date-pill, .status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}
.status-pill.good { color: #047857; background: #dff8ed; border-color: #c8f0df; }
.status-pill.bad { color: var(--bad); background: #fff1f2; border-color: #fecdd3; }
.status-pill.pending { color: var(--primary); background: rgba(70, 72, 212, 0.1); border-color: rgba(70, 72, 212, 0.15); }
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.6rem;
}
.metric-card {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.metric-top, .panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.metric-card strong {
  display: block;
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1;
  letter-spacing: -0.06em;
}
.metric-icon {
  width: 2rem;
  height: 2rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--primary);
  background: #fff;
}
.metric-bar {
  height: 0.45rem;
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  background: var(--panel-2);
}
.metric-bar span:first-child { background: var(--primary); }
.metric-bar span:last-child { background: var(--accent); }
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(290px, 0.9fr);
  gap: 1.4rem;
  margin-bottom: 1.4rem;
}
.chart-card { min-height: 440px; display: flex; flex-direction: column; }
.usage-chart {
  flex: 1;
  min-height: 300px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 0.6rem;
  margin-top: 1.2rem;
  border-left: 1px solid rgba(199, 196, 215, 0.35);
  border-bottom: 1px solid rgba(199, 196, 215, 0.35);
  background: linear-gradient(rgba(226, 232, 240, 0.44) 1px, transparent 1px);
  background-size: 100% 25%;
}
.usage-chart svg { width: 100%; height: 100%; overflow: visible; }
.chart-labels { display: flex; justify-content: space-between; color: var(--muted-2); font-size: 0.78rem; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; padding: 0 0.35rem 0.25rem; }
.suggested-actions { display: grid; align-content: start; gap: 1rem; }
.suggested-actions .section-title { margin: 0.25rem 0 0; }
.action-card {
  min-height: 156px;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 0.25rem 1rem;
  align-content: start;
  text-align: left;
  color: var(--text);
  background: #fff;
  border: 1px solid rgba(199, 196, 215, 0.65);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}
.action-card:hover { background: var(--panel-2); box-shadow: var(--shadow-soft); }
.action-card .action-icon { grid-row: span 3; width: 3rem; height: 3rem; display: grid; place-items: center; color: var(--primary); border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.action-card strong { align-self: end; }
.action-card p { margin: 0; color: var(--muted); font-weight: 400; }
.action-card small { color: var(--primary); font-weight: 800; }
.overview-bottom {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(290px, 0.9fr);
  gap: 1.4rem;
}
.recent-render-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(92px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}
.render-tile, .history-preview {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background-color: var(--panel-2);
  background-image: linear-gradient(45deg, #d8e3fb 25%, transparent 25%, transparent 75%, #d8e3fb 75%, #d8e3fb), linear-gradient(45deg, #d8e3fb 25%, transparent 25%, transparent 75%, #d8e3fb 75%, #d8e3fb);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
}
.render-tile { aspect-ratio: 1 / 1; display: grid; place-items: end start; color: var(--text); }
.render-tile img, .history-preview img { width: 100%; height: 100%; object-fit: cover; }
.render-tile span { position: absolute; left: 0.5rem; bottom: 0.5rem; max-width: calc(100% - 1rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 8px; background: rgba(255, 255, 255, 0.9); padding: 0.2rem 0.45rem; font-size: 0.72rem; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.empty-tile { min-height: 0; color: var(--muted); background: var(--panel-2); border-style: dashed; box-shadow: none; }
.top-resource-list { display: grid; gap: 0.75rem; margin-top: 1rem; }
.resource-row, .key-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}
.resource-row code, .key-pill { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.78rem; }
.resource-row span, .key-pill small { color: var(--muted); }
.key-pill { justify-content: flex-start; }
.key-pill span { width: 0.45rem; height: 0.45rem; border-radius: 999px; background: var(--accent); }
.key-pill small { margin-left: auto; }
.failure-list { list-style: none; display: grid; gap: 0.45rem; padding: 0; margin: 0; }
.failure-list li { display: flex; justify-content: space-between; gap: 0.75rem; color: var(--muted); }

.template-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.template-card { height: 440px; box-shadow: none; }
.template-thumb { background: var(--panel-2); }
.template-preview-img { box-shadow: 0 10px 25px -5px rgba(30, 41, 59, 0.12); }
.card-actions .card-secondary { color: var(--text); background: #fff; border-color: var(--line); box-shadow: none; }
.card-actions .card-secondary:hover { background: var(--panel-2); box-shadow: none; }

.modern-playground { grid-template-columns: minmax(320px, 520px) minmax(0, 1fr); gap: 1.5rem; }
.payload-panel { padding: 0; overflow: hidden; }
.payload-panel > * { margin-left: 1.2rem; margin-right: 1.2rem; }
.payload-panel > .panel-head { margin: 0; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); background: rgba(240, 243, 255, 0.5); }
.compact-json { min-height: 230px; color: #ecf1ff; background: var(--inverse); border-color: transparent; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.live-render-card { display: grid; grid-template-rows: auto minmax(360px, 1fr) auto; gap: 1rem; }
.render-preview.checkered, .checkered {
  background-color: #f0f3ff;
  background-image: linear-gradient(45deg, #d8e3fb 25%, transparent 25%, transparent 75%, #d8e3fb 75%, #d8e3fb), linear-gradient(45deg, #d8e3fb 25%, transparent 25%, transparent 75%, #d8e3fb 75%, #d8e3fb);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  border-style: solid;
}
.empty-preview { color: var(--muted); }
.code-block {
  background: var(--inverse);
  color: #ecf1ff;
  border-color: rgba(255, 255, 255, 0.08);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.api-keys-grid, .settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 1.2rem;
  margin-bottom: 1.2rem;
}
.api-keys-grid.single-card { grid-template-columns: 1fr; }
.settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.usage-card { display: grid; align-content: space-between; min-height: 190px; }
.plan-card { min-height: 190px; }
.key-manager .panel-head { align-items: center; }
.inline-input { width: min(260px, 100%); }
.new-key-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid rgba(70, 72, 212, 0.22);
  border-radius: 16px;
  background: rgba(70, 72, 212, 0.06);
}
.new-key-panel code { word-break: break-all; }
.technical-anchor {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 1fr);
  gap: 1.5rem;
  align-items: center;
  margin-top: 1.2rem;
  border-radius: 20px;
  background: var(--inverse);
  color: #ecf1ff;
  padding: clamp(1rem, 3vw, 2rem);
  overflow: hidden;
}
.technical-anchor h2 { margin: 0 0 0.65rem; color: #e1e0ff; }
.technical-anchor p { margin: 0; color: #c0c1ff; }
.technical-anchor pre { overflow: auto; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: rgba(255,255,255,.06); padding: 1rem; color: #ecf1ff; }
.history-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.table-wrap { overflow-x: auto; }
.table { border-collapse: separate; border-spacing: 0; }
.table th { background: var(--panel-2); color: var(--text); font-weight: 800; }
.table td, .table th { border-bottom-color: var(--line); }
.table tbody tr:hover { background: rgba(240, 243, 255, 0.55); }
.render-table td { vertical-align: middle; }
.history-preview {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  color: var(--bad);
  font-weight: 900;
}
.compact-empty { min-height: 180px; }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; }
  .nav { display: flex; min-width: max-content; }
  .workspace-card { min-width: max-content; }
  .new-template-button { width: auto; margin: 0; white-space: nowrap; }
  .sidebar-footer { display: flex; min-width: max-content; margin-top: 0; padding-top: 0; border-top: 0; }
  .sidebar-card { display: none; }
  .studio-body { grid-template-columns: 56px minmax(0, 1fr); }
  .inspector { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); max-height: 420px; }
  .hero-panel, .playground-grid, .modern-playground, .docs-grid, .preset-layout, .overview-grid, .overview-bottom, .api-keys-grid, .technical-anchor { grid-template-columns: 1fr; }
  .landing-hero, .landing-use-case { grid-template-columns: 1fr; }
  .landing-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-screen { grid-template-columns: 1fr; }
  .auth-hero { min-height: 560px; }
  .preset-sidebar { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 1rem; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .landing-screen { padding: 0.75rem; }
  .landing-nav { align-items: flex-start; flex-direction: column; }
  .landing-links { width: 100%; }
  .landing-links a { display: none; }
  .landing-links button { flex: 1; }
  .landing-copy { min-height: 0; border-radius: 26px; }
  .landing-copy h1 { font-size: clamp(2.45rem, 14vw, 4.2rem); }
  .landing-flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); justify-self: center; }
  .landing-card-grid { grid-template-columns: 1fr; }
  .landing-section-head { align-items: flex-start; flex-direction: column; }
  .workflow-card span:nth-child(even) { margin-left: 0; }
  .auth-screen { grid-template-columns: 1fr; padding: 1rem; }
  .auth-hero { min-height: 0; border-radius: 24px; }
  .auth-kicker { margin-top: 2rem; }
  .auth-showcase { grid-template-columns: 1fr; }
  .auth-preview-card { min-height: 104px; }
  .content { padding: 0.8rem; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .page-header, .studio-topbar { align-items: flex-start; flex-direction: column; }
  .search-row { grid-template-columns: 1fr; }
  .dashboard-grid, .metrics-grid { grid-template-columns: 1fr 1fr; }
  .template-grid, .preset-grid { grid-template-columns: 1fr; }
  .studio-shell { height: auto; min-height: 0; }
  .studio-body { grid-template-columns: 1fr; }
  .tool-rail { grid-auto-flow: column; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .canvas-workbench { padding: 1rem; place-items: start center; }
  .prop-grid { grid-template-columns: 1fr; }
  .dashboard-grid, .metrics-grid, .recent-render-grid, .history-controls { grid-template-columns: 1fr; }
  .new-key-panel { grid-template-columns: 1fr; }
  .key-manager .panel-head, .panel-head, .topbar { align-items: flex-start; flex-direction: column; }
  .inline-input { width: 100%; }
  .modal-header, .modal-footer { align-items: flex-start; flex-direction: column; }
}

/* Pimlay landing and auth redesign */
.pimlay-auth-page {
  min-height: 100vh;
  padding: 0 1.25rem 3.5rem;
  color: #101828;
  background:
    radial-gradient(circle at 84% 4%, rgba(99, 102, 241, 0.20), transparent 32rem),
    radial-gradient(circle at 8% 96%, rgba(56, 189, 248, 0.18), transparent 30rem),
    linear-gradient(180deg, #fbfcff 0%, #f6f7fb 100%);
}

.pimlay-nav {
  max-width: 1180px;
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(16, 24, 40, 0.08);
}

.pimlay-brand {
  min-height: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0;
  color: #101828;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  text-align: left;
}
.pimlay-brand:hover { transform: none; box-shadow: none; }
.pimlay-logo {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #4648d4, #39b8fd);
  font-weight: 900;
  letter-spacing: -0.04em;
  box-shadow: 0 14px 34px rgba(70, 72, 212, 0.22);
}
.pimlay-brand strong { display: block; font-size: 1.05rem; letter-spacing: -0.04em; }
.pimlay-brand small { display: block; margin-top: 0.08rem; color: #667085; font-size: 0.78rem; font-weight: 650; }

.pimlay-nav-links { display: flex; align-items: center; gap: 0.6rem; }
.pimlay-nav-links a {
  padding: 0.55rem 0.7rem;
  color: #667085;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 750;
}
.pimlay-nav-links a:hover { color: #101828; background: rgba(255,255,255,0.78); }
.pimlay-nav-links button { min-height: 38px; border-radius: 999px; }
.pimlay-nav-links button.ghost { color: #101828; background: rgba(255,255,255,0.72); border: 1px solid rgba(16, 24, 40, 0.11); }

.pimlay-hero {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.78fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
  padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(1.5rem, 4vw, 3rem);
}

.pimlay-hero-copy { max-width: 760px; }
.pimlay-pill {
  width: fit-content;
  margin: 0 0 1.1rem;
  padding: 0.42rem 0.7rem;
  color: #3730a3;
  background: rgba(70, 72, 212, 0.08);
  border: 1px solid rgba(70, 72, 212, 0.14);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pimlay-hero-copy h1 {
  margin: 0;
  max-width: 780px;
  color: #0b1020;
  font-size: clamp(3.4rem, 8vw, 6.9rem);
  line-height: 0.9;
  letter-spacing: -0.085em;
}
.pimlay-lede {
  max-width: 650px;
  margin: 1.25rem 0 0;
  color: #475467;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.65;
}
.pimlay-hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.6rem; }
.pimlay-hero-actions button { min-height: 48px; border-radius: 999px; padding-inline: 1.25rem; }
.pimlay-hero-actions .secondary { background: #fff; border: 1px solid rgba(16, 24, 40, 0.12); }
.pimlay-proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.45rem;
}
.pimlay-proof-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.32rem 0.68rem;
  border: 1px solid rgba(16, 24, 40, 0.09);
  border-radius: 999px;
  background: rgba(255,255,255,0.78);
  color: #475467;
  font-size: 0.8rem;
  font-weight: 750;
}

.pimlay-auth-panel { display: grid; gap: 0.75rem; align-self: center; }
.pimlay-auth-card {
  position: relative;
  padding: 1.35rem;
  border: 1px solid rgba(16, 24, 40, 0.12);
  border-radius: 24px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 24px 70px rgba(16, 24, 40, 0.10);
  overflow: hidden;
}
.pimlay-auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, #4648d4, #39b8fd);
}
.pimlay-auth-head h2 {
  margin: 0;
  color: #101828;
  font-size: clamp(1.8rem, 4vw, 2.45rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
}
.pimlay-auth-head p:not(.eyebrow) { margin: 0.75rem 0 0; color: #667085; line-height: 1.55; }
.pimlay-auth-card .auth-tabs {
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 14px;
  background: #f3f5fb;
}
.pimlay-auth-card .segment-button {
  border: 0;
  border-radius: 10px;
  color: #667085;
}
.pimlay-auth-card .segment-button.active { color: #101828; background: #fff; box-shadow: 0 1px 3px rgba(16, 24, 40, 0.08); }
.pimlay-auth-card label.field-label {
  color: #344054;
  font-size: 0.82rem;
  font-weight: 800;
}
.pimlay-auth-card input {
  min-height: 48px;
  border-color: rgba(16, 24, 40, 0.14);
  border-radius: 14px;
  background: #fff;
}
.pimlay-auth-card input::placeholder { color: #98a2b3; }
.pimlay-auth-submit {
  min-height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #4648d4, #5658ee);
}
.pimlay-auth-card .auth-note { color: #667085; }
.pimlay-auth-aside {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  border: 1px solid rgba(70, 72, 212, 0.14);
  border-radius: 18px;
  background: rgba(70, 72, 212, 0.06);
}
.pimlay-auth-aside span {
  color: #3730a3;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pimlay-auth-aside strong { color: #101828; font-size: 0.95rem; line-height: 1.4; }

.pimlay-product-strip {
  max-width: 1180px;
  margin: 0 auto 1.25rem;
  display: grid;
  grid-template-columns: 1fr 56px 1fr 56px 1fr;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid rgba(16, 24, 40, 0.10);
  border-radius: 26px;
  background: rgba(255,255,255,0.74);
}
.pimlay-workflow-card {
  min-height: 136px;
  display: grid;
  align-content: center;
  gap: 0.45rem;
  padding: 1rem;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 18px;
  background: #fff;
}
.pimlay-workflow-card span {
  width: fit-content;
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  color: #3730a3;
  background: rgba(70, 72, 212, 0.08);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 900;
}
.pimlay-workflow-card strong { color: #101828; font-size: 1.05rem; }
.pimlay-workflow-card small { color: #667085; line-height: 1.5; }
.pimlay-workflow-line { height: 1px; background: linear-gradient(90deg, transparent, rgba(70, 72, 212, 0.42), transparent); }

.pimlay-showcase, .pimlay-beta-card {
  max-width: 1180px;
  margin: 1.25rem auto 0;
  border: 1px solid rgba(16, 24, 40, 0.10);
  border-radius: 26px;
  background: rgba(255,255,255,0.78);
  padding: clamp(1rem, 3vw, 1.6rem);
}
.pimlay-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.pimlay-section-head h2, .pimlay-beta-card h2 {
  margin: 0;
  max-width: 760px;
  color: #101828;
  font-size: clamp(1.7rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.062em;
}
.pimlay-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.pimlay-feature-grid .landing-card {
  min-height: 188px;
  border: 1px solid rgba(16, 24, 40, 0.09);
  border-radius: 20px;
  background: #fff;
  box-shadow: none;
}
.pimlay-feature-grid .landing-card h3 { color: #101828; }
.pimlay-feature-grid .landing-card p { color: #667085; line-height: 1.55; }
.pimlay-beta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #101828;
}
.pimlay-beta-card h2 { color: #fff; }
.pimlay-beta-card .eyebrow { color: #9ccfff; }
.pimlay-beta-card button { background: #fff; color: #101828; }

@media (max-width: 1040px) {
  .pimlay-hero { grid-template-columns: 1fr; min-height: 0; }
  .pimlay-auth-panel { max-width: 560px; width: 100%; }
  .pimlay-product-strip { grid-template-columns: 1fr; }
  .pimlay-workflow-line { width: 1px; height: 28px; justify-self: center; background: linear-gradient(180deg, transparent, rgba(70, 72, 212, 0.42), transparent); }
  .pimlay-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .pimlay-auth-page { padding: 0 0.9rem 2rem; }
  .pimlay-nav { min-height: auto; padding: 0.85rem 0; align-items: flex-start; flex-direction: column; }
  .pimlay-nav-links { width: 100%; flex-wrap: wrap; }
  .pimlay-nav-links a { display: none; }
  .pimlay-nav-links button { flex: 1; }
  .pimlay-hero { padding: 2rem 0 1rem; }
  .pimlay-hero-copy h1 { font-size: clamp(3rem, 16vw, 4.5rem); }
  .pimlay-lede { font-size: 1rem; }
  .pimlay-hero-actions button { width: 100%; }
  .pimlay-auth-card { padding: 1rem; border-radius: 20px; }
  .pimlay-feature-grid { grid-template-columns: 1fr; }
  .pimlay-section-head, .pimlay-beta-card { align-items: flex-start; flex-direction: column; }
  .pimlay-beta-card button { width: 100%; }
}

/* Pimlay product landing refresh */
.pimlay-auth-page {
  --pimlay-text: #101828;
  --pimlay-muted: #667085;
  --pimlay-line: rgba(16, 24, 40, 0.10);
  --pimlay-panel: rgba(255, 255, 255, 0.84);
  --pimlay-blue: #4648d4;
  --pimlay-cyan: #39b8fd;
  padding: 0 1.25rem 4rem;
  background:
    radial-gradient(circle at 92% 5%, rgba(57, 184, 253, 0.20), transparent 30rem),
    radial-gradient(circle at 6% 18%, rgba(70, 72, 212, 0.14), transparent 28rem),
    linear-gradient(180deg, #fbfcff 0%, #f5f7fb 56%, #eef2f7 100%);
}

.pimlay-auth-page section[id], .pimlay-auth-page main[id] { scroll-margin-top: 96px; }

.pimlay-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  max-width: 1240px;
  min-height: 72px;
  padding: 0.65rem 0;
  border-bottom-color: rgba(16, 24, 40, 0.07);
  background: rgba(251, 252, 255, 0.84);
  backdrop-filter: blur(16px);
}

.pimlay-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  color: var(--pimlay-text);
}
.pimlay-brand:hover { color: var(--pimlay-text); }
.pimlay-brand small { color: var(--pimlay-muted); }

.pimlay-nav-links {
  gap: 0.36rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.pimlay-nav-links a {
  color: var(--pimlay-muted);
  font-weight: 780;
}
.pimlay-nav-links a:hover { color: var(--pimlay-text); }
.pimlay-nav-links button.small:not(.ghost) {
  background: linear-gradient(135deg, var(--pimlay-blue), #5658ee);
}

.pimlay-hero {
  max-width: 1240px;
  min-height: auto;
  grid-template-columns: minmax(0, 0.92fr) minmax(500px, 1.08fr);
  gap: clamp(1.5rem, 4vw, 3.25rem);
  padding: clamp(3rem, 7vw, 5.8rem) 0 clamp(2rem, 5vw, 4rem);
}

.pimlay-hero-copy { max-width: 720px; }
.pimlay-pill {
  color: #3730a3;
  background: rgba(70, 72, 212, 0.09);
  border-color: rgba(70, 72, 212, 0.16);
}
.pimlay-hero-copy h1 {
  max-width: 760px;
  font-size: clamp(3.25rem, 7.4vw, 6.65rem);
  line-height: 0.92;
  letter-spacing: -0.082em;
}
.pimlay-lede {
  max-width: 690px;
  color: #3f4a5f;
}
.pimlay-hero-actions { align-items: center; margin-top: 1.75rem; }
.pimlay-secondary-cta {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.15rem;
  border: 1px solid var(--pimlay-line);
  border-radius: 999px;
  color: var(--pimlay-text);
  background: #fff;
  font-weight: 850;
}
.pimlay-secondary-cta:hover { color: var(--pimlay-text); border-color: rgba(70, 72, 212, 0.24); }
.pimlay-support-text {
  max-width: 640px;
  margin: 1rem 0 0;
  color: var(--pimlay-muted);
  font-size: 0.96rem;
  line-height: 1.6;
}

.pimlay-demo {
  position: relative;
  overflow: hidden;
  padding: clamp(1rem, 2vw, 1.35rem);
  border: 1px solid rgba(16, 24, 40, 0.10);
  border-radius: 30px;
  background:
    linear-gradient(rgba(70, 72, 212, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 72, 212, 0.05) 1px, transparent 1px),
    rgba(255, 255, 255, 0.88);
  background-size: 34px 34px, 34px 34px, auto;
  box-shadow: 0 28px 80px rgba(16, 24, 40, 0.12);
}
.pimlay-demo::before {
  content: "";
  position: absolute;
  inset: -10rem -8rem auto auto;
  width: 22rem;
  height: 22rem;
  border-radius: 999px;
  background: rgba(57, 184, 253, 0.16);
  pointer-events: none;
}
.pimlay-demo > * { position: relative; }
.pimlay-demo-head, .pimlay-equation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.pimlay-demo-head {
  color: var(--pimlay-muted);
  font-size: 0.8rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.pimlay-demo-head strong { color: var(--pimlay-text); }
.pimlay-equation {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.pimlay-equation span {
  padding: 0.42rem 0.7rem;
  border: 1px solid rgba(70, 72, 212, 0.14);
  border-radius: 999px;
  color: #3730a3;
  background: rgba(70, 72, 212, 0.08);
  font-size: 0.78rem;
  font-weight: 900;
}
.pimlay-equation b { color: #98a2b3; }
.pimlay-demo-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 0.9rem;
  margin-top: 1rem;
}
.pimlay-template-preview, .pimlay-data-card, .pimlay-gallery-panel, .pimlay-code-card {
  border: 1px solid var(--pimlay-line);
  border-radius: 22px;
  background: #fff;
}
.pimlay-template-preview {
  min-height: 300px;
  display: grid;
  grid-template-rows: minmax(160px, 1fr) auto;
  gap: 0.85rem;
  padding: 0.85rem;
}
.pimlay-template-image {
  display: grid;
  place-items: center;
  border: 1px dashed rgba(70, 72, 212, 0.34);
  border-radius: 18px;
  color: #3730a3;
  background:
    radial-gradient(circle at 70% 20%, rgba(57, 184, 253, 0.24), transparent 12rem),
    #f4f7ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 900;
}
.pimlay-template-copy {
  display: grid;
  gap: 0.45rem;
}
.pimlay-template-copy span, .pimlay-template-copy strong, .pimlay-template-copy em {
  width: fit-content;
  padding: 0.28rem 0.5rem;
  border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  font-style: normal;
}
.pimlay-template-copy span { color: #344054; background: #f2f4f7; }
.pimlay-template-copy strong { color: #3730a3; background: rgba(70, 72, 212, 0.10); }
.pimlay-template-copy em { color: #0369a1; background: rgba(57, 184, 253, 0.16); }
.pimlay-data-card { padding: 0.95rem; }
.pimlay-data-card span, .pimlay-code-card span, .pimlay-gallery-panel > span {
  display: block;
  margin-bottom: 0.65rem;
  color: var(--pimlay-muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pimlay-data-card pre, .pimlay-code-card pre, .pimlay-gallery-panel pre {
  margin: 0;
  color: #243041;
  font-size: 0.8rem;
  line-height: 1.55;
  white-space: pre-wrap;
}
.pimlay-render-stack {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}
.pimlay-render-card {
  min-height: 178px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
  border-radius: 22px;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 18px 38px rgba(16, 24, 40, 0.12);
}
.pimlay-render-card span { font-size: 0.78rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.pimlay-render-card strong { display: block; font-size: clamp(1.65rem, 4vw, 2.8rem); line-height: 0.9; letter-spacing: -0.055em; }
.pimlay-render-card small { width: fit-content; padding: 0.35rem 0.55rem; border-radius: 999px; background: rgba(255,255,255,0.18); font-weight: 850; }
.pimlay-render-card.sale { background: linear-gradient(145deg, #111827, #4648d4); }
.pimlay-render-card.launch { background: linear-gradient(145deg, #0f766e, #39b8fd); }
.pimlay-render-card.report { background: linear-gradient(145deg, #7c2d12, #f97316); }

.pimlay-todo {
  margin: 0.9rem 0 0;
  padding: 0.72rem 0.85rem;
  border: 1px dashed rgba(70, 72, 212, 0.26);
  border-radius: 14px;
  color: #475467;
  background: rgba(255, 255, 255, 0.70);
  font-size: 0.82rem;
  line-height: 1.45;
}
.pimlay-todo.dark {
  color: rgba(255, 255, 255, 0.72);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.pimlay-problem, .pimlay-showcase, .pimlay-product-strip, .pimlay-use-cases, .pimlay-output-gallery, .pimlay-api-section, .pimlay-beta-card {
  max-width: 1240px;
  margin: 1.25rem auto 0;
  border: 1px solid var(--pimlay-line);
  border-radius: 30px;
  background: var(--pimlay-panel);
  padding: clamp(1.15rem, 3vw, 2rem);
  box-shadow: none;
}
.pimlay-problem {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1rem, 4vw, 3rem);
  align-items: center;
  background: #101828;
}
.pimlay-problem h2, .pimlay-problem p:not(.eyebrow) { color: #fff; }
.pimlay-problem h2, .pimlay-section-head h2, .pimlay-beta-card h2, .pimlay-api-copy h2 {
  margin: 0;
  color: var(--pimlay-text);
  font-size: clamp(2rem, 4.4vw, 4rem);
  line-height: 0.96;
  letter-spacing: -0.064em;
}
.pimlay-problem h2 { color: #fff; }
.pimlay-problem p:not(.eyebrow) {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.65;
}
.pimlay-problem .eyebrow, .pimlay-beta-card .eyebrow { color: #9ccfff; }

.pimlay-showcase, .pimlay-product-strip, .pimlay-use-cases, .pimlay-output-gallery, .pimlay-api-section {
  background: rgba(255, 255, 255, 0.78);
}
.pimlay-section-head {
  margin-bottom: 1.1rem;
  align-items: flex-end;
}
.pimlay-feature-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.pimlay-feature-grid .landing-card, .pimlay-use-card {
  min-height: 190px;
  border: 1px solid var(--pimlay-line);
  border-radius: 22px;
  background: #fff;
}
.pimlay-feature-grid .landing-card h3, .pimlay-use-card h3 { color: var(--pimlay-text); }
.pimlay-feature-grid .landing-card p, .pimlay-use-card p { color: var(--pimlay-muted); line-height: 1.55; }

.pimlay-product-strip { display: block; }
.pimlay-workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.pimlay-workflow-card {
  min-height: 210px;
  align-content: start;
  gap: 0.8rem;
  padding: 1.1rem;
  border-radius: 22px;
}
.pimlay-workflow-card span {
  color: #3730a3;
  background: rgba(70, 72, 212, 0.10);
}
.pimlay-workflow-card strong {
  max-width: 12rem;
  font-size: 1.32rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
}
.pimlay-workflow-card small {
  color: var(--pimlay-muted);
  font-size: 0.94rem;
}

.pimlay-use-case-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.pimlay-use-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
}
.pimlay-use-card h3 { margin: 0 0 0.55rem; letter-spacing: -0.035em; }
.pimlay-use-card p { margin: 0; }
.pimlay-use-card div {
  display: grid;
  gap: 0.42rem;
  margin-top: 1rem;
}
.pimlay-use-card span {
  padding: 0.42rem 0.55rem;
  border-radius: 12px;
  color: #475467;
  background: #f5f7fb;
  font-size: 0.78rem;
  font-weight: 800;
}

.pimlay-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.pimlay-gallery-panel { padding: 1rem; }
.pimlay-mini-template, .pimlay-generated-poster {
  min-height: 320px;
  border-radius: 20px;
}
.pimlay-mini-template {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px dashed rgba(70, 72, 212, 0.28);
  background: #f8faff;
}
.pimlay-mini-template strong, .pimlay-mini-template em, .pimlay-mini-template small {
  width: fit-content;
  padding: 0.35rem 0.52rem;
  border-radius: 10px;
  background: #fff;
  color: #344054;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.84rem;
  font-style: normal;
}
.pimlay-mini-template i {
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #3730a3;
  background: rgba(70, 72, 212, 0.09);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-style: normal;
  font-weight: 900;
}
.pimlay-generated-poster {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.1rem;
  color: #fff;
  background:
    radial-gradient(circle at 82% 16%, rgba(255,255,255,0.25), transparent 10rem),
    linear-gradient(145deg, #0b1020, #4648d4 58%, #39b8fd);
}
.pimlay-generated-poster small { font-weight: 900; letter-spacing: 0.12em; }
.pimlay-generated-poster strong { max-width: 16rem; font-size: 2.4rem; line-height: 0.96; letter-spacing: -0.055em; }
.pimlay-generated-poster b { font-size: 3.6rem; line-height: 0.9; letter-spacing: -0.065em; }
.pimlay-generated-poster em { width: fit-content; padding: 0.45rem 0.7rem; border-radius: 999px; background: rgba(255,255,255,0.18); font-style: normal; font-weight: 850; }

.pimlay-api-section {
  display: grid;
  grid-template-columns: minmax(0, 0.76fr) minmax(0, 1.24fr);
  gap: 1rem;
  align-items: start;
}
.pimlay-api-copy p:not(.eyebrow) {
  margin: 1rem 0 0;
  color: var(--pimlay-muted);
  line-height: 1.65;
}
.pimlay-code-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 0.8rem;
}
.pimlay-code-card {
  padding: 1rem;
  background: #0b1020;
  border-color: rgba(255, 255, 255, 0.08);
}
.pimlay-code-card span { color: #9ccfff; }
.pimlay-code-card pre { color: #e6edf7; font-size: 0.78rem; }

.pimlay-beta-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.68fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  background:
    radial-gradient(circle at 92% 0%, rgba(57, 184, 253, 0.24), transparent 22rem),
    linear-gradient(135deg, #101828, #172033);
}
.pimlay-beta-copy h2 { color: #fff; }
.pimlay-beta-copy p:not(.eyebrow):not(.pimlay-todo) {
  max-width: 760px;
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.65;
}
.pimlay-beta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}
.pimlay-beta-list li {
  position: relative;
  padding: 0.75rem 0.75rem 0.75rem 2rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.07);
  font-weight: 760;
}
.pimlay-beta-list li::before {
  content: "";
  position: absolute;
  left: 0.8rem;
  top: 1.05rem;
  width: 0.46rem;
  height: 0.46rem;
  border-radius: 999px;
  background: var(--pimlay-cyan);
}

.pimlay-auth-panel {
  width: 100%;
  max-width: 480px;
  justify-self: end;
}
.pimlay-auth-card {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.20);
}
.pimlay-auth-card .eyebrow { color: #3730a3; }
.pimlay-beta-card .pimlay-auth-card .segment-button { background: transparent; color: #667085; }
.pimlay-beta-card .pimlay-auth-card .segment-button.active { background: #fff; color: var(--pimlay-text); }
.pimlay-beta-card .pimlay-auth-card .input-action,
.pimlay-beta-card .pimlay-auth-card .link-button { background: transparent; color: var(--pimlay-blue); }
.pimlay-beta-card .pimlay-auth-card .pimlay-auth-submit {
  color: #fff;
  background: linear-gradient(135deg, var(--pimlay-blue), #5658ee);
}

@media (max-width: 1120px) {
  .pimlay-hero { grid-template-columns: 1fr; }
  .pimlay-demo { max-width: 780px; }
  .pimlay-problem, .pimlay-api-section, .pimlay-beta-card { grid-template-columns: 1fr; }
  .pimlay-auth-panel { max-width: 560px; justify-self: start; }
  .pimlay-use-case-grid, .pimlay-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 880px) {
  .pimlay-demo-grid, .pimlay-code-grid, .pimlay-gallery-grid, .pimlay-workflow-grid { grid-template-columns: 1fr; }
  .pimlay-render-stack { grid-template-columns: 1fr; }
  .pimlay-render-card { min-height: 150px; }
  .pimlay-beta-list { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .pimlay-auth-page { padding: 0 0.9rem 2.25rem; }
  .pimlay-nav { align-items: flex-start; flex-direction: column; }
  .pimlay-nav-links {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }
  .pimlay-nav-links a { display: inline-flex; }
  .pimlay-nav-links a, .pimlay-nav-links button { flex: 0 0 auto; }
  .pimlay-hero { padding: 2.2rem 0 1rem; }
  .pimlay-hero-copy h1 { font-size: clamp(3rem, 15vw, 4.75rem); }
  .pimlay-hero-actions > * { width: 100%; }
  .pimlay-demo, .pimlay-problem, .pimlay-showcase, .pimlay-product-strip, .pimlay-use-cases, .pimlay-output-gallery, .pimlay-api-section, .pimlay-beta-card { border-radius: 24px; }
  .pimlay-feature-grid, .pimlay-use-case-grid { grid-template-columns: 1fr; }
  .pimlay-section-head { align-items: flex-start; flex-direction: column; }
  .pimlay-auth-panel { max-width: none; }
}
