.hftp {
  max-width: 1000px;
  margin: 0 auto 26px;
  padding: 24px;
  border: 1px solid #dbe6ee;
  border-top: 5px solid #1866b4;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7fbff 0, #fff 210px);
  box-shadow: 0 7px 24px rgba(20, 54, 75, 0.08);
  box-sizing: border-box;
}

.hftp-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 22px;
}

.hftp-heading h2 {
  margin: 7px 0 0;
  color: #172d3d;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.15;
}

.hftp-heading > p {
  margin: 0;
  color: #465763;
  font-size: 16px;
  line-height: 1.6;
}

.hftp-gateways {
  margin: 0 0 20px;
  padding: 20px;
  border: 1px solid #d9e5ed;
  border-radius: 10px;
  background: #fff;
}

.hftp-gateway-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(300px, 1.2fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 12px;
}

.hftp-gateway-kicker {
  display: block;
  color: #1866b4;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-transform: uppercase;
}

.hftp-gateway-heading h3 {
  margin: 5px 0 0;
  color: #172d3d;
  font-size: 23px;
  font-weight: 900;
  line-height: 1.2;
}

.hftp-gateway-heading p {
  margin: 0;
  color: #52616b;
  font-size: 14px;
  line-height: 1.55;
}

.hftp-gateway-map {
  position: relative;
  max-width: 880px;
  margin: 0 auto 16px;
}

.hftp-gateway-map > img {
  display: block;
  width: 100%;
  height: auto;
}

.hftp-hawaii-beacon {
  position: absolute;
  bottom: 0.5%;
  left: 16.5%;
  z-index: 1;
  display: grid;
  min-width: 112px;
  place-items: center;
  color: #137a62;
  pointer-events: none;
  transform: translateX(-50%);
}

.hftp-hawaii-beacon::before,
.hftp-hawaii-beacon::after {
  position: absolute;
  top: 39%;
  left: 50%;
  width: 62px;
  height: 62px;
  border: 1px solid rgba(29, 151, 113, 0.42);
  border-radius: 50%;
  content: "";
  transform: translate(-50%, -50%) scale(0.55);
  animation: hftp-hawaii-pulse 3.6s ease-out infinite;
}

.hftp-hawaii-beacon::after {
  animation-delay: 1.8s;
}

.hftp-hawaii-beacon i {
  position: relative;
  z-index: 1;
  font-size: clamp(48px, 6.4vw, 64px);
  font-style: normal;
  line-height: 0.9;
  text-shadow:
    0 0 8px rgba(29, 151, 113, 0.5),
    0 0 22px rgba(29, 151, 113, 0.28);
  animation: hftp-hawaii-breathe 3.6s ease-in-out infinite;
}

.hftp-hawaii-beacon > span {
  position: relative;
  z-index: 2;
  margin-top: 2px;
  padding: 3px 7px;
  border: 1px solid rgba(29, 151, 113, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(19, 58, 84, 0.12);
  color: #12694f;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.hftp-hawaii-beacon b {
  padding: 0 2px;
  color: #1d9771;
}

@keyframes hftp-hawaii-pulse {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.55);
  }
  18% {
    opacity: 0.78;
  }
  74%,
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.28);
  }
}

