/* ── Scadder Design System ──────────────────────────────────────────────────── */

:root {
  --bg: #0e0c0a;
  --surface: #161412;
  --surface2: #1e1b17;
  --border: #2a2520;
  --amber: #c8922a;
  --amber-dim: #7a5618;
  --text: #e8e0d0;
  --text-dim: #7a7060;
  --text-mid: #a89880;
  --mono: 'IBM Plex Mono', monospace;
  --sans: 'IBM Plex Sans', sans-serif;
  --serif: 'Playfair Display', serif;
  --hero: "Orbit", sans-serif;
}

.fascinate-regular {
  font-family: "Fascinate", system-ui;
  font-weight: 400;
  font-style: normal;
}

.orbit-regular {
  font-family: "Orbit", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.permanent-marker-regular {
  font-family: "Permanent Marker", cursive;
  font-weight: 400;
  font-style: normal;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  min-height: 100vh;
}

/* ── Header ────────────────────────────────────────────────────────────────── */

header {
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}

.logo {
  font-family: var(--hero);
  font-size: 1.3rem;
  color: var(--amber);
  letter-spacing: 0.02em;
  text-decoration: none;
}

.logo-tag {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 400;
  margin-left: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── URL Bar ───────────────────────────────────────────────────────────────── */

.url-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 2rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.url-bar label {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.url-bar input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.35rem 0.6rem;
  outline: none;
  transition: border-color 0.15s;
}

.url-bar input:focus {
  border-color: var(--amber-dim);
}

/* ── Main ──────────────────────────────────────────────────────────────────── */

.main {
  /* max-width: 900px; */
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ── Model Meta ────────────────────────────────────────────────────────────── */

.model-meta {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.model-title {
  font-family: var(--sans-serif);
  font-size: 1.6rem;
  color: var(--text);
  line-height: 1.2;
  text-transform: capitalize;
}

.model-subtitle {
  color: var(--text-dim);
  font-size: 0.75rem;
  margin-top: 0.3rem;
  font-family: var(--mono);
}

.top-toolbar {
  position: relative;
}

.model-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
  align-items: flex-start;
  padding-top: 0.2rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  position: absolute;
  right: 0;
  bottom: 0;
}

@media (max-width: 675px) {
  .model-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 0.2rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    position: static;
  }

  .result-count {
    display: none;
  }
}

/* ── GitHub Chips ──────────────────────────────────────────────────────────── */

.github-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.gh-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.25rem 0.6rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-mid);
}

.gh-chip a {
  color: var(--amber);
  text-decoration: none;
}

.gh-chip a:hover {
  text-decoration: underline;
}

/* ── Viewport ──────────────────────────────────────────────────────────────── */

.viewport-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.25rem;
  position: relative;
}

.viewport-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

.vtb-left {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.vtb-right {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

@media (max-width: 600px) {
  .vtb-right {
    display: none;
  }

  .vtb-left .lbl {
    display: none;
  }

  .vtb-left .btn {
    padding: 0.42rem 0.5rem;
    /* Tighter padding for icon-only */
  }
}

.lbl {
  margin-left: 0.1rem;
}

#canvas-container {
  width: 100%;
  height: 480px;
}

.render-overlay {
  position: absolute;
  inset: 44px 0 0 0;
  background: rgba(14, 12, 10, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 10;
  transition: opacity 0.3s;
}

.render-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ── Progress Bar ──────────────────────────────────────────────────────────── */

.progress-container {
  width: 240px;
  height: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  margin-bottom: 0.75rem;
}

.progress-bar {
  height: 100%;
  background: var(--amber);
  width: 0%;
  transition: width 0.3s ease-out;
  background-image: linear-gradient(45deg,
      rgba(0, 0, 0, 0.15) 25%,
      transparent 25%,
      transparent 50%,
      rgba(0, 0, 0, 0.15) 50%,
      rgba(0, 0, 0, 0.15) 75%,
      transparent 75%,
      transparent);
  background-size: 1rem 1rem;
  animation: stripes 1s linear infinite;
}

@keyframes stripes {
  from {
    background-position: 1rem 0;
  }

  to {
    background-position: 0 0;
  }
}

.progress-bar.creeping {
  transition: width 60s cubic-bezier(0, 0, 0.2, 1);
  width: 95% !important;
}

.render-overlay p {
  color: var(--text-mid);
  font-family: var(--mono);
  font-size: 0.75rem;
}

/* ── Accordion ─────────────────────────────────────────────────────────────── */

.section {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  overflow: visible;
  background: var(--surface);
  position: relative;
}

.section-header:first-child {
  border-radius: 7px 7px 0 0;
}

/* When section is collapsed (body not open), round bottom corners of header */
.section-header:not(.open) {
  border-radius: 7px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 1rem;
  cursor: pointer;
  user-select: none;
  background: var(--surface2);
  border-bottom: 1px solid transparent;
  transition: background 0.15s;
}

.section-header.static-header {
  cursor: default;
}

.section-header:not(.static-header):hover {
  background: #222018;
}

.section-header.open {
  border-bottom-color: var(--border);
}

.shl {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber);
}

.section-desc {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--mono);
}

