/*
 * Layout.OS // Editorial Grid Composer
 * High-fidelity typography & grid simulation system.
 */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,400&family=Courier+Prime:ital,wght@0,400;0,700;1,400&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@300;400;500&family=Outfit:wght@300;400;500;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* ==========================================================================
   CSS Design Tokens & Theme Declarations
   ========================================================================== */

:root {
  /* Default Theme: Warm Newsprint */
  --bg-app: #eae6df;
  --bg-sidebar: #f2eee8;
  --bg-canvas-container: #eae6df;
  --bg-paper: #fcfaf6;
  --text-main: #1c1a17;
  --text-muted: #6b6357;
  --border-color: rgba(28, 26, 23, 0.15);
  --border-color-active: rgba(28, 26, 23, 0.4);
  --accent-color: #c85a32;
  --accent-color-hover: #b04720;
  --accent-rgb: 200, 90, 50;
  
  --grid-line-color: rgba(200, 90, 50, 0.15);
  --grid-col-fill: rgba(200, 90, 50, 0.02);
  --baseline-line-color: rgba(28, 26, 23, 0.08);

  /* Layout Simulation Variables (Modified by JS) */
  --grid-cols: 6;
  --grid-gutter: 24px;
  --grid-margin: 32px;
  
  /* Typography Simulator Variables (Modified by JS) */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --font-size-base: 16px;
  --line-height-base: 1.6;
  --letter-spacing-base: -0.01em;
  --hdr-scale: 1.4;
  --drop-cap-color: var(--accent-color);
  
  /* Base measurements */
  --sidebar-width: 420px;
  --header-height: 64px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 32px rgba(28, 26, 23, 0.08);
  
  /* Animation */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Theme: Technical Dark */
[data-theme="tech-dark"] {
  --bg-app: #0c0e10;
  --bg-sidebar: #13171b;
  --bg-canvas-container: #0c0e10;
  --bg-paper: #181d22;
  --text-main: #e2e8f0;
  --text-muted: #8a9ba8;
  --border-color: rgba(226, 232, 240, 0.12);
  --border-color-active: rgba(226, 232, 240, 0.3);
  --accent-color: #00ff66;
  --accent-color-hover: #00d957;
  --accent-rgb: 0, 255, 102;
  
  --grid-line-color: rgba(0, 255, 102, 0.18);
  --grid-col-fill: rgba(0, 255, 102, 0.02);
  --baseline-line-color: rgba(0, 255, 102, 0.06);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.4);
}

/* Theme: Swiss Red */
[data-theme="swiss-red"] {
  --bg-app: #e5e5e5;
  --bg-sidebar: #ffffff;
  --bg-canvas-container: #e5e5e5;
  --bg-paper: #ffffff;
  --text-main: #000000;
  --text-muted: #555555;
  --border-color: rgba(0, 0, 0, 0.2);
  --border-color-active: rgba(0, 0, 0, 0.6);
  --accent-color: #e3000f;
  --accent-color-hover: #bd000c;
  --accent-rgb: 227, 0, 15;
  
  --grid-line-color: rgba(227, 0, 15, 0.18);
  --grid-col-fill: rgba(227, 0, 15, 0.02);
  --baseline-line-color: rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
}

/* Theme: Editorial Blue */
[data-theme="editorial-blue"] {
  --bg-app: #e1e7f0;
  --bg-sidebar: #f0f4fa;
  --bg-canvas-container: #e1e7f0;
  --bg-paper: #ffffff;
  --text-main: #0d1e3d;
  --text-muted: #5a6e8f;
  --border-color: rgba(13, 30, 61, 0.15);
  --border-color-active: rgba(13, 30, 61, 0.4);
  --accent-color: #2b5cb3;
  --accent-color-hover: #20468c;
  --accent-rgb: 43, 92, 179;
  
  --grid-line-color: rgba(43, 92, 179, 0.18);
  --grid-col-fill: rgba(43, 92, 179, 0.02);
  --baseline-line-color: rgba(13, 30, 61, 0.08);
  --shadow-lg: 0 12px 32px rgba(13, 30, 61, 0.06);
}

