/* V7 Mortgage Hub */
.hub-page .hub-hero,
.tool-page .tool-hero {
  background:
    radial-gradient(circle at 15% 15%, rgba(214,173,97,.24), transparent 30%),
    linear-gradient(135deg, #08172f 0%, #0d3b78 100%);
}

.hub-tools-section { background: #f5f8fc; }
.hub-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.hub-tool-card {
  display: block;
  min-height: 320px;
  padding: 34px;
  border-radius: 30px;
  background: #fff;
  border: 1px solid rgba(8,23,47,.07);
  box-shadow: 0 22px 52px rgba(8,23,47,.09);
  color: var(--hyf-ink);
  text-decoration: none;
  transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .35s cubic-bezier(.22,1,.36,1), border-color .35s ease;
  position: relative;
  overflow: hidden;
}
.hub-tool-card::after {
  content: "";
  position: absolute;
  inset: auto -30% -45% -30%;
  height: 180px;
  background: radial-gradient(circle, rgba(214,173,97,.18), transparent 62%);
  opacity: 0;
  transition: opacity .35s ease;
}
.hub-tool-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 30px 70px rgba(8,23,47,.14);
  border-color: rgba(214,173,97,.38);
}
.hub-tool-card:hover::after { opacity: 1; }
.hub-tool-card.featured {
  background: linear-gradient(145deg, #08172f 0%, #0d3b78 100%);
  color: #fff;
}
.hub-tool-card.featured p { color: rgba(255,255,255,.80); }
.hub-tool-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(214,173,97,.14);
  color: var(--hyf-gold);
  font-weight: 900;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 24px;
}
.hub-tool-card h2 {
  margin: 0 0 14px;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.1;
}
.hub-tool-card p {
  margin: 0 0 26px;
  color: #536174;
  line-height: 1.65;
}
.hub-tool-card strong {
  color: var(--hyf-gold);
  font-size: .98rem;
}
.hub-disclaimer {
  margin-top: 26px;
  padding: 20px 24px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(8,23,47,.06);
  color: #536174;
  line-height: 1.65;
  box-shadow: 0 14px 34px rgba(8,23,47,.06);
}
.wide-check {
  grid-column: 1 / -1;
  display: flex !important;
  align-items: center;
  gap: 12px !important;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid rgba(8,23,47,.12);
  border-radius: 16px;
  background: #f8fafc;
}
.wide-check input {
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 auto;
}
.schedule-table tbody td:first-child[colspan] { text-align: center; }
.btl-page .schedule-table { min-width: 0; }
.btl-page .schedule-table td {
  text-align: left;
}
.btl-summary-row td:first-child { font-weight: 800; color: var(--hyf-ink); }
.btl-summary-row td:last-child { text-align: right; font-weight: 900; }
@media (max-width: 980px) {
  .hub-tool-grid { grid-template-columns: 1fr; }
  .hub-tool-card { min-height: auto; }
}
@media (max-width: 640px) {
  .hub-tool-card { padding: 26px; border-radius: 24px; }
  .hub-disclaimer { padding: 18px; }
  .wide-check { align-items: flex-start; }
  .result-highlight strong { font-size: clamp(1.75rem, 11vw, 2.5rem); }
}


/* V8 premium hub cards */
.hub-page .v8-hub-hero {
  min-height: 430px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hub-page .v8-hub-hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(217,182,109,.20), transparent 62%);
}
.hub-page .v8-hub-hero .calculator-hero-inner { position: relative; z-index: 1; }
.hub-page .v8-hub-tool-grid { gap: 28px; }
.hub-page .hub-tool-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.hub-page .hub-tool-visual {
  width: 66px;
  height: 66px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(13,59,120,.12), rgba(217,182,109,.16));
  margin-bottom: 22px;
  position: relative;
}
.hub-page .hub-tool-visual::before {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 2px solid currentColor;
  color: var(--hyf-gold);
  box-shadow: 10px 10px 0 rgba(13,59,120,.14);
}
.hub-page .hub-tool-card.featured .hub-tool-visual {
  background: rgba(255,255,255,.12);
}
.hub-page .hub-tool-card.featured .hub-tool-visual::before { color: var(--hyf-champagne); box-shadow: 10px 10px 0 rgba(255,255,255,.12); }
.hub-page .hub-tool-card strong { margin-top: auto; }
@media (max-width: 640px) {
  .hub-page .v8-hub-hero { min-height: 360px; }
  .hub-page .hub-tool-visual { width: 56px; height: 56px; border-radius: 18px; }
  .hub-page .hub-tool-card { min-height: auto; }
}

/* V9.0.7 Edge Mortgage Hub card stability */
@media (min-width: 981px) {
  html.is-edge .hub-tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-items: stretch !important;
  }
  html.is-edge .hub-tool-card {
    min-width: 0 !important;
    min-height: 330px !important;
    transform: none;
  }
  html.is-edge .hub-tool-card:hover {
    transform: translateY(-4px) !important;
  }
}
