/* ============================================================================
 * Your Advisory of Trust — Executive Navy & Gold Design System + Print A4
 * Hardened Cross-Platform Compatibility: Desktop, Tablet, iOS Safari & Android
 * Domain: https://mint.dee.insure/
 * ============================================================================ */

:root {
  --navy-950: #061020;
  --navy-900: #0A192F;
  --navy-800: #112240;
  --navy-700: #1B3358;
  --gold-bright: #FFE066;
  --gold-main: #FFD700;
  --gold-deep: #D4AF37;
  --gold-dark: #A6831B;
  --card-white: #FFFFFF;
  --card-cream: #FFFBEB;
  --text-dark: #0F172A;
  --text-muted: #475569;
  --text-light: #E2E8F0;
  --border-soft: #E2E8F0;
  --border-gold: rgba(212, 175, 55, 0.45);
  --green-ok: #0F766E;
  --green-line: #0D9488;
  --red-warn: #DC2626;
  --amber-warn: #B45309;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-card: 0 12px 30px rgba(6, 16, 32, 0.14);
  --shadow-gold: 0 0 24px rgba(255, 215, 0, 0.22);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-dark);
  background: linear-gradient(160deg, var(--navy-950) 0%, var(--navy-900) 45%, var(--navy-800) 100%);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

.container.container-wide {
  max-width: 1380px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Metallic Gold Brand Title */
.brand-gold-text {
  background: linear-gradient(125deg, var(--gold-bright) 0%, var(--gold-main) 48%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 10px rgba(255, 215, 0, 0.28));
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ============================================================================
 * 1. Compact Top Compliance Bar & Quick Jump Bar
 * ============================================================================ */
.top-compliance-bar {
  background: rgba(6, 16, 32, 0.96);
  border-bottom: 1px solid var(--border-gold);
  color: var(--text-light);
  font-size: 0.84rem;
  padding: 6px 0;
}

.top-compliance-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.top-compliance-text {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #CBD5E1;
  line-height: 1.35;
}

.top-text-short {
  display: none;
}

.top-compliance-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.top-link-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  border: 1px solid var(--border-gold);
  color: var(--gold-bright);
  background: rgba(212, 175, 55, 0.1);
  transition: background 0.2s ease, transform 0.15s ease;
}

.top-link-pill:hover {
  background: rgba(212, 175, 55, 0.22);
}

.top-link-pill.solid {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  color: var(--navy-950);
  font-weight: 600;
  border-color: transparent;
}

.quick-jump-bar {
  background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
  padding: 8px 0;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 4px 12px rgba(6, 16, 32, 0.06);
}

.quick-jump-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-jump-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid #CBD5E1;
  background: #F8FAFC;
  color: var(--navy-900);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.quick-jump-pill:hover {
  background: #FFFBEB;
  border-color: var(--gold-deep);
}

/* ============================================================================
 * 2. Grand Executive Hero & Advisor Trust Card (3:4 Gold Frame + Mint Crop)
 * ============================================================================ */
.hero-section {
  padding: 26px 0 30px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-gold);
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 215, 0, 0.12), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(212, 175, 55, 0.10), transparent 42%),
    linear-gradient(155deg, var(--navy-950) 0%, var(--navy-900) 55%, var(--navy-800) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 24px;
  align-items: center;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 15px;
  border-radius: 999px;
  border: 1px solid var(--border-gold);
  background: rgba(17, 34, 64, 0.72);
  margin-bottom: 12px;
}

.brand-badge-title {
  font-size: 1.1rem;
}

.hero-headline {
  margin: 0 0 12px;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  line-height: 1.26;
  color: #FFFFFF;
  font-weight: 700;
}

.hero-sub {
  margin: 0 0 18px;
  color: #CBD5E1;
  font-size: 0.96rem;
  max-width: 640px;
}

.hero-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.hero-pill-box {
  background: rgba(17, 34, 64, 0.75);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 12px;
  padding: 10px 12px;
  color: #F8FAFC;
  font-size: 0.84rem;
}

.hero-pill-box strong {
  display: block;
  color: var(--gold-bright);
  font-size: 0.94rem;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Buttons (Strictly >= 44px Touch Height) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 20px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold-main) 50%, var(--gold-deep) 100%);
  color: var(--navy-950);
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
  filter: brightness(1.06);
}

.btn-outline-gold {
  background: rgba(17, 34, 64, 0.75);
  border-color: var(--gold-deep);
  color: var(--gold-bright);
}

.btn-outline-gold:hover {
  background: rgba(212, 175, 55, 0.18);
}

.btn-navy {
  background: var(--navy-900);
  color: #FFFFFF;
  border-color: var(--navy-700);
}

.btn-navy:hover {
  background: var(--navy-800);
}

.btn-ghost {
  background: #F1F5F9;
  color: var(--navy-900);
  border-color: #CBD5E1;
}

.btn-ghost:hover {
  background: #E2E8F0;
}

.btn-danger {
  background: #FEE2E2;
  color: #991B1B;
  border-color: #FCA5A5;
}

.btn-sm {
  min-height: 44px;
  padding: 8px 14px;
  font-size: 0.86rem;
}

