/* ==========================================================================
   1. STUDIO DESIGN TOKENS & RESET
   ========================================================================== */
:root {
  --studio-bg: #f5f6f8;
  --studio-surface: #ffffff;
  --studio-surface-subtle: #f9fafb;
  --studio-border: #e5e7eb;
  --studio-border-dark: #111827;
  
  --studio-text: #111827;
  --studio-text-secondary: #4b5563;
  --studio-text-muted: #9ca3af;
  
  --color-live: #10b981;
  --color-draft: #f59e0b;
  --color-danger: #ef4444;

  /* Live Portfolio Tokens (1:1 Parity with my-bio) */
  --c-bg: #FFFFFF;
  --c-hero-gray: #6E7072;
  --c-card-gray: #616467;
  --c-input-gray: #D9D9D9;
  --c-text-dark: #000000;
  --c-text-light: #FFFFFF;
  --c-text-muted: #888888;
  --c-border-dark: #000000;

  --font-serif: 'Arapey', Georgia, serif;
  --font-sans: 'Open Sauce One', 'Open Sauce Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --topbar-h: 52px;
  --rail-w: 48px;
  --drawer-w: 280px;
  --inspector-w: 340px;
  --transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--studio-bg);
  color: var(--studio-text);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   2. TOP APPLICATION BAR
   ========================================================================== */
.studio-topbar {
  height: var(--topbar-h);
  background: var(--studio-surface);
  border-bottom: 1px solid var(--studio-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 70;
  flex-shrink: 0;
  gap: 0.75rem;
}

.topbar-left, .topbar-center, .topbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.studio-brand {
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: -0.01em;
  color: var(--studio-text);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-right: 0.25rem;
}

.brand-mark-svg {
  color: #000000;
}

.studio-brand-title {
  letter-spacing: 0.05em;
  font-weight: 800;
}

.topbar-divider {
  width: 1px;
  height: 20px;
  background-color: var(--studio-border);
  margin: 0 0.25rem;
}

/* Auto-Save Status Pill */
.save-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-live);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 0.25rem 0.55rem;
  border-radius: 9999px;
  transition: var(--transition);
}

.save-status-pill.is-saving {
  color: var(--color-draft);
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.25);
}

.save-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
}

/* Active Route Pill */
.active-route-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--studio-surface-subtle);
  border: 1px solid var(--studio-border);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--studio-text-secondary);
}

/* Version Select Pill */
.version-select-pill {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--studio-surface-subtle);
  border: 1px solid var(--studio-border);
  border-radius: 6px;
  padding: 0.15rem 0.4rem;
}

.version-select-pill select {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--studio-text);
  cursor: pointer;
  outline: none;
}

