@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
img,svg{display:block;max-width:100%}
a{color:inherit;text-decoration:none}
button{cursor:pointer;font-family:inherit}

:root{
  --bg:#0d0f14;--surface:#13151c;--surface2:#1a1d27;--surface3:#212533;
  --border:rgba(255,255,255,0.07);--border2:rgba(255,255,255,0.12);
  --gold:#c9a84c;--gold-light:#e8c96d;--gold-dim:rgba(201,168,76,0.15);--gold-border:rgba(201,168,76,0.3);
  --text:#e8eaf0;--text-dim:#8b8fa8;--text-muted:#818499;
  --green:#4ade80;--red:#f87171;--teal:#2dd4bf;
  --serif:'DM Serif Display',Georgia,serif;
  --sans:'DM Sans',system-ui,sans-serif;
  --mono:'DM Mono','Courier New',monospace;
  --radius-sm:6px;--radius-md:10px;--radius-lg:16px;
  --max-w:1100px;--max-w-text:740px;
}

html{font-size:16px;scroll-behavior:smooth}
body{background:var(--bg);color:var(--text);font-family:var(--sans);font-size:15px;line-height:1.65;-webkit-font-smoothing:antialiased}

.container{max-width:var(--max-w);margin:0 auto;padding:0 24px}
.container--text{max-width:var(--max-w-text);margin:0 auto;padding:0 24px}
.section{padding:64px 0}
.section--sm{padding:40px 0}

h1,h2,h3,h4{font-family:var(--serif);font-weight:400;line-height:1.2;color:var(--text)}
h1{font-size:clamp(30px,5vw,50px)}
h2{font-size:clamp(22px,3.5vw,34px)}
h3{font-size:clamp(17px,2.5vw,22px)}
p{color:var(--text-dim);line-height:1.75;margin-bottom:16px}
p:last-child{margin-bottom:0}
strong{color:var(--text);font-weight:600}

/* Header */
.site-header{position:sticky;top:0;z-index:100;background:rgba(13,15,20,0.92);backdrop-filter:blur(12px);border-bottom:1px solid var(--border)}
.header-inner{display:flex;align-items:center;justify-content:space-between;height:60px;gap:24px}
.logo{display:flex;align-items:center;flex-shrink:0;text-decoration:none}
.logo-svg{display:block;height:32px;width:auto}
.footer-logo .logo-svg{height:28px;width:auto;opacity:0.9}
.footer-logo:hover .logo-svg{opacity:1}
.site-nav{display:flex;align-items:center;gap:4px}
.nav-link{font-size:13px;font-weight:500;color:var(--text-dim);padding:6px 12px;border-radius:var(--radius-sm);transition:color 0.15s,background 0.15s}
.nav-link:hover,.nav-link.active{color:var(--text);background:var(--surface2)}
.header-cta{background:var(--gold-dim);border:1px solid var(--gold-border);color:var(--gold-light);font-size:13px;font-weight:500;padding:7px 16px;border-radius:var(--radius-sm);transition:background 0.15s;flex-shrink:0}
.header-cta:hover{background:rgba(201,168,76,0.25)}
@media(max-width:600px){
  .header-inner{height:52px;gap:8px}
  .logo-svg{height:26px}
  .site-nav{display:none}
  .header-cta{font-size:12px;padding:6px 12px}
}



/* ── Mobile nav drawer ── */
.header-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s;
}
.header-menu-btn:hover { border-color: var(--border2); }
.header-mobile-nav {
  display: none;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.header-mobile-nav.open { max-height: 280px; }
.hmn-link {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dim);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s;
}
.hmn-link:hover, .hmn-link.active { color: var(--text); }
.hmn-cta {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--gold-light);
  padding: 14px 0 18px;
}
@media(max-width:600px){
  .header-menu-btn { display: flex; }
  .header-mobile-nav { display: block; }
  #header-cta-desk { display: none; }
}

/* ══════════════════════════════════════
   SHARED COMPONENTS
══════════════════════════════════════ */

