/* ═══════════════════════════════════════════════════════════════════
   CALCPRO — Homepage V5 "Command OS"
   Homepage-only stylesheet. Does NOT touch /assets/css/style.css
   (shared by all 57 calculator pages, hubs, and blog — left untouched).
   Loaded only by index.html.
═══════════════════════════════════════════════════════════════════ */

html.hp-html, body.hp-body {
  margin: 0;
  background: #0A0E17;
}

.skip-link {
  position: absolute;
  top: -48px; left: 8px;
  background: #4C7EFF;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  z-index: 1000;
  transition: top 160ms ease;
}
.skip-link:focus { top: 8px; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.hp-page {
  --bg:            #0A0E17;
  --bg-2:          #0E1420;
  --surface:       rgba(255,255,255,0.045);
  --surface-solid: #121828;
  --surface-hover: rgba(255,255,255,0.07);
  --border:        rgba(255,255,255,0.09);
  --border-strong: rgba(255,255,255,0.16);
  --blue:          #4C7EFF;
  --blue-dim:      rgba(76,126,255,0.16);
  --violet:        #8B6CFF;
  --violet-dim:    rgba(139,108,255,0.16);
  --text-1:        #F3F5FA;
  --text-2:        #9CA5BD;
  --text-3:        #747D95;
  --success:       #22C55E;
  --warning:       #F0A93B;

  --sp-1: 8px;  --sp-2: 16px; --sp-3: 24px; --sp-4: 32px;
  --sp-5: 40px; --sp-6: 48px; --sp-7: 64px; --sp-8: 80px; --sp-9: 96px;

  --r-sm: 10px; --r-md: 16px; --r-lg: 22px; --r-xl: 28px; --r-full: 999px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.3), 0 2px 8px rgba(0,0,0,.2);
  --shadow-md: 0 8px 24px rgba(0,0,0,.35), 0 2px 8px rgba(0,0,0,.25);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.45), 0 4px 16px rgba(0,0,0,.3);
  --shadow-glow-blue:   0 0 0 1px var(--blue-dim), 0 8px 30px rgba(76,126,255,.18);
  --shadow-glow-violet: 0 0 0 1px var(--violet-dim), 0 8px 30px rgba(139,108,255,.18);

  --ease: cubic-bezier(.4,0,.2,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --fast: 160ms;
  --med:  280ms;
  --slow: 420ms;

  /* Type scale — one ratio used everywhere so heading/body proportions stay consistent */
  --fs-h1:   clamp(36px, 5.2vw, 56px);
  --fs-h2:   clamp(24px, 3vw, 32px);
  --fs-h3:   16.5px;
  --fs-body: 15.5px;
  --fs-sm:   13.5px;
  --fs-xs:   12px;
  --lh-tight: 1.1;
  --lh-normal: 1.55;

  background: var(--bg);
  color: var(--text-1);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow-x: hidden;
}

.hp-page * { box-sizing: border-box; }

.hp-page .hp-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--sp-3);
}

@media (min-width: 768px) {
  .hp-page .hp-container { padding: 0 var(--sp-5); }
}

.hp-page section { position: relative; }

.hp-page a { color: inherit; text-decoration: none; }

.hp-page ::selection { background: var(--blue-dim); color: var(--text-1); }

/* Respect reduced motion everywhere in the homepage */
@media (prefers-reduced-motion: reduce) {
  .hp-page *, .hp-page *::before, .hp-page *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ─────────────────────────── Eyebrow / section labels ─────────────────────────── */
.hp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: var(--sp-2);
}
.hp-eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-dim);
}

.hp-section-head { max-width: 640px; margin: 0 0 var(--sp-5); }
.hp-section-head h2 {
  font-size: var(--fs-h2);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: var(--lh-tight);
  margin: 0 0 10px;
  color: var(--text-1);
}
.hp-section-head p { font-size: var(--fs-body); color: var(--text-2); line-height: var(--lh-normal); margin: 0; }

.hp-section-foot {
  display: flex;
  justify-content: center;
  margin-top: var(--sp-4);
}

/* ═══════════════════════════ NAVIGATION ═══════════════════════════ */
.hp-nav {
  position: sticky;
  top: 0;
  z-index: 500;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--med) var(--ease), border-color var(--med) var(--ease), backdrop-filter var(--med) var(--ease);
}
.hp-nav.is-scrolled {
  background: rgba(10,14,23,0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--border);
}
.hp-nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px var(--sp-3);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
@media (min-width: 768px) { .hp-nav-inner { padding: 16px var(--sp-5); } }

.hp-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-1);
  flex-shrink: 0;
}
.hp-logo-mark {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border-radius: 9px;
  box-shadow: var(--shadow-glow-blue);
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.hp-logo-mark svg { display: block; width: 100%; height: 100%; }
.hp-logo:hover .hp-logo-mark {
  transform: rotate(-6deg) scale(1.04);
  box-shadow: 0 0 0 1px var(--blue-dim), 0 10px 26px rgba(76,126,255,.32);
}
@media (prefers-reduced-motion: reduce) {
  .hp-logo:hover .hp-logo-mark { transform: none; }
}
.hp-logo span.dim { color: var(--text-2); font-weight: 500; }

.hp-nav-links {
  display: none;
  align-items: center;
  gap: 4px;
  margin: 0 auto;
}
@media (min-width: 900px) {
  .hp-nav-links { display: flex; }
}
.hp-nav-links a {
  padding: 8px 14px;
  border-radius: var(--r-full);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-2);
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.hp-nav-links a:hover { color: var(--text-1); background: var(--surface); }

.hp-nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.hp-icon-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-full);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--fast) var(--ease);
}
.hp-icon-btn .hp-icon { width: 18px; height: 18px; }
.hp-icon-btn:hover { background: var(--surface); color: var(--text-1); border-color: var(--border); }
.hp-icon-btn:focus-visible, .hp-page a:focus-visible, .hp-page button:focus-visible, .hp-page input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.hp-nav-cta {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-1);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--fast) var(--ease);
}
@media (min-width: 640px) { .hp-nav-cta { display: inline-flex; } }
.hp-nav-cta:hover { border-color: var(--violet); box-shadow: var(--shadow-glow-violet); }