.btn-subtle-icon {
  background: transparent;
  border: none;
  color: var(--studio-text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-subtle-icon:hover {
  background: #ffffff;
  color: #000000;
}

/* Responsive Device Viewport Switcher */
.device-segmented {
  display: flex;
  background: var(--studio-surface-subtle);
  border: 1px solid var(--studio-border);
  border-radius: 8px;
  padding: 2px;
}

.device-btn {
  background: transparent;
  border: none;
  color: var(--studio-text-secondary);
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
}

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

.device-btn.active {
  background: var(--studio-surface);
  color: #000000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1;
}

.btn-sm {
  padding: 0.45rem 0.75rem;
  font-size: 0.75rem;
}

.btn-xs {
  padding: 0.3rem 0.55rem;
  font-size: 0.7rem;
}

.btn-primary {
  background: #000000;
  color: #ffffff;
  border: 1px solid #000000;
}

.btn-primary:hover {
  background: #262626;
  border-color: #262626;
}

.btn-secondary {
  background: var(--studio-surface);
  color: var(--studio-text);
  border: 1px solid var(--studio-border);
}

.btn-secondary:hover {
  background: var(--studio-surface-subtle);
  border-color: #cbd5e1;
}

.btn-danger {
  background: #fee2e2;
  color: var(--color-danger);
  border: 1px solid #fecaca;
}

.btn-danger:hover {
  background: #fca5a5;
  color: #7f1d1d;
}

.btn-dark {
  background: #111827;
  color: #ffffff;
  border: none;
}

/* ==========================================================================
   3. STUDIO WORKSPACE & 48px LEFT TOOL RAIL
   ========================================================================== */
.studio-workspace {
  display: flex;
  height: calc(100dvh - var(--topbar-h));
  position: relative;
  overflow: hidden;
}

.studio-icon-rail {
  width: var(--rail-w);
  min-width: var(--rail-w);
  background: var(--studio-surface);
  border-right: 1px solid var(--studio-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0;
  gap: 0.4rem;
  z-index: 50;
  flex-shrink: 0;
}

.rail-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--studio-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.rail-btn:hover {
  background: var(--studio-surface-subtle);
  color: #000000;
}

.rail-btn.active {
  background: #000000;
  color: #ffffff;
}

.rail-spacer {
  flex: 1;
}

textarea.input-clean {
  resize: vertical;
  min-height: 3.2rem;
  line-height: 1.45;
}

.prop-hint {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.68rem;
  color: var(--studio-text-muted);
}

/* ==========================================================================
   4. LEFT SLIDING DRAWER (PAGES, BLOCKS, LAYERS, SVGS)
   ========================================================================== */
.studio-left-drawer {
  width: var(--drawer-w);
  min-width: var(--drawer-w);
  background: var(--studio-surface);
  border-right: 1px solid var(--studio-border);
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
  z-index: 45;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.studio-left-drawer.collapsed {
  display: none;
}

.drawer-header {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--studio-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--studio-text);
}

.btn-drawer-close {
  background: transparent;
  border: none;
  color: var(--studio-text-muted);
  cursor: pointer;
  padding: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.btn-drawer-close:hover {
  color: #000000;
  background: var(--studio-surface-subtle);
}

.drawer-search-wrap {
  padding: 0.75rem 1rem 0.5rem;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon svg {
  position: absolute;
  left: 0.65rem;
  color: var(--studio-text-muted);
  pointer-events: none;
}

.drawer-search-input {
  width: 100%;
  background: var(--studio-surface-subtle);
  border: 1px solid var(--studio-border);
  border-radius: 6px;
  padding: 0.45rem 0.65rem 0.45rem 2rem;
  font-size: 0.78rem;
  font-family: inherit;
  outline: none;
}

.drawer-search-input:focus {
  border-color: #000000;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem 2rem;
}

.drawer-section-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.drawer-subtitle {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--studio-text-muted);
}

.drawer-note-text {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--studio-text-secondary);
  margin-bottom: 1rem;
}

/* Page Manager Item Cards */
.pages-list-container {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.page-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--studio-border);
  border-radius: 6px;
  background: var(--studio-surface-subtle);
  cursor: pointer;
  transition: var(--transition);
}

.page-list-item:hover {
  background: #ffffff;
  border-color: #cbd5e1;
}

.page-list-item.is-active {
  background: #ffffff;
  border-color: #000000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.page-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.page-item-title {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--studio-text);
}

.page-item-path {
  font-size: 0.7rem;
  color: var(--studio-text-muted);
  font-family: var(--font-mono);
}

.page-item-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.page-action-btn {
  background: transparent;
  border: none;
  color: var(--studio-text-muted);
  padding: 0.25rem;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-action-btn:hover {
  color: #000000;
  background: var(--studio-border);
}

/* AI Builder Promo Card in Drawer (Inspired by Acme Image 1) */
.drawer-ai-promo-card {
  background: linear-gradient(135deg, #f3e8ff 0%, #e0e7ff 100%);
  border: 1px solid #d8b4fe;
  border-radius: 8px;
  padding: 0.85rem;
  margin-bottom: 0.75rem;
}

.promo-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  font-weight: 800;
  color: #6b21a8;
  margin-bottom: 0.35rem;
}

.drawer-ai-promo-card p {
  font-size: 0.72rem;
  line-height: 1.4;
  color: #4c1d95;
  margin-bottom: 0.65rem;
}

/* Section Wireframe Tiles (Inspired by Image 6 & 18) */
.section-tiles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.section-wireframe-tile {
  background: var(--studio-surface-subtle);
  border: 1px solid var(--studio-border);
  border-radius: 8px;
  padding: 0.85rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}

.section-wireframe-tile:hover {
  border-color: #000000;
  background: var(--studio-surface);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.tile-icon-box {
  color: var(--studio-text-secondary);
}

.section-wireframe-tile:hover .tile-icon-box {
  color: #000000;
}

.tile-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--studio-text);
}

/* Custom Vector SVG Slots */
.svg-slot-chip {
  background: var(--studio-surface-subtle);
  border: 1px dashed var(--studio-border);
  border-radius: 8px;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.svg-slot-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.svg-slot-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid var(--studio-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
}

.svg-slot-title {
  font-size: 0.75rem;
  font-weight: 700;
}

.svg-slot-path {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--studio-text-muted);
}

/* ==========================================================================
   5. CENTER CANVAS VIEWPORT & 8PT DOT-GRID (Images 6, 18, 20)
   ========================================================================== */
.studio-canvas-viewport {
  flex: 1;
  height: 100%;
  background-color: var(--studio-bg);
  background-image: radial-gradient(#d1d5db 1px, transparent 1px);
  background-size: 16px 16px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2rem 1.5rem 8rem;
  display: flex;
  justify-content: center;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.canvas-device-frame {
  width: 100%;
  max-width: 960px;
  min-height: 100%;
  background: #ffffff;
  color: #000000;
  border: 1px solid var(--studio-border);
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  transition: max-width 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

/* ==========================================================================
   6. FLOATING INLINE FORMATTING BAR (Images 3, 4, 8)
   ========================================================================== */
.floating-format-bar {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--studio-border);
  border-radius: 9999px;
  padding: 0.3rem 0.5rem;
  display: none;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 60;
  white-space: nowrap;
  max-width: calc(100% - 1rem);
  overflow-x: auto;
  scrollbar-width: none;
}

.floating-format-bar.visible {
  display: flex;
}

.pill-ai-action-btn {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
}

.pill-ai-action-btn:hover {
  filter: brightness(1.1);
}

.pill-select {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--studio-text);
  outline: none;
  cursor: pointer;
}

.pill-format-btn {
  background: transparent;
  border: none;
  color: var(--studio-text-secondary);
  width: 26px;
  height: 26px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}

.pill-format-btn:hover {
  background: var(--studio-surface-subtle);
  color: #000000;
}

.pill-format-btn.active {
  background: #000000;
  color: #ffffff;
}

.pill-divider {
  width: 1px;
  height: 16px;
  background: var(--studio-border);
}

/* ==========================================================================
   7. RIGHT DOCKED INSPECTOR (CONTENT VS STYLE)
   ========================================================================== */
.studio-right-inspector {
  width: var(--inspector-w);
  min-width: var(--inspector-w);
  background: var(--studio-surface);
  border-left: 1px solid var(--studio-border);
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
  z-index: 50;
}

.inspector-tabs-bar {
  display: flex;
  border-bottom: 1px solid var(--studio-border);
  background: var(--studio-surface);
  flex-shrink: 0;
}

.inspector-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.75rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--studio-text-muted);
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}

.inspector-tab-btn.active {
  color: #000000;
  border-bottom-color: #000000;
}

.inspector-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.visibility-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--studio-border);
}