/* ==========================================================================
   Base resets & layouts
   ========================================================================== */

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-app);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: background-color var(--transition-normal);
}

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

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-color-active);
}

/* ==========================================================================
   Header Styles
   ========================================================================== */

header {
  height: var(--header-height);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background-color: color-mix(in srgb, var(--bg-sidebar) 85%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 10;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  background-color: var(--accent-color);
  color: var(--bg-paper);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-normal);
}

.logo-text {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-text span {
  opacity: 0.5;
  font-weight: 300;
}

.logo-tag {
  font-size: 0.7rem;
  padding: 2px 8px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  margin-right: 6px;
  background-color: rgba(0, 0, 0, 0.02);
}

.nav-btn {
  background: none;
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  border-radius: 100px;
  display: flex;
  align-items: center;
  color: var(--text-main);
  text-decoration: none;
  transition: all var(--transition-normal);
}

.nav-btn:hover {
  background-color: rgba(var(--accent-rgb), 0.05);
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateY(-1px);
}

.navbar-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.responsive-selectors {
  display: flex;
  background-color: rgba(0,0,0,0.03);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  padding: 3px;
  gap: 2px;
}

.responsive-btn {
  background: none;
  border: none;
  padding: 6px 14px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  cursor: pointer;
  border-radius: 100px;
  opacity: 0.6;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-normal);
}

.responsive-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.responsive-btn:hover {
  opacity: 0.9;
}

.responsive-btn.active {
  background-color: var(--bg-paper);
  opacity: 1;
  color: var(--accent-color);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-btn {
  background: none;
  border: 1px solid var(--border-color);
  padding: 8px 18px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-normal);
}

.action-btn:hover {
  background-color: rgba(var(--accent-rgb), 0.04);
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.08);
}

.action-btn.primary {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--bg-paper);
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.15);
}

.action-btn.primary:hover {
  background-color: var(--accent-color-hover);
  border-color: var(--accent-color-hover);
  box-shadow: 0 6px 18px rgba(var(--accent-rgb), 0.25);
  transform: translateY(-1px);
}

/* ==========================================================================
   Main App Screen Split
   ========================================================================== */

.app-container {
  display: flex;
  flex: 1;
  height: calc(100vh - var(--header-height));
  overflow: hidden;
}

/* ==========================================================================
   Sidebar: Controls Panel
   ========================================================================== */

.sidebar {
  width: var(--sidebar-width);
  background-color: color-mix(in srgb, var(--bg-sidebar) 85%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  z-index: 5;
  transition: all var(--transition-normal);
}

.control-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--border-color);
}

.control-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.section-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Presets Grid styling */
.presets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.preset-card {
  background-color: var(--bg-paper);
  border: 1px solid var(--border-color);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  transition: all var(--transition-fast);
}

.preset-card:hover {
  border-color: var(--border-color-active);
  transform: translateY(-1px);
}

.preset-card.active {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 1px var(--accent-color);
}

.preset-name {
  font-size: 0.8rem;
  font-weight: 600;
}

.preset-desc {
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Form elements styling */
.control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-label {
  font-size: 0.75rem;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.control-val {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.7rem;
}

/* Custom sliders */
.slider-input {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--border-color);
  outline: none;
  cursor: pointer;
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-color);
  border: 1px solid var(--bg-paper);
  transition: transform 0.1s ease;
}

.slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Custom selects */
.select-input {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-paper);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  transition: all var(--transition-fast);
}

.select-input:hover {
  border-color: var(--border-color-active);
}

.select-input:focus {
  border-color: var(--accent-color);
}

/* Switch & toggles grid */
.toggles-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toggle-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toggle-label-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-title {
  font-size: 0.8rem;
  font-weight: 500;
}

