.pp-tool {
  --pp-accent: #7dd3fc;
  --pp-panel: rgba(255, 255, 255, 0.1);
  position: relative;
  isolation: isolate;
  margin: 30px 0;
  padding: clamp(24px, 4vw, 40px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  color: #f8fbff;
  box-shadow: 0 24px 55px rgba(9, 31, 58, 0.14);
  scroll-margin-top: 160px;
}

.pp-tool--navy {
  background: linear-gradient(145deg, #092e53 0%, #145786 100%);
}

.pp-tool--teal {
  --pp-accent: #99f6e4;
  background: linear-gradient(145deg, #075d58 0%, #0b897c 100%);
}

.pp-tool--plum {
  --pp-accent: #f5d0fe;
  background: linear-gradient(145deg, #3c214f 0%, #702e65 100%);
}

.pp-tool::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -180px -160px auto auto;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
}

.pp-tool-head {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 26px;
}

.pp-tool-head > div {
  max-width: 760px;
}

.pp-tool-head .section-kicker {
  margin: 0 0 8px;
  color: var(--pp-accent);
}

.pp-tool-head h2 {
  max-width: 760px;
  margin: 0 0 10px;
  color: #fff;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
}

.pp-tool-head p:not(.section-kicker) {
  margin: 0;
  color: rgba(248, 251, 255, 0.84);
}

.pp-tool-head > span {
  flex: 0 0 auto;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.pp-tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 22px;
  align-items: stretch;
}

.pp-tool-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-content: start;
}

.pp-tool-fields label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}

.pp-tool-fields label > span {
  display: flex;
  min-height: 2.7em;
  align-items: flex-end;
}

.pp-tool-fields input {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  padding: 13px 15px;
  border: 2px solid transparent;
  border-radius: 12px;
  outline: 0;
  background: #fff;
  color: #0b2949;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.pp-tool-fields input:focus-visible {
  border-color: var(--pp-accent);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18);
}

.pp-tool-results {
  display: grid;
  min-width: 0;
  grid-template-columns: 1fr;
  gap: 12px;
  align-content: start;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.pp-tool-results > div {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: var(--pp-panel);
}

.pp-tool-results > div > span,
.pp-tool-results > div > small {
  display: block;
  color: rgba(248, 251, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-transform: uppercase;
}

.pp-tool-results > div > strong {
  display: block;
  margin: 8px 0 3px;
  color: #fff;
  font-size: clamp(24px, 3.3vw, 35px);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#pp-journey-time {
  font-size: clamp(24px, 2.1vw, 30px);
  letter-spacing: -0.025em;
}

.pp-tool-results .is-highlight {
  grid-column: 1 / -1;
  background: #fff;
}

.pp-tool-results .is-highlight > span,
.pp-tool-results .is-highlight > small {
  color: #55708d;
}

.pp-tool-results .is-highlight > strong {
  color: #087b70;
  font-size: clamp(28px, 4vw, 42px);
}

.pp-tool-results > p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 15px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  color: #163b5e;
  font-size: 14px;
  line-height: 1.6;
}

.pp-tool-note {
  margin: 18px 0 0;
  color: rgba(248, 251, 255, 0.75);
  font-size: 13px;
  line-height: 1.6;
}

.pp-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.pp-tool .pp-inline-actions .button-secondary {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.pp-tool .pp-inline-actions .button-secondary:hover {
  border-color: #fff;
  background: #fff;
  color: #0b3158;
}

.pp-static-table {
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.pp-static-table summary {
  padding: 15px 17px;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.pp-static-table .comparison-table-wrap {
  margin: 0;
  padding: 0 14px 14px;
}

.pp-static-table .comparison-table {
  margin: 0;
  background: #fff;
}

.pp-return-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.pp-return-grid > div {
  padding: 20px;
  border: 1px solid #d6e4f1;
  border-radius: 16px;
  background: #f5f9fd;
}

.pp-return-grid > div:nth-child(2) {
  border-color: #a7f3d0;
  background: #ecfdf5;
}

.pp-return-grid strong {
  display: block;
  margin-bottom: 7px;
  color: #0d3156;
  font-size: 18px;
}

.pp-return-grid p {
  margin: 0;
}

@media (max-width: 980px) {
  .pp-tool-layout {
    grid-template-columns: 1fr;
  }

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

  .pp-tool-results .is-highlight,
  .pp-tool-results > p {
    grid-column: 1 / -1;
  }

  .pp-return-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .pp-tool {
    margin-inline: 0;
    padding: 24px 18px;
    border-radius: 22px;
  }

  .pp-tool-head {
    flex-direction: column;
    gap: 14px;
  }

  .pp-tool-fields,
  .pp-tool-results {
    grid-template-columns: 1fr;
  }

  .pp-tool-fields label > span {
    min-height: 0;
  }

  .pp-tool-results .is-highlight,
  .pp-tool-results > p {
    grid-column: auto;
  }

  .pp-inline-actions {
    flex-direction: column;
  }

  .pp-inline-actions .button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 400px) {
  .pp-tool {
    padding-inline: 14px;
  }

  .pp-tool-results {
    padding: 10px;
  }

  .pp-tool-results > div > strong {
    font-size: 25px;
  }

  .pp-tool-results .is-highlight > strong {
    font-size: 29px;
  }
}