/* Reused theme toggle button — markup contract owned by /assets/js/theme.js */
.hp-page .theme-toggle-btn {
  display: flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--border);
  border-radius: var(--r-full); padding: 6px 10px 6px 6px;
  cursor: pointer; color: var(--text-2);
}
.hp-page .theme-toggle-btn .toggle-track {
  width: 30px; height: 17px; border-radius: 999px; background: var(--surface-hover);
  position: relative; display: inline-block; flex-shrink: 0;
}
.hp-page .theme-toggle-btn .toggle-thumb {
  position: absolute; top: 1.5px; left: 1.5px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--text-1); font-size: 9px; line-height: 14px; text-align: center;
  transition: left var(--fast) var(--ease);
}
.hp-page .theme-toggle-btn .toggle-label { font-size: 12.5px; font-weight: 500; }

.hp-mobile-toggle {
  display: flex;
  width: 38px; height: 38px;
  align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  background: transparent; border: 1px solid var(--border);
  color: var(--text-1); cursor: pointer;
}
.hp-mobile-toggle .hp-icon { width: 18px; height: 18px; }
@media (min-width: 900px) { .hp-mobile-toggle { display: none; } }

.hp-mobile-menu {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: var(--sp-2) var(--sp-3) var(--sp-3);
  background: rgba(10,14,23,0.97);
  border-bottom: 1px solid var(--border);
}
.hp-mobile-menu.is-open { display: flex; }
.hp-mobile-menu a {
  padding: 12px 10px;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.hp-mobile-menu a:hover { background: var(--surface); color: var(--text-1); }
@media (min-width: 900px) { .hp-mobile-menu { display: none !important; } }

/* ═══════════════════════════ HERO ═══════════════════════════ */
.hp-hero {
  padding: var(--sp-7) 0 var(--sp-6);
  background:
    radial-gradient(ellipse 900px 480px at 18% -10%, rgba(76,126,255,0.13), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 10%, rgba(139,108,255,0.10), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,0.015), transparent 40%),
    var(--bg);
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hp-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, black, transparent 75%);
  pointer-events: none;
}

.hp-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  align-items: center;
}
@media (min-width: 960px) {
  .hp-hero-grid { grid-template-columns: 45% 1fr; gap: var(--sp-5); }
}

.hp-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--text-2);
  margin-bottom: var(--sp-3);
}
.hp-hero-badge b { color: var(--text-1); font-weight: 700; }
.hp-hero-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(34,197,94,.16); }

.hp-hero h1 {
  font-size: var(--fs-h1);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: var(--lh-tight);
  margin: 0 0 14px;
  color: var(--text-1);
}
.hp-hero h1 .grad {
  background: linear-gradient(100deg, var(--blue), var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hp-hero p.lead {
  font-size: 17.5px;
  line-height: var(--lh-normal);
  color: var(--text-2);
  max-width: 480px;
  margin: 0 0 var(--sp-4);
  letter-spacing: -0.005em;
}
.hp-hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* Floating math-symbol background layer — decorative, behind hero content */
.hp-hero-symbols {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.hp-hero .hp-container { position: relative; z-index: 1; }
.hp-symbol {
  position: absolute;
  font-weight: 600;
  font-family: var(--font, 'Inter', sans-serif);
  color: var(--blue);
  opacity: 0.08;
  line-height: 1;
  user-select: none;
  animation: hpSymbolFloat 14s ease-in-out infinite;
}
html[data-theme="light"] .hp-symbol { opacity: 0.06; }
.hp-symbol.s1 { top: 12%; left: 6%;  font-size: 48px; animation-duration: 13s; animation-delay: 0s; }
.hp-symbol.s2 { top: 68%; left: 10%; font-size: 34px; color: var(--violet); animation-duration: 16s; animation-delay: 1.2s; }
.hp-symbol.s3 { top: 22%; left: 48%; font-size: 30px; animation-duration: 11s; animation-delay: 2.4s; }
.hp-symbol.s4 { top: 78%; left: 42%; font-size: 40px; color: var(--violet); animation-duration: 15s; animation-delay: .6s; }
.hp-symbol.s5 { top: 8%;  left: 88%; font-size: 36px; animation-duration: 12s; animation-delay: 1.8s; }
.hp-symbol.s6 { top: 52%; left: 92%; font-size: 28px; color: var(--violet); animation-duration: 17s; animation-delay: 3s; }
.hp-symbol.s7 { top: 88%; left: 80%; font-size: 32px; animation-duration: 13.5s; animation-delay: 2.1s; }
.hp-symbol.s8 { top: 38%; left: 4%;  font-size: 24px; color: var(--violet); animation-duration: 18s; animation-delay: .9s; }
.hp-symbol.s9 { top: 4%;  left: 62%; font-size: 26px; animation-duration: 14.5s; animation-delay: 3.4s; }
@keyframes hpSymbolFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(6deg); }
}
@media (prefers-reduced-motion: reduce) {
  .hp-symbol { animation: none; }
}
@media (max-width: 700px) {
  .hp-symbol.s5, .hp-symbol.s6, .hp-symbol.s7, .hp-symbol.s9 { display: none; }
}

/* Hero stats bar */
.hp-hero-stats { padding: 0 0 var(--sp-6); }
.hp-hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-2);
}
@media (min-width: 700px) {
  .hp-hero-stats-grid { grid-template-columns: repeat(4, 1fr); }
}
.hp-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-3) var(--sp-2);
  transition: border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.hp-hero-stat:hover { border-color: var(--blue); transform: translateY(-2px); }