/* Executive Advisor Trust Card */
.advisor-card {
  background: linear-gradient(160deg, rgba(17, 34, 64, 0.96) 0%, rgba(10, 25, 47, 0.98) 100%);
  border: 1.5px solid var(--gold-deep);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), var(--shadow-gold);
  color: #F8FAFC;
}

.advisor-card-top {
  display: flex;
  gap: 16px;
  align-items: center;
}

.advisor-photo-frame {
  width: 110px;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid var(--gold-main);
  flex-shrink: 0;
  background: var(--navy-950);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.advisor-photo-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
}

/* Mandatory Bottom Date-Stamp Crop for Default mint.jpg */
.advisor-photo-frame.is-mint-default img {
  object-fit: cover;
  object-position: center 10%;
  transform: scale(1.12);
  transform-origin: top center;
}

.advisor-meta h2 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  color: var(--gold-bright);
}

.advisor-title {
  font-size: 0.86rem;
  color: #CBD5E1;
  margin: 0 0 8px;
}

.advisor-license-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 215, 0, 0.14);
  border: 1px solid rgba(255, 215, 0, 0.45);
  color: var(--gold-bright);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}

.advisor-code {
  display: block;
  font-size: 0.78rem;
  color: #94A3B8;
  margin-top: 4px;
}

.advisor-contacts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.contact-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

.contact-chip.line {
  background: #06C755;
  border-color: #06C755;
  color: #FFFFFF;
}

.contact-chip.phone {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  color: var(--navy-950);
  border-color: transparent;
}

/* ============================================================================
 * 3. Main Content Cards (Clean White & Cream-Gold for High Mobile Contrast)
 * ============================================================================ */
.main-surface {
  background: #F1F5F9;
  padding: 24px 0 60px;
}

.card {
  background: var(--card-white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 22px;
}

.card-cream {
  background: var(--card-cream);
  border-color: #FDE68A;
}

.card-navy {
  background: linear-gradient(155deg, var(--navy-900), var(--navy-800));
  border-color: var(--border-gold);
  color: #F8FAFC;
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #FEF3C7;
}

.section-heading h2, .section-heading h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--navy-900);
}

.card-navy .section-heading {
  border-bottom-color: rgba(212, 175, 55, 0.35);
}

.card-navy .section-heading h2, .card-navy .section-heading h3 {
  color: var(--gold-bright);
}

/* Forms & Inputs — STRICT >= 16px (1rem) to prevent iOS Safari Auto-Zoom! */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy-900);
}

.card-navy .field label {
  color: #E2E8F0;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field input[type="date"],
.field input[type="url"],
.field select,
.field textarea,
.bench-select {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  font-family: inherit;
  font-size: 16px;
  color: var(--text-dark);
  background: #FFFFFF;
}

.bench-select {
  width: auto;
  min-height: 44px;
  padding: 8px 12px;
}

.field input:focus, .field select:focus, .field textarea:focus, .bench-select:focus {
  outline: none;
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
}

.field-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pdpa-check-row {
  margin: 16px 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.88rem;
  color: #E2E8F0;
  min-height: 44px;
  padding: 6px 0;
  cursor: pointer;
}

.pdpa-check-row input[type="checkbox"] {
  width: 24px;
  height: 24px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--gold-main);
  cursor: pointer;
}

/* Single-Level Plan Selector + Inline Mode Row */
.segmented-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.seg-btn {
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 2px solid #CBD5E1;
  background: #FFFFFF;
  color: var(--navy-900);
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.seg-btn.active {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-800));
  color: var(--gold-bright);
  border-color: var(--gold-deep);
  box-shadow: 0 6px 16px rgba(10, 25, 47, 0.22);
}

.mode-toggle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
}

.mode-caption {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--navy-900);
}

/* 6-Level Market Presets & Touch-Friendly Range Slider (>= 44px Hit Area) */
.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.preset-btn {
  min-height: 44px;
  min-width: 58px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1.5px solid #CBD5E1;
  background: #FFFFFF;
  color: var(--navy-900);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

.preset-btn.active {
  background: var(--gold-main);
  border-color: var(--gold-dark);
  color: var(--navy-950);
}

.range-input {
  width: 100%;
  height: 44px;
  margin: 4px 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.range-input::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #CBD5E1, #FDE68A, #D4AF37);
}

.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold-main);
  border: 3px solid var(--navy-900);
  margin-top: -10px;
  box-shadow: 0 2px 8px rgba(6, 16, 32, 0.35);
}

.range-input::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #CBD5E1, #FDE68A, #D4AF37);
}

.range-input::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold-main);
  border: 3px solid var(--navy-900);
  box-shadow: 0 2px 8px rgba(6, 16, 32, 0.35);
}

details.advanced-panel {
  margin-top: 16px;
  padding: 10px 16px;
  background: var(--card-cream);
  border: 1px solid #FDE68A;
  border-radius: 12px;
}

