#vo2-calculator {
  --vo2-primary: #8e44ad;
  --vo2-primary-dark: #732d91;
  --vo2-bg: #ffffff;
  --vo2-surface: #f8f9fa;
  --vo2-border: #dcdfe6;
  --vo2-text: #2c3e50;
  --vo2-muted: #5f6c7b;
  --vo2-radius: 6px;

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--vo2-text);
  line-height: 1.6;
  max-width: 980px;
  margin: 0 auto;
  box-sizing: border-box;
}

#vo2-calculator *,
#vo2-calculator *::before,
#vo2-calculator *::after {
  box-sizing: inherit;
}

#vo2-calculator p {
  margin: 0 0 1rem 0;
}

/* Protocol & Formula Box */
.vo2-protocol {
  background: var(--vo2-surface);
  border-left: 4px solid var(--vo2-primary);
  border-radius: var(--vo2-radius);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}

.vo2-protocol ol {
  margin: 0;
  padding-left: 1.35rem;
}

.vo2-protocol li {
  margin-bottom: 0.45rem;
}

.vo2-protocol li:last-child {
  margin-bottom: 0;
}

.vo2-formula {
  display: inline-block;
  font-family: "Cambria Math", "Times New Roman", Georgia, serif;
  font-size: 1.02rem;
  background: #ffffff;
  border: 1px solid var(--vo2-border);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  margin-left: 0.25rem;
  color: #1a252f;
}

.vo2-formula var {
  font-style: italic;
  font-weight: 600;
}

.vo2-citation {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--vo2-muted);
}

/* Inputs Grid */
.vo2-inputs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 1.75rem 0 1.5rem 0;
}

.vo2-field label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.4rem;
}

.vo2-req {
  color: #d93025;
}

.vo2-input-group {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.vo2-input-group input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.55rem 0.75rem;
  font-size: 1rem;
  color: var(--vo2-text);
  background: #ffffff;
  border: 1px solid var(--vo2-border);
  border-right: none;
  border-radius: var(--vo2-radius) 0 0 var(--vo2-radius);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vo2-input-group input:focus {
  border-color: var(--vo2-primary);
  box-shadow: 0 0 0 2px rgba(142, 68, 173, 0.15);
}

.vo2-unit {
  display: inline-flex;
  align-items: center;
  padding: 0 0.75rem;
  font-size: 0.9rem;
  color: var(--vo2-muted);
  background: var(--vo2-surface);
  border: 1px solid var(--vo2-border);
  border-radius: 0 var(--vo2-radius) var(--vo2-radius) 0;
  white-space: nowrap;
  user-select: none;
}

/* Results Cards */
.vo2-results {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.vo2-card {
  background: var(--vo2-primary);
  color: #ffffff;
  border-radius: var(--vo2-radius);
  padding: 0.9rem 0.75rem;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  transition: background-color 0.2s ease;
}

.vo2-card.is-error {
  background: #6c757d;
}

.vo2-card-label {
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.95;
  margin-bottom: 0.3rem;
}

.vo2-card-value {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.vo2-divider {
  border: 0;
  border-top: 1px solid var(--vo2-border);
  margin: 2rem 0;
}

/* Norms Tables */
.vo2-norms-section {
  margin-bottom: 2rem;
}

.vo2-norms-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.75rem 0;
}

.vo2-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--vo2-border);
  border-radius: var(--vo2-radius);
}

.vo2-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: left;
}

.vo2-table th,
.vo2-table td {
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid #eef0f4;
  white-space: nowrap;
}

.vo2-table th {
  background: var(--vo2-surface);
  font-weight: 700;
  color: var(--vo2-text);
}

.vo2-table tbody tr:last-child td {
  border-bottom: none;
}

.vo2-table tbody tr:hover {
  background: #faf6fc;
}

.vo2-table td:first-child {
  font-weight: 700;
}

/* Responsive Breakpoints */
@media (max-width: 820px) {
  .vo2-results {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .vo2-inputs {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .vo2-results {
    grid-template-columns: 1fr;
  }
}