@font-face {
  font-family: "Fraunces";
  src: url("../fonts/Fraunces-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201D, U+2022, U+2026, U+00D7, U+2212;
}

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/Fraunces-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201D, U+2022, U+2026, U+00D7, U+2212;
}

@font-face {
  font-family: "Outfit";
  src: url("../fonts/Outfit-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201D, U+2022, U+2026, U+00D7, U+2212;
}

@font-face {
  font-family: "Outfit";
  src: url("../fonts/Outfit-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201D, U+2022, U+2026, U+00D7, U+2212;
}

@font-face {
  font-family: "Outfit";
  src: url("../fonts/Outfit-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201D, U+2022, U+2026, U+00D7, U+2212;
}

@font-face {
  font-family: "Outfit";
  src: url("../fonts/Outfit-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201D, U+2022, U+2026, U+00D7, U+2212;
}

:root {
  --ink: #143230;
  --teal: #0D5F5B;
  --action: #1FB6AA;
  --coral: #E45743;
  --gold: #E3BE52;
  --white: #FFFFFF;
  --paper: #F6F0E4;
  --serif: "Fraunces", "Iowan Old Style", Palatino, "Palatino Linotype", "Segoe UI", sans-serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.5;
}

img {
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

p,
h1,
h2,
h3 {
  margin: 0;
}

h1,
h2,
h3,
.range-figure,
.line-range {
  font-family: var(--serif);
}

[hidden] {
  display: none !important;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 5;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 10px;
}

.skip:focus {
  top: 12px;
}

.site-header {
  background: var(--ink);
  color: var(--white);
  border-bottom: 6px solid var(--gold);
}

.header-inner,
.layout,
.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.header-inner {
  padding: 20px 0 24px;
}

.brand-logo {
  display: block;
  width: min(260px, 72vw);
  height: auto;
}

h1 {
  margin-top: 12px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
  color: var(--white);
}

.lede {
  max-width: 40rem;
  margin-top: 10px;
  color: var(--paper);
  font-size: 1.0625rem;
}

.layout {
  padding: 20px 0 12px;
}

.noscript {
  background: var(--white);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 16px;
}

.step {
  background: var(--white);
  border-radius: 18px;
  padding: 18px 16px 16px;
  border: 1px solid rgba(20, 50, 48, 0.08);
  box-shadow: 0 10px 28px rgba(20, 50, 48, 0.05);
}

.step + .step {
  margin-top: 16px;
}

.step-kicker {
  margin-bottom: 4px;
  color: var(--teal);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.step h2,
.result-intro h2 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}

.step label,
.field label {
  display: block;
  margin: 12px 0 8px;
  font-weight: 600;
}

.hint {
  margin-top: 10px;
  color: var(--teal);
  font-size: 0.95rem;
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.stepper button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--action);
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.stepper button:hover {
  background: var(--gold);
}

.stepper button:disabled {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--teal);
  opacity: 1;
  cursor: not-allowed;
}

.stepper input {
  width: 4.75rem;
  height: 44px;
  min-height: 44px;
  padding: 0 8px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.stepper input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.sign-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(20, 50, 48, 0.12);
}

.sign-row label {
  flex: 1 1 10rem;
  min-width: 9rem;
  margin: 0;
}

select,
.lead input,
.lead textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
}

.lead textarea {
  min-height: 112px;
  resize: vertical;
}

.result-panel {
  margin-top: 16px;
  background: var(--ink);
  color: var(--white);
  border-radius: 18px;
  overflow: auto;
  box-shadow: 0 16px 40px rgba(20, 50, 48, 0.16);
}

.ribbon-wrap {
  background: var(--coral);
  padding-top: 4px;
}

.ribbon-text {
  margin: 0;
  padding: 14px 16px;
  background: var(--gold);
  color: var(--ink);
  text-align: center;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.result-panel .step-kicker {
  color: var(--gold);
}

.result-intro {
  padding: 16px 18px 0;
}

.result-intro h2 {
  color: var(--white);
  margin-bottom: 4px;
}

.range-block,
.total-block {
  padding: 12px 18px 0;
}

.total-block {
  margin-top: 8px;
  border-top: 1px solid rgba(227, 190, 82, 0.45);
}

.range-label {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper);
}

.range-figure {
  margin-top: 4px;
  color: var(--gold);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

#line-items {
  padding: 8px 18px 0;
}

.empty-lines {
  color: var(--paper);
}

.line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  row-gap: 2px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.line-name,
.line-meta,
.line-range {
  margin: 0;
}

.line-name {
  font-family: var(--sans);
  font-weight: 600;
}

.line-meta {
  color: var(--paper);
  font-size: 0.92rem;
}

.line-range {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  color: var(--gold);
  font-size: 1.2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.factor-note,
.price-date,
.coast-note {
  padding: 10px 18px 0;
  color: var(--paper);
  font-size: 0.95rem;
}

.coast-note {
  color: var(--gold);
  font-size: 0.88rem;
  line-height: 1.45;
  max-width: 36em;
}

.price-date {
  padding-bottom: 4px;
}

.includes {
  margin: 12px 18px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
}

.includes h3 {
  margin-bottom: 6px;
  font-size: 1.15rem;
  font-weight: 600;
}

.lead {
  padding: 8px 18px 20px;
}

.lead h2 {
  margin: 8px 0;
  color: var(--gold);
  font-size: 1.7rem;
  font-weight: 600;
}

.lead > p {
  margin-bottom: 12px;
  color: var(--paper);
}

.field {
  margin-bottom: 12px;
}

.field label {
  color: var(--white);
}

.optional {
  font-weight: 500;
  color: var(--gold);
}

.lead input,
.lead textarea {
  border-color: var(--gold);
}

.field-error {
  margin-top: 4px;
  color: var(--gold);
  font-size: 0.92rem;
  font-weight: 600;
}

.field-error:empty {
  display: none;
}

.cta {
  appearance: none;
  width: 100%;
  min-height: 56px;
  margin-top: 4px;
  padding: 14px 16px 18px;
  border: 0;
  border-radius: 14px;
  background-color: var(--ink);
  background-image: linear-gradient(var(--coral), var(--coral));
  background-size: 100% 8px;
  background-repeat: no-repeat;
  background-position: bottom;
  box-shadow: inset 0 0 0 3px var(--coral);
  color: var(--white);
  font-weight: 700;
  font-size: 1.0625rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.cta:hover {
  background-color: var(--teal);
}

.thanks {
  padding: 4px 18px 22px;
}

.thanks h3 {
  color: var(--gold);
  font-size: 1.7rem;
  font-weight: 600;
}

.thanks p {
  margin-top: 8px;
  color: var(--paper);
}

.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-footer {
  padding: 12px 0 32px;
  color: var(--teal);
  font-size: 0.95rem;
}

.footer-logo {
  display: block;
  width: 180px;
  height: auto;
  margin-bottom: 8px;
}

.site-footer p + p {
  margin-top: 2px;
}

.site-footer a {
  color: var(--ink);
  font-weight: 600;
}

.result-panel :focus-visible {
  outline-color: var(--gold);
}

@media (min-width: 900px) {
  .header-inner {
    padding-top: 28px;
    padding-bottom: 32px;
  }

  .layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 28px;
    align-items: start;
    padding-top: 28px;
  }

  .result-panel {
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    margin-top: 0;
  }
}

@media (max-width: 899px) and (max-height: 1100px) {
  body {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .site-header {
    flex: none;
  }

  .header-inner {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  h1 {
    font-size: 1.85rem;
  }

  .lede {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .layout {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0;
  }

  .inputs {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 12px 16px;
  }

  .result-panel {
    flex: 0 0 auto;
    max-height: 46vh;
    margin-top: 0;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -10px 28px rgba(20, 50, 48, 0.2);
  }

  .site-footer {
    width: auto;
    flex: none;
    margin: 0;
    padding: 8px 16px 10px;
  }

  .footer-logo {
    display: none;
  }

  .site-footer p {
    display: inline;
    margin-right: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