.visibility-label {
  font-size: 0.75rem;
  font-weight: 700;
}

.btn-toggle-eye {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--studio-surface-subtle);
  border: 1px solid var(--studio-border);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-toggle-eye.is-published {
  color: var(--color-live);
  border-color: rgba(16, 185, 129, 0.3);
}

.btn-toggle-eye.is-draft {
  color: var(--color-draft);
  border-color: rgba(245, 158, 11, 0.4);
}

.prop-group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  border-bottom: 1px solid var(--studio-border);
  padding-bottom: 1rem;
}

.prop-group:last-child {
  border-bottom: none;
}

.prop-group-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--studio-text-muted);
}

.prop-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.prop-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.prop-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--studio-text);
}

.input-clean {
  width: 100%;
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  border-radius: 6px;
  color: var(--studio-text);
  padding: 0.5rem 0.65rem;
  font-family: inherit;
  font-size: 0.8rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.input-clean:focus {
  border-color: #000000;
}

.upload-directory-tag {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--studio-text-muted);
  margin-top: 0.25rem;
}

.color-field-composite {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.color-field-composite input[type="color"] {
  border: 1px solid var(--studio-border);
  border-radius: 4px;
  width: 32px;
  height: 32px;
  padding: 0;
  cursor: pointer;
  background: transparent;
}

.input-hex-code {
  font-family: var(--font-mono);
  text-transform: uppercase;
}

/* 4-Way Box Model Diagram */
.box-model-diagram {
  background: var(--studio-surface-subtle);
  border: 1px solid var(--studio-border);
  border-radius: 8px;
  padding: 0.85rem;
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 0.35rem;
  align-items: center;
  text-align: center;
}

.box-input-cell {
  background: #ffffff;
  border: 1px solid var(--studio-border);
  border-radius: 4px;
  padding: 0.25rem 0.35rem;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  text-align: center;
  width: 100%;
  outline: none;
}

.box-input-cell:focus {
  border-color: #000000;
}

.box-center-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--studio-text-muted);
}

