:root {
  --bg: #02040a;
  --surface: rgba(24, 24, 27, 0.74);
  --surface-strong: rgba(12, 13, 18, 0.92);
  --text: #ffffff;
  --muted: #a1a1aa;
  --dim: #71717a;
  --border: rgba(255, 255, 255, 0.11);
  --border-strong: rgba(255, 255, 255, 0.18);
  --accent: #f4f4f5;
  --green: #57f2a7;
  --blue: #6fb6ff;
  --panel-radius: 24px;
  --control-radius: 23px;
  --shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
  --font-heading: "Bricolage Grotesque", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-display: var(--font-heading);
  --font-body: var(--font-sans);
}

body[data-theme="light"] {
  --bg: #f7f7f4;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --text: #09090b;
  --muted: #52525b;
  --dim: #71717a;
  --border: rgba(9, 9, 11, 0.12);
  --border-strong: rgba(9, 9, 11, 0.2);
  --accent: #02040a;
  --shadow: 0 24px 70px rgba(24, 24, 27, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
}

button,
input {
  font: inherit;
}

button {
  height: 46px;
  border: 1px solid var(--border-strong);
  border-radius: var(--control-radius);
  padding: 0 20px;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: default;
  opacity: 0.55;
  transform: none;
}

button.ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

#fjord-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 88%);
}

.shell {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100vw - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 0 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  height: 64px;
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 40;
}

.mol-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.atom-brand-mark {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: conic-gradient(
    from 215deg,
    #ff3b30,
    #ff9500,
    #ffcc00,
    #34c759,
    #00c7be,
    #007aff,
    #5856d6,
    #af52de,
    #ff2d55,
    #ff3b30
  );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32), 0 8px 20px rgba(0, 0, 0, 0.18);
}

.atom-brand-mark::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 1.5px;
  background: #050505;
  box-shadow:
    -7px 7px #050505,
    0 7px #050505,
    7px 7px #050505;
}

.primary-nav,
.topbar-nav {
  display: flex;
  align-items: center;
}

.primary-nav {
  gap: 28px;
  margin-left: 120px;
}

.topbar-search {
  flex: 1;
  display: flex;
  justify-content: center;
}

.topbar-search-input {
  width: 100%;
  max-width: 280px;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.topbar-search-input::placeholder {
  color: var(--text);
  opacity: 0.35;
}

.topbar-search-input:focus {
  border-color: var(--accent, #007aff);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.topbar-nav {
  gap: 10px;
  margin-left: auto;
}

.atom-nav-item {
  position: relative;
  height: 32px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
}

.atom-nav-item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff3b30, #ffcc00, #34c759, #00c7be, #007aff, #af52de);
  opacity: 0;
  transform: scaleX(0.6);
  transition: opacity 180ms ease, transform 180ms ease;
}

.atom-nav-item:hover,
.atom-nav-item.active {
  color: var(--text);
  transform: none;
}

.atom-nav-item:hover::after,
.atom-nav-item.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.atom-pill-btn {
  height: 32px;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(18px);
  color: var(--muted);
}

.atom-pill-btn:hover,
.atom-pill-btn.active {
  color: var(--text);
  transform: none;
}

.org-how-to-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(var(--bg-rgb, 2 4 10) / 0.72);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

body[data-theme="light"] .org-how-to-overlay {
  background: rgba(247, 247, 244, 0.72);
}

.org-how-to-overlay.hidden {
  display: none;
}

.org-how-to-panel {
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  border-radius: var(--panel-radius);
  width: 100%;
  max-width: 580px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.how-to-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 28px 0;
}

.how-to-head h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
}

.atom-close-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  font-size: 13px;
  flex-shrink: 0;
}

.how-to-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mol-how-to-step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.atom-step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--dim);
  padding-top: 3px;
  flex-shrink: 0;
  width: 22px;
}

.mol-how-to-step h3 {
  margin: 0 0 4px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.mol-how-to-step p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}

.mol-how-to-step code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--text);
}

.how-to-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--border);
}

.how-to-footer p {
  margin: 0;
  font-size: 10px;
  color: var(--dim);
}

.mol-theme-toggle {
  display: flex;
  gap: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  background: var(--surface);
  backdrop-filter: blur(18px);
}

.atom-icon-btn {
  width: 32px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: transparent;
  color: var(--muted);
}

.atom-icon-btn:hover {
  transform: none;
}

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

.atom-icon-btn svg {
  width: 14px;
  height: 14px;
  display: block;
}

.tmpl-workbench {
  position: relative;
  display: flex;
  min-height: 56vh;
  padding: 80px 0 22px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
}

.intro {
  max-width: 820px;
  padding-bottom: 18px;
}

.atom-eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-family: var(--font-heading);
  font-size: 56px;
  font-weight: 600;
  line-height: 1.04;
  text-wrap: balance;
}

.atom-rainbow-text {
  display: inline-block;
  color: transparent;
  background:
    linear-gradient(
      92deg,
      #ff2d55 0%,
      #ff6b35 14%,
      #30d158 30%,
      #00c7ff 46%,
      #0a84ff 62%,
      #7c3cff 78%,
      #bf5af2 90%,
      #ff2d55 100%
    );
  background-size: 180% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 18px rgba(255, 45, 85, 0.2));
}

.lede {
  max-width: 640px;
  margin-bottom: 24px;
  margin-left: auto;
  margin-right: auto;
  color: var(--muted);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
}

.org-import-form,
.org-mission-panel,
.org-document-panel,
.inspector section,
.org-sample-card {
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.org-import-form {
  position: relative;
  width: 100%;
  padding: 32px 24px 24px;
  text-align: left;
  border-color: transparent;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
}

.org-import-form::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    115deg,
    rgba(255, 59, 48, 0.72) 0%,
    rgba(255, 149, 0, 0.72) 16%,
    rgba(255, 204, 0, 0.7) 32%,
    rgba(52, 199, 89, 0.72) 48%,
    rgba(0, 199, 190, 0.72) 64%,
    rgba(0, 122, 255, 0.74) 80%,
    rgba(175, 82, 222, 0.72) 100%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.org-import-form > * {
  position: relative;
  z-index: 1;
}

body[data-theme="light"] .org-import-form::before {
  background: linear-gradient(
    115deg,
    rgba(255, 59, 48, 0.64) 0%,
    rgba(255, 149, 0, 0.64) 16%,
    rgba(255, 204, 0, 0.62) 32%,
    rgba(52, 199, 89, 0.64) 48%,
    rgba(0, 199, 190, 0.64) 64%,
    rgba(0, 122, 255, 0.66) 80%,
    rgba(175, 82, 222, 0.64) 100%
  );
}

.org-import-form > label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.mol-url-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.mol-input-with-preview {
  position: relative;
  min-width: 0;
}

.mol-url-input-row input {
  width: 100%;
  min-width: 0;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--control-radius);
  padding: 0 58px 0 18px;
  outline: none;
  background: rgba(78, 79, 84, 0.62);
  color: var(--text);
}

