:root {
  --bg: #FBF8F2;
  --ink: #1B1B18;
  --navy: #16233D;
  --amber: #F2A93B;
  --amber-hover: #D98A1D;
  --green: #1F7A54;
  --green-bg: #E7F3EC;
  --border: #E4DFD3;
  --muted: #6B6A64;
  --muted2: #9A9890;
  --chip-bg: #F1ECE0;
  --card-bg: #FFFFFF;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Public Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
}

h1, h2, h3 { font-family: 'Fraunces', serif; margin: 0; }
a { text-decoration: none; color: inherit; }
button { font-family: 'Public Sans', sans-serif; cursor: pointer; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 34px;
  height: 34px;
  background: var(--navy);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-name {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
  font-weight: 500;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.navlink:hover { opacity: 0.65; }
.back-link { font-size: 15px; font-weight: 600; color: var(--navy); }

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  border: none;
}
.btn-navy { background: var(--navy); color: #FFFFFF; }
.btn-amber { background: var(--amber); color: var(--navy); font-weight: 700; padding: 14px 26px; border-radius: 10px; }
.btn-amber:hover { background: var(--amber-hover); }
.btn-outline { background: #FFFFFF; color: var(--navy); border: 1px solid var(--border); padding: 9px 16px; border-radius: 8px; font-size: 14px; }

/* Hero */
.hero {
  padding: 64px 24px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 22px;
}
.badge {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-bg);
  padding: 7px 16px;
  border-radius: 100px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
  max-width: 880px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 620px;
  line-height: 1.5;
  margin: 0;
}

.search-card {
  margin-top: 12px;
  width: 100%;
  max-width: 920px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  box-shadow: 0 12px 32px -18px rgba(22, 35, 61, 0.25);
  text-align: left;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 150px;
  min-width: 130px;
}
.field-narrow { flex: 0 1 100px; min-width: 90px; }
.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.field input, .field select {
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: 'Public Sans', sans-serif;
  background: #fff;
  width: 100%;
}
.search-card .btn-amber { flex: 0 0 auto; }

/* Features */
.features {
  padding: 32px 24px 64px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}
.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feature-card h3 { font-size: 17px; font-weight: 600; }
.feature-card p { font-size: 14px; color: var(--muted); line-height: 1.5; margin: 0; }

/* Directions */
.directions {
  padding: 0 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.directions h2 { font-size: 26px; font-weight: 600; }
.directions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.dirchip {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 600;
  background: #FFFFFF;
}
.dirchip:hover { border-color: var(--navy); }

/* Carrier CTA */
.carrier-cta { padding: 0 24px 64px; }
.carrier-cta-inner {
  background: var(--navy);
  border-radius: 20px;
  padding: 44px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.carrier-copy { display: flex; flex-direction: column; gap: 10px; max-width: 600px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); }
.carrier-copy h2 { color: #FFFFFF; font-size: 27px; font-weight: 600; }
.carrier-copy p { color: #B7C0D1; font-size: 15px; line-height: 1.5; margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 24px; }
.footer-inner {
  padding: 28px 24px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }

/* Calculator page */
.calc-main { padding: 28px 24px 64px; display: flex; flex-direction: column; gap: 4px; }
.route-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 12px;
}
.route-title { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.route-title h1 { font-size: 24px; font-weight: 600; }
.route-meta { font-size: 14px; color: var(--muted); }

.sort-bar {
  padding: 16px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.sort-label { font-size: 13px; color: var(--muted); margin-right: 2px; }
.sortbtn {
  padding: 9px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: #FFFFFF;
  color: var(--ink);
}
.sortbtn:hover { border-color: var(--navy); }
.sortbtn.active { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }
.demo-note { font-size: 12px; color: var(--muted2); font-style: italic; margin-left: auto; }

.results { display: flex; flex-direction: column; gap: 12px; padding-bottom: 40px; }
.result-row {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.result-initial {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--chip-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: var(--navy);
  flex-shrink: 0;
}
.result-main { flex: 1 1 200px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.result-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.result-name { font-size: 16px; font-weight: 600; }
.result-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  background: var(--green-bg);
  padding: 3px 9px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.result-sub { font-size: 13px; color: var(--muted); }
.result-stat { text-align: right; min-width: 80px; }
.result-stat-label { font-size: 12px; color: var(--muted); }
.result-stat-value { font-size: 15px; font-weight: 600; }
.result-price .result-stat-value { font-size: 20px; font-weight: 700; color: var(--navy); }
.result-pick {
  background: var(--amber);
  color: var(--navy);
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
.result-pick:hover { background: var(--amber-hover); }

@media (max-width: 640px) {
  .header-inner { height: auto; padding: 14px 20px; flex-wrap: wrap; }
  .nav { gap: 16px; }
  .result-row { justify-content: space-between; }
  .result-stat { text-align: left; }
}