.toggle-desc {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-color);
  transition: .2s;
  border-radius: 10px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: var(--bg-paper);
  transition: .2s;
  border-radius: 50%;
}

input:checked + .switch-slider {
  background-color: var(--accent-color);
}

input:checked + .switch-slider:before {
  transform: translateX(16px);
}

/* Themes row */
.themes-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.theme-btn {
  background: none;
  border: 1px solid var(--border-color);
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.theme-btn:hover {
  border-color: var(--border-color-active);
}

.theme-btn.active {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 1px var(--accent-color);
}

.theme-color-preview {
  width: 100%;
  height: 16px;
  border-radius: 2px;
  border: 1px solid rgba(0,0,0,0.05);
}

.theme-name {
  font-size: 0.6rem;
  font-family: var(--font-mono);
  font-weight: 500;
  text-align: center;
}

/* ==========================================================================
   Canvas Workspace (The Simulator Panel)
   ========================================================================== */

.canvas-container {
  flex: 1;
  background-color: var(--bg-canvas-container);
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
  transition: background-color var(--transition-normal);
}

/* Device Wrapper simulation classes */
.device-wrapper {
  background-color: var(--bg-paper);
  color: var(--text-main);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  transition: width var(--transition-normal), height var(--transition-normal), background-color var(--transition-normal), border-color var(--transition-normal);
  display: flex;
  flex-direction: column;
}

/* Responsive View Modes sizes */
.device-wrapper.desktop {
  width: 1080px;
  height: 720px;
}

.device-wrapper.tablet {
  width: 768px;
  height: 960px;
}

.device-wrapper.mobile {
  width: 375px;
  height: 667px;
}

/* The actual scrollable paper inside the simulator frame */
.canvas-paper {
  flex: 1;
  overflow-y: auto;
  padding: var(--grid-margin);
  position: relative;
  /* Paper grain effect (subtle overlay) */
  background-image: 
    radial-gradient(rgba(28, 26, 23, 0.015) 1px, transparent 0),
    radial-gradient(rgba(28, 26, 23, 0.01) 1px, transparent 0);
  background-size: 8px 8px, 16px 16px;
  background-position: 0 0, 4px 4px;
}

/* ==========================================================================
   Grid & Baseline Overlays (Technical Guide Lines)
   ========================================================================== */

/* Outer grid system container */
.grid-overlay-container {
  position: absolute;
  top: var(--grid-margin);
  left: var(--grid-margin);
  right: var(--grid-margin);
  bottom: var(--grid-margin);
  pointer-events: none;
  z-index: 100;
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), 1fr);
  column-gap: var(--grid-gutter);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.grid-overlay-container.visible {
  opacity: 1;
}

.grid-overlay-column {
  border-left: 1px dashed var(--grid-line-color);
  border-right: 1px dashed var(--grid-line-color);
  background-color: var(--grid-col-fill);
  height: 100%;
  position: relative;
}

.grid-overlay-column::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: 1px dotted rgba(200, 90, 50, 0.04);
}

/* Baseline grid container */
.baseline-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 99;
  background-image: linear-gradient(to bottom, var(--baseline-line-color) 1px, transparent 1px);
  /* The height of the baseline matches the line-height computed in JS */
  background-size: 100% 24px; 
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.baseline-overlay.visible {
  opacity: 1;
}

/* Margin Guides Overlay */
.margin-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 98;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  margin: var(--grid-margin);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.margin-overlay.visible {
  opacity: 1;
}

.margin-label {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 9px;
  background: var(--accent-color);
  color: var(--bg-paper);
  padding: 1px 4px;
  border-radius: 2px;
  z-index: 101;
}

.margin-label.top-left {
  top: -7px;
  left: 10px;
}

.margin-label.bottom-right {
  bottom: -7px;
  right: 10px;
}

