:root {
  --bg: #0b1020;
  --bg-2: #0f172b;
  --panel: rgba(17, 24, 39, 0.88);
  --panel-2: rgba(21, 30, 51, 0.95);
  --line: rgba(255, 255, 255, 0.10);
  --text: #eef2ff;
  --muted: #b4bfd8;
  --accent: #f6c85f;
  --accent-2: #ff7a59;
  --accent-3: #76d0a3;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(246, 200, 95, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 122, 89, 0.14), transparent 28%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  font: 16px/1.6 "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover { text-decoration: underline; }

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 85%);
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  padding: 28px 0 24px;
}

.topline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.page-topline {
  justify-content: space-between;
  flex-wrap: wrap;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: var(--muted);
  font-size: 14px;
}

.site-nav a {
  white-space: nowrap;
}

.brand {
  font: 700 14px/1 "Georgia", serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.pill,
.button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 20px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.card {
  background: linear-gradient(180deg, var(--panel), rgba(11, 16, 32, 0.92));
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 34px;
}

.hero-panel {
  padding: 22px;
  display: grid;
  gap: 14px;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

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

h1,
h2 {
  font-family: "Georgia", "Times New Roman", serif;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

h1 { font-size: clamp(42px, 7vw, 78px); max-width: 12ch; }
h2 { font-size: clamp(28px, 4vw, 44px); max-width: 18ch; }
h3 { font-size: 20px; margin-bottom: 8px; }

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

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.cta-row.subtle {
  margin-top: 14px;
  font-size: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

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

.button-primary {
  background: linear-gradient(135deg, var(--accent), #ffe29b);
  color: #141414;
  border-color: rgba(255, 255, 255, 0.15);
  font-weight: 700;
}

.button-secondary {
  color: var(--text);
}

.stat {
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
}

.stat-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.stat strong {
  font-size: 18px;
  line-height: 1.3;
}

main {
  padding-bottom: 36px;
}

.section {
  margin-top: 28px;
}

.section-head {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 16px;
  align-items: stretch;
}

.band-callout,
.band-quote {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.band-quote {
  display: flex;
  align-items: center;
}

.band-quote p {
  color: var(--muted);
  font-size: 18px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.card {
  padding: 20px;
}

.card p,
.prose li {
  color: var(--muted);
}

.card-meta {
  display: inline-block;
  margin-top: 14px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.link-card {
  display: block;
  transition: transform 160ms ease, border-color 160ms ease;
}

.link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(246, 200, 95, 0.45);
  text-decoration: none;
}

.prose ul {
  margin: 14px 0 0;
  padding-left: 18px;
}

.prose li + li {
  margin-top: 8px;
}

.case-study-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}

.case-study ul {
  margin: 0;
  padding-left: 18px;
}

.case-study li + li {
  margin-top: 10px;
}

.button-inline {
  white-space: nowrap;
}

.contact {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

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

.page-panel {
  gap: 12px;
}

.page-panel .stat strong {
  font-size: 17px;
}

.page-card-list {
  display: grid;
  gap: 12px;
}

.page-card-list .card {
  padding: 18px;
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.price-card {
  display: grid;
  gap: 10px;
}

.price-value {
  font-size: 34px;
  line-height: 1;
  font-family: "Georgia", "Times New Roman", serif;
  letter-spacing: -0.03em;
}

.page-note {
  color: var(--muted);
  font-size: 14px;
}

.section-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.section-list li + li {
  margin-top: 8px;
}

.callout-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cta-stack {
  display: grid;
  gap: 10px;
  min-width: 220px;
}

.footer {
  padding: 24px 0 40px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

@media (max-width: 960px) {
  .intro-band,
  .hero-grid,
  .grid.three,
  .grid.four,
  .split,
  .contact {
    grid-template-columns: 1fr;
    display: grid;
  }

  .hero-copy {
    padding: 24px;
  }

  h1 { max-width: none; }

  .case-study-head {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 24px, 1180px);
  }

  .topline,
  .cta-row,
  .site-nav,
  .callout-row,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .pill,
  .button {
    width: 100%;
  }

  .hero-copy,
  .hero-panel,
  .card {
    border-radius: 18px;
  }

  .price-grid {
    grid-template-columns: 1fr;
  }
}

.historical-comps-page {
  --bg: #07101a;
  --bg-2: #0b1724;
  --panel: rgba(8, 19, 31, 0.90);
  --panel-2: rgba(12, 24, 38, 0.96);
  --line: rgba(164, 208, 255, 0.14);
  --text: #eef6ff;
  --muted: #b7c7d9;
  --accent: #74d7c5;
  --accent-2: #8bb4ff;
  --accent-3: #f6c85f;
}

.historical-comps-page body,
body.historical-comps-page {
  background:
    radial-gradient(circle at top left, rgba(116, 215, 197, 0.16), transparent 26%),
    radial-gradient(circle at top right, rgba(139, 180, 255, 0.16), transparent 30%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}

.comp-hero-copy h1 {
  max-width: 11ch;
}

.comp-shell {
  padding-bottom: 48px;
}

.comp-hero .pill {
  background: rgba(255, 255, 255, 0.06);
}

.comp-panel .stat strong {
  font-size: 17px;
}

.compact {
  max-width: 56ch;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.filter-group {
  display: grid;
  gap: 8px;
}

.filter-actions {
  align-content: end;
}

.search-grid,
.comp-layout {
  display: grid;
  gap: 16px;
}

.search-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.comp-layout {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: start;
}

.search-card,
.access-card,
.results-card,
.detail-card {
  overflow: hidden;
}

.field-label {
  display: block;
  margin: 18px 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--accent);
}

.input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.text-input {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 12px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
  outline: none;
}

.text-input::placeholder {
  color: rgba(238, 246, 255, 0.50);
}

.text-input:focus {
  border-color: rgba(116, 215, 197, 0.65);
  box-shadow: 0 0 0 4px rgba(116, 215, 197, 0.15);
}

.inline-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

.compact-head {
  margin-bottom: 12px;
}

.results-list,
.detail-state {
  min-height: 320px;
}

.match-card {
  width: 100%;
  text-align: left;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025));
  color: var(--text);
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
  cursor: pointer;
}

.match-card + .match-card {
  margin-top: 12px;
}

.match-card:hover {
  transform: translateY(-1px);
  border-color: rgba(116, 215, 197, 0.45);
}

.match-head {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: start;
}

.match-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.match-index,
.detail-subtitle,
.match-meta,
.comp-body span,
.comp-metrics,
.comp-list-header {
  color: var(--muted);
}

.match-index {
  margin-bottom: 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.match-head h3,
.detail-header h3 {
  font-family: "Georgia", "Times New Roman", serif;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 6px;
}

.match-lock,
.detail-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
}

.match-preview,
.detail-meta {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.match-preview {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  font-size: 14px;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 12px;
}

.detail-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.detail-link,
.match-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.detail-link:hover,
.match-link:hover {
  text-decoration: none;
  border-color: rgba(116, 215, 197, 0.45);
}

.detail-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.detail-meta div,
.comp-list-wrap {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.detail-meta span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}

.detail-meta strong {
  font-size: 18px;
}

.filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(116, 215, 197, 0.25);
  background: rgba(116, 215, 197, 0.08);
  color: var(--text);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.filter-chip.muted {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.lock-banner {
  padding: 14px;
  margin-bottom: 14px;
  border-radius: 16px;
  border: 1px solid rgba(116, 215, 197, 0.35);
  background: rgba(116, 215, 197, 0.08);
  color: var(--text);
}

.comp-list-wrap {
  margin-top: 14px;
}

.comp-list-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.comp-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comp-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.comp-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.comp-rank {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
}

.comp-body {
  display: grid;
  gap: 4px;
}

.comp-metrics {
  display: grid;
  justify-items: end;
  gap: 2px;
  font-size: 13px;
}

.empty-state {
  min-height: 140px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  padding: 24px;
  text-align: center;
}

@media (max-width: 960px) {
  .search-grid,
  .comp-layout {
    grid-template-columns: 1fr;
  }

  .filters-grid {
    grid-template-columns: 1fr;
  }

  .detail-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .match-head,
  .detail-header,
  .comp-list-header,
  .comp-item {
    grid-template-columns: 1fr;
    display: grid;
  }

  .match-actions,
  .detail-actions {
    justify-items: start;
  }

  .match-preview {
    grid-template-columns: 1fr;
  }
}
