* { box-sizing: border-box; }

:root {
  --bg: #f8fafc;
  --card: #fff;
  --border: #e2e8f0;
  --primary: #0f766e;
  --primary-light: #14b8a6;
  --text: #1e293b;
  --text-muted: #64748b;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  margin: 0;
  padding: 1rem;
  min-height: 100vh;
}

header {
  text-align: center;
  margin-bottom: 1.5rem;
}

header h1 {
  margin: 0;
  font-size: 1.75rem;
  color: var(--primary);
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0.25rem 0 0 0;
}

main.main-columns {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 800px) {
  main.main-columns {
    grid-template-columns: 380px 1fr;
  }
}

.input-card {
  margin-bottom: 0;
}

.output-card {
  margin-bottom: 0;
}

.card {
  background: var(--card);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid var(--border);
}

.card h2 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  color: var(--primary);
}

.field-group {
  margin-bottom: 1rem;
}

.field-group label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.sublabel {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

input[type="number"],
input[type="text"],
select {
  width: 100%;
  padding: 0.5rem 0.6rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.radio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
  cursor: pointer;
}

.radio input { width: auto; }

.btn-calculate {
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 0.5rem;
}

.btn-calculate:hover {
  background: var(--primary-light);
}

.hidden { display: none !important; }

.output-card h2 { margin-bottom: 1rem; }

.output-block {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.output-block:last-of-type {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.output-block-title {
  margin: 0 0 0.5rem 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.output-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  min-width: 0;
}

.output-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
  min-width: 0;
  flex-wrap: nowrap;
}

.output-item:last-child { border-bottom: none; }

.output-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.output-value {
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 4.5rem;
}

.footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

