        .ticker-wrap--loading .row2{
  height:10px;
}
.ticker-wrap--loading{
  display:grid;
  gap:12px;
}
.ticker-wrap--loading .t-item.placeholder{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:12px;
  border-radius:10px;
  background:var(--card);
  border:1px solid var(--border);
}
.ticker-wrap--loading .row1{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.ticker-wrap--loading .row2{
  height:10px;
}
.ticker-wrap--loading .icon{
  width:36px;
  height:36px;
  border-radius:50%;
}
.ticker-wrap--loading .name{
  flex:1;
  height:12px;
  border-radius:4px;
}
.ticker-wrap--loading .price{
  width:60px;
  height:12px;
  border-radius:4px;
}
.ticker-wrap--loading .placeholder-bar{
  display:block;
  width:100%;
  height:10px;
  border-radius:4px;
}
.shimmer--text{
  width:90%;
}
.charts-grid--loading{
  position:relative;
}
.charts-grid--loading .chart-card{
  pointer-events:none;
}
/* =========================================================
   0) Typographic Headers (Pro gold accents)
   ========================================================= */
.page{ counter-reset: section-h3; } /* Changed counter to h3 */

/* h3 (Main Section Header) */
h3 {
  counter-increment: section-h3; /* Use counter on h3 */
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 50px; /* Added significant top margin */
  margin-bottom: 20px;
  padding: 0;
  color: var(--text); /* MODIFIED */
  font-size: 1.2rem; /* Made h3 the largest */
  font-weight: 700; /* TikTokText Bold */
  letter-spacing: -0.02em; /* MODIFIED: -2% */
  font-variant-caps: normal; /* MODIFIED: Changed from all-small-caps */
}

/* h4 (Sub-section Header - numbered) */
h4 {
  display: block;
  margin-top: 30px;
  margin-bottom: 10px;
  padding: 0;
  color: var(--text); /* MODIFIED */
  font-size: 1rem; /* Sized to be smaller than h3 */
  font-weight: 500; /* TikTokText Medium */
  letter-spacing: -0.02em; /* MODIFIED: -2% */
  font-variant-caps: normal;
}
/* h5 (Group Title - hairline) */
h5 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 24px 0 12px; /* Increased top margin for separation */
  padding: 0;
  font-size: 0.75rem; /* Kept small size */
  font-weight: 500; /* TikTokText Medium */
  letter-spacing: .02em;
  font-family: "TikTokText", "Helvetica Neue", Arial, sans-serif;
  text-transform: uppercase;
  /* MODIFIED: Changed from light gradient to dark muted text */
  color: var(--muted);
}

/* ADDED: Hairline rule for h5 */
h5::after {
  content: "";
  flex: 1;
  height: 1px;
  border-radius: 1px;
  /* MODIFIED: Changed to dark, subtle rule */
  background: linear-gradient(
    90deg,
    rgba(0,0,0,.1),
    rgba(0,0,0,.05),
    transparent
  );
}

/* =========================================================
   2) Fonts (MODIFIED)
   ========================================================= */
@font-face{
  font-family:"TikTokText";
  src:url("/assets/fonts/TikTokText/TikTokText-Regular.ttf") format("truetype");
  font-weight:400; font-style:normal; font-display:swap;
}
@font-face{
  font-family:"TikTokText";
  src:url("/assets/fonts/TikTokText/TikTokText-Medium.ttf") format("truetype");
  font-weight:500; font-style:normal; font-display:swap;
}
@font-face{
  font-family:"TikTokText";
  src:url("/assets/fonts/TikTokText/TikTokText-Bold.ttf") format("truetype");
  font-weight:700; font-style:normal; font-display:swap;
}

/* =========================================================
   3) Theme variables & base
   ========================================================= */