/* Prose content */
.prose h2{font-size:26px;margin:40px 0 14px}
.prose h3{font-size:18px;margin:28px 0 10px;font-family:var(--sans);font-weight:600}
.prose p{margin-bottom:16px}
.prose ul,.prose ol{padding-left:24px;margin-bottom:16px;color:var(--text-dim)}
.prose li{margin-bottom:6px;line-height:1.7}
.prose a{color:var(--gold-light);text-decoration:underline;text-underline-offset:3px}
.prose a:hover{color:var(--gold)}
.prose strong{color:var(--text);font-weight:600}
.prose blockquote{border-left:3px solid var(--gold-border);padding-left:18px;margin:24px 0;color:var(--text-muted);font-style:italic}
.prose code{font-family:var(--mono);font-size:13px;background:var(--surface2);border:1px solid var(--border2);padding:2px 8px;border-radius:4px;color:var(--gold-light)}
.prose hr{border:none;border-top:1px solid var(--border);margin:32px 0}
/* ── Prose table ── */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 14px;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.prose thead {
  background: var(--surface2);
}
.prose thead th {
  padding: 11px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  border-bottom: 1px solid var(--border2);
}
.prose tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.prose tbody tr:last-child {
  border-bottom: none;
}
.prose tbody tr:hover {
  background: var(--surface2);
}
.prose tbody td {
  padding: 10px 16px;
  color: var(--text-dim);
  vertical-align: top;
  line-height: 1.55;
}
.prose tbody td:first-child {
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .prose table { font-size: 13px; }
  .prose thead th { padding: 9px 12px; }
  .prose tbody td { padding: 9px 12px; }
}


/* Breadcrumb */
.breadcrumb{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--text-muted);margin-bottom:28px;flex-wrap:wrap}
.breadcrumb a{color:var(--text-muted);transition:color .15s}
.breadcrumb a:hover{color:var(--text)}
.breadcrumb-sep{opacity:.4}

/* Section eyebrow */
.section-eyebrow{font-size:11px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--gold);margin-bottom:10px}
.section-header{margin-bottom:36px}

/* Ad slots — placeholder spacing */
.ad-slot-header,.ad-slot-inline{min-height:0}

/* Post / Guide cards */
.post-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:18px}
.post-card{display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:22px;transition:border-color .15s,transform .12s}
.post-card:hover{border-color:var(--border2);transform:translateY(-2px)}
.post-card-cat{font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--gold);margin-bottom:10px}
.post-card h3{font-size:16px;font-weight:600;color:var(--text);font-family:var(--sans);margin-bottom:10px;line-height:1.35}
.post-card p{font-size:13px;color:var(--text-muted);flex:1;margin-bottom:14px;line-height:1.65}
.post-card-meta{font-size:12px;color:var(--text-muted)}

/* Calculator list cards (section pages) */
.calc-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:20px}
.calc-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:24px;transition:border-color .2s,transform .15s;display:flex;flex-direction:column;position:relative;overflow:hidden}
.calc-card::before{content:'';position:absolute;top:0;left:0;right:0;height:2px;background:var(--gold);opacity:0;transition:opacity .2s}
.calc-card:hover{border-color:var(--border2);transform:translateY(-2px)}
.calc-card:hover::before{opacity:1}
.calc-card-icon{width:44px;height:44px;border-radius:var(--radius-md);background:var(--gold-dim);border:1px solid var(--gold-border);display:flex;align-items:center;justify-content:center;margin-bottom:16px}
.calc-card h3{font-size:17px;margin-bottom:8px;font-family:var(--sans);font-weight:600}
.calc-card p{font-size:13px;color:var(--text-dim);flex:1;margin-bottom:20px}
.calc-card-cpm{background:var(--gold-dim);color:var(--gold);font-size:11px;font-weight:600;padding:3px 10px;border-radius:20px;border:1px solid var(--gold-border);font-family:var(--mono)}
.calc-card-footer{display:flex;align-items:center;justify-content:space-between;margin-top:auto}
.calc-card-link{display:inline-flex;align-items:center;gap:6px;color:var(--gold-light);font-size:13px;font-weight:500;transition:gap .15s}
.calc-card-link:hover{gap:10px}

