/* ========================================================================
   DEPLOY PATH: /css/lmi-polish.css
   Tepuy Solutions — LMI Calculator sidebar polish
   Version: 2026-03-31 (refactored)
   
   Load AFTER tepuy.css.
   Token overrides are scoped to .calc-aside — they do NOT bleed globally.
   ======================================================================== */

/* ══════════════════════════════════════════════════════════════════════════
   1.  SIDEBAR SURFACE
   ══════════════════════════════════════════════════════════════════════════ */
body.calc .calc-aside,
body.calc .calc-aside .sidebar-panel {
  background: #f4f8f6 !important;
}

body.calc .calc-aside .sidebar-scroll {
  background: transparent !important;
  scrollbar-width: thin;
  scrollbar-color: #c8ddd3 transparent;
}

body.calc .calc-aside .sidebar-scroll::-webkit-scrollbar { width: 5px; }
body.calc .calc-aside .sidebar-scroll::-webkit-scrollbar-thumb {
  background: #c8ddd3; border-radius: 4px;
}

/* Desktop: flush right edge */
@media (min-width: 1025px) {
  body.calc .calc-aside .sidebar-panel {
    border-radius: 0 !important;
    border-top: none !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: 1px solid #dce8e1 !important;
    padding: 0 !important;
  }
  body.calc .calc-aside .sidebar-scroll {
    padding: 0.5rem 0.6rem 0 !important;
  }
}


/* ══════════════════════════════════════════════════════════════════════════
   2.  SIDEBAR TITLE / SUB
   ══════════════════════════════════════════════════════════════════════════ */
.lmi-sidebar-title {
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  color: #1a5236 !important;
  border-bottom: none !important;
  padding: 0.35rem 0.9rem 0 !important;
  margin: 0 0 0.1rem !important;
}

.lmi-sidebar-sub {
  font-size: 0.72rem !important;
  color: #9aada6 !important;
  padding: 0 0.9rem !important;
  margin: 0 0 0.5rem !important;
  line-height: 1.4 !important;
}


/* ══════════════════════════════════════════════════════════════════════════
   3.  ACCORDION CARDS — institutional headers, no emojis
   ══════════════════════════════════════════════════════════════════════════ */
aside .card,
aside .tp-card {
  border: none !important;
  border-radius: 8px !important;
  margin-bottom: 0.35rem !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
  transition: none !important;
}

aside .card:hover { box-shadow: none !important; border-color: transparent !important; }

aside .card-header {
  height: 40px !important;
  padding: 0 2.4rem 0 0.9rem !important;
  font-size: 0.775rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: #ffffff !important;
  background: #1a5236 !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  cursor: pointer !important;
  user-select: none !important;
  position: relative !important;
  transition: background 0.14s !important;
}
aside .card-header[aria-expanded="true"] {
  border-radius: 8px 8px 0 0 !important;
}