:root{
  /* MODIFIED: Swapped all colors for white mode */
  --bg:#F9F9FB; /* Soft off-white */
  --card:#FFFFFF; /* Pure white */
  --muted:#6B7280; /* Medium-dark gray */
  --text:#3c3c3c; /* User-requested text */
  --accent:#007BFF; /* Standard blue */
  --border:#E5E7EB; /* Light gray border */
  --good:#26a69a; /* Unchanged, still works */
  --bad:#ef5350; /* Unchanged, still works */
  --line:#91C799; /* Unchanged */
}
*{ box-sizing:border-box }
html, body{ height:100% }
body{
  margin:0; /* MODIFIED: Removed 50px top padding */
  color:var(--text);
  background: var(--bg); /* MODIFIED */
  font-family:"TikTokText", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
}
.page{ max-width:1180px; margin:0 auto; padding:48px clamp(20px, 6vw, 48px) 80px; }
.headline{ display:grid; gap:24px; margin-bottom:18px; }
.kicker{ color: var(--muted); font-size:.78rem; } /* MODIFIED */
.title{
  --title-icon-size:72px;
  display:flex;
  align-items:center;
  gap:16px;
  flex-wrap:nowrap;
}
.title__icon{
  display:flex;
  align-items:center;
  justify-content:center;
}
.title__icon img{
  width:var(--title-icon-size);
  height:var(--title-icon-size);
  border-radius:50%;
  object-fit:cover;
}
.title__copy{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:8px;
  min-height:var(--title-icon-size);
}
.title h1{
  margin:0;
  font-weight:700;
  letter-spacing:.2px;
  font-size:clamp(22px,3.8vw,38px);
  /* MODIFIED: Dark gradient for text */
  background:linear-gradient(180deg, #1F2937, #374151 80%, #4B5563);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.title .sub{ color:var(--muted); font-size:.92rem; }
.fund-price{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.fund-price__value{
  display:flex;
  align-items:baseline;
  gap:8px;
  flex-wrap:wrap;
}
.fund-price__amount{
  font-size:2.5rem;
  font-weight:700;
  color:var(--text);
  font-variant-numeric:tabular-nums;
  line-height:1;
}
.fund-price__currency{
  font-size:1.2rem;
  font-weight:500;
  color:var(--muted);
  margin-right:16px;
}
.fund-price__changes{
  display:flex;
  align-items:center;
  gap:12px;
}
.fund-price__dollar,
.fund-price__percent{
  font-size:1.1rem;
  font-weight:600;
  font-variant-numeric:tabular-nums;
}
.fund-price__dollar.positive,
.fund-price__percent.positive{
  color:var(--good);
}
.fund-price__dollar.negative,
.fund-price__percent.negative{
  color:var(--bad);
}
.fund-price__date{
  font-size:.85rem;
  color:var(--muted);
  margin-top:2px;
}
.section-nav{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:12px 0 24px;
  padding:10px 0;
  border-top:1px solid var(--border);
  border-bottom:1px solid var(--border);
  overflow-x:auto;
}
.section-nav::-webkit-scrollbar{
  display:none;
}
.section-nav.is-hidden{
  display:none;
}
.section-nav__item{
  border:1px solid var(--border);
  border-radius:999px;
  background:var(--card);
  color:var(--muted);
  font-size:.82rem;
  font-family:"TikTokText","Helvetica Neue",Arial,sans-serif;
  padding:6px 14px;
  cursor:pointer;
  transition:background .2s ease, color .2s ease, border-color .2s ease;
  white-space:nowrap;
}
.section-nav__item:hover,
.section-nav__item:focus-visible{
  color:var(--text);
  border-color:var(--text);
}
.section-nav__item:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
}
.legend-sub{ color:var(--muted); font-size:.82rem; margin-top: 10px; } /* MODIFIED */
.data-note{
  margin:18px 0;
  padding:16px 18px;
  border:1px solid var(--border);
  border-radius:12px;
  background:rgba(0,0,0,0.035);
  display:flex;
  gap:12px;
  align-items:center;
}
.data-note__icon{
  display:flex;
  align-items:center;
  justify-content:center;
}
.data-note__icon img{
  width:22px;
  height:22px;
  display:block;
}
.data-note__text{
  font-size:.9rem;
  color:var(--text);
  line-height:1.5;
}
.data-note__text strong{
  font-weight:600;
}
.sep{ height:1px; margin:8px 0; background:linear-gradient(90deg, transparent, rgba(0,0,0,.1), transparent); } /* MODIFIED */
.critical-toggle-wrap{
  margin:8px 0 0;
  display:flex;
  justify-content:flex-start;
 }
.critical-toggle-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--card);
  cursor:pointer;
  transition:border-color .2s ease, box-shadow .2s ease;
}
.critical-toggle-button:hover{
  border-color:rgba(0,0,0,0.25);
  box-shadow:0 2px 4px rgba(0,0,0,0.08);
}
.critical-toggle-button img{
  width:18px;
  height:18px;
}
.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  border:0;
}
/* Override stale-dot color only for QQQ Daily MDD alert */
#qqq-mdd-alert.stale-dot {
  background-color: rgb(237, 114, 46);   /* 🟠 orange */
}
#qqq-mdd-alert.stale-dot::after {
  background-color: rgb(237, 114, 46);   /* 🟠 same orange for glow */
}