.input-preview-cycle {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 32px;
  height: 32px;
  transform: translateY(-50%);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.input-preview-item {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.input-preview-image {
  position: relative;
  overflow: hidden;
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(245, 239, 232, 0.74)),
    #f5efe8;
}

.input-preview-image::before,
.input-preview-image::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.input-preview-image::before {
  z-index: 0;
  background:
    linear-gradient(90deg, #ffb13b 0 28%, #f472b6 28% 52%, #d4d4d8 52% 74%, #5f6169 74% 100%),
    linear-gradient(135deg, #ffffff 0 40%, #dbeafe 40% 64%, #bfdbfe 64% 100%);
  background-size: 100% 8px, 100% 100%;
  background-position: left bottom, center;
  background-repeat: no-repeat;
  animation: inputPreviewFallback 4.8s ease-in-out infinite;
}

.input-preview-image::after {
  z-index: 2;
  background:
    linear-gradient(90deg, transparent 0 12%, rgba(255, 255, 255, 0.78) 38%, transparent 66%),
    linear-gradient(180deg, transparent 0 54%, rgba(0, 0, 0, 0.16) 100%);
  transform: translateX(-120%);
  animation: inputPreviewSweep 2.6s ease-in-out infinite;
}

.input-preview-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  animation: inputScreenshotSwap 10s linear infinite;
  z-index: 1;
}

.input-preview-image img:nth-child(1) { animation-delay: 0s; }
.input-preview-image img:nth-child(2) { animation-delay: 1s; }
.input-preview-image img:nth-child(3) { animation-delay: 2s; }
.input-preview-image img:nth-child(4) { animation-delay: 3s; }
.input-preview-image img:nth-child(5) { animation-delay: 4s; }
.input-preview-image img:nth-child(6) { animation-delay: 5s; }
.input-preview-image img:nth-child(7) { animation-delay: 6s; }
.input-preview-image img:nth-child(8) { animation-delay: 7s; }
.input-preview-image img:nth-child(9) { animation-delay: 8s; }
.input-preview-image img:nth-child(10) { animation-delay: 9s; }

.mol-input-with-preview:has(input:not(:placeholder-shown)) .input-preview-cycle,
.org-import-form.importing .input-preview-cycle {
  opacity: 0;
  transform: translateY(-50%) scale(0.96);
}

@keyframes inputScreenshotSwap {
  0%,
  10% {
    opacity: 1;
    transform: scale(1);
  }
  12%,
  97% {
    opacity: 0;
    transform: scale(1.04);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes inputPreviewFallback {
  0% {
    filter: hue-rotate(0deg) saturate(0.95);
    transform: scale(1);
  }
  35% {
    filter: hue-rotate(22deg) saturate(1.14);
    transform: scale(1.08) translateY(-1px);
  }
  70% {
    filter: hue-rotate(-18deg) saturate(1.08);
    transform: scale(1.04) translateX(1px);
  }
  100% {
    filter: hue-rotate(0deg) saturate(0.95);
    transform: scale(1);
  }
}

@keyframes inputPreviewSweep {
  0%,
  42% {
    transform: translateX(-120%);
    opacity: 0;
  }
  58% {
    opacity: 1;
  }
  82%,
  100% {
    transform: translateX(120%);
    opacity: 0;
  }
}

.url-progress-bar {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: var(--control-radius);
  border: 1px solid rgba(111, 182, 255, 0.4);
  background: rgba(78, 79, 84, 0.62);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 0 8px;
  pointer-events: none;
}

.url-progress-bar::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--fill, 0%);
  background: rgba(111, 182, 255, 0.13);
  border-radius: inherit;
  transition: width 0.4s ease;
}

.url-progress-bar.done {
  border-color: rgba(87, 242, 167, 0.45);
}

.url-progress-bar.done::before {
  background: rgba(87, 242, 167, 0.1);
}

.upb-current {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.atom-spinner-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1.5px solid var(--blue);
  border-top-color: transparent;
  animation: spin 700ms linear infinite;
}

.atom-spinner-dot.checked {
  background: var(--green);
  border-color: var(--green);
  animation: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: #000;
  font-weight: 800;
}

.atom-spinner-dot.checked::after {
  content: '✓';
}

#url-progress-label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upb-steps {
  display: flex;
  gap: 5px;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.atom-progress-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dim);
  opacity: 0.3;
  transition: background 0.25s, opacity 0.25s;
}

.atom-progress-dot.active {
  background: var(--blue);
  opacity: 1;
}

.atom-progress-dot.complete {
  background: var(--green);
  opacity: 1;
}

.org-import-form.importing #url-input {
  color: transparent;
  caret-color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}

body[data-theme="light"] .org-import-form.importing #url-input,
body[data-theme="dark"] .org-import-form.importing #url-input {
  color: transparent !important;
  caret-color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}

body[data-theme="light"] .url-progress-bar {
  background: rgba(9, 9, 11, 0.035);
  border-color: rgba(43, 112, 255, 0.3);
}

body[data-theme="light"] .url-progress-bar::before {
  background: rgba(43, 112, 255, 0.07);
}

body[data-theme="light"] .url-progress-bar.done {
  border-color: rgba(9, 9, 11, 0.45);
}

body[data-theme="light"] .url-progress-bar.done::before {
  background: rgba(9, 9, 11, 0.08);
}

body[data-theme="light"] #url-progress-label {
  color: var(--text);
}

body[data-theme="light"] .atom-spinner-dot.checked,
body[data-theme="light"] .atom-progress-dot.complete {
  background: #09090b;
  border-color: #09090b;
}

.mol-url-input-row input::placeholder {
  color: var(--dim);
  font-size: 15px;
  font-weight: 300;
}