aside .card-header:hover { background: #21673f !important; }

aside .card-header h4 {
  font: inherit !important;
  color: inherit !important;
  margin: 0 !important;
  line-height: 1 !important;
}

/* SVG chevron indicator */
aside .card-header::after {
  content: '' !important;
  position: absolute !important;
  right: 11px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 16px !important;
  height: 16px !important;
  border-radius: 50% !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%23ffffff' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-size: 12px 12px !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  transition: transform 0.22s ease !important;
  font-size: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background-color: transparent !important;
}

aside .card-header[aria-expanded="true"]::after {
  transform: translateY(-50%) rotate(180deg) !important;
}

aside .card-content {
  display: block !important;
  max-height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  padding: 0 !important;
  background: #ffffff !important;
  transition: max-height 0.3s ease, opacity 0.22s ease, padding 0.3s ease !important;
}

aside .card-content.open {
  max-height: 3600px !important;
  overflow: visible !important;
  opacity: 1 !important;
  padding: 0.65rem 0.9rem 0.85rem !important;
}


/* ══════════════════════════════════════════════════════════════════════════
   4.  FORM ROWS — tighter, more legible
   ══════════════════════════════════════════════════════════════════════════ */
aside .form-row {
  margin-bottom: 0.5rem !important;
}

aside .form-row label {
  font-size: 0.785rem !important;
  font-weight: 500 !important;
  color: #3d5248 !important;
  margin-bottom: 3px !important;
  display: block !important;
  line-height: 1.35 !important;
}

aside .form-row input[type="text"],
aside .form-row input[type="number"],
aside .form-row select {
  width: 100% !important;
  padding: 0.3rem 0.55rem !important;
  font-size: 0.845rem !important;
  border-radius: 5px !important;
  border: 1px solid #c8ddd3 !important;
  background: #ffffff !important;
  color: #0f1c16 !important;
  font-family: inherit !important;
  transition: border-color 0.15s, box-shadow 0.15s !important;
  box-sizing: border-box !important;
}

aside .form-row input:focus,
aside .form-row select:focus {
  outline: none !important;
  border-color: #1a6b4a !important;
  box-shadow: 0 0 0 3px rgba(26, 107, 74, 0.12) !important;
  background: #ffffff !important;
}

/* Select dropdown arrow */
aside select {
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239aada6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.6rem center !important;
  background-size: 8px 5px !important;
  padding-right: 1.8rem !important;
  cursor: pointer !important;
}

/* Radio rows */
aside .radio-row {
  display: flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  margin-bottom: 0.2rem !important;
}

aside .radio-row input[type="radio"] {
  width: auto !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  accent-color: #1a5236 !important;
}

aside .radio-row label {
  font-size: 0.78rem !important;
  margin: 0 !important;
  font-weight: 400 !important;
  cursor: pointer !important;
}

/* Grid helpers */
aside .grid-2 {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 0.5rem !important;
}

@media (max-width: 440px) {
  aside .grid-2 { grid-template-columns: 1fr !important; }
}

/* Section intro text in card */
aside .section-intro,
aside p.section-intro {
  font-size: 0.72rem !important;
  color: #9aada6 !important;
  line-height: 1.45 !important;
  margin: -0.15rem 0 0.6rem !important;
}

/* Muted span in labels */
aside span.muted {
  font-size: 0.68rem !important;
  color: #b0bfba !important;
  font-weight: 400 !important;
}

/* Tiny muted paragraph */
aside p.tiny.muted {
  font-size: 0.68rem !important;
  color: #b0bfba !important;
  line-height: 1.4 !important;
  margin: 0.25rem 0 0.1rem !important;
}


/* ══════════════════════════════════════════════════════════════════════════
   5.  SIDEBAR FOOTER — Calculate + scenario buttons, no Pro banner
   ══════════════════════════════════════════════════════════════════════════ */
.sidebar-footer {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.35rem !important;
  padding: 0.6rem 0.6rem 0.6rem !important;
  flex-shrink: 0 !important;
  border-top: 1px solid #dce8e1 !important;
  background: #f4f8f6 !important;
}

/* Remove the pro-badge text */
.pro-badge { display: none !important; }

/* Hide Pro CTA */
.sidebar-footer .pro-cta,
.sidebar-footer #unlockPro {
  display: none !important;
}

/* Calculate button */
.sidebar-footer #runBtn,
.sidebar-footer .btn.btn-primary {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 42px !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #1a5236 0%, #247857 100%) !important;
  border: none !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  box-shadow: 0 2px 8px rgba(26, 82, 54, 0.22) !important;
  transition: transform 0.12s, box-shadow 0.12s, background 0.15s !important;
  box-sizing: border-box !important;
}

.sidebar-footer #runBtn:hover,
.sidebar-footer .btn.btn-primary:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 14px rgba(26, 82, 54, 0.3) !important;
  background: linear-gradient(135deg, #1d5c3c 0%, #2b8f62 100%) !important;
}

.sidebar-footer #runBtn:active,
.sidebar-footer .btn.btn-primary:active {
  transform: translateY(0) !important;
}

/* Hint text below Calculate */
.lmi-calc-hint {
  font-size: 0.68rem !important;
  color: #9aada6 !important;
  text-align: center !important;
  margin: 0 !important;
  line-height: 1.35 !important;
}

/* form-actions wrapper — make it transparent */
.form-actions {
  display: contents !important;
}


/* ══════════════════════════════════════════════════════════════════════════
   6.  TOOLTIP  (.i element) — viewport-fixed, never clips in sidebar
   ══════════════════════════════════════════════════════════════════════════ */
.i {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 14px !important;
  height: 14px !important;
  border-radius: 50% !important;
  background: #d4e8de !important;
  color: #1a5236 !important;
  font-size: 0.65rem !important;
  font-weight: 700 !important;
  font-style: normal !important;
  line-height: 1 !important;
  cursor: default !important;
  vertical-align: middle !important;
  margin-left: 0.25rem !important;
  flex-shrink: 0 !important;
  position: relative !important;
  overflow: visible !important;
}