.hp-hero-stat-num {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(100deg, var(--blue), var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hp-hero-stat-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-3);
}

.hp-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--r-full);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  overflow: hidden;
  transition: transform var(--fast) var(--ease-out), box-shadow var(--med) var(--ease-out), border-color var(--fast) var(--ease), background var(--fast) var(--ease);
  white-space: nowrap;
}
.hp-btn:active { transform: scale(.97); }
/* Subtle premium sheen sweep on hover — restrained, not a gimmick */
.hp-btn::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.16) 50%, transparent 60%);
  background-size: 220% 100%;
  background-position: 120% 0;
  transition: background-position var(--slow) var(--ease-out);
  pointer-events: none;
}
.hp-btn:hover::after { background-position: -20% 0; }
.hp-btn-primary {
  background: linear-gradient(100deg, var(--blue), #3D6BEF);
  color: #fff;
  box-shadow: 0 6px 24px rgba(76,126,255,.32);
}
.hp-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 34px rgba(76,126,255,.42); }
.hp-btn-secondary {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text-1);
}
.hp-btn-secondary:hover { border-color: var(--violet); box-shadow: var(--shadow-glow-violet); transform: translateY(-2px); }
.hp-btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border);
}
.hp-btn-ghost:hover { color: var(--text-1); border-color: var(--border-strong); }
.hp-btn-sm { min-height: 40px; padding: 0 16px; font-size: 13.5px; }

/* Focus — a soft glow matching each variant's own color, layered over the generic
   outline defined earlier so keyboard users get a clearer, more premium ring here. */
.hp-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--blue);
}
.hp-btn-secondary:focus-visible,
.hp-btn-ghost:focus-visible {
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--violet);
}

/* Disabled — same for every variant: flat, inert, no hover/press feedback */
.hp-btn:disabled,
.hp-btn[aria-disabled="true"] {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
  transform: none;
}
.hp-btn:disabled::after { display: none; }

/* Command Core visualization (signature element) */
.hp-core-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hp-core-ring {
  position: absolute;
  border: 1px solid var(--border);
  border-radius: 50%;
}
.hp-core-ring.r1 { inset: 8%; animation: hp-spin-slow 60s linear infinite; }
.hp-core-ring.r2 { inset: 22%; border-style: dashed; border-color: var(--border-strong); animation: hp-spin-slow 90s linear infinite reverse; }
@keyframes hp-spin-slow { to { transform: rotate(360deg); } }

.hp-core-center {
  position: relative;
  width: 34%;
  aspect-ratio: 1/1;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--blue), var(--violet));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 15px;
  box-shadow: 0 0 0 10px rgba(76,126,255,.07), 0 0 60px rgba(139,108,255,.3);
  animation: hp-float 7s ease-in-out infinite, hp-core-pulse 4s ease-in-out infinite;
  z-index: 2;
  text-align: center;
  padding: 6px;
}
@keyframes hp-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes hp-core-pulse {
  0%, 100% { box-shadow: 0 0 0 10px rgba(76,126,255,.07), 0 0 60px rgba(139,108,255,.3); }
  50%      { box-shadow: 0 0 0 14px rgba(76,126,255,.10), 0 0 78px rgba(139,108,255,.4); }
}

.hp-core-node {
  position: absolute;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 74px;
  transform: translate(-50%, -50%);
  z-index: 3;
}
.hp-core-node-dot {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
  transition: transform var(--fast) var(--ease-out), box-shadow var(--med) var(--ease-out), border-color var(--fast) var(--ease);
  cursor: pointer;
}
.hp-core-node:hover .hp-core-node-dot {
  transform: translateY(-4px) scale(1.05);
  border-color: var(--blue);
  box-shadow: var(--shadow-glow-blue);
}
.hp-core-node span.lbl {
  font-size: 11.5px; font-weight: 600; color: var(--text-2);
  white-space: nowrap;
  transition: color var(--fast) var(--ease);
}
.hp-core-node:hover span.lbl { color: var(--text-1); }

.hp-core-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hp-core-svg line {
  stroke: var(--border-strong); stroke-width: 1;
  stroke-dasharray: 3 4;
  transition: stroke var(--fast) var(--ease);
  animation: hp-dash-flow 3.5s linear infinite;
}
@keyframes hp-dash-flow { to { stroke-dashoffset: -14; } }

@media (max-width: 959px) {
  .hp-core-wrap { max-width: 320px; margin-top: var(--sp-4); }
}

/* ═══════════════════════════ COMMAND SEARCH ═══════════════════════════ */
.hp-search-section { padding: var(--sp-5) 0 var(--sp-4); position: relative; z-index: 5; }
.hp-search-box {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
}
.hp-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  padding: 9px 10px 9px 22px;
  box-shadow: var(--shadow-lg);
  transition: border-color var(--fast) var(--ease), box-shadow var(--med) var(--ease-out), transform var(--fast) var(--ease-out);
}
.hp-search-input-wrap:hover { border-color: var(--border-strong); box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-strong); }
.hp-search-input-wrap:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-dim), var(--shadow-lg);
  transform: translateY(-1px);
}
.hp-search-input-wrap svg { flex-shrink: 0; color: var(--text-3); transition: color var(--fast) var(--ease); width: 18px; height: 18px; }
.hp-search-input-wrap:focus-within svg { color: var(--blue); }
.hp-search-input-wrap input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 16.5px;
  color: var(--text-1);
  padding: 13px 0;
  font-family: inherit;
}
.hp-search-input-wrap input::placeholder { color: var(--text-3); }
.hp-search-kbd {
  flex-shrink: 0;
  display: none;
  align-items: center; gap: 3px;
  padding: 5px 8px;
  border-radius: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-3);
}
@media (min-width: 640px) { .hp-search-kbd { display: flex; } }

