.embedding-workspace {
  display: grid;
  gap: 18px;
  padding-bottom: 80px;
}

.embedding-step {
  overflow: hidden;
}

.embedding-intro-panel .embedding-panel-body {
  padding: 14px;
}

.embedding-step-grid,
.embedding-axis-layout {
  display: grid;
  gap: 16px;
  padding: 16px;
  background: #fbfcfa;
}

.embedding-step-grid {
  grid-template-columns: minmax(290px, 380px) minmax(420px, 1fr);
}

.embedding-axis-layout {
  grid-template-columns: minmax(290px, 360px) minmax(520px, 1fr);
  align-items: start;
}

.embedding-axis-layout .embedding-result-block:last-child {
  grid-column: 2;
}

.embedding-panel-body,
.embedding-result-block {
  display: grid;
  gap: 14px;
  align-content: start;
}

.embedding-panel-body {
  padding: 0;
}

.embedding-result-block {
  min-width: 0;
}

.embedding-result-block h3,
.embedding-inner-toolbar h3 {
  margin: 0;
  color: var(--accent-strong);
  font-size: 1rem;
}

.embedding-inner-toolbar {
  padding: 0;
  border: 0;
}

.embedding-note,
.embedding-expression,
.embedding-vector-summary,
.embedding-warning {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.embedding-warning[hidden] {
  display: none;
}

.embedding-note h2 {
  margin: 0;
  color: var(--accent-strong);
  font-size: 1rem;
}

.embedding-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.embedding-inline-code {
  color: var(--accent-strong);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 850;
}

.embedding-text-input {
  width: 100%;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfa;
  color: var(--text);
}

.embedding-panel-body select {
  width: 100%;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfa;
  color: var(--text);
}

.embedding-text-input:disabled {
  border-color: #d8e1db;
  background: #eef4f0;
  color: var(--muted);
}

.embedding-common-words {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
}

.embedding-common-words input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
}

.embedding-axis-toggle {
  margin: 0;
}

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

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

.embedding-plot {
  display: block;
  width: 100%;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.embedding-axis-line {
  stroke: #95a69d;
  stroke-width: 2;
  stroke-dasharray: 6 7;
}

.embedding-grid-line {
  stroke: #dfe8e2;
  stroke-width: 1;
}

.embedding-point {
  stroke: #1f2522;
  stroke-width: 1.4;
}

.embedding-point-group {
  cursor: pointer;
}

.embedding-point.query {
  fill: #ffffff;
  stroke: #1f2522;
  stroke-width: 2.5;
}

.embedding-point-group.active .embedding-point {
  stroke: var(--warm);
  stroke-width: 4;
}

.embedding-point-group.active .embedding-point-label {
  fill: var(--warm);
}

.embedding-point-label {
  fill: #1f2522;
  font-size: 14px;
  font-weight: 800;
}

.embedding-point-score {
  fill: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.embedding-axis-label {
  fill: var(--accent-strong);
  font-size: 15px;
  font-weight: 850;
}

.embedding-expression {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84rem;
  line-height: 1.45;
}

.embedding-vector-summary {
  color: var(--text);
  font-size: 0.9rem;
}

.embedding-vector-summary p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.embedding-vector-terms,
.embedding-feature-list {
  display: grid;
  gap: 8px;
}

.embedding-term-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.embedding-term-chip,
.embedding-feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 999px;
  background: var(--selected);
  color: var(--accent-strong);
  font-weight: 800;
}

.embedding-term-chip.negative {
  background: #fff1ec;
  color: #8a3d31;
}

.embedding-feature-chip {
  justify-content: space-between;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.embedding-feature-chip strong {
  text-align: right;
  overflow-wrap: anywhere;
}

.embedding-warning {
  margin: 0;
  border-color: #d8b8aa;
  background: #fff6f1;
  color: #8a3d31;
  font-weight: 750;
}

.embedding-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.embedding-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.embedding-table th,
.embedding-table td {
  padding: 10px 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.embedding-table tr:last-child td {
  border-bottom: 0;
}

.embedding-table tr.active,
.embedding-table tr.active td {
  background: #fff7e9;
}

.embedding-table tr.active .embedding-word-cell {
  color: var(--warm);
}

.embedding-table th {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.embedding-word-cell {
  color: var(--accent-strong);
  font-weight: 850;
}

.embedding-score {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.embedding-axis-meter {
  display: grid;
  grid-template-columns: 46px 1fr 46px;
  align-items: center;
  gap: 7px;
}

.embedding-axis-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: #e6ece8;
}

.embedding-axis-thumb {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--warm);
  box-shadow: 0 0 0 1px rgba(31, 37, 34, 0.25);
  transform: translate(-50%, -50%);
}

.embedding-reflection {
  margin: 0;
}

@media (max-width: 1180px) {
  .embedding-step-grid,
  .embedding-axis-layout {
    grid-template-columns: 1fr;
  }

  .embedding-axis-layout .embedding-result-block:last-child {
    grid-column: auto;
  }

  .embedding-plot {
    min-height: 460px;
  }

}

@media (max-width: 620px) {
  .embedding-preset-grid-two {
    grid-template-columns: 1fr;
  }

  .embedding-axis-meter {
    grid-template-columns: 1fr;
  }

  .embedding-axis-meter span {
    display: none;
  }

  .embedding-table th,
  .embedding-table td {
    font-size: 0.78rem;
  }

}
