/* =============================================================
   HUB POLISH — 2026
   Shared visual refinements for the 10 hub surfaces.
   Loaded AFTER the extracted base sheets so it can override
   without touching legacy rules. No new components; only
   tightening, rhythm, hierarchy and premium cues.
   ============================================================= */

:root {
  --hp-hairline: rgba(198, 163, 84, 0.45);
  --hp-card-border: rgba(39, 62, 87, 0.09);
  --hp-card-border-strong: rgba(39, 62, 87, 0.18);
  --hp-card-shadow:
    0 1px 2px rgba(20, 38, 63, 0.04), 0 8px 24px rgba(20, 38, 63, 0.05);
  --hp-card-shadow-hover:
    0 2px 4px rgba(20, 38, 63, 0.05), 0 20px 40px rgba(20, 38, 63, 0.09);
  --hp-surface-soft: #f6f9fd;
}

/* ---------- 1. Nav rhythm ---------- */
.nav {
  border-bottom: 1px solid rgba(39, 62, 87, 0.07);
  backdrop-filter: saturate(1.1) blur(8px);
  -webkit-backdrop-filter: saturate(1.1) blur(8px);
  background: rgba(255, 255, 255, 0.86);
}
.nav-inner {
  min-height: var(--nav-h, 64px);
}
.nav-links {
  gap: 2px;
}
.nav-link {
  padding: 8px 12px;
  border-radius: 8px;
  transition:
    background 150ms ease,
    color 150ms ease;
}
.nav .nav-links > a.nav-link-locked {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}
.nav .nav-links > a.nav-link-locked .nav-lock-icon {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  max-width: none;
  opacity: 0.72;
}
.nav .nav-links > a.nav-link-live.nav-link-locked {
  gap: 6px;
}
.nav .nav-links > a.nav-link-live .nav-live-dot {
  flex: 0 0 6px;
}
.nav .nav-links > a.nav-link:hover,
.nav .nav-links > a.nav-link:focus-visible {
  background: rgba(39, 62, 87, 0.04);
  color: #c6a354 !important;
}
.nav-link.is-active {
  background: rgba(39, 62, 87, 0.06);
  color: var(--clr-primary, #273e57);
}
.nav .nav-links > a.nav-link[href$="pricing.html"],
.nav .nav-links > a.nav-link[href$="/pricing"],
.nav .nav-links > a.nav-link[href$="pricing"],
.mobile-menu .mobile-menu-links > a[href$="pricing.html"],
.mobile-menu .mobile-menu-links > a[href$="/pricing"],
.mobile-menu .mobile-menu-links > a[href$="pricing"] {
  color: #c6a354 !important;
}
.nav .nav-links > a.nav-link[href$="pricing.html"]:hover,
.nav .nav-links > a.nav-link[href$="pricing.html"]:focus-visible,
.nav .nav-links > a.nav-link[href$="/pricing"]:hover,
.nav .nav-links > a.nav-link[href$="/pricing"]:focus-visible,
.nav .nav-links > a.nav-link[href$="pricing"]:hover,
.nav .nav-links > a.nav-link[href$="pricing"]:focus-visible,
.mobile-menu .mobile-menu-links > a[href$="pricing.html"]:hover,
.mobile-menu .mobile-menu-links > a[href$="pricing.html"]:focus-visible,
.mobile-menu .mobile-menu-links > a[href$="/pricing"]:hover,
.mobile-menu .mobile-menu-links > a[href$="/pricing"]:focus-visible,
.mobile-menu .mobile-menu-links > a[href$="pricing"]:hover,
.mobile-menu .mobile-menu-links > a[href$="pricing"]:focus-visible {
  color: #e6d09a !important;
  text-shadow: 0 0 14px rgba(198, 163, 84, 0.55);
}
.nav-actions .btn.btn-sm {
  height: 34px;
  padding-inline: 14px;
}
@media (min-width: 641px) {
  .nav-actions > .btn.btn-primary[data-nav-free-simulator] {
    min-width: 154px;
    justify-content: center;
    white-space: nowrap;
  }
}
.nav-sep {
  width: 1px;
  height: 22px;
  background: rgba(39, 62, 87, 0.12);
  display: inline-block;
  margin: 0 2px;
}
@media (max-width: 1120px) {
  .nav-inner {
    gap: 16px;
  }
  .nav .nav-links > a.nav-link {
    padding-inline: 9px;
  }
  .nav .nav-links > a.nav-link-locked {
    gap: 4px;
  }
  .nav .nav-links > a.nav-link-locked .nav-lock-icon {
    width: 11px;
    height: 11px;
    flex-basis: 11px;
  }
}
.nav-admin-tools {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  margin-right: 6px;
}
@media (min-width: 961px) {
  .nav-admin-tools {
    flex-basis: 154px;
    width: 154px;
    justify-content: flex-end;
    margin-right: 0;
  }
  .nav-tool-btn--preview {
    width: 112px;
    padding-inline: 10px;
  }
  .nav-tool-btn--preview > span:not(.nav-tool-count) {
    display: none;
  }
  .nav-tool-count {
    min-width: 28px;
  }
}

body.hub-nav-admin .nav-actions > [data-nav-free-simulator],
body.hub-nav-admin .mobile-menu-footer [data-nav-free-simulator],
html[data-epso-owner-state="owner"] .nav-actions > [data-nav-free-simulator],
html[data-epso-owner-state="owner-pending"]
  .nav-actions
  > [data-nav-free-simulator],
html[data-epso-owner-state="owner"]
  .mobile-menu-footer
  [data-nav-free-simulator],
html[data-epso-owner-state="owner-pending"]
  .mobile-menu-footer
  [data-nav-free-simulator] {
  display: none !important;
}

@supports selector(:has(*)) {
  @media (min-width: 961px) {
    body.hub-nav-admin .nav-actions:not(:has([data-admin-tools-root]))::before,
    html[data-epso-owner-state="owner"]
      .nav-actions:not(:has([data-admin-tools-root]))::before,
    html[data-epso-owner-state="owner-pending"]
      .nav-actions:not(:has([data-admin-tools-root]))::before {
      content: "";
      display: block;
      flex: 0 0 154px;
      width: 154px;
      height: 34px;
    }
  }
}

.nav-tool-wrap {
  position: relative;
  display: inline-flex;
}
.nav-tool-btn {
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  border: 1px solid rgba(39, 62, 87, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: #415570;
  padding: 0 12px;
  cursor: pointer;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease,
    color 150ms ease,
    box-shadow 150ms ease;
  box-shadow: 0 8px 18px rgba(20, 38, 63, 0.04);
}
.nav-tool-btn:hover,
.nav-tool-wrap.is-open .nav-tool-btn {
  transform: translateY(-1px);
  color: #223750;
  border-color: rgba(39, 62, 87, 0.22);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 28px rgba(20, 38, 63, 0.1);
}
.nav-tool-btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}
.nav-tool-btn--admin {
  width: 34px;
  padding: 0;
  border-color: rgba(198, 163, 84, 0.35);
  color: #8a6c1e;
  background:
    radial-gradient(
      circle at 50% 10%,
      rgba(198, 163, 84, 0.18),
      transparent 60%
    ),
    rgba(255, 250, 239, 0.94);
}
.nav-tool-btn--admin:hover,
.nav-tool-wrap.is-open .nav-tool-btn--admin {
  color: #6f5315;
  border-color: rgba(198, 163, 84, 0.5);
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(198, 163, 84, 0.24),
      transparent 62%
    ),
    rgba(255, 248, 232, 1);
}
.nav-tool-btn--preview {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.nav-tool-count {
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(39, 62, 87, 0.08);
  color: #223750;
  font-size: 11px;
  font-weight: 700;
}
.nav-tool-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  max-height: min(70vh, 640px);
  overflow: auto;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(39, 62, 87, 0.1);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(247, 250, 253, 0.98) 100%
  );
  box-shadow: 0 24px 60px rgba(20, 38, 63, 0.18);
  display: none;
  z-index: 280;
}
.nav-tool-dropdown--wide {
  width: 390px;
}
.nav-tool-wrap.is-open .nav-tool-dropdown {
  display: block;
}
.nav-tool-dropdown-head {
  display: grid;
  gap: 3px;
  padding: 10px 12px 12px;
  margin-bottom: 4px;
}
.nav-tool-dropdown-head strong {
  font-family: "Inter Tight", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #1f334b;
}
.nav-tool-dropdown-head span {
  font-size: 12px;
  line-height: 1.45;
  color: #60748e;
}
.nav-tool-group + .nav-tool-group {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(39, 62, 87, 0.08);
}
.nav-tool-group-title {
  padding: 6px 12px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #77879e;
}
.nav-tool-link {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #20324a;
  transition:
    background 150ms ease,
    transform 150ms ease,
    color 150ms ease;
}
.nav-tool-link:hover {
  background: rgba(39, 62, 87, 0.055);
  color: #15273d;
  transform: translateX(1px);
}
.nav-tool-link-title {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
}
.nav-tool-link-meta {
  font-size: 11px;
  line-height: 1.35;
  color: #6f8097;
  word-break: break-all;
}
.nav-tool-group--view-as {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(39, 62, 87, 0.1);
}
.nav-tool-view-as-hint {
  padding: 0 12px 8px;
  font-size: 11px;
  line-height: 1.4;
  color: #6f8097;
}
.nav-tool-view-as-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 12px 4px;
}
.nav-tool-view-as-chip {
  appearance: none;
  border: 1px solid rgba(39, 62, 87, 0.18);
  background: rgba(255, 255, 255, 0.85);
  color: #20324a;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 150ms ease,
    color 150ms ease,
    border-color 150ms ease,
    transform 150ms ease;
}
.nav-tool-view-as-chip:hover {
  background: rgba(39, 62, 87, 0.08);
  border-color: rgba(39, 62, 87, 0.3);
}
.nav-tool-view-as-chip.is-active {
  background: #15273d;
  border-color: #15273d;
  color: #ffffff;
}
.nav-tool-view-as-chip.is-active:hover {
  background: #0e1a2c;
  color: #ffffff;
}
.mobile-tool-root {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(39, 62, 87, 0.09);
}
.mobile-tool-group {
  border: 1px solid rgba(39, 62, 87, 0.08);
  border-radius: 14px;
  background: rgba(246, 249, 253, 0.86);
}
.mobile-tool-group + .mobile-tool-group {
  margin-top: 10px;
}
.mobile-tool-summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #223750;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-tool-summary::-webkit-details-marker {
  display: none;
}
.mobile-tool-summary::after {
  content: "+";
  font-size: 18px;
  line-height: 1;
  color: #6a7e97;
}
.mobile-tool-group[open] .mobile-tool-summary::after {
  content: "-";
}
.mobile-tool-panel {
  display: grid;
  gap: 6px;
  padding: 0 10px 10px;
}
.mobile-tool-panel .mobile-tool-group-title {
  padding: 8px 8px 2px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7a8ba1;
}
.mobile-tool-panel a {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.85);
  color: #21354d;
}
.mobile-tool-link-title {
  font-size: 13px;
  font-weight: 650;
}
.mobile-tool-link-meta {
  font-size: 11px;
  line-height: 1.35;
  color: #70839c;
  word-break: break-all;
}

