.purchase-calculator { scroll-margin-top: 120px; }
#purchase-calculator .purchase-head { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.purchase-method-toggle { display: inline-flex; flex: 0 0 auto; padding: 2px; border-radius: 7px; background: #f3f4f6; }
.purchase-method-toggle button { min-height: 28px; padding: 4px 6px; border: 0; border-radius: 5px; background: transparent; color: #6b7280; font: inherit; font-size: 11px; cursor: pointer; }
.purchase-method-toggle button[aria-pressed="true"] { background: #fff; color: #111827; font-weight: 600; box-shadow: 0 1px 3px #0000000d; }
.purchase-method-toggle button:focus-visible { outline: 2px solid #111827; outline-offset: 2px; }
.purchase-results > [hidden] { display: none; }
.purchase-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.purchase-fields label { display: grid; gap: 6px; min-width: 0; font-size: 12px; }
.purchase-field { min-width: 0; }
.purchase-example { color: #6b7280; font-size: 11px; }
#purchase-monthly { font-variant-numeric: tabular-nums; }
.purchase-digit { display: inline-grid; position: relative; overflow: hidden; vertical-align: baseline; }
.purchase-digit > span { grid-area: 1 / 1; }
.purchase-digit > .purchase-digit-reel { position: absolute; top: 0; left: 0; width: 100%; }
.purchase-digit-reel > span { display: block; height: 1lh; }
.purchase-range { display: block; appearance: none; box-sizing: border-box; width: 100%; height: 24px; margin: 2px 0 0; padding: 0; border: 0; background: linear-gradient(to right, #111827 var(--range-progress, 0%), #e5e7eb var(--range-progress, 0%)) center / 100% 3px no-repeat; cursor: pointer; }
.purchase-range::-webkit-slider-thumb { appearance: none; width: 16px; height: 16px; border: 1px solid #111827; border-radius: 50%; background: #fff; }
.purchase-range::-moz-range-thumb { width: 14px; height: 14px; border: 1px solid #111827; border-radius: 50%; background: #fff; }
.purchase-range:disabled { opacity: .4; cursor: not-allowed; }
.purchase-input { display: flex; align-items: center; gap: 6px; }
.purchase-input input { width: 100%; min-width: 0; height: 38px; box-sizing: border-box; padding: 0 10px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: #111827; font: inherit; font-size: 16px; text-align: right; }
.purchase-input > span { flex: 0 0 24px; color: #6b7280; font-size: 12px; white-space: nowrap; }
.purchase-calculator input:focus-visible { outline: 2px solid #111827; outline-offset: 2px; }
.purchase-result { margin-top: 16px; }
.purchase-error { margin: 0 0 10px; color: #6b7280; font-size: 12px; line-height: 1.6; }
#purchase-prefill:empty, #purchase-error:empty { display: none; }
.purchase-monthly { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; box-sizing: border-box; padding: 12px 16px; border-radius: 12px; background: #f3f4f6; line-height: 1.4; }
.purchase-monthly > span { color: #111827; font-size: 16px; font-weight: 700; }
.purchase-monthly > strong { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; text-align: right; }
.purchase-method { margin-top: 12px; color: #6b7280; font-size: 12px; line-height: 1.65; }
.purchase-method summary { width: max-content; margin-left: auto; color: #4b5563; cursor: pointer; font-weight: 600; }
.purchase-method p { margin: 8px 0 0; }
.purchase-results { display: grid; gap: 8px; margin: 12px 0; }
.purchase-results > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.purchase-results dt { font-size: 11px; }
.purchase-results dd { margin: 0; color: #111827; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; text-align: right; }
@media (max-width: 360px) {
  .purchase-fields { column-gap: 12px; }
  .purchase-monthly, .purchase-results > div { flex-wrap: wrap; }
  .purchase-monthly > strong, .purchase-results dd { margin-left: auto; }
}