/* =========================================================
   4) Ticker cards (generic)
   ========================================================= */
.ticker-wrap{ display:flex; flex-wrap:wrap; gap:12px; margin-bottom:16px; }
.t-item{
  flex:1 1 220px; background:var(--card);
  border:1px solid var(--border); border-radius:10px;
  padding:10px 12px; font-size:14px; position:relative;
  /* REMOVED: box-shadow: 0 1px 3px 0 rgba(0,0,0,0.05), 0 1px 2px 0 rgba(0,0,0,0.02); */
}

/* Desktop: force 4 per row for generic ticker-wrap */
@media (min-width:900px){
  .ticker-wrap{ display:flex; flex-wrap:wrap; gap:12px; }
  .t-item{ flex:0 0 calc(25% - 12px); max-width:calc(25% - 12px); }
}

/* Row layout pieces */
.row1{ display:flex; justify-content:space-between; align-items:center; margin-bottom:4px; }
.left{ display:flex; align-items:center; gap:8px; }
.icon{
  width:22px; height:22px; border-radius: 6px; /* MODIFIED: Was 50% */
  display:grid; place-items:center; font-weight:700; font-size:.75rem; color:#fff;
}
/* Icon colorways */
.icon.AllWeather{ background:linear-gradient(180deg, #f6e27a, #d4af37); color:#000; }
.icon.Trantor{ background:linear-gradient(180deg, #2c2c54, #0d0d0f); color:#FFFFFF; } /* MODIFIED: White text */
.icon.Americano{ background:linear-gradient(180deg, #a47148, #6f4e37); }
.icon.Continental{ background:linear-gradient(180deg, #7ee5a0, #3cb371); }
.icon.Stargate{ background:linear-gradient(180deg, #5b8def, #1e3a8a); }
.icon.Kairos{ background:linear-gradient(180deg, #4B607D, #1A1A1A); }

/* --- ADD THESE NEW RULES --- */
.icon.MarketIV {
  background: transparent;
  border: 1px solid #000000;
  color: #3c3c3c;
}
.icon.LeveragedETFShortVolume {
  background: transparent;
  border: 1px solid #000000;
  color: #3c3c3c;
}
/* --- END OF NEW RULES --- */

/* Price & delta row */
.price{ font-variant-numeric:tabular-nums; }
.row2{ display:flex; align-items:center; gap:6px; font-size:.82rem; }
.row2.up{ color:var(--good); }
.row2.down{ color:var(--bad); }
.row2.flat{ color:var(--muted); } /* MODIFIED */
.row2 svg{ width:14px; height:14px; }
.row2 svg path{ stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }

.critical-level-card{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin:22px 0 10px;
  padding:18px 22px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--card);
}
.critical-level-card.is-hidden{
  display:none;
}
.critical-level-title{
  font-size:.85rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted);
  font-weight:500;
}
.critical-level-date{
  margin-left:.4em;
  font-size:.75rem;
  letter-spacing:normal;
  text-transform:none;
  color:var(--muted);
  font-weight:400;
  white-space:nowrap;
}
.critical-level-values{
  display:flex;
  gap:28px;
}
.critical-value{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.critical-value .label{
  font-size:.7rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted);
  font-weight:500;
}
.critical-value .value{
  font-size:1.45rem;
  font-weight:700;
  color:var(--text);
  font-variant-numeric:tabular-nums;
}
.critical-value .delta{
  font-size:.78rem;
  color:var(--muted);
  font-variant-numeric:tabular-nums;
  font-weight:500;
}

/* Status: stale-dot pulse */
.stale-dot{
  display:inline-block; width:8px; height:8px; border-radius:50%;
  background:#ff4d4f; margin-left:6px;
  box-shadow:0 0 0 0 rgba(255,77,79,0.7);
  animation:pulse 1.6s infinite; vertical-align:middle;
}
@keyframes pulse{
  0%{ box-shadow:0 0 0 0 rgba(255,77,79,0.7); }
  70%{ box-shadow:0 0 0 8px rgba(255,77,79,0); }
  100%{ box-shadow:0 0 0 0 rgba(255,77,79,0); }
}

/* Celebration badge on ticker */
.t-item .ath-badge{
  position:absolute; right:14px; bottom:10px;
  font-size:13px; line-height:1;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.3));
  user-select:none; pointer-events:none;
}

/* =========================================================
   5) Performance Tables (MODIFIED)
   ========================================================= */
.table-scroll{
  width:100%;
}
.perf-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: none;
  border-radius: 10px;
  background: var(--card);
  position: relative;
  overflow: hidden;
  background-clip: padding-box;
}
.perf-table::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--border); /* MODIFIED */
  border-radius: inherit;
  pointer-events: none;
}
.perf-table thead th {
  background: var(--card);
  color: var(--muted); /* MODIFIED */
  text-align: right;
  font-weight: 600;
  padding: 10px 10px;
  font-size: .82rem;
  border-bottom: 1px solid var(--border); /* MODIFIED */
}
.perf-table thead th:first-child{text-align:left; padding-left:14px}
.perf-table tbody td{
  padding:10px;
  font-size:.86rem;
  border-bottom:1px solid var(--border); /* MODIFIED */
  text-align:right;
  font-variant-numeric:tabular-nums;
}
.perf-table tbody td:first-child{ text-align:left; padding-left:14px; }
.perf-table tbody tr:last-child td{ border-bottom:none; }

.val{ color:var(--text); font-weight:400; } /* MODIFIED */
.pos{ color:var(--good); font-weight:400; }
.neg{ color:var(--bad); font-weight:400; }
.neu{ color:var(--muted); font-weight:400; } /* MODIFIED */
.pinned{ background:rgba(0,0,0,0.03); } /* MODIFIED */

/* =========================================================
   6) Charts grid & cards
   ========================================================= */
.charts-grid{ display:grid; gap:18px; grid-template-columns:1fr; }
@media(min-width:900px){ .charts-grid{ grid-template-columns:repeat(2,1fr); } }

.chart-card{
  background:var(--card); border:1px solid var(--border);
  border-radius:12px; padding:14px;
  /* REMOVED: box-shadow: 0 1px 3px 0 rgba(0,0,0,0.05), 0 1px 2px 0 rgba(0,0,0,0.02); */
}
.chart-card__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.chart-card__legend{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  font-size:.74rem;
  color:var(--muted);
}
.chart-card__legend span{
  display:inline-flex;
  align-items:center;
  gap:4px;
}
.legend-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  display:inline-block;
}
.legend-dot--short{ background:#13AC9C; }
.legend-dot--long{ background:#5C6BC0; }
.legend-dot--ref{
  background:transparent;
  border:2px dotted #B0B8C5;
  border-radius:999px;
  width:12px;
  height:12px;
}
.chart-card h3{ margin:0; font-size:.85rem; font-weight:500; padding-bottom:10px; }
.chart-card__head h3{ padding-bottom:0; }
.chart-card h3 a{
  color:inherit;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:0.35em;
}
.chart-card h3 a:hover,
.chart-card h3 a:focus-visible{
  text-decoration:underline;
}
.chart-link__icon{
  font-size:0.8em;
  opacity:0.7;
  transition:transform 0.2s ease, opacity 0.2s ease;
}
.chart-card h3 a:hover .chart-link__icon,
.chart-card h3 a:focus-visible .chart-link__icon{
  transform:translate(1px,-1px);
  opacity:1;
}
.chart-card--placeholder{
  position:relative;
  overflow:hidden;
}
.chart-placeholder__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.chart-placeholder__title{
  height:14px;
  width:140px;
  border-radius:4px;
}
.chart-placeholder__icon{
  height:12px;
  width:22px;
  border-radius:4px;
}
.chart-placeholder__body{
  height:260px;
  border-radius:8px;
  margin-top:8px;
}
.table-placeholder-row{
  pointer-events:none;
}
.table-placeholder{
  display:block;
  height:12px;
  border-radius:4px;
  width:70%;
  margin-left:auto;
  margin-right:0;
}
.table-placeholder--label{
  width:140px;
  margin-left:0;
  margin-right:auto;
}
.table-placeholder--short{
  width:55%;
}
.table-placeholder--tiny{
  width:40%;
}
.shimmer{
  position:relative;
  background:linear-gradient(90deg, rgba(200,200,200,0.25) 0%, rgba(200,200,200,0.45) 50%, rgba(200,200,200,0.25) 100%);
  background-size:200% 100%;
  animation:shimmer 1.5s linear infinite;
}
@keyframes shimmer{
  0%{ background-position:-200% 0; }
  100%{ background-position:200% 0; }
}
.chart-container{
  width:100%;
  height:260px;
  background:var(--card);
}
.chart-container--tall{
  height:400px !important;
}
.chart-card.full-span{ grid-column:1 / -1; }

/* Controls row */
.toolrow{ display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.actions{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }

/* Segmented controls */
.range-switcher, .interval-switcher, .scale-toggle{
  display:flex; gap:4px; align-items:center; padding:2px;
  border-radius:8px; background:rgba(0,0,0,0.04); /* MODIFIED */
  border:1px solid var(--border);
}
.range-switcher .rng,
.interval-switcher .int,
.scale-toggle .seg{
  min-width:40px; height:26px; padding:0 8px; border-radius:6px; border:0;
  background:rgba(0,0,0,0.05); color:var(--text); /* MODIFIED */
  font-weight:500; font-size:.72rem;
  font-family:"TikTokText", "Helvetica Neue", Arial, sans-serif;
  cursor:pointer; display:inline-flex; align-items:center; justify-content:center;
  transition:all .2s ease;
}
.range-switcher .rng:hover,
.interval-switcher .int:hover,
.scale-toggle .seg:hover{
  background:rgba(0,0,0,0.12); /* MODIFIED */
  border-color:rgba(0,0,0,0.25); /* MODIFIED */
}

/* Active button styling */
.range-switcher .rng.is-active,
.interval-switcher .int.is-active,
.scale-toggle .seg.is-active{
  position:relative;
  background: #FFFFFF; /* White background */
  color: var(--text); /* Simple text color */
  font-weight:500;
  border-radius:6px;
  z-index:0;
  /* Removed gradient text properties */
  box-shadow: 0 1px 2px rgba(0,0,0,0.06); /* Kept shadow for depth */
}

/* Removed the pseudo-element that created the gradient border */
.range-switcher .rng.is-active::before,
.interval-switcher .int.is-active::before,
.scale-toggle .seg.is-active::before{
  content: none;
}

.scale-toggle .seg[aria-disabled="true"]{ opacity:.4; cursor:not-allowed; }

/* Disabled range buttons */
.range-switcher .rng[aria-disabled="true"]{
  opacity:.5;
  cursor:not-allowed;
  position:relative;
  pointer-events:none;
}
.range-switcher .rng[aria-disabled="true"]::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  right:0;
  bottom:0;
  background-image:repeating-linear-gradient(
    45deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.3) 2px,
    rgba(0,0,0,0.3) 4px
  );
  pointer-events:none;
  border-radius:6px;
}

/* Disabled interval buttons with diagonal strikethrough */
.interval-switcher .int[aria-disabled="true"]{
  opacity:.5;
  cursor:not-allowed;
  position:relative;
  pointer-events:none;
}
.interval-switcher .int[aria-disabled="true"]::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  right:0;
  bottom:0;
  background-image:repeating-linear-gradient(
    45deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.3) 2px,
    rgba(0,0,0,0.3) 4px
  );
  pointer-events:none;
  border-radius:6px;
}

/* Footer */
footer{
  margin-top:36px; text-align:center; font-size:.85rem; color:var(--muted);
  padding:16px 8px; border-top:1px solid var(--border);
}
footer span{ color:var(--accent); font-weight:700; letter-spacing:.6px; }

/* View Controls card sizing */
#controls-card{
  margin-bottom:18px; padding: 0px; border: none;
  box-shadow: none; /* MODIFIED: Remove shadow from controls card */
  background: transparent; /* MODIFIED: Remove bg from controls card */
}
#controls-card .toolrow{ display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; margin:0; }
#controls-card h3{ margin:0; padding:0; line-height:1.0; display:flex; align-items:center; }
#controls-card .actions{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
#controls-card .range-switcher .rng,
#controls-card .interval-switcher .int,
#controls-card .scale-toggle .seg{ height:28px; }

/* =========================================================
   Daily Flow checklist
   ========================================================= */
.actions-panel{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin:12px 0 32px;
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 18px;
  border-radius:8px;
  border:1px solid var(--border);
  background:var(--card);
  color:var(--text);
  font-size:.9rem;
  font-weight:600;
  cursor:pointer;
  transition:background .2s ease, border-color .2s ease;
}
.btn.primary{
  background:var(--accent);
  border-color:var(--accent);
  color:#fff;
}
.btn.secondary:hover,
.btn.primary:hover{
  border-color:var(--text);
}
.btn:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
}

.todo-list{
  list-style:none;
  margin:0 0 24px;
  padding:0;
  display:grid;
  gap:10px;
}
.todo-item{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--card);
  cursor:pointer;
  transition:background .2s ease, border-color .2s ease;
  position:relative;
}
.todo-item:hover{
  border-color:var(--text);
}
.todo-item.is-complete{
  background:#f0f6ff;
  border-color:var(--accent);
}

