@font-face {
  font-family: Manrope;
  src: url("./assets/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: Manrope, system-ui, sans-serif;
  --ink: #101d2d;
  --muted: #526176;
  --lime: #d9f764;
  --lime-hover: #e9ff9a;
  --paper: #f5f7f9;
  --line: #dce3ea;
  --white: #fff;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
h1, h2, h3, p, dl, dd { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #355ac2; outline-offset: 4px; }
section[id] { scroll-margin-top: 1.5rem; }

.container { width: min(74rem, calc(100% - 6rem)); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed;
  z-index: 3;
  inset-block-start: .8rem;
  inset-inline-start: .8rem;
  padding: .75rem 1rem;
  background: var(--white);
}

.tools-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.header-inner { min-height: 4.75rem; }
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -.035em;
  white-space: nowrap;
}

.wordmark strong { color: #526328; }
.wordmark-icon {
  flex: 0 0 2.5rem;
  width: 2.5rem;
  aspect-ratio: 1;
  background: url("./assets/one-motor-icon.svg?v=transparent") center / contain no-repeat;
}

.header-inner nav, .hero-nav { display: flex; flex-wrap: wrap; gap: .65rem 1.3rem; }
.header-inner nav a, .hero-nav a { font-size: .89rem; font-weight: 800; }
.header-inner nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
}
.header-inner nav a:is(:hover, [aria-current="page"]), .hero-nav a:hover { text-decoration: underline; text-underline-offset: .3em; }

.tool-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: min(33rem, 68vh);
  align-items: end;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
}

.tool-hero img, .tool-hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
}
.tool-hero img { object-fit: cover; object-position: 65% 61%; }
.tool-hero::after {
  content: "";
  background: linear-gradient(90deg, #0d1929 0%, #0d1929ed 25%, #0d192978 57%, #0d192910 100%),
    linear-gradient(0deg, #0d1929aa, transparent 61%);
}

.hero-copy { padding-block: clamp(4rem, 8vw, 7rem) clamp(3rem, 6vw, 5rem); }
.hero-copy h1 {
  margin-bottom: 1.15rem;
  font-size: clamp(3.2rem, 7.5vw, 7rem);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.067em;
  text-wrap: balance;
}

.hero-copy > p { max-width: 31rem; color: #e7eef8; font-size: clamp(1.05rem, 1.8vw, 1.28rem); font-weight: 600; line-height: 1.58; }
.hero-nav { gap: .55rem .7rem; margin-top: 1.7rem; }
.hero-nav a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  padding: .5rem .85rem;
  border: 1px solid #f9fcff5e;
  border-radius: .4rem;
  background: #1422359c;
  text-decoration: none;
}
.hero-nav a:hover { background: #26364c; }
.hero-nav a:focus-visible { outline-color: var(--lime); }

.section { padding-block: clamp(3.5rem, 7vw, 6.8rem); }
.section-heading { margin-bottom: clamp(1.45rem, 3vw, 2.35rem); }
.section-heading h2 {
  margin-bottom: .7rem;
  font-size: clamp(2rem, 4.9vw, 4.05rem);
  font-weight: 800;
  line-height: 1.07;
  letter-spacing: -.061em;
}
.section-heading > p { max-width: 42rem; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.14rem); line-height: 1.6; }
.notice { margin-bottom: 1rem; color: var(--muted); }
.tool-layout { display: grid; grid-template-columns: minmax(0, 1.07fr) minmax(0, .93fr); gap: 1.25rem; align-items: stretch; }
.tool-card { min-width: 0; padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: .9rem; background: var(--white); }
.inputs-card form, .inputs-card fieldset { min-width: 0; }
.inputs-card fieldset, .checklist-grid fieldset { margin: 0; padding: 0; border: 0; }
.inputs-card fieldset + fieldset { margin-top: 1.55rem; }
.inputs-card legend, .checklist-grid legend { margin-bottom: .75rem; padding: 0; color: var(--ink); font-size: 1rem; font-weight: 800; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem .8rem; }
.field { min-width: 0; }
.field label {
  display: block;
  margin-bottom: .4rem;
  color: #354457;
  font-size: .83rem;
  font-weight: 750;
}
.field input, .field select {
  width: 100%;
  min-height: 2.9rem;
  border: 1px solid #bac6d0;
  border-radius: .45rem;
  background: var(--white);
  color: var(--ink);
  font-size: .94rem;
  font-weight: 650;
}
.field input { padding: .45rem .75rem .45rem 1.55rem; }
.field .suffix input { padding: .45rem 1.55rem .45rem .75rem; }
.field select { padding: .45rem .65rem; }
.field input[type="number"] { appearance: textfield; }
.field input::-webkit-inner-spin-button { appearance: none; }
.affix { position: relative; }
.affix span {
  position: absolute;
  inset-inline-start: .72rem;
  inset-block-start: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: .86rem;
  pointer-events: none;
}
.affix.suffix span { inset-inline: auto .72rem; }
.form-end { margin-top: .95rem; }
.text-button {
  padding: .45rem 0;
  border: 0;
  background: transparent;
  color: #304158;
  font-weight: 800;
  font-size: .84rem;
  text-decoration: underline;
  text-underline-offset: .24em;
}
.text-button:hover { color: var(--ink); }
.text-button:disabled { opacity: .48; }
.error { color: #883b1d; font-size: .83rem; font-weight: 700; line-height: 1.5; }
.error:not(:empty) { margin-top: .35rem; }
.error[data-copied] { color: #41572d; }
.nested-actions { display: flex; flex-wrap: wrap; gap: .35rem 1rem; }

.estimate-card {
  border-color: #1f334b;
  background: linear-gradient(145deg, #203852 0%, #101d2d 72%);
  color: var(--white);
}
.estimate-card h3, .term-heading h3 { font-size: .93rem; font-weight: 750; }
.estimate-card output, .term-heading output {
  display: block;
  margin-block: .25rem .75rem;
  color: var(--lime);
  font-size: clamp(2.2rem, 5.2vw, 4.1rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.06;
  letter-spacing: -.06em;
}
.cost-list, .loan-list { display: grid; gap: .62rem; }
.cost-list { padding-block: .6rem 1.1rem; }
.cost-list > div, .loan-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: .65rem;
  font-size: .83rem;
}
.cost-list dt, .loan-list dt { color: #e1eaf4; }
.cost-list dd { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .65rem; }
.cost-list dd span { min-width: 4.5rem; text-align: right; }
.cost-list dd, .loan-list dd { font-variant-numeric: tabular-nums; font-weight: 800; }
.loan-list { padding-block: .85rem .75rem; border-top: 1px solid #405369; }
.loan-list dd { text-align: right; }
progress { display: block; width: 100%; height: .45rem; overflow: hidden; border: 0; border-radius: 1rem; background: #43556b; color: var(--lime); appearance: none; }
progress::-webkit-progress-bar { border-radius: 1rem; background: #43556b; }
progress::-webkit-progress-value { border-radius: 1rem; background: var(--lime); }
progress::-moz-progress-bar { border-radius: 1rem; background: var(--lime); }
.quote-block { margin-top: 1rem; }
.quote-block p, .fine-print { font-size: .8rem; line-height: 1.55; }
.quote-block p { margin-top: .7rem; color: #dbe5f0; }
.action {
  display: inline-flex;
  min-height: 2.75rem;
  justify-content: center;
  align-items: center;
  padding: .52rem .9rem;
  border: 1px solid transparent;
  border-radius: .48rem;
  font-size: .86rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  line-height: 1.35;
}
.action-light { background: var(--lime); color: var(--ink); }
.action-light:hover { background: var(--lime-hover); }
.action-light:focus-visible { outline-color: var(--lime); }
.action-line { border-color: #bdc8d2; background: var(--white); color: var(--ink); }
.action-line:hover { border-color: #4f6379; background: #eef2f6; }

.price-section { border-block: 1px solid #e0e7ee; background: #eaf0f5; }
.term-heading output { color: var(--ink); font-size: clamp(2rem, 4vw, 3.4rem); }
.term-table { width: 100%; border-collapse: collapse; font-size: .85rem; font-variant-numeric: tabular-nums; text-align: left; }
.term-table thead { color: var(--muted); font-size: .76rem; }
.term-table th, .term-table td { padding: .5rem .6rem .5rem 0; border-bottom: 1px solid var(--line); }
.term-table td:last-child { padding-right: 0; text-align: right; }
.term-table tbody td:nth-child(2) { font-weight: 800; }
.term-button {
  min-height: 2.25rem;
  padding: .2rem .65rem;
  border: 1px solid #b4c2cf;
  border-radius: .35rem;
  background: var(--white);
  color: #273d52;
  font-size: .79rem;
  font-weight: 800;
  white-space: nowrap;
}
.term-button:hover { border-color: #60768b; background: #eef3f8; }
.term-card .fine-print { margin-top: .9rem; }
.fine-print { color: var(--muted); }

.checklist-card { padding: clamp(1.25rem, 4vw, 2.5rem); border: 1px solid var(--line); border-radius: .9rem; background: var(--white); }
.checklist-toolbar, .checklist-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.checklist-toolbar { justify-content: space-between; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.checklist-toolbar label { display: block; font-size: .9rem; font-weight: 800; }
.checklist-toolbar progress { width: min(14rem, 100%); margin-block: .55rem; color: #526b19; background: #e4ead8; }
.checklist-toolbar progress::-webkit-progress-bar { background: #e4ead8; }
.checklist-toolbar progress::-webkit-progress-value { background: #526b19; }
.checklist-toolbar progress::-moz-progress-bar { background: #526b19; }
#checklist-status { color: var(--muted); font-size: .83rem; font-weight: 700; }
.checklist-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; margin-block: 1.65rem 1.2rem; }
.checklist-grid fieldset { padding: 0; }
.checklist-grid legend { margin-bottom: .45rem; }
.checklist-grid label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: .55rem;
  min-height: 3rem;
  padding: .65rem .55rem;
  border-block-end: 1px solid var(--line);
  font-size: .88rem;
  line-height: 1.48;
  cursor: pointer;
}
.checklist-grid label:hover { background: #f4f7f9; }
.checklist-grid input { width: 1.05rem; height: 1.05rem; margin: .125rem 0 0; accent-color: #4f671c; cursor: pointer; }
.checklist-grid input:checked + span { color: #475c30; }

@media (max-width: 60rem) {
  .container { width: calc(100% - 4rem); }
  .tool-hero::after {
    background: linear-gradient(90deg, #101d2df4 0%, #101d2dc4 40%, #101d2d51 100%),
      linear-gradient(0deg, #101d2d80, transparent 68%);
  }
}

@media (max-width: 45rem) {
  .container { width: calc(100% - 2rem); }
  .header-inner { display: grid; gap: .2rem; padding-block: .75rem .35rem; }
  .header-inner nav { gap: 0 .9rem; }
  .header-inner nav a { min-height: 2.5rem; }
  .tool-hero { min-height: 24rem; }
  .tool-hero img { object-position: 40% 75%; opacity: .72; }
  .tool-hero::after {
    background: linear-gradient(0deg, #101d2d 0%, #101d2dca 36%, #101d2d38 100%),
      linear-gradient(90deg, #101d2d92, transparent);
  }
  .hero-nav { gap: .45rem; }
  .hero-nav a { padding-inline: .65rem; font-size: .81rem; }
  .tool-layout, .checklist-grid { grid-template-columns: minmax(0, 1fr); }
  .checklist-grid { gap: 1.2rem; }
}

@media (max-width: 25rem) {
  .tool-card { padding-inline: 1rem; }
  .field-grid { column-gap: .6rem; }
  .cost-list > div, .loan-list > div { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
  .cost-list dd span { min-width: 3.55rem; }
}

@media print {
  body.printing-checklist { color: #000; background: #fff; }
  .printing-checklist .tools-header,
  .printing-checklist main > section:not(#checklist), .printing-checklist .checklist-toolbar,
  .printing-checklist #checklist-storage { display: none; }
  .printing-checklist #checklist { width: 100%; padding: 0; }
  .printing-checklist .checklist-card { padding: 0; border: 0; }
  .printing-checklist .checklist-grid { display: block; margin-block: 0; }
  .printing-checklist .checklist-grid fieldset { break-inside: avoid; margin-block: 0 1rem; }
}