/* ==========================================================================
   Editorial Content / Editorial Layout Simulation
   ========================================================================== */

/* The root grid system applied to the simulated article content */
.editorial-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), 1fr);
  column-gap: var(--grid-gutter);
  row-gap: 24px;
  align-items: start;
}

/* Utility layout placement classes span variables */
.span-all {
  grid-column: 1 / -1;
}

.span-half {
  grid-column: span calc(var(--grid-cols) / 2);
}

.span-two-thirds {
  grid-column: span calc(var(--grid-cols) * 2 / 3);
}

.span-one-third {
  grid-column: span calc(var(--grid-cols) / 3);
}

/* Fallbacks for non-integer division grid spans */
.col-span-1 { grid-column: span 1; }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.col-span-4 { grid-column: span 4; }
.col-span-5 { grid-column: span 5; }
.col-span-6 { grid-column: span 6; }
.col-span-7 { grid-column: span 7; }
.col-span-8 { grid-column: span 8; }
.col-span-9 { grid-column: span 9; }
.col-span-10 { grid-column: span 10; }
.col-span-11 { grid-column: span 11; }
.col-span-12 { grid-column: span 12; }

/* Typographic Elements */
.header-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-color);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 8px;
}

.article-title {
  font-family: var(--font-heading);
  /* Uses formula: base size * scale multiplier */
  font-size: calc(var(--font-size-base) * var(--hdr-scale) * var(--hdr-scale) * var(--hdr-scale));
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.article-subtitle {
  font-family: var(--font-heading);
  font-size: calc(var(--font-size-base) * var(--hdr-scale) * var(--hdr-scale));
  font-style: italic;
  font-weight: 300;
  line-height: 1.25;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.lead-paragraph {
  font-size: calc(var(--font-size-base) * 1.25);
  line-height: 1.5;
  color: var(--text-main);
  font-weight: 300;
  margin-bottom: 16px;
}

/* Multi-column layouts */
.column-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.body-p {
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  letter-spacing: var(--letter-spacing-base);
  margin-bottom: 14px;
  text-align: var(--text-align, left);
}

.body-p.indented {
  text-indent: 2rem;
  margin-bottom: 0;
}

/* Drop cap effect */
.drop-cap::first-letter {
  font-family: var(--font-heading);
  float: left;
  font-size: 3.8rem;
  line-height: 0.75;
  padding-top: 4px;
  padding-right: 8px;
  color: var(--drop-cap-color);
  font-weight: 600;
}

/* Pull Quotes */
.pull-quote {
  border-top: 2px solid var(--accent-color);
  border-bottom: 2px solid var(--accent-color);
  padding: 24px 0;
  margin: 12px 0;
}

.pull-quote-text {
  font-family: var(--font-heading);
  font-size: calc(var(--font-size-base) * var(--hdr-scale) * 1.1);
  line-height: 1.3;
  font-style: italic;
  text-align: center;
  color: var(--text-main);
}

.pull-quote-author {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
  margin-top: 12px;
  color: var(--accent-color);
}

/* Graphic elements */
.editorial-image-box {
  background-color: rgba(var(--accent-rgb), 0.04);
  border: 1px solid var(--border-color);
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 8px 0;
}

.editorial-image-svg {
  width: 100%;
  height: 100%;
  opacity: 0.8;
  transition: transform 0.5s ease;
}

.editorial-image-box:hover .editorial-image-svg {
  transform: scale(1.02);
}

.image-label {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  bottom: 8px;
  right: 12px;
  background-color: var(--bg-paper);
  padding: 3px 6px;
  border-radius: 2px;
}

.editorial-caption {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 4px;
}

/* ==========================================================================
   HUD Element Inspector
   ========================================================================== */

/* Hover detection targeting on canvas */
.canvas-paper .inspectable {
  position: relative;
  cursor: grab;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: border-color var(--transition-fast), background-color var(--transition-fast), transform var(--transition-fast);
  user-select: none;
}

.canvas-paper .inspectable:active {
  cursor: grabbing;
}

.canvas-paper .inspectable.dragging {
  opacity: 0.35;
  border: 1.5px dashed var(--accent-color) !important;
  background-color: rgba(var(--accent-rgb), 0.05);
  transform: scale(0.98);
}

.canvas-paper .inspectable:hover {
  border-color: rgba(var(--accent-rgb), 0.3);
  background-color: rgba(var(--accent-rgb), 0.015);
}

/* Drag handle indicator when hovered */
.canvas-paper .inspectable::before {
  content: '⋮⋮ DRAG';
  position: absolute;
  top: 6px;
  right: 6px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--accent-color);
  background-color: var(--bg-paper);
  border: 1px solid var(--border-color);
  padding: 2px 5px;
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
  z-index: 100;
}

.canvas-paper .inspectable:hover::before {
  opacity: 0.95;
}

/* The actual floating overlay HUD */
.hud-inspector {
  position: absolute;
  background-color: rgba(28, 26, 23, 0.95);
  color: #fcfaf6;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  display: none;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

[data-theme="tech-dark"] .hud-inspector {
  background-color: rgba(19, 23, 27, 0.95);
  color: #e2e8f0;
  border-color: rgba(0, 255, 102, 0.3);
}

.hud-tag {
  font-weight: 700;
  color: var(--accent-color);
  font-size: 11px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 2px;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.hud-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.hud-label {
  opacity: 0.6;
}

.hud-val {
  font-weight: 500;
  text-align: right;
}

/* ==========================================================================
   Code Exporter & Modals
   ========================================================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(12, 14, 16, 0.6);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  width: 90%;
  max-width: 680px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
  padding: 4px;
  display: flex;
}

.modal-close:hover {
  opacity: 1;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.code-container {
  position: relative;
  background-color: #111;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.code-block {
  margin: 0;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #a9b7c6;
  overflow-x: auto;
  max-height: 300px;
  line-height: 1.5;
}

.code-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 6px 12px;
  border-radius: 3px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.code-copy-btn:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ==========================================================================
   Responsive UI elements (for simulator app interface, not simulated canvas)
   ========================================================================== */

@media (max-width: 1024px) {
  body {
    overflow-y: auto;
    height: auto;
  }
  
  .app-container {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }
  
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    height: auto;
    overflow: visible;
  }
  
  .canvas-container {
    padding: 20px;
    min-height: 600px;
  }
  
  .device-wrapper.desktop {
    width: 100%;
    height: 600px;
  }
}

/* Tip Bar at the top of the simulated page */
.simulator-tip-bar {
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-mono);
  font-size: 10px;
  text-align: center;
  padding: 8px 16px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  user-select: none;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

/* ==========================================================================
   Landing Screen Overlay (2 Divs)
   ========================================================================== */

.landing-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  display: flex;
  transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.8s ease;
  overflow: hidden;
}

/* Slide up out of view on launch */
.landing-screen.launched {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* Div 1: Left Info Section */
.landing-info {
  flex: 1;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  padding: 8% 6%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.landing-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent-color);
  font-weight: 500;
}

.landing-main-text {
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.landing-title {
  font-family: var(--font-heading);
  font-size: 4.5rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.landing-desc {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.landing-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.launch-btn {
  background-color: var(--accent-color);
  border: 1px solid var(--accent-color);
  color: var(--bg-paper);
  padding: 14px 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.launch-btn:hover {
  background-color: var(--accent-color-hover);
  border-color: var(--accent-color-hover);
  transform: translateY(-1px);
}

.launch-btn.secondary {
  background-color: transparent;
  border: 1px solid var(--border-color-active);
  color: var(--text-main);
  box-shadow: none;
}

.launch-btn.secondary:hover {
  background-color: rgba(0,0,0,0.03);
  border-color: var(--text-main);
}

.launch-btn svg {
  transition: transform var(--transition-fast);
}

.launch-btn:hover svg {
  transform: translateX(4px);
}

.landing-footer {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  opacity: 0.8;
}

/* Div 2: Right Graphic Art Section */
.landing-visual {
  flex: 1;
  background-color: var(--bg-app);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background-color var(--transition-normal);
}

/* Swiss Grid Art Composition */
.visual-art-box {
  width: 400px;
  height: 400px;
  position: relative;
  border: 1px solid var(--border-color);
}

.visual-grid-line {
  position: absolute;
  background-color: var(--border-color);
}

.h-line-1 { top: 30%; left: 0; width: 100%; height: 1px; }
.h-line-2 { top: 70%; left: 0; width: 100%; height: 1px; }
.v-line-1 { left: 30%; top: 0; width: 1px; height: 100%; }
.v-line-2 { left: 70%; top: 0; width: 1px; height: 100%; }

.visual-block {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  border-radius: 2px;
}

.block-red {
  top: 30%;
  left: 30%;
  width: 40%;
  height: 40%;
  background-color: var(--accent-color);
  color: var(--bg-paper);
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 400;
  transition: transform 0.5s ease, background-color var(--transition-normal);
}

.block-red:hover {
  transform: scale(1.03);
}

.block-text {
  top: 10%;
  left: 30%;
  width: 40%;
  height: 20%;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--text-main);
}

.block-outline {
  top: 70%;
  left: 0;
  width: 30%;
  height: 30%;
  border: 1px dashed var(--accent-color);
  color: var(--accent-color);
  font-family: var(--font-mono);
  font-size: 1.1rem;
}

.visual-circle {
  position: absolute;
  top: 10%;
  left: 70%;
  width: 20%;
  height: 20%;
  border: 1.5px solid var(--accent-color);
  border-radius: 50%;
  animation: visual-rotate 12s linear infinite;
}

@keyframes visual-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Responsive Landing Page Stack */
@media (max-width: 768px) {
  .landing-screen {
    flex-direction: column;
  }
  
  .landing-info {
    padding: 12% 8%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  
  .landing-visual {
    padding: 12% 8%;
    min-height: 350px;
  }
  
  .visual-art-box {
    width: 280px;
    height: 280px;
  }
}

/* ==========================================================================
   Wireframe Skeletal Layout Styles
   ========================================================================== */

.wireframe-mode .canvas-paper {
  background-color: var(--bg-paper) !important;
  background-image: 
    linear-gradient(to right, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.04) 1px, transparent 1px) !important;
  background-size: 24px 24px !important;
}

[data-theme="tech-dark"] .wireframe-mode .canvas-paper {
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px) !important;
}

/* Transform typography elements to solid outline blocks */
.wireframe-mode .article-title {
  background-color: var(--text-muted) !important;
  color: transparent !important;
  border-radius: var(--radius-sm);
  height: 36px;
  width: 85%;
  margin-bottom: 16px;
  pointer-events: none;
}

.wireframe-mode .article-subtitle {
  background-color: var(--border-color) !important;
  color: transparent !important;
  border-radius: var(--radius-sm);
  height: 18px;
  width: 60%;
  margin-bottom: 24px;
  pointer-events: none;
}

.wireframe-mode .lead-paragraph {
  background-color: var(--border-color) !important;
  color: transparent !important;
  border-radius: var(--radius-sm);
  height: 16px;
  width: 95%;
  margin-bottom: 12px;
  pointer-events: none;
}

/* Draw paragraphs as repeating lines */
.wireframe-mode .body-p {
  color: transparent !important;
  position: relative;
  height: 80px !important;
  background: repeating-linear-gradient(
    to bottom,
    var(--border-color) 0px,
    var(--border-color) 10px,
    transparent 10px,
    transparent 20px
  ) !important;
  border-radius: var(--radius-sm);
  pointer-events: none;
  margin-bottom: 14px;
}

.wireframe-mode .pull-quote {
  border-color: var(--border-color) !important;
}

.wireframe-mode .pull-quote-text {
  background-color: var(--border-color) !important;
  color: transparent !important;
  height: 24px;
  width: 80%;
  margin: 0 auto;
  pointer-events: none;
}

.wireframe-mode .pull-quote-author {
  background-color: var(--border-color) !important;
  color: transparent !important;
  height: 12px;
  width: 30%;
  margin: 8px auto 0;
  pointer-events: none;
}

/* Crossed out block for images */
.wireframe-mode .editorial-image-box {
  background-color: transparent !important;
  border: 1px solid var(--border-color) !important;
}

.wireframe-mode .editorial-image-svg {
  display: none !important;
}

.wireframe-mode .editorial-image-box::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(to top right, transparent calc(50% - 1px), var(--border-color) 50%, transparent calc(50% + 1px)),
    linear-gradient(to bottom right, transparent calc(50% - 1px), var(--border-color) 50%, transparent calc(50% + 1px)) !important;
  pointer-events: none;
}

.wireframe-mode .editorial-caption {
  background-color: var(--border-color) !important;
  color: transparent !important;
  height: 12px;
  width: 50%;
  margin-top: 8px;
  pointer-events: none;
}

/* ==========================================================================
   SQL Editor Mode Styles
   ========================================================================== */

.hidden {
  display: none !important;
}

/* Database Schema Guide */
.schema-browser {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
}

.schema-table {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 8px;
}

.schema-table:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.table-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-color);
}

