/* Sage KC automated savings estimate — Ink & Brass */
:root {
  --ink: #10181D;
  --ink-deep: #0B0E11;
  --cream: #F8F5ED;
  --white: #FFFFFF;
  --on-dark: #EDE8DD;
  --on-dark-soft: rgba(237, 232, 221, .78);
  --on-light: #17191C;
  --muted: #6B6B66;
  --brass: #B8945A;
  --brass-ink: #6F5328;
  --focus-light: #6F5328;
  --focus-dark: #D6B77F;
  --line: #E3DDD1;
  --line-dark: rgba(237, 232, 221, .14);
  --danger: #9A3D2F;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--on-light); font-family: var(--sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 500; }
.skip-link { position: fixed; z-index: 50; top: 10px; left: 10px; padding: 10px 14px; background: var(--cream); border: 1px solid var(--brass); color: var(--on-light); font-weight: 600; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
:focus-visible { outline: 3px solid var(--focus-light); outline-offset: 3px; }
.report-header :focus-visible { outline-color: var(--focus-dark); }

.report-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; padding: 0 max(20px, calc((100% - 1200px) / 2)); background: var(--ink); color: var(--on-dark); border-bottom: 1px solid var(--line-dark); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; font: 600 28px/1 var(--serif); text-decoration: none; white-space: nowrap; }
.brand svg { width: 26px; height: 26px; flex: none; }
.header-actions { display: flex; align-items: center; gap: 24px; }
.header-actions a { font-size: 15px; font-weight: 500; text-decoration: none; color: var(--on-dark); font-variant-numeric: tabular-nums; white-space: nowrap; }
.header-actions a:first-child { padding: 11px 18px; border: 1px solid var(--brass); border-radius: 2px; }
.header-actions a:first-child:hover { background: rgba(184, 148, 90, .14); }

.report-hero { width: min(900px, calc(100% - 40px)); margin: 72px auto 64px; text-align: center; }
.eyebrow { display: block; margin: 0 0 18px; color: var(--brass-ink); font: 600 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.report-hero h1 { font-size: clamp(50px, 6.4vw, 92px); line-height: .98; letter-spacing: -.01em; text-wrap: balance; }
.report-hero > p { max-width: 62ch; margin: 26px auto 0; color: var(--muted); font-size: 18px; line-height: 1.6; }
.report-hero ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 32px; margin: 30px auto 0; padding: 24px 0 0; border-top: 1px solid var(--line); list-style: none; color: var(--muted); font-size: 14px; }
.report-hero li { display: flex; align-items: center; gap: 10px; }
.report-hero li::before { content: ""; width: 14px; height: 1px; background: var(--brass); }

.tool-shell, .report-results { width: min(1030px, calc(100% - 40px)); margin: 0 auto 96px; }
.tool-shell { display: grid; grid-template-columns: .65fr 1.35fr; gap: 56px; align-items: start; padding: 56px; border: 1px solid var(--line); border-top: 1px solid var(--brass); background: var(--white); }
.step { display: block; margin-bottom: 16px; color: var(--brass-ink); font: 600 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.tool-intro h2, .result-heading h2 { font-size: clamp(34px, 4vw, 50px); line-height: 1.04; letter-spacing: -.01em; text-wrap: balance; }
.tool-intro p { margin: 16px 0 0; color: var(--muted); }
.primary-button, .secondary-button { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; gap: 10px; padding: 15px 26px; border: 1px solid var(--ink); border-radius: 2px; background: var(--ink); color: var(--on-dark); font: 500 15px/1 var(--sans); letter-spacing: .01em; text-decoration: none; cursor: pointer; transition: background .2s, color .2s; }
.primary-button:hover { background: #23292F; }
.primary-button:disabled { cursor: not-allowed; opacity: .5; }
.secondary-button { border-color: var(--brass); background: transparent; color: var(--on-light); }
.secondary-button:hover { background: rgba(184, 148, 90, .12); }
.status { min-height: 20px; margin: 14px 0; color: var(--brass-ink); font-size: 14px; font-weight: 500; }
.status.is-error { color: var(--danger); }
.text-button { border: 0; background: transparent; color: var(--on-light); font: 500 14px var(--sans); cursor: pointer; }
.text-button { padding: 12px; border-bottom: 1px solid var(--brass); }

.manual-card { min-width: 0; }
.manual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px; }
.manual-field { display: flex; flex-direction: column; gap: 8px; }
.manual-field label { color: var(--muted); font: 500 13px var(--sans); letter-spacing: .04em; }
.manual-field input, .manual-field select { width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--on-light); font: 400 17px var(--sans); font-variant-numeric: tabular-nums; }
.manual-field input::placeholder { color: #A9A59C; }
.manual-field input:focus, .manual-field select:focus { border-bottom-color: var(--brass-ink); }
.manual-field input:focus-visible, .manual-field select:focus-visible { outline: 3px solid var(--focus-light); outline-offset: 4px; }
.manual-guide { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.6; }
.manual-guide summary { color: var(--brass-ink); font-weight: 500; cursor: pointer; }
.manual-guide > p { margin: 12px 0 0; }
.guide-table-wrap { margin-top: 12px; overflow-x: auto; }
.manual-guide table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 13px; }
.manual-guide th, .manual-guide td { padding: 10px 12px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.manual-guide thead th { border-top: 0; color: var(--on-light); font: 600 11px/1.4 var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.manual-guide tbody th { width: 32%; color: var(--on-light); font-weight: 500; white-space: nowrap; }
.manual-guide tbody td { color: var(--muted); }
.manual-rate { margin: 24px 0; padding: 18px 20px; border: 1px solid var(--line); background: var(--cream); color: var(--muted); font-size: 15px; line-height: 1.5; }
.manual-rate strong { display: block; margin-bottom: 6px; color: var(--on-light); font: 600 30px/1 var(--serif); }
.manual-note { margin: 16px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.print-only { display: none; }
.report-results { padding-top: 12px; }
.result-heading { display: grid; grid-template-columns: 1fr; margin-bottom: 36px; padding-top: 24px; border-top: 1px solid var(--brass); }
.result-heading > div:first-child > p:last-child { max-width: 64ch; margin: 16px 0 0; color: var(--muted); }
.recommendation-badge { display: inline-block; margin: 0 0 14px; padding: 6px 12px; border: 1px solid var(--brass); border-radius: 999px; color: var(--brass-ink); font: 600 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.recommendation-badge:empty { display: none; }
.recommendation-badge.stay { border-color: var(--line); color: var(--muted); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.metric-grid article { min-height: 150px; padding: 22px; border: 1px solid var(--line); background: var(--white); }
.metric-grid span, .metric-grid small { display: block; color: var(--muted); font-size: 13px; }
.metric-grid strong { display: block; margin: 22px 0 6px; font-size: 30px; font-weight: 500; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.metric-grid .savings-metric { border-top: 2px solid var(--brass); }
.metric-grid .savings-metric strong { font: 600 44px/1 var(--serif); color: var(--brass-ink); }
.comparison-card { margin-top: 12px; padding: 32px; background: var(--ink); color: var(--on-dark); }
.comparison-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line-dark); }
.comparison-heading h3 { font-size: 30px; line-height: 1; }
.comparison-heading p { margin: 0; color: var(--on-dark-soft); font-size: 13px; }
.bar-row { display: grid; grid-template-columns: 90px 1fr 100px; gap: 16px; align-items: center; margin: 16px 0; font-size: 14px; }
.bar-row strong { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.bar-track { height: 12px; overflow: hidden; background: rgba(237, 232, 221, .12); }
.bar { display: block; height: 100%; }
.current-bar { width: 100%; background: var(--on-dark); }
.proposed-bar { background: var(--brass); }
.range { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--line-dark); color: var(--on-dark-soft); font-size: 13px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.detail-card { padding: 30px; border: 1px solid var(--line); background: var(--white); }
.detail-card h3 { margin: 0 0 18px; font-size: 28px; line-height: 1.1; }
.detail-card dl { margin: 0; }
.detail-card dl div { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-top: 1px solid var(--line); font-size: 14px; }
.detail-card dt { color: var(--muted); }
.detail-card dd { margin: 0; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.assumptions { margin-top: 12px; padding: 30px; border: 1px solid var(--line); background: var(--cream); }
.assumptions h3 { font-size: 28px; line-height: 1.1; }
.assumptions ul { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 30px; margin: 18px 0 0; padding-left: 20px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.assumptions > p { margin: 20px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 24px; }
.follow-up-availability { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.follow-up-fallback { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.follow-up-fallback a { color: var(--brass-ink); font-weight: 500; }
.follow-up { margin-top: 20px; padding: 32px; border: 1px solid var(--line); border-top: 2px solid var(--brass); background: var(--white); }
.follow-up-heading { display: flex; justify-content: space-between; gap: 28px; align-items: start; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.follow-up-heading .eyebrow { margin-bottom: 12px; }
.follow-up-heading h3 { font-size: 32px; line-height: 1.05; }
.follow-up-heading p:last-child { max-width: 58ch; margin: 12px 0 0; color: var(--muted); }
.follow-up-close { flex: none; margin: 0; }
.follow-up-form { margin-top: 24px; }
.follow-up-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px; }
.follow-up-field { display: flex; flex-direction: column; gap: 8px; }
.follow-up-field-wide { grid-column: 1 / -1; }
.follow-up-field label { color: var(--muted); font: 500 13px var(--sans); letter-spacing: .04em; }
.follow-up-field .optional { font-weight: 400; letter-spacing: 0; }
.follow-up-field input, .follow-up-field textarea { width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--on-light); font: 400 16px/1.5 var(--sans); }
.follow-up-field textarea { min-height: 82px; resize: vertical; }
.follow-up-field input:focus, .follow-up-field textarea:focus { border-bottom-color: var(--brass-ink); }
.follow-up-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.follow-up-check input { width: 18px; height: 18px; flex: none; margin: 2px 0 0; accent-color: var(--brass-ink); }
.follow-up-spam { min-height: 65px; margin-top: 20px; }
.follow-up-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 22px; }
.follow-up-actions > div { min-width: 0; }
.follow-up-status { margin: 0; color: var(--brass-ink); font-size: 14px; font-weight: 500; }
.follow-up-status.is-error { color: var(--danger); }
.contact-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.text-button { margin-left: auto; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding: 28px max(20px, calc((100% - 1200px) / 2)); background: var(--ink-deep); color: rgba(237, 232, 221, .6); font-size: 13px; }

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

@media (max-width: 800px) {
  .tool-shell { grid-template-columns: 1fr; gap: 36px; padding: 36px 28px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .header-actions a:first-child { display: none; }
  .assumptions ul { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .guide-table-wrap { overflow-x: visible; }
  .manual-guide table { min-width: 0; }
  .manual-guide table, .manual-guide thead, .manual-guide tbody, .manual-guide tr, .manual-guide th, .manual-guide td { display: block; width: auto; }
  .manual-guide thead { display: none; }
  .manual-guide tbody tr { padding: 10px 0; border-top: 1px solid var(--line); }
  .manual-guide tbody tr:first-child { border-top: 0; }
  .manual-guide th, .manual-guide td { padding: 2px 0; border-top: 0; white-space: normal; }
  .manual-guide tbody th { margin-top: 6px; }
}
@media (max-width: 500px) {
  .report-header { min-height: 68px; }
  .brand { font-size: 24px; }
  .header-actions { gap: 12px; }
  .report-hero { margin: 44px auto 48px; }
  .report-hero h1 { font-size: 46px; }
  .tool-shell, .report-results { width: calc(100% - 24px); margin-bottom: 64px; }
  .tool-shell { padding: 28px 18px; }
  .metric-grid, .manual-grid, .follow-up-grid { grid-template-columns: 1fr; }
  .follow-up-field-wide { grid-column: auto; }
  .bar-row { grid-template-columns: 64px 1fr 76px; gap: 8px; }
  .comparison-card, .detail-card, .assumptions, .follow-up { padding: 22px 18px; }
  .follow-up-heading { gap: 16px; }
  .result-actions > *, .follow-up-actions > .primary-button { width: 100%; margin: 0; }
  .text-button { margin: 0; }
  footer { flex-direction: column; }
}