/* Calculator page header */
.calc-page-badge{display:inline-flex;align-items:center;gap:6px;background:var(--gold-dim);border:1px solid var(--gold-border);color:var(--gold);font-size:11px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;padding:4px 12px;border-radius:20px;margin-bottom:16px}
.calc-page-header{margin-bottom:28px}
.calc-page-header h1 span{color:var(--gold-light)}
.calc-page-subtitle{color:var(--text-dim);font-size:16px;max-width:600px}

/* Calculator embed wrapper */
.calc-embed{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);overflow:hidden;margin:28px 0}
.calc-embed iframe,.calc-embed > *{display:block;width:100%}

/* Related calculators */
.related-section{margin-top:48px;padding-top:40px;border-top:1px solid var(--border)}
.related-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;margin-top:18px}
.related-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);padding:14px 16px;transition:border-color .15s}
.related-card:hover{border-color:var(--border2)}
.related-card-title{font-size:14px;font-weight:600;color:var(--text);margin-bottom:4px}
.related-card-desc{font-size:12px;color:var(--text-muted);line-height:1.5}

/* FAQ accordion */
.faq-section{margin-top:48px;padding-top:40px;border-top:1px solid var(--border)}
.faq-item{border-bottom:1px solid var(--border)}
.faq-q{width:100%;background:none;border:none;text-align:left;padding:16px 0;cursor:pointer;font-family:var(--sans);font-size:15px;font-weight:500;color:var(--text);display:flex;justify-content:space-between;align-items:center;gap:14px}
.faq-q:hover{color:var(--gold-light)}
.faq-icon{color:var(--gold);font-size:20px;flex-shrink:0;transition:transform .2s;line-height:1}
.faq-item.open .faq-icon{transform:rotate(45deg)}
.faq-a{font-size:14px;color:var(--text-dim);line-height:1.75;max-height:0;overflow:hidden;transition:max-height .3s ease,padding .3s}
.faq-item.open .faq-a{max-height:400px;padding-bottom:16px}

/* Footer */
.site-footer{background:var(--surface);border-top:1px solid var(--border);padding:52px 0 28px}
.footer-grid{display:grid;grid-template-columns:1.6fr 1fr 1fr 1fr;gap:40px;margin-bottom:44px}
@media(max-width:900px){.footer-grid{grid-template-columns:1fr 1fr;gap:28px}}
@media(max-width:520px){.footer-grid{grid-template-columns:1fr}}
.footer-brand p{font-size:13px;color:var(--text-muted);line-height:1.65;margin-top:14px;max-width:280px}
.footer-col-title{font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted);margin-bottom:14px}
.footer-links{list-style:none;padding:0;display:flex;flex-direction:column;gap:9px}
.footer-links a{font-size:13px;color:var(--text-muted);transition:color .15s}
.footer-links a:hover{color:var(--text)}
.footer-bottom{display:flex;justify-content:space-between;align-items:center;padding-top:24px;border-top:1px solid var(--border);font-size:12px;color:var(--text-muted);flex-wrap:wrap;gap:12px}
.footer-bottom a{color:var(--text-muted);transition:color .15s}
.footer-bottom a:hover{color:var(--text)}

/* ═══════════════════════════════════════════════════════
   HOMEPAGE — hp-* namespace  (rebuilt 2026-03-21)
═══════════════════════════════════════════════════════ */