/* Corner Roundness Presets */
.radius-preset-row {
  display: flex;
  background: var(--studio-surface-subtle);
  border: 1px solid var(--studio-border);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.radius-preset-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--studio-text-secondary);
  padding: 0.35rem 0.2rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.radius-preset-btn.active {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

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

.element-actions-row .btn {
  flex: 1;
}

.inspector-empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--studio-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.inspector-empty-state svg {
  margin-bottom: 0.75rem;
  color: var(--studio-text-muted);
}

.empty-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--studio-text);
  margin-bottom: 0.35rem;
}

.empty-desc {
  font-size: 0.74rem;
  line-height: 1.5;
}

/* ==========================================================================
   8. SCOPED LIVE PORTFOLIO STYLING (FIXES THE UNSTYLED SCREENSHOT CANVAS)
   ========================================================================== */
#canvasLiveTarget {
  width: 100%;
  background-color: var(--c-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-shell {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  background-color: var(--c-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header.site-header {
  width: 100%;
  background-color: var(--c-bg);
  flex-shrink: 0;
}

footer.site-footer {
  width: 100%;
  margin-top: auto !important;
  background-color: var(--c-hero-gray);
  color: var(--c-text-light);
  text-align: center;
  padding: 2.5rem 1.25rem;
}

.breadcrumb-bar {
  padding: 0 1.25rem 0.75rem;
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--c-text-dark);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.breadcrumb-bar .crumb-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: #707070;
}

.hero-gray-banner {
  background-color: var(--c-hero-gray);
  color: var(--c-text-light);
  padding: 2.25rem 1.25rem 2rem;
  width: 100%;
}

.hero-gray-banner h1.banner-heading {
  font-family: var(--font-sans);
  font-size: clamp(2.1rem, 7vw, 4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--c-text-light);
  white-space: pre-line;
}

.home-brand-hero {
  padding: 0 1.25rem 1.25rem;
}

.home-brand-title .brand-creative {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(2.2rem, 7vw, 3.8rem);
  font-weight: 400;
  display: block;
}

.home-brand-title .brand-portfolio {
  font-family: var(--font-sans);
  font-size: clamp(2.8rem, 10vw, 5.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  display: block;
}

.home-author-name {
  font-family: var(--font-sans);
  font-size: clamp(1.25rem, 3.5vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

/* About Me Card */
.about-card {
  background-color: var(--c-card-gray);
  color: var(--c-text-light);
  padding: 1.5rem 1.25rem;
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 1.5rem;
}

.about-card h2.about-title {
  font-family: var(--font-sans);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.about-card .about-text {
  font-size: clamp(0.72rem, 1.6vw, 0.9rem);
  line-height: 1.5;
  color: #f1f1f1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.about-portrait-wrap {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #2b2b2b;
  border-radius: 4px;
}

.about-portrait-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.1);
  display: block;
}

/* Category & Project Cards */
.content-padded {
  padding: 0 1.25rem 2.5rem;
}

.cards-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.project-card {
  background-color: var(--c-card-gray);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  color: var(--c-text-light);
  border-radius: 2px;
}

.card-image-wrap {
  width: 100%;
  aspect-ratio: 16 / 11;
  background: #111111;
  overflow: hidden;
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-info-pane {
  padding: 0.85rem;
  background-color: var(--c-card-gray);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.card-info-pane h3.card-title {
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 2.2vw, 1.2rem);
  font-weight: 700;
  color: var(--c-text-light);
  margin-bottom: 0.35rem;
  white-space: pre-line;
}

.card-info-pane .card-meta {
  font-size: clamp(0.62rem, 1.4vw, 0.75rem);
  color: #e2e2e2;
  line-height: 1.4;
  margin-bottom: 0.85rem;
}

.btn-more-pill {
  background-color: #FFFFFF;
  color: #000000;
  border: 1px solid #000000;
  border-radius: 4px;
  padding: 0.25rem 0.65rem;
  font-size: clamp(0.7rem, 1.5vw, 0.82rem);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
  line-height: 1.2;
}

/* Tool Badges */
.tools-icons-row {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.tool-badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.tool-badge-item .tool-app-icon {
  width: clamp(52px, 8vw, 68px);
  height: clamp(52px, 8vw, 68px);
  border-radius: 12px;
  background: #f1f1f1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.tool-badge-item .tool-app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Lifecycle */
.lifecycle-card-box {
  background-color: var(--c-hero-gray);
  color: var(--c-text-light);
  padding: 1.5rem 1.25rem;
  margin-bottom: 1.75rem;
  border-radius: 4px;
}

.lifecycle-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.lifecycle-step-cell {
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  padding: 0.6rem 0.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.lifecycle-step-cell .step-num-box {
  border: 1px solid #FFFFFF;
  border-radius: 6px;
  width: clamp(34px, 6vw, 46px);
  height: clamp(34px, 6vw, 46px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #FFFFFF;
}

/* Contact */
.contact-form-container {
  padding: 1.5rem 1.25rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 680px;
}

.contact-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.contact-field-group label {
  font-family: var(--font-sans);
  font-size: clamp(1.25rem, 3.5vw, 1.6rem);
  font-weight: 800;
  color: var(--c-text-dark);
}

.contact-input-pill {
  width: 100%;
  background-color: var(--c-input-gray);
  border: none;
  border-radius: 6px;
  padding: 0.9rem 1.1rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--c-text-dark);
}

.btn-large-action {
  width: 100%;
  background-color: #FFFFFF;
  color: #000000;
  border: 2px solid #000000;
  border-radius: 6px;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-sans);
  font-size: clamp(1.3rem, 3.5vw, 1.65rem);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
}

/* ==========================================================================
   9. CANVAS SELECTION & HOVER OVERLAYS
   ========================================================================== */
.canvas-inspectable {
  position: relative;
  cursor: pointer;
  outline: 2px dashed transparent;
  outline-offset: -2px;
  transition: outline 0.12s ease;
}

.canvas-inspectable:hover {
  outline: 2px dashed #000000 !important;
}

.canvas-inspectable.is-selected {
  outline: 2px solid #000000 !important;
  outline-offset: -2px;
}

.inspect-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #000000;
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  z-index: 30;
  display: none;
  letter-spacing: 0.04em;
  pointer-events: none;
  max-width: calc(100% - 8px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.canvas-inspectable.is-selected .inspect-badge {
  display: block;
}

/* ==========================================================================
   10. MODAL DIALOGS
   ========================================================================== */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-box {
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  max-height: calc(100dvh - 3rem);
  overflow-y: auto;
  padding: 1.75rem;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

.modal-header h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--studio-text);
}

.btn-ctrl {
  background: transparent;
  border: none;
  color: var(--studio-text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
}

.btn-ctrl:hover {
  color: #000000;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.74rem;
  font-weight: 700;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.ai-status-box {
  background: var(--studio-surface-subtle);
  border: 1px solid var(--studio-border);
  border-radius: 6px;
  padding: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* ==========================================================================
   11. RESPONSIVENESS & MOBILE HANDLING
   ========================================================================== */
@media (max-width: 900px) {
  .topbar-center {
    display: none;
  }

  .topbar-divider {
    display: none;
  }

  .studio-left-drawer {
    position: fixed;
    left: var(--rail-w);
    top: var(--topbar-h);
    bottom: 0;
    width: calc(100vw - var(--rail-w));
    max-width: 320px;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.12);
  }

  .studio-right-inspector {
    position: fixed;
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    max-width: none;
    height: 58vh;
    min-width: 0;
    border-left: none;
    border-top: 1px solid var(--studio-border);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.12);
    display: none;
  }

  .studio-right-inspector:has(#inspectorBody[style*="flex"]) {
    display: flex;
  }

  .studio-workspace:has(#inspectorBody[style*="flex"]) .studio-canvas-viewport {
    padding-bottom: 60vh;
  }

  .studio-canvas-viewport {
    padding: 1rem 0.5rem 6rem;
  }
}

/* ==========================================================================
   16. COMPONENT STYLES ADDED FOR admin.js v3
   Classes the canvas, layers panel and inquiries list depend on.
   ========================================================================== */
.card-action-row {
  display: flex;
  align-items: center;
  margin-top: 0.75rem;
}

.crumb-sep {
  display: inline-flex;
  align-items: center;
  margin: 0 0.35rem;
  opacity: 0.7;
}

.section-heading-dark {
  font-size: 1.4rem;
  font-weight: 800;
  color: #000000;
  margin-bottom: 1rem;
}

.tool-name {
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  color: #000000;
}

.site-main-content {
  display: block;
  width: 100%;
}

.layers-container {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.layer-node-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--studio-border);
  border-radius: 8px;
  background: var(--studio-surface);
  font-size: 0.78rem;
  cursor: pointer;
  transition: var(--transition);
}

.layer-node-item:hover {
  border-color: #000000;
}

.layer-node-item .layer-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layer-node-item .layer-meta {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.inquiries-container {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Route pill: keep it on one line; long paths truncate */
.active-route-pill {
  max-width: 180px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ==========================================================================
   17. ACCESSIBILITY: visible focus, reduced motion
   ========================================================================== */
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 2px;
}

.input-clean:focus {
  border-color: #000000;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* Markdown preview under text fields */
.md-preview { border: 1px dashed #bbb; border-radius: 8px; padding: 0.6rem 0.75rem; margin: 0.4rem 0 0.8rem; font-size: 0.9rem; line-height: 1.5; background: #fafafa; overflow-wrap: anywhere; }
.md-preview:empty::before { content: "Preview appears here"; color: #888; }
.md-preview p { margin: 0 0 0.6em; }
.md-preview h1, .md-preview h2, .md-preview h3 { margin: 0.5em 0 0.3em; }
.md-preview ul, .md-preview ol { padding-left: 1.2rem; margin: 0 0 0.6em; }
.md-preview code { background: rgba(0,0,0,0.06); padding: 0 0.2em; border-radius: 3px; }
.md-preview pre { background: #f0f0f0; padding: 0.5rem; border-radius: 6px; overflow: auto; }
.md-preview img { max-width: 100%; height: auto; border-radius: 6px; }
.md-preview table { border-collapse: collapse; } .md-preview th, .md-preview td { border: 1px solid #ccc; padding: 0.25rem 0.4rem; }

/* Pages and element tools: dialogs and small buttons */
.pt-dialog { border: 0; border-radius: 12px; padding: 0; width: 100%; max-width: min(440px, calc(100vw - 2rem)); }
.pt-dialog::backdrop { background: rgba(0, 0, 0, 0.4); }
.pt-body { padding: 1.25rem; }
.pt-title { margin: 0 0 0.75rem; font-size: 1.1rem; }
.pt-error { color: #b00020; margin: 0.5rem 0 0; font-size: 0.85rem; }
.pt-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }
.pt-row { display: inline-flex; align-items: center; gap: 0.3rem; margin-right: 0.3rem; }
.pt-btn { font-size: 0.7rem; padding: 0.2rem 0.45rem; border: 1px solid #bbb; border-radius: 6px; background: #fff; cursor: pointer; }
.pt-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.pt-badge { font-size: 0.6rem; color: #b00020; font-weight: 700; margin-right: 0.2rem; }

/* ==========================================================================
   Studio look: cards, soft inputs, switches, segmented choices (Site Kit and panels)
   ========================================================================== */
.ext-group {
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 16px;
  padding: 16px 18px;
  margin: 0 0 14px;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04), 0 6px 18px rgba(28, 25, 23, 0.04);
}
.ext-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #78716c;
  margin: 14px 0 6px;
}
.ext-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d6d3d1;
  border-radius: 10px;
  padding: 9px 11px;
  background: #fafaf9;
  font: inherit;
  font-size: 14px;
  color: #1c1917;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.ext-input:focus { outline: none; border-color: #1c1917; background: #fff; box-shadow: 0 0 0 3px rgba(28, 25, 23, 0.08); }
.ext-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  background: #1c1917;
  color: #fafaf9;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.ext-btn:hover { background: #44403c; }
.ext-btn:active { transform: scale(0.98); }
.ext-hint { font-size: 12.5px; color: #78716c; line-height: 1.5; margin: 8px 0 0; }
.ext-check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #292524; margin: 10px 0; cursor: pointer; }
.ext-check input[type="checkbox"] {
  box-sizing: border-box !important;
  min-height: 0 !important;
  max-height: 22px !important;
  height: 22px !important;
  width: 38px !important;
  appearance: none;
  width: 38px;
  height: 22px;
  flex: 0 0 38px;
  margin: 0;
  border-radius: 999px;
  background: #d6d3d1;
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
}
.ext-check input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}
.ext-check input[type="checkbox"]:checked { background: #1c1917; }
.ext-check input[type="checkbox"]:checked::after { transform: translateX(16px); }
.ext-check input[type="radio"] { accent-color: #1c1917; width: 16px; height: 16px; margin: 0; }
.pt-item { background: #fafaf9; border: 1px solid #e7e5e4; border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.pt-item-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.pt-item-tools { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.pt-btn {
  border: 1px solid #d6d3d1;
  background: #fff;
  color: #44403c;
  border-radius: 999px;
  padding: 5px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.pt-btn:hover { border-color: #1c1917; color: #1c1917; }
.seg { display: inline-flex; background: #f5f5f4; border-radius: 11px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 11px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 500; color: #57534e; cursor: pointer; }
.seg button[aria-pressed="true"] { background: #fff; color: #1c1917; font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.chip {
  border: 1px solid #d6d3d1;
  background: #fff;
  border-radius: 999px;
  padding: 5px 12px;
  font: inherit;
  font-size: 12.5px;
  color: #44403c;
  cursor: pointer;
}
.chip[aria-pressed="true"] { background: #1c1917; border-color: #1c1917; color: #fafaf9; }
.chip:disabled { opacity: 0.45; cursor: default; }
.ts-card { background: #fff; border: 1px solid #e7e5e4; border-radius: 16px; padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04); }
.ts-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.ts-name { font-weight: 700; font-size: 15px; color: #1c1917; }
.ts-hint { font-size: 12px; color: #78716c; margin-top: 2px; }
.ts-sample { font-size: 18px; color: #1c1917; background: #fafaf9; border: 1px dashed #d6d3d1; border-radius: 12px; padding: 8px 12px; min-width: 150px; }
.ts-row { display: grid; grid-template-columns: 74px 1fr; gap: 10px; align-items: center; margin-top: 10px; }
.ts-k { font-size: 12px; font-weight: 600; color: #57534e; }
.ts-row input[type="range"] { accent-color: #1c1917; width: 100%; }
.ts-row input[type="color"] { width: 44px; height: 30px; border: 1px solid #d6d3d1; border-radius: 8px; padding: 2px; background: #fff; cursor: pointer; }
.ts-val { font-size: 12px; color: #78716c; }
.ts-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ts-readmore { display: flex; gap: 10px; align-items: center; }
.ts-readmore input { width: 90px; }
.ts-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ts-row > .ts-k { flex: 0 0 72px; }
.ts-row > :not(.ts-k) { flex: 1 1 150px; min-width: 0; }
.ts-row > .chip { white-space: nowrap; flex: 0 0 auto; }
.ts-row select, .ts-row input[type="range"] { max-width: 100%; }

/* Switches keep their own size, even when a rule sets a minimum height for text fields */
.ext-check { align-items: center; }
.ext-check input[type="checkbox"] { flex: 0 0 38px !important; }

/* Templates */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 10px; }
.tpl-card { border: 1px solid #e7e5e4; border-radius: 14px; padding: 12px; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.tpl-swatch { height: 46px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; padding: 0 16px; box-sizing: border-box; }
.tpl-name { font-weight: 700; font-size: 13px; color: #1c1917; }
.tpl-note { font-size: 12px; color: #78716c; }
.tpl-tag { font-size: 11px; color: #78716c; text-transform: uppercase; letter-spacing: 0.06em; }
.tpl-el { background: #fafaf9; color: #1c1917; border: 1px dashed #d6d3d1; font-size: 13px; }
