/* ==========================================================================
   Savings & Repayments — Pacific Teal theme applied 2026-06-24.
   Fonts: Source Sans 3 (body), Libre Baskerville (headline), IBM Plex Mono.
   Palette: --cream #F0F4F3, --ink #1C2826, --terracotta #0D6E6E.
   ========================================================================== */

:root {
  --cream: #F0F4F3;
  --ink: #1C2826;
  --muted: rgba(28, 40, 38, 0.62);
  --terracotta: #0D6E6E;
  --pill: #C2E0DF;
  --note: #D0EEEC;
  --field-border: rgba(28, 40, 38, 0.2);
  --card-border: rgba(28, 40, 38, 0.08);
  --tab-inactive: #D8EDEA;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: "Source Sans 3", sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 28px 24px 56px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--terracotta);
  text-decoration: none;
  font-weight: 700;
  font-size: 15.5px;
  letter-spacing: -0.01em;
}
.back:hover { text-decoration: underline; }

.hero {
  text-align: center;
  margin-top: 40px;
}
.hero h1 {
  font-family: "Libre Baskerville", serif;
  font-weight: 700;
  font-size: clamp(40px, 10vw, 60px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--terracotta);
  margin: 0;
}
.rule {
  width: 64px;
  height: 4px;
  border-radius: 2px;
  background: var(--terracotta);
  margin: 22px auto 0;
}
.hero p {
  font-size: 17px;
  line-height: 1.45;
  color: var(--muted);
  margin: 22px auto 0;
  max-width: 420px;
}

.tabs {
  display: flex;
  gap: 6px;
  margin-top: 36px;
}
.tab {
  flex: 1;
  font-family: "Source Sans 3", sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--muted);
  background: var(--tab-inactive);
  border: none;
  border-radius: 16px 16px 0 0;
  padding: 18px 16px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.tab.active { background: var(--pill); color: var(--terracotta); }

.card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 0 0 24px 24px;
  box-shadow: 0 18px 40px -28px rgba(28, 40, 38, 0.4);
  padding: 14px 34px 34px;
}

.panel { display: none; }
.panel.active { display: block; }

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 0;
  border-bottom: 1px solid rgba(28, 40, 38, 0.08);
}
.row:last-of-type { border-bottom: none; }

.row .label {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.row .label.lead {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.field-box {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--field-border);
  border-radius: 12px;
  padding: 0 14px;
  transition: border-color 0.15s ease;
}
.field-box:focus-within { border-color: var(--terracotta); }
.field-box .affix {
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
}
.field-box input {
  font-family: "Source Sans 3", sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  border: none;
  outline: none;
  background: transparent;
  padding: 11px 6px;
  width: 110px;
}
.field-box input.narrow { width: 56px; }

.field {
  appearance: none;
  -webkit-appearance: none;
  font-family: "Source Sans 3", sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--field-border);
  border-radius: 12px;
  padding: 10px 32px 10px 14px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7'%3E%3Cpath d='M1 1.5 5.5 6 10 1.5' stroke='%230D6E6E' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  transition: border-color 0.15s ease;
}
.field:focus { outline: none; border-color: var(--terracotta); }
.field.compact { font-size: 15px; padding: 9px 30px 9px 12px; }

input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

.pill {
  background: var(--pill);
  color: var(--terracotta);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.01em;
  border-radius: 12px;
  padding: 12px 22px;
  white-space: nowrap;
}

.note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--note);
  border-radius: 16px;
  padding: 16px 20px;
  margin-top: 24px;
  font-size: 15px;
  line-height: 1.5;
  color: #0A5050;
}
.note svg { flex-shrink: 0; margin-top: 2px; }
.note b { color: #085050; font-weight: 800; }

footer {
  text-align: center;
  margin-top: 40px;
  font-size: 14.5px;
  color: var(--muted);
}
footer a { color: var(--terracotta); text-decoration: none; }
footer a:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .card { padding: 10px 20px 24px; }
  .row { padding: 16px 0; }
  .row .label { font-size: 16.5px; }
  .pill { font-size: 19px; padding: 10px 16px; }
  .tab { font-size: 14px; padding: 15px 10px; }
  .field-box input { width: 92px; }
}