:root {
  --cn-v: "920abbbd7bae3d3b";
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-alt: #f2efe9;
  --navy: #0f2537;
  --navy-soft: #1d3b53;
  --gold: #b87d14;
  --gold-bg: #fef7e6;
  --emerald: #0d6847;
  --emerald-bg: #eaf6f0;
  --crimson: #b42318;
  --crimson-bg: #fef3f2;
  --text: #18222c;
  --muted: #4b5b6b;
  --border: #d8d2c5;
  --radius: 14px;
  --shadow: 0 6px 22px rgba(15, 37, 55, 0.07);
}
*, *::before, *::after { box-sizing: border-box; }
html {
  font-size: 18px;
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}
body {
  margin: 0;
  font-family: Georgia, "Charter", "Source Serif 4", Cambria, serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}
h1, h2, h3, h4, button, input, select, label, .sans, nav, table, .badge, .stat-val {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--navy-soft); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--gold); }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 22px; }

/* Header */
.site-header {
  background: var(--navy);
  color: #fff;
  padding: 11px 0;
  border-bottom: 3px solid #e0a82e;
  position: relative;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 36px; height: 36px;
  flex-shrink: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, #f3be46, #c98512);
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.02rem;
}
.main-nav { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.main-nav a {
  color: #e9eef3;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
}
.main-nav a:hover { color: #ffd166; }
.yt-pill {
  background: #ffd166;
  color: var(--navy) !important;
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 800 !important;
  white-space: nowrap;
}

/* Compact High-Trust Hero */
.hero {
  background: linear-gradient(135deg, #132e44 0%, #0b1d2c 100%);
  color: #fff;
  padding: 20px 0 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.hero-kicker {
  display: inline-block;
  max-width: 100%;
  background: rgba(255, 209, 102, 0.14);
  color: #ffd166;
  border: 1px solid rgba(255, 209, 102, 0.4);
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}
.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 3.2vw, 2.02rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.hero p {
  margin: 0;
  max-width: 920px;
  color: #dce6ef;
  font-size: 0.95rem;
  line-height: 1.48;
}
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 12px;
  font-size: 0.8rem;
  color: #cfe0ee;
}
.trust-strip span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}

/* Balanced 2-Column Interactive Cockpit (Equal Visual Weight — ZERO Dead Left Whitespace!) */
.sim-cockpit {
  margin: 20px 0 22px;
  display: grid;
  grid-template-columns: minmax(0, 415px) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
  width: 100%;
}
.sim-cockpit > *, .kpi-grid > *, .ss-compare > *, .hub-grid > *, .partner-grid > *, .pro-showcase > * {
  min-width: 0;
  max-width: 100%;
}
@media (max-width: 980px) {
  .sim-cockpit { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.card h2, .card h3 { margin-top: 0; color: var(--navy); }

/* Quick Household Presets (Behavioral UX Accelerator) */
.preset-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 14px;
}
.preset-chip {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--navy);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
}
.preset-chip:hover, .preset-chip.active {
  background: var(--navy);
  color: #ffd166;
  border-color: var(--navy);
}

.input-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
@media (max-width: 480px) {
  .input-two-col { grid-template-columns: minmax(0, 1fr); }
}
.control-group { margin-bottom: 12px; width: 100%; min-width: 0; }
.control-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-weight: 700;
  font-size: 0.87rem;
  color: var(--navy);
  margin-bottom: 4px;
}
.control-row {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-width: 0;
}
input[type="range"] {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  accent-color: var(--navy);
  height: 7px;
  cursor: pointer;
}
input[type="number"] {
  width: 114px;
  flex: 0 0 114px;
  padding: 6px 9px;
  font-size: 0.94rem;
  font-weight: 700;
  border: 1.5px solid #b8b0a0;
  border-radius: 8px;
  color: var(--navy);
  background: #fff;
}
select, select.full-select {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 7px 9px;
  font-size: 0.9rem;
  font-weight: 700;
  border: 1.5px solid #b8b0a0;
  border-radius: 8px;
  color: var(--navy);
  background: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mobile Sticky Live Feedback Ticker (Visible ONLY on <=980px so slider drags show instant live numbers!) */
.mobile-live-bar {
  display: none;
}
@media (max-width: 980px) {
  .mobile-live-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 90;
    background: #0f2537;
    color: #fff;
    padding: 9px 13px;
    border-radius: 10px;
    margin-bottom: 12px;
    border: 1.5px solid #e0a82e;
    box-shadow: 0 6px 18px rgba(15, 37, 55, 0.25);
    font-size: 0.82rem;
  }
  .mobile-live-bar a {
    background: #ffd166;
    color: #0f2537 !important;
    text-decoration: none;
    font-weight: 800;
    padding: 5px 10px;
    border-radius: 999px;
    white-space: nowrap;
    font-size: 0.78rem;
  }
}

/* Executive Verdict & Visual Wealth Bars */
.verdict-ribbon {
  background: linear-gradient(90deg, #eaf6f0 0%, #f5fbf8 100%);
  border: 1.5px solid #8fd1b6;
  border-left: 6px solid var(--emerald);
  border-radius: 11px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.wealth-bar-track {
  width: 100%;
  height: 8px;
  background: #e3dfd6;
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0 6px;
}
.wealth-bar-fill {
  height: 100%;
  background: var(--navy-soft);
  border-radius: 999px;
  transition: width 0.25s ease;
}
.ss-col.best .wealth-bar-fill {
  background: var(--emerald);
}

/* Inline Email Save Card inside Results Cockpit */
.email-capture-bar {
  background: #f4faf7;
  border: 1.5px solid #9ad4bc;
  border-radius: 10px;
  padding: 10px 13px;
  margin-bottom: 11px;
  position: relative;
}
.email-capture-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.84rem;
  color: var(--navy);
  margin-bottom: 7px;
}
.email-capture-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}
.email-capture-row input[type="email"] {
  flex: 1 1 210px;
  min-width: 0;
  padding: 8px 11px;
  font-size: 0.88rem;
  border: 1.5px solid #8ea89d;
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
}
.btn-emerald-send {
  background: var(--emerald);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 15px;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}
.btn-emerald-send:hover {
  background: #095238;
}
.btn-emerald-send:disabled {
  opacity: 0.65;
  cursor: wait;
}
.email-capture-msg {
  margin-top: 5px;
  font-size: 0.76rem;
  color: var(--muted);
}

/* Inline Micro-Lead CTA inside Cockpit */
.cockpit-inline-cta {
  background: linear-gradient(90deg, #102a3f 0%, #1d3f5c 100%);
  color: #fff;
  border-radius: 11px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border: 1.5px solid #e0a82e;
}

/* Results Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 680px) {
  .kpi-grid { grid-template-columns: minmax(0, 1fr); }
}
.kpi-box {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: #fff;
}
.kpi-box.good { background: var(--emerald-bg); border-color: #9ad4bc; }
.kpi-box.warn { background: var(--gold-bg); border-color: #ebd096; }
.kpi-box.alert { background: var(--crimson-bg); border-color: #f4b4ae; }
.kpi-title {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 6px;
}
.stat-val {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--navy);
  line-height: 1.22;
  overflow-wrap: anywhere;
}
.kpi-sub { font-size: 0.9rem; color: var(--text); margin-top: 6px; }

/* SS Comparison Strip */
.ss-compare {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 20px;
}
@media (max-width: 680px) {
  .ss-compare { grid-template-columns: minmax(0, 1fr); }
}
.ss-col {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 15px;
  background: var(--surface-alt);
}
.ss-col.best {
  border: 2px solid var(--emerald);
  background: var(--emerald-bg);
}
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  background: var(--navy);
  color: #fff;
  white-space: nowrap;
}
.badge.emerald { background: var(--emerald); }
.badge.gold { background: var(--gold); color: #fff; }

/* Buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  border: none;
  max-width: 100%;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-soft); color: #fff; }
.btn-gold { background: #d99416; color: #fff; }
.btn-gold:hover { background: #b87d14; color: #fff; }
.btn-outline { background: #fff; color: var(--navy); border: 2px solid var(--navy); }

/* Table Mode Filter Pills */
.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 8px;
}
.pill-toggle-group {
  display: inline-flex;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 4px;
}
.pill-toggle {
  border: none;
  background: transparent;
  color: var(--navy);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.pill-toggle.active {
  background: var(--navy);
  color: #fff;
}
.table-mode-status {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  background: var(--gold-bg);
  border: 1px solid #ebd096;
  padding: 7px 12px;
  border-radius: 8px;
  margin-bottom: 10px;
}
@keyframes rowFadeIn {
  from { opacity: 0.35; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}
#sim-tbody tr {
  animation: rowFadeIn 0.18s ease-out;
}

/* Desktop Tables */
.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
}
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; background: #fff; }
th {
  background: var(--navy);
  color: #fff;
  text-align: right;
  padding: 10px 11px;
  font-weight: 700;
  white-space: nowrap;
}
th:first-child, td:first-child { text-align: left; }
td {
  padding: 9px 11px;
  border-bottom: 1px solid #ebe6dc;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
tr:nth-child(even) td { background: #faf8f4; }

/* Native Phone Stacked Table Cards (<= 720px: ZERO horizontal scroll, ZERO clipped numbers!) */
@media (max-width: 720px) {
  .table-scroll {
    border: none;
    border-radius: 0;
    overflow-x: visible;
    background: transparent;
  }
  .table-scroll table,
  .table-scroll tbody {
    display: block;
    width: 100%;
    min-width: 0 !important;
    background: transparent;
  }
  .table-scroll thead {
    display: none;
  }
  .table-scroll tbody tr {
    display: block;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15, 37, 55, 0.05);
  }
  .table-scroll tbody tr.rmd-highlight {
    border-color: #d99416;
    border-width: 2px;
  }
  .table-scroll tbody td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    width: 100%;
    padding: 9px 14px;
    border-bottom: 1px solid #f0ece3;
    text-align: right !important;
    white-space: normal;
    background: #fff !important;
    font-size: 0.93rem;
  }
  .table-scroll tbody td:last-child {
    border-bottom: none;
  }
  .table-scroll tbody td:first-child {
    background: var(--navy) !important;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    padding: 10px 14px;
    text-align: left !important;
    justify-content: space-between;
    align-items: center;
  }
  .table-scroll tbody td:first-child a {
    color: #ffd166 !important;
  }
  .table-scroll tbody td[data-label]::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
    text-align: left;
    flex: 1 1 auto;
    font-size: 0.86rem;
  }
  .table-scroll tbody td[colspan] {
    display: block;
    text-align: left !important;
    background: var(--gold-bg) !important;
    color: var(--text);
    font-size: 0.88rem;
  }
}

