:root {
  --ink: #172225;
  --muted: #5d696b;
  --quiet: #829094;
  --line: #cdd6d3;
  --line-strong: #aebbb7;
  --paper: #eef2f0;
  --surface: #fbfcfb;
  --surface-alt: #f4f7f5;
  --tool: #24383d;
  --tool-soft: #dfe9e6;
  --ok: #2c6b4f;
  --warn: #8a6427;
  --bad: #9c4d43;
  --radius: 8px;
  --shadow: 0 16px 42px rgba(33, 48, 51, .1);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(36, 56, 61, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 56, 61, .04) 1px, transparent 1px),
    linear-gradient(180deg, #f6f8f7 0%, var(--paper) 100%);
  background-size: 28px 28px, 28px 28px, auto;
  font-family: "Avenir Next", "Trebuchet MS", sans-serif;
}

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

button {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
  padding: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 252, 251, .92);
  box-shadow: var(--shadow);
}

.brand {
  display: grid;
  gap: 4px;
}

.brand span,
.eyebrow,
label,
.meta-label,
.table-meta {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.brand strong {
  max-width: 68vw;
  overflow: hidden;
  font-size: 20px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.status-pill,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-alt);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.connected,
.badge.good {
  color: var(--ok);
  border-color: rgba(44, 107, 79, .28);
  background: #e6f1eb;
}

.status-pill.warning,
.badge.warn {
  color: var(--warn);
  border-color: rgba(138, 100, 39, .28);
  background: #f5eddd;
}

.status-pill.bad,
.badge.bad {
  color: var(--bad);
  border-color: rgba(156, 77, 67, .28);
  background: #f5e7e5;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(300px, .9fr) minmax(560px, 1.55fr) minmax(320px, .95fr);
  grid-template-rows: auto auto auto;
  grid-template-areas:
    "copilot model specs"
    "requirements requirements fea"
    "ip ip lca";
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}

.panel {
  align-self: start;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 252, 251, .96);
  box-shadow: var(--shadow);
}

.copilot-panel {
  grid-area: copilot;
}

.requirements-panel {
  grid-area: requirements;
}

.ip-panel-area {
  grid-area: ip;
}

.model-panel {
  grid-area: model;
}

.specs-panel {
  grid-area: specs;
}

.fea-panel {
  grid-area: fea;
}

.lca-panel {
  grid-area: lca;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 70px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.panel-header h2 {
  margin: 4px 0 0;
  font-size: 19px;
  line-height: 1.1;
}

.panel-body {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
}

.fill-panel {
  height: calc(100% - 70px);
  overflow: auto;
}

.field-grid {
  display: grid;
  gap: 10px;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.field-row.three {
  grid-template-columns: minmax(0, 1fr) minmax(0, .85fr) auto;
}

label {
  display: block;
  margin-bottom: 6px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  background: white;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #587b74;
  box-shadow: 0 0 0 3px rgba(88, 123, 116, .16);
}

input,
select {
  min-height: 38px;
  padding: 0 10px;
  font-size: 12px;
}

input[type="file"] {
  padding: 9px;
}

textarea {
  min-height: 128px;
  padding: 11px;
  font-size: 12px;
  line-height: 1.45;
  resize: vertical;
}

#requirementText {
  min-height: 150px;
}

.button-row,
.compact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compact-row {
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.button.primary {
  color: white;
  background: var(--tool);
}

.button.secondary {
  color: var(--tool);
  border-color: var(--line-strong);
  background: white;
}

.button.ghost {
  color: var(--muted);
  border-color: var(--line);
  background: var(--surface-alt);
}

.button:disabled {
  cursor: progress;
  opacity: .62;
}

.ai-output,
.upload-list,
.bridge-card,
.mini-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alt);
}

