:root {
  --bg: #ffffff;
  --text: #202124;
  --muted: #747474;
  --border: #e8e8e8;
  --accent: #FF5C00;
  --accent-dark: #d44e00;
  --surface: #f7f7f7;
  --surface-hover: #f1f1f1;
  --max-width: 980px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.6;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
}

/* Header */

.shell {
  width: min(calc(100% - 40px), var(--max-width));
  margin-inline: auto;
}

.site-header { border-bottom: 1px solid var(--border); }

.nav {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { font-weight: 750; letter-spacing: -0.035em; }
.brand span, .eyebrow { color: var(--accent); }

.home-link {
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 160ms ease;
}
.home-link:hover { color: var(--text); }

/* Hero */

.hero {
  padding: 110px 0 90px;
}

.eyebrow,
.card-label {
  display: inline-block;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 780px;
  margin-top: 16px;
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero h1 span {
  color: #b3b3b3;
}

.hero-copy {
  max-width: 570px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 1.02rem;
}

/* Calculator */

.calculator-section {
  padding: 40px 0 100px;
}

.calculator-grid,
.subsidy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.calculator-card,
.result-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px;
}

.calculator-card {
  background: #fff;
}

.result-card {
  background: var(--surface);
}

.card-heading {
  margin-bottom: 30px;
}

.card-heading h2 {
  margin-top: 7px;
  font-size: 1.7rem;
  letter-spacing: -0.04em;
}

/* Forms */

.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}

input,
select {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  padding: 0 14px;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(57, 198, 83, 0.1);
}

.input-prefix,
.input-suffix {
  position: relative;
}

.input-prefix span,
.input-suffix span {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.input-prefix span {
  left: 14px;
}

.input-prefix input {
  padding-left: 48px;
}

.input-suffix span {
  right: 14px;
}

.input-suffix input {
  padding-right: 45px;
}

/* Mode toggle */

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  background: var(--surface);
}

.mode-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.mode-button.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.hidden {
  display: none;
}

/* Button */

.primary-button {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.primary-button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

/* Results */

.main-result {
  padding: 34px 0 42px;
}

.main-result > span:first-child {
  display: block;
  font-size: clamp(2.8rem, 6vw, 4.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.055em;
}

.main-result > span:last-child {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.result-list {
  border-top: 1px solid var(--border);
}

.result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.result-row span {
  color: var(--muted);
}

.result-row strong {
  font-weight: 650;
}

.result-row.highlight strong {
  color: var(--accent-dark);
}

/* Subsidy */

.subsidy-section {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.section-heading {
  max-width: 650px;
  margin-bottom: 45px;
}

.section-heading h2 {
  margin-top: 10px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.section-heading p {
  margin-top: 18px;
  color: var(--muted);
}

/* Footer */

footer {
  padding: 38px 0;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #aaa;
  font-size: 0.78rem;
}

/* Mobile */

@media (max-width: 760px) {
  .hero {
    padding: 80px 0 60px;
  }

  .hero h1 {
    font-size: clamp(3rem, 14vw, 4.8rem);
  }

  .calculator-grid,
  .subsidy-grid {
    grid-template-columns: 1fr;
  }

  .calculator-card,
  .result-card {
    padding: 24px;
  }

  .calculator-section {
    padding-bottom: 75px;
  }

  .subsidy-section {
    padding: 75px 0;
  }

  .footer-content {
    flex-direction: column;
  }
}