.hp-search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0; right: 0;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-height: 400px;
  overflow-y: auto;
  z-index: 60;
  opacity: 0;
  transform: translateY(-6px) scale(.99);
  visibility: hidden;
  pointer-events: none;
  transform-origin: top center;
  transition: opacity var(--med) var(--ease-out), transform var(--med) var(--ease-out), visibility var(--med);
}
.hp-search-results.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
  pointer-events: auto;
}
.hp-search-result {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease);
  min-height: 44px;
}
.hp-search-result:hover, .hp-search-result.is-active { background: var(--surface-hover); }
.hp-search-result.is-active { border-left-color: var(--blue); }
.hp-search-result .ic { font-size: 18px; width: 28px; text-align: center; flex-shrink: 0; }
.hp-search-result .txt { min-width: 0; flex: 1; }
.hp-search-result .txt b { font-size: 14.5px; font-weight: 600; color: var(--text-1); display: block; }
.hp-search-result .txt span { font-size: 12.5px; color: var(--text-3); }
.hp-search-result .cat-tag {
  font-size: 11px; font-weight: 600; color: var(--text-3);
  padding: 3px 8px; border-radius: var(--r-full); border: 1px solid var(--border);
  flex-shrink: 0;
}
.hp-search-empty { padding: 28px 18px; text-align: center; color: var(--text-3); font-size: 14px; }

.hp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 780px;
  margin: var(--sp-3) auto 0;
}
.hp-chip {
  padding: 9px 16px;
  min-height: 44px;
  display: inline-flex; align-items: center;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--fast) var(--ease);
}
.hp-chip:hover { color: var(--text-1); border-color: var(--blue); background: var(--blue-dim); }

/* ═══════════════════════════ DISCOVERY STRIP ═══════════════════════════ */
.hp-discovery { padding: var(--sp-6) 0; }
.hp-discovery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-2);
}
@media (min-width: 700px) { .hp-discovery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .hp-discovery-grid { grid-template-columns: repeat(4, 1fr); } }

.hp-disc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-3);
  transition: border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.hp-disc-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.hp-disc-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.hp-disc-card-head .ic {
  width: 32px; height: 32px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--blue-dim); font-size: 15px;
}
.hp-disc-card-head h3 { font-size: 14.5px; font-weight: 700; margin: 0; color: var(--text-1); }
.hp-disc-card ul { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.hp-disc-card ul a {
  display: block; padding: 7px 8px; margin: 0 -8px;
  border-radius: 8px; font-size: 13.5px; color: var(--text-2);
  transition: all var(--fast) var(--ease);
  min-height: 32px;
}
.hp-disc-card ul a:hover { background: var(--surface-hover); color: var(--text-1); }
.hp-disc-view-all { font-size: 12.5px; font-weight: 600; color: var(--blue); }
.hp-disc-view-all:hover { text-decoration: underline; }

/* ═══════════════════════════ CATEGORY DASHBOARD ═══════════════════════════ */
.hp-categories { padding: var(--sp-6) 0; }
.hp-cat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
}
@media (min-width: 720px) { .hp-cat-grid { grid-template-columns: repeat(2, 1fr); } }

.hp-cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-4);
  transition: transform var(--med) var(--ease), border-color var(--med) var(--ease), box-shadow var(--med) var(--ease);
  display: flex; flex-direction: column;
}
.hp-cat-card:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.hp-cat-card-top { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.hp-cat-icon {
  width: 50px; height: 50px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
  transition: transform var(--med) var(--ease);
}
.hp-cat-card:hover .hp-cat-icon { transform: scale(1.08) rotate(-4deg); }
.hp-cat-card h3 { font-size: 20px; font-weight: 700; margin: 0; color: var(--text-1); }
.hp-cat-card > p.desc { font-size: 14.5px; color: var(--text-2); line-height: 1.55; margin: 0 0 var(--sp-3); }
.hp-cat-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--sp-3); }
.hp-cat-pills a {
  font-size: 13px; font-weight: 500; color: var(--text-2);
  padding: 7px 13px; min-height: 36px; display: inline-flex; align-items: center;
  border-radius: var(--r-full); border: 1px solid var(--border);
  transition: all var(--fast) var(--ease);
}
.hp-cat-pills a:hover { color: var(--text-1); border-color: var(--blue); }
.hp-cat-card-foot { margin-top: auto; }
.hp-cat-card-foot a { font-size: 14px; font-weight: 600; color: var(--blue); display: inline-flex; align-items: center; gap: 5px; }
.hp-cat-card-foot a:hover { gap: 8px; }

/* ═══════════════════════════ LIVE CALCULATOR DOCK ═══════════════════════════ */
.hp-dock { padding: var(--sp-6) 0; }
.hp-dock-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
}
@media (min-width: 700px) { .hp-dock-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .hp-dock-grid { grid-template-columns: repeat(4, 1fr); } }