.ai-output {
  display: grid;
  align-content: start;
  min-height: 88px;
  max-height: 150px;
  overflow: auto;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.ai-output-error {
  color: #c0614a;
  border-color: rgba(192, 97, 74, .25);
  background: rgba(192, 97, 74, .06);
  font-size: 12px;
}

.helper-text {
  margin: 5px 0 0;
  color: var(--quiet);
  font-size: 11px;
  line-height: 1.4;
}

.panel-intro {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.upload-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.upload-card,
.artifact-card,
.readout-box {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alt);
}

.upload-card input[type="file"] {
  background: white;
}

.artifact-list {
  display: grid;
  gap: 6px;
}

.artifact-card {
  background: white;
}

.artifact-card b {
  color: var(--tool);
  font-size: 11px;
}

.artifact-card span,
.readout-box {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.route-grid,
.portal-grid,
.library-grid,
.link-grid,
.lca-grid {
  display: grid;
  gap: 8px;
}

.lca-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.route-grid,
.portal-grid,
.library-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.route-card,
.portal-card,
.library-card,
.tool-link,
.patent-card,
.lca-score {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  background: white;
  text-decoration: none;
}

.portal-card {
  min-height: 66px;
}

.route-card.active {
  border-color: rgba(44, 107, 79, .32);
  background: #f0f7f5;
}

.route-card span,
.portal-card span,
.library-card span,
.patent-card span,
.lca-score span {
  color: var(--quiet);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.route-card strong,
.library-card strong,
.patent-card strong,
.tool-link strong,
.lca-score strong {
  color: var(--ink);
  font-size: 13px;
}

.route-card p,
.portal-card p,
.library-card p,
.patent-card p,
.tool-link span,
.lca-score p,
.ip-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.portal-card p {
  font-size: 10.5px;
}

.library-card em {
  color: var(--quiet);
  font-size: 10px;
  font-style: normal;
  line-height: 1.35;
}

.patent-results {
  display: grid;
  gap: 8px;
}

.compact-links {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.patent-card em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  line-height: 1.4;
}

.tool-link:hover {
  border-color: var(--tool);
  background: #f3f8f6;
}

.ip-panel {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.settings-details {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alt);
}

.settings-details summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.settings-grid {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.route-details .button-row,
.lca-details .button-row {
  margin-top: 10px;
}

.compact-details {
  margin-top: 8px;
}

.idea-upload,
.intent-section {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alt);
}

.idea-list,
.intent-list {
  display: grid;
  gap: 6px;
}

.idea-card,
.intent-list div {
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.idea-card b,
.intent-list b {
  color: var(--tool);
  font-size: 11px;
}

.idea-card span,
.intent-list span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.intent-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.upload-list,
.mini-list {
  display: grid;
  gap: 6px;
  max-height: 140px;
  overflow: auto;
  padding: 10px;
}

.intake-grid,
.agent-grid {
  display: grid;
  gap: 8px;
}

.intake-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.agent-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.agent-card {
  min-height: 74px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alt);
}

.agent-card span {
  color: var(--quiet);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.agent-card strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
}

.agent-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.upload-item,
.mini-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.upload-item strong,
.mini-item strong {
  color: var(--ink);
  font-size: 12px;
}

.model-tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bridge-msg {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--quiet, #7a9195);
  line-height: 1.4;
}

.cloud-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(44, 107, 79, .08), rgba(36, 56, 61, .03)),
    var(--surface-alt);
}

.cloud-panel strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
}

.cloud-panel p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.model-frame {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 392px;
  overflow: hidden;
  border: 1px solid #b9c7c9;
  border-radius: var(--radius);
  background: #dfe7e7;
}

.model-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  color: white;
  background: #24383d;
  font-size: 12px;
  font-weight: 800;
}

.model-embed {
  position: relative;
  min-height: clamp(300px, 34vw, 390px);
  background:
    linear-gradient(rgba(36, 56, 61, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 56, 61, .08) 1px, transparent 1px),
    #edf3f2;
  background-size: 22px 22px;
}

.model-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: clamp(300px, 34vw, 390px);
  border: 0;
  background: white;
}