.mol-url-input-row input:focus {
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

body[data-theme="light"] .mol-url-input-row input {
  background: rgba(9, 9, 11, 0.042);
  border-color: rgba(9, 9, 11, 0.16);
  color: #09090b;
}

body[data-theme="light"] .input-preview-item {
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(9, 9, 11, 0.12);
  color: rgba(9, 9, 11, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

body[data-theme="light"] .mol-url-input-row input::placeholder {
  color: #71717a;
}

body[data-theme="light"] .mol-url-input-row input:focus {
  border-color: rgba(9, 9, 11, 0.4);
  box-shadow: 0 0 0 4px rgba(9, 9, 11, 0.08);
}

body[data-theme="light"] #import-btn {
  background: #09090b;
  color: #ffffff;
  border-color: #09090b;
}

#import-btn {
  font-size: 14px;
  font-weight: 600;
}

body[data-theme="light"] .mol-step-item {
  background: rgba(0, 0, 0, 0.04);
}

body[data-theme="light"] .mol-step-item::before {
  background: rgba(111, 182, 255, 0.1);
}

body[data-theme="light"] .mol-step-item.done::before {
  background: rgba(9, 9, 11, 0.08);
}

body[data-theme="light"] .mol-step-item.done {
  border-color: rgba(9, 9, 11, 0.28);
  color: #09090b;
}

body[data-theme="light"] .mol-step-item.done .atom-step-dot {
  border-color: #09090b;
  background: #09090b;
}

body[data-theme="light"] .mol-step-item.done .step-counter {
  color: #09090b;
}

body[data-theme="light"] .progress-track {
  background: rgba(0, 0, 0, 0.08);
}

.command-explainer {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.command-explainer p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.explainer-grid {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.explainer-grid::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 50%;
  height: 16px;
  transform: translateY(-50%);
  background:
    radial-gradient(22px 14px at 24px 1px, transparent 65%, var(--border) 68%, transparent 72%) 0 0 / 92px 16px repeat-x;
  opacity: 0.9;
  pointer-events: none;
}

.explainer-grid span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex: 1 1 0;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  font-size: 10px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.explainer-grid b {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid color-mix(in srgb, var(--muted) 55%, transparent);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  flex: 0 0 auto;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  width: 34px;
  height: 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  position: relative;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 180ms ease, background 180ms ease;
}

.switch input:checked + span::after {
  transform: translateX(14px);
  background: var(--green);
}

.import-wrapper {
  position: relative;
  width: min(680px, 100%);
  max-width: 760px;
}

.org-mission-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 100;
  padding: 14px;
  text-align: left;
  max-height: 250px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mission-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 8px;
}

.mission-label {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.mission-domain {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
}

.mission-status-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.mission-status-row h2 {
  margin: 0 0 4px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
}

.mission-detail {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.atom-pill-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 9px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.mission-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.mission-footer button {
  height: 32px;
  border-radius: 999px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
}

.import-status-btn {
  background: var(--text) !important;
  color: var(--bg) !important;
  border-color: transparent !important;
}

.result-header,
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.result-header h2 {
  margin-bottom: 8px;
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0;
}

.result-header p:not(.atom-eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.atom-pill-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
}

.progress-track {
  height: 6px;
  margin: 8px 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.atom-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #ffffff, var(--green), var(--blue));
  transition: width 320ms ease;
}

.step-list {
  display: grid;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
  max-height: 210px;
  overflow-y: auto;
}

.mol-step-item {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 8px 14px;
  background: rgba(2, 4, 10, 0.28);
  color: var(--muted);
  font-size: 12px;
}

.mol-step-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: var(--fill, 0%);
  background: rgba(111, 182, 255, 0.12);
  border-radius: inherit;
  transition: width 0.4s ease;
  z-index: 0;
}

.mol-step-item > * {
  position: relative;
  z-index: 1;
}

.mol-step-item .atom-step-dot {
  width: 13px;
  height: 13px;
  border: 1px solid var(--dim);
  border-radius: 50%;
}

.step-counter {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.mol-step-item.running {
  border-color: rgba(111, 182, 255, 0.45);
  color: var(--text);
}

.mol-step-item.running .atom-step-dot {
  border-color: var(--blue);
  border-top-color: transparent;
  animation: spin 800ms linear infinite;
}

.mol-step-item.running .step-counter {
  color: var(--blue);
}

.mol-step-item.done {
  border-color: rgba(87, 242, 167, 0.32);
  color: var(--text);
}

.mol-step-item.done::before {
  background: rgba(87, 242, 167, 0.1);
}

.mol-step-item.done .atom-step-dot {
  border-color: var(--green);
  background: var(--green);
}

.mol-step-item.done .step-counter {
  color: var(--green);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.results {
  padding-top: 80px;
}

.result-header {
  padding: 22px 0;
  border-top: 1px solid var(--border);
}

.top-actions {
  display: flex;
  gap: 10px;
}

.tmpl-result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 390px;
  gap: 20px;
  align-items: start;
}

.org-document-panel,
.inspector section {
  padding: 18px;
}

.panel-head {
  margin-bottom: 14px;
}

.panel-head h3 {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

pre {
  max-height: 760px;
  margin: 0;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  background: rgba(2, 4, 10, 0.64);
  color: #e4e4e7;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.inspector {
  display: grid;
  gap: 14px;
}

.summary-list {
  display: grid;
  gap: 10px;
}

.mol-signal-item {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.mol-signal-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.mol-signal-item h4 {
  margin: 0 0 5px;
  font-size: 14px;
  font-weight: 600;
}

.mol-signal-item p,
.asset-list li,
.next-list li {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.asset-list,
.next-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
}

.asset-list li {
  word-break: break-word;
}

.tmpl-collection {
  padding: 0 0 54px;
}

body[data-view="design"] .tmpl-collection {
  padding-top: 100px;
}

.tmpl-collection__head {
  display: grid;
  justify-items: center;
  gap: 10px;
  max-width: 680px;
  margin: 0 auto 22px;
  text-align: center;
}

.tmpl-collection__head h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: 0;
}

.tmpl-collection__head p:not(.atom-eyebrow) {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.collection-search-row {
  margin-bottom: 28px;
}

.tmpl-collection__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 18px;
  background: rgba(18, 18, 22, 0.92);
}

.collection-actions {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.see-all-designs {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.tmpl-collection[data-collection-view="design"] .collection-actions {
  margin-top: 24px;
}

.tmpl-collection[data-collection-view="design"] .see-all-designs.is-complete {
  display: none;
}

body[data-theme="light"] .tmpl-collection__grid {
  border-color: #e8e8e8;
  background: rgba(255, 255, 255, 0.96);
}

.org-sample-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--card-radius, 13px);
  padding: 0;
  overflow: hidden;
  background: rgba(26, 26, 32, 0.97);
  color: var(--text);
  text-align: left;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  backdrop-filter: none;
  cursor: pointer;
}

.org-sample-card--preview {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  width: min(360px, calc(100% - 24px));
  transform: translateX(-50%);
  z-index: 95;
  border: 1px solid var(--border-strong);
  border-radius: var(--card-radius, 13px);
  background: rgba(24, 24, 30, 0.94);
  color: var(--text);
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  pointer-events: none;
  text-align: left;
}

.org-sample-card--preview.is-importing-preview::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  height: 3px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.92), transparent),
    rgba(127, 127, 127, 0.22);
  background-size: 120px 100%, 100% 100%;
  animation: importRail 1.05s linear infinite;
  z-index: 3;
}

.org-sample-card--preview.hidden {
  display: none;
}

.org-sample-card--preview.is-leaving {
  opacity: 0;
}

.org-sample-card--preview .sample-preview {
  margin: 10px 8px 0;
  height: 184px;
}

.org-sample-card--preview .sample-preview::before,
.org-sample-card--preview .sample-preview::after {
  z-index: 2;
}

.org-sample-card--preview strong {
  display: block;
  padding: 12px 14px 0;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-sample-card--preview .sample-url {
  display: block;
  padding: 9px 14px 0;
  color: var(--muted);
  opacity: 0.7;
  font-family: var(--font-mono);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-sample-card--preview .atom-palette-bar {
  margin: 10px 14px 0;
}

.org-sample-card--preview small {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 12px 14px 14px;
  color: var(--muted);
  font-size: 12px;
}

.org-sample-card.incoming-target {
  opacity: 0;
}

.import-preview-ghost {
  transform-origin: center;
  will-change: transform, opacity, clip-path;
}

.import-preview-ghost.is-paper-plane {
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.72);
  border-radius: 18px 10px 18px 8px;
  clip-path: polygon(0 10%, 100% 50%, 0 90%, 22% 52%);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.import-preview-ghost.is-paper-plane::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 8;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.72) 0 34%, transparent 35%),
    linear-gradient(30deg, transparent 0 42%, rgba(0, 0, 0, 0.24) 43% 47%, transparent 48%),
    linear-gradient(210deg, transparent 0 52%, rgba(255, 255, 255, 0.34) 53% 70%, transparent 71%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.import-preview-ghost.is-paper-plane::after {
  content: "";
  position: absolute;
  left: -44px;
  top: 50%;
  width: 58px;
  height: 2px;
  z-index: 7;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8));
  transform: translateY(-50%);
  pointer-events: none;
}

.import-preview-ghost.is-paper-plane .atom-palette-bar,
.import-preview-ghost.is-paper-plane strong,
.import-preview-ghost.is-paper-plane .sample-url,
.import-preview-ghost.is-paper-plane small,
.import-preview-ghost.is-paper-plane .import-card-busy {
  opacity: 0;
}

/* Last-import hover card — persists below the input after a card flies to the collection */
.last-import-hover {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  width: min(300px, calc(100% - 24px));
  transform: translateX(-50%) translateY(6px);
  z-index: 94;
  border: 1px solid var(--border-strong);
  border-radius: var(--card-radius, 13px);
  background: rgba(24, 24, 30, 0.96);
  color: var(--text);
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  pointer-events: none;
  text-align: left;
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}

.last-import-hover.hidden {
  display: none;
}

.last-import-hover.pinned {
  opacity: 1 !important;
  transform: translateX(-50%) translateY(0) !important;
  pointer-events: auto;
}