.hp-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-3);
  display: flex; flex-direction: column;
  transition: border-color var(--fast) var(--ease);
}
.hp-widget:hover { border-color: var(--border-strong); }
.hp-widget-head { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.hp-widget-head .ic { font-size: 18px; }
.hp-widget-head h3 { font-size: 14.5px; font-weight: 700; margin: 0; color: var(--text-1); }
.hp-widget-field { margin-bottom: 10px; }
.hp-widget-field label { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 5px; font-weight: 500; }
.hp-widget-field input, .hp-widget-field select {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-1);
  font-size: 14px;
  font-family: inherit;
}
.hp-widget-field input:focus, .hp-widget-field select:focus { border-color: var(--blue); outline: none; }
.hp-widget-result {
  margin: 10px 0 14px;
  padding: 12px;
  border-radius: var(--r-sm);
  background: var(--blue-dim);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-2);
}
.hp-widget-result b { display: block; font-size: 19px; color: var(--text-1); margin-top: 2px; }
.hp-widget-open {
  margin-top: auto;
  text-align: center;
  font-size: 13px; font-weight: 600; color: var(--blue);
  padding: 10px; border-radius: var(--r-sm);
  border: 1px solid var(--border);
  transition: all var(--fast) var(--ease);
}
.hp-widget-open:hover { border-color: var(--blue); background: var(--blue-dim); }

/* ═══════════════════════════ FEATURED CALCULATORS ═══════════════════════════ */
.hp-featured { padding: var(--sp-6) 0; }
.hp-feat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-2);
}
@media (min-width: 640px) { .hp-feat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .hp-feat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1240px) { .hp-feat-grid { grid-template-columns: repeat(4, 1fr); } }

.hp-feat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-3);
  display: flex; flex-direction: column; gap: 10px;
  transition: transform var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.hp-feat-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.hp-feat-card .ic {
  width: 40px; height: 40px; border-radius: var(--r-sm);
  background: var(--violet-dim);
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.hp-feat-card h3 { font-size: 15.5px; font-weight: 700; margin: 0; color: var(--text-1); }
.hp-feat-card p { font-size: 13px; color: var(--text-2); line-height: 1.5; margin: 0; flex: 1; }
.hp-feat-card .cta { font-size: 13px; font-weight: 600; color: var(--blue); }

.hp-ai-modal-backdrop {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(5,7,12,0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 16px 16px;
}
.hp-ai-modal-backdrop.is-open { display: flex; }
.hp-ai-modal {
  width: 100%; max-width: 560px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-4);
  max-height: 74vh;
  display: flex; flex-direction: column;
}
.hp-ai-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.hp-ai-modal-head h3 { font-size: 17px; font-weight: 700; margin: 0; }
.hp-ai-modal-close { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: transparent; color: var(--text-2); cursor: pointer; }
.hp-ai-modal-close:hover { background: var(--surface); color: var(--text-1); }
.hp-ai-modal-note { font-size: 12.5px; color: var(--text-3); margin: 0 0 var(--sp-3); line-height: 1.5; }
.hp-ai-modal-input-row { display: flex; gap: 8px; margin-bottom: var(--sp-3); }
.hp-ai-modal-input-row input {
  flex: 1; min-height: 46px; padding: 0 14px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--bg-2); color: var(--text-1); font-size: 14.5px; font-family: inherit;
}
.hp-ai-modal-input-row input:focus { outline: none; border-color: var(--blue); }
.hp-ai-modal-results { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.hp-ai-result {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: var(--r-sm); border: 1px solid var(--border);
  transition: border-color var(--fast) var(--ease);
}
.hp-ai-result:hover { border-color: var(--blue); }
.hp-ai-result .ic { font-size: 18px; }
.hp-ai-result .txt { flex: 1; min-width: 0; }
.hp-ai-result .txt b { display: block; font-size: 14px; color: var(--text-1); }
.hp-ai-result .txt span { font-size: 12px; color: var(--text-3); }
.hp-ai-result .links { display: flex; gap: 6px; flex-shrink: 0; }
.hp-ai-result .links a { font-size: 12px; font-weight: 600; color: var(--blue); padding: 6px 10px; border-radius: var(--r-full); border: 1px solid var(--border); }

/* ═══════════════════════════ WHY CALCPRO ═══════════════════════════ */
.hp-why { padding: var(--sp-6) 0; }
.hp-why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
}
@media (min-width: 640px) { .hp-why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .hp-why-grid { grid-template-columns: repeat(3, 1fr); } }

.hp-why-card { padding: var(--sp-3) 0; }
.hp-why-card h3 { font-size: 15.5px; font-weight: 700; margin: 0 0 6px; color: var(--text-1); }
.hp-why-card p { font-size: 13.5px; color: var(--text-2); line-height: 1.55; margin: 0; }

/* ═══════════════════════════ LEARNING HUB ═══════════════════════════ */
.hp-learn { padding: var(--sp-6) 0; }
.hp-learn-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-2);
}
@media (min-width: 700px) { .hp-learn-grid { grid-template-columns: repeat(3, 1fr); } }

.hp-learn-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--sp-3);
  transition: transform var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.hp-learn-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.hp-learn-card .tag { font-size: 11.5px; font-weight: 600; color: var(--violet); text-transform: uppercase; letter-spacing: .04em; }
.hp-learn-card h3 { font-size: 15.5px; font-weight: 700; margin: 8px 0 6px; color: var(--text-1); line-height: 1.35; }
.hp-learn-card p { font-size: 13px; color: var(--text-2); line-height: 1.55; margin: 0 0 12px; }
.hp-learn-card .rd { font-size: 12.5px; font-weight: 600; color: var(--blue); }