/* ---------- 2. Page heads ---------- */
.page-head,
.page-head-compact {
  position: relative;
}
.page-head .eyebrow,
.page-head-compact .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 650;
  color: var(--clr-primary-400, #3d5a7a);
}
.page-head h1 {
  letter-spacing: -0.025em;
  line-height: 1.08;
}
.page-head .lead {
  line-height: 1.55;
  color: var(--clr-text-muted, #4a5a73);
}
.page-head.center h1 {
  text-wrap: balance;
  max-width: 22ch;
  margin-inline: auto;
}

/* Gold hairline accent below page heads — premium cue, one pixel tall */
.page-head::after,
.page-head-compact::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(880px, 82%);
  height: 2px;
  border-radius: 2px;
  transform: translateX(-50%);
  background: var(--hp-hairline);
  opacity: 0.9;
}

/* ---------- 3. Sections & rhythm ---------- */
.section {
  padding-block: clamp(48px, 6vw, 88px);
}
.section-tight {
  padding-block: clamp(28px, 4vw, 48px);
}
.section-head {
  margin-bottom: clamp(24px, 3vw, 40px);
}
.section-head .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 650;
  color: var(--clr-primary-400, #3d5a7a);
}
.section-head h2 {
  letter-spacing: -0.02em;
  line-height: 1.12;
}