.i:hover { background: #1a5236 !important; color: #ffffff !important; }

.i::after {
  content: attr(data-tip) !important;
  display: block !important;
  position: fixed !important;
  left: var(--tip-x, 50%) !important;
  top: var(--tip-y, auto) !important;
  min-width: 200px !important;
  max-width: 270px !important;
  padding: 0.55rem 0.75rem !important;
  background: #0f2b1e !important;
  color: #f0fdf4 !important;
  font-size: 0.72rem !important;
  font-weight: 400 !important;
  font-style: normal !important;
  line-height: 1.5 !important;
  border-radius: 6px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.22) !important;
  pointer-events: none !important;
  z-index: 99999 !important;
  white-space: normal !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transition: opacity 0.15s ease, visibility 0.15s ease !important;
}

.i::before {
  content: '' !important;
  display: block !important;
  position: fixed !important;
  left: var(--tip-arrow-x, 50%) !important;
  top: var(--tip-arrow-y, auto) !important;
  transform: rotate(45deg) !important;
  width: 7px !important; height: 7px !important;
  background: #0f2b1e !important;
  pointer-events: none !important;
  z-index: 99998 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transition: opacity 0.15s ease, visibility 0.15s ease !important;
}

.i:hover::after, .i:focus::after { opacity: 1 !important; visibility: visible !important; }
.i:hover::before, .i:focus::before { opacity: 1 !important; visibility: visible !important; }


/* ══════════════════════════════════════════════════════════════════════════
   7.  MOBILE
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  body.calc .calc-aside .sidebar-panel {
    border-radius: 0 !important;
    padding: 0 0.75rem 0 !important;
  }
  aside .card { margin-bottom: 0.35rem !important; }
  aside .card-header { height: 38px !important; font-size: 0.72rem !important; padding: 0 2.2rem 0 0.8rem !important; }
  aside .card-content.open { padding: 0.55rem 0.8rem 0.75rem !important; }
  .sidebar-footer { padding: 0.5rem 0.75rem 0.5rem !important; }
}


/* ══════════════════════════════════════════════════════════════════════════
   8.  SCENARIO ROW BUTTONS (re-used from retirement design)
   ══════════════════════════════════════════════════════════════════════════ */
.ret-scenario-row {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.1rem;
}

