:root {
  --bg: #f4efe5;
  --paper: rgba(255, 251, 244, 0.9);
  --paper-strong: #fffaf2;
  --ink: #1d2d35;
  --muted: #596870;
  --line: rgba(29, 45, 53, 0.14);
  --navy: #183849;
  --navy-soft: #284d60;
  --sage: #76936c;
  --sage-soft: #dbe4d4;
  --gold: #d2b56d;
  --link: #236476;
  --link-hover: #173f4d;
  --link-on-dark: #f1cf72;
  --link-on-dark-hover: #fff0b8;
  --danger: #a24a3a;
  --success: #2f6b53;
  --shadow: 0 24px 60px rgba(24, 56, 73, 0.14);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(210, 181, 109, 0.28), transparent 28%),
    radial-gradient(circle at top right, rgba(118, 147, 108, 0.2), transparent 24%),
    linear-gradient(180deg, #f7f1e8 0%, #efe6d8 100%);
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(24, 56, 73, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 56, 73, 0.025) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 85%);
}

a {
  color: var(--link);
  font-weight: 700;
  text-decoration-color: rgba(35, 100, 118, 0.42);
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.18em;
  transition: color 140ms ease, text-decoration-color 140ms ease;
}

a:hover,
a:focus-visible {
  color: var(--link-hover);
  text-decoration-color: currentColor;
}

.hero-card a,
.on-dark a,
a.link-on-dark {
  color: var(--link-on-dark);
  text-decoration-color: rgba(241, 207, 114, 0.52);
}

.hero-card a:hover,
.hero-card a:focus-visible,
.on-dark a:hover,
.on-dark a:focus-visible,
a.link-on-dark:hover,
a.link-on-dark:focus-visible {
  color: var(--link-on-dark-hover);
  text-decoration-color: currentColor;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.82);
  box-shadow: 0 14px 36px rgba(24, 56, 73, 0.08);
}

.site-nav div {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.brand-mark {
  color: var(--navy);
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: 1.25rem;
  font-weight: 900;
  text-decoration: none;
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 24px;
  margin-bottom: 28px;
}

.home-hero h1 {
  max-width: 13ch;
}

.hero-copy,
.hero-card,
.panel {
  background: var(--paper);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 40px;
}

.eyebrow,
.step-tag {
  margin: 0 0 8px;
  color: var(--navy-soft);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 700;
}

.hero h1,
.panel h2,
.comp-section h3 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  line-height: 1.05;
}

.hero h1 {
  font-size: clamp(2.4rem, 4vw, 4.6rem);
  max-width: 12ch;
}

.lede {
  margin: 18px 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.1rem;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 24px;
}

.hero-points span,
.inline-note,
.match-card small,
.badge {
  border-radius: 999px;
  background: rgba(24, 56, 73, 0.07);
  color: var(--navy);
  padding: 8px 12px;
  font-size: 0.94rem;
}

.value-mode {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.value-mode--compact {
  display: none;
}

.value-mode__label {
  font-weight: 600;
}

.value-mode__options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice-pill {
  position: relative;
  display: inline-flex;
}

.choice-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-pill span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid rgba(24, 56, 73, 0.14);
  background: #fffdf8;
  color: var(--navy);
  padding: 11px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.choice-pill input:checked + span {
  background: rgba(24, 56, 73, 0.1);
  border-color: rgba(24, 56, 73, 0.38);
  transform: translateY(-1px);
}

.hero-note {
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 250, 242, 0.95), rgba(233, 239, 227, 0.95));
  border: 1px solid rgba(118, 147, 108, 0.24);
}

.hero-card {
  padding: 28px;
  align-self: stretch;
  background:
    linear-gradient(180deg, rgba(24, 56, 73, 0.95), rgba(27, 48, 59, 0.98)),
    var(--navy);
  color: #f7f3eb;
}

.hero-card h2 {
  font-size: 1.8rem;
}

.hero-card p,
.hero-card li {
  color: rgba(247, 243, 235, 0.86);
}

.hero-card ul {
  margin: 18px 0 0;
  padding-left: 18px;
}

.main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.panel {
  padding: 28px;
}

.panel-header {
  margin-bottom: 20px;
}

.panel-header p {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 66ch;
}

.stack {
  display: flex;
  flex-direction: column;
}