.cad-platform-section { padding: 0 0 8px; }
.cad-platform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
@media (max-width: 680px) { .cad-platform-grid { grid-template-columns: 1fr; } }
.cad-platform-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid rgba(36,56,61,.12);
  border-radius: var(--radius);
  background: rgba(255,255,255,.5);
  transition: border-color .15s;
}
.cad-platform-card.selected { border-color: var(--accent); background: rgba(36,56,61,.04); }
.cad-platform-icon { font-size: 20px; opacity: .6; flex-shrink: 0; }
.cad-platform-info { flex: 1; min-width: 0; }
.cad-platform-info strong { display: block; font-size: 13px; }
.cad-platform-info span { font-size: 11px; color: var(--muted); }
.cad-platform-btn { flex-shrink: 0; font-size: 12px; padding: 5px 10px; }

.portal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(24, 48, 40, .06);
  border-bottom: 1px solid rgba(36, 56, 61, .10);
  font-size: 12px;
  color: var(--muted);
}
.portal-label { flex: 1; font-weight: 600; color: var(--text); }
.preview-hint {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--muted);
  opacity: .7;
  pointer-events: none;
  white-space: nowrap;
}

.solidworks-handoff {
  display: grid;
  gap: 14px;
  margin: 14px;
  padding: 18px;
  border: 1px solid rgba(36, 56, 61, .14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .72);
  color: var(--text);
}

