/* SpeakerLab Audio — Precision Acoustic Hardware & Hi-Fi Woodworking Dark Theme */
:root {
  --bg-main: #0B0C0E;
  --bg-panel: #131519;
  --bg-elevated: #1A1D24;
  --bg-input: #08090B;
  --bg-tonal: #1E2128;
  --bg-tonal-hover: #282C35;
  --border-color: rgba(255, 255, 255, 0.06);
  --border-input: rgba(255, 255, 255, 0.07);
  --border-subtle: rgba(255, 255, 255, 0.045);
  --text-primary: #F3F4F6;
  --text-secondary: #D4D4D8;
  --text-muted: #9CA3AF;
  --text-dim: #6B7280;
  --accent-emerald: #10B981;
  --accent-emerald-bg: rgba(16, 185, 129, 0.12);
  --accent-amber: #F59E0B;
  --accent-amber-hover: #FBBF24;
  --header-h: 56px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Noto Sans JP", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html {
  scrollbar-color: #252830 var(--bg-main);
}

html, body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: #252830; border-radius: 6px; border: 2px solid var(--bg-main); }

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

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

/* Top Studio Header Bar */
.studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 24px;
  height: var(--header-h);
  background-color: rgba(11, 12, 14, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 15.5px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.brand-logo .word-speakerlab {
  color: var(--text-primary);
}

.brand-logo .word-audio {
  color: var(--accent-amber);
}

.studio-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.studio-nav-link {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  border-top: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.studio-nav-link:hover {
  color: var(--text-primary);
}

.studio-nav-link.active {
  color: var(--text-primary);
  font-weight: 600;
  border-bottom-color: var(--accent-amber);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.db-status-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-tonal);
  border: none;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 30px;
  padding: 3px;
  background: var(--bg-input);
  border: none;
  border-radius: 7px;
  font-size: 11.5px;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.lang-link {
  color: var(--text-muted);
  padding: 3px 6px;
  border-radius: 5px;
  transition: color 0.14s, background 0.14s;
}

.lang-link:hover {
  color: var(--text-primary);
}

.lang-link.active {
  color: var(--text-primary);
  background: var(--bg-tonal);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.lang-sep {
  display: none;
}

/* Main Studio Container */
.studio-container {
  max-width: 1560px;
  margin: 0 auto;
  padding: 16px 24px 48px;
}

.tool-intro-bar {
  background: var(--bg-panel);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.04) inset;
}

.tool-intro-bar h1 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.tool-intro-bar p {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* 2-Column Studio Grid: Sidebar + Right 2-Row Workspace */
.studio-grid {
  display: grid;
  grid-template-columns: 332px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.panel-card {
  background: var(--bg-panel);
  border: none;
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.05) inset, 0 8px 24px -6px rgba(0, 0, 0, 0.45);
}

/* Left Control Sidebar */
.control-sidebar {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

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

.control-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.control-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.select-box {
  width: 100%;
  background-color: var(--bg-input);
  color: var(--text-primary);
  border: none;
  border-radius: 7px;
  padding: 8px 11px;
  font-size: 12.5px;
  font-family: var(--font-sans);
  outline: none;
  cursor: pointer;
}

.select-box:focus {
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.35);
}

/* Numeric Input Pill + Amber Range Slider */
.value-pill-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: var(--bg-input);
  border: none;
  border-radius: 6px;
  padding: 3px 10px;
  height: 28px;
}

.value-pill-input {
  width: 44px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  outline: none;
}

.value-pill-input::-webkit-outer-spin-button,
.value-pill-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.value-pill-input[type=number] {
  -moz-appearance: textfield;
}

.value-pill-unit {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.amber-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #F59E0B 0%, #F59E0B 40%, #262932 40%, #262932 100%);
  outline: none;
  margin: 5px 0 2px;
  cursor: pointer;
}

.amber-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #F4F4F5;
  border: 2px solid #0B0C0E;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
}

.amber-slider::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #F4F4F5;
  border: 2px solid #0B0C0E;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
}