/* ---------- 4. Cards (mod-card baseline) ---------- */
.mod-card {
  border-color: var(--hp-card-border);
  border-radius: 14px;
  padding: 22px 22px 20px;
  gap: 8px;
  box-shadow: var(--hp-card-shadow);
}
.mod-card:hover {
  border-color: var(--hp-card-border-strong);
  box-shadow: var(--hp-card-shadow-hover);
  transform: translateY(-1px);
}
.mod-card h3 {
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  margin: 0;
}
.mod-card p {
  font-size: 0.8875rem;
  margin: 0;
}
.mod-card .mod-meta,
.mod-card .mod-foot {
  border-top: 1px solid var(--hp-card-border);
  margin-top: 14px;
  padding-top: 12px;
}
.mod-card .mod-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* Accent rail for "internal" single-column contexts (dashboard/study/training-area)
   Only applies when the grid contains at most 3 simple cards. */
.catalog-grid > .mod-card,
.builder-grid > .builder-card-wrap > .builder {
  position: relative;
  overflow: hidden;
}
.catalog-grid > .mod-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(
    180deg,
    rgba(198, 163, 84, 0) 0%,
    rgba(198, 163, 84, 0.9) 50%,
    rgba(198, 163, 84, 0) 100%
  );
  opacity: 0;
  transition: opacity 200ms ease;
}
.catalog-grid > .mod-card:hover::before {
  opacity: 1;
}