.chevron {
  color: var(--text-dim);
  font-size: 0.65rem;
  transition: transform 0.2s;
}

.chevron.open {
  transform: rotate(180deg);
}

.section-body {
  display: none;
  padding: 1rem;
  scrollbar-width: thin;
}

.section-body.open {
  display: block;
  overflow: visible;
}

/* ── Parameters ────────────────────────────────────────────────────────────── */

.param-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.75rem;
}

.param-group-label {
  grid-column: 1 / -1;
  font-family: var(--mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber-dim);
  padding: 0.6rem 0 0.4rem;
  border-bottom: 1px solid var(--border);
  margin-top: 0.25rem;
}

.param-group-label:first-child {
  padding-top: 0;
  margin-top: 0;
}

.param-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.param-label {
  font-size: 0.72rem;
  color: var(--text-mid);
  font-family: var(--mono);
}


.param-varname {
  color: var(--text-dim);
  font-size: 0.62rem;
  margin-left: 0.4rem;
}

.param-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.38rem 0.6rem;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}

.param-input:focus {
  border-color: var(--amber-dim);
}

.param-range-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.param-slider {
  flex: 1;
  accent-color: var(--amber);
  cursor: pointer;
}

.param-numbox {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 0.3rem 0.4rem;
  width: 68px;
  outline: none;
  text-align: right;
}

.param-numbox:focus {
  border-color: var(--amber-dim);
}

.param-check-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
}

.param-checkbox {
  accent-color: var(--amber);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.param-select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 0.38rem 0.6rem;
  outline: none;
  width: 100%;
}

.param-select:focus {
  border-color: var(--amber-dim);
}

.no-params {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.78rem;
  grid-column: 1 / -1;
}

.render-hint {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

/* ── Source / Console ──────────────────────────────────────────────────────── */

.source-view,
.console-output {
  background: var(--bg);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  font-family: var(--mono);
  font-size: 0.73rem;
  color: var(--text-mid);
  overflow-x: auto;
  white-space: pre;
  max-height: 280px;
  overflow-y: auto;
  line-height: 1.6;
}

.console-output {
  color: var(--text-dim);
  white-space: pre-wrap;
}

/* Param grid needs visible overflow for tooltips */
.param-grid {
  overflow: visible;
}

.src-ln {
  color: var(--border);
  user-select: none;
  margin-right: 0.75rem;
}

/* ── Print Settings ────────────────────────────────────────────────────────── */

.ps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.6rem;
}

.ps-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.55rem 0.7rem;
}

.ps-key {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.2rem;
}

.ps-val {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--amber);
}

.empty-note {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.6;
}

.empty-note code {
  color: var(--text-mid);
}

.landing code {
  color: var(--amber);
  font-family: var(--mono);
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */

.btn {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border: none;
  border-radius: 4px;
  padding: 0.42rem 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.btn-primary {
  background: var(--amber);
  color: #0e0c0a;
  font-weight: 500;
}

.btn-primary:hover {
  background: #d4a030;
}

.btn-ghost {
  background: transparent;
  color: var(--text-mid);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--amber-dim);
  color: var(--text);
}

/* ── BOM Table ─────────────────────────────────────────────────────────────── */

.bom-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.bom-table th {
  color: var(--text-dim);
  text-align: left;
  padding: 0.3rem 0.5rem;
  border-bottom: 1px solid var(--border);
  font-weight: 400;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.bom-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.bom-table td a {
  color: var(--amber);
  text-decoration: none;
}

.bom-table td a:hover {
  text-decoration: underline;
}

/* ── Library Grid ──────────────────────────────────────────────────────────── */

.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  text-align: left;
}

.library-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.search-input {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.5rem 0.8rem;
  border-radius: 4px;
  color: var(--text);
  font-family: var(--mono);
  min-width: 275px;
  max-width: 440px;
  outline: none;
}

.search-input:focus {
  border-color: var(--amber);
}

.result-count {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.btn-icon {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
}

.btn-icon:hover {
  color: var(--text);
  background: var(--surface2);
}

.btn-icon.active {
  color: var(--amber);
  border-color: var(--border);
  background: var(--surface);
}

/* ── List View ─────────────────────────────────────────────────────────────── */

.library-grid.list-view {
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.library-grid.list-view .lib-card {
  flex-direction: row;
  height: 100px;
  align-items: center;
}

.library-grid.list-view .lib-img {
  width: 120px;
  height: 100%;
  aspect-ratio: auto;
  border-bottom: none;
  border-right: 1px solid var(--border);
}

.library-grid.list-view .lib-meta {
  padding: 0 1.5rem;
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ── Landing ───────────────────────────────────────────────────────────────── */

.landing {
  padding: 4rem 2rem 3rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

/* .landing::before {
  content: '';
  position: absolute;
  inset: -2rem -4rem;
  background:
    radial-gradient(circle at 20% 30%, rgba(200, 146, 42, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(200, 146, 42, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
} */

.landing h1 {
  font-family: var(--hero);
  font-size: 2.6rem;
  color: var(--amber);
  margin-bottom: 0.75rem;
  line-height: 1.15;
}

@keyframes shimmer {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}



.tagline-rotate {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--amber-dim);
  margin-top: 0.4rem;
  min-height: 1.2em;
  transition: opacity 0.4s;
}

/* ── Pagination ────────────────────────────────────────────────────────────── */

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1rem;
}

.page-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-mid);
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  border-radius: 4px;
}

.page-btn:hover {
  border-color: var(--amber-dim);
  color: var(--text);
}

.page-btn.active {
  background: var(--amber);
  color: #000;
  border-color: var(--amber);
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

/* ── Library Cards ─────────────────────────────────────────────────────────── */

.lib-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.lib-card:hover {
  transform: translateY(-2px);
  border-color: var(--amber);
}

.lib-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.lib-meta {
  padding: 1rem;
}

.lib-title {
  color: var(--text);
  font-family: var(--sans-serif);
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.lib-desc {
  color: var(--text-mid);
  font-size: 0.8rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tagline {
  font-family: var(--mono);
  color: var(--text-mid);
  line-height: 1.75;
  font-size: 0.88rem;
  max-width: 500px;
  text-align: center;
  margin: auto;
  margin-bottom: 6rem;
}

.submit-cta {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
}

/* ── Scrollbar ─────────────────────────────────────────────────────────────── */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--amber-dim);
}

/* ── Footer ────────────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.03em;
}

.site-footer a {
  color: var(--amber-dim);
  text-decoration: none;
  transition: color 0.15s;
}

.site-footer a:hover {
  color: var(--amber);
  text-decoration: underline;
}

/* ── Sticky Render Bar ─────────────────────────────────────────────────────── */

.sticky-render-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(to top, var(--bg) 60%, transparent);
  padding: 1rem 1.5rem 1.25rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
}

.sticky-render-bar.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.sticky-render-bar .btn {
  pointer-events: auto;
  box-shadow: 0 2px 12px rgba(200, 146, 42, 0.25);
}

.sticky-render-bar .sticky-hint {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-dim);
}