.amber-slider:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.4);
}

/* Amber toggle */
.amber-toggle-pill {
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background-color: var(--accent-amber);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  border: none;
}

.amber-toggle-pill::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #0B0C0E;
}

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

.ts-mini-field label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.ts-mini-field input {
  width: 100%;
  background: var(--bg-input);
  border: none;
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* Right 2-Row Studio Workspace */
.studio-workspace {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.svg-stage {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============ Enclosure Studio ============ */
.studio-grid.enclosure-studio {
  grid-template-columns: 332px minmax(0, 1fr);
  align-items: stretch;
}

.enclosure-studio .control-sidebar {
  justify-content: flex-start;
  gap: 14px;
  padding: 18px;
}

.enclosure-studio .control-group {
  gap: 8px;
  padding-bottom: 0;
  border-bottom: none;
}

.ctl-divider {
  border: none;
  height: 1px;
  background: var(--border-subtle);
  margin: 0;
}

/* Two-line "rich" select — borderless hardware recessed surface */
.rich-select {
  position: relative;
  background-color: var(--bg-input);
  border: none;
  border-radius: 8px;
  padding: 9px 32px 9px 12px;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: background-color 0.14s ease;
}

.rich-select:hover {
  background-color: #0D0F13;
}

.rich-select:focus-within {
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.35);
}

.rich-select-chevron {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.rich-select-line1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

.rich-select-badge {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-dim);
}

.rich-select-line2 {
  font-size: 11.5px;
  font-family: var(--font-mono);
  line-height: 1.35;
  color: var(--text-muted);
  margin-top: 3px;
}

.rich-select-line2.emerald {
  color: var(--accent-emerald);
}

.overlay-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 13px;
  border: none;
}

/* Custom Thiele/Small popover */
.ts-popover {
  position: relative;
}

.ts-popover > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--bg-tonal);
  border: none;
  transition: background-color 0.14s, color 0.14s;
}

.ts-popover > summary::-webkit-details-marker {
  display: none;
}

.ts-popover > summary:hover,
.ts-popover[open] > summary {
  color: var(--text-primary);
  background: var(--bg-tonal-hover);
}

.ts-popover-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 288px;
  z-index: 30;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.65);
}

.ts-popover-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Enclosure Type pill segmented control — borderless recessed track */
.pill-segment {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: none;
  border-radius: 8px;
  background-color: var(--bg-input);
}

.pill-segment .seg-btn {
  flex: 1 1 auto;
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease;
  white-space: nowrap;
}

.pill-segment .seg-btn:hover {
  color: var(--text-primary);
}

.pill-segment .seg-btn.active {
  background-color: var(--bg-tonal);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.wood-thickness-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
}

.thickness-select-wrap {
  position: relative;
  font-size: 12.5px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
  padding-right: 4px;
}

