/* ══════════════════════════════════════════════
   Image3D Design System — Studio Pro Variant
   Inspired by Stitch "Studio Pro" dark mode
   ══════════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --bg: #0A0B10;
  --bg-raised: #12131A;
  --bg-surface: #161B22;
  --bg-hover: #1C2230;
  --bg-input: #0D0E14;

  --ink: #F0F0F5;
  --ink-secondary: #9CA3AF;
  --ink-muted: #6B7280;
  --ink-faint: #4B5563;

  --border: #30363D;
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-focus: rgba(0, 163, 255, 0.5);

  --primary: #00A3FF;
  --primary-hover: #33B5FF;
  --primary-ink: #FFFFFF;
  --accent: #22D3EE;
  --cta: #10B981;
  --cta-hover: #34D399;
  --ok: #34D399;
  --warn: #FBBF24;
  --err: #F87171;

  --radius: 12px;
  --radius-lg: 16px;
  --radius-sm: 8px;
  --container: min(1200px, calc(100% - 2rem));
  --shadow: 0 0 0 1px var(--border);
  --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.5);
  --glow-blue: 0 0 20px rgba(0, 163, 255, 0.25);
  --glow-green: 0 0 20px rgba(16, 185, 129, 0.3);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --font-heading: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'DM Sans', 'Inter', system-ui, sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }
img, canvas, svg { max-width: 100%; display: block; }

/* ── Typography ── */
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--ink);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.35rem, 3vw, 2rem); }
h3 { font-size: clamp(1rem, 2vw, 1.25rem); }

p {
  margin: 0;
  color: var(--ink-secondary);
}

code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85em;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--accent);
}

/* ── Layout ── */
.page {
  width: var(--container);
  margin: 0 auto 3rem;
}

.section {
  margin-top: 4rem;
}

.section-head {
  text-align: center;
  margin-bottom: 2rem;
}

.section-head p {
  color: var(--ink-muted);
  margin-top: 0.75rem;
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

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

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

.row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hidden { display: none !important; }

/* ── Navigation ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 120;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 11, 16, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.topbar-inner {
  width: var(--container);
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
}

.brand-highlight {
  color: var(--primary);
}

.brand-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  color: var(--ink-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.88rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color 150ms, background 150ms;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
  background: var(--bg-hover);
  outline: none;
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  font-family: var(--font-body);
  transition: all 150ms var(--ease);
}

.btn:hover,
.btn:focus-visible { outline: none; }

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.btn-sm {
  min-height: 34px;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: var(--glow-blue);
}

.btn-cta {
  color: #fff;
  background: var(--cta);
  border-color: var(--cta);
  border-radius: 999px;
  padding: 0.65rem 2rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.2);
}

.btn-cta:hover {
  background: var(--cta-hover);
  border-color: var(--cta-hover);
  box-shadow: 0 0 28px rgba(16, 185, 129, 0.35), 0 0 8px rgba(16, 185, 129, 0.2);
}

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

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

.btn-ghost:disabled {
  color: var(--ink-faint);
  border-color: var(--border);
}

/* ── Cards & Surfaces ── */
.surface,
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-surface);
  padding: 1.25rem;
}

.card {
  transition: border-color 200ms, box-shadow 200ms;
}

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

/* ── Forms ── */
label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--ink-secondary);
  font-weight: 600;
  font-size: 0.85rem;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--ink);
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-size: 0.92rem;
  transition: border-color 150ms, box-shadow 150ms;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 163, 255, 0.15);
}

input::placeholder,
textarea::placeholder {
  color: var(--ink-faint);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.form-grid {
  display: grid;
  gap: 0.85rem;
}

.form-error {
  margin-top: 0.25rem;
  color: var(--err);
  font-size: 0.8rem;
  min-height: 1rem;
}

/* ── Mode Switch ── */
.mode-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  padding: 3px;
}

.mode-switch button {
  border: 0;
  border-radius: 6px;
  min-height: 34px;
  padding: 0.35rem 0.85rem;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 150ms;
}

.mode-switch button.active {
  background: var(--primary);
  color: var(--primary-ink);
}

.mode-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  padding: 0.85rem;
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 6rem 0 3rem;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(0, 163, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-title {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, #FFFFFF 30%, #9CA3AF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  max-width: 560px;
  margin: 1.25rem auto 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink-muted);
  position: relative;
  z-index: 1;
}

.hero-cta {
  margin-top: 2.25rem;
  position: relative;
  z-index: 1;
}

/* ── Generation Workspace Panel ── */
.workspace-panel {
  margin-top: 3rem;
  border: 1px solid rgba(48, 54, 61, 0.8);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(22, 27, 34, 0.95) 0%, rgba(13, 14, 20, 0.98) 100%);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 163, 255, 0.06),
    0 4px 24px rgba(0, 0, 0, 0.4),
    0 0 60px rgba(0, 163, 255, 0.03);
}

.workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(18, 19, 26, 0.6);
  backdrop-filter: blur(8px);
}

.workspace-header-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink-secondary);
  letter-spacing: 0.02em;
}

