/* Wide screens compare every period. On a phone each row is a model and its total. */
.rate-matrix-box {
  --rate-ink: #183c2c; --rate-line: #d6dfd5; --rate-pale: #f2f5ee;
  width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box;
  color: #202e25; border: 0; border-radius: 0;
}
.rate-matrix-box .rate-picker-label { display: none; }
body .rate-matrix-box table.rate-matrix {
  border-collapse: separate; border-spacing: 0; width: 100%; min-width: 0;
  margin: 0; line-height: 1.35; font-variant-numeric: tabular-nums; table-layout: auto;
}
body .rate-matrix-box .rate-matrix :is(th,td) {
  position: static; box-sizing: border-box; height: auto; padding: 12px 9px;
  border: 0; border-bottom: 1px solid var(--rate-line);
  font-size: .94rem; text-align: right; white-space: nowrap;
}
body .rate-matrix-box .rate-matrix caption {
  caption-side: top; padding: 4px 0 8px; text-align: start;
  font-size: .87rem; font-weight: 600; color: var(--rate-ink);
}
body .rate-matrix-box .rate-matrix thead th {
  color: white; background: var(--rate-ink); font-size: .86rem; font-weight: 650; white-space: normal;
}
body .rate-matrix-box .rate-matrix tr > th:first-child {
  text-align: left; width: auto; min-width: 0;
}
body .rate-matrix-box .rate-matrix tbody :is(th,td) {
  background: #fff; color: #202e25;
}
body .rate-matrix-box .rate-matrix tbody tr:nth-child(even) > * { background: var(--rate-pale); }
body .rate-matrix-box .rate-matrix th[scope=row] { font-weight: 600; white-space: normal; overflow-wrap: anywhere; }
body .rate-matrix-box .rate-matrix th[scope=row] a { color: inherit; text-underline-offset: .18em; }
body .rate-matrix-box .rate-matrix td { font-weight: 600; }
.rate-matrix-box + .published-rate-terms { margin: 12px 0 0; line-height: 1.6; }
@media screen and (max-width: 859px) {
  body .rate-matrix-box { overflow: visible; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
  body .rate-matrix-box .rate-matrix th[scope=row] { font-size: 1rem; }
  body .rate-matrix-box.rate-picker-ready .rate-picker-label {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 0; margin: 0; color: var(--rate-ink); background: transparent;
    font-size: .95rem; text-align: start; font-weight: 700;
  }
  .rate-picker-label select {
    display: block; flex: 0 1 auto; min-width: 7rem; max-width: 66%; min-height: 46px;
    margin: 0; padding: 8px 12px; border: 1px solid #7d9583; border-radius: 7px;
    font: inherit; font-size: 1rem; color: var(--rate-ink); background-color: white;
    appearance: auto; cursor: pointer;
  }
  .rate-picker-label select:focus-visible { outline: 3px solid #28784c; outline-offset: 2px; }
  body .rate-matrix-box.rate-picker-ready .rate-matrix { table-layout: fixed; }
  body .rate-matrix-box.rate-picker-ready .rate-matrix tr > :first-child { width: 54%; }
  body .rate-matrix-box.rate-picker-ready .rate-matrix tr > [data-term]:not(.selected-term) { display: none; }
  body .rate-matrix-box.rate-picker-ready .rate-matrix tr > [data-term].selected-term { display: table-cell; width: 46%; }
  body .rate-matrix-box.rate-picker-ready .rate-matrix :is(th,td) { padding: 12px; }
  body .rate-matrix-box.rate-picker-ready .rate-matrix td { font-size: 1.08rem; }
  /* The complete tariff remains readable on a small screen without JavaScript. */
  .rate-matrix-box:not(.rate-picker-ready) .rate-matrix,
  .rate-matrix-box:not(.rate-picker-ready) .rate-matrix tbody { display: block; }
  .rate-matrix-box:not(.rate-picker-ready) .rate-matrix thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .rate-matrix-box:not(.rate-picker-ready) .rate-matrix tbody tr { display: block; margin-bottom: 12px; }
  body .rate-matrix-box:not(.rate-picker-ready) .rate-matrix th[scope=row] { display: block; background: var(--rate-ink); color: white; }
  body .rate-matrix-box:not(.rate-picker-ready) .rate-matrix td { display: flex; gap: 12px; justify-content: space-between; align-items: center; }
  .rate-matrix-box:not(.rate-picker-ready) .rate-matrix td::before { content: attr(data-period-label); text-align: start; white-space: normal; font-weight: 400; }
}
@media print {
  .rate-matrix-box .rate-picker-label { display: none !important; }
  body .rate-matrix-box .rate-matrix :is(th,td) { display: table-cell; font-size: 9pt; padding: 5pt 3pt; }
}

/* Homepage rental plans and vehicle selection */
#vehicles.vehicle-strip {
  scroll-margin-top: 6rem;
}
#vehicles .plan-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .875rem;
  width: min(100%, 48rem);
  margin: 0 auto clamp(1.75rem, 4vw, 3rem);
}
#vehicles .plan-links a {
  display: grid;
  align-content: center;
  gap: .35rem;
  min-height: 5.25rem;
  padding: .85rem 1rem;
  border: 1px solid #b9d2c2;
  border-radius: .875rem;
  background: #edf5ef;
  color: #153e2d;
  line-height: 1.4;
  text-align: center;
}
#vehicles .plan-links a:hover { background: #dceee1; }
#vehicles .plan-links a b { font-size: clamp(1.05rem, 2.1vw, 1.3rem); }
#vehicles .plan-links a span { font-size: .9rem; }
#vehicles .fleet-title {
  margin: 0 0 .9rem;
  padding: 1rem 0 0;
  border: 0;
  border-top: 1px solid #d7e4da;
  color: var(--forest, #153e2d);
  font-family: inherit;
  font-size: clamp(1.4rem, 2.7vw, 2rem);
  font-weight: 850;
  line-height: 1.35;
  letter-spacing: normal;
}
#vehicles .fleet-toolbar { gap: .5rem 1rem; margin-bottom: .8rem; }
#vehicles .fleet-toolbar a { min-height: 2.75rem; }
#vehicles .fleet-navigation { gap: .45rem .75rem; margin-bottom: .6rem; }
#vehicles .fleet-track .car-card {
  min-width: 0;
  gap: .6rem;
  padding: clamp(.75rem, 1.6vw, 1rem);
  border-color: #d4e2d8;
}
#vehicles .fleet-track .car-head h3 {
  font-family: inherit;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  line-height: 1.3;
}
#vehicles .fleet-track .car-rates {
  padding: .55rem .4rem;
  border-radius: .65rem;
  background: #edf5ef;
  color: #153e2d;
}
#vehicles .fleet-track .car-rates div:first-child { flex-wrap: wrap; align-items: baseline; }
#vehicles .fleet-track .car-rates dd strong {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-variant-numeric: tabular-nums;
}
#vehicles .fleet-detail { border-top: 1px solid #d7e4da; }
@media (max-width: 480px) {
  #vehicles .plan-links { grid-template-columns: 1fr; gap: .55rem; }
  #vehicles .plan-links a { min-height: 4.5rem; }
  #vehicles .fleet-navigation { flex-wrap: wrap; }
}