/* ── About Modal ───────────────────────────────────────────────────────────── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  max-width: 540px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  transform: translateY(12px) scale(0.97);
  transition: transform 0.25s;
}

.modal-backdrop.open .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-dim);
  font-size: 1rem;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.modal-close:hover {
  border-color: var(--amber-dim);
  color: var(--text);
}

.modal h2 {
  font-family: var(--hero);
  font-size: 1.6rem;
  color: var(--amber);
  margin-bottom: 1rem;
}

.modal h3 {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber-dim);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.modal p {
  color: var(--text-mid);
  font-size: 0.85rem;
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.modal ol {
  color: var(--text-mid);
  font-size: 0.82rem;
  line-height: 1.8;
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.modal ol li {
  margin-bottom: 0.3rem;
}

.modal code {
  background: var(--bg);
  color: var(--amber);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 0.78rem;
}

.modal .tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.modal .tech-chip {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.5rem 0.5rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-dim);
}

/* ── Param Group Sections (collapsible) ────────────────────────────────────── */

.param-group-section {
  grid-column: 1 / -1;
  margin-bottom: 2rem;
}

.param-group-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  padding: 0.6rem 0 0.4rem;
  border-bottom: 1px solid var(--border);
  margin-top: 0.25rem;
}

.param-group-header.static-header {
  cursor: default;
}

.param-group-header:first-child {
  padding-top: 0;
  margin-top: 0;
}

.param-group-title {
  font-family: var(--mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber-dim);
}

.param-group-chevron {
  color: var(--text-dim);
  font-size: 0.55rem;
  transition: transform 0.2s;
}

.param-group-chevron.open {
  transform: rotate(180deg);
}

.param-group-toggle {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: bold;
  width: 12px;
  text-align: center;
  line-height: 1;
}

.param-group-count {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  margin-left: auto;
  display: none;
}

.param-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.75rem;
  padding-top: 0.75rem;
}

.param-group-grid.collapsed {
  display: none;
}

/* ── Info Tip ──────────────────────────────────────────────────────────────── */

.info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.55rem;
  cursor: help;
  position: relative;
  flex-shrink: 0;
  transition: all 0.15s;
}

.info-tip:hover {
  border-color: var(--amber-dim);
  color: var(--amber);
}

.info-tip .tip-content {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  width: 260px;
  font-size: 0.72rem;
  font-family: var(--sans);
  color: var(--text-mid);
  line-height: 1.5;
  text-transform: none;
  letter-spacing: normal;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.info-tip .tip-content::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 12px;
  border: 6px solid transparent;
  border-bottom-color: var(--border);
}

.info-tip:hover .tip-content {
  display: block;
}

/* ── Reassurance Animation ─────────────────────────────────────────────────── */

@keyframes gentle-pulse {

  0%,
  100% {
    opacity: 0.7;
  }

  50% {
    opacity: 1;
  }
}

.render-overlay p.reassuring {
  animation: gentle-pulse 2.5s ease-in-out infinite;
}