.ret-scen-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  padding: 0.38rem 0.4rem;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #3d5248;
  background: #f0f5f2;
  border: 1px solid #c8ddd3;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.13s, border-color 0.13s, color 0.13s;
}
.ret-scen-btn:hover { background: #e6f2ec; border-color: #3db07e; color: #1a5236; }
.ret-scen-btn:active { background: #d4eae0; }
.ret-scen-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.ret-scen-btn--share { color: #1a5236; background: #edf7f2; border-color: #b3d9c4; }
.ret-scen-btn--share:hover { background: #d4ede2; border-color: #1a6b4a; }

.ret-scen-hint {
  display: none;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.15rem 0;
  text-align: center;
  line-height: 1.35;
}

/* ══════════════════════════════════════════════════════════════════════════
   9.  LOAD DROPDOWN
   ══════════════════════════════════════════════════════════════════════════ */
.ret-load-dropdown {
  background: #ffffff;
  border: 1px solid #c8ddd3;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.13);
  overflow: hidden;
  margin: 0 0 0.5rem;
  z-index: 200;
  animation: rld-fadein 0.15s ease;
}
@keyframes rld-fadein { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }

.rld-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: #f4f8f6; border-bottom: 1px solid #e3ede8;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: #3d5248;
}
.rld-close { background: none; border: none; font-size: 0.8rem; color: #9aada6; cursor: pointer; padding: 0; line-height: 1; }
.rld-close:hover { color: #1a5236; }
.rld-list { list-style: none; margin: 0; padding: 0.3rem 0; max-height: 220px; overflow-y: auto; }
.rld-item {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 0.5rem; width: 100%; padding: 0.45rem 0.75rem;
  font-family: inherit; font-size: 0.8rem; color: #0f1c16;
  background: none; border: none; cursor: pointer; text-align: left; transition: background 0.1s;
}
.rld-item:hover { background: #f0f7f4; color: #1a5236; }
.rld-name { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rld-date { font-size: 0.64rem; color: #9aada6; flex-shrink: 0; white-space: nowrap; }


/* ══════════════════════════════════════════════════════════════════════════
   10. SHARED SCENARIO BANNER
   ══════════════════════════════════════════════════════════════════════════ */
.ret-shared-banner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 1rem;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: #14532d;
  line-height: 1.45;
  animation: ret-banner-in 0.3s ease;
}
.ret-shared-banner[hidden] { display: none !important; }
@keyframes ret-banner-in { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }

.ret-shared-banner__close {
  margin-left: auto; flex-shrink: 0; background: none; border: none;
  font-size: 0.85rem; color: #4ade80; cursor: pointer; padding: 0.1rem 0.2rem; line-height: 1; border-radius: 3px;
}
.ret-shared-banner__close:hover { color: #15803d; background: rgba(21,128,61,0.08); }


/* ══════════════════════════════════════════════════════════════════════════
   11. SHARE RESULT BUTTON BAR (in main results area)
   ══════════════════════════════════════════════════════════════════════════ */
.ret-share-result-bar {
  display: flex;
  justify-content: flex-end;
  margin: 0.5rem 0 0.75rem;
}
.ret-share-result-bar[hidden] { display: none !important; }

.ret-share-result-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1a5236;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.14s, border-color 0.14s, box-shadow 0.14s;
}
.ret-share-result-btn:hover {
  background: #dcfce7; border-color: #4ade80;
  box-shadow: 0 2px 8px rgba(26,107,74,0.15);
}


/* ══════════════════════════════════════════════════════════════════════════
   12. SHARE CARD MODAL — overlay, card (dark/light), action buttons
       Reuses ret-sc-* class names so all the CSS from sidebar-polish.css
       applies here too when both files are loaded. Defined here independently
       so lmi.html works standalone without sidebar-polish.css.
   ══════════════════════════════════════════════════════════════════════════ */
.ret-sc-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.72); z-index: 99990;
  align-items: center; justify-content: center;
  padding: 1rem; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.ret-sc-overlay.ret-sc-visible { display: flex; }

.ret-sc-outer {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.85rem; width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto;
}

.ret-sc-card {
  width: 100%; border-radius: 14px; overflow: hidden;
  font-family: 'Inter', system-ui, sans-serif;
  background: #0d1117; color: #e8f0eb;
  border: 1px solid #1e2a22;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.ret-sc-card.ret-sc-light {
  background: #ffffff; color: #0f1c16;
  border: 1px solid #e3ede8;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

.ret-sc-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ret-sc-card.ret-sc-light .ret-sc-header { border-bottom-color: #e3ede8; }

.ret-sc-badge {
  display: inline-block; font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.09em;
  padding: 0.28rem 0.75rem; border-radius: 20px;
  background: rgba(26,107,74,0.25); color: #4ade80; border: 1px solid rgba(74,222,128,0.3);
}
.ret-sc-badge.ret-sc-badge-good { background: rgba(26,107,74,0.25); color: #4ade80; border-color: rgba(74,222,128,0.3); }
.ret-sc-badge.ret-sc-badge-warn { background: rgba(251,191,36,0.15); color: #fbbf24; border-color: rgba(251,191,36,0.3); }
.ret-sc-card.ret-sc-light .ret-sc-badge.ret-sc-badge-good { background: #dcfce7; color: #15803d; border-color: #86efac; }
.ret-sc-card.ret-sc-light .ret-sc-badge.ret-sc-badge-warn { background: #fef9c3; color: #a16207; border-color: #fde047; }

.ret-sc-brand {
  display: flex; flex-direction: column; align-items: flex-end;
  font-size: 0.72rem; font-weight: 700; color: rgba(255,255,255,0.45); line-height: 1.4;
}
.ret-sc-card.ret-sc-light .ret-sc-brand { color: #9aada6; }
.ret-sc-brand span { font-size: 0.62rem; font-weight: 400; opacity: 0.7; }

.ret-sc-headline {
  padding: 1rem 1.25rem 0.75rem;
  font-size: 1.1rem; font-weight: 600; line-height: 1.45; color: #e8f0eb;
}
.ret-sc-card.ret-sc-light .ret-sc-headline { color: #0f1c16; }
.ret-sc-headline strong { color: #4ade80; }
.ret-sc-card.ret-sc-light .ret-sc-headline strong { color: #15803d; }

.ret-sc-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: rgba(255,255,255,0.06);
  margin: 0 1.25rem 0.75rem;
  border-radius: 10px; overflow: hidden; border: 1px solid rgba(255,255,255,0.06);
}
.ret-sc-card.ret-sc-light .ret-sc-stats { background: #e3ede8; border-color: #e3ede8; }

.ret-sc-stat { background: #131a1f; padding: 0.7rem 0.85rem; display: flex; flex-direction: column; gap: 0.3rem; }
.ret-sc-card.ret-sc-light .ret-sc-stat { background: #f7faf8; }

.ret-sc-stat-label {
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: rgba(255,255,255,0.4);
}
.ret-sc-card.ret-sc-light .ret-sc-stat-label { color: #9aada6; }

.ret-sc-stat-value { font-size: 0.875rem; font-weight: 500; line-height: 1.4; color: #c8ddd3; }
.ret-sc-card.ret-sc-light .ret-sc-stat-value { color: #3d5248; }

.ret-sc-stat-value.green { color: #4ade80; }
.ret-sc-stat-value.blue  { color: #60a5fa; }
.ret-sc-stat-value.warn  { color: #fbbf24; }
.ret-sc-stat-value.red   { color: #f87171; }
.ret-sc-card.ret-sc-light .ret-sc-stat-value.green { color: #15803d; }
.ret-sc-card.ret-sc-light .ret-sc-stat-value.blue  { color: #1d4ed8; }
.ret-sc-card.ret-sc-light .ret-sc-stat-value.warn  { color: #92400e; }
.ret-sc-card.ret-sc-light .ret-sc-stat-value.red   { color: #b91c1c; }

.ret-sc-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 0 1.25rem; }
.ret-sc-card.ret-sc-light .ret-sc-divider { background: #e3ede8; }

.ret-sc-assumptions {
  padding: 0.65rem 1.25rem;
  font-size: 0.72rem; color: rgba(255,255,255,0.45); line-height: 1.7;
}
.ret-sc-card.ret-sc-light .ret-sc-assumptions { color: #7a948a; }
.ret-sc-assumptions strong { color: rgba(255,255,255,0.75); font-weight: 600; }
.ret-sc-card.ret-sc-light .ret-sc-assumptions strong { color: #1f3d2d; }

.ret-sc-footer {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; padding: 0.65rem 1.25rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.ret-sc-card.ret-sc-light .ret-sc-footer { border-top-color: #e3ede8; }

.ret-sc-disclaimer { font-size: 0.62rem; color: rgba(255,255,255,0.25); line-height: 1.5; margin: 0; }
.ret-sc-card.ret-sc-light .ret-sc-disclaimer { color: #b0bfba; }

.ret-sc-url { font-size: 0.62rem; font-weight: 600; color: rgba(255,255,255,0.2); white-space: nowrap; flex-shrink: 0; }
.ret-sc-card.ret-sc-light .ret-sc-url { color: #c8ddd3; }

.ret-sc-actions {
  display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; width: 100%;
}
.ret-sc-action-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.55rem 1.1rem;
  font-family: inherit; font-size: 0.82rem; font-weight: 600;
  border-radius: 8px; cursor: pointer; border: none;
  transition: background 0.14s, transform 0.1s; white-space: nowrap;
}
.ret-sc-action-btn:active { transform: translateY(1px); }
.ret-sc-action-primary { background: #1a5236; color: #ffffff; }
.ret-sc-action-primary:hover { background: #247857; }
.ret-sc-action-secondary { background: rgba(255,255,255,0.1); color: #e8f0eb; border: 1px solid rgba(255,255,255,0.15); }
.ret-sc-action-secondary:hover { background: rgba(255,255,255,0.18); }
.ret-sc-action-close { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.55); border: 1px solid rgba(255,255,255,0.1); }
.ret-sc-action-close:hover { background: rgba(255,255,255,0.14); color: #fff; }

.ret-sc-hint { font-size: 0.72rem; color: rgba(255,255,255,0.3); text-align: center; margin: 0; }

@media (max-width: 500px) {
  .ret-sc-stats { grid-template-columns: 1fr; }
  .ret-sc-headline { font-size: 0.95rem; }
  .ret-sc-action-btn { padding: 0.5rem 0.75rem; font-size: 0.76rem; }
  .ret-scen-btn { font-size: 0.67rem; padding: 0.35rem 0.25rem; gap: 0.2rem; }
  .ret-scen-btn svg { display: none; }
}


/* ══════════════════════════════════════════════════════════════════════════
   13. CARD TRANSITIONS suppress during init (mirrors sidebar-polish.js)
   ══════════════════════════════════════════════════════════════════════════ */
aside.no-transitions .card-content,
aside.no-transitions .card-header {
  transition: none !important;
}


/* ══════════════════════════════════════════════════════════════════════════
   RESULTS TAB SYSTEM — mirrors retirement + mortgage exactly
   ══════════════════════════════════════════════════════════════════════════ */
.results-tabs-wrap {
  background: #ffffff;
  border: 1px solid #dce8e1;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.rtab-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0.55rem 0.75rem 0;
  background: #f7faf8;
  border-bottom: 1px solid #e3ede8;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.rtab-bar::-webkit-scrollbar { display: none; }

.rtab-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.85rem 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #7a948a;
  background: transparent;
  border: none;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
  position: relative;
  bottom: -1px;
  border-bottom: 2px solid transparent;
  font-family: inherit;
}
.rtab-btn:hover { color: #1a5236; background: #eef5f1; }
.rtab-btn--active {
  color: #1a5236 !important;
  background: #ffffff !important;
  border-bottom: 2px solid #1a5236 !important;
}

.rtab-panel { display: block; padding: 1rem 1.25rem 1.25rem; }
.rtab-panel--hidden { display: none !important; }

.rtab-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.btn-ghost-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: inherit;
  font-size: 0.775rem;
  font-weight: 500;
  color: #7a948a;
  background: transparent;
  border: 1px solid #c8ddd3;
  border-radius: 4px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn-ghost-sm:hover { color: #0f1c16; border-color: #3db07e; background: #f8faf9; }
.btn-ghost-sm svg { flex-shrink: 0; }

.lmi-tab-intro {
  font-size: 0.85rem;
  color: #7a948a;
  line-height: 1.55;
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  background: #f7faf8;
  border-radius: 8px;
  border-left: 3px solid #c8ddd3;
}


/* ══════════════════════════════════════════════════════════════════════════
   KPI STRIP
   ══════════════════════════════════════════════════════════════════════════ */
.lmi-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.lmi-kpi-card {
  background: #ffffff;
  border: 1px solid #dce8e1;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.lmi-kpi-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9aada6;
}

.lmi-kpi-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f1c16;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.lmi-kpi-value--warn { color: #b45309; }
.lmi-kpi-value--good { color: #15803d; }

.lmi-kpi-sub {
  font-size: 0.68rem;
  color: #9aada6;
  font-weight: 500;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .lmi-kpi-strip { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 440px) {
  .lmi-kpi-strip { grid-template-columns: 1fr 1fr; }
  .lmi-kpi-value { font-size: 1rem; }
}


/* ══════════════════════════════════════════════════════════════════════════
   SUMMARY GRID (3 columns in Summary tab)
   ══════════════════════════════════════════════════════════════════════════ */
.lmi-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.lmi-sum-section {
  background: #f7faf8;
  border: 1px solid #e3ede8;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.lmi-sum-title {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9aada6;
  margin-bottom: 0.55rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #e3ede8;
}

.lmi-sum-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.3rem 0;
  font-size: 0.82rem;
  border-bottom: 1px solid #f0f5f2;
}
.lmi-sum-row:last-child { border-bottom: none; }
.lmi-sum-row span { color: #7a948a; flex-shrink: 0; }
.lmi-sum-row strong { color: #0f1c16; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.lmi-sum-row--total {
  margin-top: 0.2rem;
  padding-top: 0.4rem;
  border-top: 1.5px solid #dce8e1;
  border-bottom: none;
}
.lmi-sum-row--total strong { color: #1a5236; font-weight: 700; }
.lmi-sum-note { font-size: 0.72rem; color: #9aada6; font-style: italic; font-weight: 400; text-align: right; }

@media (max-width: 768px) {
  .lmi-summary-grid { grid-template-columns: 1fr; }
}
@media (min-width: 769px) and (max-width: 1100px) {
  .lmi-summary-grid { grid-template-columns: 1fr 1fr; }
}


/* ══════════════════════════════════════════════════════════════════════════
   SIDEBAR FOOTER TWEAKS
   ══════════════════════════════════════════════════════════════════════════ */
.lmi-calc-hint {
  font-size: 0.68rem !important;
  color: #9aada6 !important;
  text-align: center !important;
  margin: 0 !important;
  line-height: 1.35 !important;
}

/* Hide pro badge + pro emoji spans */
.pro-badge, #footerBadge { display: none !important; }
.pro-emoji { display: none !important; }

/* no-transitions suppressor during accordion init */
aside.no-transitions .card-content,
aside.no-transitions .card-header { transition: none !important; }