/* Pro 2-Column Conversion Showcase (Tangible Blueprint Mockup + Loss-Aversion Copy) */
.pro-banner {
  background: linear-gradient(135deg, #0e2436 0%, #193d5a 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 24px 26px;
  margin: 22px 0;
  border: 2px solid #e0a82e;
  width: 100%;
  max-width: 100%;
}
.pro-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: 24px;
  align-items: center;
}
@media (max-width: 860px) {
  .pro-showcase { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}
.pro-banner h3 { color: #ffd166; margin-top: 0; font-size: 1.28rem; line-height: 1.28; }
.pro-list { margin: 12px 0 18px; padding-left: 20px; font-size: 0.94rem; }
.pro-list li { margin-bottom: 6px; color: #eef4f8; }
.doc-preview-card {
  background: #fff;
  color: var(--navy);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  border-top: 5px solid #d99416;
}
.doc-preview-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px dashed #dcd6c8;
  font-size: 0.84rem;
}
.doc-preview-line:last-of-type { border-bottom: none; }
.partner-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0;
}
@media (max-width: 720px) { .partner-grid { grid-template-columns: minmax(0, 1fr); } }

/* Hub Grids */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  margin: 20px 0 34px;
}
.hub-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.hub-card:hover { transform: translateY(-2px); border-color: var(--navy); }
.state-pills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 265px), 1fr));
  gap: 10px;
  margin: 18px 0 34px;
}
.state-pill {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 13px;
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--navy);
}
.state-pill span:first-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.state-pill:hover { background: var(--gold-bg); border-color: var(--gold); }

