:root {
  --bg: #fdfbf8;
  --bg-elev: #ffffff;
  --ink: #2f221a;
  --ink-soft: #624e42;
  --line: #e8dacf;
  --accent: #a44117;
  --accent-ink: #ffffff;
  --accent-soft: #fff1e3;
  --warn: #8a3b12;
  --ok: #1f6b3a;
  --radius: 1.35rem;
  --shadow: 0 10px 30px rgba(80, 42, 19, 0.07);
  --font: "Segoe UI", system-ui, Arial, sans-serif;
  --max: 1200px;
  --read: 42rem;
  --pad: clamp(16px, 3vw, 20px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #ad4a1c;
  outline-offset: 2px;
}

main {
  width: min(100% - 2 * var(--pad), var(--max));
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
}

main > * {
  max-width: var(--read);
}

main > .table-section,
main > .routes,
main > .compact-rates,
main > .calculator,
main > .lead-section,
main > .page-hero,
main > .contacts-nap {
  max-width: none;
}

h1,
h2,
h3 {
  line-height: 1.25;
  color: var(--ink);
  font-weight: 700;
}

h1 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  margin: 0 0 0.75rem;
  max-width: 18ch;
}

h2 {
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
}

h3 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

p {
  margin: 0 0 1rem;
  max-width: var(--read);
}