@keyframes hftp-hawaii-breathe {
  0%,
  100% {
    opacity: 0.82;
    transform: scale(0.98);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

.hftp-map-link {
  position: absolute;
  top: var(--hftp-y);
  left: var(--hftp-x);
  z-index: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #174c73;
  text-decoration: none;
  transform: translate(-50%, -50%);
}

.hftp-map-link::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #1866b4;
  box-shadow: 0 1px 5px rgba(19, 58, 84, 0.35);
  content: "";
  transform: translate(-50%, -50%);
}

.hftp-map-link:hover::before,
.hftp-map-link:focus-visible::before,
.hftp-map-link.is-selected::before {
  background: #1d9771;
  transform: translate(-50%, -50%) scale(1.22);
}

.hftp-map-code {
  position: absolute;
  top: calc(50% + var(--hftp-label-y));
  left: calc(50% + var(--hftp-label-x));
  padding: 2px 5px;
  border: 1px solid #bfd0da;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.94);
  color: #174c73;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.hftp-map-link:hover .hftp-map-code,
.hftp-map-link:focus-visible .hftp-map-code,
.hftp-map-link.is-selected .hftp-map-code {
  border-color: #1d9771;
  color: #12694f;
}

.hftp-quick-routes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.hftp-quick-route {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #d3e0e8;
  border-radius: 7px;
  background: #f8fbfd;
  color: #284454;
  font-size: 12px;
  line-height: 1.25;
  text-decoration: none;
}

.hftp-quick-route strong {
  color: #174c73;
  font-size: 13px;
}

.hftp-quick-route span {
  min-width: 0;
}

.hftp-quick-route i {
  color: #1866b4;
  font-size: 10px;
}

.hftp-quick-route:hover,
.hftp-quick-route.is-selected {
  border-color: #1d9771;
  background: #eef9f5;
  color: #23473a;
}

.hftp-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 20px;
  border: 1px solid #d9e5ed;
  border-radius: 10px;
  background: #fff;
}

.hftp-form-intro {
  grid-column: 1 / -1;
  margin: 0;
  color: #465763;
  font-size: 15px;
  line-height: 1.55;
}

.hftp-form-intro strong {
  color: #263b49;
}

.hftp-field label {
  display: block;
  margin: 0 0 7px;
  color: #263b49;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}

.hftp-field label span {
  color: #6b7780;
  font-size: 12px;
  font-weight: 600;
}

.hftp-field select,
.hftp-field input {
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 10px 38px 10px 12px;
  border: 1px solid #bccbd5;
  border-radius: 8px;
  background-color: #fff;
  color: #202b32;
  font: inherit;
  font-size: 16px;
  box-sizing: border-box;
}

.hftp-field input {
  padding-right: 12px;
}

.hftp-field select:focus,
.hftp-field input:focus,
.hftp-submit:focus-visible,
.hftp-copy:focus-visible,
.hftp-actions a:focus-visible,
.hftp-map-link:focus-visible,
.hftp-quick-route:focus-visible {
  outline: 3px solid rgba(24, 102, 180, 0.28);
  outline-offset: 2px;
}

.hftp-field select:disabled {
  background: #f2f4f5;
  color: #7d878d;
}

.hftp-submit-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 2px;
}

.hftp-submit {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border: 0;
  border-radius: 8px;
  background: #1866b4;
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
}

.hftp-submit:hover {
  background: #124f8c;
}

.hftp-submit-row p {
  margin: 0;
  color: #66757f;
  font-size: 13px;
  line-height: 1.45;
}

.hftp-result {
  margin-top: 20px;
  padding: 20px;
  border-radius: 10px;
  background: #16364b;
  color: #fff;
}

.hftp-result[hidden] {
  display: none;
}

.hftp-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.hftp-kicker {
  display: block;
  margin-bottom: 7px;
  color: #91d8bd;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-transform: uppercase;
}

.hftp-route-identity {
  display: grid;
  grid-template-columns: minmax(115px, auto) minmax(54px, 90px) minmax(115px, auto);
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.hftp-route-airport {
  display: grid;
  min-width: 0;
}

.hftp-route-airport > span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-transform: uppercase;
}

.hftp-route-airport strong {
  display: block;
  margin: 2px 0 1px;
  color: #fff;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1;
}

.hftp-route-airport small {
  overflow: hidden;
  color: #b9e5d5;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hftp-route-airport-arrival {
  text-align: right;
}

.hftp-route-connector {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #91d8bd;
}

.hftp-route-connector span {
  height: 1px;
  flex: 1 1 auto;
  background: rgba(145, 216, 189, 0.5);
}

.hftp-route-connector i {
  flex: 0 0 auto;
  font-size: 16px;
  transform: rotate(12deg);
}

.hftp-result-head h3 {
  margin: 0;
  color: #fff;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.2;
}

.hftp-copy {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.hftp-copy:hover {
  background: rgba(255, 255, 255, 0.16);
}

.hftp-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.hftp-stat {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.hftp-stat-primary {
  border-color: rgba(93, 210, 166, 0.54);
  background: rgba(29, 151, 113, 0.22);
}

.hftp-stat span,
.hftp-stat small {
  display: block;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  line-height: 1.35;
}

.hftp-stat strong {
  display: block;
  margin: 7px 0 6px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.15;
}

.hftp-guidance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.hftp-guidance {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
  padding: 14px;
  border-radius: 8px;
  background: #fff;
  color: #2e3c45;
}

.hftp-guidance > i {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #edf6fd;
  color: #1866b4;
  font-size: 16px;
  line-height: 34px;
  text-align: center;
}

.hftp-guidance h4 {
  margin: 0 0 5px;
  color: #172d3d;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
}

.hftp-guidance p {
  margin: 0;
  color: #4d5a62;
  font-size: 14px;
  line-height: 1.52;
}

.hftp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.hftp-actions a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 39px;
  padding: 8px 12px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.hftp-actions a:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  text-decoration: none;
}

.hftp-method {
  margin-top: 14px;
  color: #52616b;
  font-size: 13px;
  line-height: 1.55;
}

.hftp-method summary {
  color: #245f8f;
  font-weight: 800;
  cursor: pointer;
}

.hftp-method p {
  margin: 9px 0 0;
}

.hftp-noscript {
  margin: 14px 0 0;
  padding: 12px;
  border: 1px solid #e5c766;
  border-radius: 8px;
  background: #fff8d7;
  color: #5c4b11;
  font-size: 14px;
}

@media (max-width: 820px) {
  .hftp-heading {
    grid-template-columns: 1fr;
    gap: 10px;
  }

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

  .hftp-gateway-heading {
    grid-template-columns: 1fr;
    gap: 7px;
  }

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

@media (max-width: 600px) {
  .hftp {
    padding: 18px 14px;
    border-radius: 9px;
  }

  .hftp-heading h2 {
    font-size: 25px;
  }

  .hftp-gateways {
    padding: 15px;
  }

  .hftp-gateway-heading h3 {
    font-size: 21px;
  }

  .hftp-gateway-map {
    display: none;
  }

  .hftp-form {
    grid-template-columns: 1fr;
    padding: 15px;
  }

  .hftp-submit-row {
    display: block;
  }

  .hftp-submit {
    width: 100%;
  }

  .hftp-submit-row p {
    margin-top: 10px;
  }

  .hftp-result {
    padding: 16px 12px;
  }

  .hftp-result-head {
    display: block;
  }

  .hftp-route-identity {
    grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr);
    gap: 6px;
  }

  .hftp-route-airport strong {
    font-size: 30px;
  }

  .hftp-route-airport small {
    overflow: visible;
    white-space: normal;
  }

  .hftp-copy {
    margin-top: 12px;
  }

  .hftp-stat-grid,
  .hftp-guidance-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 350px) {
  .hftp-route-airport small {
    font-size: 12px;
  }

  .hftp-actions {
    display: block;
  }

  .hftp-actions a {
    display: flex;
    width: 100%;
    margin-top: 8px;
    white-space: normal;
    box-sizing: border-box;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hftp-hawaii-beacon::before,
  .hftp-hawaii-beacon::after,
  .hftp-hawaii-beacon i {
    animation: none;
  }

  .hftp-hawaii-beacon::before {
    opacity: 0.35;
    transform: translate(-50%, -50%) scale(0.82);
  }

  .hftp-hawaii-beacon::after {
    display: none;
  }
}

@media (max-width: 350px) {
  .hftp-quick-routes {
    grid-template-columns: 1fr;
  }
}