/* ── Hero ── */
.hp-hero {
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
  text-align: center;
}
.hp-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hp-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
}
.hp-hero-orb--1 {
  width: 600px; height: 600px;
  top: -200px; left: 50%;
  transform: translateX(-60%);
  background: radial-gradient(circle, #c9a84c 0%, transparent 70%);
}
.hp-hero-orb--2 {
  width: 400px; height: 400px;
  bottom: -100px; right: 5%;
  background: radial-gradient(circle, #f97316 0%, transparent 70%);
  opacity: 0.1;
}
.hp-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201,168,76,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}
.hp-hero-inner {
  position: relative;
  z-index: 1;
}
.hp-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 28px;
  white-space: nowrap;
  max-width: calc(100% - 48px);
  overflow: hidden;
  text-overflow: ellipsis;
}
.hp-hero-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: hp-pulse 2s ease-in-out infinite;
}
@keyframes hp-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.85); }
}
.hp-badge-sep { opacity: 0.4; }
.hp-badge-sub { }
@media (max-width: 500px) {
  .hp-badge-sep,
  .hp-badge-sub { display: none; }
}
.hp-hero-h1 {
  font-family: var(--serif);
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 400;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.hp-hero-h1 em {
  font-style: normal;
  color: var(--gold-light);
}
.hp-hero-sub {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.65;
}

/* ── Search box ── */
.hp-search-wrap {
  position: relative;
  max-width: 520px;
  margin: 0 auto 28px;
}
.hp-search-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 0 14px;
  gap: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.hp-search-box:focus-within {
  border-color: var(--gold-border);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
}
.hp-search-icon { flex-shrink: 0; }
.hp-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  padding: 13px 0;
  min-width: 0;
  width: 100%;
}
.hp-search-input::placeholder { color: var(--text-muted); }
.hp-search-esc {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 5px;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1.8;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.hp-search-esc--visible {
  opacity: 1;
  pointer-events: auto;
}
@media (max-width: 500px) {
  .hp-search-esc { display: none; }
}

/* Search results dropdown */
.hp-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 12px;
  overflow: hidden;
  z-index: 200;
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
.hp-sr-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
  text-align: left;
}
.hp-sr-item:last-child { border-bottom: none; }
.hp-sr-item:hover, .hp-sr-item.active { background: var(--surface2); }
.hp-sr-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.hp-sr-title mark {
  background: rgba(201,168,76,0.25);
  color: var(--gold-light);
  border-radius: 2px;
  padding: 0 2px;
}
.hp-sr-cat {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.hp-sr-empty {
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: left;
}

/* Quick-access chips */
.hp-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
}
.hp-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 20px;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.hp-chip:hover { border-color: var(--border2); color: var(--text-dim); }