.import-wrapper:hover .last-import-hover:not(.hidden):not(.flying-out),
.org-import-form:focus-within ~ .last-import-hover:not(.hidden):not(.flying-out) {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.last-import-hover__preview {
  display: block;
  margin: 10px 8px 0;
  height: 150px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-raised, #18181e);
}

.last-import-hover__screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.last-import-hover__palette {
  margin: 10px 14px 0;
}

.last-import-hover__name {
  display: block;
  padding: 10px 14px 0;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.last-import-hover__url {
  display: block;
  padding: 6px 14px 0;
  color: var(--muted);
  opacity: 0.7;
  font-family: var(--font-mono);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.last-import-hover__author {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 10px 14px 12px;
  color: var(--muted);
  font-size: 12px;
}

.last-import-hover__delete {
  position: absolute;
  top: 14px;
  right: 12px;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(220, 38, 38, 0.94);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.9);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  transition: opacity 0.15s, transform 0.15s, background 0.15s;
  z-index: 3;
}

.last-import-hover:hover .last-import-hover__delete,
.last-import-hover:focus-within .last-import-hover__delete {
  opacity: 1;
  transform: scale(1);
}

.last-import-hover__delete svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.last-import-hover__delete:hover {
  background: #b91c1c;
}

body[data-theme="light"] .last-import-hover {
  background: rgba(255, 255, 255, 0.97);
  color: #0a0a0a;
  border-color: #ececec;
}

body[data-theme="light"] .org-sample-card {
  border-color: #ececec;
  background: #ffffff;
  color: #0a0a0a;
  box-shadow: none;
}

body[data-theme="light"] .org-sample-card--preview {
  border-color: #ececec;
  background: rgba(255, 255, 255, 0.96);
  color: #0a0a0a;
}

.org-sample-card:hover {
  border-color: var(--border-strong);
  background: rgba(30, 30, 38, 0.95);
  transform: translateY(-2px);
}

body[data-theme="light"] .org-sample-card:hover {
  border-color: #dadada;
  background: #ffffff;
}

.sample-preview {
  position: relative;
  display: block;
  height: 212px;
  overflow: visible;
  border-radius: 12px;
  margin: 16px 7px 0;
  background: #f4f1ec;
}

.atom-img-placeholder {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: #e7e7e7;
  display: grid;
  place-items: center;
  z-index: 0;
}

.atom-img-placeholder.hidden {
  display: none;
}

.import-card-busy {
  position: absolute;
  top: 12px;
  right: 9px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  z-index: 4;
  opacity: 0;
  transform: scale(0.82);
  pointer-events: none;
}

.import-card-status {
  position: absolute;
  top: 12px;
  right: 38px;
  z-index: 4;
  max-width: calc(100% - 56px);
  min-height: 24px;
  display: none;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.86);
  color: #111111;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.import-card-busy::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: inherit;
  border: 2px solid rgba(10, 10, 10, 0.18);
  border-top-color: #111111;
  animation: importSpin 780ms linear infinite;
}

.org-sample-card--preview.is-importing-preview .import-card-busy,
.org-sample-card.is-importing-profile .import-card-busy {
  opacity: 1;
  transform: scale(1);
}

.org-sample-card.is-importing-profile .import-card-status {
  display: inline-flex;
}

/* Error state */
.card-error-state {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  text-align: center;
  background: var(--surface, #111117);
}

.org-sample-card.is-import-failed .card-error-state {
  display: flex;
}

.org-sample-card.is-import-failed .card-screenshot,
.org-sample-card.is-import-failed .atom-img-placeholder,
.org-sample-card.is-import-failed .import-card-busy {
  display: none;
}

.card-error-icon {
  width: 28px;
  height: 28px;
  color: var(--dim, #555);
  flex-shrink: 0;
}

.card-error-msg {
  font-size: 11px;
  line-height: 1.4;
  color: var(--dim, #888);
  max-width: 160px;
}

.card-retry-btn {
  margin-top: 2px;
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 20px;
  border: 1px solid var(--border-strong, #333);
  background: transparent;
  color: var(--text, #fff);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.card-retry-btn:hover {
  background: var(--surface-raised, #1e1e26);
  border-color: var(--border-strong, #555);
}

.atom-tetris-loader {
  width: 42px;
  height: 42px;
  position: relative;
}

.atom-tetris-loader i {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--dim);
  animation: tetrisFloat 1.25s infinite ease-in-out;
}

.atom-tetris-loader i:nth-child(1) { left: 0; top: 14px; animation-delay: 0s; }
.atom-tetris-loader i:nth-child(2) { left: 14px; top: 14px; animation-delay: 0.15s; }
.atom-tetris-loader i:nth-child(3) { left: 28px; top: 14px; animation-delay: 0.3s; }
.atom-tetris-loader i:nth-child(4) { left: 14px; top: 0; animation-delay: 0.45s; }

@keyframes tetrisFloat {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50% { transform: translateY(-8px); opacity: 1; }
}

@keyframes importRail {
  0% { background-position: -120px 0, 0 0; }
  100% { background-position: 120px 0, 0 0; }
}

@keyframes importSpin {
  to { transform: rotate(360deg); }
}

.card-screenshot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 10px;
  z-index: 0;
}

.org-sample-card--preview.is-importing-preview.card-image-loaded .card-screenshot,
.org-sample-card.is-importing-profile.card-image-loaded .card-screenshot {
  animation: imageBlindsOpen var(--image-render-duration, 8.6s) linear both;
}

.org-sample-card--preview.card-image-loaded .sample-preview::after,
.org-sample-card.is-importing-profile.card-image-loaded .sample-preview::after {
  background:
    repeating-linear-gradient(
      90deg,
      rgba(12, 12, 16, 0.94) 0 14px,
      rgba(12, 12, 16, 0.12) 14px 28px
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, transparent 38%, rgba(0, 0, 0, 0.22) 100%);
  animation: blindsLift var(--image-render-duration, 8.6s) linear both;
}

@keyframes imageBlindsOpen {
  0% {
    opacity: 0.34;
    filter: saturate(0.78) contrast(0.92);
    clip-path: inset(0 0 0 0);
    -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 3px, transparent 3px 28px);
    mask-image: repeating-linear-gradient(90deg, #000 0 3px, transparent 3px 28px);
  }
  45% {
    opacity: 0.82;
    -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 14px, transparent 14px 28px);
    mask-image: repeating-linear-gradient(90deg, #000 0 14px, transparent 14px 28px);
  }
  100% {
    opacity: 1;
    filter: saturate(1) contrast(1);
    -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 28px, transparent 28px 28px);
    mask-image: repeating-linear-gradient(90deg, #000 0 28px, transparent 28px 28px);
  }
}

@keyframes blindsLift {
  0% {
    opacity: 1;
    background-size: 28px 100%, 100% 100%;
  }
  70% {
    opacity: 0.4;
  }
  100% {
    opacity: 0;
    background-size: 120px 100%, 100% 100%;
  }
}

.card-screenshot.hidden {
  display: none;
}

.org-sample-card.card-image-failed .sample-preview {
  background: #ececec;
}

.sample-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06) 0%,
    transparent 38%,
    rgba(0, 0, 0, 0.22) 100%
  );
  pointer-events: none;
}

.sample-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.10) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.org-sample-card strong {
  display: block;
  padding: 16px 16px 0;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-theme="light"] .org-sample-card strong {
  color: #050505;
}

.org-sample-card .sample-url {
  display: block;
  padding: 12px 16px 0;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--muted);
  opacity: 0.55;
  white-space: normal;
  overflow-wrap: anywhere;
  letter-spacing: 0.01em;
  line-height: 1.35;
}

body[data-theme="light"] .org-sample-card .sample-url {
  color: #888888;
}

.org-sample-card small {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 16px 16px 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
}

body[data-theme="light"] .org-sample-card small {
  color: #666666;
}

.org-sample-card small i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.06));
  font-style: normal;
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 11px;
}

.atom-avatar-sm {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

body[data-theme="light"] .org-sample-card small i {
  background: linear-gradient(135deg, #ececec, #c9c9c9);
  color: #777;
}

.org-sample-card small b {
  color: #777777;
  font-size: 12px;
  font-weight: 400;
}

.org-sample-card small b::before {
  content: "⊙";
  margin-right: 6px;
  color: #9b9b9b;
}

.atom-danger-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.68);
  background: rgba(220, 38, 38, 0.94);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.88);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  transition: opacity 0.15s, transform 0.15s, background 0.15s;
  z-index: 10;
}

.org-sample-card:hover .atom-danger-btn,
.org-sample-card:focus .atom-danger-btn,
.org-sample-card:focus-within .atom-danger-btn {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.atom-danger-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.atom-danger-btn:hover {
  background: #b91c1c;
  color: #fff;
}

@media (hover: none) {
  .atom-danger-btn {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
  }
}

.mock-nav,
.terminal-copy,
.mock-hero,
.type-pill,
.mesh,
.matrix,
.metric,
.dashboard-block,
.pink-panel {
  position: absolute;
  z-index: 1;
}

.mock-nav {
  top: 18px;
  left: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-sans);
  font-size: 8px;
  font-weight: 700;
}

.pill-nav {
  left: 50%;
  transform: translateX(-50%);
  border-radius: 999px;
  padding: 7px 18px;
  background: rgba(255, 255, 255, 0.82);
  color: #07110e;
}

.mock-hero {
  top: 42px;
  left: 30px;
  right: 30px;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 28px;
  line-height: 1.02;
  letter-spacing: 0;
}

.mock-hero em {
  color: #59f0a7;
  font-style: italic;
}

.terminal-copy {
  top: 34px;
  left: 26px;
  right: 28px;
  color: #f4f4f5;
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.04;
}

