/* HG-DESIGN-V1 — Global design system. Loaded by every page.
   Goal: visual congruence across 863+ pages without rewriting templates.
   Overrides typography, color tokens, button/card styling, footer.
   Last updated 2026-06-28. */

/* === Google Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;800&family=Inter:wght@400;500;600;700;800&display=swap');

/* === Design tokens === */
:root {
  --hg-navy: #0a2240;
  --hg-navy-deep: #061833;
  --hg-gold: #c9922a;
  --hg-gold-light: #d9a747;
  --hg-ink: #1c2433;
  --hg-muted: #5a6270;
  --hg-line: #e7e2d6;
  --hg-cream: #faf7f1;
  --hg-ok: #1a8754;
  --hg-bad: #cc4040;
  --hg-shadow: 0 4px 30px rgba(10,34,64,.08);
  --hg-radius: 14px;
}

/* === Typography overrides === */
body,
.container,
.intro,
.content,
.review-content,
.product-content,
.body-text,
p, li, td, th, span, div, button, input, select, textarea {
  font-family: 'Inter', -apple-system, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3,
.q-text, .qtext,
.product-card h3, .review-card h3,
.feat-card h3, .cat-card h3 {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-weight: 800 !important;
  letter-spacing: -0.5px;
  color: var(--hg-navy);
  line-height: 1.2;
}

h1 { font-weight: 800; }
h2 { font-weight: 800; }

/* Override system body color to ink */
body {
  color: var(--hg-ink);
  font-size: 17px;
  line-height: 1.65;
}

/* === Link tokens === */
a { color: var(--hg-navy); transition: color .15s; }
a:hover { color: var(--hg-gold); }

/* === HG-NAV-V2 override (already deployed but tighter polish) === */
.bar[style*="background:#0a2240"],
div.bar {
  font-family: 'Inter', sans-serif !important;
  letter-spacing: .2px !important;
}
.bar a {
  font-family: 'Inter', sans-serif !important;
  font-weight: 500 !important;
}
.bar > a:first-child {
  font-family: 'Inter', sans-serif !important;
  font-weight: 800 !important;
  letter-spacing: 1.2px !important;
}

/* === Standardize buttons === */
.cta-button, .btn, .submit, button.submit, a.cta-button, .btn-prim, .btn-primary {
  font-family: 'Inter', sans-serif !important;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  transition: all .15s;
}

/* Gold primary CTA */
.cta-button, button.submit, .btn-prim {
  background: var(--hg-gold) !important;
  color: var(--hg-navy) !important;
  border: none;
  border-radius: 8px;
  padding: 13px 26px;
}
.cta-button:hover, button.submit:hover, .btn-prim:hover {
  background: var(--hg-gold-light) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(201,146,42,.25);
}

/* Secondary navy button */
.btn-sec, .btn-secondary, .secondary-cta {
  background: transparent !important;
  color: var(--hg-navy) !important;
  border: 2px solid var(--hg-navy) !important;
  border-radius: 8px;
  padding: 11px 24px;
}

/* === Card / box polish === */
.product-card,
.review-card,
.optin-block,
.card,
.feat-card,
.cat-card,
.calc-card {
  font-family: 'Inter', sans-serif !important;
  border-radius: var(--hg-radius);
  background: #fff;
  box-shadow: var(--hg-shadow);
  border: 1px solid var(--hg-line);
}

.product-card h3, .review-card h3 {
  font-family: 'Playfair Display', Georgia, serif !important;
  color: var(--hg-navy);
  font-weight: 800;
}

/* === Form polish === */
.lead-form input, .lead-form select, .lead-form textarea,
.optin input, .optin select, form.lead-form input {
  font-family: 'Inter', sans-serif !important;
  border: 1px solid var(--hg-line);
  border-radius: 6px;
  padding: 11px 13px;
  font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
.lead-form input:focus, .lead-form select:focus, .lead-form textarea:focus,
.optin input:focus {
  outline: none;
  border-color: var(--hg-gold);
  box-shadow: 0 0 0 3px rgba(201,146,42,.15);
}

/* === Site footer override === */
.site-footer, footer, .footer {
  background: var(--hg-navy) !important;
  color: #a5b0c3 !important;
  font-family: 'Inter', sans-serif !important;
}
.site-footer a, footer a, .footer a {
  color: #a5b0c3 !important;
}
.site-footer a:hover, footer a:hover, .footer a:hover {
  color: var(--hg-gold) !important;
}

/* === Sticky-call CTA === */
.sticky-call {
  font-family: 'Inter', sans-serif !important;
  font-weight: 700 !important;
  background: var(--hg-gold) !important;
  color: var(--hg-navy) !important;
  border-radius: 28px !important;
}

/* === Mobile typography === */
@media (max-width: 760px) {
  body { font-size: 16px; }
  h1, .h1 { font-size: 28px !important; line-height: 1.2; }
  h2, .h2 { font-size: 22px !important; }
  h3, .h3 { font-size: 18px !important; }
}

/* === Meta strip / breadcrumb polish === */
.meta-strip, .breadcrumb {
  font-family: 'Inter', sans-serif !important;
  color: var(--hg-muted);
  font-size: 13px;
}

/* === Lift typography on review pages where the old inline CSS was system-ui === */
body * { text-rendering: optimizeLegibility; }

/* === Form layout polish (added 2026-06-30) — was missing .row flex + label/container/submit styling === */
.lead-form {
  background: var(--hg-cream,#faf8f3);
  border: 1px solid var(--hg-line,#e2ddd4);
  border-radius: 12px;
  padding: 22px 24px;
  margin: 20px 0;
  max-width: 560px;
  box-shadow: 0 2px 10px rgba(10,34,64,0.04);
}
.lead-form .row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.lead-form .row > div { flex: 1; min-width: 180px; }
.lead-form > div { margin-bottom: 12px; }
.lead-form label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--hg-muted,#5a6270);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 5px;
}
.lead-form input, .lead-form select {
  width: 100%;
  box-sizing: border-box;
}
.lead-form .consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0;
  font-size: 13px;
  color: var(--hg-muted,#5a6270);
  line-height: 1.5;
}
.lead-form .consent input[type="checkbox"] {
  width: auto !important;
  margin-top: 3px;
  flex-shrink: 0;
}
.lead-form .submit {
  width: 100%;
  background: var(--hg-gold,#c9922a);
  color: var(--hg-navy,#0a2240);
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.lead-form .submit:hover { background: #b6831f; }
.lead-form .submit:disabled { opacity:.6; cursor:wait; }
.lead-form .form-status { margin-top: 10px; font-size: 14px; }
.tcpa { font-size: 12px; color: var(--hg-muted,#5a6270); margin-top: 10px; line-height: 1.5; }
@media (max-width: 600px) {
  .lead-form .row { flex-direction: column; gap: 0; }
  .lead-form .row > div { min-width: 0; margin-bottom: 12px; }
}

/* === FAQ styling (v2, 2026-06-30) — targets .faq-item .faq-q .faq-a === */
h2.faq-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 30px;
  color: var(--hg-navy, #0a2240);
  margin: 44px 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--hg-gold, #c9922a);
}
.faq-item {
  background: #faf8f3;
  border-left: 4px solid var(--hg-gold, #c9922a);
  border-radius: 0 10px 10px 0;
  padding: 18px 22px;
  margin: 14px 0;
  box-shadow: 0 1px 4px rgba(10,34,64,0.04);
  transition: box-shadow .2s, transform .2s;
}
.faq-item:hover {
  box-shadow: 0 4px 14px rgba(10,34,64,0.08);
  transform: translateY(-1px);
}
.faq-item .faq-q {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--hg-navy, #0a2240);
  margin-bottom: 10px;
  line-height: 1.35;
  position: relative;
  padding-left: 26px;
}
.faq-item .faq-q::before {
  content: 'Q';
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  background: var(--hg-gold, #c9922a);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.faq-item .faq-a {
  font-size: 15.5px;
  color: #333;
  line-height: 1.7;
  padding-left: 26px;
  position: relative;
}
.faq-item .faq-a::before {
  content: 'A';
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  background: var(--hg-navy, #0a2240);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
@media (max-width: 600px) {
  .faq-item { padding: 14px 16px; }
  .faq-item .faq-q { font-size: 16px; }
  .faq-item .faq-a { font-size: 14.5px; }
}

/* === Article template styling (2026-06-30) — flagship retirement articles === */
:root {
  --hg-navy: #0a2240;
  --hg-gold: #c9922a;
  --hg-cream: #faf8f3;
  --hg-line: #e6e2d6;
  --hg-ink: #2a2a2a;
  --hg-muted: #666;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--hg-ink);
  line-height: 1.7;
  background: #fdfcf9;
  font-size: 17px;
  margin: 0;
}

/* Container */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  background: #fff;
  box-shadow: 0 0 40px rgba(10,34,64,0.04);
}

/* Meta strip */
.meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  font-size: 13px;
  color: var(--hg-muted);
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--hg-line);
}
.meta-strip strong { color: var(--hg-navy); font-weight: 600; }

/* Category pill */
.pill {
  display: inline-block;
  background: var(--hg-gold);
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

/* Headings */
h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 40px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--hg-navy);
  margin: 8px 0 28px;
  letter-spacing: -0.5px;
}
h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--hg-navy);
  margin: 44px 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--hg-gold);
}
h3 {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--hg-navy);
  margin: 28px 0 12px;
}

/* Body text */
.container p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--hg-ink);
  margin: 0 0 18px;
}
.container p a {
  color: var(--hg-navy);
  border-bottom: 2px solid var(--hg-gold);
  text-decoration: none;
  font-weight: 600;
  transition: background .15s;
}
.container p a:hover { background: rgba(201,146,42,0.12); }
.container strong { color: var(--hg-navy); font-weight: 700; }
.container em { color: var(--hg-ink); }

/* Lists */
.container ul, .container ol {
  margin: 0 0 22px;
  padding-left: 24px;
}
.container ul li, .container ol li {
  margin-bottom: 10px;
  line-height: 1.7;
  font-size: 17px;
}
.container ul li::marker { color: var(--hg-gold); }
.container ol li::marker { color: var(--hg-gold); font-weight: 700; }

/* TL;DR callout */
.tldr {
  background: linear-gradient(135deg, #fff8e8, #faf3d9);
  border-left: 5px solid var(--hg-gold);
  border-radius: 0 12px 12px 0;
  padding: 20px 26px;
  margin: 28px 0 40px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--hg-ink);
  box-shadow: 0 2px 12px rgba(201,146,42,0.08);
}
.tldr strong {
  display: inline-block;
  color: var(--hg-navy);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px;
  margin-right: 6px;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 24px 0 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(10,34,64,0.06);
}
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 15px;
}
.table-wrap thead {
  background: var(--hg-navy);
  color: #fff;
}
.table-wrap th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.3px;
  border: none;
}
.table-wrap td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--hg-line);
  color: var(--hg-ink);
  line-height: 1.55;
}
.table-wrap tr:nth-child(even) td { background: var(--hg-cream); }
.table-wrap tr:last-child td { border-bottom: none; }
.table-wrap tr:hover td { background: #fff8e8; }

/* HR */
.container hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hg-line), transparent);
  margin: 44px 0;
}