/* ── Stats bar ── */
.hp-stats-wrap {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}
.hp-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 24px 0;
  flex-wrap: wrap;
}
.hp-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 28px;
}
.hp-stat-n {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 500;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 4px;
}
.hp-stat-l {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.hp-stat-div {
  width: 1px;
  height: 32px;
  background: var(--border);
  flex-shrink: 0;
}
/* stat @500 handled in 768/480/380 blocks above */

/* ── Sticky category nav ── */
.hp-cat-nav {
  position: sticky;
  top: 60px; /* header height */
  z-index: 90;
  background: rgba(13,15,20,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.hp-cat-nav--visible {
  opacity: 1;
  pointer-events: auto;
}
.hp-cat-nav-inner {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 4px;
}
.hp-cat-nav-inner::-webkit-scrollbar { display: none; }
.hp-cat-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 11px 16px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.hp-cat-nav-link:hover { color: var(--text); }
.hp-cat-nav-link--active {
  color: var(--cnc, var(--gold));
  border-bottom-color: var(--cnc, var(--gold));
}
@media (max-width: 600px) {
  /* Category nav: emoji only */
  .hp-cnl-text { display: none; }
  .hp-cat-nav-link { padding: 11px 12px; font-size: 18px; }

  /* Stats: clean 2×2 grid */
  .hp-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 0;
  }
  .hp-stat {
    padding: 20px 16px;
    border-bottom: 1px solid var(--border);
  }
  .hp-stat:nth-child(even) { border-left: 1px solid var(--border); }
  /* Bottom row: no border-bottom */
  .hp-stat:nth-child(3),
  .hp-stat:nth-child(4) { border-bottom: none; }
  /* Hide flex dividers */
  .hp-stat-div { display: none !important; }
}

/* ── Section scaffold ── */
.hp-section { padding: 64px 0; }
.hp-section-hd { margin-bottom: 36px; }
.hp-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.hp-section-h2 {
  font-family: var(--serif);
  font-size: clamp(24px, 3.5vw, 34px);
  font-weight: 400;
  color: var(--text);
}

/* ── Per-category sections ── */
.hp-cat-section {
  padding: 56px 0;
  border-top: 1px solid var(--border);
  transition: background 0.5s ease;
}
.hp-cat-section:first-of-type { border-top: none; }

.hp-cat-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.hp-cat-hd-left {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.hp-cat-emblem {
  font-size: 24px;
  width: 48px; height: 48px;
  border-radius: 12px;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hp-cat-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 5px;
  line-height: 1.1;
}
.hp-cat-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  max-width: 480px;
}
.hp-cat-badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid transparent;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 4px;
}

/* ── Calculator card grid ── */
.hp-calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.hp-calc-grid--sm {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
@media (max-width: 640px) {
  .hp-calc-grid,
  .hp-calc-grid--sm { grid-template-columns: 1fr; }
}

/* ── Calculator card ── */
.hp-calc-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s;
  position: relative;
  overflow: hidden;
}
.hp-calc-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--cc, var(--gold));
  opacity: 0;
  transition: opacity 0.15s;
}
.hp-calc-card:hover {
  border-color: var(--border2);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.hp-calc-card:hover::before { opacity: 1; }

.hp-calc-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}
.hp-calc-card-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--cc, var(--gold)) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--cc, var(--gold)) 28%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hp-calc-card-icon svg { width: 18px; height: 18px; }
.hp-calc-card-arr {
  font-size: 18px;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
  line-height: 1;
}
.hp-calc-card:hover .hp-calc-card-arr {
  opacity: 1;
  color: var(--cc, var(--gold));
  transform: translate(2px, -2px);
}
.hp-calc-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  font-family: var(--sans);
  margin-bottom: 8px;
  line-height: 1.3;
}
.hp-calc-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 16px;
}
.hp-calc-card-cta {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-top: auto;
  transition: letter-spacing 0.15s;
}
.hp-calc-card:hover .hp-calc-card-cta { letter-spacing: 0.06em; }

/* ── Trust bar ── */
.hp-trust {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 32px 0;
}
.hp-trust-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.hp-trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 28px;
}
.hp-trust-item strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1px;
}
.hp-trust-item span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}
.hp-trust-icon { font-size: 22px; flex-shrink: 0; }
.hp-trust-div {
  width: 1px;
  height: 40px;
  background: var(--border);
  flex-shrink: 0;
}
@media (max-width: 860px) {
  .hp-trust-inner {
    flex-direction: column;
    gap: 0;
    align-items: stretch;
  }
  .hp-trust-div { display: none; }
  .hp-trust-item {
    padding: 12px 24px;
    gap: 14px;
    border-bottom: 1px solid var(--border);
  }
  .hp-trust-item:last-child { border-bottom: none; }
  .hp-trust-icon { font-size: 20px; }
  .hp-trust-item strong { font-size: 13px; }
  .hp-trust-item span { font-size: 12px; }
}
@media (max-width: 480px) {
  .hp-trust { padding: 16px 0; }
  .hp-trust-item { padding: 10px 20px; }
}

/* ── Responsive misc ── */
@media (max-width: 768px) {
  /* Hero */
  .hp-hero { padding: 44px 0 36px; }
  .hp-hero-badge {
    font-size: 10px;
    padding: 4px 12px;
    margin-bottom: 18px;
    letter-spacing: 0.06em;
  }
  .hp-hero-h1 {
    font-size: clamp(28px, 8.5vw, 44px);
    margin-bottom: 14px;
  }
  .hp-hero-sub {
    font-size: 15px;
    margin-bottom: 22px;
  }
  .hp-search-wrap { margin-bottom: 18px; }
  .hp-search-input { font-size: 13px; }
  .hp-hero-chips { gap: 6px; }
  .hp-chip { font-size: 11px; padding: 5px 10px; }

  /* Stats — grid layout handled by 600px breakpoint below */
  .hp-stat-n { font-size: 22px; }
  .hp-stat-l { font-size: 10px; }

  /* Cat nav */
  .hp-cat-nav { top: 56px; }

  /* Sections */
  .hp-cat-section { padding: 32px 0; }
  .hp-cat-hd { margin-bottom: 20px; }
  .hp-cat-title { font-size: 22px; }
  .hp-section { padding: 44px 0; }

  /* Cards */
  .hp-calc-card { padding: 16px; }
  .hp-calc-card-icon { width: 36px; height: 36px; }
  .hp-calc-card-desc { font-size: 12px; margin-bottom: 12px; }
}

