:root {
  --tile: #437D8D;
  --tile-2: #57808B;
  --tile-dark: #2E5561;
  --bg: #1C2B30;
  --text: #FFFFFF;
  --accent: #F5A623; /* amber: qualified-plan markers, highlights */
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

main {
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 10px 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}

.label-sub {
  text-transform: none;
  font-weight: 400;
  opacity: 0.8;
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
  opacity: 0.9;
}

/* ---- Price inputs ---- */
.input-section {
  background: var(--tile-dark);
  border-radius: 14px;
  padding: 10px 14px;
}

.input-section input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 34px;
  font-weight: 800;
  text-align: center;
  min-height: 56px;
}

.input-section input::placeholder { color: rgba(255,255,255,0.4); }

/* ---- Cards ---- */
.headline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.card {
  background: var(--tile);
  border-radius: 14px;
  padding: 10px 12px;
  min-height: 84px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 2px;
}

.big {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
}

.small {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.85;
}

/* ---- Drop table ---- */
.drop-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--tile-dark);
  border-radius: 14px;
  overflow: hidden;
  font-size: 15px;
}

.drop-table th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 6px;
  background: rgba(0,0,0,0.25);
  text-align: right;
}

.drop-table th:first-child { text-align: left; }

.drop-table td {
  padding: 10px 6px;
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.drop-table td:first-child {
  text-align: left;
  font-weight: 700;
}

/* ---- Lender toggle + plan select ---- */
.plan-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lender-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.lender-toggle button {
  min-height: 56px;
  border: none;
  border-radius: 14px;
  background: var(--tile-dark);
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.lender-toggle button.active {
  background: var(--tile);
  outline: 2px solid var(--accent);
}

/* iOS Safari ignores CSS on <option>, so mark a qualified selection on the
   select itself: amber text whenever the chosen plan qualifies. */
#plan-select.qualified { color: var(--accent); }

#plan-select {
  width: 100%;
  min-height: 56px;
  border: none;
  border-radius: 14px;
  background: var(--tile-2);
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  padding: 0 14px;
  appearance: none;
  -webkit-appearance: none;
}

/* ---- Effect cards ---- */
.effect-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 10px;
}

.effect-card {
  align-items: flex-start;
  text-align: left;
}

.effect-lines {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.effect-lines .hl { color: var(--accent); }

/* ---- Tiles / steppers ---- */
.tile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tile {
  background: var(--tile);
  border-radius: 14px;
  min-height: 84px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 2px;
}

.tile .label { font-size: 12px; }

.tile.stepper {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  grid-template-rows: auto 1fr;
  align-items: center;
}

.tile.stepper .label {
  grid-column: 1 / -1;
  padding-top: 2px;
}

.tile.stepper output {
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tile.stepper output input {
  width: 100%;
  background: rgba(0,0,0,0.25);
  border: none;
  border-radius: 8px;
  outline: 2px solid var(--accent);
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  min-height: 48px;
}

.tile.stepper .minus,
.tile.stepper .plus {
  min-height: 56px;
  border: none;
  border-radius: 10px;
  background: var(--tile-dark);
  color: var(--text);
  font-size: 26px;
  font-weight: 800;
}

.tile.stepper .minus:active,
.tile.stepper .plus:active { background: var(--tile-2); }

/* ---- Quick grid ---- */
.quick-grid .tile { background: var(--tile-2); }

.quick-grid .tile .small {
  font-size: 12px;
  opacity: 0.9;
}

/* ---- Reset ---- */
.reset-btn {
  width: 100%;
  min-height: 56px;
  border: none;
  border-radius: 14px;
  background: var(--tile-dark);
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