/* ---------- 5. Builder grid (training-area) ---------- */
.builder-grid {
  gap: 16px;
}
.builder {
  border-color: var(--hp-card-border);
  border-radius: 14px !important;
  padding: 20px 22px;
  box-shadow: var(--hp-card-shadow);
  transition:
    border-color 200ms ease,
    box-shadow 200ms ease,
    transform 200ms ease;
}
.builder:hover {
  border-color: var(--hp-card-border-strong);
  box-shadow: var(--hp-card-shadow-hover);
  transform: translateY(-1px);
}
.builder-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, #f3f6fb 0%, #e7edf4 100%);
  color: var(--clr-primary, #273e57);
  font-weight: 700;
  font-size: 18px;
  border: 1px solid var(--hp-card-border);
}

/* ---------- 6. Panels (progress / profile) ---------- */
.panel {
  border-color: var(--hp-card-border);
  border-radius: 16px;
  box-shadow: var(--hp-card-shadow);
}
.panel-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hp-card-border);
  margin-bottom: 18px !important;
}
.panel-head h3 {
  letter-spacing: -0.01em;
}

/* ---------- 7. KPI cards ---------- */
.kpi-card {
  border-color: var(--hp-card-border);
  border-radius: 14px;
  box-shadow: var(--hp-card-shadow);
  transition:
    box-shadow 200ms ease,
    border-color 200ms ease;
}
.kpi-card:hover {
  box-shadow: var(--hp-card-shadow-hover);
  border-color: var(--hp-card-border-strong);
}
.kpi-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px;
  font-weight: 650;
  color: var(--clr-text-muted, #4a5a73);
}
.kpi-value {
  letter-spacing: -0.03em;
  font-weight: 700;
}

/* ---------- 8. Pricing cards ---------- */
.price-card {
  border-color: var(--hp-card-border);
  border-radius: 18px;
  padding: 28px 26px;
  box-shadow: var(--hp-card-shadow);
  transition:
    box-shadow 200ms ease,
    transform 200ms ease,
    border-color 200ms ease;
}
.price-card:hover {
  box-shadow: var(--hp-card-shadow-hover);
  transform: translateY(-2px);
}
.price-card.is-featured {
  border-color: rgba(198, 163, 84, 0.5);
  box-shadow:
    0 2px 4px rgba(20, 38, 63, 0.05),
    0 24px 48px rgba(168, 133, 60, 0.12);
}
.price-card .price-num {
  letter-spacing: -0.035em;
  font-weight: 700;
}
.price-ribbon {
  letter-spacing: 0.08em;
}