.gap-m {
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field span,
.checkbox span {
  font-weight: 600;
}

input {
  width: 100%;
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid rgba(24, 56, 73, 0.16);
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

input:focus {
  outline: none;
  border-color: rgba(24, 56, 73, 0.5);
  box-shadow: 0 0 0 4px rgba(24, 56, 73, 0.08);
  transform: translateY(-1px);
}

.autocomplete-field {
  position: relative;
}

.county-results {
  position: absolute;
  z-index: 10;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 290px;
  overflow: auto;
  border: 1px solid rgba(210, 181, 109, 0.45);
  border-radius: 18px;
  background: #fffaf2;
  box-shadow: 0 18px 40px rgba(24, 56, 73, 0.2);
}

.county-results button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid rgba(24, 56, 73, 0.08);
  background: transparent;
  color: var(--ink);
  padding: 13px 14px;
  text-align: left;
  cursor: pointer;
}

.county-results button:hover,
.county-results button:focus-visible {
  background: rgba(219, 228, 212, 0.55);
}

.county-results button span {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--navy), var(--navy-soft));
  color: white;
  padding: 14px 20px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
  box-shadow: 0 16px 32px rgba(24, 56, 73, 0.16);
}

.button:hover,
.button:focus-visible {
  color: white;
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.button-secondary {
  background: linear-gradient(135deg, #315f4c, #567d59);
}

.estimate-progress {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(49, 95, 76, 0.2);
  border-radius: 20px;
  background:
    radial-gradient(circle at 12% 0%, rgba(210, 181, 109, 0.22), transparent 30%),
    linear-gradient(135deg, rgba(255, 253, 248, 0.94), rgba(232, 239, 226, 0.82));
  box-shadow: 0 18px 42px rgba(24, 56, 73, 0.1);
}

.estimate-progress::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.52) 45%, transparent 72%);
  transform: translateX(-100%);
  animation: progress-sheen 2.4s ease-in-out infinite;
  pointer-events: none;
}

.estimate-progress__topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  color: var(--navy);
  font-weight: 800;
}

.estimate-progress__topline span {
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.estimate-progress__track {
  height: 13px;
  margin: 14px 0 12px;
  border-radius: 999px;
  background: rgba(24, 56, 73, 0.1);
  overflow: hidden;
}

.estimate-progress__bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #315f4c, #d2b56d, #387084);
  transition: width 520ms ease;
}

.estimate-progress p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--muted);
}

@keyframes progress-sheen {
  0% {
    transform: translateX(-100%);
  }
  48%,
  100% {
    transform: translateX(100%);
  }
}

.feedback {
  min-height: 1.2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.feedback.error {
  color: var(--danger);
}

.feedback.success {
  color: var(--success);
}

.hero-card .feedback.success,
.on-dark .feedback.success {
  color: #9ad8a8;
}

.hero-card .feedback.error,
.on-dark .feedback.error {
  color: #f3b4a8;
}

.hidden {
  display: none !important;
}

.download-thanks {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid rgba(47, 107, 83, 0.24);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(210, 181, 109, 0.28), transparent 36%),
    linear-gradient(135deg, rgba(255, 250, 242, 0.96), rgba(219, 228, 212, 0.74));
}

.download-thanks h3 {
  margin: 0 0 10px;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: 1.55rem;
  line-height: 1.15;
}

.download-thanks p {
  margin: 10px 0 0;
}

.support-grid,
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.support-card,
.process-grid article,
.article-card {
  display: block;
  min-height: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 250, 242, 0.96), rgba(219, 228, 212, 0.55));
  text-decoration: none;
}

.support-card--live {
  background: linear-gradient(135deg, rgba(47, 107, 83, 0.16), rgba(210, 181, 109, 0.2));
}

.support-card span,
.process-grid span {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--navy-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.support-card strong,
.process-grid h3 {
  display: block;
  margin: 0 0 8px;
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: 1.25rem;
  line-height: 1.15;
}

.support-card small,
.process-grid p,
.article-card p {
  color: var(--muted);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
}

.article-body h1 {
  margin: 0 0 18px;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1.05;
}

.article-body h2,
.article-card h2 {
  margin: 24px 0 8px;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
}

.article-card h2:first-child {
  margin-top: 0;
}

.article-body p,
.article-body li {
  color: var(--muted);
  font-size: 1.05rem;
}

.directory-list {
  columns: 2;
  column-gap: 34px;
}

.directory-list li {
  break-inside: avoid;
  margin-bottom: 8px;
}

.inline-button {
  display: inline-flex;
  color: white;
  text-decoration: none;
}

.inline-button:hover,
.inline-button:focus-visible {
  color: white;
}

.match-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.match-card,
.property-summary,
.results-summary,
.disclaimer-box {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper-strong);
}

.match-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
}

.match-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.match-action {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 190px;
}

