:root {
  color-scheme: light;
  --bg: #f5efe6;
  --ink: #18201f;
  --muted: #69716f;
  --card: #fffaf1;
  --line: #ded0bc;
  --accent: #1f7a5a;
  --accent-dark: #13543d;
  --shadow: 0 24px 70px rgba(43, 32, 17, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(31, 122, 90, 0.18), transparent 34rem),
    linear-gradient(135deg, #f8f1e7 0%, var(--bg) 48%, #efe2ce 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 36px;
}

.hero {
  max-width: 780px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.45rem, 7vw, 5.5rem);
  line-height: 0.9;
  letter-spacing: -0.07em;
}

.intro {
  max-width: 650px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.6;
}

.calculator {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 22px;
  align-items: stretch;
}

.loan-form,
.comparison,
.bottom-line {
  border: 1px solid rgba(95, 73, 43, 0.17);
  background: rgba(255, 250, 241, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.loan-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 24px;
  border-radius: 28px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.field-message {
  padding: 11px 13px;
  border: 1px solid rgba(180, 35, 24, 0.24);
  border-radius: 16px;
  background: rgba(254, 228, 226, 0.78);
  color: #b42318;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.35;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
  font-size: 1.1rem;
  font-weight: 760;
  padding: 15px 16px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

input:focus {
  border-color: rgba(31, 122, 90, 0.8);
  box-shadow: 0 0 0 4px rgba(31, 122, 90, 0.14);
}

input[type="range"] {
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--accent);
  cursor: pointer;
}

input[type="range"]:focus {
  box-shadow: none;
}

.slider-field {
  grid-column: 1 / -1;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.72);
}

.slider-field small {
  color: var(--muted);
  font-weight: 700;
}

.input-suffix {
  position: relative;
}

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

.input-suffix span {
  position: absolute;
  right: 16px;
  top: 50%;
  color: var(--muted);
  font-weight: 850;
  transform: translateY(-50%);
}

.form-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.comparison {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 28px;
}

.result-card {
  min-height: 180px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fffdf8;
}

.result-card.accent {
  border-color: rgba(31, 122, 90, 0.28);
  background: linear-gradient(135deg, rgba(31, 122, 90, 0.12), #fffdf8 58%);
}

.result-label {
  display: block;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.result-card strong {
  display: block;
  margin-bottom: 14px;
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.result-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.bottom-line {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
  padding: 28px;
  border-radius: 32px;
}

.bottom-line span {
  display: block;
  margin-bottom: 10px;
  color: var(--accent-dark);
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bottom-line strong {
  display: block;
  font-size: clamp(2.6rem, 9vw, 6.6rem);
  line-height: 0.9;
  letter-spacing: -0.08em;
}

.term-message {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
}

@media (max-width: 820px) {
  .page-shell {
    width: min(100% - 24px, 620px);
    padding-top: 32px;
  }

  .calculator,
  .loan-form,
  .bottom-line {
    grid-template-columns: 1fr;
  }

  .loan-form,
  .comparison,
  .bottom-line {
    border-radius: 22px;
  }

  .bottom-line {
    padding: 22px;
  }
}
