:root {
  --brand-blue: #074f89;
  --brand-blue-deep: #003b77;
  --brand-blue-soft: #edf4fb;
  --brand-green: #8fbf45;
  --brand-green-soft: #f4f9ee;
  --ink-strong: #10253b;
  --ink-normal: #1f3246;
  --ink-muted: #4d6072;
  --sheet-bg: #f7f9fc;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  background: #dfe5ec;
}

body {
  /* font-family: "Avenir Next", "Avenir", "Segoe UI", "Helvetica Neue", sans-serif; */
  font-family: "Poppins", sans-serif;
  color: var(--ink-normal);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.action-bar {
  width: min(210mm, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 auto 12px;
}

.back-home {
  display: inline-flex;
  align-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #0b5ea3 0%, #074f89 100%);
  border-radius: 999px;
  padding: 10px 18px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(7, 79, 137, 0.24);
}

.download-pdf {
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #9ecb49 0%, #7eab2d 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(126, 171, 45, 0.24);
}

.page {
  width: 210mm;
  height: 297mm;
  background: linear-gradient(160deg, #ffffff 0%, var(--sheet-bg) 100%);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(7, 34, 58, 0.14);
  padding: 8mm 9mm 7mm;
  display: flex;
  flex-direction: column;
  gap: 4mm;
  overflow: hidden;
}

.content-stack {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3mm;
}

.header {
  display: grid;
  grid-template-columns: 49mm 1fr;
  gap: 7mm;
  align-items: center;
}

.header-copy {
  text-align: right;
  justify-self: end;
}

.brand-logo {
  width: 49mm;
  height: auto;
  display: block;
}

.eyebrow {
  margin: 0;
  color: var(--brand-green);
  font-weight: 800;
  letter-spacing: 0.11em;
  font-size: 3.1mm;
}

h1 {
  margin: 0.8mm 0 0;
  font-size: 9.4mm;
  line-height: 1.05;
  color: var(--brand-blue-deep);
  font-weight: 800;
}

.subtitle {
  margin: 1.1mm 0 0;
  font-size: 3.6mm;
  color: var(--ink-muted);
  font-weight: 500;
}

.hero {
  background: linear-gradient(132deg, #0b4e8d 0%, #003b77 100%);
  border-radius: 4.5mm;
  padding: 5.6mm 5.8mm;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 4.2mm;
  color: #ffffff;
}

.hero-left h2 {
  margin: 2mm 0 1.6mm;
  font-size: 5mm;
  line-height: 1.13;
  font-weight: 400;
}

.hero-left p {
  margin: 5mm 0 0;
  font-size: 5.45mm;
  line-height: 1.4;
  color: #dbe9f7;
}

.hero-label {
  margin: 0;
  color: #9fd255;
  letter-spacing: 0.1em;
  font-weight: 700;
  font-size: 3mm;
}

.hero-right {
  border-left: 0.35mm solid rgba(255, 255, 255, 0.35);
  padding-left: 4.4mm;
  align-content: center;
}

.hero-point {
  display: flex;
  align-items: flex-start;
  gap: 2.2mm;
  margin-bottom: 2.7mm;
  font-size: 3.45mm;
  line-height: 1.35;
}

.hero-point:last-child {
  margin-bottom: 0;
}

.dot {
  width: 2.2mm;
  height: 2.2mm;
  flex: 0 0 2.2mm;
  border-radius: 50%;
  background: var(--brand-green);
  margin-top: 1.3mm;
}

.rate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4mm;
}

.rate-card {
  border-radius: 4mm;
  border: 0.35mm solid #d9e6f5;
  padding: 4.8mm 5mm 4.6mm;
}

.base-rate {
  background: linear-gradient(180deg, #f5fafe 0%, #eef5fd 100%);
}

.distance-rate {
  background: linear-gradient(180deg, #f8fcef 0%, #f3f9ea 100%);
  border-color: #d6e9c3;
}

.rate-title {
  margin: 0;
  font-size: 3.7mm;
  color: var(--ink-strong);
  font-weight: 700;
}

.rate-value {
  margin: 1.4mm 0 0.9mm;
  font-size: 12.3mm;
  line-height: 1;
  font-weight: 800;
  color: var(--brand-blue-deep);
}

.rate-star {
  font-size: 0.48em;
  line-height: 1;
  vertical-align: super;
  margin-left: 0.3mm;
}

.distance-rate .rate-value {
  color: #3f6d13;
}

.rate-caption {
  margin: 0;
  font-size: 3.2mm;
  color: var(--ink-muted);
}

.formula {
  background: #f2f7fd;
  border: 0.3mm solid #d7e6f7;
  border-radius: 3.5mm;
  padding: 2.5mm 3.4mm;
}

.formula p {
  margin: 0;
  font-size: 3.25mm;
  line-height: 1.35;
  color: #27415a;
}

.slab-section h3 {
  margin: 0 0 3mm;
  font-size: 6.5mm;
  line-height: 1.12;
  color: var(--brand-blue-deep);
}

.slab-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 3.6mm;
  overflow: hidden;
  border: 0.35mm solid #d5e3f2;
  background: #ffffff;
}

.slab-table thead th {
  background: linear-gradient(90deg, #e8f1fb 0%, #f5f9ff 100%);
  color: #1c3f62;
  font-size: 3.7mm;
  font-weight: 800;
  text-align: left;
  padding: 1.9mm 3mm;
  border-bottom: 0.3mm solid #d5e3f2;
}

.slab-table tbody td {
  padding: 1.75mm 3mm;
  font-size: 3.45mm;
  line-height: 1.28;
  border-bottom: 0.28mm solid #e2eaf4;
  color: var(--ink-normal);
}

.slab-table tbody tr:last-child td {
  border-bottom: none;
}

.dynamic-note {
  border-radius: 3.8mm;
  padding: 3.5mm 3.8mm;
  background: linear-gradient(100deg, #f4faee 0%, #edf5ff 100%);
  border: 0.32mm solid #d7e7c4;
}

.dynamic-title {
  margin: 0;
  color: #355f11;
  font-size: 3.8mm;
  font-weight: 800;
}

.dynamic-note p {
  margin: 1.1mm 0 0;
  font-size: 3.06mm;
  line-height: 1.4;
}

.active-cities {
  background: linear-gradient(90deg, #eef6ff 0%, #f6fbf2 100%);
  border: 0.3mm solid #d6e5f4;
  border-radius: 3.6mm;
  padding: 3.2mm 3.8mm;
}

.active-cities h4 {
  margin: 0 0 2.4mm;
  font-size: 3.9mm;
  color: #1e4570;
}

.city-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.7mm;
}

.city-card {
  display: flex;
  align-items: center;
  gap: 2.1mm;
  background: rgba(255, 255, 255, 0.75);
  border: 0.28mm solid #d4e5c1;
  border-radius: 2.8mm;
  padding: 3.1mm 3.4mm;
}

.city-name {
  margin: 0;
  font-size: 3.45mm;
  font-weight: 700;
  color: #13314f;
}

.city-pin {
  width: 5.4mm;
  height: 5.4mm;
  color: #5d9622;
  flex: 0 0 auto;
}

.terms {
  background: #ffffff;
  border: 0.3mm solid #dce6f2;
  border-radius: 3.6mm;
  padding: 3.2mm 3.8mm 3.1mm;
}

.terms h4 {
  margin: 0 0 1.9mm;
  font-size: 3.8mm;
  color: var(--brand-blue-deep);
}

.terms ul {
  margin: 0;
  padding-left: 4.4mm;
}

.terms li {
  margin-bottom: 1.5mm;
  font-size: 2.86mm;
  line-height: 1.4;
  color: #334d62;
}

.terms li:last-child {
  margin-bottom: 0;
}

.footer {
  display: grid;
  grid-template-columns: 1fr auto auto auto 1fr;
  align-items: center;
  column-gap: 3.4mm;
  margin-top: 0;
  padding-top: 0.8mm;
  margin-left: -2.8mm;
  width: calc(100% + 2.8mm);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1.45mm;
}

.contact-icon {
  width: 4.3mm;
  height: 4.3mm;
  color: #86bf3b;
  flex: 0 0 auto;
}

.line {
  height: 0.35mm;
  background: #9ac85b;
}

.footer p {
  margin: 0;
  font-size: 3.45mm;
  font-weight: 650;
  color: #17374f;
}

.divider {
  width: 0.35mm;
  height: 5.6mm;
  background: #9ac85b;
}

.contact-link {
  text-decoration: none;
}

@media (max-width: 900px) {
  .action-bar {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .back-home,
  .download-pdf {
    justify-content: center;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  html,
  body {
    width: 210mm;
    height: 297mm;
    background: #ffffff;
  }

  body {
    padding: 0;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .action-bar {
    display: none;
  }

  .page {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    width: 210mm;
    height: 297mm;
  }
}