.match-progress {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: min(190px, 100%);
  color: var(--navy-soft);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
}

.match-progress__bar {
  position: relative;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(24, 56, 73, 0.12);
}

.match-progress__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 46%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sage), var(--gold));
  animation: progress-sheen 1.15s ease-in-out infinite;
}

.ghost-button {
  appearance: none;
  border: 1px solid rgba(24, 56, 73, 0.14);
  background: white;
  color: var(--navy);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.property-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 20px;
  margin-bottom: 18px;
}

.summary-item {
  padding: 14px;
  border-radius: 16px;
  background: rgba(24, 56, 73, 0.04);
}

.summary-item label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.summary-item strong {
  font-size: 1.1rem;
}

.savings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.savings-card {
  padding: 18px;
  border-radius: 22px;
  color: white;
  overflow: hidden;
  position: relative;
}

.savings-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -35% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.savings-card.low {
  background: linear-gradient(135deg, #74613a, #b0914a);
}

.savings-card.mid {
  background: linear-gradient(135deg, #255564, #387084);
}

.savings-card.high {
  background: linear-gradient(135deg, #315b45, #4e8762);
}

.savings-card p,
.savings-card h3 {
  position: relative;
  z-index: 1;
  margin: 0;
}

.savings-card p {
  opacity: 0.9;
  margin-bottom: 10px;
}

.savings-card h3 {
  font-size: 2rem;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
}

.results-summary,
.disclaimer-box {
  padding: 18px 20px;
}

.estimate-methodology summary {
  color: var(--navy);
  cursor: pointer;
  font-weight: 500;
  list-style: none;
}

.estimate-methodology summary::-webkit-details-marker {
  display: none;
}

.estimate-methodology summary::after {
  content: "+";
  float: right;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(24, 56, 73, 0.08);
  color: var(--navy);
  text-align: center;
  line-height: 28px;
}

.estimate-methodology[open] summary::after {
  content: "-";
}

.estimate-methodology p {
  margin: 12px 0 0;
}

.recommendation-box {
  padding: 18px 20px;
  border-radius: 20px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
}

.recommendation-box h3,
.recommendation-box p {
  margin: 0;
}

.recommendation-box h3 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.recommendation-box__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.recommendation-box--strong {
  background: linear-gradient(135deg, rgba(79, 135, 98, 0.12), rgba(219, 228, 212, 0.8));
}

.recommendation-box--medium {
  background: linear-gradient(135deg, rgba(24, 56, 73, 0.08), rgba(255, 250, 242, 0.92));
}

.recommendation-box--light {
  background: linear-gradient(135deg, rgba(210, 181, 109, 0.14), rgba(255, 250, 242, 0.92));
}

.appeal-case {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(47, 107, 83, 0.22);
  border-radius: 20px;
  background: rgba(219, 228, 212, 0.5);
}

.appeal-case div {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.82);
}

.appeal-case span,
.appeal-case small {
  display: block;
  color: var(--muted);
}

.appeal-case span {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.appeal-case strong {
  display: block;
  margin: 4px 0;
  font-size: 1.6rem;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
}

.appeal-case p {
  grid-column: 1 / -1;
  margin: 0;
}

.comp-section {
  margin-top: 18px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(24, 56, 73, 0.08);
}

th {
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

tbody tr:last-child td {
  border-bottom: 0;
}

td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.subject-divider-row td {
  padding: 12px 16px;
  border-top: 2px solid rgba(24, 56, 73, 0.16);
  background: #f0e4c2;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.subject-property-row td {
  background: rgba(219, 228, 212, 0.34);
  font-weight: 700;
}

.checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.checkbox input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.95em;
}

.admin-shell .admin-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.admin-hero h1 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1.05;
}

.admin-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-actions .ghost-button {
  text-decoration: none;
  background: #fffdf8;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255, 250, 242, 0.96), rgba(219, 228, 212, 0.62));
  box-shadow: 0 14px 34px rgba(24, 56, 73, 0.08);
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: 1.5rem;
  line-height: 1.1;
}

.admin-section {
  margin-top: 26px;
}

.admin-section h3 {
  margin: 0 0 12px;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: 1.5rem;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .savings-grid,
  .property-summary,
  .appeal-case,
  .stats-grid,
  .support-grid,
  .process-grid,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .admin-shell .admin-hero {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  .hero-copy,
  .hero-card,
  .panel {
    padding: 22px;
  }

  .hero h1 {
    font-size: 2.4rem;
  }

  .match-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .match-action {
    justify-items: stretch;
    width: 100%;
  }

  .directory-list {
    columns: 1;
  }
}