details.advanced-panel summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--navy-900);
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.kpi-grid.game-s2-kpi {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kpi-box {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 16px;
}

.kpi-box.guar {
  border-color: #99F6E4;
  background: #F0FDFA;
}

.kpi-box.bonus {
  border-color: #FDE68A;
  background: #FFFBEB;
}

.kpi-box.total {
  background: linear-gradient(145deg, var(--navy-900), var(--navy-800));
  border-color: var(--gold-deep);
  color: #FFFFFF;
}

.kpi-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.kpi-box.total .kpi-label {
  color: #CBD5E1;
}

.kpi-value {
  font-size: 1.42rem;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.25;
}

.kpi-box.guar .kpi-value {
  color: var(--green-ok);
}

.kpi-box.bonus .kpi-value {
  color: #B45309;
}

.kpi-box.total .kpi-value {
  color: var(--gold-bright);
}

.kpi-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.kpi-box.total .kpi-sub {
  color: #E2E8F0;
}

/* Modern Interactive Responsive SVG Line Chart */
.chart-wrapper {
  position: relative;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}

.chart-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.chart-bench-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  flex-wrap: wrap;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  margin-bottom: 10px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.legend-dot {
  width: 18px;
  height: 5px;
  border-radius: 3px;
  display: inline-block;
}

.svg-chart-host svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.chart-insight-banner {
  background: linear-gradient(135deg, #0A192F 0%, #112240 100%);
  color: #FFE066;
  border: 1.5px solid var(--gold-deep);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.45;
}

.chart-insight-banner.shield-mode {
  background: linear-gradient(135deg, #0F766E 0%, #0A192F 100%);
  border-color: #5EEAD4;
  color: #F0FDFA;
}

.milestone-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1.5px dashed #E2E8F0;
}

.milestone-card {
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 12px 14px;
}

.milestone-card.highlight {
  background: #FFFBEB;
  border-color: var(--gold-deep);
}

.milestone-step-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--navy-900);
  background: #E2E8F0;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 5px;
}

.milestone-card.highlight .milestone-step-tag {
  background: var(--gold-main);
  color: var(--navy-950);
}

.milestone-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 3px;
}

