:root {
  --bg: #ffffff;
  --page: #f6f7f8;
  --panel: #ffffff;
  --ink: #23272b;
  --slate: #303b43;
  --muted: #5c6770;
  --line: #e4e6e8;
  --brand: #a51c30;
  --brand-dark: #8a1727;
  --accent: #a51c30;
  --accent-soft: #fbeaed;
  --success: #1f6b43;
  --shadow: 0 24px 70px rgba(20, 25, 30, 0.10);
  --radius: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Open Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(165, 28, 48, 0.05), transparent 34rem),
    var(--page);
}

strong, b { font-weight: 600; }
h1, h2, h3, h4, h5 { font-weight: 800; }

a { color: inherit; }

img { max-width: 100%; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(40, 31, 21, 0.05);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  text-decoration: none;
}

.brand-logo {
  height: 40px;
  width: auto;
  display: block;
}

.brand-sub {
  align-self: center;
  padding-left: .8rem;
  margin-left: .2rem;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-weight: 600;
  font-size: .92rem;
  letter-spacing: .01em;
}

.main-nav {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.main-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: .65rem .85rem;
  border-radius: 999px;
  font-weight: 600;
  transition: background .18s ease, color .18s ease;
}

.main-nav a:hover {
  background: var(--accent-soft);
  color: var(--ink);
}

.main-nav a.nav-cta {
  background: var(--brand);
  color: #fff;
}

.main-nav a.nav-cta:hover {
  background: #000;
  color: #fff;
}

.hero, .page-hero, .tool-grid, .product-strip, .calculator-layout {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  align-items: center;
  gap: 2rem;
  min-height: 68vh;
  padding: 5rem 0 3rem;
}

.hero-copy h1, .page-hero h1 {
  font-size: clamp(2.2rem, 5.2vw, 4.4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.02em;
  margin: .4rem 0 1.1rem;
}

.page-hero.compact {
  padding: 4rem 0 2rem;
}

.page-hero.compact h1 {
  max-width: 980px;
}

.eyebrow {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: .78rem;
  margin: 0 0 .5rem;
}

.tool-byline {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: -.4rem 0 1.4rem;
  color: var(--muted);
  font-weight: 600;
  font-size: 1.02rem;
}

.tool-byline .byline-logo {
  height: 26px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
}

.lead {
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.55;
  max-width: 780px;
}

.hero-card, .tool-card, .product-strip, .calculator-form, .results-panel {
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(80, 60, 40, .1);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.hero-card {
  padding: 2rem;
}

.hero-card h2 { margin-top: 0; }

.number-list {
  padding-left: 1.3rem;
  color: var(--muted);
  line-height: 1.65;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: 1.6rem;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: .9rem 1.2rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 14px 30px rgba(165, 28, 48, .22);
}

.button.primary:hover {
  background: var(--brand-dark);
}

.button.secondary {
  background: var(--accent-soft);
  color: var(--brand-dark);
}

.button.wide { width: 100%; }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 1rem 0 3rem;
}

.tool-card {
  padding: 2rem;
}

.tool-card h2 { margin-bottom: .5rem; }
.tool-card p { color: var(--muted); line-height: 1.6; }
.tool-card a { font-weight: 800; color: #111; }

.badge {
  display: inline-flex;
  border-radius: 999px;
  background: #111;
  color: #fff;
  padding: .35rem .7rem;
  font-size: .78rem;
  font-weight: 800;
}

.product-strip {
  margin-bottom: 4rem;
  padding: 2rem;
}

.section-heading h2 { margin-top: 0; }

.mini-products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.mini-product {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: .85rem;
  padding: .85rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-decoration: none;
  background: #fff;
}

.mini-product img {
  width: 72px;
  height: 62px;
  object-fit: cover;
  border-radius: 14px;
  background: #f5f5f5;
}

.mini-product span {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.3;
}

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(340px, .8fr);
  align-items: start;
  gap: 1.25rem;
  padding-bottom: 4rem;
}

.calculator-form, .results-panel {
  padding: 1.2rem;
}

.form-section {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.75);
  margin-bottom: 1rem;
}

.form-section h2 {
  margin: 0 0 1rem;
  font-size: 1rem;
}

.form-help {
  margin: -.4rem 0 1rem;
  font-size: .85rem;
  line-height: 1.45;
  color: var(--muted);
  font-weight: 400;
}

label {
  display: grid;
  gap: .45rem;
  font-weight: 600;
  font-size: .9rem;
  color: #35302b;
  margin-bottom: .8rem;
}

