:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #4b5563;
  --border: #e5e7eb;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --success: #0f9d58;
  --danger: #e11d48;
  --shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 40%);
  color: var(--text);
  line-height: 1.6;
}

.hero {
  padding: 48px 24px 12px;
}

.hero__content {
  max-width: 880px;
  margin: 0 auto;
}

h1 {
  margin: 8px 0 12px;
  font-size: clamp(28px, 3vw, 40px);
}

h2 {
  margin: 4px 0 6px;
  font-size: 22px;
}

h3 {
  margin: 12px 0 6px;
  font-size: 18px;
}

.eyebrow {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  font-size: 12px;
  margin: 0;
}

.lede {
  margin: 0;
  color: var(--muted);
  max-width: 800px;
}

.page {
  max-width: 1200px;
  margin: 0 auto 56px;
  padding: 0 24px 48px;
  display: grid;
  gap: 20px;
}

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.description {
  margin: 0;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
}

.field input,
.field select {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 16px;
  outline: none;
  background: #f9fafb;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.hint {
  color: var(--muted);
  font-weight: 400;
  font-size: 13px;
}

button {
  font: inherit;
  cursor: pointer;
}

.primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}

.primary:hover {
  transform: translateY(-1px);
}

.ghost {
  border: 1px solid var(--border);
  background: transparent;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 600;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  justify-content: flex-end;
}

.footnote {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.results .result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.content__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.content ul {
  padding-left: 18px;
  margin: 8px 0 12px;
  color: var(--text);
}

.content li + li {
  margin-top: 6px;
}

.content dl {
  margin: 8px 0 0;
}

.content dt {
  font-weight: 700;
  margin-top: 10px;
}

.content dd {
  margin: 4px 0 0 0;
  color: var(--muted);
}

.inline-link {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: none;
}

.inline-link:hover {
  text-decoration: underline;
}

.pill {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: #f9fafb;
}

.pill.highlight {
  background: #ecfdf3;
  border-color: #bbf7d0;
}

.pill__label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.pill__value {
  margin: 6px 0 4px;
  font-size: 24px;
  font-weight: 800;
}

.pill__sub {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.table {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.table__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.table__row:last-child {
  border-bottom: none;
}

.table__row--total {
  background: #f1f5f9;
  font-weight: 800;
}

.footer {
  text-align: center;
  padding: 12px 24px 32px;
}

@media (max-width: 640px) {
  .card__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .content__grid {
    grid-template-columns: 1fr;
  }

  .pill__value {
    font-size: 22px;
  }
}