.todo-label{
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  cursor:pointer;
  font-size:.95rem;
  font-weight:500;
  color:var(--text);
  position:relative;
}
.todo-label:focus-within{
  outline:2px solid var(--accent);
  outline-offset:2px;
  border-radius:8px;
}
.todo-checkbox{
  position:absolute;
  opacity:0;
  width:1px;
  height:1px;
  margin:-1px;
  padding:0;
  border:0;
  clip:rect(0,0,0,0);
  clip-path:inset(50%);
}
.todo-checkbox:focus-visible + .checkbox{
  outline:2px solid var(--accent);
  outline-offset:2px;
}
.todo-text{
  flex:1;
}
.todo-item.is-complete .todo-text{
  text-decoration:line-through;
  color:var(--muted);
}

.checkbox{
  width:18px;
  height:18px;
  border-radius:4px;
  border:1px solid var(--border);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:var(--card);
  transition:background .2s ease, border-color .2s ease;
}
.checkbox::after{
  content:"✓";
  color:#fff;
  font-size:.75rem;
  transform:scale(0);
  transition:transform .15s ease;
}
.todo-item.is-complete .checkbox{
  background:var(--accent);
  border-color:var(--accent);
}
.todo-item.is-complete .checkbox::after{
  transform:scale(1);
}