input, select, textarea {
  width: 100%;
  border: 1px solid #d8cec1;
  border-radius: 14px;
  padding: .82rem .9rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(184, 132, 77, .15);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.input-grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.selected-product {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1rem;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.selected-product img {
  width: 130px;
  height: 110px;
  object-fit: cover;
  border-radius: 18px;
  background: #f1eee9;
}

.selected-product h2 {
  margin: .1rem 0 .2rem;
  font-size: 1.1rem;
}

.price {
  font-size: 1.25rem;
  font-weight: 900;
  margin: .2rem 0;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  margin: 1rem 0;
}

.kpi {
  padding: 1rem;
  border-radius: 18px;
  background: #111;
  color: #fff;
}

.kpi span {
  display: block;
  color: rgba(255,255,255,.68);
  font-size: .8rem;
  line-height: 1.35;
  min-height: 2.1rem;
}

.kpi strong {
  display: block;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  letter-spacing: -.05em;
  margin-top: .45rem;
}

.comparison-table-wrap, .summary-card, .note-box, .lead-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  margin-top: 1rem;
  background: #fff;
}

.comparison-table-wrap h3, .summary-card h3, .note-box h3, .lead-card h3 {
  margin: 0 0 .7rem;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

.comparison-table th,
.comparison-table td {
  text-align: left;
  padding: .75rem .55rem;
  border-bottom: 1px solid #eee6dc;
  font-size: .92rem;
}

.comparison-table th {
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.highlight-row {
  background: var(--accent-soft);
  font-weight: 800;
}

.note-box {
  background: #f7f8f9;
  border: 1px solid var(--line);
}

.note-box p, .summary-card p, .lead-card p {
  color: var(--muted);
  line-height: 1.55;
}

.lead-card input, .lead-card textarea {
  margin-bottom: .65rem;
}

.site-footer {
  background: var(--slate);
  color: #fff;
}

.site-footer p {
  color: rgba(255,255,255,.68);
  line-height: 1.55;
}

@media (max-width: 900px) {
  .site-header, .site-footer { align-items: flex-start; flex-direction: column; }
  .main-nav { justify-content: flex-start; }
  .hero, .calculator-layout { grid-template-columns: 1fr; }
  .tool-grid, .mini-products { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .input-grid.two, .kpi-grid, .selected-product { grid-template-columns: 1fr; }
  .mini-product { grid-template-columns: 64px 1fr; }
  .mini-product strong { grid-column: 2; }
  .hero-copy h1, .page-hero h1 { font-size: 2.4rem; }
}

/* ============================================================
   Brand re-skin additions: result hero, CTA, slide-in, footer
   ============================================================ */

/* Lead-with-the-answer result hero */
.result-hero {
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  margin-bottom: 1.2rem;
  border: 1px solid var(--line);
}
.result-hero.positive {
  background: linear-gradient(135deg, #fbeaed 0%, #ffffff 70%);
  border-color: #f0c9d0;
}
.result-hero-label {
  margin: 0 0 .25rem;
  color: var(--muted);
  font-weight: 600;
  font-size: .92rem;
}
.result-hero-headline {
  margin: 0 0 .35rem;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--brand);
  letter-spacing: -.01em;
}
.result-hero.neutral .result-hero-headline { color: var(--slate); }
.result-hero-sub {
  margin: 0 0 1.1rem;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.5;
}
.result-hero .button { width: 100%; }

/* Inline quote CTA target card */
.lead-card {
  background: var(--accent-soft);
  border: 1px solid #f0c9d0;
}

/* Trust strip */
.trust-strip {
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.5;
}

/* Quick vs Advanced disclosure */
details.advanced {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  margin-bottom: 1rem;
  padding: 0 1rem;
}
details.advanced > summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 0;
  font-weight: 800;
  color: var(--slate);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
details.advanced > summary::-webkit-details-marker { display: none; }
details.advanced > summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--brand);
}
details.advanced[open] > summary::after { content: "\2212"; }
details.advanced > summary + * { margin-top: 0; }
details.advanced .form-section {
  border: 0;
  background: transparent;
  padding: 0 0 1rem;
}

/* Dismissible slide-in CTA */
.quote-slidein {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: min(340px, calc(100vw - 2rem));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(20, 25, 30, 0.22);
  padding: 1.1rem 1.2rem 1.2rem;
  z-index: 60;
  transform: translateY(140%);
  opacity: 0;
  transition: transform .35s ease, opacity .35s ease;
  border-top: 4px solid var(--brand);
}
.quote-slidein.visible { transform: translateY(0); opacity: 1; }
.quote-slidein-close {
  position: absolute;
  top: .4rem;
  right: .55rem;
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.quote-slidein-title { margin: 0 0 .3rem; font-weight: 800; color: var(--slate); }
.quote-slidein-text { margin: 0 0 .9rem; font-size: .9rem; color: var(--muted); line-height: 1.45; }
.quote-slidein .button { width: 100%; }

/* Rebuilt footer */
.site-footer {
  padding: 2.5rem clamp(1rem, 4vw, 3rem) 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: .02em;
}
.footer-social { display: flex; gap: 1rem; margin-top: .9rem; }
.footer-social a { color: rgba(255,255,255,.85); text-decoration: none; font-weight: 600; font-size: .9rem; }
.footer-social a:hover { color: #fff; }
.footer-col h4, .footer-newsletter h4 {
  color: #fff;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 .9rem;
}
.footer-col { display: flex; flex-direction: column; gap: .55rem; }
.footer-col a { color: rgba(255,255,255,.78); text-decoration: none; font-size: .92rem; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.newsletter-form { display: flex; gap: .5rem; margin-top: .6rem; }
.newsletter-form input {
  flex: 1;
  min-width: 0;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  color: #fff;
  padding: .7rem 1rem;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,.55); }
.newsletter-form .button { min-height: 0; padding: .7rem 1.1rem; white-space: nowrap; }
.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255,255,255,.16);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-bottom a { color: rgba(255,255,255,.85); }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
  .quote-slidein {
    left: 0; right: 0; bottom: 0;
    width: 100%;
    border-radius: 16px 16px 0 0;
    border-bottom: 0;
  }
}