.solidworks-handoff p {
  margin: 6px 0 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.handoff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.handoff-steps {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.embed-note {
  position: absolute;
  right: 12px;
  bottom: 12px;
  max-width: min(420px, calc(100% - 24px));
  padding: 10px 12px;
  border: 1px solid rgba(36, 56, 61, .16);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(251, 252, 251, .94);
  font-size: 12px;
  line-height: 1.35;
  box-shadow: 0 10px 24px rgba(36, 56, 61, .12);
}

.link-button {
  padding: 0;
  border: 0;
  color: var(--ok);
  background: transparent;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.preview-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: clamp(300px, 34vw, 390px);
  overflow: hidden;
  background:
    radial-gradient(circle at 48% 42%, rgba(80, 150, 120, .24), transparent 28%),
    linear-gradient(135deg, #17231f 0%, #1a2420 48%, #20302b 100%);
}

.preview-stage canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.preview-fallback {
  display: grid;
  min-height: clamp(300px, 34vw, 390px);
  place-items: center;
  padding: 24px;
  color: #dbe8e5;
  text-align: center;
}

.preview-fallback svg {
  width: min(420px, 80%);
  max-height: 260px;
  margin-bottom: 12px;
}

.preview-fallback p {
  max-width: 440px;
  margin: 0;
  color: #a8c0ba;
  font-size: 13px;
  line-height: 1.45;
}

.preview-telemetry {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.preview-stat {
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.preview-stat span {
  color: var(--quiet);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.preview-stat strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.bridge-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.bridge-card {
  min-height: 72px;
  padding: 10px;
}

.bridge-card strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bridge-card span {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.cad-action-row {
  padding-top: 2px;
}

.button-stack {
  display: grid;
  align-content: end;
  gap: 8px;
}

.parameter-body {
  display: grid;
  gap: 12px;
}

.parameter-selector-row {
  align-items: end;
}

.generic-sliders {
  display: grid;
  gap: 0;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.specs-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 14px;
  padding: 0;
}

.table-wrap {
  overflow: auto;
}

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

th,
td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 12px;
}

th {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--surface-alt);
}

td input {
  max-width: 126px;
}

td code {
  color: var(--muted);
  font-size: 11px;
}

.spec-summary {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-left: 1px solid var(--line);
  background: var(--surface-alt);
}

.compact-summary {
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.specs-table-details .table-wrap {
  max-height: 340px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.spec-summary h3 {
  margin: 0;
  font-size: 15px;
}

.spec-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: white;
  font-size: 11px;
  font-weight: 800;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  max-width: 360px;
  padding: 12px 14px;
  border: 1px solid rgba(36, 56, 61, .2);
  border-radius: var(--radius);
  color: white;
  background: var(--tool);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: .18s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .workbench {
    grid-template-columns: minmax(300px, .9fr) minmax(430px, 1.1fr);
    grid-template-rows: auto;
    grid-template-areas:
      "copilot model"
      "specs specs"
      "requirements requirements"
      "ip ip"
      "fea lca";
  }
}

@media (max-width: 780px) {
  .app-shell {
    padding: 10px;
  }

  .topbar,
  .model-tools,
  .cloud-panel .field-row,
  .bridge-strip,
  .preview-telemetry,
  .upload-grid,
  .route-grid,
  .portal-grid,
  .library-grid,
  .lca-grid,
  .fea-grid,
  .intake-grid,
  .agent-grid,
  .field-row,
  .field-row.three {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .status-row {
    justify-content: flex-start;
  }

  .workbench {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "copilot"
      "specs"
      "model"
      "requirements"
      "ip"
      "fea"
      "lca";
  }

  #requirementText {
    min-height: 220px;
  }

  .spec-summary {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

/* Workflow progress steps — lives in panel-header */
.workflow-steps {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.workflow-step {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  color: var(--quiet);
  background: var(--surface-alt);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.workflow-step.done {
  border-color: var(--ok);
  color: var(--ok);
  background: rgba(44, 107, 79, 0.07);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--line);
  color: var(--muted);
  font-size: 9px;
  flex-shrink: 0;
}

.workflow-step.done .step-num {
  background: var(--ok);
  color: #fff;
}

/* Standards & compliance section */
.standards-section {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alt);
}

.standards-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.standards-note {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}

.standards-list {
  display: grid;
  gap: 5px;
  max-height: 240px;
  overflow-y: auto;
}

.requirements-panel .standards-list {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  max-height: none;
}

.standard-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  transition: background 0.12s;
}

.standard-item:hover {
  background: var(--tool-soft);
}

.standard-card {
  cursor: default;
}

.standard-item input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
}

.standard-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.standard-id-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.standard-id {
  font-size: 12px;
  font-weight: 700;
  color: var(--tool);
}

.standard-title {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.standard-test {
  font-size: 10px;
  color: var(--quiet);
  font-style: italic;
  line-height: 1.4;
}

.standards-empty {
  margin: 0;
  font-size: 12px;
  color: var(--quiet);
  text-align: center;
  padding: 16px 12px;
}

.standards-constraints {
  padding: 8px 10px;
  background: rgba(138, 100, 39, 0.07);
  border: 1px solid rgba(138, 100, 39, 0.22);
  border-radius: 6px;
  font-size: 11px;
  color: var(--warn);
}

.standards-constraints strong {
  display: block;
  margin-bottom: 4px;
}

.standards-constraints ul {
  margin: 0;
  padding-left: 16px;
  display: grid;
  gap: 2px;
}

.standards-labels {
  padding: 8px 10px;
  background: rgba(44, 107, 79, 0.07);
  border: 1px solid rgba(44, 107, 79, 0.2);
  border-radius: 6px;
  font-size: 11px;
  color: var(--ok);
}

.standards-labels strong {
  display: block;
  margin-bottom: 2px;
}

.standards-labels p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.fea-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.fea-card,
.recommendation-list {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.fea-card span,
.recommendation-list strong {
  color: var(--quiet);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.fea-card strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.1;
}

.fea-card p,
.recommendation-list p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

/* ── Bottle slider panel ──────────────────────────────────────────────────── */
.bsl-panel {
  display: grid;
  gap: 0;
  overflow-y: auto;
  max-height: calc(100vh - 320px);
  padding-right: 2px;
}

.bsl-row {
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.bsl-row:last-child {
  border-bottom: none;
}

.bsl-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0;
  text-transform: none;
}

.bsl-val {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--tool);
  background: var(--tool-soft);
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 11px;
  min-width: 60px;
  text-align: right;
  text-transform: none;
  letter-spacing: 0;
}

input[type="range"].bsl-input,
#bslMorphPct,
#bslStepCount {
  width: 100%;
  accent-color: var(--tool);
  height: 4px;
  cursor: pointer;
}

.bsl-note {
  margin: 4px 0 0;
  font-size: 10px;
  color: var(--quiet);
  line-height: 1.4;
  text-transform: none;
  letter-spacing: 0;
}

.bsl-divider {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--quiet);
  padding: 14px 0 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}

.bsl-locks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px 0 8px;
}

.bsl-lock {
  background: #f0f7f5;
  border: 1px solid #c2d9d3;
  border-radius: 7px;
  padding: 7px 9px;
  font-size: 11px;
}

.bsl-lock b {
  display: block;
  color: #1e3a30;
  font-size: 11px;
  margin-bottom: 1px;
}

.bsl-lock span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.bsl-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 8px 0;
}

.bottle-strip {
  display: flex;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  padding: 4px 0 9px;
  scrollbar-width: thin;
}

.bottle-card,
.bottle-tile {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  box-shadow: none;
}

.bottle-card {
  display: grid;
  flex: 0 0 112px;
  gap: 5px;
  padding: 6px;
}

.bottle-card:hover,
.bottle-tile:hover,
.bottle-card.active,
.bottle-tile.active {
  border-color: var(--tool);
  background: #f3f8f6;
}

.bottle-card svg,
.bottle-tile svg {
  width: 100%;
  height: auto;
  border: 1px solid rgba(205, 214, 211, .7);
  border-radius: 6px;
  background: linear-gradient(180deg, #fff, #f4f7f5);
}

.bottle-card span,
.bottle-tile span,
.bottle-tile em {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.bottle-card b,
.bottle-tile b {
  display: block;
  color: var(--ink);
  font-size: 10px;
  line-height: 1.25;
}

.bottle-matrix,
.bottle-feature-options {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.bottle-matrix summary,
.bottle-feature-options summary,
.formula-details summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.bottle-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(100px, 1fr));
  gap: 7px;
  max-height: 520px;
  overflow: auto;
  padding-top: 8px;
}

.bottle-tile {
  display: grid;
  gap: 5px;
  padding: 6px;
}

.bottle-tile em {
  font-style: normal;
  color: var(--quiet);
}

.feature-option-grid {
  display: grid;
  gap: 6px;
  padding-top: 8px;
}

.feature-option {
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.feature-option b {
  font-size: 11px;
}

.feature-option span,
.feature-option em {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.feature-option em {
  font-style: normal;
  color: var(--quiet);
}

.bottle-gates {
  display: grid;
  gap: 10px;
}

.bottle-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.bottle-metric {
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.bottle-metric small {
  color: var(--quiet);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.bottle-metric b {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.15;
}

.bottle-metric span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.bottle-checks {
  display: grid;
  gap: 6px;
}

.bottle-check {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.bottle-check > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.bottle-check.pass > span,
.bottle-check.locked > span {
  color: var(--ok);
  background: #e6f1eb;
}

.bottle-check.adjust > span {
  color: var(--warn);
  background: #f5eddd;
}

.bottle-check.disabled > span {
  color: var(--bad);
  background: #f5e7e5;
}

.bottle-check b {
  display: block;
  font-size: 11px;
  margin-bottom: 2px;
}

.bottle-check p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.formula-details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 8px;
}

.formula-details pre {
  max-height: 260px;
  overflow: auto;
  margin: 8px 0 0;
  color: #dcebe6;
  background: #172225;
  border-radius: 6px;
  padding: 10px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.code-gate-list {
  display: grid;
  gap: 7px;
  padding-top: 8px;
}

.code-gate-list div {
  display: grid;
  gap: 2px;
}

.code-gate-list b {
  font-size: 11px;
}

.code-gate-list span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}
