:root {
  color: #17211f;
  background: #f6f4ef;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

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

svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.app {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(23, 111, 121, 0.11), transparent 32rem),
    linear-gradient(315deg, rgba(154, 61, 32, 0.1), transparent 28rem),
    #f6f4ef;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
  padding: 0 4vw;
  background: rgba(246, 244, 239, 0.88);
  border-bottom: 1px solid rgba(23, 33, 31, 0.1);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 820;
  letter-spacing: 0;
  white-space: nowrap;
}

.brandMark,
.iconButton,
.swapButton {
  display: inline-grid;
  place-items: center;
  border: 0;
}

.brandMark {
  width: 46px;
  height: 46px;
  color: white;
  background: transparent;
  border-radius: 10px;
}

.brandMark .logoSvg {
  width: 46px;
  height: 46px;
}

.brandMark .logoSvg rect {
  fill: #17211f;
  stroke: rgba(255, 255, 255, 0.28);
}

.brandMark .logoAccent {
  stroke: #3fc6bd;
  stroke-width: 4;
}

.brandMark .logoText {
  stroke: #fffdf8;
  stroke-width: 4.4;
}

.desktopNav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow: hidden;
}

.contactButton {
  margin-left: auto;
  padding: 0.72rem 1rem;
  color: #fffdf8;
  background: #17211f;
  border: 1px solid rgba(23, 33, 31, 0.18);
  border-radius: 8px;
  font-size: 0.94rem;
  font-weight: 780;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(23, 33, 31, 0.12);
}

