/* ---------- Utilities ---------- */
.sr-only{
  position:absolute !important;
  width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;
}

/* Breadcrumbs */
body.wealth .breadcrumbs { margin: 0 0 16px; font-size: .9rem; }
body.wealth .breadcrumbs ol { list-style:none; padding:0; margin:0; display:flex; gap:.5rem; color:#6b7a90; }
body.wealth .breadcrumbs a { text-decoration:none; }

/* Hero card (unchanged) */
body.wealth .card--wealth{
  background: linear-gradient(135deg,#0ea5e9 0%,#22c55e 60%,#a3e635 100%);
  color:#0b1220;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 6px 24px rgba(0,0,0,.12);
}
body.wealth .card--wealth h1{ margin-bottom:.5rem; }
body.wealth .card--wealth .lead{ font-size:1.05rem; max-width:70ch; }

/* TOC */
body.wealth .toc{ margin:12px 0 6px; font-size:.95rem; }
body.wealth .toc ul{ list-style:none; padding:0; margin:6px 0 0; display:flex; flex-wrap:wrap; gap:.5rem .75rem; }
body.wealth .toc a{
  text-decoration:none; padding:.25rem .5rem;
  border:1px solid #e5e7eb; border-radius:999px;
  background:#ffffff; color:#0b1220;
}
body.wealth .toc a:hover{ background:#f8fafc; }

/* Rules pills (refined) */
body.wealth .wealth-rules{
  list-style:none;
  padding:0;
  margin:16px 0 0;
  display:grid;
  gap:12px; /* a little more space between pills */
}

body.wealth .wealth-rules li{
  display:flex;
  align-items:center;
  gap:14px;                    /* more air between number & text */
  background:#ffffff;
  border:1px solid #dce3ea;    /* softer border */
  border-radius:14px;
  padding:14px 16px;           /* taller pill */
  color:#0b1220;
  box-shadow:0 2px 6px rgba(15,23,42,0.05);
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

body.wealth .wealth-rules li:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 18px rgba(15,23,42,0.10);
  border-color:#cfd8e3;
}

body.wealth .wealth-rules li:focus-within{
  outline:0;
  border-color:#1f47c4;       /* visible keyboard focus */
  box-shadow:0 0 0 3px rgba(31,71,196,0.12);
}

/* Number badge: round + soft gradient */
body.wealth .wealth-rules .num{
  width:32px;
  height:32px;
  flex:0 0 32px;              /* keeps it perfectly round */
  display:grid;
  place-items:center;
  font-weight:700;
  font-variant-numeric:tabular-nums;
  border-radius:50%;
  color:#fff;
  background:linear-gradient(135deg,#1f47c4 0%, #22c55e 100%);
  border:0;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,0.5);
}

/* Text block: wraps nicely and uses remaining space */
body.wealth .wealth-rules .text{
  flex:1 1 auto;
  line-height:1.4;
}

/* Compact on small screens */
@media (max-width:560px){
  body.wealth .wealth-rules li{ gap:12px; padding:12px 14px; }
  body.wealth .wealth-rules .num{ width:30px; height:30px; flex-basis:30px; }
}


/* ---------- Soft Light Panels (L2) ---------- */
:root{
  --panel-bg: #f7f9fc;        /* soft grey */
  --panel-border: #e5e7eb;
  --panel-text: #111111;      /* near black */
  --panel-heading: #0b1220;   /* strong heading */
  --panel-subtext: #374151;   /* readable body text */
  --table-head-bg: #eef2f7;   /* light header band */
  --table-head-border: #e5e7eb;
}

body.wealth .card--panel{
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  color: var(--panel-text);
  box-shadow: 0 6px 18px rgba(2, 6, 23, .04);
  border-radius: 16px;
}
body.wealth .card--panel h2{ color: var(--panel-heading); }
body.wealth .card--panel p,
body.wealth .card--panel li{ color: var(--panel-subtext); }

/* Table (light) */
body.wealth .table-wrap{ overflow-x:auto; }
body.wealth .wealth-table{ border-collapse:collapse; width:100%; min-width:520px; background:#fff; }
body.wealth .wealth-table th,
body.wealth .wealth-table td{ padding:12px 14px; text-align:left; color:#111; }
body.wealth .wealth-table thead th{
  background: var(--table-head-bg);
  color:#0b1220;
  border-bottom:2px solid var(--table-head-border);
  font-weight:700;
}
body.wealth .wealth-table tbody tr{ border-bottom:1px solid #e5e7eb; }
body.wealth .wealth-table tbody tr:nth-child(odd){ background:#ffffff; }
body.wealth .wealth-table tbody tr:nth-child(even){ background:#fafbff; }
body.wealth .wealth-table tbody tr:last-child{ border-bottom:none; }

/* Notes / callouts (light) */
body.wealth .note{
  padding:12px 14px; border-radius:12px;
  border:1px solid #e5e7eb; margin-top:10px;
  color:#0b1220; background:#ffffff;
}
body.wealth .note--good{
  background:#e7f6ee; border-color:#bfe8d0; color:#0b4224;
}
body.wealth .note--warn{
  background:#fff6da; border-color:#f4e3a3; color:#7a5a00;
}
body.wealth .muted{ color:#525b6b; }

/* Back to top */
body.wealth .backtop { margin-top:10px; }
body.wealth .backtop a{ text-decoration:none; font-size:.95rem; color:#0b1220; }

/* Spacing so sidebar ad doesn’t feel cramped */
@media (min-width: 900px){
  body.wealth .home-main > .card{ margin-bottom:18px; }
}

/* ===== Mobile Hardening — append at end ===== */

/* Media scales down on small screens */
body.wealth img,
body.wealth video,
body.wealth iframe {
  max-width: 100%;
  height: auto;
}

/* Table wrappers: enable horizontal scroll on narrow screens */
body.wealth .scroll-x,
body.wealth .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* On narrow screens, present table as a block so it scrolls inside wrapper */
@media (max-width: 800px){
  body.wealth .wealth-table {
    display: block;
    width: 100%;
  }
}

/* Stack main + sidebar on tablets/phones */
@media (max-width: 1024px){
  .home-grid { grid-template-columns: 1fr !important; }
  .sidebar { width: 100% !important; float: none !important; }
}

/* Prevent any sideways scroll from long children */
html, body, .page-wrap, main, article {
  overflow-x: hidden;
}
* { min-width: 0; }

/* ===== Stronger universal stacking & width overrides ===== */
@media (max-width: 1024px){
  /* Catch-all for custom grid/flex layouts */
  .article-grid, .page-grid, .content-grid, .layout, .layout-grid, .grid, .container-grid,
  [class*="grid"], [class*="two-col"], [class*="columns"], .row, [class*="row"] {
    display: block !important;
    grid-template-columns: 1fr !important;
  }
  main, .home-main, article, .content, .sidebar, aside {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
  }
  /* Ensure fixed sidebars don't force width */
  [class*="sidebar"] { max-width: 100% !important; }
}

/* Kill fixed inline widths on mobile */
@media (max-width: 1024px){
  [style*="width:"], [style*="min-width:"], [style*="max-width:"] {
    max-width: 100% !important;
    width: 100% !important;
  }
}

/* Extra safety: prevent grid children from overflowing */
@media (max-width: 1024px){
  .home-grid > * { min-width: 0 !important; }
}