.atom-palette-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 16px;
  margin: 12px 16px 0;
  overflow: hidden;
  border-radius: 5px;
  border: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.atom-palette-bar i:nth-child(1) { background: #111111; }
.atom-palette-bar i:nth-child(2) { background: #ffffff; }
.atom-palette-bar i:nth-child(3) { background: #d4d4d8; }
.atom-palette-bar i:nth-child(4) { background: #71717a; }

.type-pill {
  right: 0;
  top: calc(100% + 14px);
  min-width: 120px;
  border: 1px solid rgba(255, 255, 255, 0.23);
  border-radius: 10px;
  padding: 7px 10px;
  background: rgba(0, 0, 0, 0.62);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.type-pill b {
  font-weight: 600;
  color: #d6d6d6;
}

.sample-terra .sample-preview {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0 39%, rgba(255, 255, 255, 0.52) 40%, transparent 52%),
    radial-gradient(circle at 72% 75%, #ffd287, transparent 26%),
    radial-gradient(circle at 46% 74%, #33d89b, transparent 24%),
    radial-gradient(circle at 23% 66%, #d8fbff, transparent 30%),
    #eff5ee;
}

.sample-terra .mock-nav,
.sample-terra .mock-hero {
  color: #111827;
}

.sample-terra .mock-hero em {
  color: #15a66a;
}

.sample-web3 .sample-preview {
  background:
    radial-gradient(circle at 50% 100%, #173f82, transparent 42%),
    linear-gradient(180deg, #020204, #091226);
}

.sample-web3 .mesh,
.sample-immersive .mesh {
  inset: 82px -20px -25px;
  background:
    repeating-linear-gradient(12deg, rgba(94, 158, 255, 0.32) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(-18deg, rgba(94, 158, 255, 0.22) 0 1px, transparent 1px 34px);
  transform: perspective(280px) rotateX(58deg);
  border-radius: 50%;
}

.sample-nexusflow .sample-preview {
  background:
    repeating-linear-gradient(90deg, rgba(116, 255, 191, 0.24) 0 6px, rgba(0, 0, 0, 0) 6px 20px),
    radial-gradient(circle at 50% 45%, #20e6a5, transparent 20%),
    linear-gradient(180deg, #021a14, #020403);
}

.sample-nexusflow .mock-hero {
  top: 62px;
  text-align: center;
}

.sample-synth .sample-preview {
  background: #030806;
}

.sample-synth .matrix {
  inset: 18px 22px 24px 52%;
  background-image:
    linear-gradient(rgba(33, 255, 151, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(33, 255, 151, 0.15) 1px, transparent 1px);
  background-size: 8px 8px;
  opacity: 0.9;
}

.sample-gridui .sample-preview {
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    #161616;
  background-size: 22px 22px;
}

.metric {
  top: 48px;
  left: 52px;
  color: #a7f9ff;
  font-size: 48px;
  font-weight: 300;
  text-shadow: 0 0 16px rgba(101, 238, 255, 0.65);
}

.metric em {
  font-size: 20px;
  font-style: normal;
}

.dashboard-block {
  right: 42px;
  top: 46px;
  width: 108px;
  height: 70px;
  border-radius: 10px;
  background: linear-gradient(145deg, #242424, #101010);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.sample-archive .sample-preview {
  background: #111111;
}

.sample-archive .terminal-copy {
  top: 68px;
  font-size: 17px;
}

.pink-panel {
  left: 16px;
  right: 16px;
  bottom: 16px;
  height: 58px;
  background:
    radial-gradient(circle at 72% 30%, #f7d1e8, transparent 35%),
    linear-gradient(135deg, #ffd0d0, #eaa5cf);
}

.sample-lumina .sample-preview {
  background:
    radial-gradient(circle at 50% 110%, rgba(0, 255, 136, 0.42), transparent 25%),
    linear-gradient(180deg, #020603, #000000);
}

.sample-lumina .mock-hero {
  top: 70px;
  text-align: center;
}

.sample-vertex .sample-preview {
  background: #050505;
}

.sample-vertex .mock-hero {
  top: 110px;
  left: auto;
  right: 52px;
  font-size: 31px;
  color: #e9e9e9;
}

.sample-fashion .sample-preview {
  background:
    radial-gradient(circle at 76% 40%, rgba(255, 255, 255, 0.18), transparent 24%),
    linear-gradient(135deg, #153f2d, #0b0d0b 58%);
}

.sample-immersive .sample-preview {
  background:
    radial-gradient(circle at 50% 70%, #4230a8, transparent 32%),
    linear-gradient(180deg, #06060a, #020204);
}

.sample-portfolio .sample-preview {
  background:
    linear-gradient(135deg, rgba(255, 96, 48, 0.18), transparent 46%),
    #070707;
}

.page-detail {
  position: relative;
  margin: 42px calc(50% - 50vw) 0;
  padding: 76px 0 92px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    var(--bg);
  background-size: 92px 92px;
  color: var(--text);
}

body[data-theme="light"] .page-detail {
  background:
    linear-gradient(rgba(20, 20, 20, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 20, 20, 0.04) 1px, transparent 1px),
    var(--bg);
  background-size: 92px 92px;
}

body[data-view="detail"] .page-detail {
  margin-top: 0;
  padding-top: 28px;
}

.page-detail,
.results,
.page-vocab,
.page-empty,
.page-learn,
.page-vs {
  scroll-margin-top: 80px;
}

.tmpl-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 690px) 306px;
  gap: 26px;
  width: min(1040px, calc(100vw - 40px));
  margin: 0 auto;
  align-items: start;
}

.detail-main {
  min-width: 0;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0 18px;
  margin-bottom: 28px;
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  font-size: 14px;
  font-weight: 700;
}

.detail-back::before {
  content: "←";
  font-size: 17px;
  line-height: 1;
}

.detail-back:hover {
  border-color: var(--border);
  background: var(--bg);
}

.detail-main h1 {
  margin-bottom: 12px;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 15px;
  line-height: 1.02;
  font-weight: 800;
}

.detail-main > p {
  max-width: 630px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.55;
}

.detail-source-link {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.detail-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-actions button {
  height: 38px;
  border-radius: 999px;
  padding: 0 16px;
  font-size: 13px;
}

.detail-actions .ghost {
  border-color: var(--border-strong);
  background: var(--surface-strong);
  color: var(--text);
}

.detail-actions .danger {
  border-color: #e53935;
  color: #e53935;
}

.detail-actions .danger:hover {
  background: #e53935;
  color: #ffffff;
}

.detail-actions .prompt-btn,
.top-actions .prompt-btn {
  border-color: #6366f1;
  color: #6366f1;
}

.detail-actions .prompt-btn:hover,
.top-actions .prompt-btn:hover {
  background: #6366f1;
  color: #ffffff;
  border-color: #6366f1;
}

[data-theme="dark"] .detail-actions .prompt-btn,
[data-theme="dark"] .top-actions .prompt-btn {
  border-color: #818cf8;
  color: #818cf8;
  background: transparent;
}

[data-theme="dark"] .detail-actions .prompt-btn:hover,
[data-theme="dark"] .top-actions .prompt-btn:hover {
  background: #818cf8;
  color: #0f0f0f;
}

.org-browser-preview {
  overflow: hidden;
  border-radius: 12px;
  background: var(--bg);
  box-shadow: var(--shadow);
}

.browser-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 42px;
  padding: 8px 16px;
  background: #080808;
}

.browser-bar div {
  margin-right: auto;
  color: #ffffff;
}

.browser-bar strong,
.browser-bar small {
  display: block;
}

.browser-bar strong {
  font-size: 12px;
  font-weight: 800;
}

.browser-bar small {
  margin-top: 2px;
  color: #7f7f7f;
  font-size: 10px;
  font-weight: 700;
}

.browser-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.browser-bar span:nth-child(1) { background: #ff5f57; }
.browser-bar span:nth-child(2) { background: #febc2e; }
.browser-bar span:nth-child(3) { background: #28c840; }

.org-browser-preview iframe {
  width: 100%;
  height: 500px;
  border: 0;
  display: block;
  background: #ffffff;
}

.org-browser-preview iframe.hidden {
  display: none;
}

.org-browser-preview img {
  width: 100%;
  height: auto;
  max-height: 680px;
  border: 0;
  object-fit: contain;
  object-position: top;
  display: block;
  background: #ffffff;
}

.org-browser-preview img.hidden {
  display: none;
}

.org-design-doc {
  margin-top: 28px;
  border-radius: 10px;
  padding: 28px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.doc-label,
.org-token-card p {
  margin: 0 0 14px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.org-design-doc h2 {
  margin-bottom: 18px;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
}

.org-design-doc table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 12px;
}

.org-design-doc td {
  border: 1px solid var(--border);
  padding: 9px 10px;
  vertical-align: top;
}

.org-design-doc td:first-child {
  width: 150px;
  font-weight: 800;
}

.detail-copy {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.detail-copy h3 {
  margin: 18px 0 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.detail-sidebar {
  display: grid;
  gap: 14px;
}

.side-card,
.org-stats-row > div {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-strong);
}

.org-author-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 18px;
}

.atom-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f0f0f0, #cfcfcf);
  color: #555555;
  font-weight: 800;
}

body:not([data-theme="light"]) .atom-avatar {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  color: var(--muted);
}

.org-author-card strong,
.org-author-card span {
  display: block;
}

.org-author-card strong {
  color: var(--text);
  font-size: 14px;
}

.org-author-card span {
  color: var(--muted);
  font-size: 12px;
}

.org-importer-card {
  padding: 0;
  overflow: hidden;
}

.importer-palette {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 20px;
  margin-top: 16px;
  margin-bottom: 12px;
  overflow: hidden;
}

.importer-palette i {
  display: block;
  height: 100%;
}

.importer-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 18px 18px;
}

.importer-avatar {
  flex-shrink: 0;
  overflow: hidden;
  padding: 0;
}

.importer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

#importer-name {
  color: var(--text);
  font-size: 14px;
  display: block;
}

.org-importer-card span {
  color: var(--muted);
  font-size: 12px;
  display: block;
}

.results.loading #md-output {
  position: relative;
  min-height: 320px;
  color: transparent;
  user-select: none;
}

.results.loading #md-output::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent),
    repeating-linear-gradient(
      to bottom,
      rgba(127, 127, 127, 0.16) 0 14px,
      transparent 14px 28px
    );
  background-size: 180px 100%, 100% 100%;
  animation: resultShimmer 1.35s linear infinite;
  pointer-events: none;
}

.results.loading .mol-signal-item.loading-item,
.results.loading .asset-list .loading-item {
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(127, 127, 127, 0.15), rgba(127, 127, 127, 0.26), rgba(127, 127, 127, 0.15));
  background-size: 220px 100%;
  animation: resultShimmer 1.35s linear infinite;
}

.results.loading .mol-signal-item.loading-item {
  min-height: 74px;
  border: 1px solid transparent;
}

.results.loading .asset-list .loading-item {
  height: 34px;
  margin-bottom: 8px;
  list-style: none;
}

@keyframes resultShimmer {
  0% { background-position: -220px 0, 0 0; }
  100% { background-position: 220px 0, 0 0; }
}

.org-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.org-stats-row > div {
  padding: 18px 14px;
}

.org-stats-row strong,
.org-stats-row span {
  display: block;
}

.org-stats-row strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1;
}

.org-stats-row span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.org-token-card {
  padding: 16px;
}

.detail-fetch-card.hidden {
  display: none;
}

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

.fetch-stats div {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 8px;
  background: rgba(255, 255, 255, 0.03);
}

.fetch-stats strong,
.fetch-stats span {
  display: block;
}

.fetch-stats strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1;
}

.fetch-stats span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.fetch-page-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fetch-page-list li {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

.detail-swatches {
  display: grid;
  gap: 6px;
}

.mol-color-token {
  display: grid;
  grid-template-columns: 22px 1fr auto auto;
  align-items: center;
  gap: 8px;
  height: 28px;
}

.atom-color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 1px solid rgba(127, 127, 127, 0.3);
  display: block;
  flex-shrink: 0;
}

.color-token-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.atom-hex-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--dim);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.atom-icon-btn--copy {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.55;
  transition: opacity 150ms ease, background 150ms ease;
}

.atom-icon-btn--copy:hover {
  opacity: 1;
  background: var(--border);
  transform: none;
}

.atom-icon-btn--copy.copied {
  color: var(--green);
  opacity: 1;
}

.mol-type-sample {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px;
  margin-top: 9px;
}

.mol-type-sample b {
  font-size: 24px;
  color: var(--text);
}

.mol-type-sample span {
  color: var(--dim);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  text-transform: uppercase;
}

.mol-spacing-token {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  gap: 10px;
}

.spacing-name {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  flex-shrink: 0;
}

.spacing-ruler {
  display: flex;
  align-items: center;
  gap: 0;
}

.ruler-dot {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text);
  flex-shrink: 0;
}

.ruler-line {
  display: block;
  height: 1.5px;
  background: var(--text);
  flex-shrink: 0;
}

.ruler-value {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  margin-left: 6px;
  flex-shrink: 0;
}

/* Border Radius card */
.radius-swatches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 2px 0 0;
}

.atom-token-cell,
.atom-token-cell {
  min-width: 0;
  display: grid;
  gap: 4px;
  align-items: start;
}

.radius-swatch {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.atom-token-label {
  display: block;
  min-width: 0;
  font-size: 8px;
  font-weight: 700;
  color: #999999;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.atom-token-value {
  display: block;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Elevation card */
.elevation-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 2px 0 0;
}

.elevation-sample {
  height: 42px;
  border-radius: 8px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
}

/* Motion card */
.mol-motion-tokens {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}

.mol-motion-token {
  display: grid;
  grid-template-columns: 62px 42px 1fr;
  align-items: center;
  gap: 8px;
}

.atom-token-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--dim);
}

.atom-token-value {
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-mono);
}

.motion-bar-track {
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.motion-bar-fill {
  height: 100%;
  background: var(--text);
  border-radius: 999px;
}

/* ============================================================
   ATOMS
   .atom-eyebrow, .atom-brand-mark, .atom-nav-item, .atom-icon-btn,
   .atom-pill-btn, .atom-close-btn, .atom-step-num, .atom-spinner-dot,
   .atom-progress-dot, .atom-step-dot, .atom-pill-badge,
   .atom-progress-fill, .atom-color-swatch, .atom-hex-label,
   .atom-icon-btn--copy, .atom-token-label, .atom-token-value,
   .atom-danger-btn, .atom-tetris-loader, .atom-img-placeholder,
   .atom-avatar-sm, .atom-avatar, .atom-palette-bar, .atom-rainbow-text,
   .atom-token-cell
   ============================================================ */

/* ============================================================
   MOLECULES
   .mol-brand, .mol-theme-toggle, .mol-how-to-step, .mol-color-token,
   .mol-type-sample, .mol-spacing-token, .mol-motion-token,
   .mol-step-item, .mol-signal-item, .mol-url-input-row,
   .mol-input-with-preview, .mol-vocab-card, .mol-search-input
   ============================================================ */

/* ============================================================
   ORGANISMS
   .org-import-form, .org-mission-panel, .org-sample-card,
   .org-sample-card--preview, .org-how-to-panel, .org-how-to-overlay,
   .org-document-panel, .org-importer-card, .org-design-doc,
   .org-browser-preview, .org-author-card, .org-stats-row, .org-token-card
   ============================================================ */

/* ============================================================
   TEMPLATES
   .tmpl-workbench, .tmpl-collection, .tmpl-collection__grid,
   .tmpl-collection__head, .tmpl-result-layout, .tmpl-detail-layout,
   .tmpl-vocab-layout
   ============================================================ */

/* ============================================================
   PAGES
   .page-detail, .page-vocab, .page-empty
   ============================================================ */

.hidden {
  display: none;
}

/* ── Design Prompting Vocab ─────────────────────────────────────── */
.page-vocab {
  padding: 100px 40px 96px;
}

.page-empty {
  padding: 100px 40px 96px;
  text-align: center;
}

.empty-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-shell h2 {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: 0;
  margin: 0;
}

.empty-shell .lede {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.tmpl-vocab-layout {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.vocab-header {
  display: grid;
  justify-items: center;
  gap: 10px;
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.vocab-header h2 {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: 0;
  margin: 0;
}

.vocab-header .lede {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.nav-last-updated {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dim);
  opacity: 0.7;
}

.vocab-search-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.search-count {
  font-size: 12px;
  color: var(--text-muted, #71717a);
  white-space: nowrap;
  flex-shrink: 0;
}

.mol-search-input {
  width: 100%;
  max-width: 420px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.15s;
}

.mol-search-input:focus,
.mol-search-input:focus {
  border-color: var(--accent);
}

.vocab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* ── Design Prompting Vocab cards (Image 3 — icon graphic top) ── */
.mol-vocab-card {
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  padding: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: 362px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s, box-shadow 0.2s;
}

.mol-vocab-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.vocab-card-graphic {
  height: 150px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vocab-card-graphic svg {
  width: 200px;
  height: 150px;
  opacity: 1;
}

.vocab-card-content {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}

.vocab-card-tag {
  display: none;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.55;
}

.mol-vocab-card h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  color: var(--text);
}

.mol-vocab-card p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.vocab-card-prompt {
  font-size: 12.5px;
  font-style: italic;
  color: var(--muted);
  opacity: 0.72;
  margin-top: 0;
  line-height: 1.55;
}

.vocab-card-note {
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  opacity: 0.6;
  margin-top: 4px;
  border-left: 2px solid var(--border);
  padding-left: 10px;
}

.vocab-empty {
  grid-column: 1/-1;
  text-align: center;
  opacity: 0.4;
  font-size: 14px;
  padding: 40px 0;
}

/* ── Design Basics cards (Image 1 — pinned sticky note style) ─── */
.mol-basics-card {
  background: rgb(var(--card-hue) / 0.08);
  border: 1.5px solid rgb(var(--card-hue) / 0.18);
  border-radius: var(--panel-radius);
  padding: 28px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: transform 0.2s, border-color 0.2s;
}

.mol-basics-card:hover {
  transform: translateY(-3px);
  border-color: rgb(var(--card-hue) / 0.35);
}

.basics-card-pin {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  background: rgb(var(--card-hue));
  border-radius: 50%;
  box-shadow: 0 2px 10px rgb(var(--card-hue) / 0.5);
}

.basics-card-pin::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: rgb(var(--card-hue) / 0.5);
  border-radius: 0 0 3px 3px;
}

.basics-card-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(var(--card-hue));
  opacity: 0.9;
  margin-top: 4px;
}

.mol-basics-card h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  color: var(--text);
}

.basics-card-def {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.basics-card-example {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
  opacity: 0.7;
  margin: 0;
  padding-left: 10px;
  border-left: 2px solid rgb(var(--card-hue) / 0.3);
  font-style: italic;
}

@media (max-width: 600px) {
  .page-vocab {
    padding: 40px 20px 64px;
  }
  .vocab-header h2 {
    font-size: 30px;
  }
}

/* ── Learn ─────────────────────────────────────────────────────── */
.page-learn {
  padding: 100px 40px 96px;
}

.tmpl-learn-layout {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.learn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* ── Learn course cards (Image 2 — gradient art blending into body) */
.mol-course-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--panel-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}

.mol-course-card:hover {
  transform: translateY(-2px);
  border-color: rgb(var(--ca) / 0.4);
}

.course-media {
  height: 88px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  background:
    radial-gradient(ellipse at 25% 50%, rgb(var(--ca) / 0.5) 0%, transparent 65%),
    radial-gradient(ellipse at 75% 50%, rgb(var(--cb) / 0.4) 0%, transparent 65%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-media::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 44px;
  background: linear-gradient(to bottom, transparent, var(--surface));
  pointer-events: none;
}

.course-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(20px);
}

.course-orb--a {
  width: 80px;
  height: 80px;
  background: rgb(var(--ca) / 0.55);
  top: -20px;
  left: 10px;
}

.course-orb--b {
  width: 60px;
  height: 60px;
  background: rgb(var(--cb) / 0.45);
  bottom: -10px;
  right: 20px;
}

.course-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.course-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.course-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgb(var(--ca));
  opacity: 0.85;
}

.course-pill {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--border);
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 99px;
}

.mol-course-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  line-height: 1.25;
}

.course-body > p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.course-topics {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.course-topics li {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  opacity: 0.65;
  padding-left: 16px;
  position: relative;
}

.course-topics li::before {
  content: '→';
  position: absolute;
  left: 0;
  opacity: 0.4;
  font-size: 11px;
  top: 1px;
}

.course-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.course-meta {
  font-size: 12px;
  color: var(--muted);
  opacity: 0.6;
}

.course-cta {
  font-size: 12px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.55;
}

@media (max-width: 600px) {
  .page-learn {
    padding: 40px 20px 64px;
  }
  .learn-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 800px) {
  .br-first {
    display: none;
  }
}

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

@media (max-width: 980px) {
  .primary-nav {
    gap: 18px;
    margin-left: 48px;
  }

  .tmpl-result-layout,
  .tmpl-detail-layout {
    grid-template-columns: 1fr;
  }

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

  .tmpl-workbench {
    min-height: auto;
    padding-top: 80px;
  }

  .org-mission-panel {
    max-width: 620px;
  }

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

@media (max-width: 680px) {
  .topbar {
    flex-wrap: wrap;
    height: auto;
  }

  .primary-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .shell {
    width: min(100vw - 28px, 1240px);
    padding-top: 16px;
  }

  .mol-theme-toggle {
    margin-left: auto;
  }

  h1 {
    font-size: 40px;
  }

  .mol-url-input-row,
  .result-header {
    grid-template-columns: 1fr;
  }

  .org-import-form {
    padding: 24px;
  }

  .mol-url-input-row {
    display: grid;
  }

  .mol-url-input-row input {
    padding-right: 58px;
  }

  .input-preview-cycle {
    right: 12px;
    width: 32px;
  }

  .mol-url-input-row button,
  .top-actions button {
    width: 100%;
  }

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

  .explainer-grid span {
    white-space: normal;
  }

  .top-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .mission-head,
  .panel-head {
    align-items: flex-start;
  }

  .tmpl-collection__grid {
    grid-template-columns: 1fr;
  }

  .sample-preview {
    height: 220px;
    margin-bottom: 0;
  }

  .type-pill {
    left: 0;
    right: auto;
    top: calc(100% + 66px);
    width: 100%;
  }

  .page-detail {
    padding: 42px 0 64px;
  }

  .detail-main h1 {
    font-size: 15px;
  }

  .org-browser-preview img {
    max-height: 320px;
  }

  .detail-sidebar,
  .org-stats-row {
    grid-template-columns: 1fr;
  }
}

/* ─── Skeleton loading ─────────────────────────────────────── */
@keyframes skeleton-shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

@keyframes skeleton-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes skeleton-fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

.skeleton-shimmer {
  background: linear-gradient(
    90deg,
    rgba(32, 32, 40, 0.95) 0%,
    rgba(255, 255, 255, 0.18) 45%,
    rgba(32, 32, 40, 0.95) 100%
  );
  background-size: 1200px 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

body[data-theme="light"] .skeleton-shimmer {
  background: linear-gradient(
    90deg,
    #f0f0f0 0%,
    #e0e0e0 45%,
    #f0f0f0 100%
  );
  background-size: 1200px 100%;
}

/* Collection skeleton card — matches .org-sample-card layout */
.skeleton-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--card-radius, 13px);
  overflow: hidden;
  background: rgba(28, 28, 36, 0.96);
  animation: skeleton-fade-in 0.25s ease both;
}

body[data-theme="light"] .skeleton-card {
  background: #ffffff;
  border-color: #ececec;
}

.skeleton-preview {
  height: 212px;
  margin: 16px 7px 0;
  border-radius: 12px;
  flex-shrink: 0;
}

.skeleton-palette {
  height: 6px;
  margin: 12px 16px 0;
  border-radius: 3px;
  flex-shrink: 0;
}

.skeleton-title {
  height: 14px;
  margin: 14px 16px 0;
  border-radius: 4px;
  width: 62%;
  flex-shrink: 0;
}

.skeleton-url {
  height: 10px;
  margin: 10px 16px 0;
  border-radius: 4px;
  width: 44%;
  flex-shrink: 0;
}

.skeleton-footer {
  height: 20px;
  margin: 14px 16px 16px;
  border-radius: 10px;
  width: 52%;
  flex-shrink: 0;
}

/* Vocab / basics skeleton card — matches .mol-vocab-card layout */
.skeleton-vocab-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: skeleton-fade-in 0.25s ease both;
}

body[data-theme="light"] .skeleton-vocab-card {
  background: rgba(255,255,255,0.78);
  border-color: rgba(9,9,11,0.12);
}

body[data-theme="light"] .mol-vocab-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.06);
}

body[data-theme="light"] .vocab-card-graphic {
  background: rgba(0, 0, 0, 0.03);
}

.skeleton-vocab-tag {
  height: 10px;
  border-radius: 4px;
  width: 28%;
}

.skeleton-vocab-title {
  height: 20px;
  border-radius: 5px;
  width: 58%;
}

.skeleton-vocab-line {
  height: 10px;
  border-radius: 4px;
}

.skeleton-vocab-line + .skeleton-vocab-line {
  width: 80%;
}

.skeleton-vocab-line:last-child {
  width: 65%;
}

/* Delays are set inline by renderSkeletonCards — no CSS nth-child needed */

/* ── design.md vs Regular page ─────────────────────────────────── */
.page-vs {
  padding: 100px 40px 96px;
}

.vs-layout {
  display: flex;
  flex-direction: column;
  gap: 56px;
  max-width: 1100px;
  margin: 0 auto;
}

/* workflow steps */
.vs-workflow {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.vs-workflow-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 200px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
}

.vs-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

[data-theme="light"] .vs-step-num {
  background: #02040a;
  color: #fff;
}

.vs-step-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vs-step-body strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg, #f4f4f5);
}

[data-theme="light"] .vs-step-body strong {
  color: #09090b;
}

.vs-step-body span {
  font-size: 12.5px;
  color: var(--fg-muted, rgba(244,244,245,0.55));
  line-height: 1.5;
}

[data-theme="light"] .vs-step-body span {
  color: rgba(9,9,11,0.55);
}

.vs-workflow-arrow {
  font-size: 20px;
  color: var(--border-strong);
  flex-shrink: 0;
}

/* two-column comparison */
.vs-columns {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: start;
}

.vs-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  padding-top: 48px;
}

.vs-divider-line {
  width: 1px;
  flex: 1;
  min-height: 60px;
  background: var(--border);
}

.vs-divider-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--border-strong);
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
}

.vs-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vs-panel-label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.vs-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 20px;
}

.vs-badge--plain {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.12);
}

[data-theme="light"] .vs-badge--plain {
  background: rgba(0,0,0,0.05);
  color: rgba(0,0,0,0.45);
  border-color: rgba(0,0,0,0.12);
}

.vs-badge--good {
  background: rgba(99,91,255,0.15);
  color: #a09bff;
  border: 1px solid rgba(99,91,255,0.3);
}

[data-theme="light"] .vs-badge--good {
  background: rgba(99,91,255,0.08);
  color: #5b54e8;
  border-color: rgba(99,91,255,0.25);
}

.vs-prompt-tag {
  font-size: 11.5px;
  color: var(--border-strong);
  font-family: monospace;
}

/* mock website preview */
.vs-mock-site {
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid var(--border);
}

.vs-mock-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #1a1b23;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.vs-mock-nav--stripe {
  background: #0a2540;
  border-bottom-color: rgba(255,255,255,0.06);
}