.contactButton:hover,
.contactButton.active {
  background: var(--accent, #176f79);
  transform: translateY(-1px);
}

.siteFooter a {
  color: #52605d;
  font-size: 0.92rem;
  font-weight: 680;
}

.siteFooter a:hover {
  color: #17211f;
}

.navPill {
  padding: 0.55rem 0.8rem;
  color: #42504c;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.navPill:hover,
.navPill.active {
  color: #17211f;
  background: white;
  border-color: rgba(23, 33, 31, 0.1);
}

.iconButton {
  width: 42px;
  height: 42px;
  color: #17211f;
  background: white;
  border: 1px solid rgba(23, 33, 31, 0.12);
  border-radius: 8px;
  cursor: pointer;
}

.mobileOnly {
  display: none;
}

main {
  width: min(1480px, 100%);
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 560px);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(3rem, 7vw, 6rem) 4vw 3rem;
}

.heroContent h1 {
  max-width: 760px;
  margin: 1rem 0 1rem;
  color: #121a18;
  font-size: clamp(3rem, 7vw, 6.7rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.heroContent p {
  max-width: 650px;
  margin: 0;
  color: #52605d;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.65;
}

.eyebrow,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: var(--accent, #176f79);
  font-size: 0.9rem;
  font-weight: 760;
  text-transform: uppercase;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.stats span {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.75rem 0.95rem;
  color: #4a5754;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 33, 31, 0.1);
  border-radius: 8px;
}

.stats strong {
  color: #17211f;
  font-size: 1.3rem;
}

.converterPanel {
  padding: clamp(1rem, 3vw, 1.5rem);
  background: #fffdf8;
  border: 1px solid rgba(23, 33, 31, 0.13);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(23, 33, 31, 0.12);
}

.inputGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

label {
  display: grid;
  gap: 0.45rem;
  color: #52605d;
  font-size: 0.9rem;
  font-weight: 720;
}

input,
select,
textarea {
  width: 100%;
  min-height: 54px;
  padding: 0 0.9rem;
  color: #17211f;
  background: #f8f7f3;
  border: 1px solid rgba(23, 33, 31, 0.13);
  border-radius: 8px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent, #176f79);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent, #176f79) 18%, transparent);
}

textarea {
  min-height: 150px;
  padding: 0.85rem 0.9rem;
  line-height: 1.55;
  resize: vertical;
}

.swapButton {
  justify-self: center;
  width: 48px;
  height: 48px;
  color: white;
  background: var(--accent, #176f79);
  border-radius: 8px;
  cursor: pointer;
}

.resultBox {
  display: grid;
  grid-template-columns: auto 20px 1fr;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.25rem;
  padding: 1.1rem;
  color: #f8f7f3;
  background: #17211f;
  border-radius: 8px;
}

.resultBox span,
.resultBox strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.resultBox span {
  color: rgba(255, 255, 255, 0.72);
}

.resultBox strong {
  font-size: clamp(1.25rem, 3vw, 2rem);
}

.workspace {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 2rem;
  padding: 1rem 4vw 3rem;
}

.sidebar {
  position: sticky;
  top: 92px;
  align-self: start;
  max-height: calc(100vh - 112px);
  padding: 1rem;
  overflow: auto;
  background: rgba(255, 253, 248, 0.78);
  border: 1px solid rgba(23, 33, 31, 0.12);
  border-radius: 8px;
}

.sidebarHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sidebar h2,
.sectionHeader h2 {
  margin: 0;
  color: #17211f;
}

.searchBox {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 0.5rem;
  align-items: center;
  margin: 1rem 0;
  padding: 0 0.8rem;
  min-height: 46px;
  background: white;
  border: 1px solid rgba(23, 33, 31, 0.1);
  border-radius: 8px;
}

.searchBox input {
  min-height: 42px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.measureList {
  display: grid;
  gap: 0.45rem;
}

.measureButton {
  display: grid;
  grid-template-columns: 8px 1fr 18px;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  padding: 0.8rem;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.measureButton:hover,
.measureButton.active {
  background: white;
  border-color: rgba(23, 33, 31, 0.11);
}

.measureButton > span:first-child {
  width: 8px;
  height: 36px;
  border-radius: 6px;
}

.measureButton strong,
.measureButton small {
  display: block;
}

.measureButton small {
  margin-top: 0.12rem;
  color: #687572;
}

.content,
.allRoutes {
  min-width: 0;
}

.sectionHeader {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.sectionHeader.compact {
  margin-top: 2rem;
}

.sectionHeader h2 {
  margin-top: 0.35rem;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.textLink {
  flex: 0 0 auto;
  padding: 0.65rem 0.85rem;
  color: #17211f;
  background: white;
  border: 1px solid rgba(23, 33, 31, 0.12);
  border-radius: 8px;
}

.valueGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}

.valueCard {
  display: grid;
  gap: 0.55rem;
  min-height: 148px;
  padding: 1rem;
  background: #fffdf8;
  border: 1px solid rgba(23, 33, 31, 0.11);
  border-radius: 8px;
}

.valueCard.highlight {
  border-color: var(--accent, #176f79);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent, #176f79) 20%, transparent);
}

.valueCard span,
.valueCard small {
  color: #64706d;
}

.valueCard strong {
  align-self: center;
  min-width: 0;
  color: #17211f;
  font-size: 1.45rem;
  overflow-wrap: anywhere;
}

.routeGrid,
.featuredRoutes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.7rem;
}

.routeGrid a,
.featuredRoutes a {
  display: grid;
  gap: 0.25rem;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(23, 33, 31, 0.1);
  border-radius: 8px;
}

.routeGrid a:hover,
.featuredRoutes a:hover,
.textLink:hover {
  border-color: rgba(23, 33, 31, 0.24);
  transform: translateY(-1px);
}

.featuredRoutes small {
  color: #687572;
}

.featuredRoutes span {
  font-weight: 760;
}

.allRoutes {
  padding: 0 4vw 4rem;
}

.pageHero {
  padding: clamp(3rem, 7vw, 6rem) 4vw 2rem;
}

.pageHero h1 {
  max-width: 860px;
  margin: 0.8rem 0 1rem;
  color: #121a18;
  font-size: clamp(2.7rem, 6vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.pageHero p {
  max-width: 760px;
  margin: 0;
  color: #52605d;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  line-height: 1.65;
}

.pageShell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
  padding: 1rem 4vw 4rem;
}

.policyContent {
  display: grid;
  gap: 1rem;
}

.policyContent section,
.trustPanel {
  padding: clamp(1rem, 2vw, 1.4rem);
  background: #fffdf8;
  border: 1px solid rgba(23, 33, 31, 0.11);
  border-radius: 8px;
}

.contactFormSection {
  display: grid;
  gap: 1rem;
}

.contactForm {
  display: grid;
  gap: 1rem;
}

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

.checkRow {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 0.7rem;
  color: #52605d;
  font-weight: 620;
  line-height: 1.5;
}

.checkRow input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin-top: 0.18rem;
  padding: 0;
}

.formStatus {
  min-height: 1.5rem;
  color: var(--accent, #176f79);
  font-weight: 720;
}

.submitButton {
  justify-self: start;
  min-height: 50px;
  padding: 0 1.1rem;
  color: #fffdf8;
  background: #17211f;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 820;
}

.submitButton:hover {
  background: var(--accent, #176f79);
}

.policyContent h2,
.trustPanel h2 {
  margin: 0 0 0.6rem;
  color: #17211f;
  font-size: 1.3rem;
  letter-spacing: 0;
}

.policyContent p,
.trustPanel p,
.siteFooter p {
  margin: 0;
  color: #52605d;
  line-height: 1.7;
}

.policyContent p + p,
.policyContent ul + p,
.policyContent p + ul {
  margin-top: 0.8rem;
}

.policyContent ul {
  margin: 0.8rem 0 0;
  padding-left: 1.25rem;
  color: #52605d;
  line-height: 1.7;
}

.policyContent li + li {
  margin-top: 0.35rem;
}

.policyContent a {
  color: var(--accent, #176f79);
  font-weight: 780;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.updatedNote {
  padding: 0 0.2rem;
  color: #687572;
  font-style: italic;
}

.trustPanel {
  position: sticky;
  top: 92px;
  align-self: start;
  display: grid;
  gap: 1rem;
}

.siteFooter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 2rem 4vw;
  border-top: 1px solid rgba(23, 33, 31, 0.1);
}

.siteFooter strong {
  display: block;
  margin-bottom: 0.35rem;
}

.siteFooter nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.8rem 1rem;
}

@media (max-width: 980px) {
  .desktopNav {
    display: none;
  }

  .mobileOnly {
    display: inline-grid;
  }

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

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

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

  .trustPanel {
    position: static;
  }

  .sidebar {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 50;
    width: min(92vw, 380px);
    max-height: none;
    border-radius: 0;
    transform: translateX(105%);
    transition: transform 180ms ease;
    box-shadow: -20px 0 50px rgba(23, 33, 31, 0.18);
  }

  .sidebar.open {
    transform: translateX(0);
  }
}

@media (max-width: 640px) {
  .topbar {
    min-height: 64px;
  }

  .brand span:last-child {
    max-width: 190px;
    white-space: normal;
    line-height: 1.05;
  }

  .hero {
    padding-top: 2rem;
  }

  .heroContent h1 {
    font-size: 3rem;
  }

  .stats,
  .sectionHeader {
    align-items: stretch;
    flex-direction: column;
  }

  .stats span {
    width: 100%;
    justify-content: space-between;
  }

  .converterPanel {
    margin-inline: -1vw;
  }

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

  .resultBox svg {
    transform: rotate(90deg);
  }

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

  .siteFooter nav {
    justify-content: flex-start;
  }

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