/* Compliance Footer */
.disclaimer-box {
  background: #f1ede4;
  border-left: 5px solid var(--navy);
  padding: 16px 18px;
  border-radius: 8px;
  font-size: 0.88rem;
  color: #334150;
  margin: 26px 0;
}
.site-footer {
  background: var(--navy);
  color: #cbd7e3;
  padding: 32px 0;
  margin-top: 44px;
  font-size: 0.9rem;
}
.site-footer a { color: #ffd166; }

/* Modal */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 24, 38, 0.72);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.modal-backdrop.open { display: flex; }
.modal-card {
  background: #fff;
  max-width: 640px;
  width: 100%;
  border-radius: 16px;
  padding: 22px;
  border-top: 6px solid #d99416;
  max-height: 90vh;
  overflow-y: auto;
}

/* Phone-Specific Ergonomics (320px - 600px) */
@media (max-width: 600px) {
  html { font-size: 16px; }
  .container { padding: 0 12px; }
  .site-header { padding: 9px 0; }
  .main-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 12px;
    width: 100%;
    font-size: 0.84rem;
    padding-bottom: 2px;
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .hero { padding: 15px 0 14px; }
  .trust-strip { gap: 5px 12px; margin-top: 9px; font-size: 0.76rem; }
  .card { padding: 16px 14px; border-radius: 12px; }
  .pro-banner { padding: 18px 15px; }
  input[type="number"] {
    width: 108px;
    flex: 0 0 108px;
    padding: 8px;
    font-size: 16px;
  }
  select, select.full-select {
    font-size: 16px;
    padding: 9px 8px;
  }
  .btn { width: 100%; }
  .state-pills { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .state-pill { padding: 9px 10px; font-size: 0.84rem; }
}

/* Amazon Reference Shelf */
.book-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0 10px;
}
@media (max-width: 820px) {
  .book-grid { grid-template-columns: minmax(0, 1fr); }
}
.book-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.pro-lock-row td {
  display: block !important;
  background: linear-gradient(135deg, #102a3f 0%, #1b4360 100%) !important;
  color: #fff !important;
  text-align: center !important;
  padding: 20px 16px !important;
  border-radius: 10px;
}
#pro-executive-packet { display: none; }

@media print {
  .site-header, .main-nav, .hero, .sim-cockpit, .sim-full-band, .pro-banner, .partner-grid, .book-shelf-wrap, .no-print, .site-footer { display: none !important; }
  body { background: #fff; color: #000; font-size: 11.5pt; line-height: 1.5; }
  #pro-executive-packet { display: block !important; padding: 0; }
  .pdf-sec { page-break-inside: avoid; margin-bottom: 20px; border: 1px solid #bbb; border-radius: 8px; padding: 14px 16px; }
  .pdf-table { width: 100%; border-collapse: collapse; font-size: 9.5pt; margin-top: 8px; }
  .pdf-table th, .pdf-table td { border: 1px solid #ccc; padding: 5px 7px; text-align: right; }
  .pdf-table th:first-child, .pdf-table td:first-child { text-align: left; }
}