.table-cols {
  font-size: 0.65rem;
  color: var(--text-muted);
  word-break: break-all;
}

/* SQL Image Dropzone */
.sql-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: all var(--transition-normal);
  background-color: rgba(0, 0, 0, 0.01);
  background-image: radial-gradient(var(--border-color) 1.2px, transparent 1.2px);
  background-size: 8px 8px;
}

.sql-dropzone:hover {
  border-color: var(--accent-color);
  background-color: rgba(var(--accent-rgb), 0.03);
  color: var(--accent-color);
  box-shadow: inset 0 0 12px rgba(var(--accent-rgb), 0.05);
  transform: scale(0.98);
}

/* Blueprint Image Preview */
.sql-blueprint-preview {
  margin-top: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  background-color: rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blueprint-frame {
  position: relative;
  width: 100%;
  height: 180px;
  border: 1px solid var(--accent-color);
  background-color: rgba(var(--accent-rgb), 0.03);
  background-image: 
    linear-gradient(rgba(var(--accent-rgb), 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.08) 1px, transparent 1px);
  background-size: 16px 16px;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.blueprint-frame img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  opacity: 0.8;
  filter: contrast(1.2) grayscale(0.5);
  border: 1px dashed rgba(var(--accent-rgb), 0.5);
}

/* Technical blueprint lines */
.blueprint-line {
  position: absolute;
  background-color: rgba(var(--accent-rgb), 0.4);
}

.blueprint-line.h-meas {
  left: 5%;
  right: 5%;
  bottom: 8px;
  height: 1px;
  border-left: 3px solid var(--accent-color);
  border-right: 3px solid var(--accent-color);
}

.blueprint-line.v-meas {
  right: 8px;
  top: 5%;
  bottom: 5%;
  width: 1px;
  border-top: 3px solid var(--accent-color);
  border-bottom: 3px solid var(--accent-color);
}

.blueprint-label {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  background-color: var(--bg-paper);
  color: var(--accent-color);
  padding: 1px 4px;
  border: 1px solid var(--accent-color);
  border-radius: 2px;
}

.blueprint-label.w-label {
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
}

.blueprint-label.h-label {
  right: 2px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  transform-origin: center;
}

.blueprint-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.bp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dotted var(--border-color);
  padding-bottom: 4px;
}