.toast{
  position:fixed;
  bottom:16px;
  right:16px;
  padding:10px 14px;
  border-radius:8px;
  border:1px solid var(--border);
  background:var(--card);
  color:var(--text);
  box-shadow:0 4px 8px rgba(0,0,0,0.08);
  font-size:.9rem;
  opacity:0;
  transform:translateY(12px);
  transition:opacity .2s ease, transform .2s ease;
  pointer-events:none;
}
.toast.show{
  opacity:1;
  transform:translateY(0);
}

/* =========================================================
   7) Mobile (≤640px) responsive
   ========================================================= */
@media (max-width:640px){
  .actions-panel{
    flex-direction:column;
    align-items:stretch;
    gap:8px;
  }
  .btn{
    width:100%;
  }
  .page{ padding:48px 20px 28px; max-width:100%; }
  .headline{ gap:6px; margin-bottom:12px; }
  .title{ 
    flex-direction:column; 
    align-items:flex-start; 
    gap:6px; 
  }
  /* Keep row layout for fund-x.html which has title__icon */
  .title:has(.title__icon){
    flex-direction:row; 
    align-items:center; 
    gap:12px; 
    flex-wrap:nowrap;
  }
  .title__icon{
    flex-shrink:0;
    --title-icon-size:56px;
  }
  .title__copy{
    flex:1;
    min-width:0;
  }
  .title h1{ font-size:clamp(18px,7vw,28px); }

  /* Adjusted responsive headers */
  h3{ margin:28px 0 14px; font-size:1.3rem; gap:10px; }
  h4{ margin:22px 0 10px; font-size:1.1rem; }
  h5{ margin:22px 0 10px; }

  /* Ticker becomes single column */
  .ticker-wrap{ gap:10px; }
  .t-item{ flex:1 1 100%; padding:10px; }

  /* Cards & charts */
  .chart-container{ height:clamp(200px, 48vw, 280px); }
  .chart-container.chart-container--tall{ height:clamp(280px, 65vw, 420px) !important; }

  /* Controls: stack + horizontal scroll */
  #controls-card .toolrow{ flex-direction:column; align-items:stretch; gap:8px; }
  #controls-card .actions{ overflow-x:auto; -webkit-overflow-scrolling:touch; gap:6px; padding-bottom:4px; }
  .range-switcher, .interval-switcher .int, .scale-toggle{ flex-wrap:nowrap; }
  .range-switcher .rng, .interval-switcher .int, .scale-toggle .seg{ min-width:36px; height:30px; font-size:.7rem; padding:0 6px; }

  .table-scroll{
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }
  .perf-table{
    min-width:720px;
  }
}