/* ═══════════════════════════ FOOTER ═══════════════════════════ */
.hp-footer { padding: var(--sp-7) 0 var(--sp-5); border-top: 1px solid var(--border); }
.hp-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}
@media (min-width: 700px) { .hp-footer-grid { grid-template-columns: 1.4fr repeat(4, 1fr); } }
.hp-footer-brand p { font-size: 13.5px; color: var(--text-3); line-height: 1.6; max-width: 260px; margin: 12px 0 0; }
.hp-footer-col h4 { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin: 0 0 14px; }
.hp-footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hp-footer-col a { font-size: 13.5px; color: var(--text-2); }
.hp-footer-col a:hover { color: var(--text-1); }
.hp-footer-newsletter { display: flex; gap: 8px; margin-top: 14px; }
.hp-footer-newsletter input {
  flex: 1; min-height: 40px; padding: 0 12px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text-1); font-size: 13px; font-family: inherit;
}
.hp-footer-newsletter input:focus { outline: none; border-color: var(--blue); }
.hp-footer-newsletter button {
  min-height: 40px; padding: 0 16px; border-radius: var(--r-sm); border: none;
  background: var(--blue); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer;
}
.hp-footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; padding-top: var(--sp-3); border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-3);
}
.hp-footer-bottom nav { display: flex; flex-wrap: wrap; gap: 14px; }
.hp-footer-bottom a { color: var(--text-3); }
.hp-social { display: flex; gap: 8px; }
.hp-social-link {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-3);
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease), transform var(--fast) var(--ease-out), background var(--fast) var(--ease);
}
.hp-social-link:hover { color: var(--text-1); border-color: var(--border-strong); background: var(--surface-hover); transform: translateY(-2px); }
.hp-social-link .hp-icon { width: 15px; height: 15px; }
.hp-footer-bottom a:hover { color: var(--text-1); }

/* ═══════════════════════════ SKELETON / LOADING ═══════════════════════════ */
.hp-skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hover) 37%, var(--surface) 63%);
  background-size: 400% 100%;
  animation: hp-shimmer 1.4s ease infinite;
  border-radius: var(--r-sm);
}
@keyframes hp-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* Utility */
.hp-visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ═══════════════════════════ V5.1 MOCKUP-ALIGNMENT ADDITIONS ═══════════════════════════ */

/* Nav "New" badge */
.hp-page .hp-nav-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #fff;
  background: linear-gradient(100deg, var(--blue), var(--violet));
  padding: 2px 7px;
  border-radius: var(--r-full);
  margin-left: 4px;
  vertical-align: middle;
}

/* Hero trust row */
.hp-hero-trust {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: var(--sp-4);
}
.hp-avatar-stack { display: flex; }
.hp-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700; color: #fff;
  border: 2px solid var(--bg);
  margin-left: -10px;
}
.hp-avatar:first-child { margin-left: 0; }
.hp-hero-trust-text { font-size: 13.5px; color: var(--text-3); }

/* Search kbd as two key caps */
.hp-search-kbd kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; padding: 2px 5px;
  border-radius: 5px;
  background: var(--surface-hover);
  border: 1px solid var(--border-strong);
  font-family: inherit; font-size: 11.5px; color: var(--text-2);
}

/* Discovery strip — compact tile variant (mockup) */
.hp-disc-tile {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  transition: border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.hp-disc-tile:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.hp-disc-tile .ic {
  width: 40px; height: 40px; border-radius: var(--r-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue-dim); font-size: 18px;
}
.hp-disc-tile .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hp-disc-tile .txt b { font-size: 14.5px; font-weight: 700; color: var(--text-1); }
.hp-disc-tile .txt span { font-size: 12.5px; color: var(--text-3); }
.hp-disc-tile .arrow { color: var(--text-3); flex-shrink: 0; transition: transform var(--fast) var(--ease), color var(--fast) var(--ease); }
.hp-disc-tile:hover .arrow { color: var(--blue); transform: translateX(3px); }

/* Section head row (title + "view all" link) */
.hp-section-head-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--sp-2); flex-wrap: wrap;
  margin-bottom: var(--sp-3);
}
.hp-section-head-row h2 { font-size: var(--fs-h2); font-weight: 700; letter-spacing: -0.02em; margin: 0; color: var(--text-1); }
.hp-view-all-link { font-size: 13.5px; font-weight: 600; color: var(--blue); flex-shrink: 0; }
.hp-view-all-link:hover { text-decoration: underline; }
.hp-live-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--success); background: rgba(34,197,94,.12);
  padding: 3px 9px; border-radius: var(--r-full); margin-left: 8px; vertical-align: middle;
}
.hp-live-tag::before { content:''; width:5px; height:5px; border-radius:50%; background:var(--success); }
.hp-dock-head { margin-top: var(--sp-6); }

/* Dashboard layout: main (categories + live preview) + sticky aside (AI copilot + guides) */
.hp-dash-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
  align-items: start;
}
@media (min-width: 980px) {
  .hp-dash-grid { grid-template-columns: minmax(0,1fr) 320px; gap: var(--sp-6); }
}
.hp-dash-aside {
  display: flex; flex-direction: column; gap: var(--sp-3);
}
@media (min-width: 980px) {
  .hp-dash-aside { position: sticky; top: 88px; }
}

/* Compact category tiles */
.hp-cat-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
  align-items: stretch;
}
@media (min-width: 560px) { .hp-cat-tiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) and (max-width: 1180px) { .hp-cat-tiles { grid-template-columns: repeat(2, 1fr); } }
.hp-cat-tile {
  display: flex; flex-direction: column; gap: 8px;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-2) var(--sp-2) 14px;
  transition: transform var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.hp-cat-tile:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.hp-cat-tile-icon {
  width: 38px; height: 38px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.hp-cat-tile-name { font-size: 14.5px; font-weight: 700; color: var(--text-1); }
.hp-cat-tile-count { font-size: 12px; color: var(--text-3); margin-top: auto; }

/* AI Copilot sidebar card */
.hp-ai-sidebar-card {
  background: linear-gradient(160deg, var(--blue-dim), var(--violet-dim));
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  padding: var(--sp-3);
}
.hp-ai-sidebar-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.hp-ai-sidebar-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-solid); border: 1px solid var(--border-strong);
  font-size: 18px; flex-shrink: 0;
}
.hp-ai-sidebar-title { font-size: 15.5px; font-weight: 700; color: var(--text-1); }
.hp-ai-sidebar-card p { font-size: 13.5px; color: var(--text-2); line-height: 1.55; margin: 0 0 12px; }
.hp-ai-sidebar-card input {
  width: 100%; min-height: 42px; padding: 0 12px; margin-bottom: 10px;
  border-radius: var(--r-sm); border: 1px solid var(--border-strong);
  background: var(--surface-solid); color: var(--text-1); font-size: 13.5px; font-family: inherit;
}
.hp-ai-sidebar-card input:focus { outline: none; border-color: var(--blue); }