.lead {
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.muted,
.calc-note,
.img-credit {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.rate {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.35rem 0.7rem;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  border-radius: 999px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(244, 247, 248, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-bar {
  width: min(100% - 2 * var(--pad), var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.75rem;
  align-items: center;
  min-height: 4rem;
}

.brand {
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.35rem;
}

.header-contacts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
}

.header-phone {
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
}

.header-hours {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.menu-btn,
.nav-toggle,
.btn,
.chip {
  font: inherit;
  cursor: pointer;
}

.menu-btn {
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
}

.site-menu {
  width: min(100% - 2 * var(--pad), var(--max));
  margin: 0 auto 0.75rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.75rem;
}

.nav-sub[hidden] {
  display: none !important;
}

@media (max-width: 767px) {
  html.js .site-menu:not(.is-open) {
    display: none;
  }
}

.nav-list,
.nav-sub {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list {
  display: grid;
  gap: 0.35rem;
}

.nav-row {
  display: flex;
  gap: 0.35rem;
  align-items: stretch;
}

.nav-link {
  flex: 1;
  display: block;
  text-decoration: none;
  color: var(--ink);
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
}

.nav-link:hover,
.nav-item.is-active > .nav-row > .nav-link,
.nav-item.is-active > .nav-link {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-toggle {
  width: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.nav-toggle span {
  display: block;
  width: 0.55rem;
  height: 0.55rem;
  margin: auto;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg);
  translate: 0 -2px;
}

.nav-toggle[aria-expanded="true"] span {
  transform: rotate(-135deg);
  translate: 0 2px;
}

.nav-sub {
  margin: 0.25rem 0 0.5rem 0.75rem;
  padding-left: 0.5rem;
  border-left: 2px solid var(--line);
}

.nav-sub a {
  display: block;
  padding: 0.4rem 0.55rem;
  text-decoration: none;
  color: var(--ink-soft);
  border-radius: 6px;
}

.nav-sub a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: #90a4b5;
}

.breadcrumbs a {
  color: var(--ink-soft);
}

.page-hero {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.hero-media {
  border-radius: 16px;
  overflow: hidden;
  background: #d7e3ea;
}

.hero-media img {
  width: 100%;
  max-height: 28rem;
  object-fit: cover;
}

.img-credit,
.hero-media .img-credit {
  margin: 0;
  padding: 0.45rem 0.7rem;
  background: rgba(15, 39, 64, 0.04);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-secondary {
  background: var(--bg-elev);
  color: var(--ink);
  border-color: var(--line);
}

.route-grid {
  display: grid;
  gap: 1rem;
}

.route-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}

.route-card a {
  text-decoration: none;
  color: var(--ink);
}

.compact-rates ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.compact-rates a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  text-decoration: none;
  color: var(--ink);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
}

.compact-rates strong {
  color: var(--accent);
  white-space: nowrap;
}

.table-section {
  margin: 2rem 0;
}

.price-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
}

.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
}

.chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

caption {
  text-align: left;
  padding: 0.85rem 1rem;
  font-weight: 700;
  caption-side: top;
}

th,
td {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #fbefe3;
  font-size: 0.92rem;
}

.opt-list {
  display: grid;
  gap: 0.35rem;
}

.opt {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  font-size: 0.95rem;
}

.opt-help {
  margin: 0;
}

.opt-help-full {
  display: none;
}

.task-summary-box {
  margin-top: 0.85rem;
}

.task-summary-box textarea,
.lead-form input,
.lead-form select,
.lead-form textarea,
.calculator input,
.calculator select {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

.calculator,
.lead-section,
.contacts-nap,
.related,
.faq {
  margin: 2.25rem 0;
}

.calc-grid,
.form-grid {
  display: grid;
  gap: 0.85rem;
}

.calc-result {
  font-size: 1.2rem;
  font-weight: 700;
}

.calc-formula {
  color: var(--ink-soft);
}

.lead-form .full,
.consent {
  grid-column: 1 / -1;
}

.consent {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}

.form-status {
  min-height: 1.4em;
}

.form-status.is-ok {
  color: var(--ok);
}

.form-status.is-err {
  color: var(--warn);
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0.65rem 0.9rem;
  margin: 0 0 0.55rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 650;
}

.related ul {
  padding-left: 1.1rem;
}

.content-figure {
  margin: 1.5rem 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.content-figure figcaption {
  padding: 0.6rem 0.85rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #e9f0f4;
  padding: 2rem var(--pad) 6rem;
}

.footer-grid {
  width: min(100%, var(--max));
  margin: 0 auto;
  display: grid;
  gap: 1.25rem;
}

.footer-brand {
  font-weight: 800;
  font-size: 1.2rem;
}

.mobile-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  padding: 0.65rem var(--pad) calc(0.65rem + env(safe-area-inset-bottom));
  background: rgba(244, 247, 248, 0.96);
  border-top: 1px solid var(--line);
}

.mobile-cta .btn {
  width: 100%;
}

@media (min-width: 768px) {
  .site-menu {
    display: block !important;
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0 0 0.75rem;
    margin-bottom: 0;
  }

  .menu-btn {
    display: none;
  }

  .header-bar {
    grid-template-columns: auto 1fr auto;
  }

  .nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .nav-item {
    position: relative;
  }

  .nav-sub {
    position: absolute;
    left: 0;
    top: calc(100% + 0.25rem);
    min-width: 14rem;
    margin: 0;
    padding: 0.4rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow);
    z-index: 20;
  }

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

  .compact-rates ul,
  .calc-grid,
  .form-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-cta {
    display: none;
  }

  .site-footer {
    padding-bottom: 2rem;
  }
}

@media (min-width: 1024px) {
  .route-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  table.data-table,
  table.selectable-table {
    min-width: 0;
  }

  table.data-table thead,
  table.selectable-table thead {
    display: none;
  }

  table.data-table tr,
  table.selectable-table tr {
    display: block;
    padding: 0.75rem 0;
    border-top: 1px solid var(--line);
  }

  table.data-table td,
  table.selectable-table td {
    display: block;
    border: 0;
    padding: 0.25rem 1rem;
  }

  table.data-table td::before,
  table.selectable-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.8rem;
    color: var(--ink-soft);
    margin-bottom: 0.15rem;
  }

}

/* Page composition */
html {
  scroll-padding-top: 9rem;
}

main {
  padding-block: clamp(1.5rem, 3vw, 3rem) 4rem;
}

main > .page-copy,
main > .related {
  max-width: 50rem;
}

main > .page-copy {
  margin-block: clamp(3rem, 7vw, 6rem);
}

h1 {
  max-width: 19ch;
  font-size: clamp(2.25rem, 4.3vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

h2 {
  font-size: clamp(1.65rem, 2.9vw, 2.5rem);
  line-height: 1.14;
  letter-spacing: -0.035em;
  margin: 0 0 1.15rem;
}

h3 {
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  letter-spacing: -0.02em;
}

.page-copy h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  margin: 2.2rem 0 0.75rem;
}

.page-copy p {
  color: var(--ink-soft);
}

h2, h3, p, td, dd {
  overflow-wrap: anywhere;
}

a:hover {
  text-decoration-thickness: 2px;
}

.site-header {
  background: rgba(255, 255, 255, 0.97);
}

.header-bar {
  min-height: 4.25rem;
}

.brand-mark {
  font-size: clamp(1.2rem, 2.6vw, 1.65rem);
  color: var(--accent);
}

.header-hours {
  font-size: 0.8125rem;
}

.nav-link {
  font-weight: 600;
}

.page-hero {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--accent-soft);
  margin-bottom: 0;
}

.hero-copy {
  min-width: 0;
  padding: clamp(1.4rem, 4vw, 3.5rem);
}

.page-hero--home .hero-copy {
  padding: clamp(1.4rem, 3vw, 2.75rem);
}

.page-hero--home h1 {
  font-size: clamp(2.25rem, 3.65vw, 3.35rem);
  max-width: 23ch;
}

.hero-copy > .lead {
  margin-top: 1rem;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
}

.hero-copy > .rate {
  margin: 0.25rem 0 1.25rem;
  background: #fff;
  font-size: 1.125rem;
}

.hero-actions {
  margin-top: 1rem;
}

.hero-media {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  border-radius: 0;
  min-width: 0;
  background: #eadcd0;
}

.hero-media picture {
  min-height: 0;
}

.hero-media img {
  height: 100%;
  max-height: none;
  aspect-ratio: 4 / 3;
  object-position: center 45%;
}

.hero-media .img-credit {
  max-width: none;
  background: #fff9f1;
  font-size: 0.8125rem;
}

.btn {
  min-height: 3rem;
  padding: 0.65rem 1.1rem;
  border-radius: 0.75rem;
  text-align: center;
}

.btn-primary {
  background: #ffac5e;
  color: #381c0d;
}

.btn-primary:hover {
  background: #ffc181;
  filter: none;
}

.btn-secondary:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.routes,
.compact-rates,
.table-section,
.calculator,
.lead-section,
.contacts-nap {
  margin-block: clamp(2rem, 5vw, 4rem);
}

.route-card {
  position: relative;
  border-radius: var(--radius);
  padding: clamp(1.1rem, 2.5vw, 1.65rem);
  border-top: 4px solid #ef9047;
}

.route-card:nth-child(even) {
  border-top-color: #c47949;
}

.route-card:hover,
.route-card:focus-within {
  border-color: var(--accent);
}

.route-card a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.route-card p {
  margin: 0.65rem 0 0;
  color: var(--ink-soft);
}

.compact-rates a {
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 0.85rem;
  padding: 1rem;
}

.compact-rates a:hover {
  border-color: var(--accent);
}

.compact-rates > p {
  margin-top: 1rem;
}

.calculator,
.lead-section,
.contacts-nap {
  padding: clamp(1.2rem, 3.5vw, 2.5rem);
  background: var(--accent-soft);
  border-radius: var(--radius);
}

.page-hero--home .calculator {
  margin: 1.4rem 0 0;
  padding: clamp(0.95rem, 2.5vw, 1.4rem);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 1rem;
}

.page-hero--home .calc-note {
  margin-bottom: 0;
}

.page-hero--home .calculator h2 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.calculator > :last-child,
.contacts-nap > :last-child {
  margin-bottom: 0;
}

.calc-result {
  margin: 1rem 0 0.5rem;
  color: var(--accent);
}

.form-grid > label,
.calc-grid > label {
  min-width: 0;
  font-weight: 600;
}

.form-grid :is(input, textarea, select),
.calc-grid :is(input, select) {
  font-weight: 400;
}

.table-wrap:focus-within {
  border-color: var(--accent);
}

tbody tr:nth-child(even) {
  background: #fdf9f4;
}

td:first-child {
  font-weight: 600;
}

table caption {
  color: var(--ink-soft);
}

.opt-help summary {
  color: var(--accent);
}

.opt input,
.lead-form input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
  margin: 0.24rem 0 0;
  accent-color: var(--accent);
}

.lead-form .consent {
  font-weight: 400;
}

.form-status:empty {
  display: none;
}

.lead-form > .btn {
  margin-top: 1rem;
}

.faq-item {
  padding: 0;
  border-radius: 0.85rem;
}

.faq-item summary {
  padding: 0.9rem 1rem;
}

.faq-item[open] {
  border-color: var(--accent);
}

.faq-item > p {
  padding: 0 1rem;
  margin-bottom: 1rem;
}

.site-footer {
  background: #35241c;
  color: #fff7ed;
}

.site-footer a,
.site-footer .muted {
  color: #ffce9e;
}

.mobile-cta {
  background: rgba(255, 250, 244, 0.97);
}

@media (min-width: 768px) {
  .header-bar {
    grid-template-columns: 1fr auto;
  }

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

  .page-hero--media {
    grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  }

  .hero-media picture {
    position: relative;
  }

  .hero-media img {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
  }

  .page-hero--media .hero-copy {
    min-height: clamp(20rem, 34vw, 26rem);
    align-content: center;
  }
}

@media (max-width: 767px) {
  html {
    scroll-padding-top: 5.25rem;
  }

  .site-header:has(.site-menu) {
    max-height: 90vh;
    overflow-y: auto;
  }

  .site-menu {
    max-height: 65vh;
    overflow-y: auto;
  }

  .page-hero--home .hero-media img {
    aspect-ratio: 16 / 9;
  }

  .mobile-cta .btn {
    font-size: 0.875rem;
    padding-inline: 0.45rem;
  }
}

@media (max-width: 420px) {
  .header-bar {
    gap: 0.45rem;
  }

  .header-phone,
  .menu-btn {
    font-size: 0.875rem;
  }

  .header-hours {
    font-size: 0.75rem;
  }

  .menu-btn {
    padding-inline: 0.45rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