/* =========================================================
   8) Main Indexes ETFs (3-up layout + conditional BG)
   ========================================================= */
#main-indexes{ display:flex; flex-wrap:wrap; gap:12px; }

/* Default (mobile): 1 per row */
#main-indexes .t-item.index-card{ flex:1 1 100%; padding:12px 14px; }

/* Desktop: exactly 3 per row */
@media (min-width:900px){
  #main-indexes .t-item.index-card{
    flex:0 0 calc(33.333% - 12px); max-width:calc(33.333% - 12px);
  }
}

/* Remove border and color background by direction (JS sets .up/.down) */
#main-indexes .t-item.index-card{ border:none; }
/* MODIFIED: Inverted backgrounds to be light colors */
#main-indexes .t-item.index-card.up{
  background: linear-gradient(180deg, #E6F6F3, #F0F9F8);
}

#main-indexes .t-item.index-card.down{
background: linear-gradient(180deg, #FEEFEF, #FEF9F9);
}

#main-indexes .t-item.index-card.flat{
  background: linear-gradient(180deg, #F3F4F6, #F9FAFB);
}

/* SVG logos inside round frame (no tint) */
#main-indexes .icon{
  width:22px; height:22px; border-radius:50%;
  background:transparent; overflow:hidden; padding:0;
  display:flex; align-items:center; justify-content:center;
}
#main-indexes .icon img{ width:100%; height:100%; object-fit:contain; }

/* Documents List */
.document_list {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.document_container {
  display: flex;
  align-items: center;
  justify-content: left;
  height: 37px;
  background: #F5F5F7;
  border-radius: 3px;
  margin-bottom: 10px;
}

.document_container a {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: left;
  text-decoration: none;
  background: #F5F5F7;
  color: #3374F6;
  font-size: 0.875rem;
}

.document_container a:visited {
  color: #3374F6;
}

.document_container img {
  border-radius: 3px;
  height: 37px;
  width: auto;
  margin-right: 10px;
}

/* Disclaimer Section */
.disclaimer-section {
  color: #717777;
  line-height: 1.3rem;
}

.disclaimer-section b {
  font-weight: 600;
}

.disclaimer-section p {
  margin-bottom: 20px;
}

/* REMOVED: Extra closing brace } */

