body {
  max-width: 720px;
  margin: 2rem auto;
  padding: 0 1rem 3rem;
}

h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

body > p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-top: 0.3rem;
  margin-bottom: 1.5rem;
}

section {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

section h2 {
  font-size: 1.1rem;
  margin-bottom: 0.9rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  margin-top: 0.9rem;
  color: var(--color-text);
}

label:first-child {
  margin-top: 0;
}

input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.75rem;
  font-size: 1rem;
  font-family: var(--font-family-mono);
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--color-accent-1);
}

.error {
  color: var(--color-error);
  min-height: 1.2em;
  font-size: 0.9rem;
  margin-top: 0.6rem;
}

.result-line {
  margin-top: 0.6rem;
  color: var(--color-text-subtle);
}

.result-line span:first-child {
  font-weight: 600;
  color: var(--color-text);
}

.result-value {
  font-family: var(--font-family-mono);
  color: var(--color-accent-1);
}

.rounding-note {
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.table-wrapper {
  max-height: 480px;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-family-mono);
  font-size: 0.85rem;
}

thead th {
  position: sticky;
  top: 0;
  background: var(--color-card-bg);
  color: var(--color-text);
  text-align: right;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--color-border);
}

thead th:first-child {
  text-align: left;
}

tbody td {
  text-align: right;
  padding: 0.4rem 0.6rem;
  color: var(--color-text-subtle);
  border-bottom: 1px solid var(--color-border);
}

tbody td:first-child {
  text-align: left;
  color: var(--color-text-muted);
}