@media (max-width: 480px) {
  .hp-hero { padding: 36px 0 30px; }
  .hp-stat-n { font-size: 20px; }
}

@media (max-width: 380px) {
  .hp-stat { padding: 16px 12px; }
  .hp-stat-n { font-size: 18px; }
  .hp-stat-l { font-size: 9px; }
}

/* ─────────────────────────────────────────
   Author Bio Page
   ───────────────────────────────────────── */
.author-page{padding:56px 0 96px}

/* Hero */
.author-hero{display:flex;align-items:flex-start;gap:28px;margin-bottom:56px;padding-bottom:40px;border-bottom:1px solid var(--border)}
@media(max-width:580px){.author-hero{flex-direction:column;gap:20px}}
.author-avatar{flex-shrink:0;width:88px;height:88px;border-radius:50%;background:var(--gold-dim);border:2px solid var(--gold-border);display:flex;align-items:center;justify-content:center}
.author-initials{font-family:var(--serif);font-size:36px;color:var(--gold-light);line-height:1;user-select:none}
.author-hero-text{flex:1;min-width:0}
.author-eyebrow{font-size:11px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--gold);margin-bottom:6px}
.author-name{font-family:var(--serif);font-size:clamp(30px,4vw,44px);font-weight:400;color:var(--text);margin-bottom:10px;line-height:1.1}
.author-tagline{font-size:17px;color:var(--text-dim);line-height:1.6;margin-bottom:14px;max-width:560px}
.author-meta-row{display:flex;flex-wrap:wrap;gap:16px}
.author-meta-item{display:flex;align-items:center;gap:5px;font-size:13px;color:var(--text-muted)}

/* Two-column layout */
.author-body{display:grid;grid-template-columns:1fr 300px;gap:40px;align-items:start}
@media(max-width:860px){.author-body{grid-template-columns:1fr}}

/* Main column */
.author-section{margin-bottom:40px}
.author-section:last-child{margin-bottom:0}
.author-section-title{font-family:var(--serif);font-size:22px;font-weight:400;color:var(--text);margin-bottom:16px;padding-bottom:10px;border-bottom:1px solid var(--border)}
.author-prose{color:var(--text-dim);line-height:1.8;font-size:15px}
.author-prose p{margin-bottom:14px}
.author-prose p:last-child{margin-bottom:0}
.author-prose strong{color:var(--text);font-weight:600}

/* Credential list */
.cred-list{list-style:none;padding:0;display:flex;flex-direction:column;gap:14px}
.cred-item{display:flex;align-items:flex-start;gap:14px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);padding:14px 16px;transition:border-color .15s}
.cred-item:hover{border-color:var(--border2)}
.cred-icon{font-size:20px;flex-shrink:0;width:28px;text-align:center;margin-top:1px}
.cred-label{display:block;font-size:14px;font-weight:600;color:var(--text);margin-bottom:2px}
.cred-detail{display:block;font-size:13px;color:var(--text-dim);line-height:1.5}

/* Editorial note */
.author-editorial{background:var(--surface);border:1px solid var(--border);border-left:3px solid var(--gold);border-radius:0 var(--radius-md) var(--radius-md) 0;padding:18px 20px}
.author-editorial .author-section-title{border-bottom:none;padding-bottom:0;margin-bottom:10px;font-size:16px}
.author-editorial .author-prose{font-size:14px}