.workspace-badge {
  font-size: 0.68rem;
  color: var(--ink-faint);
  padding: 0.18rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(13, 14, 20, 0.5);
  letter-spacing: 0.02em;
}

.workspace-body {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  min-height: 380px;
}

.workspace-controls {
  padding: 1.25rem;
  border-right: 1px solid var(--border);
  display: grid;
  gap: 0.7rem;
  align-content: start;
  background: rgba(10, 11, 16, 0.3);
}

.workspace-controls h3 {
  font-size: 0.95rem;
  margin-bottom: 0.1rem;
  color: var(--ink);
}

.workspace-controls label {
  font-size: 0.78rem;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.workspace-controls input,
.workspace-controls select,
.workspace-controls textarea {
  min-height: 36px;
  font-size: 0.85rem;
  background: rgba(10, 11, 16, 0.6);
  border-color: rgba(48, 54, 61, 0.6);
}

.workspace-controls textarea {
  min-height: 52px;
}

.workspace-preview {
  padding: 1.25rem;
  display: grid;
  gap: 0.85rem;
  align-content: start;
  position: relative;
}

.workspace-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.workspace-preview-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
}

.workspace-preview-area {
  border-radius: var(--radius);
  border: 1px solid rgba(0, 163, 255, 0.12);
  background: radial-gradient(ellipse at center, rgba(0, 163, 255, 0.04) 0%, var(--bg-input) 70%);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 163, 255, 0.03);
}

.workspace-preview-area canvas {
  width: 100%;
  height: 100%;
}

.workspace-preview-area img {
  max-height: 280px;
  object-fit: contain;
}

.workspace-actions {
  display: flex;
  gap: 0.5rem;
}

.workspace-actions .btn {
  font-size: 0.82rem;
  min-height: 34px;
  padding: 0.35rem 0.8rem;
}

/* ── Compact Control Row ── */
.control-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.control-row label {
  font-size: 0.78rem;
}

.control-row input,
.control-row select {
  min-height: 36px;
  font-size: 0.85rem;
}

/* ── Professional Generation Modes ── */
.mode-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-surface);
  overflow: hidden;
  transition: border-color 300ms, box-shadow 300ms, transform 300ms;
  position: relative;
}

.mode-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 0 20px rgba(0, 163, 255, 0.15);
  transition: opacity 300ms;
}

.mode-card:hover {
  border-color: rgba(0, 163, 255, 0.2);
  transform: translateY(-3px);
}

.mode-card:hover::after {
  opacity: 1;
}

.mode-card-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--bg-raised);
}

/* ── Placeholder Visuals ── */
.preview-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.preview-glow-orb {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 163, 255, 0.12) 0%, transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}

.preview-3d-icon {
  width: 80px;
  height: 80px;
  position: relative;
  z-index: 1;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.preview-placeholder-text {
  font-size: 0.78rem;
  color: var(--ink-faint);
  position: relative;
  z-index: 1;
}

.mode-card-visual {
  width: 100%;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.mode-card-visual svg {
  width: 80px;
  height: 80px;
  position: relative;
  z-index: 1;
}

.mode-card-character {
  background: radial-gradient(ellipse at center, rgba(34, 211, 238, 0.06) 0%, var(--bg-raised) 70%);
}

.mode-card-prop {
  background: radial-gradient(ellipse at center, rgba(0, 163, 255, 0.06) 0%, var(--bg-raised) 70%);
}

.mode-card-relief {
  background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.06) 0%, var(--bg-raised) 70%);
}

.mode-card-body {
  padding: 1.25rem;
}

.mode-card-body h3 {
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
}

.mode-card-body p {
  font-size: 0.85rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* ── Tool Layout ── */
.tool-shell {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 1rem;
}

.tool-preview {
  display: grid;
  gap: 0.85rem;
}

.canvas-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  min-height: 320px;
}

.canvas-wrap canvas {
  width: 100%;
  height: 100%;
}

.preview-foot {
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.status {
  margin-top: 0.35rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-secondary);
}

.status[data-tone="ok"] { color: var(--ok); }
.status[data-tone="warn"] { color: var(--warn); }
.status[data-tone="err"] { color: var(--err); }

/* ── AI Badge ── */
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  vertical-align: middle;
}

/* ── Pricing ── */
.pricing-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  padding: 3px;
}

.pricing-toggle button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  color: var(--ink-muted);
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 150ms;
}

.pricing-toggle button.active {
  background: var(--primary);
  color: var(--primary-ink);
}

.price {
  margin-top: 0.5rem;
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.price small {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(0, 163, 255, 0.25);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  background: rgba(0, 163, 255, 0.08);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
}

.badge[hidden] { display: none; }

.pricing-grid-detailed { align-items: stretch; }

.pricing-card-detailed {
  display: grid;
  gap: 0.75rem;
}

.pricing-feature-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.3rem;
}

.pricing-feature-list li {
  color: var(--ink-secondary);
}

.pricing-card-home-featured {
  border-color: rgba(0, 163, 255, 0.4);
  box-shadow: 0 0 20px rgba(0, 163, 255, 0.1), 0 0 0 1px rgba(0, 163, 255, 0.15);
  background: linear-gradient(180deg, rgba(0, 163, 255, 0.04) 0%, var(--bg-surface) 40%);
}