.bp-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.bp-val {
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.color-swatch {
  width: 12px;
  height: 12px;
  border: 1px solid var(--border-color);
  border-radius: 2px;
}

/* SQL Code Editor */
.sql-editor-container {
  display: flex;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: #0e1117;
  color: #c9d1d9;
  min-height: 140px;
  margin-top: 8px;
  font-family: var(--font-mono);
  overflow: hidden;
  transition: all var(--transition-normal);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.sql-editor-container:focus-within {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15), 0 4px 20px rgba(0, 0, 0, 0.25);
}

.sql-line-numbers {
  width: 28px;
  background-color: #161b22;
  border-right: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  font-size: 0.7rem;
  color: #8b949e;
  user-select: none;
}

.sql-line-numbers span {
  line-height: 1.5;
}

#sql-code-editor {
  flex: 1;
  background: none;
  border: none;
  resize: vertical;
  padding: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #58a6ff;
  line-height: 1.5;
  outline: none;
  caret-color: var(--accent-color);
}

.sql-presets-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 14px;
  font-weight: 600;
}

.sql-presets-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}

.sql-preset-btn {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 2px;
  padding: 6px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-align: left;
  cursor: pointer;
  color: var(--text-main);
  transition: all var(--transition-fast);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sql-preset-btn:hover {
  background-color: rgba(var(--accent-rgb), 0.05);
  border-color: var(--accent-color);
  color: var(--accent-color);
}

/* SQL Query Results Container (Canvas) */
.sql-results-container {
  width: 100%;
  height: 100%;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
  box-sizing: border-box;
}

/* Brutalist technical log bar */
.sql-log-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--text-main);
  padding-bottom: 8px;
  font-family: var(--font-mono);
}