/* Latest guides card (sidebar) */
.hp-guides-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-3);
}
.hp-guides-head { margin-bottom: 6px; }
.hp-guides-head h3 { font-size: 15px; font-weight: 700; margin: 0; color: var(--text-1); }
.hp-guide-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 6px; margin: 0 -6px;
  border-radius: var(--r-sm);
  transition: background var(--fast) var(--ease);
}
.hp-guide-row:hover { background: var(--surface-hover); }
.hp-guide-thumb {
  width: 34px; height: 34px; border-radius: var(--r-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue-dim); font-size: 15px;
}
.hp-guide-row .txt { min-width: 0; }
.hp-guide-row .txt b { display: block; font-size: 13px; font-weight: 700; color: var(--text-1); line-height: 1.35; }
.hp-guide-row .txt span { font-size: 11.5px; color: var(--text-3); }

/* Popular calculators strip */
.hp-popular { padding: var(--sp-6) 0 var(--sp-5); }
.hp-popular-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-2);
}
@media (min-width: 640px) { .hp-popular-strip { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1080px) { .hp-popular-strip { grid-template-columns: repeat(8, 1fr); } }
.hp-popular-tile {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-2) 10px;
  transition: transform var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.hp-popular-tile:hover { transform: translateY(-3px); border-color: var(--blue); }
.hp-popular-tile .ic {
  width: 38px; height: 38px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  background: var(--violet-dim);
}
.hp-popular-tile b { font-size: 12.5px; font-weight: 700; color: var(--text-1); }
.hp-popular-tile span { font-size: 11px; color: var(--text-3); }
.hp-popular-more .ic { background: var(--blue-dim); font-weight: 700; }

/* Why CalcPro — single row on wide desktop, like the mockup */
@media (min-width: 1100px) {
  .hp-why-grid { grid-template-columns: repeat(6, 1fr); gap: var(--sp-2); }
  .hp-why-card { padding: var(--sp-2) 0; }
}

/* Newsletter heading in footer brand column */
.hp-newsletter-heading {
  font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-3); margin: var(--sp-3) 0 10px;
}

/* ═══════════════════════════ MOBILE BOTTOM TAB BAR ═══════════════════════════ */
.hp-tabbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 400;
  align-items: center; justify-content: space-around;
  background: rgba(13,20,32,0.92);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-top: 1px solid var(--border);
  padding: 8px max(8px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom));
}
@media (max-width: 719px) { .hp-tabbar { display: flex; } }
.hp-tabbar-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: transparent; border: 0; color: var(--text-3);
  font-size: 10.5px; font-weight: 600; font-family: inherit; cursor: pointer;
  padding: 4px 6px; min-width: 52px;
}
.hp-tabbar-item.is-active { color: var(--blue); }
.hp-tabbar-item > .hp-icon { width: 20px; height: 20px; }
.hp-tabbar-ai {
  position: relative; top: -14px;
  color: var(--text-1);
}
.hp-tabbar-ai-dot {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, var(--blue), var(--violet));
  font-size: 20px;
  box-shadow: 0 6px 20px rgba(76,126,255,.45), 0 0 0 4px var(--bg);
}
/* Reserve space above tab bar on small screens so footer content isn't hidden behind it */
@media (max-width: 719px) {
  .hp-footer { padding-bottom: calc(var(--sp-5) + 68px); }
}

/* ═══════════════════════════ FIX: date input visibility on dark UI ═══════════════════════════ */
/* Native <input type="date"> defaults to a light color-scheme, which makes its text and
   calendar icon very low-contrast (sometimes near-invisible) on a dark background.
   Declaring color-scheme tells the browser to render the field (and its picker) in dark UI. */
.hp-widget-field input[type="date"] {
  color-scheme: dark;
}
.hp-widget-field input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.4);
  cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════════
   LIGHT THEME
   The homepage ships dark-first ("Command OS"), but the shared
   .theme-toggle-btn (owned by /assets/js/theme.js) toggles
   html[data-theme] site-wide, so the homepage needs a light palette
   too or the toggle silently does nothing here.
═══════════════════════════════════════════════════════════════════ */
html[data-theme="light"] body.hp-body,
html[data-theme="light"] html.hp-html {
  background: #F6F7FB;
}
html[data-theme="light"] .hp-page {
  --bg:            #F6F7FB;
  --bg-2:          #FFFFFF;
  --surface:       rgba(15,23,42,0.035);
  --surface-solid: #FFFFFF;
  --surface-hover: rgba(15,23,42,0.055);
  --border:        rgba(15,23,42,0.10);
  --border-strong: rgba(15,23,42,0.18);
  --blue:          #3457D5;
  --blue-dim:      rgba(52,87,213,0.10);
  --violet:        #7C5CE0;
  --violet-dim:    rgba(124,92,224,0.10);
  --text-1:        #0F172A;
  --text-2:        #475569;
  --text-3:        #5C6A85;
  --success:       #16A34A;
  --warning:       #C2760C;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.08), 0 2px 8px rgba(15,23,42,.05);
  --shadow-md: 0 8px 24px rgba(15,23,42,.10), 0 2px 8px rgba(15,23,42,.05);
  --shadow-lg: 0 20px 60px rgba(15,23,42,.14), 0 4px 16px rgba(15,23,42,.06);
  --shadow-glow-blue:   0 0 0 1px var(--blue-dim), 0 8px 30px rgba(52,87,213,.16);
  --shadow-glow-violet: 0 0 0 1px var(--violet-dim), 0 8px 30px rgba(124,92,224,.16);
}
/* Hero background + grid overlay need their own light-mode tint (they use hardcoded
   rgba values rather than variables, since they layer multiple gradients at once) */