.vs-mock-logo {
  width: 52px;
  height: 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.18);
}

.vs-mock-logo--stripe {
  background: rgba(255,255,255,0.35);
}

.vs-mock-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vs-mock-link {
  width: 32px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.14);
}

.vs-mock-link--stripe {
  background: rgba(255,255,255,0.22);
}

.vs-mock-cta {
  width: 52px;
  height: 22px;
  border-radius: 4px;
}

.vs-mock-cta--plain {
  background: #0066ff;
}

.vs-mock-cta--stripe {
  background: #635bff;
}

/* hero area */
.vs-mock-hero {
  padding: 28px 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vs-mock-hero--plain {
  background: #16171e;
}

.vs-mock-hero--stripe {
  background: linear-gradient(135deg, #0a2540 0%, #1a3a5c 100%);
}

.vs-mock-eyebrow {
  width: 80px;
  height: 5px;
  border-radius: 3px;
  background: rgba(99,91,255,0.45);
  margin-bottom: 4px;
}

.vs-mock-headline {
  height: 12px;
  border-radius: 5px;
  width: 85%;
}

.vs-mock-headline--plain {
  background: rgba(255,255,255,0.22);
}

.vs-mock-headline--stripe {
  background: rgba(255,255,255,0.9);
  height: 14px;
}

.vs-mock-sub {
  height: 7px;
  border-radius: 3px;
  width: 75%;
}

.vs-mock-sub--plain {
  background: rgba(255,255,255,0.13);
}

.vs-mock-sub--stripe {
  background: rgba(255,255,255,0.35);
}

.vs-mock-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.vs-mock-btn {
  height: 24px;
  border-radius: 5px;
}

.vs-mock-btn--plain {
  width: 80px;
  background: #0066ff;
}

.vs-mock-btn--ghost {
  width: 72px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
}

.vs-mock-btn--stripe {
  width: 80px;
  background: #635bff;
}

.vs-mock-btn--stripe-ghost {
  width: 72px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.35);
}

/* feature cards */
.vs-mock-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
}