.slot-port-row {
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.slot-port-row input {
  width: 68px;
  background: var(--bg-input);
  border: none;
  color: var(--text-primary);
  padding: 5px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.enclosure-studio .studio-workspace {
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(320px, 1.4fr) auto;
  gap: 14px;
}

.enclosure-studio .workspace-top-row {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
}

.chart-card, .blueprint-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.chart-card {
  padding: 14px 16px;
}

.blueprint-card {
  padding: 14px 16px;
}

.chart-card .svg-stage,
.blueprint-card .svg-stage {
  min-height: 0;
}

.chart-card .svg-stage > svg,
.blueprint-card .svg-stage > svg {
  display: block;
  max-height: 100%;
}

/* Port Air Velocity Status Bar — borderless tonal indicator */
.velocity-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 500;
  width: fit-content;
  max-width: 100%;
  border: none;
}

.velocity-badge.badge-safe {
  background-color: rgba(16, 185, 129, 0.11);
  color: #34D399;
}

.velocity-badge.badge-warning {
  background-color: rgba(245, 158, 11, 0.13);
  color: #FDE68A;
}

.velocity-badge.badge-danger {
  background-color: rgba(239, 68, 68, 0.14);
  color: #FECACA;
}

/* Bottom Row: Wood Cutting List Table + 2D Plywood Nesting + Download CTA */
.cutting-sheet-card {
  display: grid;
  grid-template-columns: minmax(0, 42fr) minmax(0, 34fr) minmax(max-content, 24fr);
  gap: 18px;
  align-items: stretch;
  min-height: 0;
  padding: 16px 18px;
}

.cutting-table-wrap {
  width: 100%;
  min-height: 0;
  display: flex;
}

.cutting-table {
  width: 100%;
  border-collapse: collapse;
}

.cutting-table thead th {
  background-color: transparent;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 8px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.cutting-table thead th:last-child {
  text-align: right;
}

.cutting-table tbody td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12.5px;
}

.cutting-table tbody tr:last-child td {
  border-bottom: none;
}

.cut-panel-name {
  font-weight: 500;
  color: var(--text-primary);
}

.cut-panel-note {
  font-size: 11.5px;
  color: var(--text-muted);
}

.cut-panel-dim {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.nesting-stage {
  min-height: 0;
  padding: 2px 0;
  justify-content: flex-start;
}

.nesting-stage > svg {
  display: block;
  max-height: 165px;
  width: auto;
  max-width: 100%;
}

.cta-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  justify-content: space-between;
  min-width: 0;
}

/* Borderless Tonal Secondary Action Button */
.text-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-tonal);
  border: none;
  border-radius: 7px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 12px;
  transition: background-color 0.14s, color 0.14s;
}

.text-link-btn:hover {
  background: var(--bg-tonal-hover);
  color: var(--text-primary);
}

/* Solid High-Contrast Primary Action Button (no AI outline) */
.btn-amber-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background-color: var(--accent-amber);
  color: #090A0C;
  border: none;
  border-radius: 7px;
  height: 36px;
  padding: 0 16px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease;
  max-width: 100%;
}

.btn-amber-cta:hover {
  background-color: var(--accent-amber-hover);
}

/* Native Acoustic Hardware BOM Strip (Zero Heavy Borders) */
.ac-bom-card {
  margin-top: 16px;
  padding: 13px 18px;
}

.ac-bom-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.ac-bom-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.ac-bom-hook {
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--accent-amber);
}