/* Opt-in block */
.optin-block {
  background: linear-gradient(135deg, var(--hg-navy), #1a3660);
  color: #fff;
  padding: 40px 36px;
  border-radius: 14px;
  margin: 32px 0;
  display: flex;
  gap: 28px;
  align-items: flex-start;
  box-shadow: 0 8px 30px rgba(10,34,64,0.18);
}
.optin-block img.circle-gold-frame {
  flex-shrink: 0;
  border: 4px solid var(--hg-gold) !important;
  box-shadow: 0 4px 16px rgba(201,146,42,0.35);
}
.optin-copy { flex: 1; min-width: 0; }
.optin-copy h3 {
  color: #fff;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  margin: 0 0 12px;
  line-height: 1.3;
}
.optin-copy p {
  color: rgba(255,255,255,0.9);
  font-size: 15.5px;
  line-height: 1.65;
  margin: 0 0 16px;
}
.optin-copy p a { color: var(--hg-gold); border-bottom-color: var(--hg-gold); }
.optin-copy p strong { color: #fff; }
.optin-copy .tcpa {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
}
.optin-copy .tcpa a { color: rgba(255,255,255,0.85); }
/* form on dark bg — override the cream card look */
.optin-block .lead-form {
  background: rgba(255,255,255,0.98);
  border-color: rgba(255,255,255,0.3);
}

/* Blockquote if used */
.container blockquote {
  border-left: 4px solid var(--hg-gold);
  background: var(--hg-cream);
  padding: 18px 22px;
  margin: 24px 0;
  font-style: italic;
  color: var(--hg-navy);
  border-radius: 0 10px 10px 0;
}

/* Related reading list — tighten */
.container h2 + ul { margin-top: 10px; }

/* Mobile */
@media (max-width: 700px) {
  .container { padding: 24px 18px 60px; }
  h1 { font-size: 30px; }
  h2 { font-size: 23px; margin-top: 32px; }
  h3 { font-size: 18px; }
  .container p, .container li { font-size: 16px; line-height: 1.7; }
  .tldr { padding: 16px 18px; font-size: 15px; }
  .optin-block {
    flex-direction: column;
    padding: 28px 20px;
    gap: 18px;
    text-align: center;
  }
  .optin-block img.circle-gold-frame { margin: 0 auto; }
  .optin-copy { text-align: left; }
  .table-wrap { font-size: 14px; }
  .table-wrap th, .table-wrap td { padding: 10px 12px; }
}