/* Sidebar cards */
.author-sidebar{display:flex;flex-direction:column;gap:16px}
.author-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:20px}
.author-card-title{font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted);margin-bottom:14px}
.author-contact-btn{display:flex;align-items:center;gap:8px;background:var(--gold-dim);border:1px solid var(--gold-border);color:var(--gold-light);font-size:13px;font-weight:500;padding:10px 14px;border-radius:var(--radius-md);transition:background .15s;word-break:break-all;margin-bottom:10px}
.author-contact-btn:hover{background:rgba(201,168,76,.25)}
.author-contact-secondary{display:flex;align-items:center;gap:7px;font-size:13px;color:var(--text-dim);padding:8px 2px;transition:color .15s;margin-bottom:10px}
.author-contact-secondary:hover{color:var(--text)}
.author-response-note{font-size:12px;color:var(--text-muted);margin-top:4px}

/* Quick facts */
.author-facts{display:flex;flex-direction:column;gap:0}
.author-fact-row{display:flex;justify-content:space-between;align-items:baseline;gap:8px;padding:8px 0;border-bottom:1px solid var(--border);font-size:13px}
.author-fact-row:last-child{border-bottom:none}
.author-fact-row dt{color:var(--text-muted);flex-shrink:0}
.author-fact-row dd{color:var(--text);font-weight:500;text-align:right}

/* Expertise tags */
.author-tags{display:flex;flex-wrap:wrap;gap:7px}
.author-tag{background:var(--surface2);border:1px solid var(--border);color:var(--text-dim);font-size:12px;padding:4px 10px;border-radius:20px;transition:border-color .15s,color .15s}
.author-tag:hover{border-color:var(--gold-border);color:var(--gold)}

/* Disclaimer */
.author-disclaimer{font-size:11px;color:var(--text-muted);line-height:1.6;padding:14px 16px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md)}

/* ─────────────────────────────────────────
   Calculator Rating Widget  (.cw-rating-*)
   ───────────────────────────────────────── */
.cw-rating-section {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.cw-rating-inner {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  max-width: 520px;
}

/* Score column */
.cw-rating-score-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 96px;
  flex-shrink: 0;
}
.cw-rating-big {
  font-family: var(--mono);
  font-size: 42px;
  font-weight: 500;
  color: var(--text);
  line-height: 1;
  margin-bottom: 8px;
}

/* Star display (bg + fg overlay) */
.cw-stars-wrap {
  position: relative;
  display: inline-block;
  font-size: 20px;
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: 2px;
}
.cw-stars-bg {
  color: var(--border2);
  display: block;
}
.cw-stars-fg {
  position: absolute;
  top: 0; left: 0;
  overflow: hidden;
  white-space: nowrap;
  color: var(--gold);
  display: block;
}
.cw-rating-meta {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Divider */
.cw-rating-divider {
  width: 1px;
  height: 72px;
  background: var(--border);
  margin: 0 28px;
  flex-shrink: 0;
}

/* Vote column */
.cw-rating-vote-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.cw-rating-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin: 0;
  line-height: 1.4;
}

/* Interactive star buttons */
.cw-star-row {
  display: flex;
  gap: 4px;
}
.cw-star-btn {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--border2);
  padding: 2px;
  cursor: pointer;
  transition: color 0.1s, transform 0.1s;
  line-height: 1;
}
.cw-star-btn:hover,
.cw-star-btn.hov { color: var(--gold); transform: scale(1.15); }
.cw-star-btn.sel { color: var(--gold); }
.cw-star-btn:focus-visible {
  outline: 2px solid var(--gold);
  border-radius: 3px;
}
.cw-star-row.voted .cw-star-btn { cursor: default; }

.cw-rating-confirm {
  font-size: 12px;
  color: var(--gold-light);
  min-height: 16px;
  margin: 0;
  font-weight: 500;
}

/* Mobile */
@media (max-width: 500px) {
  .cw-rating-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
  }
  .cw-rating-divider { width: 100%; height: 1px; margin: 0; }
  .cw-rating-big { font-size: 36px; }
  .cw-star-btn { font-size: 32px; }
}