/* ── Table ── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: var(--bg-surface);
}

th, td {
  border-bottom: 1px solid var(--border);
  text-align: left;
  padding: 0.65rem 0.75rem;
}

th {
  color: var(--ink-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg-raised);
}

td {
  color: var(--ink-secondary);
}

/* ── Lists ── */
.list-tight {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
}

.list-tight li {
  margin: 0.2rem 0;
  color: var(--ink-secondary);
}

/* ── Notice ── */
.notice {
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  background: rgba(251, 191, 36, 0.06);
  color: var(--warn);
  font-size: 0.88rem;
}

/* ── Auth (Login / Workspace) ── */
.auth-wrap {
  width: min(920px, calc(100% - 1.2rem));
  margin: 3rem auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.auth-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-surface);
  padding: 1.5rem;
}

.auth-card h1,
.auth-card h2,
.auth-card h3 { color: var(--ink); }

.auth-card p,
.auth-card li { color: var(--ink-secondary); }

.auth-card label { color: var(--ink-secondary); }

.auth-divider {
  position: relative;
  text-align: center;
  color: var(--ink-faint);
  margin: 0.5rem 0;
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 38%;
  height: 1px;
  background: var(--border-hover);
}

.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

/* ── Footer ── */
.footer {
  width: var(--container);
  margin: 0 auto 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

.footer a {
  color: var(--ink-muted);
  transition: color 150ms;
}

.footer a:hover { color: var(--ink); }

/* ── Recall Banner ── */
#image3d-recall-banner {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: min(920px, calc(100% - 1.2rem));
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  z-index: 9997;
}

#image3d-recall-banner .recall-copy { display: grid; gap: 0.2rem; }
#image3d-recall-banner .recall-copy span { color: var(--ink-secondary); }
#image3d-recall-banner .recall-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

/* ── Checkout ── */
.checkout-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1rem;
}

/* ── Eyebrow ── */
.hero-eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 0.22rem 0.6rem;
  border: 1px solid rgba(0, 163, 255, 0.2);
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--primary);
  text-transform: uppercase;
  font-weight: 700;
  background: rgba(0, 163, 255, 0.06);
}

/* ── FAQ ── */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  background: var(--bg-surface);
}

.faq-item summary {
  cursor: pointer;
  padding: 0.85rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.faq-item summary::after {
  content: "+";
  font-size: 1.1rem;
  color: var(--ink-muted);
  transition: transform 200ms;
}

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

.faq-item p {
  padding: 0 1rem 0.85rem;
  color: var(--ink-secondary);
  font-size: 0.92rem;
}

/* ── Workbench (home inline tool) ── */
.workbench-lead-card,
.tool-shell-first {
  margin-top: 2rem;
}

.workbench-lead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.workbench-lead h2 { margin-top: 0.35rem; }

.muted-inline {
  color: var(--ink-muted);
  font-size: 0.88rem;
}

/* ── Preview Headline ── */
.preview-headline-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.preview-tip-badge {
  font-size: 0.72rem;
  color: var(--ink-muted);
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-raised);
  white-space: nowrap;
}

.preview-caption {
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* ── Mesh Receipt ── */
.mesh-receipt { display: grid; gap: 0.75rem; margin-top: 0.25rem; }

.mesh-receipt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mesh-receipt-badge {
  font-size: 0.72rem;
  color: var(--ok);
  padding: 0.2rem 0.6rem;
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.06);
}

.mesh-receipt-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.mesh-receipt-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  background: var(--bg-raised);
  display: grid;
  gap: 0.2rem;
}

.mesh-receipt-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  font-weight: 700;
}

/* ── Maintenance chip ── */
.maintenance-chip {
  font-size: 0.82rem;
  color: var(--ink-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  display: inline-flex;
  width: fit-content;
}

/* ── Quality Buttons (tool page) ── */
.quality-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  color: var(--ink-secondary);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 150ms;
}

.quality-btn:hover {
  border-color: var(--border-hover);
  color: var(--ink);
}

.quality-btn.active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0, 163, 255, 0.08);
}

/* ── Responsive ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 1040px) {
  .grid-3 { grid-template-columns: 1fr; }

  .workspace-body {
    grid-template-columns: 1fr;
  }

  .workspace-controls {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .tool-shell {
    grid-template-columns: 1fr;
  }

  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .auth-wrap {
    grid-template-columns: 1fr;
  }

  .mesh-receipt-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .grid-2 { grid-template-columns: 1fr; }

  .hero {
    padding: 3rem 0 2rem;
  }

  h1 { font-size: 1.75rem; }

  .control-row {
    grid-template-columns: 1fr;
  }

  .mesh-receipt-grid {
    grid-template-columns: 1fr;
  }

  .pricing-grid-detailed {
    grid-template-columns: 1fr;
  }

  .topbar-inner {
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: auto;
    padding: 0.5rem 0;
  }

  .nav-links {
    order: 3;
    width: 100%;
    overflow-x: auto;
    gap: 0;
  }
}
