@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("assets/barlow-bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #142d38;
  --deep: #112e35;
  --paper: #f9f7f1;
  --white: #fffdf8;
  --muted: #4b5d61;
  --amber: #ffc35b;
  --amber-light: #ffda91;
  --teal: #176356;
  --selected: #e3eee8;
  --line: #c4ccc5;
  --control-line: #76877f;
  --error: #9c2c20;
  --display: "Barlow Semi Condensed", "Arial Narrow", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.55 system-ui, sans-serif;
}
::selection { background: var(--amber-light); color: var(--ink); }
h1, h2, p { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 700; letter-spacing: -.025em; }
h2 { line-height: 1.05; text-wrap: balance; }
a { color: inherit; text-underline-offset: .19em; }
button, input { font: inherit; }
a, button, summary, label { -webkit-tap-highlight-color: #17635626; }
button, summary { cursor: pointer; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
.skip {
  position: absolute;
  z-index: 1;
  inset: .5rem auto auto .75rem;
  padding: .75rem 1rem;
  transform: translateY(-150%);
  background: var(--white);
  font-weight: 650;
}
.skip:focus { transform: none; }
.site-header, main { width: min(100% - 3rem, 42rem); margin-inline: auto; }
.site-header {
  display: flex;
  align-items: center;
  min-height: 6.3rem;
  border-bottom: 1px solid var(--line);
}
.brandlogo { display: block; width: 11rem; max-width: 100%; height: auto; }

.intro { padding-block: clamp(2.8rem, 8vw, 6.5rem) 2rem; }
.intro h1 { font-size: clamp(3rem, 8vw, 6rem); line-height: .96; text-wrap: balance; }
.intro h1 em { font-style: normal; color: var(--teal); white-space: nowrap; }
.intro-copy {
  max-width: 36ch;
  margin: 1.25rem 0 1.6rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}
.site-footer { width: min(100% - 3rem, 42rem); margin: 2rem auto; color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.site-footer p + p { margin-top: .45rem; }
.reviewbar { padding-block: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }

.button {
  display: inline-flex;
  min-height: 3.1rem;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: .65rem 1.12rem;
  border: 1px solid transparent;
  border-radius: .3rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.25;
}
.button-amber { background: var(--amber); color: var(--ink); }
.button-amber:hover { background: var(--amber-light); }
.button-primary { background: var(--deep); color: var(--white); }
.button-primary:hover { background: var(--teal); }
.button-quiet { background: transparent; color: var(--ink); border-color: var(--control-line); }
.button:disabled { opacity: .6; cursor: wait; }
.arrow {
  position: relative;
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: 0 0 1em;
}
.arrow::before, .arrow::after { content: ""; position: absolute; }
.arrow::before { inset: calc(50% - .0625em) .13em auto .04em; border-top: .125em solid; }
.arrow::after {
  width: .47em;
  height: .47em;
  right: .14em;
  top: 50%;
  border: solid;
  border-width: .125em .125em 0 0;
  transform: translateY(-50%) rotate(45deg);
}

html:has(#enquiryDialog[open]) { overflow: hidden; }
#enquiryDialog {
  width: min(100% - 2rem, 36rem);
  max-width: none;
  max-height: calc(100dvh - 2rem);
  padding: clamp(1rem, 4.5vw, 2rem);
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: .9rem;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 1.25rem 4rem #142d3840;
}
#enquiryDialog::backdrop { background: #112e3599; }
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .75rem;
  margin-bottom: .85rem;
  border-bottom: 1px solid var(--line);
}
.dialog-header h2 { font: 690 .95rem/1.4 system-ui, sans-serif; letter-spacing: normal; }
.close-button {
  min-height: 2.75rem;
  padding-inline: .8rem;
  border: 1px solid var(--control-line);
  border-radius: .3rem;
  background: transparent;
  color: var(--ink);
  font-size: .88rem;
  font-weight: 650;
}
.close-button:hover { background: var(--selected); }
.close-button:disabled { opacity: .6; cursor: wait; }
.formbrand { display: none; }
.stepmeta { display: flex; justify-content: space-between; gap: 1rem; font-size: .88rem; font-weight: 700; }
#stepLabel { color: var(--teal); font-variant-numeric: tabular-nums; white-space: nowrap; }
progress {
  display: block;
  width: 100%;
  height: .325rem;
  margin: .65rem 0 1.4rem;
  overflow: hidden;
  border: 0;
  border-radius: 1rem;
  background: var(--selected);
  color: var(--teal);
}
progress::-webkit-progress-bar { background: var(--selected); }
progress::-webkit-progress-value { border-radius: 1rem; background: var(--teal); transition: width 220ms ease-out; }
progress::-moz-progress-bar { border-radius: 1rem; background: var(--teal); }
.step h2, #result h2 { font-size: clamp(2.05rem, 3.1vw, 3rem); text-wrap: pretty; }
.step > p, #result > p { margin: .6rem 0; color: var(--muted); }
.step > p, .choice, .field, .consent { overflow-wrap: anywhere; }
fieldset { min-inline-size: 0; display: grid; gap: .48rem; border: 0; margin: 1.05rem 0 0; padding: 0; }
.choice {
  display: flex;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
  min-height: 2.85rem;
  padding: .5rem .78rem;
  border: 1px solid var(--control-line);
  border-radius: .35rem;
  font-size: .96rem;
  line-height: 1.28;
  cursor: pointer;
}
.choice:hover { background: var(--paper); }
.choice:has(input:checked) { background: var(--selected); border-color: var(--teal); }
.choice:has(input:focus-visible) { outline: 3px solid var(--teal); outline-offset: 1px; }
.choice input, .consent input { width: 1.12rem; height: 1.12rem; margin: 0; accent-color: var(--teal); flex: none; }
#debtOptions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#debtOptions .choice:last-child { grid-column: 1 / -1; }
.field { display: grid; gap: .35rem; margin-top: .9rem; font-size: .91rem; font-weight: 670; }
.field input {
  min-width: 0;
  min-height: 2.85rem;
  border: 1px solid var(--control-line);
  border-radius: .35rem;
  background: var(--white);
  color: var(--ink);
  caret-color: var(--teal);
  padding: .58rem .75rem;
  font-size: 1rem;
  font-weight: 400;
}
.field input::placeholder { color: var(--muted); opacity: 1; }
.field input[aria-invalid="true"] { border-color: var(--error); }
.consent { display: flex; align-items: flex-start; gap: .6rem; font-size: .87rem; margin-block: 1.1rem 0; cursor: pointer; }
.consent input { margin-top: .18rem; }
#verificationCode { letter-spacing: .18em; font-variant-numeric: tabular-nums; }
#verificationCode::placeholder { letter-spacing: normal; }
.step > .codehint { margin: .7rem 0 0; padding: .55rem .7rem; background: var(--selected); color: var(--ink); border-radius: .35rem; }
.text-button {
  min-height: 2.75rem;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--teal);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: .18em;
}
.note { font-size: .88rem; }
.actions { display: flex; align-items: stretch; gap: .55rem; margin-top: 1rem; }
.actions .button-primary { flex: 1; justify-content: space-between; text-align: left; }
.error { color: var(--error); font-size: .88rem; font-weight: 630; }
.error:not(:empty) { margin-top: .85rem; }
.underform { margin-top: .85rem; font-size: .82rem; color: var(--muted); }
#result .button { margin-top: .85rem; }

.collection { margin-top: .75rem; border-top: 1px solid var(--line); }
.collection summary { min-height: 2.75rem; padding: .65rem 0; color: var(--teal); font-size: .875rem; font-weight: 650; }
.collection p { margin: 0 0 .65rem; color: var(--muted); font-size: .875rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.screen .site-header, .screen .intro, .screen .dialog-header { display: none; }
.screen main { width: min(100% - 2.5rem, 34rem); }
.screen .reviewbar { border-top: 0; border-bottom: 1px solid var(--line); }
.screen .quiz { padding: 1rem 0 1.8rem; }
.screen .formbrand { display: block; margin-bottom: 1.1rem; }
.screen .formbrand a { display: inline-block; }
.screen .formbrand .brandlogo { width: 10rem; }

@media (max-width: 36rem) {
  .site-header { min-height: 5rem; }
  .site-header .brandlogo { width: 9.8rem; }
  #debtOptions { grid-template-columns: 1fr; }
}
@media (max-width: 23rem) {
  .site-header, main, .screen main { width: calc(100% - 2rem); }
  #enquiryDialog { width: calc(100% - 1rem); max-height: calc(100dvh - 1rem); }
}
@media (prefers-reduced-motion: reduce) {
  progress::-webkit-progress-value { transition: none; }
}