/* Compare table — readability + mobile */
.compare th,
.compare td {
  padding: 14px 16px;
  font-size: 0.9375rem;
}
.compare thead th {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: var(--clr-text-muted, #4a5a73);
  border-bottom: 1px solid var(--hp-card-border-strong);
}
.compare tbody tr + tr td {
  border-top: 1px solid var(--hp-card-border);
}
.compare .is-featured {
  background: rgba(198, 163, 84, 0.04);
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--hp-card-border);
  border-radius: 14px;
  background: #fff;
}
@media (max-width: 700px) {
  html[data-hub-page="pricing"] .section {
    padding-block: 36px;
  }
  html[data-hub-page="pricing"] .section.bg-soft {
    padding-top: 32px;
  }
  html[data-hub-page="pricing"] .section-head {
    margin-bottom: 18px;
  }
  html[data-hub-page="pricing"] .table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  html[data-hub-page="pricing"] .compare {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 12px;
  }
  html[data-hub-page="pricing"] .compare thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  html[data-hub-page="pricing"] .compare,
  html[data-hub-page="pricing"] .compare tbody,
  html[data-hub-page="pricing"] .compare tr,
  html[data-hub-page="pricing"] .compare td {
    display: block;
    width: 100%;
  }
  html[data-hub-page="pricing"] .compare tr {
    overflow: hidden;
    border: 1px solid var(--hp-card-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(20, 38, 63, 0.06);
  }
  html[data-hub-page="pricing"] .compare td {
    display: grid;
    grid-template-columns: minmax(96px, 0.42fr) minmax(0, 0.58fr);
    gap: 12px;
    align-items: start;
    padding: 13px 15px;
    border-bottom: 1px solid var(--hp-card-border);
    color: var(--clr-text, #1a2c42);
  }
  html[data-hub-page="pricing"] .compare td::before {
    color: var(--clr-text-muted, #4a5a73);
    content: "Feature";
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  html[data-hub-page="pricing"] .compare td:nth-child(2)::before {
    content: "Free";
  }
  html[data-hub-page="pricing"] .compare td:nth-child(3)::before {
    content: "Plus";
  }
  html[data-hub-page="pricing"] .compare td:nth-child(4)::before {
    content: "Pro";
  }
  html[data-hub-page="pricing"] .compare td:first-child {
    display: block;
    background: var(--clr-primary, #273e57);
    color: #fff;
    font-weight: 750;
  }
  html[data-hub-page="pricing"] .compare td:first-child::before {
    content: "";
    display: none;
  }
  html[data-hub-page="pricing"] .compare td:last-child {
    border-bottom: 0;
  }
  html[data-hub-page="pricing"] .compare .is-featured {
    background: rgba(198, 163, 84, 0.08);
  }
}

/* ---------- 9. Footer CTA block ---------- */
.footer-cta {
  padding-block: clamp(28px, 4vw, 46px);
  text-align: center;
  background:
    linear-gradient(
      135deg,
      rgba(39, 62, 87, 0.05) 0%,
      rgba(198, 163, 84, 0.08) 48%,
      rgba(255, 255, 255, 0.94) 100%
    ),
    #fbfcfe;
  border-top: 1px solid var(--hp-card-border);
  border-bottom: 1px solid var(--hp-card-border);
}
.footer-cta .container {
  max-width: 980px;
}
.footer-cta .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10px;
  font-weight: 760;
  color: var(--clr-primary-400, #3d5a7a);
  justify-content: center;
}
.footer-cta h2 {
  font-size: clamp(1.35rem, 2.35vw, 2rem);
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 8px auto 14px;
  max-width: 26ch;
  text-wrap: balance;
}
.footer-cta-actions {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}
.footer-cta-actions .btn {
  min-height: 38px;
}
.footer-cta-actions .btn-lg {
  padding: 10px 17px;
  font-size: 14px;
}
.footer-cta-actions .btn-sm {
  padding: 8px 13px;
  font-size: 13px;
}

/* Unified footer cols — only pad when actually has grid */
.footer-cols {
  background: #fff;
}
.footer-cols:has(.footer-grid) {
  padding-block: 56px 28px;
}
.footer-cols:not(:has(.footer-grid)) {
  padding-block: 20px 24px;
}
.footer-cols:not(:has(.footer-grid)) .footer-bottom {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  justify-content: center;
  gap: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(4, 1fr);
  gap: 32px;
}
.footer-grid h5 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--clr-text-muted, #4a5a73);
  margin-bottom: 12px;
  font-weight: 650;
}
.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.footer-grid a,
.footer-grid span {
  font-size: 13.5px;
  color: var(--clr-text, #1a2c42);
  text-decoration: none;
}
.footer-grid a:hover {
  color: var(--clr-primary, #273e57);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--hp-card-border);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: var(--clr-text-subtle, #8fa0b5);
}
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}
@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 4px;
  }
}

/* ---------- 10. Hero stats (index) ---------- */
.hero-stats-row {
  gap: 20px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--hp-card-border);
  border-radius: 14px;
  box-shadow: var(--hp-card-shadow);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hero-stat-item strong {
  font-family: var(--font-display, "Space Grotesk", sans-serif);
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  color: var(--clr-primary, #273e57);
}
.hero-stat-item span {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--clr-text-muted, #4a5a73);
}
.hero-stat-sep {
  background: rgba(39, 62, 87, 0.1);
}
@media (max-width: 640px) {
  .hero-stats-row {
    flex-wrap: wrap;
    row-gap: 14px;
  }
  .hero-stat-sep {
    display: none;
  }
}

/* ---------- 11. Progress hero balance ---------- */
.progress-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
}
.progress-hero-actions {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
}
@media (max-width: 720px) {
  .progress-hero {
    grid-template-columns: 1fr;
  }
  .progress-hero-actions {
    justify-content: flex-start;
  }
}

/* ---------- 12. Eyebrow unification ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 650;
  color: var(--clr-primary-400, #3d5a7a);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

/* ---------- 13. Buttons: subtle consistency ---------- */
.btn {
  letter-spacing: -0.005em;
  font-weight: 600;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease,
    border-color 150ms ease;
}
.btn-lg {
  height: 46px;
  padding-inline: 22px;
  font-size: 15px;
}
.btn-sm {
  height: 34px;
  padding-inline: 14px;
  font-size: 13.5px;
}
.btn-primary {
  box-shadow:
    0 1px 2px rgba(20, 38, 63, 0.12),
    0 8px 24px rgba(20, 38, 63, 0.12);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 2px 4px rgba(20, 38, 63, 0.15),
    0 14px 30px rgba(20, 38, 63, 0.18);
}
.btn-gold {
  box-shadow:
    0 1px 2px rgba(168, 133, 60, 0.2),
    0 10px 24px rgba(168, 133, 60, 0.22);
}
.btn-gold:hover {
  transform: translateY(-1px);
}
.btn-ghost:hover {
  background: rgba(39, 62, 87, 0.04);
}
.btn-secondary {
  background: #fff;
  border: 1px solid var(--hp-card-border-strong);
  color: var(--clr-primary, #273e57);
}
.btn-secondary:hover {
  border-color: var(--clr-primary, #273e57);
  background: var(--hp-surface-soft);
}

/* ---------- 14. Billing toggle & chips ---------- */
.billing-toggle {
  display: inline-flex;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--hp-card-border);
  border-radius: 999px;
  box-shadow: var(--hp-card-shadow);
  margin-top: 22px;
}
.billing-toggle button {
  border: 0;
  background: transparent;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--clr-text-muted, #4a5a73);
  cursor: pointer;
  transition:
    background 150ms ease,
    color 150ms ease;
}
.billing-toggle button.is-on {
  background: var(--clr-primary, #273e57);
  color: #fff;
}

/* ---------- 15. Seg tabs refinement ---------- */
.seg-tabs {
  background: var(--hp-surface-soft);
  border-color: var(--hp-card-border);
  padding: 3px;
  border-radius: 10px;
}
.seg-tabs button {
  height: 32px;
  padding: 0 14px;
}
.seg-tabs button.is-on {
  box-shadow: 0 1px 2px rgba(20, 38, 63, 0.08);
}

/* ---------- 16. Mobile nav polish ---------- */
.mobile-menu {
  backdrop-filter: blur(10px);
}
.mobile-menu-links a {
  padding: 12px 4px;
  border-bottom: 1px solid var(--hp-card-border);
  font-weight: 550;
  letter-spacing: -0.005em;
}
.mobile-menu-links a.is-active {
  color: var(--clr-primary, #273e57);
  font-weight: 650;
}

/* ---------- 17. Responsive breathing on section-tight ---------- */
@media (max-width: 720px) {
  .section-tight {
    padding-block: 28px;
  }
  .page-head {
    padding-block: 48px 28px;
  }
  .page-head h1 {
    font-size: clamp(1.75rem, 7vw, 2.25rem);
  }
}

/* ---------- 18. Login surface refinement ---------- */
.login-card {
  border-color: var(--hp-card-border) !important;
  border-radius: 16px !important;
  box-shadow: var(--hp-card-shadow-hover);
}
.login-status {
  background: var(--hp-surface-soft);
  border: 1px solid var(--hp-card-border);
  border-radius: 12px;
  padding: 14px 16px;
}
.login-plan-item {
  border: 1px solid var(--hp-card-border);
  border-radius: 12px;
  padding: 14px 16px;
  background: #fff;
}

/* ---------- 19. Profile surface tightening ---------- */
.profile-field label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 650;
  color: var(--clr-text-muted, #4a5a73);
  margin-bottom: 6px;
  display: block;
}
.profile-input,
.profile-select {
  border-color: var(--hp-card-border);
  border-radius: 10px;
  height: 42px;
  padding-inline: 12px;
  font-size: 14px;
  background: #fff;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}
.profile-input:focus,
.profile-select:focus {
  border-color: var(--clr-primary-400, #3d5a7a);
  box-shadow: 0 0 0 3px rgba(39, 62, 87, 0.1);
  outline: none;
}

/* ---------- 20. Reduce visual noise ---------- */
/* Drop double stat separators on small screens */
@media (max-width: 520px) {
  .hero-stat-sep {
    display: none;
  }
  .hero-stats-row {
    gap: 14px 20px;
    justify-content: flex-start;
  }
}
/* (removed) Do not hide nested footer-bottom — it's the copyright on internal pages */

/* ---------- 21. Responsive hardening layer ---------- */
html {
  overflow-x: clip;
}
body {
  min-width: 0;
  overflow-x: clip;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}
img,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}
main,
section,
article,
header,
footer,
.container,
.section-inner,
.page-shell,
.page-main,
.card,
.plan-card,
.login-card,
.profile-card,
.pricing-grid,
.features-grid,
.dashboard-grid,
.hero-grid,
.form-grid,
.toolbar,
.filters,
.nav-inner,
.mobile-menu,
.modal,
[role="dialog"] {
  min-width: 0;
}
p,
li,
dd,
dt,
figcaption,
label,
.btn,
.chip,
.badge,
.card,
.plan-card,
.login-status,
.profile-field,
.footer-grid,
.mobile-menu-links a {
  overflow-wrap: anywhere;
}
table {
  max-width: 100%;
}
.table-wrap,
.data-table-wrap,
.responsive-table,
.admin-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
button,
.btn,
a[role="button"],
input,
select,
textarea,
summary {
  min-width: 0;
}
@media (max-width: 760px) {
  button,
  .btn,
  a[role="button"],
  summary,
  input[type="button"],
  input[type="submit"],
  input[type="reset"] {
    min-height: 44px;
  }

  .nav .nav-burger,
  .nav .nav-user-btn,
  .nav-actions > .btn.btn-primary[href*="simulator"] {
    min-height: 0;
  }

  .billing-toggle {
    max-width: 100%;
    overflow-x: auto;
  }
  .billing-toggle button,
  .seg-tabs button {
    min-height: 40px;
    white-space: nowrap;
  }
}
