/* Complete standalone CSS for Vector2SVG - works directly in any browser and simple HTTP server */
:root {
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html, body {
  min-height: 100vh;
  font-family: var(--font-sans);
  color: #0f172a;
  background-color: #f8fafc;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, textarea, select {
  font-family: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

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

/* Layout Utilities */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0.875rem 1.5rem;
  background-color: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.brand-link:hover .brand-title {
  color: #2563eb;
}

.app-brand-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
  transition: transform 0.15s ease;
}

.brand-link:hover .app-brand-icon {
  transform: scale(1.05);
}

.brand-title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #0f172a;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.brand-title:hover {
  color: #2563eb;
}

.brand-badge {
  font-size: 0.75rem;
  font-weight: 500;
  color: #94a3b8;
  margin-left: 0.5rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
}

.nav-link {
  color: #475569;
  cursor: pointer;
  transition: color 0.15s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: #0f172a;
}

.nav-link.active {
  color: #2563eb;
  font-weight: 600;
}

.main-content {
  flex: 1;
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .main-content {
    padding: 1.5rem 1.5rem;
  }
}

/* Grid for Editor & Preview */
.split-workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

@media (min-width: 1024px) {
  .split-workspace {
    grid-template-columns: 1fr 1fr;
  }
}

/* Card Containers */
.card-panel {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background-color: #ffffff;
  border-bottom: 1px solid #f1f5f9;
}

.panel-footer {
  padding: 0.625rem 1rem;
  background-color: #f8fafc;
  border-top: 1px solid #f1f5f9;
  font-size: 0.75rem;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.375rem 0.625rem;
  border-radius: 0.375rem;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-default {
  color: #334155;
  background-color: #f1f5f9;
}

.btn-default:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

.btn-outline {
  color: #334155;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
}

.btn-outline:hover {
  background-color: #f8fafc;
  color: #0f172a;
}

.btn-primary {
  color: #ffffff;
  background-color: #2563eb;
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

.btn-danger-ghost {
  color: #64748b;
}

.btn-danger-ghost:hover {
  color: #e11d48;
  background-color: #ffe4e6;
}

/* Checkerboards */
.checkerboard-pattern {
  background-color: #ffffff;
  background-image: 
    linear-gradient(45deg, #e2e8f0 25%, transparent 25%), 
    linear-gradient(-45deg, #e2e8f0 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, #e2e8f0 75%), 
    linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}

.checkerboard-pattern-dark {
  background-color: #0f172a;
  background-image: 
    linear-gradient(45deg, #1e293b 25%, transparent 25%), 
    linear-gradient(-45deg, #1e293b 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, #1e293b 75%), 
    linear-gradient(-45deg, transparent 75%, #1e293b 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}

.bg-white-solid {
  background-color: #ffffff;
}

.bg-slate-solid {
  background-color: #0f172a;
}

.bg-black-solid {
  background-color: #000000;
}

/* Diagnostics alert */
.diag-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  line-height: 1.4;
}

.diag-error {
  background-color: #fff1f2;
  border: 1px solid #fecdd3;
  color: #9f1239;
}

.diag-warning {
  background-color: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.diag-info {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

/* Typography Helpers */
.font-mono {
  font-family: var(--font-mono);
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Textarea resets */
textarea.code-input {
  width: 100%;
  flex: 1;
  min-height: 340px;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  border: none;
  resize: none;
  outline: none;
  background-color: #ffffff;
  color: #1e293b;
}

textarea.code-output-dark {
  width: 100%;
  height: 260px;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  border: none;
  resize: none;
  outline: none;
  background-color: #0f172a;
  color: #f1f5f9;
}

textarea.code-output-light {
  width: 100%;
  height: 260px;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  border: none;
  resize: none;
  outline: none;
  background-color: #f8fafc;
  color: #0f172a;
}

/* Reference Item Row */
.ref-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.15s ease;
}

.ref-row:hover {
  background-color: #f8fafc;
}

.ref-row.is-overridden {
  background-color: #f0f7ff;
}

@media (min-width: 768px) {
  .ref-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* Footer */
.app-footer {
  margin-top: auto;
  border-top: 1px solid #e2e8f0;
  background-color: #ffffff;
  padding: 1rem 1.5rem;
  font-size: 0.75rem;
  color: #64748b;
}

.footer-inner {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
  }
}