.vs-mock-features--plain {
  background: rgba(255,255,255,0.06);
}

.vs-mock-features--stripe {
  background: rgba(255,255,255,0.08);
}

.vs-mock-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 12px;
}

.vs-mock-card--plain {
  background: #1c1d27;
}

.vs-mock-card--stripe {
  background: #0d2f50;
}

.vs-mock-card-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  margin-bottom: 2px;
}

.vs-mock-card-icon--plain {
  background: rgba(0,102,255,0.3);
}

.vs-mock-card-icon--stripe {
  background: rgba(99,91,255,0.4);
}

.vs-mock-card-text {
  height: 6px;
  border-radius: 3px;
  width: 90%;
}

.vs-mock-card-text--stripe {
  background: rgba(255,255,255,0.25);
}

.vs-mock-card--plain .vs-mock-card-text {
  background: rgba(255,255,255,0.14);
}

/* callout list */
.vs-callouts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vs-callout {
  font-size: 12.5px;
  padding: 6px 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.vs-callout::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.vs-callout--bad {
  background: rgba(255,60,60,0.07);
  color: rgba(255,100,100,0.8);
  border: 1px solid rgba(255,60,60,0.15);
}

.vs-callout--bad::before {
  background: rgba(255,80,80,0.7);
}

.vs-callout--good {
  background: rgba(99,91,255,0.08);
  color: #a09bff;
  border: 1px solid rgba(99,91,255,0.2);
}

.vs-callout--good::before {
  background: #635bff;
}

[data-theme="light"] .vs-callout--bad {
  color: #c23030;
  background: rgba(220,40,40,0.05);
  border-color: rgba(220,40,40,0.15);
}

[data-theme="light"] .vs-callout--good {
  color: #4a44cc;
  background: rgba(99,91,255,0.06);
  border-color: rgba(99,91,255,0.2);
}

/* CTA row */
.vs-cta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 28px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
}

.vs-cta-text {
  flex: 1;
  font-size: 14px;
  color: var(--fg-muted, rgba(244,244,245,0.6));
  margin: 0;
}

[data-theme="light"] .vs-cta-text {
  color: rgba(9,9,11,0.55);
}

.vs-cta-btn {
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.vs-cta-btn:hover {
  opacity: 0.85;
}

/* responsive */
@media (max-width: 768px) {
  .vs-columns {
    grid-template-columns: 1fr;
  }
  .vs-divider {
    flex-direction: row;
    padding: 16px 0;
  }
  .vs-divider-line {
    flex: 1;
    width: auto;
    height: 1px;
    min-height: auto;
  }
  .vs-workflow-arrow {
    display: none;
  }
  .vs-workflow {
    flex-direction: column;
  }
  .vs-workflow-step {
    width: 100%;
  }
  .page-vs {
    padding: 80px 20px 60px;
  }
}