.ac-bom-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ac-bom-item {
  background: var(--bg-input);
  border-radius: 7px;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ac-bom-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ac-bom-kicker {
  font-size: 10.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ac-bom-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ac-bom-sub {
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ac-bom-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.ac-bom-btn {
  height: 27px;
  padding: 0 10px;
  border-radius: 5px;
  background: var(--bg-tonal);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: background-color 0.14s, color 0.14s;
}

.ac-bom-btn:hover {
  background: var(--bg-tonal-hover);
  color: var(--text-primary);
}

.ac-bom-btn-primary {
  background: rgba(245, 158, 11, 0.14);
  color: var(--accent-amber);
}

.ac-bom-btn-primary:hover {
  background: var(--accent-amber);
  color: #090A0C;
}

@media (max-width: 980px) {
  .ac-bom-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Below-the-Fold LoudspeakerDatabase-Style Blueprint Directory ===== */
.ac-explorer-card {
  margin-top: 16px;
  padding: 0;
  overflow: hidden;
}

.ac-explorer-header {
  padding: 14px 20px;
  background: transparent;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.ac-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ac-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.ac-count-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-tonal);
  border: none;
  padding: 3px 9px;
  border-radius: 6px;
}

.ac-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ac-filter-tabs {
  display: inline-flex;
  align-items: center;
  background: var(--bg-input);
  border: none;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  flex-wrap: wrap;
}

.ac-filter-btn {
  height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.ac-filter-btn:hover {
  color: var(--text-primary);
}

.ac-filter-btn.active {
  background: var(--bg-tonal);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.ac-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.ac-search-wrap svg {
  position: absolute;
  left: 10px;
  width: 13px;
  height: 13px;
  color: var(--text-dim);
  pointer-events: none;
}

.ac-search-input {
  height: 32px;
  width: 210px;
  padding: 0 10px 0 30px;
  background: var(--bg-input);
  border: none;
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 12px;
  outline: none;
}

.ac-search-input:focus {
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.35);
}

.ac-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.ac-explorer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.ac-explorer-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  background: rgba(8, 9, 11, 0.45);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.ac-explorer-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  white-space: nowrap;
}

.ac-explorer-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.ac-explorer-table tbody tr.is-active-blueprint {
  background: rgba(245, 158, 11, 0.08);
}

.ac-table-wrap[data-collapsed="true"] tr.ac-row-extra {
  display: none;
}

.ac-explorer-table tbody tr.filtered-out {
  display: none !important;
}

/* Borderless Alignment Dot + Text instead of neon boxed pill */
.align-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.align-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.align-badge.align-ported::before { background: #10B981; }
.align-badge.align-sealed::before { background: #60A5FA; }
.align-badge.align-slot::before { background: #F59E0B; }

.ac-row-link {
  font-weight: 500;
  color: var(--text-primary);
  transition: color 0.14s;
}

.ac-row-link:hover {
  color: var(--accent-amber);
}

.mono-cell {
  font-family: var(--font-mono);
  font-size: 12px;
}

/* Borderless Table Action Link */
.ac-row-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 8px;
  border-radius: 5px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 500;
  transition: background-color 0.14s, color 0.14s;
}

.ac-row-action:hover {
  background: var(--bg-tonal);
  color: var(--text-primary);
}

.ac-explorer-footer {
  padding: 11px 20px;
  background: transparent;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ac-explorer-status {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}

.ac-toggle-all-btn {
  height: 30px;
  padding: 0 14px;
  border-radius: 7px;
  background: var(--bg-tonal);
  border: none;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.14s;
}

.ac-toggle-all-btn:hover {
  background: var(--bg-tonal-hover);
}

/* 2-Column Acoustic Datasheet & Accordion FAQ */
.ac-bottom-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 16px;
  align-items: start;
}

.spec-strip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.spec-stat-box {
  background: var(--bg-input);
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
}

.spec-stat-label {
  font-size: 11px;
  color: var(--text-muted);
}

.spec-stat-val {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 3px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 8px;
}

details.faq-item {
  background-color: transparent;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  padding: 11px 0;
}

details.faq-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

summary.faq-q {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

summary.faq-q::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-dim);
}

details.faq-item[open] summary.faq-q::after {
  content: "−";
  color: var(--accent-amber);
}

.faq-item p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.6;
}

/* KPI Stat Cards for Port / Crossover / Room Modes Tools */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.kpi-card {
  background-color: var(--bg-input);
  border: none;
  border-radius: 8px;
  padding: 12px 14px;
}

.kpi-label {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.kpi-value {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent-emerald);
}

.kpi-value.amber {
  color: var(--accent-amber);
}

.mode-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.mode-axial {
  background: rgba(16, 185, 129, 0.16);
  color: #34D399;
}

.mode-tangential {
  background: rgba(245, 158, 11, 0.16);
  color: #FBBF24;
}

.mode-oblique {
  background: rgba(99, 102, 241, 0.16);
  color: #818CF8;
}

.studio-footer {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11.5px;
  color: var(--text-dim);
}

@media (max-width: 1100px) {
  .studio-grid,
  .studio-grid.enclosure-studio,
  .ac-bottom-grid {
    grid-template-columns: 1fr;
  }
  .workspace-top-row,
  .enclosure-studio .workspace-top-row,
  .cutting-sheet-card {
    grid-template-columns: 1fr;
  }
  .enclosure-studio .studio-workspace {
    display: flex;
  }
  .chart-card, .blueprint-card {
    min-height: 320px;
  }
  .cta-column {
    align-items: stretch;
  }
  .db-status-pill {
    display: none;
  }
}