.milestone-detail {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.smtp-test-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

@media (max-width: 768px) {
  .milestone-strip {
    grid-template-columns: 1fr;
  }
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(6, 16, 32, 0.96);
  color: #F8FAFC;
  border: 1px solid var(--gold-deep);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.82rem;
  line-height: 1.45;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  z-index: 20;
  min-width: 195px;
  display: none;
}

/* Data Tables — Desktop Fits Without Scroll + Working Sticky thead + Mobile Collapse */
.mobile-scroll-hint {
  display: none;
  font-size: 0.8rem;
  color: var(--amber-warn);
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 8px;
  text-align: center;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
}

.sticky-table-box {
  max-height: 560px;
  overflow: auto;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  background: #FFFFFF;
}

table.data-table th,
table.data-table td {
  padding: 10px 10px;
  border-bottom: 1px solid #E2E8F0;
  text-align: right;
  white-space: nowrap;
}

table.data-table th:first-child,
table.data-table td:first-child,
table.data-table th.text-left,
table.data-table td.text-left {
  text-align: left;
}

table.data-table thead th {
  background: var(--navy-900);
  color: var(--gold-bright);
  font-weight: 600;
  white-space: normal;
  line-height: 1.3;
  font-size: 0.82rem;
  position: sticky;
  top: 0;
  z-index: 3;
}

table.data-table tbody tr:nth-child(even) {
  background: #F8FAFC;
}

table.data-table tbody tr.milestone-row {
  background: #FFFBEB;
  font-weight: 600;
}

table.data-table tbody tr.row-collapsed {
  display: none;
}

table.data-table tfoot td {
  background: #FEF3C7;
  font-weight: 700;
  color: var(--navy-900);
  border-top: 2px solid var(--gold-deep);
}

/* Badges & Levels */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-hot { background: #FEE2E2; color: #991B1B; }
.badge-warm { background: #FEF3C7; color: #92400E; }
.badge-cold { background: #E2E8F0; color: #334155; }
.badge-active { background: #DCFCE7; color: #166534; }
.badge-pending { background: #FEF3C7; color: #92400E; }
.badge-unverified { background: #E2E8F0; color: #475569; }
.badge-suspended { background: #FEE2E2; color: #991B1B; }

.level-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}
.level-badge.lv1 { background: #E2E8F0; color: #334155; }
.level-badge.lv2 { background: #DBEAFE; color: #1E40AF; }
.level-badge.lv3 { background: #D1FAE5; color: #065F46; }
.level-badge.lv4 { background: #FEF3C7; color: #92400E; }
.level-badge.lv5 { background: linear-gradient(135deg, #FFE066, #D4AF37); color: #061020; }

/* Alert boxes */
.alert {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  margin-bottom: 14px;
}
.alert-info { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1E3A8A; }
.alert-warn { background: #FFFBEB; border: 1px solid #FDE68A; color: #78350F; }
.alert-error { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }
.alert-success { background: #F0FDF4; border: 1px solid #BBF7D0; color: #166534; }

.oic-disclaimer-box {
  background: #FFFBEB;
  border: 1.5px solid #F59E0B;
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 0.84rem;
  color: #451A03;
  line-height: 1.65;
}

.oic-disclaimer-box ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

/* ============================================================================
 * 4. SPIN 4-Stage Game Styles
 * ============================================================================ */
.game-shell {
  max-width: 820px;
  margin: 0 auto;
}

.game-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.game-step-pill {
  padding: 8px 6px;
  border-radius: 10px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  color: #94A3B8;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.game-step-pill.active {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  color: var(--navy-950);
  border-color: transparent;
}

.game-step-pill.done {
  background: rgba(13, 148, 136, 0.28);
  color: #5EEAD4;
  border-color: #0D9488;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.option-card {
  padding: 14px 16px;
  border-radius: 14px;
  border: 2px solid #CBD5E1;
  background: #FFFFFF;
  color: var(--navy-900);
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  min-height: 54px;
  transition: all 0.16s ease;
}

.option-card.selected {
  border-color: var(--gold-deep);
  background: #FFFBEB;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
}

.shield-stage {
  background: linear-gradient(155deg, var(--navy-950), var(--navy-800));
  border: 1.5px solid var(--gold-deep);
  border-radius: 16px;
  padding: 20px;
  color: #F8FAFC;
  text-align: center;
  margin: 16px 0;
}

.shield-svg {
  width: 120px;
  height: 120px;
  margin: 0 auto 10px;
  display: block;
  transition: transform 0.5s ease, filter 0.5s ease;
}

.shield-svg.activated {
  transform: scale(1.12);
  filter: drop-shadow(0 0 22px rgba(255, 215, 0, 0.85));
}

/* ============================================================================
 * 5. Floating Elements — Single-Slot Priority (Zero Collision + iOS Safe Area)
 * ============================================================================ */
.mobile-sticky-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 880;
  background: rgba(6, 16, 32, 0.96);
  border-top: 1.5px solid var(--gold-deep);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  gap: 10px;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
}

.sticky-action-btn {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
}

.sticky-action-btn.line {
  background: #06C755;
  color: #FFFFFF;
}

.sticky-action-btn.lead {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  color: var(--navy-950);
}

.chat-fab {
  position: fixed;
  right: 16px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 900;
  min-height: 50px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid var(--gold-bright);
  background: linear-gradient(135deg, var(--navy-950), var(--navy-800));
  color: var(--gold-bright);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(6, 16, 32, 0.45), var(--shadow-gold);
}

.chat-drawer {
  position: fixed;
  right: 16px;
  bottom: calc(80px + env(safe-area-inset-bottom));
  width: min(390px, calc(100vw - 24px));
  height: min(540px, calc(100vh - 110px));
  height: min(540px, calc(100dvh - 110px - env(safe-area-inset-bottom)));
  background: #FFFFFF;
  border: 2px solid var(--gold-deep);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(6, 16, 32, 0.45);
  z-index: 910;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.chat-drawer.open {
  display: flex;
}

.chat-header {
  background: linear-gradient(135deg, var(--navy-950), var(--navy-800));
  color: var(--gold-bright);
  padding: 8px 10px 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 600;
}

.chat-close {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  cursor: pointer;
  font-size: 1.25rem;
}

.chat-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.chat-reset-btn {
  background: rgba(255, 224, 102, 0.14);
  color: var(--gold-bright);
  border: 1px solid rgba(255, 215, 0, 0.45);
  border-radius: 10px;
  min-height: 44px;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.chat-reset-btn:hover {
  background: rgba(255, 224, 102, 0.25);
}

.chat-bubble.streaming::after {
  content: " ▍";
  color: var(--gold-deep);
  animation: yatBlink 0.9s steps(1) infinite;
}

@keyframes yatBlink {
  50% { opacity: 0; }
}

.chat-followup-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-self: flex-start;
  max-width: 96%;
}

.chat-followup-btn {
  font-family: inherit;
  font-size: 0.8rem;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  color: var(--navy-900);
  cursor: pointer;
  text-align: left;
}

.chat-followup-btn:hover {
  border-color: var(--gold-deep);
  background: #FFFBEB;
}

.chat-followup-btn.cta {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  border-color: transparent;
  color: var(--navy-950);
  font-weight: 700;
}

/* AI Budget Safety Panel in Super Admin Console */
.ai-budget-panel {
  margin: 14px 0 16px;
  padding: 14px 16px;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
}

.ai-budget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--navy-900);
}

.ai-budget-bar-track {
  width: 100%;
  height: 14px;
  background: #E2E8F0;
  border-radius: 999px;
  overflow: hidden;
}

.ai-budget-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0D9488, #14B8A6);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.ai-budget-bar-fill.warn {
  background: linear-gradient(90deg, #D97706, #F59E0B);
}

.ai-budget-bar-fill.danger {
  background: linear-gradient(90deg, #DC2626, #EF4444);
}

.ai-budget-form {
  padding: 14px 16px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 14px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #F8FAFC;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubble {
  max-width: 88%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-bubble.bot {
  align-self: flex-start;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: var(--text-dark);
}

.chat-bubble.user {
  align-self: flex-end;
  background: var(--navy-900);
  color: #FFFFFF;
}

.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  background: #FFFBEB;
  border-top: 1px solid #FDE68A;
}

.chat-chip {
  font-family: inherit;
  font-size: 0.78rem;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #F59E0B;
  background: #FFFFFF;
  color: #78350F;
  cursor: pointer;
}

.chat-form {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #E2E8F0;
  background: #FFFFFF;
}

.chat-form input {
  flex: 1;
  min-height: 44px;
  padding: 8px 12px;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  font-family: inherit;
  font-size: 16px;
}

/* ============================================================================
 * 6. Compact PDPA Cookie Consent Banner (Zero Overlap with Chat / Sticky Bar)
 * ============================================================================ */
.cookie-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  max-width: 680px;
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  margin: 0 auto;
  background: var(--navy-950);
  color: #F8FAFC;
  border: 1.5px solid var(--gold-deep);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  z-index: 950;
  display: none;
}

.cookie-banner.open {
  display: block;
}

.cookie-compact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cookie-settings-toggle {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.45);
  color: var(--gold-bright);
  border-radius: 8px;
  min-height: 44px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.cookie-compact-desc {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: #CBD5E1;
  line-height: 1.45;
}

.cookie-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.cookie-btn-equal {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--gold-main);
  background: var(--navy-800);
  color: #FFFFFF;
}

.cookie-btn-equal.accept {
  background: var(--gold-main);
  color: var(--navy-950);
}

.cookie-toggles {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  font-size: 0.84rem;
}

.cookie-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  cursor: pointer;
}

.cookie-toggle-row input[type="checkbox"] {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  accent-color: var(--gold-main);
}

/* Priority State Machine: Never allow floating elements to collide */
body.has-cookie-open .chat-fab,
body.has-cookie-open .mobile-sticky-bar {
  display: none !important;
}

body.has-chat-open .mobile-sticky-bar {
  display: none !important;
}

/* ============================================================================
 * 7. Portal, Auth, Admin & Canvas 3:4 Cropper
 * ============================================================================ */
.auth-shell {
  max-width: 520px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 4px 10px;
  text-decoration: none;
}

.auth-links-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.auth-links-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.auth-tap-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 10px;
  font-size: 0.88rem;
  border-radius: 8px;
  text-decoration: underline;
}

.auth-tap-link.primary {
  color: var(--navy-900);
  font-weight: 600;
}

.auth-tap-link.muted {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ============================================================================
 * 7B. Promoted Tax Selector, 3-Way Comparison, FAQ Accordion & 3-Step Trust
 * ============================================================================ */
.tax-promo-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 14px;
  background: #FFFBEB;
  border: 1.5px solid #FDE68A;
  border-radius: 12px;
}

.tax-promo-label {
  flex: 1 1 280px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tax-promo-label label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy-900);
}

.tax-promo-select {
  flex: 0 1 250px;
  min-width: 210px;
}

.compare-3way-table th.col-featured,
.compare-3way-table td.col-featured {
  background: #FFFBEB;
  color: var(--navy-900);
  border-left: 2px solid var(--gold-deep);
  border-right: 2px solid var(--gold-deep);
}

.compare-3way-table thead th.col-featured {
  background: linear-gradient(135deg, #0A192F 0%, #1B3358 100%);
  color: var(--gold-bright);
  border-top: 2px solid var(--gold-deep);
}

.fit-caution-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.fit-caution-grid > * {
  min-width: 0;
}

.fit-box {
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 0.88rem;
}

.fit-box h3 {
  margin: 0 0 8px;
  font-size: 0.98rem;
}

.fit-box ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.fit-box.good {
  background: #F0FDFA;
  border: 1.5px solid #99F6E4;
  color: #115E59;
}

.fit-box.good h3 {
  color: #0F766E;
}

.fit-box.caution {
  background: #FFF7ED;
  border: 1.5px solid #FED7AA;
  color: #7C2D12;
}

.fit-box.caution h3 {
  color: #9A3412;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  background: #F8FAFC;
  overflow: hidden;
}

.faq-item[open] {
  border-color: var(--gold-deep);
  background: #FFFFFF;
}

.faq-question {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--navy-900);
  cursor: pointer;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #FEF3C7;
  color: #92400E;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
}

.faq-item[open] .faq-question::after {
  content: "−";
  background: var(--navy-900);
  color: var(--gold-bright);
}

.faq-answer {
  padding: 0 16px 14px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  border-top: 1px solid #F1F5F9;
  padding-top: 10px;
}

.steps-3-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.step-card {
  background: #FFFFFF;
  border: 1px solid #FDE68A;
  border-radius: 14px;
  padding: 16px;
}

.step-num {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: var(--gold-bright);
  border: 1.5px solid var(--gold-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.step-card h3 {
  margin: 0 0 6px;
  font-size: 0.96rem;
  color: var(--navy-900);
}

.step-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.oic-footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.oic-brochure-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  color: #78350F;
  font-weight: 600;
  font-size: 0.84rem;
  text-decoration: none;
}

.oic-brochure-link:hover {
  background: #FDE68A;
}

.pdpa-consent-wrap {
  margin: 14px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pdpa-privacy-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 44px;
  padding: 6px 10px;
  color: var(--gold-bright);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: underline;
  border-radius: 8px;
}

.portal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.portal-tab-btn {
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1.5px solid #CBD5E1;
  background: #FFFFFF;
  color: var(--navy-900);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

.portal-tab-btn.active {
  background: var(--navy-900);
  color: var(--gold-bright);
  border-color: var(--gold-deep);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.cropper-stage {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
}

.cropper-canvas {
  width: 240px;
  height: 320px;
  border-radius: 14px;
  border: 2px solid var(--gold-deep);
  background: var(--navy-950);
  cursor: grab;
  touch-action: none;
}

.cropper-canvas:active {
  cursor: grabbing;
}

.site-footer {
  background: var(--navy-950);
  color: #94A3B8;
  border-top: 1px solid var(--border-gold);
  padding: 24px 0 36px;
  font-size: 0.84rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.footer-tap-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 8px;
  color: var(--gold-bright);
  text-decoration: underline;
  font-size: 0.84rem;
}

.footer-tap-link.muted {
  color: #CBD5E1;
}

.footer-link-btn {
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
}

.print-only {
  display: none;
}

/* ============================================================================
 * 8. Responsive Breakpoints (Tablet, iOS & Android)
 * ============================================================================ */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .kpi-grid,
  .kpi-grid.game-s2-kpi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mobile-scroll-hint {
    display: block;
  }
}

@media (max-width: 768px) {
  .mobile-sticky-bar {
    display: flex;
  }
  body.has-mobile-sticky {
    padding-bottom: calc(118px + env(safe-area-inset-bottom));
  }
  body:not(.has-mobile-sticky) .site-footer {
    padding-bottom: calc(74px + env(safe-area-inset-bottom));
  }
  .chat-fab {
    bottom: calc(14px + env(safe-area-inset-bottom));
    right: 12px;
    min-height: 46px;
    padding: 8px 14px;
    font-size: 0.86rem;
  }
  body.has-mobile-sticky .chat-fab {
    bottom: calc(72px + env(safe-area-inset-bottom));
  }
  .chat-drawer {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: calc(16px + env(safe-area-inset-bottom));
    height: min(560px, calc(100dvh - 36px - env(safe-area-inset-bottom)));
  }
  /* Horizontal single-row scrollable tabs on /portal & /admin mobile (eliminates 420px stacked wall!) */
  .portal-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    scrollbar-width: thin;
  }
  .portal-tab-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 8px 14px;
    font-size: 0.84rem;
  }
}

@media (max-width: 640px) {
  .top-text-full {
    display: none;
  }
  .top-text-short {
    display: inline;
    font-size: 0.76rem;
  }
  .top-compliance-bar {
    padding: 4px 0;
  }
  .top-link-pill {
    padding: 6px 10px;
    font-size: 0.78rem;
  }
  .hero-section {
    padding: 12px 0 14px;
  }
  .hero-grid {
    gap: 12px;
  }
  .brand-badge {
    padding: 4px 10px;
    margin-bottom: 6px;
  }
  .brand-badge-title {
    font-size: 0.9rem;
  }
  .hero-headline {
    font-size: 1.24rem;
    line-height: 1.24;
    margin-bottom: 6px;
  }
  .hero-sub {
    font-size: 0.82rem;
    line-height: 1.44;
    margin-bottom: 10px;
  }
  .hero-highlights {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 10px;
  }
  .hero-pill-box {
    padding: 6px 6px;
    font-size: 0.7rem;
    line-height: 1.28;
    border-radius: 10px;
  }
  .hero-pill-box strong {
    font-size: 0.76rem;
    margin-bottom: 2px;
  }
  .hero-cta-group {
    gap: 6px;
  }
  .hero-cta-group .btn {
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    font-size: 0.85rem;
  }
  .advisor-card {
    padding: 12px;
    border-radius: 14px;
  }
  .advisor-card-top {
    flex-direction: row;
    text-align: left;
    gap: 10px;
    align-items: center;
  }
  .advisor-photo-frame {
    width: 68px;
    border-radius: 10px;
  }
  .advisor-meta h2 {
    font-size: 0.96rem;
    margin-bottom: 2px;
  }
  .advisor-title {
    font-size: 0.76rem;
    margin-bottom: 4px;
  }
  .advisor-license-badge {
    font-size: 0.72rem;
    padding: 3px 7px;
  }
  .advisor-code {
    font-size: 0.72rem;
    margin-top: 2px;
  }
  .advisor-contacts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 10px;
  }
  .contact-chip {
    min-height: 44px;
    padding: 6px 8px;
    font-size: 0.78rem;
  }
  .kpi-grid,
  .kpi-grid.game-s2-kpi {
    grid-template-columns: 1fr;
  }
  .segmented-tabs {
    grid-template-columns: 1fr;
  }
  .fit-caution-grid,
  .steps-3-grid {
    grid-template-columns: 1fr;
  }
  .tax-promo-select {
    flex: 1 1 100%;
  }
  .card {
    padding: 16px;
  }
  .quick-jump-bar {
    padding: 6px 0;
  }
  .quick-jump-inner {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
  }
  .quick-jump-inner::-webkit-scrollbar {
    display: none;
  }
  .quick-jump-pill {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 6px 12px;
    font-size: 0.78rem;
    white-space: nowrap;
  }
  /* Compact circular AI FAB on small mobile screens so it NEVER occludes LINE / Submit / Game CTAs */
  .chat-fab {
    width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    opacity: 0.94;
  }
  .chat-fab .chat-fab-label {
    display: none;
  }
  .game-step-pill {
    font-size: 0.74rem;
    padding: 7px 4px;
    word-break: keep-all;
    line-height: 1.25;
  }
  .game-step-pill .step-extra {
    display: none;
  }
  .cookie-banner {
    padding: 10px 12px;
  }
  .cookie-compact-desc {
    font-size: 0.76rem;
    margin-top: 4px;
  }
  .cookie-toggles {
    margin-top: 6px;
    padding: 6px 10px;
    font-size: 0.78rem;
    gap: 2px;
  }
  .cookie-actions {
    margin-top: 8px;
    gap: 8px;
  }
  .cookie-btn-equal {
    font-size: 0.82rem;
    padding: 6px 10px;
  }
}

/* ============================================================================
 * 8B. Sales Kit, OIC Marketing Stamper, Member Transfer & /game v2 Responsive
 *     Cross-OS/Platform Hardened: >=44px tap targets, 16px mobile inputs (no iOS zoom),
 *     min-width: 0 anti-overflow, 100dvh & safe-area-inset-bottom support
 * ============================================================================ */
.transfer-toolbar {
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}

.bulk-transfer-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.bulk-transfer-bar select,
.bulk-transfer-bar input[type="text"] {
  flex: 1 1 200px;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1.5px solid #CBD5E1;
  font-family: inherit;
  font-size: 0.92rem;
  background: #FFFFFF;
}

.qr-preview-card {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1.5px solid var(--gold-deep);
}

.qr-preview-card canvas {
  max-width: 180px;
  height: auto;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
}

.mkt-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.mkt-thumb-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 8px;
  border-radius: 12px;
  border: 2px solid #CBD5E1;
  background: #FFFFFF;
  cursor: pointer;
  min-width: 0;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.mkt-thumb-card.selected,
.mkt-thumb-card:hover {
  border-color: var(--gold-deep);
  background: #FFFBEB;
}

.mkt-thumb-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
}

.mkt-thumb-meta strong {
  display: block;
  font-size: 0.84rem;
  color: var(--navy-900);
  line-height: 1.35;
}

.mkt-thumb-meta span {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.stamper-workspace {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.stamper-canvas-wrap {
  background: #061020;
  border-radius: 14px;
  padding: 10px;
  border: 2px solid var(--gold-deep);
  text-align: center;
}

.stamper-canvas {
  width: 100%;
  max-width: 340px;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

.stamper-controls {
  min-width: 0;
}

/* /game v2 Overhaul Controls */
.game-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.game-preset-btn {
  flex: 1 1 70px;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1.5px solid #CBD5E1;
  background: #F8FAFC;
  color: var(--navy-900);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

.game-preset-btn.active {
  background: var(--navy-900);
  color: var(--gold-bright);
  border-color: var(--gold-deep);
}

.game-tax-row {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
}

.game-tax-btn {
  min-height: 44px;
  padding: 6px 4px;
  border-radius: 10px;
  border: 1.5px solid #CBD5E1;
  background: #FFFFFF;
  color: var(--navy-900);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

.game-tax-btn.active {
  background: linear-gradient(135deg, #FFE066, #D4AF37);
  color: #061020;
  border-color: #B45309;
}

.game-plan-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.game-plan-btn {
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid #CBD5E1;
  background: #F8FAFC;
  color: var(--navy-900);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

.game-plan-btn.active {
  background: var(--navy-900);
  color: var(--gold-bright);
  border-color: var(--gold-deep);
}

.game-plan-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.game-crash-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.crash-card {
  padding: 14px;
  border-radius: 12px;
  border: 1.5px solid #CBD5E1;
  min-width: 0;
}

.crash-card.risk {
  background: #FEF2F2;
  border-color: #FCA5A5;
}

.crash-card.safe {
  background: #F0FDF4;
  border-color: #86EFAC;
}

.crash-card.safe.shield-on {
  border-color: #16A34A;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.16);
}

.crash-badge {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 6px;
}

.crash-amount {
  font-size: 1.25rem;
  font-weight: 700;
  color: #DC2626;
  margin-bottom: 6px;
}

.crash-card.safe .crash-amount {
  color: #166534;
}

.crash-desc {
  margin: 0;
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.5;
}

.objection-killer-card {
  background: #FFFBEB;
  border: 2px solid var(--gold-deep);
  border-radius: 14px;
  padding: 16px;
}

.game-mini-lead-card {
  background: var(--navy-900);
  color: #F8FAFC;
  border: 2px solid var(--gold-deep);
  border-radius: 14px;
  padding: 18px;
}

/* Pillar Guide Hub & Article Layout (SEO + GEO) */
.guide-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.84rem;
  color: #475569;
  margin-bottom: 12px;
}

.guide-breadcrumb a {
  color: var(--navy-900);
  font-weight: 600;
  text-decoration: none;
}

.guide-article h2 {
  margin: 22px 0 10px;
  font-size: 1.18rem;
  color: var(--navy-900);
}

.guide-article p,
.guide-article li {
  line-height: 1.72;
  color: #1E293B;
}

.guide-answer-box {
  background: #FFFBEB;
  border: 1.5px solid var(--gold-deep);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 12px 0 18px;
}

.guide-answer-box ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.guide-cta-box {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
  padding: 14px;
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-radius: 12px;
}

.guide-hub-strip {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #E2E8F0;
}

.guide-hub-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 10px;
}

.guide-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.guide-hub-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  min-height: 44px;
  border-radius: 12px;
  border: 1.5px solid #CBD5E1;
  background: #F8FAFC;
  text-decoration: none;
  color: var(--navy-900);
  min-width: 0;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.guide-hub-card:hover {
  border-color: var(--gold-deep);
  background: #FFFBEB;
}

.guide-hub-card strong {
  font-size: 0.88rem;
  line-height: 1.35;
}

.guide-hub-card span {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

@media (max-width: 768px) {
  .guide-hub-grid {
    grid-template-columns: 1fr;
  }
}

.card,
.tab-panel,
.leader-slot-form,
.leader-slot-form .field {
  min-width: 0;
  max-width: 100%;
}

#leaderSlotsHost img {
  max-width: 100%;
  height: auto;
  display: block;
}

input[type="file"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Option 2 Polish: Wide Admin/Portal Tables, In-App Bell & Compact Actions */
table.data-table.compact-admin th,
table.data-table.compact-admin td {
  padding: 8px 8px;
  font-size: 0.82rem;
}

table.data-table.compact-admin td.text-left {
  white-space: normal;
  word-break: break-word;
  line-height: 1.4;
}

.proposal-act-wrap {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  justify-content: flex-end;
  align-items: center;
}

.portal-score-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 0.84rem;
  color: #CBD5E1;
}

.nowrap-stat {
  white-space: nowrap;
}

.portal-links-stack {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.portal-link-row {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.portal-link-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--gold-deep);
  background: #061020;
  color: #FFE066;
  font-size: 0.84rem;
}

.portal-link-input.invite {
  border-color: #38BDF8;
  color: #BAE6FD;
}

.portal-copy-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

#btnAdminNotifBell.has-unread {
  background: linear-gradient(135deg, #FEF3C7, #F59E0B);
  color: #061020;
  border-color: #F59E0B;
  font-weight: 700;
}

.admin-notif-item {
  padding: 10px 12px;
  border-radius: 10px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
}

.admin-notif-item.unread {
  background: #FFFBEB;
  border-color: var(--gold-deep);
}

/* Mobile & Cross-OS Hardening (iOS Safari, Android Chrome, LINE/FB WebView) */
@media (max-width: 640px) {
  .portal-link-row {
    flex-direction: column;
    align-items: stretch;
  }
  .portal-copy-btn {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .stamper-workspace {
    grid-template-columns: 1fr;
  }
  .game-tax-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .game-plan-toggle,
  .game-crash-grid {
    grid-template-columns: 1fr;
  }
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="url"],
  input[type="date"],
  select,
  textarea {
    font-size: 16px !important;
  }
  .btn,
  .portal-tab-btn,
  .option-card,
  .top-link-pill {
    min-height: 44px;
  }
  .site-footer {
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  }
}

/* ============================================================================
 * 9. Print / Save as PDF (A4 Clean Layout — ALWAYS Shows All 25 Policy Years!)
 * ============================================================================ */
@page {
  size: A4 portrait;
  margin: 12mm;
}

@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body {
    background: #FFFFFF !important;
    color: #0F172A !important;
    font-size: 10.5pt;
    line-height: 1.4;
    padding-bottom: 0 !important;
  }

  .no-print,
  .top-compliance-bar,
  .quick-jump-bar,
  .mobile-sticky-bar,
  .hero-cta-group,
  .chat-fab,
  .chat-drawer,
  .cookie-banner,
  .lead-section,
  .action-toolbar,
  .site-footer .footer-links {
    display: none !important;
  }

  .print-only {
    display: block !important;
  }

  .hero-section {
    background: #0A192F !important;
    color: #FFFFFF !important;
    padding: 14px 16px !important;
    border-radius: 10px;
    margin-bottom: 12px;
  }

  .brand-gold-text {
    color: #D4AF37 !important;
    background: none !important;
    -webkit-text-fill-color: #D4AF37 !important;
  }

  .main-surface {
    background: #FFFFFF !important;
    padding: 0 !important;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid #CBD5E1 !important;
    padding: 12px !important;
    margin-bottom: 10px !important;
    break-inside: avoid;
  }

  .card.table-card-printable {
    break-inside: auto !important;
  }

  .kpi-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
  }

  .table-scroll,
  .sticky-table-box {
    max-height: none !important;
    overflow: visible !important;
    border: none !important;
  }

  table.data-table {
    font-size: 8.5pt !important;
  }

  table.data-table th,
  table.data-table td {
    padding: 4px 6px !important;
  }

  table.data-table tr {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  /* ALWAYS print full 25-year table regardless of mobile summary toggle */
  table.data-table tbody tr.row-collapsed {
    display: table-row !important;
  }

  .advisor-photo-frame.is-mint-default img {
    object-fit: cover !important;
    object-position: center 10% !important;
    transform: scale(1.12) !important;
    transform-origin: top center !important;
  }
}
