/* MyPolicypedia / Từ Điển Bảo Hiểm Của Tôi
   Locked Brand System: Indigo Clarity (#3B49DF) + Shield-Book + Lora & Lexend
   v3.0: Multi-Category Catalog (UL/ILP + Savings + Health/CI + Term), Rich Insurers Showcase,
   and Persistent Pop-Up AI Chatbot "An" (Minimized by Default across PC, iOS & Android) */

:root {
  --primary: #3B49DF;
  --primary-dark: #2A36B1;
  --primary-soft: #EEF2FF;
  --primary-bd: #C7D2FE;
  --grad: linear-gradient(135deg, #2A36B1 0%, #3B49DF 100%);
  --ink: #0F172A;
  --ink-2: #334155;
  --muted: #4B5563;   /* WCAG AA >= 7.0:1 */
  --subtle: #526075;  /* WCAG AA >= 5.9:1 */
  --surface: #FFFFFF;
  --surface-subtle: #FAFBFD;
  --canvas: #F7F8FC;
  --border: #E5E7EB;
  --border-soft: #F1F5F9;
  --border-strong: #CBD5E1;
  --ring: 0 0 0 3px rgba(59, 73, 223, 0.16);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --good-bg: #ECFDF5;
  --good-tx: #047857;
  --good-bar: #10B981;
  --warn-bg: #FFFBEB;
  --warn-tx: #B45309;
  --warn-bd: #FDE68A;
  --warn-bar: #F59E0B;
  --bad-bg: #FFF1F2;
  --bad-tx: #BE123C;
  --bad-bar: #E11D48;
  --teal-bg: #F0FDFA;
  --teal-tx: #0F766E;
  --teal-bd: #99F6E4;
  --purple-bg: #FAF5FF;
  --purple-tx: #7E22CE;
  --purple-bd: #E9D5FF;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px -2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 16px -4px rgba(15, 23, 42, 0.08), 0 14px 32px -10px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 20px 50px -12px rgba(15, 23, 42, 0.22), 0 8px 20px -8px rgba(15, 23, 42, 0.12);
  --font-head: 'Lora', Georgia, serif;
  --font-body: 'Lexend', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
*:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--canvas);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

.tab-num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}
.container {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

/* Persistent Minimal Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  border: none; background: transparent; padding: 0; cursor: pointer; text-align: left;
  font-family: inherit;
}
.brand-mark { flex-shrink: 0; display: block; }
.brand-text { display: flex; flex-direction: column; }
.brand-title { font-family: var(--font-head); font-weight: 700; font-size: 16px; color: var(--ink); line-height: 1.15; }
.brand-sub { font-size: 11.5px; color: var(--subtle); font-weight: 500; }

.desktop-tabs { display: flex; align-items: center; gap: 28px; height: 100%; }
.d-tab {
  height: 100%; border: none; background: transparent; cursor: pointer;
  font-family: var(--font-body); font-size: 13.5px; font-weight: 500; color: var(--muted);
  border-bottom: 2px solid transparent; padding: 0 4px; transition: color 0.15s, border-color 0.15s;
}
.d-tab:hover { color: var(--ink); }
.d-tab.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }

.topbar-right { display: flex; align-items: center; gap: 10px; }
.about-link-btn {
  border: none; background: transparent; color: var(--subtle); cursor: pointer;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 600; padding: 6px 8px; border-radius: 8px;
}
.about-link-btn:hover { background: var(--primary-soft); color: var(--primary); }

.lang-switch {
  display: inline-flex; background: var(--canvas); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px;
}
.lang-btn {
  border: none; background: transparent; color: var(--muted); cursor: pointer;
  font-family: var(--font-body); font-size: 11.5px; font-weight: 600;
  padding: 5px 11px; border-radius: 999px; transition: all 0.15s;
}
.lang-btn.active { background: var(--primary); color: #fff; }

/* View Stage */
.view-stage { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.view-panel { display: none; flex: 1; min-width: 0; max-width: 100%; }
.view-panel.active { display: flex; flex-direction: column; animation: mpFadeUp 0.24s var(--ease-out); }
@keyframes mpFadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.view-pad { padding-top: 22px; padding-bottom: 40px; min-width: 0; max-width: 100%; }
body.has-dock .view-pad { padding-bottom: 56px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  border-radius: 12px; padding: 10px 18px; min-height: 42px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform 0.12s, opacity 0.15s, border-color 0.15s, background 0.15s;
}
.btn-sm { padding: 7px 13px; min-height: 36px; font-size: 12.5px; border-radius: 10px; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 2px 8px rgba(59, 73, 223, 0.24); }
.btn-primary:hover { opacity: 0.94; }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--border); }
.btn-outline:hover { border-color: #CBD5E1; background: #FAFBFD; }
.btn-soft { background: var(--primary-soft); color: var(--primary); }
.btn-soft:hover { background: #E0E7FF; }
.btn-full { width: 100%; }

/* Inline Glossary ? Button */
.help-dot {
  display: inline-grid; place-items: center; width: 17px; height: 17px;
  border-radius: 999px; border: 1px solid #CBD5E1; background: #fff; color: var(--subtle);
  font-family: var(--font-body); font-size: 10.5px; font-weight: 700; cursor: pointer;
  margin-left: 4px; vertical-align: middle; padding: 0; line-height: 1;
}
.help-dot:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

/* VIEW 1: ZERO-SCROLL HOME */
#view-home.active {
  background-color: var(--canvas);
  background-image: radial-gradient(ellipse 72% 46% at 50% 0%, rgba(59, 73, 223, 0.075), transparent 72%);
}
.home-center {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding-top: 32px; padding-bottom: 42px;
}
.home-pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--primary-soft); color: var(--primary); border: 1px solid var(--primary-bd);
  font-family: var(--font-body); font-size: 12px; font-weight: 600; line-height: 1.35;
  padding: 6px 14px; border-radius: 999px;
  margin-bottom: 18px; cursor: pointer; transition: background 0.15s, transform 0.14s;
}
.home-pill:hover { background: #E0E7FF; transform: translateY(-1px); }
.home-headline {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(28px, 4.2vw, 46px);
  line-height: 1.20; letter-spacing: -0.02em;
  color: var(--ink); margin: 0 0 12px; max-width: 720px;
}
.home-sub {
  margin: 0 0 28px; color: var(--muted); font-size: 15px; max-width: 630px;
}

.home-search-wrap {
  position: relative; z-index: 35; width: 100%; max-width: 660px;
}
.home-search {
  width: 100%;
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  padding: 6px 6px 6px 18px; display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-md); transition: border-color 0.15s, box-shadow 0.15s;
}
.home-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(59, 73, 223, 0.12); }
.home-search .s-ico { color: var(--subtle); flex-shrink: 0; }
.home-search input {
  flex: 1; border: none; outline: none; background: transparent;
  font-family: var(--font-body); font-size: 14px; color: var(--ink); min-width: 0;
}
.home-search input::placeholder { color: #64748B; }
.home-search .btn { border-radius: 13px; padding: 10px 20px; }

.home-ac-popover {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40;
  background: #FFFFFF; border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 20px 50px -8px rgba(15, 23, 42, 0.24), 0 0 0 1px rgba(15, 23, 42, 0.06);
  overflow: hidden; text-align: left;
  animation: mpSlideDown 0.14s var(--ease-out);
}
@keyframes mpSlideDown {
  from { transform: translateY(-4px); }
  to { transform: translateY(0); }
}
.home-ac-item {
  width: 100%; border: none; background: #fff; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid var(--border-soft); cursor: pointer; font-family: inherit; text-align: left;
  transition: background 0.12s;
}
.home-ac-item:hover { background: var(--surface-subtle); }
.home-ac-item-meta { font-size: 11.5px; color: var(--subtle); font-weight: 500; display: flex; align-items: center; gap: 7px; margin-bottom: 2px; min-width: 0; }
.home-ac-item-title { font-family: var(--font-head); font-weight: 700; font-size: 14.5px; color: var(--ink); }
.home-ac-ask {
  width: 100%; border: none; background: var(--primary-soft); color: var(--primary);
  padding: 11px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-align: left;
  transition: background 0.12s;
}
.home-ac-ask:hover { background: #E0E7FF; }

.home-quick-pills {
  margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 7px; max-width: 660px;
}
.home-q-pill {
  border: 1px solid var(--border); background: #fff; color: var(--muted);
  font-family: var(--font-body); font-size: 12px; font-weight: 500;
  padding: 5px 12px; border-radius: 999px; cursor: pointer; transition: all 0.14s;
}
.home-q-pill:hover { border-color: var(--primary-bd); color: var(--primary); background: var(--primary-soft); }

.pathway-grid {
  margin-top: 26px; width: 100%; max-width: 840px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.pathway-card {
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  padding: 18px; text-align: left; cursor: pointer; font-family: inherit;
  display: flex; flex-direction: column; gap: 14px; position: relative;
  box-shadow: var(--shadow-sm); transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.pathway-card:hover { border-color: var(--primary-bd); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.pathway-card-an {
  background: linear-gradient(135deg, #FFFFFF 0%, #EEF2FF 100%);
  border: 1.5px solid var(--primary-bd);
}
.pathway-card-an:hover { border-color: var(--primary); }
.pw-top-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
}
.pw-badge {
  font-size: 11px; font-weight: 600; color: var(--subtle);
  background: var(--canvas); border: 1px solid var(--border); border-radius: 999px;
  padding: 3px 9px; white-space: nowrap;
}
.pw-badge-an {
  background: var(--primary-soft); border-color: var(--primary-bd); color: var(--primary);
}
.pw-ico {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; flex-shrink: 0;
}
.pw-ico-health { background: var(--teal-bg); color: var(--teal-tx); }
.pw-ico-an {
  position: relative; width: 40px; height: 40px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.pw-an-dot {
  position: absolute; right: 0; bottom: 0; width: 10px; height: 10px;
  border-radius: 999px; background: var(--good-bar); border: 2px solid #fff;
}
.pw-copy { display: flex; flex-direction: column; gap: 3px; }
.pw-copy strong { font-size: 14px; font-weight: 600; color: var(--ink); }
.pw-copy span { font-size: 12.5px; color: var(--muted); }
.pw-arrow { position: absolute; right: 16px; bottom: 16px; color: var(--primary); opacity: 0.85; }

.home-trust {
  margin-top: 26px; font-size: 12.5px; color: var(--subtle);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.home-trust-line {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px;
}
.matcher-pill-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--primary-bd); background: var(--primary-soft); color: var(--primary);
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  padding: 9px 18px; border-radius: 999px; cursor: pointer;
  transition: background 0.15s, transform 0.12s;
}
.matcher-pill-btn:hover { background: #E0E7FF; transform: translateY(-1px); }

/* Mobile Compact Glossary Trigger (Hidden on Desktop where ? dots sit in table head) */
.mob-gloss-bar { display: none; margin-bottom: 10px; }
.mob-gloss-btn {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 12px; border: 1px solid var(--border);
  background: #fff; color: var(--ink-2); font-family: var(--font-body);
  font-size: 12px; font-weight: 500; cursor: pointer; text-align: left;
}
.mob-gloss-btn:hover { border-color: var(--primary-bd); color: var(--primary); }

/* Saved Favorites Heart Icon Button */
.fav-btn {
  border: none; background: transparent; color: #94A3B8; cursor: pointer;
  width: 30px; height: 30px; border-radius: 8px; display: inline-grid; place-items: center;
  padding: 0; transition: color 0.14s, background 0.14s;
}
.fav-btn:hover { background: var(--bad-bg); color: var(--bad-bar); }
.fav-btn.saved { color: var(--bad-bar); }
.row-act-wrap { display: inline-flex; align-items: center; justify-content: flex-end; gap: 2px; }

/* Animated Typing Dots inside An Chatbot */
.typing-wrap { display: inline-flex; align-items: center; gap: 8px; color: var(--subtle); font-size: 13px; }
.typing-dots { display: inline-flex; align-items: center; gap: 4px; }
.typing-dots span {
  width: 6px; height: 6px; border-radius: 999px; background: var(--primary);
  animation: anPulse 1.2s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes anPulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.85); }
  40% { opacity: 1; transform: scale(1.1); }
}

/* First-Visit Subtle Greeting Whisper above Minimized "Hỏi An" */
.an-whisper {
  position: fixed; right: 22px; bottom: 80px; z-index: 64;
  max-width: 290px; background: var(--ink); color: #fff;
  padding: 10px 30px 10px 14px; border-radius: 14px 14px 4px 14px;
  font-size: 12.5px; line-height: 1.45; box-shadow: var(--shadow-md);
  cursor: pointer;
}
.an-whisper-x {
  position: absolute; top: 6px; right: 6px; width: 22px; height: 22px;
  border: none; background: transparent; color: #CBD5E1; font-size: 15px;
  cursor: pointer; display: grid; place-items: center; border-radius: 6px;
}
.an-whisper-x:hover { color: #fff; background: rgba(255,255,255,0.12); }

/* Inline Cited-Page Excerpt Box & Quick Matcher Cards */
.excerpt-box {
  background: var(--canvas); border: 1px solid var(--border); border-radius: 14px;
  padding: 15px 17px; font-size: 13.4px; line-height: 1.68; color: var(--ink-2);
  white-space: pre-wrap; max-height: 54dvh; overflow-y: auto;
}
.pp-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; margin-bottom: 10px;
}
.pp-sec-badge { font-size: 12px; font-weight: 700; color: var(--primary); }
.pp-toggle-btn {
  border: 1px solid var(--primary-bd); background: var(--primary-soft); color: var(--primary);
  font-family: var(--font-body); font-size: 11.5px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; cursor: pointer;
}
.pp-toggle-btn:hover { background: #E0E7FF; }
.pdf-page-img-wrap {
  background: #F1F5F9; border: 1px solid var(--border); border-radius: 14px;
  padding: 8px; max-height: 58dvh; overflow-y: auto; text-align: center;
}
.pdf-page-img {
  width: 100%; height: auto; display: block; border-radius: 8px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.10); background: #fff;
}
.matcher-sub { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.matcher-body-bg { background: var(--canvas); padding-top: 16px !important; border-top: 1px solid var(--border-soft); }
.matcher-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.matcher-opt {
  width: 100%; text-align: left; background: #fff; border: 1.5px solid var(--border);
  border-radius: 16px; padding: 14px 15px; cursor: pointer; font-family: inherit;
  display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, transform 0.14s, box-shadow 0.15s;
}
.matcher-opt:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.matcher-opt-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.matcher-ico {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0;
}
.matcher-tag {
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.matcher-opt-copy { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.matcher-opt-copy strong { font-size: 13.8px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.matcher-opt-copy span { font-size: 12px; color: var(--muted); line-height: 1.45; }
.matcher-opt-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 4px;
  font-size: 12px; font-weight: 600; color: var(--primary); margin-top: auto;
}
.matcher-opt:hover .matcher-opt-foot svg { transform: translateX(3px); }
.matcher-opt-foot svg { transition: transform 0.14s; }
.gloss-all-item { padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.gloss-all-item:last-child { border-bottom: none; }
.gloss-all-item h4 { font-family: var(--font-head); font-size: 14.5px; margin: 0 0 5px; color: var(--ink); }
.gloss-all-item p { margin: 4px 0; font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.trust-inline-link {
  border: none; background: transparent; color: var(--primary); font-family: inherit;
  font-size: 12.5px; font-weight: 600; cursor: pointer; text-decoration: underline; padding: 2px 4px;
}

/* VIEW 2: EXPANDED PAGINATED COMPARE */
.filter-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}
.filter-search {
  flex: 1; min-width: 240px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  height: 42px; padding: 0 12px 0 14px; display: flex; align-items: center; gap: 9px; color: var(--subtle);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.filter-search:focus-within { border-color: var(--primary); box-shadow: var(--ring); }
.filter-search input {
  flex: 1; border: none; outline: none; background: transparent;
  font-family: var(--font-body); font-size: 13.5px; color: var(--ink); min-width: 0;
}
.search-clear-btn {
  width: 22px; height: 22px; border-radius: 999px; border: none;
  background: var(--border-soft); color: var(--muted); font-size: 14px; line-height: 1;
  display: grid; place-items: center; cursor: pointer; flex-shrink: 0; padding: 0;
}
.search-clear-btn:hover { background: var(--border); color: var(--ink); }
.filter-controls { display: flex; gap: 8px; flex-wrap: wrap; }
.select-input {
  height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--border);
  background: #fff; font-family: var(--font-body); font-size: 13px; color: var(--ink); cursor: pointer;
}

.chip-strip-wrap {
  position: relative; margin-bottom: 10px; max-width: 100%; min-width: 0;
}
.chip-strip-wrap::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 4px; width: 32px;
  background: linear-gradient(90deg, rgba(247, 248, 252, 0), var(--canvas) 82%);
  pointer-events: none;
}
.chip-strip {
  display: flex; gap: 8px; overflow-x: auto; max-width: 100%; min-width: 0;
  padding-bottom: 4px; padding-right: 28px; -webkit-overflow-scrolling: touch;
}
.active-filter-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-bottom: 10px; font-size: 12.5px; color: var(--subtle);
}
.active-filter-bar strong { color: var(--ink); }
.active-reset-link {
  border: none; background: transparent; color: var(--primary); font-family: inherit;
  font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 2px 4px;
}
.active-reset-link:hover { text-decoration: underline; }
.f-chip {
  white-space: nowrap; height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--border); background: #fff; color: var(--ink-2);
  font-family: var(--font-body); font-size: 12.5px; font-weight: 500; cursor: pointer;
  transition: all 0.15s;
}
.f-chip:hover { border-color: #CBD5E1; }
.f-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* Desktop Paginated List Card */
.desktop-list-card {
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.list-head, .list-row {
  display: grid;
  grid-template-columns: 38px minmax(195px, 1.55fr) minmax(112px, 0.8fr) minmax(130px, 1fr) minmax(130px, 0.95fr) 114px;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
}
.list-head {
  min-height: 46px; padding-top: 11px; padding-bottom: 11px;
  background: var(--surface-subtle); border-bottom: 1px solid var(--border);
  font-size: 11.5px; font-weight: 600; color: var(--subtle); text-transform: uppercase; letter-spacing: 0.03em;
}
.list-head > div { display: flex; align-items: center; gap: 2px; min-width: 0; }
.list-row {
  min-height: 68px; padding-top: 12px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft); border-left: 3px solid transparent;
  cursor: pointer; transition: background 0.12s, border-left-color 0.14s;
}
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: var(--surface-subtle); }
.list-row.selected { background: var(--primary-soft); border-left-color: var(--primary); }

/* Skeleton Shimmer Loader */
.skeleton-row {
  display: grid; grid-template-columns: 38px 1.6fr 0.8fr 1fr 0.95fr 114px;
  gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border-soft); align-items: center;
}
.skel-bar {
  height: 14px; border-radius: 7px;
  background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
  background-size: 200% 100%; animation: mpShimmer 1.3s infinite linear;
}
@keyframes mpShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.ins-micro-badge {
  width: 19px; height: 19px; border-radius: 5px; color: #fff;
  font-size: 8.5px; font-weight: 700; display: inline-grid; place-items: center; flex-shrink: 0;
}

.empty-fallback {
  padding: 32px 20px; text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 12px; color: var(--muted);
}
.empty-fallback-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* Custom Tactile Checkbox */
.chk-btn {
  width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid #94A3B8;
  background: #fff; cursor: pointer; display: grid; place-items: center; padding: 0;
  transition: all 0.14s;
}
.chk-btn.checked { background: var(--primary); border-color: var(--primary); color: #fff; }

.p-ins { font-size: 12px; color: var(--subtle); font-weight: 500; display: flex; align-items: center; gap: 7px; min-height: 26px; margin-bottom: 2px; min-width: 0; }
.p-ins-fallback { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.p-ins-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-logo-img { max-height: 26px; max-width: 132px; width: auto; object-fit: contain; object-position: left center; display: block; flex-shrink: 0; }
.ins-dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; flex-shrink: 0; }
.p-name-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 1px; }
.p-name { font-family: var(--font-head); font-weight: 700; font-size: 15px; color: var(--ink); }

.type-pill {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: var(--canvas); color: var(--ink-2); border: 1px solid var(--border);
  white-space: nowrap;
}
.type-pill.ilp { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-bd); }
.type-pill.endow { background: var(--warn-bg); color: var(--warn-tx); border-color: var(--warn-bd); }
.type-pill.health { background: var(--teal-bg); color: var(--teal-tx); border-color: var(--teal-bd); }
.type-pill.term { background: var(--purple-bg); color: var(--purple-tx); border-color: var(--purple-bd); }
.type-pill.rider { background: #FFF7ED; color: #C2410C; border-color: #FED7AA; }
.type-pill.single { background: var(--good-bg); color: var(--good-tx); border-color: #A7F3D0; }

.fee-cell { display: flex; flex-direction: column; gap: 5px; }
.fee-badge {
  display: inline-flex; width: fit-content; font-weight: 700; font-size: 13px;
  padding: 2px 9px; border-radius: 7px; font-variant-numeric: tabular-nums;
}
.fee-good { background: var(--good-bg); color: var(--good-tx); }
.fee-warn { background: var(--warn-bg); color: var(--warn-tx); }
.fee-bad { background: var(--bad-bg); color: var(--bad-tx); }
.fee-teal { background: var(--teal-bg); color: var(--teal-tx); }
.fee-purple { background: var(--purple-bg); color: var(--purple-tx); }
.fee-track { width: 84px; height: 4px; border-radius: 999px; background: #E5E7EB; overflow: hidden; }
.fee-fill { height: 100%; border-radius: 999px; }

.stat-main { font-size: 13px; font-weight: 600; color: var(--ink); }
.stat-sub { font-size: 11.5px; color: var(--subtle); }

.link-detail {
  border: none; background: transparent; color: var(--primary);
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 6px; border-radius: 8px;
}
.link-detail:hover { background: var(--primary-soft); }

.pager-bar {
  padding: 14px 18px; border-top: 1px solid var(--border); background: #FAFBFD;
  display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--subtle);
}
.pager-btns { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.pg-btn {
  min-width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border);
  background: #fff; color: var(--ink-2); font-family: var(--font-body); font-size: 12.5px;
  font-weight: 600; cursor: pointer; display: grid; place-items: center; padding: 0 8px;
}
.pg-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pg-btn:disabled { opacity: 0.4; cursor: default; }

/* Mobile Cards (Hidden on Desktop) */
.mobile-cards { display: none; flex-direction: column; gap: 12px; }
.mobile-pager { display: none; margin-top: 14px; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }

.m-card {
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  padding: 15px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 12px;
  cursor: pointer; transition: border-color 0.14s, box-shadow 0.14s;
}
.m-card:hover { border-color: var(--primary-bd); }
.m-card.selected { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(59, 73, 223, 0.14); }
.m-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.m-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  background: var(--canvas); border-radius: 12px; padding: 10px 8px; text-align: center;
}
.m-st-k { font-size: 10.5px; color: var(--subtle); }
.m-st-v { font-size: 12.5px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.m-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.m-sel-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px;
  border: none; background: transparent; padding: 0 4px; cursor: pointer;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 600; color: var(--muted);
}
.m-sel-btn.checked { color: var(--primary); }

/* Floating Compare Dock */
.compare-dock {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 45;
  width: min(680px, calc(100% - 220px));
  background: var(--ink); color: #fff; border-radius: 999px;
  padding: 8px 10px 8px 18px; box-shadow: 0 16px 40px rgba(15, 23, 42, 0.28);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.dock-chips {
  display: flex; align-items: center; gap: 8px; overflow-x: auto; min-width: 0;
  scrollbar-width: none; -ms-overflow-style: none;
}
.dock-chips::-webkit-scrollbar { display: none; }
.dock-chip {
  white-space: nowrap; font-size: 12px; font-weight: 500;
  background: rgba(255, 255, 255, 0.14); padding: 5px 10px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
}
.dock-chip button {
  border: none; background: transparent; color: #E2E8F0; cursor: pointer;
  font-size: 14px; line-height: 1; padding: 0;
}
.dock-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.dock-clear {
  border: none; background: transparent; color: #E2E8F0; font-family: inherit;
  font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 6px 8px;
}
.dock-go { border-radius: 999px; padding: 8px 16px; min-height: 36px; }

/* VIEW 3: SIDE-BY-SIDE DIFF */
.diff-topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.back-btn {
  display: inline-flex; align-items: center; gap: 6px; border: none; background: transparent;
  color: var(--primary); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 0;
}
.diff-heading { font-family: var(--font-head); font-size: 20px; margin: 0; }
.diff-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.diff-only-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 500; color: var(--ink-2); cursor: pointer;
}
.diff-only-toggle input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.swipe-hint {
  display: none; font-size: 12px; color: var(--primary); font-weight: 600;
  background: var(--primary-soft); padding: 4px 10px; border-radius: 999px;
}
.diff-scroll-wrap { overflow-x: visible; max-width: 100%; }
.diff-headers-sticky {
  position: sticky; top: 62px; z-index: 25;
  background: rgba(247, 248, 252, 0.96); backdrop-filter: blur(8px);
  padding: 6px 0 8px; margin-bottom: 8px; border-bottom: 1px solid var(--border-soft);
}
.diff-headers { display: grid; gap: 12px; margin-bottom: 0; }
.diff-pcard {
  background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 7px;
  min-width: 0; overflow: hidden;
}
.diff-swap-row { display: flex; align-items: center; gap: 6px; min-width: 0; width: 100%; }
.diff-swap-sel {
  flex: 1; width: 0; min-width: 0; max-width: 100%; height: 34px; padding: 0 8px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--canvas); color: var(--ink);
  font-family: var(--font-body); font-size: 12px; font-weight: 600; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.diff-rm-btn {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; color: var(--subtle); cursor: pointer; font-size: 14px; flex-shrink: 0;
}
.diff-rm-btn:hover { border-color: var(--bad-bar); color: var(--bad-tx); }
.diff-pdf {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; color: var(--primary); text-decoration: none;
}
.diff-pdf:hover { text-decoration: underline; }

/* Interactive VND Year-1 Fee Simulator */
.vnd-sim-card {
  background: #fff; border: 1px solid var(--primary-bd); border-radius: 16px;
  padding: 14px 16px; margin-bottom: 14px; box-shadow: var(--shadow-sm);
}
.vnd-sim-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.vnd-sim-lbl { font-size: 13px; font-weight: 600; color: var(--ink); }
.vnd-presets { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.vnd-preset-btn {
  border: 1px solid var(--border); background: var(--canvas); color: var(--muted);
  font-family: inherit; font-size: 11.5px; font-weight: 600; padding: 3px 9px;
  border-radius: 999px; cursor: pointer; transition: all 0.14s;
}
.vnd-preset-btn:hover { border-color: var(--primary-bd); color: var(--primary); }
.vnd-preset-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.vnd-sim-amt {
  font-size: 14px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums;
  background: var(--primary-soft); padding: 3px 10px; border-radius: 999px;
}
.vnd-slider { width: 100%; accent-color: var(--primary); cursor: pointer; height: 6px; margin-bottom: 12px; }
.vnd-sim-grid { display: grid; gap: 10px; }
.vnd-sim-item { background: var(--canvas); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.vnd-sim-plan {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 12px; font-weight: 700; color: var(--ink); margin-bottom: 6px;
}
.vnd-sim-pct { font-size: 11px; font-weight: 600; color: var(--subtle); }
.vnd-split-bar {
  width: 100%; height: 9px; border-radius: 999px; background: var(--border);
  overflow: hidden; display: flex; margin-bottom: 7px;
}
.vnd-split-fee { height: 100%; background: var(--bad-bar); }
.vnd-split-net { height: 100%; background: var(--good-bar); }
.vnd-sim-nums { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; flex-wrap: wrap; }
.vnd-fee-loss { color: var(--bad-tx); font-weight: 700; }
.vnd-fee-net { color: var(--good-tx); font-weight: 700; }

.seg-tabs {
  display: flex; background: #fff; border: 1px solid var(--border);
  border-radius: 14px; padding: 4px; gap: 4px; margin-bottom: 14px;
}
.seg-tab {
  flex: 1; border: none; background: transparent; border-radius: 10px;
  padding: 9px 10px; font-family: var(--font-body); font-size: 13px; font-weight: 500;
  color: var(--muted); cursor: pointer; transition: all 0.15s;
}
.seg-tab.active { background: var(--primary); color: #fff; font-weight: 600; }

.diff-matrix {
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 14px;
}
.diff-row { display: grid; border-bottom: 1px solid var(--border-soft); }
.diff-row:last-child { border-bottom: none; }
.diff-lbl { padding: 14px 16px; background: #FAFBFD; font-size: 12.5px; font-weight: 600; color: var(--subtle); }
.diff-val { padding: 14px 16px; border-left: 1px solid var(--border-soft); font-size: 13.5px; color: var(--ink); }
.diff-val.best { background: var(--good-bg); }
.diff-val.best strong { color: var(--good-tx); }
.diff-best-pill {
  display: inline-block; font-size: 10.5px; font-weight: 700;
  color: var(--good-tx); background: #D1FAE5; padding: 2px 8px; border-radius: 999px;
  margin-bottom: 4px;
}
.diff-pg { display: inline-block; margin-top: 5px; font-size: 11.5px; color: var(--primary); font-weight: 600; text-decoration: none; }
.diff-pg:hover { text-decoration: underline; }

.watch-strip {
  background: var(--warn-bg); border: 1px solid var(--warn-bd); border-radius: 14px;
  padding: 14px 16px; margin-bottom: 16px;
}
.watch-strip-head {
  display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700;
  color: var(--warn-tx); margin-bottom: 8px;
}
.watch-cols { display: grid; gap: 14px; }
.watch-cols ul { margin: 4px 0 0; padding-left: 18px; font-size: 12.5px; color: #78350F; }
.watch-cols li { margin-bottom: 4px; }
.diff-cta-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* VIEW 4: RICH EDITORIAL INSURERS SHOWCASE (LOGOS, ORIGIN, STRENGTHS, PAGINATED) */
.ins-topbar {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
.ins-head { max-width: 560px; }
.ins-head h2 { font-family: var(--font-head); font-size: 24px; margin: 0 0 5px; color: var(--ink); }
.ins-head p { margin: 0; color: var(--muted); font-size: 13.5px; }
.ins-filters { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; min-width: 280px; }
.ins-search-box { width: 100%; max-width: 320px; height: 38px; }
.ins-chip-row { margin-bottom: 0; padding-bottom: 0; }

.ins-grid-rich {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.ins-rich-card {
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  padding: 18px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow-sm); transition: border-color 0.16s, transform 0.15s, box-shadow 0.16s;
  position: relative; overflow: hidden; cursor: pointer;
}
.ins-rich-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--ins-color, var(--primary));
}
.ins-rich-card:hover { border-color: var(--primary-bd); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.ins-rich-card.pre { border-style: dashed; background: #FAFBFD; }

.ins-logo-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 50px; padding-bottom: 10px; border-bottom: 1px solid var(--border-soft);
}
.ins-logo-stage {
  height: 46px; max-width: 185px; display: inline-flex; align-items: center; justify-content: flex-start;
  flex-shrink: 0;
}
.ins-logo-img {
  max-height: 44px; max-width: 178px; width: auto;
  object-fit: contain; object-position: left center; display: block;
}
.ins-since-pill {
  font-size: 11px; font-weight: 600; color: var(--subtle); background: var(--canvas);
  border: 1px solid var(--border-soft); border-radius: 999px; padding: 3px 9px; white-space: nowrap;
}
.ins-logo-badge {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff;
  background: var(--ins-color, var(--primary));
  position: relative; overflow: hidden;
}
.ins-logo-badge svg { width: 38px; height: 38px; display: block; }
.ins-title-wrap { min-width: 0; }
.ins-name { font-family: var(--font-head); font-weight: 700; font-size: 16px; color: var(--ink); line-height: 1.22; }
.ins-origin { font-size: 12px; color: var(--subtle); font-weight: 500; margin-top: 2px; }

.ins-tagline {
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  background: var(--ins-soft, var(--canvas)); border-radius: 10px; padding: 7px 10px;
}
.ins-strengths {
  margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px;
}
.ins-strengths li {
  display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px; color: var(--ink-2); line-height: 1.45;
}
.ins-strengths svg { color: var(--good-bar); flex-shrink: 0; margin-top: 2px; }

.ins-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.ins-card-foot {
  margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.an-action-btn, .ins-ask-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--primary-bd); background: #fff; color: var(--primary);
  font-family: var(--font-body); font-size: 12.5px; font-weight: 600; cursor: pointer;
  padding: 6px 13px 6px 8px; min-height: 36px; border-radius: 10px;
  transition: border-color 0.14s, background 0.14s, color 0.14s, box-shadow 0.14s;
}
.an-action-btn:hover, .ins-ask-btn:hover {
  border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark);
  box-shadow: 0 2px 8px rgba(59, 73, 223, 0.14);
}
.an-action-btn.btn-lg { min-height: 42px; padding: 8px 16px 8px 10px; font-size: 13px; border-radius: 12px; }
.an-action-btn.btn-full { width: 100%; }
.ins-ask-ico { display: inline-flex; flex-shrink: 0; }
.ins-view-btn {
  border: none; background: var(--primary-soft); color: var(--primary); font-family: inherit;
  font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 7px 13px; min-height: 34px; border-radius: 10px;
  transition: background 0.14s;
}
.ins-view-btn:hover { background: #E0E7FF; }

.ins-pager {
  margin-top: 22px; display: flex; align-items: center; justify-content: center;
  gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--subtle);
}

/* ==========================================================================
   PERSISTENT POP-UP AI CHATBOT WIDGET: "AN" (Minimized by Default!)
   ========================================================================== */
.an-launcher {
  position: fixed; right: 18px; bottom: 18px; z-index: 65;
  display: inline-flex; align-items: center; gap: 9px;
  background: #fff; color: var(--ink); border: 1.5px solid var(--primary-bd);
  border-radius: 999px; padding: 5px 14px 5px 6px; cursor: grab;
  font-family: var(--font-body); box-shadow: var(--shadow-lg);
  touch-action: none; user-select: none; -webkit-user-select: none;
  transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s;
}
.an-launcher:hover { transform: translateY(-2px); border-color: var(--primary); box-shadow: 0 18px 40px -10px rgba(59, 73, 223, 0.34); }
.an-launcher.dragging {
  cursor: grabbing; transition: none; transform: scale(1.04);
  border-color: var(--primary); box-shadow: 0 22px 46px -10px rgba(59, 73, 223, 0.44);
}
.an-avatar-wrap { position: relative; display: inline-flex; flex-shrink: 0; }
.an-online-dot {
  position: absolute; right: 0; bottom: 0; width: 10px; height: 10px;
  border-radius: 999px; background: #10B981; border: 2px solid #fff;
}
.an-launch-text { display: flex; flex-direction: column; text-align: left; line-height: 1.2; }
.an-launch-text strong { font-size: 13.5px; font-weight: 700; color: var(--primary); }
.an-launch-text span { font-size: 11px; color: var(--subtle); font-weight: 500; }

.an-backdrop {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(15, 23, 42, 0.35); backdrop-filter: blur(2px);
  display: none;
}

.an-popup {
  position: fixed; right: 22px; bottom: 22px; z-index: 75;
  width: 420px; height: min(620px, calc(100dvh - 44px));
  background: #fff; border: 1px solid var(--border); border-radius: 22px;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden;
  transition: width 0.2s ease, height 0.2s ease;
  animation: mpSheetPop 0.22s var(--ease-out);
}
.an-popup.expanded {
  width: min(640px, calc(100vw - 44px));
  height: min(760px, calc(100dvh - 44px));
}
.an-head {
  background: var(--grad); color: #fff; padding: 14px 14px 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-shrink: 0;
}
.an-id { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; overflow: hidden; }
.an-id-copy { flex: 1; min-width: 0; overflow: hidden; }
.an-name { font-family: var(--font-head); font-weight: 700; font-size: 15px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-status { font-size: 11.5px; color: rgba(255, 255, 255, 0.88); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-head-btns { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.an-icon-btn {
  width: 32px; height: 32px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.14); color: #fff; display: grid; place-items: center;
  cursor: pointer; transition: background 0.14s;
}
.an-icon-btn:hover { background: rgba(255, 255, 255, 0.26); }

.an-chips {
  display: flex; gap: 7px; overflow-x: auto; padding: 10px 14px 8px;
  border-bottom: 1px solid var(--border-soft); background: #FAFBFD; flex-shrink: 0;
}
.an-chip {
  white-space: nowrap; border: 1px solid var(--border); background: #fff;
  border-radius: 999px; padding: 6px 11px; font-family: inherit; font-size: 12px; font-weight: 500;
  color: var(--ink-2); cursor: pointer; transition: all 0.14s;
}
.an-chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

.an-stream {
  flex: 1; overflow-y: auto; padding: 14px 15px; display: flex; flex-direction: column; gap: 13px;
  background: #FFFFFF;
}
.msg-row { display: flex; gap: 9px; align-items: flex-start; }
.msg-row.user { justify-content: flex-end; }
.msg-logo { flex-shrink: 0; margin-top: 2px; }
.msg-card {
  max-width: 86%; font-size: 13.5px; line-height: 1.58; color: var(--ink);
  background: var(--canvas); border: 1px solid var(--border-soft);
  padding: 10px 13px; border-radius: 4px 16px 16px 16px;
}
.msg-row.user .msg-card {
  background: var(--primary); color: #fff; border-color: transparent;
  padding: 10px 14px; border-radius: 16px 16px 4px 16px;
}
.msg-card h3, .msg-card h4 { font-family: var(--font-head); margin: 8px 0 5px; font-size: 14.5px; }
.msg-card p { margin: 5px 0; }
.msg-card p:first-child { margin-top: 0; }
.msg-card ul { margin: 5px 0; padding-left: 18px; }
.msg-card table {
  width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 12px;
  border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: #fff;
}
.msg-card th, .msg-card td { padding: 7px 8px; border-bottom: 1px solid var(--border-soft); text-align: left; }
.msg-card th { background: var(--canvas); color: var(--subtle); font-weight: 600; }
.src-pill {
  display: inline-block; font-size: 11px; font-weight: 600; color: var(--subtle);
  background: #fff; border: 1px solid var(--border); border-radius: 6px;
  padding: 1px 6px; margin-left: 3px; text-decoration: none;
}
.src-pill.src-link { color: var(--primary); border-color: var(--primary-bd); background: var(--primary-soft); }
.src-pill.src-link:hover { background: #E0E7FF; text-decoration: underline; }
.msg-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.msg-act-btn {
  border: 1px solid var(--border); background: #fff; color: var(--subtle);
  font-family: inherit; font-size: 11px; font-weight: 600; padding: 3px 9px;
  border-radius: 7px; cursor: pointer;
}
.msg-act-btn:hover { border-color: var(--primary-bd); color: var(--primary); background: var(--primary-soft); }

.an-composer-wrap {
  padding: 10px 12px 12px; border-top: 1px solid var(--border-soft); background: #FAFBFD; flex-shrink: 0;
}
.ai-composer {
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 4px 4px 15px; display: flex; align-items: center; gap: 8px;
}
.ai-composer:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59, 73, 223, 0.12); }
.ai-composer input {
  flex: 1; border: none; outline: none; background: transparent;
  font-family: var(--font-body); font-size: 13px; color: var(--ink); min-width: 0;
}
.send-btn {
  width: 36px; height: 36px; border-radius: 999px; border: none;
  background: var(--grad); color: #fff; display: grid; place-items: center; cursor: pointer; flex-shrink: 0;
}
.send-btn:disabled { opacity: 0.45; cursor: default; }
.ai-legal { text-align: center; font-size: 11px; color: var(--subtle); margin-top: 6px; }

/* SHEETS / MODALS */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(15, 23, 42, 0.50); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: mpFadeIn 0.18s var(--ease-out);
}
@keyframes mpFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes mpSheetPop {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.sheet-panel {
  background: #fff; border-radius: 22px; width: 100%; max-width: 720px; max-height: 88dvh;
  display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
  animation: mpSheetPop 0.24s var(--ease-out);
}
.sheet-sm { max-width: 480px; }
.sheet-md { max-width: 640px; }
.sheet-head {
  padding: 18px 22px 14px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
}
.sheet-head-actions { display: flex; gap: 6px; flex-shrink: 0; }
.sheet-kicker { font-size: 11.5px; font-weight: 600; color: var(--primary); }
.sheet-title { font-family: var(--font-head); font-size: 20px; font-weight: 700; margin: 2px 0 0; }
.icon-close {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border);
  background: #fff; color: var(--muted); display: grid; place-items: center; cursor: pointer;
}
.icon-close:hover { background: var(--canvas); color: var(--ink); }
.detail-fav-btn.saved { background: var(--bad-bg); border-color: #FECDD3; color: var(--bad-bar); }
.sheet-panel .seg-tabs { margin: 0 22px 12px; }
.sheet-body { padding: 0 22px 20px; overflow-y: auto; flex: 1; }
.sheet-foot {
  padding: 14px 22px; border-top: 1px solid var(--border-soft); background: #FAFBFD;
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
}

.kv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kv-box { background: var(--canvas); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.kv-k { font-size: 11px; font-weight: 600; color: var(--subtle); text-transform: uppercase; letter-spacing: 0.03em; }
.kv-v { font-size: 13.5px; color: var(--ink); margin-top: 4px; }

/* Rider Attachment Guardrail & Compatible Insurer Riders Panel */
.rider-guard-box {
  background: #FFF7ED; border: 1px solid #FED7AA; border-radius: 12px; padding: 11px 14px;
  margin-bottom: 12px; font-size: 12.6px; color: #9A3412; line-height: 1.55;
}
.rider-guard-box strong { color: #7C2D12; }
.compat-riders-sec {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-soft);
}
.compat-riders-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.compat-riders-title { font-family: var(--font-head); font-size: 14.5px; font-weight: 700; color: var(--ink); }
.compat-rider-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.compat-rider-card {
  border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--canvas);
  display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
}
.compat-rider-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.compat-rider-name { font-size: 12.8px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.compat-rider-meta { font-size: 11.5px; color: var(--subtle); line-height: 1.4; }
.compat-rider-acts { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 2px; }
.compat-mini-btn {
  border: 1px solid var(--border); background: #fff; color: var(--primary); font-family: inherit;
  font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 8px; cursor: pointer;
}
.compat-mini-btn:hover { background: var(--primary-soft); border-color: var(--primary-bd); }
@media (max-width: 820px) { .compat-rider-grid { grid-template-columns: 1fr; } }

.trust-shield-box {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px;
  background: var(--good-bg); color: var(--good-tx); border: 1px solid #A7F3D0;
  font-size: 12.5px; font-weight: 600; margin-bottom: 12px;
}
.trust-shield-box svg { flex-shrink: 0; }
.about-list { margin: 10px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 13.5px; line-height: 1.65; }
.about-list li { margin-bottom: 8px; }

.lead-desc { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.lead-plan-box {
  background: var(--primary-soft); color: var(--primary); border-radius: 12px;
  padding: 10px 14px; font-weight: 600; font-size: 13px; margin-bottom: 14px;
}
.lead-form { display: flex; flex-direction: column; gap: 12px; }
.lead-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.lead-form input {
  height: 44px; padding: 0 13px; border: 1px solid var(--border); border-radius: 11px;
  font-family: var(--font-body); font-size: 13.5px; transition: border-color 0.14s, box-shadow 0.14s;
}
.lead-form input:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.lead-feedback {
  padding: 10px 12px; border-radius: 10px; font-size: 13px; font-weight: 600;
  background: var(--good-bg); color: var(--good-tx);
}
.lead-feedback.err { background: var(--bad-bg); color: var(--bad-tx); }
.lead-next-links { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.lead-direct-skip {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-soft);
  text-align: center; font-size: 12px; color: var(--subtle);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.lead-direct-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.lead-direct-a {
  color: var(--primary); font-weight: 600; text-decoration: none; font-size: 12.2px;
  padding: 4px 10px; border-radius: 999px; background: var(--primary-soft);
}
.lead-direct-a:hover { background: #E0E7FF; text-decoration: underline; }
.lead-consent-row {
  display: flex; align-items: flex-start; gap: 9px;
  background: var(--canvas); border: 1px solid var(--border); border-radius: 11px;
  padding: 10px 12px;
}
.lead-consent-row input[type="checkbox"] {
  width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--primary); flex-shrink: 0; cursor: pointer;
}
.lead-consent-lbl {
  display: inline !important; font-size: 12px !important; font-weight: 400 !important;
  color: var(--ink-2) !important; line-height: 1.5; cursor: pointer;
}

/* Persistent Compliance & Privacy Footer */
.site-footer {
  border-top: 1px solid var(--border); background: #fff;
  padding: 20px 0 92px; margin-top: auto;
}
body.has-dock .site-footer { padding-bottom: 124px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.footer-disclaimer {
  margin: 0; max-width: 780px; font-size: 12px; color: var(--subtle); line-height: 1.55;
}
.footer-links {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px;
}
.footer-link-btn {
  border: none; background: transparent; color: var(--primary); font-family: var(--font-body);
  font-size: 12px; font-weight: 600; cursor: pointer; padding: 3px 6px; border-radius: 6px;
}
.footer-link-btn:hover { background: var(--primary-soft); text-decoration: underline; }
.footer-sep { color: #CBD5E1; font-size: 12px; }

/* Legal & Privacy Policy Modal Document */
.legal-doc { font-size: 13.2px; color: var(--ink-2); line-height: 1.65; }
.legal-doc table { width: 100%; border-collapse: collapse; margin: 8px 0 12px; font-size: 12px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.legal-doc th, .legal-doc td { padding: 7px 9px; border-bottom: 1px solid var(--border-soft); text-align: left; }
.legal-doc th { background: var(--canvas); color: var(--subtle); font-weight: 600; }

/* Bilingual Cookie Consent Banner (Bottom-Left on PC, Cleanly Above Tabbar on Mobile) */
.cookie-banner {
  position: fixed; left: 20px; bottom: 20px; z-index: 66;
  width: min(430px, calc(100vw - 240px));
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  padding: 16px 18px; box-shadow: var(--shadow-lg);
}
.cookie-banner-title { font-family: var(--font-head); font-weight: 700; font-size: 15px; color: var(--ink); margin-bottom: 5px; }
.cookie-banner-desc { margin: 0 0 13px; font-size: 12.4px; color: var(--muted); line-height: 1.5; }
.cookie-banner-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.cookie-opt-list { display: flex; flex-direction: column; gap: 10px; }
.cookie-opt-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  background: var(--canvas); border: 1px solid var(--border); border-radius: 13px; padding: 12px 14px;
  cursor: pointer;
}
.cookie-opt-row strong { display: block; font-size: 13.5px; color: var(--ink); margin-bottom: 3px; }
.cookie-opt-row p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.ck-always-on { font-size: 11.5px; font-weight: 700; color: var(--good-tx); background: var(--good-bg); padding: 3px 9px; border-radius: 999px; white-space: nowrap; flex-shrink: 0; }
.ck-toggle { width: 19px; height: 19px; margin-top: 2px; accent-color: var(--primary); flex-shrink: 0; cursor: pointer; }
.legal-doc h4 {
  font-family: var(--font-head); font-size: 14.5px; color: var(--ink);
  margin: 14px 0 6px;
}
.legal-doc h4:first-child { margin-top: 2px; }
.legal-doc p { margin: 0 0 8px; }
.legal-doc ul { margin: 4px 0 10px; padding-left: 18px; }
.legal-doc li { margin-bottom: 5px; }
.legal-callout {
  background: var(--primary-soft); border: 1px solid var(--primary-bd); border-radius: 12px;
  padding: 11px 14px; margin: 0 0 12px; font-size: 12.8px; color: var(--ink);
}
.legal-warn {
  background: var(--warn-bg); border: 1px solid var(--warn-bd); border-radius: 12px;
  padding: 11px 14px; margin: 10px 0; font-size: 12.8px; color: #78350F;
}

/* Non-Blocking Toast */
.toast {
  position: fixed; bottom: 86px; left: 50%; transform: translateX(-50%); z-index: 120;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 600; box-shadow: 0 12px 32px rgba(15, 23, 42, 0.28);
  max-width: calc(100% - 32px); text-align: center;
}

/* Native Mobile Bottom Tab Bar (3 Spacious Tabs — Hidden on PC) */
.mobile-tabbar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  grid-template-columns: repeat(3, 1fr);
}
.m-tab {
  border: none; background: transparent; color: var(--subtle); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 4px; min-height: 46px; font-family: var(--font-body); font-size: 11px; font-weight: 600;
}
.m-tab.active { color: var(--primary); }
.m-tab-ico-wrap { position: relative; display: inline-flex; }
.m-tab-badge {
  position: absolute; top: -5px; right: -9px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: var(--primary); color: #fff; font-size: 10px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums; border: 1.5px solid #fff;
}

@media (max-width: 1024px) {
  .ins-grid-rich { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  .list-head, .list-row {
    grid-template-columns: 34px minmax(150px, 1.45fr) minmax(94px, 0.8fr) minmax(108px, 1fr) minmax(108px, 0.95fr) 112px;
    gap: 10px;
    padding: 0 14px;
  }
  .list-row .link-detail {
    padding: 6px 4px;
    font-size: 12.5px;
  }
}

/* RESPONSIVE: iOS & ANDROID MOBILE (<= 820px) */
@media (max-width: 820px) {
  .desktop-tabs, .about-link-btn { display: none; }
  .mobile-tabbar { display: grid; }
  .container { padding: 0 14px; }
  .brand-title { font-size: 14px; }
  .brand-sub { font-size: 10.5px; }

  .home-center { padding-top: 22px; padding-bottom: 32px; }
  .pathway-grid { grid-template-columns: 1fr; margin-top: 20px; gap: 10px; }
  .pathway-card { flex-direction: row; align-items: center; padding: 14px; }
  .pw-top-row { width: auto; }
  .pw-badge { display: none; }
  .pw-arrow { position: static; margin-left: auto; }
  .home-trust { margin-top: 20px; font-size: 12px; }

  .desktop-list-card { display: none; }
  .mob-gloss-bar { display: block; }
  .mobile-cards { display: flex; }
  .an-whisper { right: 14px; bottom: 132px; max-width: 260px; font-size: 12px; }
  body.has-dock .an-whisper { bottom: 192px; }
  .mobile-pager { display: flex; justify-content: center; gap: 12px; }
  .filter-bar { gap: 8px; }
  .filter-search { width: 100%; min-width: 0; }
  .filter-controls { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 8px; }
  .select-input { width: 100%; min-width: 0; font-size: 12px; padding: 0 9px; }
  .view-pad { padding-top: 16px; padding-bottom: 26px; }
  body.has-dock .view-pad { padding-bottom: 34px; }
  .site-footer { padding: 18px 0 110px; }
  body.has-dock .site-footer { padding-bottom: 168px; }
  .diff-headers-sticky { top: 62px; padding: 4px 0 6px; }
  .matcher-grid { grid-template-columns: 1fr; }

  .compare-dock { bottom: 68px; border-radius: 16px; padding: 8px 10px; width: calc(100% - 20px); }
  .dock-chips { max-width: 50%; }
  .dock-chip { font-size: 11.5px; padding: 4px 8px; }
  .dock-go { padding: 7px 12px; font-size: 12px; }

  .ins-topbar { align-items: stretch; }
  .ins-filters { align-items: stretch; width: 100%; min-width: 0; }
  .ins-search-box { max-width: none; }
  .ins-grid-rich { grid-template-columns: 1fr; }

  /* Persistent Floating An Launcher & Sheet on Mobile */
  .an-launcher {
    right: 14px; bottom: 76px; padding: 6px 13px 6px 6px;
  }
  body.has-dock .an-launcher { bottom: 136px; }
  body.has-cookie-banner .an-launcher { bottom: 210px; }
  body.has-cookie-banner .an-whisper { display: none !important; }
  .cookie-banner { left: 10px; right: 10px; bottom: 68px; width: auto; padding: 14px 15px; border-radius: 16px; }
  .cookie-banner-actions { justify-content: stretch; }
  .cookie-banner-actions .btn { flex: 1; }
  .an-launch-text span { display: none; }
  body.an-mobile-open { overflow: hidden; }
  .an-backdrop:not(.hidden) { display: block; }
  .an-popup, .an-popup.expanded {
    right: 0; left: 0; bottom: 0; width: 100%;
    height: 85dvh; border-radius: 22px 22px 0 0; border: none;
    transition: none;
  }
  .an-popup.an-kb-open {
    border-radius: 0;
  }
  .an-popup.an-kb-open .an-head { padding: 10px 12px; }
  .an-popup.an-kb-open .an-chips,
  .an-popup.an-kb-open .ai-legal { display: none; }
  .an-popup.an-kb-open .an-composer-wrap { padding: 8px 10px; }
  .ai-composer input { font-size: 16px; }
  .an-expand-only { display: none; }

  .kv-grid { grid-template-columns: 1fr; }
  .seg-tab { font-size: 12px; padding: 8px 6px; }
  .diff-heading { font-size: 16.5px; }
  .diff-scroll-wrap.three-col { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .diff-scroll-wrap.three-col .diff-headers,
  .diff-scroll-wrap.three-col .diff-matrix { min-width: 540px; }
  .swipe-hint.show-mobile { display: inline-flex; }
  .diff-lbl { grid-column: 1 / -1; padding: 9px 12px; border-bottom: 1px solid var(--border-soft); }
  .diff-row.cols-2 { grid-template-columns: 1fr 1fr !important; }
  .diff-row.cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
  .diff-val { padding: 10px 12px; font-size: 13px; }
  .diff-val:first-of-type { border-left: none; }
  .watch-cols { grid-template-columns: 1fr !important; }
  .vnd-sim-grid { grid-template-columns: 1fr !important; }

  .sheet-backdrop { align-items: flex-end; padding: 0; }
  .sheet-panel { border-radius: 22px 22px 0 0; max-height: 86dvh; }
  .toast { bottom: 142px; }
}

/* ============================================================
   v6.0 Beginner Compare UX: Dual Cards/Table, Personas, Goal Explainers & Rider Hub
   ============================================================ */
.cmp-view-seg {
  display: inline-flex;
  align-items: center;
  background: var(--primary-soft);
  border: 1px solid var(--primary-bd);
  border-radius: 11px;
  padding: 2px;
  gap: 2px;
  flex-shrink: 0;
}
.cmp-view-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.cmp-view-btn.active {
  background: #FFFFFF;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(15,23,42,.08);
}

.cmp-ctx-zone { margin-bottom: 14px; display: flex; flex-direction: column; gap: 10px; }
.cmp-ctx-zone:empty { display: none; margin-bottom: 0; }

.persona-strip-card {
  background: linear-gradient(135deg, #FFFFFF 0%, #F5F7FF 100%);
  border: 1px solid var(--primary-bd);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.persona-strip-head { margin-bottom: 10px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.persona-strip-title { font-family: var(--font-head); font-size: 15px; font-weight: 700; color: var(--ink); }
.persona-strip-sub { font-size: 12.5px; color: var(--subtle); margin-top: 2px; }
.persona-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.persona-card {
  text-align: left;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 11px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.persona-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.persona-card.is-rider { border-color: #FED7AA; background: #FFFBF7; }
.persona-card-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.persona-av {
  width: 28px; height: 28px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 700; flex-shrink: 0;
}
.persona-av-img {
  width: 44px; height: 44px; border-radius: 999px;
  object-fit: cover; border: 2px solid #FFFFFF;
  box-shadow: 0 2px 8px rgba(15,23,42,.10); flex-shrink: 0;
}
.persona-name { font-size: 13px; font-weight: 700; color: var(--ink); margin-top: 6px; }
.persona-arch { font-size: 11.5px; font-weight: 600; color: var(--primary-dark); margin-top: 1px; }
.persona-card.is-rider .persona-arch { color: #9A3412; }
.persona-goal { font-size: 12px; color: var(--ink-2); line-height: 1.48; margin-top: 5px; font-style: italic; }
.persona-cta { font-size: 12px; font-weight: 700; color: var(--primary); }

.goal-exp-card {
  background: linear-gradient(135deg, #EEF2FF 0%, #F8FAFF 55%, #FFFFFF 100%);
  border: 1px solid var(--primary-bd);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.goal-exp-card.is-rider {
  background: linear-gradient(135deg, #FFF7ED 0%, #FFFFFF 100%);
  border-color: #FED7AA;
}
.goal-exp-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.goal-exp-persona { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.goal-exp-av {
  width: 36px; height: 36px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700; border: 1px solid var(--primary-bd); flex-shrink: 0;
}
.goal-exp-av-img {
  width: 52px; height: 52px; border-radius: 999px;
  object-fit: cover; border: 2px solid #FFFFFF;
  box-shadow: 0 3px 10px rgba(15,23,42,.12); flex-shrink: 0;
}
.goal-exp-ptitle { font-size: 13.2px; font-weight: 700; color: var(--primary-dark); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.goal-exp-card.is-rider .goal-exp-ptitle { color: #9A3412; }
.goal-exp-arch {
  font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px;
  background: rgba(255,255,255,.85); border: 1px solid var(--primary-bd); color: var(--primary-dark);
}
.goal-exp-card.is-rider .goal-exp-arch { border-color: #FED7AA; color: #9A3412; }
.goal-exp-quote { font-size: 12.6px; color: var(--ink-2); line-height: 1.48; margin-top: 3px; font-style: italic; }
.goal-exp-collapse-btn {
  border: 1px solid var(--border-strong); background: rgba(255,255,255,.85);
  color: var(--muted); font-family: inherit; font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 9px; cursor: pointer; flex-shrink: 0;
}
.goal-exp-rule {
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 9px 12px;
  font-size: 12.6px;
  color: var(--ink);
  line-height: 1.5;
}
.goal-exp-tip { font-size: 12.2px; color: var(--muted); margin-top: 4px; }
.goal-exp-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.goal-exp-prompt {
  border: 1px solid var(--primary-bd); background: #FFFFFF; color: var(--primary-dark);
  font-family: inherit; font-size: 12px; font-weight: 600; padding: 6px 11px;
  border-radius: 10px; cursor: pointer; text-align: left;
}
.goal-exp-prompt:hover { background: var(--primary-soft); }
.goal-exp-collapsed {
  background: var(--primary-soft);
  border: 1px solid var(--primary-bd);
  border-radius: 12px;
  padding: 8px 13px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}

.ctx-sub-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 9px 13px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
}
.ctx-sub-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ctx-sub-lbl { font-size: 12px; font-weight: 700; color: var(--subtle); margin-right: 2px; }
.ctx-sub-pill {
  border: 1px solid var(--border); background: var(--surface-subtle); color: var(--ink-2);
  font-family: inherit; font-size: 12px; font-weight: 600;
  padding: 5px 11px; border-radius: 999px; cursor: pointer;
}
.ctx-sub-pill.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); }
.ctx-budget-group { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.ctx-budget-btn {
  border: 1px solid var(--border-strong); background: #FFFFFF; color: var(--ink-2);
  font-family: inherit; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
  padding: 4px 9px; border-radius: 8px; cursor: pointer;
}
.ctx-budget-btn.active { background: var(--primary); border-color: var(--primary); color: #FFFFFF; }

.health-mode-bar {
  background: var(--surface);
  border: 1px solid #99F6E4;
  border-radius: 14px;
  padding: 11px 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.health-mode-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.health-mode-title { font-size: 12.8px; font-weight: 700; color: var(--ink); }
.health-mode-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.health-mode-btn {
  border: 1px solid #99F6E4; background: var(--teal-bg); color: var(--teal-tx);
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  padding: 7px 13px; border-radius: 11px; cursor: pointer;
}
.health-mode-btn.active { background: var(--teal-tx); border-color: var(--teal-tx); color: #FFFFFF; }
.health-mode-btn.is-rider { border-color: #FED7AA; background: #FFF7ED; color: #9A3412; }
.health-mode-btn.is-rider.active { background: #9A3412; border-color: #9A3412; color: #FFFFFF; }

.rider-cat-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 11px 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.rider-cat-pill {
  border: 1px solid #FED7AA; background: #FFFBF7; color: #9A3412;
  font-family: inherit; font-size: 12px; font-weight: 600;
  padding: 5px 11px; border-radius: 999px; cursor: pointer;
}
.rider-cat-pill.active { background: #9A3412; border-color: #9A3412; color: #FFFFFF; }

.beginner-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.b-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 15px 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 11px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.b-card:hover { border-color: var(--primary-bd); box-shadow: var(--shadow-md); }
.b-card.selected { border-color: var(--primary); box-shadow: var(--ring); }
.b-card.is-rider { border-left: 4px solid #EA580C; }
.b-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.b-card-pills { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; flex-shrink: 0; }
.b-card-name { font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.35; margin-top: 2px; }
.b-card-one {
  font-size: 12.8px; color: var(--ink-2); line-height: 1.5; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.b-card-vnd {
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 11px;
  display: flex; flex-direction: column; gap: 5px;
}
.b-card-vnd-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; gap: 8px; }
.b-card-bar { width: 100%; height: 8px; border-radius: 999px; overflow: hidden; display: flex; background: #E2E8F0; }
.b-card-vnd-sub { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; gap: 8px; }
.b-card-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  background: #F8FAFC; border: 1px solid var(--border); border-radius: 12px; padding: 9px 11px;
}
.b-card-stats.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: transparent; border: none; border-top: 1px solid var(--border-soft);
  border-radius: 0; padding: 7px 2px 0;
}
.b-st-k { font-size: 11.5px; color: var(--subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-st-v { font-size: 12.5px; font-weight: 700; color: var(--ink); margin-top: 2px; }
.b-card-rider-btn {
  width: 100%;
  text-align: left;
  border: 1px solid #FED7AA;
  background: #FFF7ED;
  color: #9A3412;
  border-radius: 11px;
  padding: 7px 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  cursor: pointer;
}
.b-card-rider-btn:hover { background: #FFEDD5; }
.b-card-entry {
  background: var(--primary-soft);
  border: 1px solid var(--primary-bd);
  border-radius: 11px;
  padding: 7px 10px;
  font-size: 12px;
  color: var(--ink);
  line-height: 1.45;
}
.b-card-wo {
  display: flex; align-items: flex-start; gap: 7px;
  background: var(--warn-bg); border: 1px solid var(--warn-bd); color: #92400E;
  border-radius: 11px; padding: 7px 10px; font-size: 12px; line-height: 1.45;
}
.b-card.is-rider .b-card-wo { background: #FFF7ED; border-color: #FED7AA; color: #9A3412; }
.b-card-wo span {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.b-card-wo svg { flex-shrink: 0; margin-top: 2px; }
.b-card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding-top: 8px; border-top: 1px solid var(--border-soft);
}
.beginner-pager {
  margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

@media (max-width: 1080px) {
  .persona-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .persona-grid {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    gap: 10px; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .persona-grid::-webkit-scrollbar { display: none; }
  .persona-card { flex: 0 0 80%; scroll-snap-align: start; }
  .beginner-cards-grid { grid-template-columns: 1fr; }
  .cmp-view-seg { width: 100%; justify-content: center; }
  .cmp-view-btn { flex: 1; text-align: center; }
  .b-card-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .b-card-stats > div:last-child { grid-column: 1 / -1; }
  .beginner-pager { flex-direction: column; align-items: stretch; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