.sql-log-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sql-log-status {
  font-size: 0.7rem;
  padding: 3px 8px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background-color: rgba(0, 0, 0, 0.02);
}

.sql-log-status.success {
  color: #008822;
  border-color: rgba(0, 136, 34, 0.3);
}

.sql-log-status.error {
  color: #bd000c;
  border-color: rgba(189, 0, 12, 0.3);
}

/* Modernist Table (Data Grid) */
.modern-sql-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  margin-top: 12px;
  font-family: var(--font-body);
}

.modern-sql-table th {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 12px 8px;
  border-bottom: 2px solid var(--text-main);
  color: var(--text-main);
}

.modern-sql-table td {
  font-size: 0.85rem;
  padding: 12px 8px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

.modern-sql-table tr:hover td {
  background-color: rgba(0,0,0,0.01);
}

.modern-sql-table td.mono-cell {
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* Modernist Image Card List (Special select mode for gallery_images) */
.modern-sql-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 12px;
}

.sql-image-card {
  border: 1px solid var(--border-color);
  background-color: var(--bg-paper);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
}

.sql-image-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-color);
  box-shadow: var(--shadow-sm);
}

.sql-card-img-wrapper {
  position: relative;
  width: 100%;
  height: 180px;
  background-color: rgba(0, 0, 0, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.sql-card-img-wrapper img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.sql-card-details {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sql-card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0;
  color: var(--text-main);
}

.sql-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

.sql-card-meta-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dotted var(--border-color);
  padding-bottom: 2px;
}

.sql-card-meta-row:last-child {
  border-bottom: none;
}

/* Brutalist SQL Error Block */
.sql-error-block {
  background-color: rgba(189, 0, 12, 0.05);
  border: 1px solid #e3000f;
  border-radius: var(--radius-sm);
  padding: 24px;
  color: #bd000c;
  font-family: var(--font-mono);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sql-error-hdr {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sql-error-msg {
  font-size: 0.75rem;
  line-height: 1.5;
  background-color: rgba(189, 0, 12, 0.03);
  padding: 12px;
  border-left: 3px solid #e3000f;
  margin: 0;
}
