:root {
  --math-font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --math-line-color: #1F2328;
  --math-primary-accent: #0969DA;
  --math-error-color: #CF222E;
  --math-success-color: #1A7F37;
  --math-bg-subtle: #F6F8FA;
}

math-container {
  font-family: var(--math-font-family);
  font-size: 18px;
  color: var(--math-line-color);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.operator-switcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--math-bg-subtle);
  border: 1px solid #D0D7DE;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.operator-switcher:hover {
  background-color: #EAEEF2;
  color: var(--math-primary-accent);
}

.ratio-table-wrapper {
  display: flex;
  flex-direction: column;
  position: relative;
  margin: 20px 0;
}

.ratio-table {
  border-collapse: collapse;
  margin: 10px 0;
  background: #FFFFFF;
}

.ratio-table td, .ratio-table th {
  border: 1px solid #D0D7DE;
  padding: 12px 16px;
  text-align: center;
  font-size: 16px;
}

.ratio-table th {
  background-color: var(--math-bg-subtle);
  font-weight: 600;
}

.ratio-arc-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ratio-arc-path {
  fill: none;
  stroke: var(--math-primary-accent);
  stroke-width: 2;
  stroke-dasharray: 4;
}

.additive-error-cell {
  background-color: rgba(207, 34, 46, 0.1) !important;
  border-color: var(--math-error-color) !important;
}