html[data-theme="light"] .hp-hero {
  background:
    radial-gradient(ellipse 900px 480px at 18% -10%, rgba(52,87,213,0.08), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 10%, rgba(124,92,224,0.07), transparent 55%),
    linear-gradient(180deg, rgba(15,23,42,0.015), transparent 40%),
    var(--bg);
}
html[data-theme="light"] .hp-hero::before {
  background-image:
    linear-gradient(rgba(15,23,42,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,0.035) 1px, transparent 1px);
}
html[data-theme="light"] .hp-nav.is-scrolled {
  background: rgba(246,247,251,0.82);
}
html[data-theme="light"] .hp-mobile-menu {
  background: rgba(255,255,255,0.98);
}
html[data-theme="light"] .hp-ai-modal-backdrop {
  background: rgba(15,23,42,0.35);
}
html[data-theme="light"] .hp-tabbar {
  background: rgba(255,255,255,0.92);
}
html[data-theme="light"] .hp-tabbar-item.is-active { color: var(--blue); }
html[data-theme="light"] .hp-tabbar-ai-dot {
  box-shadow: 0 6px 20px rgba(52,87,213,.35), 0 0 0 4px var(--bg);
}
/* Date input goes back to a normal light picker in light mode */
html[data-theme="light"] .hp-widget-field input[type="date"] {
  color-scheme: light;
}
html[data-theme="light"] .hp-widget-field input[type="date"]::-webkit-calendar-picker-indicator {
  filter: none;
}
/* core visualization ring/center glow reads fine on light too, but the
   center orb's shadow was tuned for a dark backdrop — soften it slightly */
html[data-theme="light"] .hp-core-center {
  box-shadow: 0 0 0 10px rgba(52,87,213,.06), 0 0 50px rgba(124,92,224,.22);
}

/* ═══════════════════════════════════════════════════════════════════
   V6 — UNIFIED ICON SYSTEM
   One SVG sprite, single stroke weight, currentColor throughout.
   Sizing rides on each container's existing font-size (1em), so no
   per-icon overrides were needed anywhere they were dropped in.
═══════════════════════════════════════════════════════════════════ */
.hp-page .hp-icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.15em;
  flex-shrink: 0;
}
.hp-page button .hp-icon,
.hp-page .hp-btn .hp-icon { vertical-align: -0.1em; }
.hp-btn .hp-icon, .hp-nav-cta .hp-icon { width: 14px; height: 14px; }

/* Tint icons to match the accent tone of the tinted surface they sit on */
.hp-cat-tile-icon svg,
.hp-disc-tile .ic svg,
.hp-popular-tile .ic svg,
.hp-feat-card .ic svg,
.hp-why-card .ic svg,
.hp-widget-head .ic svg,
.hp-guide-thumb svg {
  color: var(--blue);
}
.hp-cat-tile:nth-child(2) .hp-cat-tile-icon svg,
.hp-cat-tile:nth-child(4) .hp-cat-tile-icon svg,
.hp-cat-tile:nth-child(6) .hp-cat-tile-icon svg { color: var(--violet); }
.hp-core-node-dot svg { color: var(--text-2); }
.hp-core-node:hover .hp-core-node-dot svg { color: var(--blue); }
.hp-ai-sidebar-avatar svg,
.hp-tabbar-ai-dot svg,
.hp-ai-modal-avatar svg { color: #fff; }
.hp-ai-modal-close svg { color: var(--text-2); }
.hp-ai-modal-close:hover svg { color: var(--text-1); }

/* ═══════════════════════════════════════════════════════════════════
   V6 — UNIFIED CARD ELEVATION
   One consistent hover language across every tile/card type: a soft
   lift + shadow bloom, same easing/duration everywhere.
═══════════════════════════════════════════════════════════════════ */
.hp-widget,
.hp-feat-card,
.hp-disc-tile,
.hp-cat-tile,
.hp-popular-tile,
.hp-guide-row,
.hp-search-result {
  transition: transform var(--fast) var(--ease-out), box-shadow var(--med) var(--ease-out), border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.hp-widget:hover,
.hp-feat-card:hover,
.hp-disc-tile:hover,
.hp-cat-tile:hover,
.hp-popular-tile:hover {
  box-shadow: var(--shadow-md);
}
.hp-widget:hover { transform: translateY(-3px); }

/* Guides sidebar card + AI sidebar card get the same restrained lift as the rest */
.hp-guides-card, .hp-ai-sidebar-card {
  transition: box-shadow var(--med) var(--ease-out), border-color var(--fast) var(--ease);
}
.hp-guides-card:hover, .hp-ai-sidebar-card:hover { box-shadow: var(--shadow-md); }

/* Why-CalcPro icon badges get a touch more presence to match the rest of the icon system */
.hp-why-card .ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--r-sm);
  background: var(--blue-dim); color: var(--blue);
  font-size: 18px; margin-bottom: 10px;
}

/* ═══════════════════════════════════════════════════════════════════
   V6 — SCROLL REVEAL
   Applied via JS (skipped under prefers-reduced-motion, and this rule
   is itself neutralized by the global reduced-motion override above).
   Transform/opacity only — no layout shift, GPU-friendly.
═══════════════════════════════════════════════════════════════════ */
.hp-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 640ms var(--ease-out), transform 640ms var(--ease-out);
}
.hp-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
