/* ===========================================================================
 * components.css — styling for features added on top of the base theme.
 *
 * WHY THIS FILE EXISTS
 * These rules previously lived at the bottom of theme.css and were lost when
 * that file was regenerated: four of five blocks disappeared, leaving the metal
 * tabs, the IPO archive grid and the sticky-bar colour settings unstyled while
 * their markup still rendered. Keeping them here means editing or regenerating
 * theme.css cannot silently break them.
 *
 * Loaded AFTER theme.css, so anything here wins on equal specificity.
 *
 * Contents:
 *   1. Metal tabs        — Gold / Silver / Platinum switcher on rate pages
 *   2. IPO archive grid  — 3x3 cross-links between the nine IPO archives
 *   3. Sticky footer bar — admin-chosen colours
 *   4. Price trend       — Rising / Falling colours in the history table
 *   5. Post thumbnails   — logo fallback when a post has no featured image
 *   6. Ad slots          — Admin -> Ads
 *   7. Legibility        — contrast corrections over the base theme
 *   8. Calculator index  — /financial-calculators directory + filter
 * =========================================================================== */


/* ---------------------------------------------------------------------------
 * 1. METAL TABS — Gold / Silver / Platinum
 *
 * A segmented pill control at the top of every rate page. Switching metal keeps
 * the visitor's location: /gold-rates/mumbai -> /silver-rates/mumbai.
 *
 * Colours are expressed against currentColor so the control reads correctly on
 * a light card and on the darker platinum hero without needing a variant.
 * --------------------------------------------------------------------------- */
.metal-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin: 0 0 1.15rem;
  border: 1px solid rgba(125, 140, 160, .28);
  border-radius: 999px;
  background: rgba(125, 140, 160, .09);
  vertical-align: middle;
}

.metal-tabs .metal-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: .52rem 1.15rem;
  border-radius: 999px;
  font-family: var(--font, inherit);
  font-size: .88rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .01em;
  color: var(--muted2, #64748b);
  text-decoration: none;
  white-space: nowrap;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.metal-tabs a.metal-tab:hover,
.metal-tabs a.metal-tab:focus-visible {
  background: rgba(125, 140, 160, .16);
  color: var(--ink, #16202c);
  text-decoration: none;
}

/* The page you are on — a <span>, so it is not clickable or focusable. */
.metal-tabs .metal-tab.on {
  background: var(--brand, #0f8743);
  color: #fff;
  box-shadow: 0 1px 3px rgba(8, 24, 36, .22);
}

@media (max-width: 520px) {
  .metal-tabs { display: flex; width: 100%; }
  .metal-tabs .metal-tab { flex: 1 1 0; min-width: 0; padding: .52rem .4rem; font-size: .82rem; }
}


/* ---------------------------------------------------------------------------
 * 2. IPO ARCHIVE CROSS-LINKS — the 3x3 grid joining the nine archive pages.
 * --------------------------------------------------------------------------- */
.ipo-xlinks {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line, #e4e9f0);
}

.ipo-xlinks-h { font-size: 1.15rem; margin-bottom: .35rem; }

.ipo-xlinks-table { margin-bottom: 0; font-size: .92rem; }

.ipo-xlinks-table th[scope="col"] {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted2, #7b8798);
}

.ipo-xlinks-table th[scope="row"] { white-space: nowrap; font-weight: 800; }
.ipo-xlinks-table td { vertical-align: middle; }

.ipo-xlink { font-weight: 600; text-decoration: none; }
.ipo-xlink:hover { text-decoration: underline; }

.ipo-xlink-here {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 700;
  color: var(--muted2, #7b8798);
}

.ipo-xlink-badge {
  padding: .12rem .42rem;
  border-radius: 999px;
  background: rgba(125, 140, 160, .16);
  color: var(--muted2, #7b8798);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.ipo-xlink-na { color: var(--muted2, #9aa4b2); }

@media (max-width: 575.98px) {
  .ipo-xlinks-table { font-size: .82rem; }
  .ipo-xlink-badge { display: none; }
}


/* ---------------------------------------------------------------------------
 * 3. STICKY FOOTER BAR — admin-chosen colours.
 *
 * The palette arrives as custom properties on .sticky-cta (see
 * partials/sticky_bar.php); the stylesheet keeps ownership of layout, hover and
 * responsive behaviour. Hover uses filter:brightness() rather than a fixed
 * colour so it stays sensible whatever palette is picked.
 * --------------------------------------------------------------------------- */
.sticky-cta .sticky-cta-txt,
body.site-shell .sticky-cta .sticky-cta-txt { color: var(--sb-text, #fff); }

.sticky-cta .sticky-cta-kicker,
body.site-shell .sticky-cta .sticky-cta-kicker { color: var(--sb-text, #fff); opacity: .72; }

.sticky-cta .sticky-cta-mark,
body.site-shell .sticky-cta .sticky-cta-mark { color: var(--sb-text, #fff); }

/* !important because the base rule for the button label already uses it. */
.sticky-cta .sticky-cta-btn,
body.site-shell .sticky-cta .sticky-cta-btn { color: var(--sb-btn-text, #fff) !important; }

.sticky-cta .sticky-cta-btn:hover,
.sticky-cta .sticky-cta-btn:focus,
body.site-shell .sticky-cta .sticky-cta-btn:hover,
body.site-shell .sticky-cta .sticky-cta-btn:focus { color: var(--sb-btn-text, #fff) !important; }

/* --sb-x-bg is only set when an admin picks one; the fallback is a translucent
   overlay that reads correctly on any bar colour. */
.sticky-cta .sticky-cta-x,
body.site-shell .sticky-cta .sticky-cta-x {
  background: var(--sb-x-bg, rgba(255, 255, 255, .14));
  color: var(--sb-x-text, #fff);
  border-color: var(--sb-x-bg, rgba(255, 255, 255, .2));
}

.sticky-cta .sticky-cta-x:hover,
.sticky-cta .sticky-cta-x:focus,
body.site-shell .sticky-cta .sticky-cta-x:hover,
body.site-shell .sticky-cta .sticky-cta-x:focus {
  background: var(--sb-x-bg, rgba(255, 255, 255, .28));
  color: var(--sb-x-text, #fff);
  border-color: var(--sb-x-bg, rgba(255, 255, 255, .3));
  filter: brightness(1.15);
}


/* ---------------------------------------------------------------------------
 * 4. PRICE TREND — Rising / Falling / Flat in the monthly history table.
 *
 * theme.css already defines .gt-up / .gt-dn, but at a single-class specificity
 * (0-1-0) that any table rule can outrank, and it has proven vulnerable to
 * being dropped when theme.css is regenerated. These rules are scoped to the
 * history table so they win outright, and a soft tint makes the direction
 * readable at a glance rather than only through the word.
 * --------------------------------------------------------------------------- */
.gmh-acc .gsec-table tbody td.gt-up,
body.site-shell .gmh-acc .gsec-table tbody td.gt-up {
  color: var(--success);
  font-weight: 800;
}

.gmh-acc .gsec-table tbody td.gt-dn,
body.site-shell .gmh-acc .gsec-table tbody td.gt-dn {
  color: var(--danger);
  font-weight: 800;
}

.gmh-acc .gsec-table tbody td.gt-flat,
body.site-shell .gmh-acc .gsec-table tbody td.gt-flat {
  color: var(--text, #1d2733);
  font-weight: 800;
}

/* A small arrow before the label, so direction is not conveyed by colour alone
   — colour-blind readers and printed pages both need the shape. */
.gmh-acc .gsec-table tbody td.gt-up::before  { content: "▲ "; font-size: .78em; }
.gmh-acc .gsec-table tbody td.gt-dn::before  { content: "▼ "; font-size: .78em; }
.gmh-acc .gsec-table tbody td.gt-flat::before { content: "– "; }

/* Keep the general classes working outside the history table too. */
.gt-up  { color: var(--success); font-weight: 700; }
.gt-dn  { color: var(--danger); font-weight: 700; }
/* No change reads in the body-text colour (black), not grey: grey looked like
   missing data. Rise = green, fall = red, unchanged = black, site-wide. */
.gt-flat { color: var(--text, #1d2733); font-weight: 700; }


/* ---------------------------------------------------------------------------
 * 5. POST THUMBNAIL FALLBACK
 *
 * When a post has no featured image the card shows the site logo (or favicon)
 * instead of initials text. Photo thumbnails use object-fit:cover, which would
 * crop a logo badly — a wordmark would lose its ends and a square favicon would
 * be blown up to fill a 16:9 box. So the fallback gets `contain` plus padding
 * and sits on a soft tint, reading as a deliberate placeholder rather than a
 * broken photo.
 * --------------------------------------------------------------------------- */
.blog-editorial-image img.is-fallback,
.portal-insight-image img.is-fallback,
.post-thumb img.is-fallback,
.mini-thumb img.is-fallback {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(125, 140, 160, .07);
  padding: 14%;
  opacity: .85;
}

/* The small sidebar thumbnails are only ~64px, so a percentage pad leaves the
   logo unreadable — use a fixed, smaller inset there. */
.mini-thumb img.is-fallback { padding: 7px; }

/* Containers that style themselves as an empty placeholder should not also
   paint a background behind the logo. */
.blog-editorial-image.is-placeholder:has(img.is-fallback),
.portal-insight-image.is-placeholder:has(img.is-fallback),
.post-thumb.placeholder:has(img.is-fallback) {
  background: none;
}


/* ---------------------------------------------------------------------------
 * 6. AD SLOTS (Admin -> Ads)
 *
 * Deliberately unopinionated: an ad network controls its own iframe dimensions,
 * so this only handles spacing, centring and the device toggles. No min-height,
 * because reserving space would shift layout on pages where a slot has no
 * matching ad.
 * --------------------------------------------------------------------------- */
.ad-slot { margin: 1.25rem 0; text-align: center; }
.ad-slot:empty { display: none; margin: 0; }

.ad-unit { margin: 0 auto .75rem; max-width: 100%; overflow: hidden; }
.ad-unit:last-child { margin-bottom: 0; }
.ad-unit img { max-width: 100%; height: auto; display: block; margin: 0 auto; border-radius: 10px; }
.ad-unit iframe, .ad-unit ins { max-width: 100%; }

.ad-slot-sidebar { margin: 0 0 1.25rem; }
.ad-slot-header, .ad-slot-footer { padding: 0 1rem; }

/* Device targeting is done in CSS, not PHP: SiteCache serves one cached HTML
   body to every visitor, so a server-side check would be baked into the cache
   and shown to the wrong devices. */
@media (max-width: 767.98px) { .ad-desktop-only { display: none !important; } }
@media (min-width: 768px)    { .ad-mobile-only  { display: none !important; } }


/* ==========================================================================
   7. Legibility corrections
   ========================================================================== */

/* `body.site-shell a { color: var(--brand) }` has specificity 0,1,2, which
   outranks BOTH `.btn-brand { color:#fff }` and Bootstrap's own
   `.btn { color: var(--bs-btn-color) }` — each only 0,1,0. The result was that
   every <a class="btn"> on the site drew its label in brand green whatever it
   sat on, so a green button rendered green-on-green and the label vanished.
   Buttons already carry the right answer in --bs-btn-color; this hands control
   back to it at a specificity (0,2,1) that beats the link rule. It matches
   `a.btn` rather than `.btn` so it never touches real <button> elements, which
   were never affected. */
body.site-shell a.btn { color: var(--bs-btn-color); }
body.site-shell a.btn:hover,
body.site-shell a.btn:focus { color: var(--bs-btn-hover-color, var(--bs-btn-color)); }

/* Anything filled with the accent takes --on-accent (partials/palette.php):
   white on the default green (about 5.3:1), ink if the admin picks a pale accent. */
.btn-accent { --bs-btn-color: var(--on-accent, #fff); color: var(--on-accent, #fff); }
.social-ico:hover,
.footer-socials .social-ico:hover,
.back-to-top:hover { color: #fff; }

/* Brand green on the pale brand tints lands at 4.0–4.3:1 — under AA at these
   small sizes. The darker step clears it at 6.4:1. Each selector here is
   written one step more specific than the theme rule it corrects, rather than
   with !important, so ordinary overrides still work. */
body.site-shell .eyebrow,
body.site-shell .chip,
body.site-shell .author-box .ab-role,
body.site-shell .board-tag.mb,
body.site-shell .hhr-chip.up,
body.site-shell .br-pf .tag { color: var(--brand-700); }

/* Secondary text inside the dark footer. These were mid-grey literals that no
   automated pass can safely reassign — a grey that reads on white cannot be
   told apart from one that reads on dark green by its value alone — so they
   are pinned explicitly to the on-dark tint (5.6:1 against the footer). */
body.site-shell .site-footer,
body.site-shell .footer-about,
body.site-shell .footer-bottom,
body.site-shell .footer-legal p,
body.site-shell .footer-label { color: var(--on-dark-muted); }


/* ==========================================================================
   8. CALCULATOR INDEX — /financial-calculators

   55 tools in 10 categories. Every tool is in the DOM; the toolbar filters
   what is visible. See the note at the head of Views/calculators/archive.php.
   ========================================================================== */

/* ---- hero ---- */
.cx-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.6rem;
  margin-top: 1.2rem;
  font-size: .85rem;
  color: var(--muted);
}
.cx-hero-stats b {
  margin-right: .3rem;
  font-family: var(--display, inherit);
  font-size: 1.05rem;
  color: var(--brand-700);
}

/* The hero's decorative ring was a leftover blue from a palette the site no
   longer uses. Re-tinted from the brand so this page matches the rest. */
body.site-shell .calculator-hero::after {
  border-color: var(--line-strong);
  box-shadow:
    0 0 0 28px color-mix(in srgb, var(--brand) 5%, transparent),
    0 0 0 56px color-mix(in srgb, var(--brand) 2%, transparent);
}

/* ---- toolbar ---- */
/* Scrolls with the page. It used to be sticky, but with 18 category pills it
   is tall enough to cover the first rows of calculators while scrolling. */
.cx-toolbar {
  position: static;
  margin: 0 0 1.6rem;
  padding: .8rem;
  border: 1px solid var(--line-strong);
  background: var(--card);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--ink) 8%, transparent);
}

.cx-search { position: relative; display: flex; align-items: center; }
.cx-search > svg {
  position: absolute;
  left: .8rem;
  color: var(--muted);
  pointer-events: none;
}
.cx-search-in {
  width: 100%;
  padding: .72rem 2.4rem .72rem 2.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: .95rem;
}
.cx-search-in::placeholder { color: var(--muted); opacity: 1; }
.cx-search-in:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
}
/* The native clear button would sit on top of ours. */
.cx-search-in::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

.cx-search-x {
  position: absolute;
  right: .5rem;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: var(--card-alt);
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.cx-search-x:hover { background: var(--brand-700); color: var(--surface); }

.cx-pills { display: flex; flex-wrap: wrap; gap: .38rem; margin-top: .75rem; }
.cx-pill {
  flex: 0 0 auto;
  padding: .38rem .7rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: .77rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.cx-pill span { margin-left: .28rem; font-variant-numeric: tabular-nums; opacity: .75; }
.cx-pill:hover { border-color: var(--brand); color: var(--brand-700); }
.cx-pill.is-on {
  border-color: var(--brand-700);
  background: var(--brand-700);
  color: var(--surface);
}

.cx-count {
  margin: -.7rem 0 1.3rem;
  font-size: .82rem;
  font-weight: 700;
  color: var(--muted);
}

/* ---- category groups ---- */
.cx-group { margin-bottom: 2.3rem; }
.cx-group[hidden] { display: none; }

.cx-group-h {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 1rem;
  padding-bottom: .65rem;
  border-bottom: 2px solid var(--brand-700);
  font-family: var(--display, inherit);
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--text);
}
.cx-group-ic {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--accent);
  color: #fff;
}
.cx-group-n {
  margin-left: auto;
  padding: .14rem .5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card-alt);
  font-family: var(--font, inherit);
  font-size: .72rem;
  font-weight: 800;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---- tiles ---- */
.cx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(266px, 1fr));
  gap: .7rem;
}

.cx-tile {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 16px;
  align-items: start;
  gap: .75rem;
  padding: .9rem;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.cx-tile[hidden] { display: none; }
.cx-tile:hover,
.cx-tile:focus-visible {
  border-color: var(--brand-700);
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 color-mix(in srgb, var(--brand) 18%, transparent);
  text-decoration: none;
}

.cx-tile-ic {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--brand-050);
  color: var(--brand-700);
  transition: background .16s ease;
}
.cx-tile:hover .cx-tile-ic { background: var(--accent); }

.cx-tile-b { min-width: 0; }
.cx-tile-t {
  display: block;
  font-size: .95rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
}
.cx-tile-s {
  display: block;
  margin-top: .22rem;
  font-size: .78rem;
  line-height: 1.4;
  color: var(--muted);
}
.cx-tile-go {
  margin-top: .55rem;
  color: var(--brand-700);
  transition: transform .16s ease;
}
.cx-tile:hover .cx-tile-go { transform: translateX(3px); }

/* ---- empty state ---- */
.cx-empty {
  padding: 2.6rem 1rem;
  border: 1px dashed var(--line-strong);
  background: var(--card);
  text-align: center;
}
.cx-empty-h {
  margin: 0 0 .3rem;
  font-family: var(--display, inherit);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}
.cx-empty-s { margin: 0; font-size: .88rem; color: var(--muted); }
.cx-empty-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand-700);
  font: inherit;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.cx-intro { margin-top: 2.4rem; padding-top: 1.7rem; border-top: 1px solid var(--line); }

@media (max-width: 575.98px) {
  /* Ten pills wrap into a wall on a phone; one scrolling row keeps the grid
     above the fold. */
  .cx-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: .3rem;
    scrollbar-width: none;
  }
  .cx-pills::-webkit-scrollbar { display: none; }
  .cx-grid { grid-template-columns: 1fr; }
  .cx-group-h { font-size: 1.08rem; }
  .cx-toolbar { padding: .65rem; }
}

@media (prefers-reduced-motion: reduce) {
  .cx-tile, .cx-tile-ic, .cx-tile-go, .cx-pill { transition: none; }
  .cx-tile:hover { transform: none; }
  .cx-tile:hover .cx-tile-go { transform: none; }
}


/* ==========================================================================
   9. CONTACT PAGE — the "what we can / can't help with" panel
   ========================================================================== */
.contact-help {
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--brand-700);
  background: var(--card-alt);
}
.contact-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: .87rem;
  line-height: 1.55;
}
.contact-list li { margin-bottom: .3rem; }
.contact-list li:last-child { margin-bottom: 0; }
.contact-list strong { color: var(--text); }
/* The same panel when its text comes from the admin editor (Pages → Built-in pages → Contact Us). */
.contact-body p { margin: 0 0 .5rem; font-size: .87rem; line-height: 1.55; color: var(--muted); }
.contact-body p strong:only-child { font-size: 1rem; font-weight: 700; color: var(--ink); }
.contact-body ul, .contact-body ol { margin: 0 0 1rem; padding-left: 1.1rem; color: var(--muted); font-size: .87rem; line-height: 1.55; }
.contact-body li { margin-bottom: .3rem; }
.contact-body li strong { color: var(--text); }
.contact-body > :last-child { margin-bottom: 0; }


/* ==========================================================================
   11. IPO SECTION — cross-links, board filter, subscription table
   ========================================================================== */

/* ---- cross-links between the four IPO pages ---- */
.ipo-xgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .7rem;
  margin-top: .9rem;
}

.ipo-xcard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: .95rem 1rem;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.ipo-xcard:hover {
  border-color: var(--brand-700);
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 color-mix(in srgb, var(--brand) 18%, transparent);
  text-decoration: none;
}
.ipo-xcard.is-here {
  border-style: dashed;
  background: var(--card-alt);
  transform: none;
  box-shadow: none;
}
.ipo-xcard-t { font-size: .95rem; font-weight: 800; color: var(--text); line-height: 1.25; }
.ipo-xcard-s { font-size: .78rem; line-height: 1.4; color: var(--muted); }
.ipo-xcard-go { margin-top: .2rem; color: var(--brand-700); font-weight: 700; }

/* ---- mainboard / SME filter (buttons now, not links to separate pages) ---- */
.ipo-boardbar button {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  padding: .4rem .85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.ipo-boardbar button span { margin-left: .3rem; opacity: .75; font-variant-numeric: tabular-nums; }
.ipo-boardbar button:hover { border-color: var(--brand); color: var(--brand-700); }
.ipo-boardbar button.on {
  background: var(--brand-700);
  border-color: var(--brand-700);
  color: var(--surface);
}

/* ---- subscription figures ---- */
.sub-table td { font-variant-numeric: tabular-nums; }

.sub-x { font-weight: 700; color: var(--text); }
/* Heavily subscribed is the thing a reader scans for, so it earns emphasis;
   the arrow-free colouring stays inside the palette rather than adding a
   fifth hue. */
.sub-x.sub-ok  { color: var(--brand-700); }
.sub-x.sub-hot {
  color: #fff;
  background: var(--accent);
  padding: .05rem .4rem;
  border-radius: 4px;
}
.sub-na { color: var(--muted2); }

/* ---- IPO table pages: sortable headers, "Load more", type and link cells (assets/js/ipo-tables.js) ---- */
.ipo-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: inherit;
  cursor: pointer;
}
.ipo-sort::after { content: '\21C5'; font-size: .82em; opacity: .4 }
th[aria-sort="ascending"] .ipo-sort::after { content: '\25B2'; opacity: .85 }
th[aria-sort="descending"] .ipo-sort::after { content: '\25BC'; opacity: .85 }
.ipo-sort:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 3px }
.ipo-more {
  display: block;
  margin: 14px auto 0;
  padding: .5rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface, #fff);
  font-weight: 700;
  color: var(--brand);
  cursor: pointer;
}
.ipo-more:hover { border-color: var(--brand); background: var(--brand-050) }
.ipo-type { font-size: .8rem; font-weight: 800; white-space: nowrap }
.ipo-type.t-nse { color: #7c3aed }
.ipo-type.t-bse { color: #ea580c }
.ipo-type.t-mb { color: #2563eb }
.ipo-dl { font-weight: 700; white-space: nowrap }
.ipo-today {
  display: inline-block;
  margin-left: 6px;
  padding: .05rem .4rem;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ---- the two board tables on the IPO hub ---- */
.ipo-boards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.4rem;
  margin-bottom: 2.2rem;
}

.ipo-board {
  border: 1px solid var(--brand);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
}
.ipo-board-h {
  margin: 0;
  padding: .85rem 1rem;
  text-align: center;
  font-family: var(--display, inherit);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.01em;
}
.ipo-board-empty { margin: 0; padding: 1.4rem 1rem; text-align: center; color: var(--muted); font-size: .88rem; }

.ipo-board-table { margin: 0; font-size: .9rem; }
.ipo-board-table thead th {
  background: var(--brand-050);
  border-bottom: 1px solid var(--line-strong);
  font-size: .82rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}
/* Zebra striping: these tables are scanned row by row across three columns. */
.ipo-board-table tbody tr:nth-child(even) { background: var(--card-alt); }
.ipo-board-table tbody tr:hover { background: var(--brand-050); }
.ipo-board-table td { border-bottom: 1px solid var(--line); vertical-align: middle; }
.ipo-board-table .c-name a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* Sort affordance — a real control, so it is focusable and shows direction. */
.ipo-board-table th.is-sortable { cursor: pointer; user-select: none; position: relative; padding-right: 1.4rem; }
.ipo-board-table th.is-sortable::after {
  content: "⇅";
  position: absolute;
  right: .5rem;
  opacity: .4;
  font-size: .8em;
}
.ipo-board-table th[aria-sort="ascending"]::after  { content: "↑"; opacity: 1; }
.ipo-board-table th[aria-sort="descending"]::after { content: "↓"; opacity: 1; }
.ipo-board-table th.is-sortable:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }

/* ---- card strips (GMP, subscription status) ---- */
.ipo-cards-sec { margin: 0 0 2.2rem; }
.ipo-cards-h {
  margin: 0 0 .9rem;
  font-family: var(--display, inherit);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
}
.ipo-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.ipo-card { display: block; color: inherit; text-decoration: none; }
.ipo-card-top {
  display: block;
  padding: .6rem .6rem 0;
  background: var(--card-alt);
  border: 1px solid var(--line);
  border-bottom: 4px solid var(--brand);
  text-align: center;
}
.ipo-card-board { display: block; font-size: .72rem; color: var(--muted); margin-bottom: .4rem; }
.ipo-card-logo {
  display: grid;
  place-items: center;
  min-height: 84px;
  margin-bottom: .6rem;
  padding: .5rem;
  background: var(--surface);
}
.ipo-card-logo img { max-height: 60px; max-width: 100%; object-fit: contain; }
.ipo-card-name { font-weight: 800; font-size: .95rem; color: var(--text); line-height: 1.25; }
.ipo-card-t {
  display: block;
  margin-top: .55rem;
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--brand-700);
}
.ipo-card:hover .ipo-card-t { text-decoration: underline; }
.ipo-card-d { display: block; margin-top: .2rem; font-size: .78rem; color: var(--muted); }

.ipo-cards-more { margin-top: 1rem; text-align: center; }
.ipo-cards-more a { font-size: .88rem; font-weight: 700; color: var(--brand-700); }

/* ---- upcoming IPO tables ---- */
.ipo-up-sec { margin: 0 0 2.4rem; }
.ipo-up-h {
  margin: 0 0 .8rem;
  font-family: var(--display, inherit);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
}
.ipo-up-table { margin: 0; font-size: .9rem; border: 1px solid var(--line-strong); }
.ipo-up-table thead th {
  background: var(--brand-050);
  border-bottom: 1px solid var(--line-strong);
  font-size: .82rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}
.ipo-up-table tbody tr:nth-child(even) { background: var(--card-alt); }
.ipo-up-table tbody tr:hover { background: var(--brand-050); }
.ipo-up-table td { border-bottom: 1px solid var(--line); vertical-align: middle; }
.ipo-up-table .c-name a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ipo-up-table th.is-sortable { cursor: pointer; user-select: none; position: relative; padding-right: 1.4rem; }
.ipo-up-table th.is-sortable::after { content: "⇅"; position: absolute; right: .5rem; opacity: .4; font-size: .8em; }
.ipo-up-table th[aria-sort="ascending"]::after  { content: "↑"; opacity: 1; }
.ipo-up-table th[aria-sort="descending"]::after { content: "↓"; opacity: 1; }
.ipo-up-table th.is-sortable:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }

.ipo-apply { font-weight: 700; color: var(--brand-700); text-decoration: underline; text-underline-offset: 2px; }

/* toolbar under each table: export on the left, pages on the right */
.ipo-up-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: .7rem;
}
.btn-mini {
  padding: .3rem .8rem;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
}
.btn-mini:hover { border-color: var(--brand-700); color: var(--brand-700); }
.ipo-up-export { display: flex; gap: .4rem; }

.ipo-up-pager { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.ipo-up-pager button {
  min-width: 30px;
  padding: .25rem .5rem;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
}
.ipo-up-pager button:hover:not(:disabled) { border-color: var(--brand-700); color: var(--brand-700); }
.ipo-up-pager button.on {
  background: var(--brand-700);
  border-color: var(--brand-700);
  color: var(--surface);
}
.ipo-up-pager button:disabled { opacity: .4; cursor: default; }
.ipo-up-pager span { padding: 0 .2rem; color: var(--muted); }

/* ---- broker segment charge tables ---- */
.br-charge-h {
  margin: 1.6rem 0 .4rem;
  font-family: var(--display, inherit);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}
.br-charge-h:first-of-type { margin-top: .8rem; }

.br-charge-table { font-size: .87rem; }
.br-charge-table thead th {
  background: var(--brand-050);
  font-size: .8rem;
  font-weight: 800;
  color: var(--text);
}
/* The label column is the row's key — it should read as a heading, and it is
   what a reader scans down when comparing two segments. */
.br-charge-table .br-charge-k { font-weight: 700; color: var(--text); width: 26%; }
.br-charge-table td { vertical-align: top; line-height: 1.45; }
.br-charge-table tbody tr:nth-child(even) { background: var(--card-alt); }

.br-fee-list { margin: .5rem 0 1rem; padding-left: 1.15rem; font-size: .88rem; line-height: 1.6; }
.br-fee-list li { margin-bottom: .45rem; }
.br-fee-list strong { color: var(--text); }

/* Hidden charges / PIN codes / short selling — numbered, because each item is a
   discrete thing to check rather than prose. */
.br-hidden-list { margin: .5rem 0 1rem; padding-left: 1.3rem; font-size: .88rem; line-height: 1.6; }
.br-hidden-list li { margin-bottom: .45rem; }
.br-hidden-list li::marker { color: var(--brand-700); font-weight: 700; }

/* ---- GMP trend dots ---- */
.gmp-dot {
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  vertical-align: -1px;
}
/* Status colours, not brand colours: green/amber/red must keep meaning
   whatever the palette is set to. Each also carries a title + aria-label, so
   the meaning is never conveyed by colour alone. */
.gmp-up   { background: var(--success); }
.gmp-dn   { background: var(--danger); }
.gmp-flat { background: #e0a80d; }

.gmp-legend {
  margin: .2rem 0 2rem;
  font-size: .85rem;
  color: var(--muted);
}
.gmp-legend .gmp-dot { margin-right: .2rem; }

.gmp-gain { font-size: .85em; color: var(--muted); }
.gmp-gain.up { color: var(--success); }
.gmp-gain.dn { color: var(--danger); }
.ipo-gmp-table .c-trend { text-align: center; }

/* ---- Important Notice / disclaimer block ---- */
.ipo-disclaimer {
  margin-top: 2.4rem;
  padding: 1.3rem 1.4rem;
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--danger);
  background: var(--card-alt);
}
.ipo-disclaimer-h {
  margin: 0 0 .7rem;
  font-family: var(--display, inherit);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--danger);
}
.ipo-disclaimer-body { font-size: .9rem; color: var(--text); }
.ipo-disclaimer-body p { margin-bottom: .7rem; }
.ipo-disclaimer-body ul { margin: 0 0 .5rem; padding-left: 1.2rem; }
.ipo-disclaimer-body li { margin-bottom: .45rem; line-height: 1.55; }
.ipo-disclaimer-body li::marker { color: var(--brand-700); }

/* Printing one table: hide the rest of the page so the PDF is just the table. */
@media print {
  body.printing-table .site-header,
  body.printing-table .site-footer,
  body.printing-table .article-hero,
  body.printing-table .ipo-cards-sec,
  body.printing-table .ipo-xlinks,
  body.printing-table .ipo-up-tools,
  body.printing-table .ipo-up-sec:not(.print-me) { display: none !important; }
  body.printing-table .ipo-up-table { border: 1px solid #000; }
}

@media (max-width: 575.98px) {
  .ipo-xgrid { grid-template-columns: 1fr; }
  .ipo-boards { grid-template-columns: 1fr; gap: 1rem; }
  .ipo-cards { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}


/* ==========================================================================
   10. FOOTER LOGO — render the brand mark in solid white
   ========================================================================== */

/* Applied ONLY when the footer is falling back to the main site logo, which is
   drawn for a light header — its near-black wordmark disappears on the dark
   footer. brightness(0) crushes every pixel to black whatever colour it started
   as, then invert(1) flips that to white, recolouring the artwork without
   needing a second file. Transparency is untouched.

   A logo uploaded to Settings -> Social & Footer -> Footer Logo does NOT get
   this class, so it renders exactly as supplied. */
body.site-shell .footer-image.is-auto-white {
  filter: brightness(0) invert(1);
}

/* A logo is the one image a visitor should still recognise in forced-colours
   mode, and filters are ignored there anyway — so opt out cleanly. */
@media (forced-colors: active) {
  body.site-shell .footer-image.is-auto-white { filter: none; }
}


/* ==========================================================================
   12. BROKER REVIEW — the single long-read page

   The review page is now one continuous document instead of a stack of equal
   cards, so its headings and lists need their own rhythm: h3 rules separate
   the sections, and every list shares one bullet style so the page does not
   read as six different components glued together.
   ========================================================================== */

body.site-shell .br-review { padding-bottom: .4rem; }

/* Section heading inside the long card. Same weight as .br-charge-h (which it
   supersedes) but with a hairline above, because there is no card edge left to
   mark where one section stops and the next begins. */
body.site-shell .br-review .br-h {
  margin: 1.9rem 0 .5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-family: var(--display, inherit);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text);
}
/* The first heading follows the intro prose, which already ends in whitespace. */
body.site-shell .br-review .br-h:first-of-type { margin-top: 1rem; }

/* "Here are the key strengths of X:" — a lead-in sentence owned by the list
   below it, so it sits tight against that list rather than floating. */
body.site-shell .br-review .br-lead {
  margin: 1.1rem 0 .4rem;
  font-weight: 600;
  color: var(--text);
}

body.site-shell .br-review .br-bullets {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
  font-size: .9rem;
  line-height: 1.65;
}
body.site-shell .br-review .br-bullets li { margin-bottom: .4rem; }
body.site-shell .br-review .br-bullets li::marker { color: var(--brand); }
body.site-shell .br-review .br-bullets strong { color: var(--text); }

/* Intro prose sets the page's voice; slightly larger than the body copy that
   follows so the reader starts in the right register. */
body.site-shell .br-review .br-intro {
  font-size: .95rem;
  line-height: 1.75;
}
body.site-shell .br-review .br-intro > *:last-child { margin-bottom: 0; }

/* Each platform is a name plus a paragraph, so the number has to align to the
   name and the paragraph has to hang under it, not restart at the margin. */
body.site-shell .br-review .br-platform-list {
  margin: .6rem 0 1rem;
  padding-left: 1.3rem;
  line-height: 1.6;
}
body.site-shell .br-review .br-platform-list > li { margin-bottom: .75rem; }
body.site-shell .br-review .br-platform-list > li::marker {
  color: var(--brand-700);
  font-weight: 700;
}
body.site-shell .br-review .br-platform-list strong {
  display: block;
  color: var(--text);
  font-size: .95rem;
}
body.site-shell .br-review .br-platform-list p {
  margin: .25rem 0 0;
  font-size: .88rem;
  color: var(--muted);
}

/* Ratings: no header row, so the overall score has to carry the emphasis by
   itself — it gets the tinted band and a larger figure. */
.br-rating-table tbody tr.br-rating-top {
  background: var(--brand-050);
}
.br-rating-table tbody tr.br-rating-top td { font-size: .98rem; }
.br-rating-table td { vertical-align: middle; }
.br-rating-table .br-stars { margin-right: .45rem; }

/* An unfilled figure in the SEBI table — present, but visibly not a value. */
.br-review .tba { color: var(--muted2); }

/* A numbered step inside a section ("1. Online account opening"). Smaller than
   .br-h and with no rule, so the reader can see it belongs to the heading
   above rather than starting a new section. */
body.site-shell .br-sub {
  margin: 1.35rem 0 .4rem;
  font-family: var(--display, inherit);
  font-size: .97rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
}
body.site-shell .br-review .br-sub:first-child { margin-top: .4rem; }

/* Prose blocks between tables come from the rich editor, so they arrive with
   their own <p> margins — collapse the trailing one against the table below. */
body.site-shell .br-review .prose { font-size: .92rem; line-height: 1.7; }
body.site-shell .br-review .prose > *:last-child { margin-bottom: .6rem; }

/* A rate cell holding a per-segment list (STT has nine) sits inside a table
   cell, so it must not carry the standalone list's top and bottom margins. */
.ipo-table .br-bullets { margin: 0; padding-left: 1.05rem; font-size: .87rem; }
.ipo-table .br-bullets li { margin-bottom: .2rem; }


/* ==========================================================================
   13. PAGE HEROES — per-page lede and stat strip

   Each templated page's hero now carries copy written from that page's own
   data (App\Libraries\HeroCopy). The lede used to be an inline-styled <p>; it
   is a class so the colour follows the hero's on-dark token instead of a
   hard-coded hex.
   ========================================================================== */

body.site-shell .br-hero-lede {
  color: var(--on-dark-muted, #c7d7ee);
  max-width: 62ch;
  line-height: 1.6;
}

/* A row of three or four figures under a hero lede — today's price, the day's
   move, the ten-day range. Numbers first, labels small, so the strip reads at
   a glance and never competes with the H1. */
body.site-shell .hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .6rem;
  margin-top: 1rem;
  padding: 0;
  list-style: none;
}
body.site-shell .hero-stats li {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  min-width: 8.5rem;
  padding: .55rem .8rem;
  border: 1px solid color-mix(in srgb, var(--on-dark, #fff) 18%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--on-dark, #fff) 6%, transparent);
}
body.site-shell .hero-stats b {
  color: var(--on-dark, #fff);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}
body.site-shell .hero-stats span {
  color: var(--on-dark-muted, #c7d7ee);
  font-size: .74rem;
  letter-spacing: .02em;
  text-transform: uppercase;
}
@media (max-width: 575.98px) {
  body.site-shell .hero-stats li { min-width: calc(50% - .3rem); flex: 1 1 calc(50% - .3rem); }
}


/* ==========================================================================
   14. DISCLAIMER POPUP — first-visit notice (partials/disclaimer.php)

   A blocking modal the visitor has to acknowledge. It sits above everything,
   including the marketing popup (1080), which waits for it to be accepted.
   Every colour comes from the palette tokens so it follows the site theme.
   ========================================================================== */

.dsc-ov {
  position: fixed;
  inset: 0;
  z-index: 1090;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: color-mix(in srgb, var(--ink, #0f1b24) 62%, transparent);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .22s ease;
}
.dsc-ov[hidden] { display: none; }
.dsc-ov.on { opacity: 1; }

.dsc-box {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 500px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  border-radius: 14px;
  background: var(--card, #fff);
  color: var(--text, #1d2733);
  box-shadow: 0 24px 60px color-mix(in srgb, var(--ink, #0f1b24) 35%, transparent);
  transform: translateY(12px) scale(.98);
  transition: transform .22s ease;
}
.dsc-ov.on .dsc-box { transform: none; }

/* The grey band that fades into the card, behind the icon and heading. */
.dsc-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.25rem .55rem;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--ink, #0f1b24) 16%, var(--card, #fff)) 0%,
    var(--card, #fff) 100%);
}
.dsc-icon { flex: 0 0 auto; }
body.site-shell .dsc-title {
  margin: 0;
  font-family: var(--display, inherit);
  font-size: clamp(1.15rem, 1rem + .5vw, 1.35rem);
  font-weight: 800;
  line-height: 1.2;
  color: color-mix(in srgb, var(--danger, #d11f42) 78%, var(--ink, #0f1b24));
}

/* Body and small print scroll together if a long notice outgrows a phone. */
.dsc-scroll {
  overflow-y: auto;
  padding: .2rem 1.25rem 0;
  overscroll-behavior: contain;
}

body.site-shell .dsc-body {
  font-size: .9rem;
  line-height: 1.55;
}
body.site-shell .dsc-body p { margin: 0 0 .65rem; }
body.site-shell .dsc-body strong { color: var(--text, #1d2733); font-weight: 700; }

/* Each list item gets a green tick box, so admins write a plain bullet list. */
body.site-shell .dsc-body ul {
  list-style: none;
  margin: 0 0 .65rem;
  padding: 0 0 0 .4rem;
}
body.site-shell .dsc-body ul li {
  position: relative;
  margin: 0 0 .4rem;
  padding-left: 1.6rem;
}
body.site-shell .dsc-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .2em;
  width: 1.1em;
  height: 1.1em;
  border-radius: 4px;
  background: var(--success, #0e8641)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E")
    center / 74% no-repeat;
}
body.site-shell .dsc-body ol { margin: 0 0 .65rem; padding-left: 1.3rem; }

/* Small print — under a rule, smaller and quieter, as a footnote should be. */
body.site-shell .dsc-note {
  margin-top: .15rem;
  padding: .6rem 0 .1rem;
  border-top: 1px solid var(--line, #e4e9f0);
  font-size: .76rem;
  line-height: 1.5;
  color: var(--muted, #5b6776);
}
body.site-shell .dsc-note p { margin: 0 0 .45rem; }
body.site-shell .dsc-note strong { color: var(--text, #1d2733); }

.dsc-foot {
  display: flex;
  justify-content: flex-end;
  padding: .7rem 1.25rem .85rem;
  border-top: 1px solid var(--line, #e4e9f0);
}
body.site-shell .dsc-btn {
  min-width: 9rem;
  padding: .55rem 1.2rem;
  border: 0;
  border-radius: 8px;
  background: var(--brand, #0f8743);
  color: var(--on-dark, #fff);
  font-weight: 700;
  font-size: .92rem;
  cursor: pointer;
  transition: filter .15s ease, box-shadow .15s ease;
}
body.site-shell .dsc-btn:hover { filter: brightness(1.08); }
body.site-shell .dsc-btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand, #0f8743) 45%, transparent);
  outline-offset: 2px;
}

@media (max-width: 575.98px) {
  .dsc-head { padding: .75rem 1rem .5rem; }
  .dsc-scroll { padding: .2rem 1rem 0; }
  .dsc-foot { padding: .65rem 1rem .8rem; }
  body.site-shell .dsc-body { font-size: .88rem; }
  body.site-shell .dsc-body ul { padding-left: 0; }
  body.site-shell .dsc-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .dsc-ov, .dsc-box { transition: none; }
  .dsc-box { transform: none; }
}

/* ==========================================================================
   15. METAL RATE MOVES — calendar, change chips, chart trend

   One colour rule everywhere a price move is shown: rose = green, fell = red,
   unchanged = black. It applies to the card chips, the per-weight tables, the
   last-10-days table and the chart, which is coloured by the move across the
   range on screen instead of the old fixed (near-black) brand line.
   ========================================================================== */

/* Change chips on the price cards ------------------------------------------ */
body.site-shell .gr-chip {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  padding: .22rem .55rem;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
}
body.site-shell .gr-chip.up {
  color: var(--success, #0e8641);
  background: color-mix(in srgb, var(--success, #0e8641) 12%, var(--card, #fff));
}
body.site-shell .gr-chip.dn {
  color: var(--danger, #d11f42);
  background: color-mix(in srgb, var(--danger, #d11f42) 10%, var(--card, #fff));
}
body.site-shell .gr-chip.flat {
  color: var(--text, #1d2733);
  background: var(--card-alt, #f3f5f7);
}

/* Calendar in the rate card header ----------------------------------------- */
.rate-date {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem .6rem;
}
.rate-date-l {
  margin: 0;
  color: var(--muted, #5b6776);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.rate-date-field {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.rate-date-field svg {
  position: absolute;
  z-index: 2; /* above the positioned input, whose background would hide it */
  left: .65rem;
  color: var(--brand, #0f8743);
  pointer-events: none;
}
body.site-shell .rate-date-field input[type="date"] {
  position: relative;
  min-height: 38px;
  padding: .35rem .7rem .35rem 2.1rem;
  border: 1px solid var(--line-strong, #c9d2cc);
  border-radius: 8px;
  background: var(--card, #fff);
  color: var(--text, #1d2733);
  font: inherit;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
}
body.site-shell .rate-date-field input[type="date"]:hover { border-color: var(--brand, #0f8743); }
body.site-shell .rate-date-field input[type="date"]:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand, #0f8743) 35%, transparent);
  outline-offset: 1px;
  border-color: var(--brand, #0f8743);
}
/* Make the whole field open the calendar in Chromium, and drop its own icon
   (ours sits on the left). Other browsers open the picker from the field. */
body.site-shell .rate-date-field input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  opacity: 0;
  cursor: pointer;
}
body.site-shell .rate-date-latest {
  padding: .3rem .7rem;
  border: 1px solid var(--line, #e4e9f0);
  border-radius: 8px;
  background: var(--card-alt, #f3f5f7);
  color: var(--text, #1d2733);
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
}
body.site-shell .rate-date-latest:hover { border-color: var(--brand, #0f8743); color: var(--brand, #0f8743); }

.rate-date-msg {
  margin: .75rem 0 0;
  color: var(--muted, #5b6776);
  font-size: .82rem;
}
.rate-date-msg.is-bad { color: var(--danger, #d11f42); }

[data-rate-body] { transition: opacity .15s ease; }
[data-rate-body].is-loading { opacity: .45; pointer-events: none; }

/* Chart coloured by trend --------------------------------------------------- */
body.site-shell .gold-chart { --gc-trend: var(--muted2, #6b7789); }
body.site-shell .gold-chart.is-up   { --gc-trend: var(--success, #0e8641); }
body.site-shell .gold-chart.is-down { --gc-trend: var(--danger, #d11f42); }
body.site-shell .gold-chart .gc-line { stroke: var(--gc-trend); stroke-width: 2.2; }
body.site-shell .gold-chart .gc-stop { stop-color: var(--gc-trend); }
body.site-shell .gold-chart .gc-dot  { stroke: var(--gc-trend); }

body.site-shell .gc-trend {
  padding: .22rem .6rem;
  font-size: .78rem;
  font-weight: 800;
  white-space: nowrap;
}
body.site-shell .gc-trend:empty { display: none; }
body.site-shell .gc-trend.is-up {
  color: var(--success, #0e8641);
  background: color-mix(in srgb, var(--success, #0e8641) 12%, var(--card, #fff));
}
body.site-shell .gc-trend.is-down {
  color: var(--danger, #d11f42);
  background: color-mix(in srgb, var(--danger, #d11f42) 10%, var(--card, #fff));
}
/* The status green and red on their own pale tint measure 3.9–4.5:1 at this
   small size, under WCAG AA; a deeper shade of each reaches about 5.6:1 and
   still reads as up / down. */
body.site-shell .gr-chip.up,
body.site-shell .gc-trend.is-up { color: #0a6b33; }
body.site-shell .gr-chip.dn,
body.site-shell .gc-trend.is-down { color: #b3123a; }
body.site-shell .gc-trend.is-flat {
  color: var(--text, #1d2733);
  background: var(--card-alt, #f3f5f7);
}

@media (max-width: 575.98px) {
  .rate-date { width: 100%; }
  .rate-date-field, body.site-shell .rate-date-field input[type="date"] { flex: 1; width: 100%; }
}

/* ==========================================================================
   16. CALCULATOR EXTRAS — comparison bars, charts, schedule tables, hints

   Everything the newer calculators add on top of the headline result: a
   "which is better" bar pair inside the dark result panel, and a full-width
   area under the form for a chart and/or a year-wise table. The extra area
   spans both grid columns of .calc-tool.
   ========================================================================== */
body.site-shell .calc-field[hidden] { display: none; }
body.site-shell .cf-hint { display: block; margin-top: 4px; font-size: .74rem; line-height: 1.35; color: var(--muted); }
body.site-shell .calc-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: .55rem .7rem;
  font: 600 .9rem/1.45 inherit;
  color: var(--ink);
  resize: vertical;
}
body.site-shell .calc-field textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent); }
body.site-shell .calc-field input[type="date"] { border: 0; outline: 0; padding: .55rem .7rem; font-weight: 600; width: 100%; background: transparent; color: var(--ink); }

/* The tool's two columns may never grow past their share: a wide input row
   used to stretch the form column and push the result panel off the card. */
body.site-shell .calc-tool { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
body.site-shell .calc-form,
body.site-shell .calc-result { min-width: 0; }
body.site-shell .calc-wide { grid-column: 1 / -1; min-width: 0; }
@media (max-width: 720px) {
  body.site-shell .calc-tool { grid-template-columns: minmax(0, 1fr); }
}

/* Repeat rows: a grid of equal cells + the remove button. --rc = columns. */
body.site-shell .calc-rep-cols,
body.site-shell .calc-rep-row {
  display: grid;
  grid-template-columns: repeat(var(--rc, 2), minmax(0, 1fr)) 34px;
  gap: 8px;
}
body.site-shell .calc-rep-cols { margin: 0 0 4px; font-size: .7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
body.site-shell .calc-rep-cols span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.site-shell .calc-rep-row { margin-bottom: 8px; align-items: end; }
body.site-shell .calc-rep-row .rc { display: block; min-width: 0; margin: 0; }
body.site-shell .calc-rep-row .rc-l { display: none; }
body.site-shell .calc-rep-row input,
body.site-shell .calc-rep-row select {
  display: block;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .45rem .5rem;
  font-size: .88rem;
  background: #fff;
}
body.site-shell .calc-rep-row .calc-rep-del { height: 36px; }

/* Phones: wide rows stack into a small card with a caption on each cell. */
@media (max-width: 575.98px) {
  body.site-shell .calc-rep.is-wide .calc-rep-cols { display: none; }
  body.site-shell .calc-rep.is-wide .calc-rep-row {
    position: relative;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px 44px 10px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--card-alt, #f6f8f9);
  }
  body.site-shell .calc-rep.is-wide .rc-l { display: block; margin-bottom: 3px; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
  body.site-shell .calc-rep.is-wide .calc-rep-del { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; }
}

/* A vs B bars inside the dark result panel */
.calc-cmp { margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, .18); }
.calc-cmp-t { font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--surface); opacity: .8; margin-bottom: 8px; }
.calc-cmp-row + .calc-cmp-row { margin-top: 9px; }
.calc-cmp-l { display: flex; justify-content: space-between; gap: 10px; font-size: .84rem; margin-bottom: 4px; }
.calc-cmp-l span { color: var(--surface); }
.calc-cmp-l em { font-style: normal; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: .1rem .4rem; margin-left: 4px; background: var(--accent, #037c2f); color: #fff; vertical-align: 1px; }
.calc-cmp-l b { font-weight: 800; white-space: nowrap; }
.calc-cmp-bar { height: 8px; background: rgba(255, 255, 255, .12); border-radius: 10px; overflow: hidden; }
.calc-cmp-bar i { display: block; height: 100%; border-radius: 10px; background: rgba(255, 255, 255, .55); }
.calc-cmp-row.is-best .calc-cmp-bar i { background: var(--accent, #f4b400); }
.calc-cmp-row.is-neg .calc-cmp-bar i { background: #ff9db0; }

/* Full-width area under the form */
.calc-extra { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.calc-extra[hidden] { display: none; }
.calc-x { border: 1px solid var(--line); background: #fff; padding: 14px 14px 10px; min-width: 0; }
.calc-x-h { font-weight: 800; font-size: .95rem; color: var(--ink); margin-bottom: 10px; }

.calc-chart svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.calc-chart .cc-grid { stroke: var(--line); stroke-width: 1; }
.calc-chart .cc-zero { stroke: var(--ink, #14282b); stroke-width: 1.2; opacity: .55; }
.calc-chart .cc-mark { stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 4 4; }
.calc-chart text { font-size: 11px; fill: var(--muted); }
.calc-chart .cc-y { text-anchor: end; }
.calc-chart .cc-x { text-anchor: middle; }
.calc-chart .cc-line { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.calc-chart .cc-line.is-dash { stroke-dasharray: 6 5; }
.calc-chart .cc-line.cs0 { stroke: #94a3b8; }
.calc-chart .cc-line.cs1 { stroke: var(--brand, #155c55); }
.calc-chart .cc-line.cs2 { stroke: #d97706; }
.calc-chart .cc-line.cs3 { stroke: #7c3aed; }
.calc-chart rect.cs0 { fill: var(--brand, #155c55); }
.calc-chart rect.cs1 { fill: #f59e0b; }
.calc-chart rect.cs2 { fill: #94a3b8; }
.calc-chart .cc-up { fill: rgba(14, 134, 65, .16); }
.calc-chart .cc-dn { fill: rgba(209, 31, 66, .14); }
.calc-chart .cc-pl { fill: none; stroke: var(--ink, #14282b); stroke-width: 2.2; stroke-linejoin: round; }
.calc-lg { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; font-size: .78rem; color: var(--muted); }
.calc-lg i { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; }
.calc-lg i.cs0 { background: #94a3b8; }
.calc-lg i.cs1 { background: var(--brand, #155c55); }
.calc-lg i.cs2 { background: #d97706; }
.calc-lg i.cs3 { background: #7c3aed; }
.calc-chart svg:has(rect) ~ .calc-lg i.cs0 { background: var(--brand, #155c55); }
.calc-chart svg:has(rect) ~ .calc-lg i.cs1 { background: #f59e0b; }
.calc-lg i.lg-up { background: rgba(14, 134, 65, .45); }
.calc-lg i.lg-dn { background: rgba(209, 31, 66, .4); }
.calc-lg i.lg-mark { height: 0; border-top: 2px dashed var(--muted); vertical-align: 3px; }

.calc-tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.calc-tbl { width: 100%; border-collapse: collapse; font-size: .86rem; font-variant-numeric: tabular-nums; }
.calc-tbl th { text-align: right; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); padding: .45rem .6rem; border-bottom: 2px solid var(--line); white-space: nowrap; background: var(--card-alt, #f6f8f9); }
.calc-tbl td { text-align: right; padding: .42rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap; color: var(--ink); }
.calc-tbl th:first-child, .calc-tbl td:first-child { text-align: left; }
.calc-tbl tr.is-hl td { font-weight: 800; background: color-mix(in srgb, var(--accent, #f4b400) 14%, #fff); }
.calc-tbl-more { margin-top: 8px; border: 0; background: none; padding: .2rem 0; font-weight: 700; font-size: .84rem; color: var(--brand); cursor: pointer; }
.calc-tbl-more:hover { text-decoration: underline; }

@media (max-width: 575.98px) {
  .calc-x { padding: 12px 10px 8px; }
  .calc-tbl { font-size: .8rem; }
  .calc-tbl th, .calc-tbl td { padding: .38rem .45rem; }
}

/* ==========================================================================
   17. CALCULATOR DISCLAIMER — under every calculator and on the archive

   Amber-edged notice so it reads as a warning without shouting. Regulator
   notices (SEBI, AMFI, IRDAI…) each get a small caps label; the general
   disclaimer follows in lighter, smaller print.
   ========================================================================== */
body.site-shell .calc-disc {
  margin-top: 1rem;
  padding: 16px 18px;
  border: 1px solid #f1d9a8;
  border-left: 4px solid #d97706;
  background: #fffaf0;
  color: var(--text, #1d2733);
  font-size: .85rem;
  line-height: 1.55;
}
body.site-shell .cx-archive .calc-disc { margin: 1.5rem 0; }
body.site-shell .calc-disc-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: #b45309; }
body.site-shell .calc-disc-h h2 { margin: 0; font-size: 1rem; font-weight: 800; color: var(--ink, #14282b); }
body.site-shell .calc-disc-item { padding: 9px 0; border-top: 1px dashed #efd9ad; }
body.site-shell .calc-disc-item:first-of-type { border-top: 0; padding-top: 2px; }
body.site-shell .calc-disc-l { margin-bottom: 3px; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #92400e; }
body.site-shell .calc-disc p { margin: 0 0 .45rem; }
body.site-shell .calc-disc p:last-child { margin-bottom: 0; }
body.site-shell .calc-disc ul { margin: .2rem 0 .45rem; padding-left: 1.15rem; }
body.site-shell .calc-disc li { margin-bottom: .2rem; }
body.site-shell .calc-disc-gen { padding-top: 9px; border-top: 1px dashed #efd9ad; font-size: .79rem; color: var(--muted, #5b6770); }
body.site-shell .calc-disc-h + .calc-disc-gen { border-top: 0; padding-top: 0; }
/* ==========================================================================
   18. FOOTER — kept on the previous dark tone

   The footer took its colour from the brand shade (--brand-700); once the
   brand became the logo green it turned solid green. It stays on the dark
   teal-black it had before (--dark-panel, set in partials/palette.php).
   ========================================================================== */
body.site-shell .site-footer { background: var(--dark-panel, #14282b); }

/* ==========================================================================
   20. HEROES — one light design on every page

   Every page hero uses the same look: a near-white gradient, near-black
   breadcrumb and title, dark body text and a thick grey rule underneath.
   Several heroes (home, broker list/review, compare, IPO, metal rates) were
   built as dark bands, with white text and translucent dark boxes inside;
   those inner pieces are re-coloured below for the light background.
   ========================================================================== */
body.site-shell .article-hero,
body.site-shell .portal-home .portal-hero,
body.site-shell .cmp-directory-hero,
body.site-shell .cmp-report-hero,
body.site-shell .gmp-hero,
body.site-shell .hero {
  background: linear-gradient(115deg, var(--card) 0%, var(--card-alt) 100%);
  color: var(--ink);
  border-top: 0;
  border-bottom: 5px solid var(--line-strong);
}
body.site-shell .article-hero::after,
body.site-shell .portal-home .portal-hero::after,
body.site-shell .cmp-directory-hero::after,
body.site-shell .cmp-report-hero::after { display: none; }

body.site-shell :is(.article-hero, .portal-hero, .cmp-directory-hero, .cmp-report-hero, .gmp-hero, .hero) :is(h1, h2, h3) { color: var(--ink); }
body.site-shell :is(.article-hero, .portal-hero, .cmp-directory-hero, .cmp-report-hero, .gmp-hero, .hero) .breadcrumb-nav,
body.site-shell :is(.article-hero, .portal-hero, .cmp-directory-hero, .cmp-report-hero, .gmp-hero, .hero) .breadcrumb-nav :is(a, span, li) { color: var(--ink); }
body.site-shell :is(.article-hero, .portal-hero, .cmp-directory-hero, .cmp-report-hero, .gmp-hero, .hero) :is(.ah-lede, .ah-meta, p) { color: var(--text); }
/* ==========================================================================
   19. BUTTON HOVER STATES — background and label always change together

   The theme sets each button's resting background at 0,2,1
   (`body.site-shell .btn-brand`), which outranks every :hover background rule
   (0,2,0), while `body.site-shell .btn:hover { color:#fff }` and
   `a.btn:hover { color: var(--bs-btn-hover-color) }` DO change the label. So on
   hover the box kept its colour and only the text changed: dark text on the
   dark brand button, white text on the light accent button — unreadable.
   These rules state both halves at 0,4,1 so they win together. The lift and
   offset shadow from the theme's hover stay as they are.
   ========================================================================== */
body.site-shell .btn.btn-brand:is(:hover, :focus-visible, :active) {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
body.site-shell .btn.btn-accent:is(:hover, :focus-visible, :active) {
  background: var(--accent-600);
  border-color: var(--accent-600);
  color: var(--on-accent, #fff);
}
/* ---- 20b. Inner pieces of the former dark heroes -------------------------
   Written with a repeated-class prefix (P = html body.site-shell ×4) so they
   outrank the theme's own hero rules without resorting to !important.
   Light-green accent text (built for dark bands) becomes the brand green,
   white text becomes ink, and the translucent dark boxes become white cards. */
html body.site-shell.site-shell.site-shell.site-shell :is(.article-hero, .portal-hero, .cmp-directory-hero, .cmp-report-hero) h1,
html body.site-shell.site-shell.site-shell.site-shell :is(.article-hero, .portal-hero, .cmp-directory-hero, .cmp-report-hero) .breadcrumb-nav a,
html body.site-shell.site-shell.site-shell.site-shell .portal-hero .portal-crumb,
html body.site-shell.site-shell.site-shell.site-shell .portal-hero .portal-crumb a,
html body.site-shell.site-shell.site-shell.site-shell .portal-hero .portal-text-link,
html body.site-shell.site-shell.site-shell.site-shell .cmp-breadcrumb a { color: var(--ink); }

html body.site-shell.site-shell.site-shell.site-shell :is(.article-hero, .portal-hero, .cmp-directory-hero, .cmp-report-hero) :is(.bc-current, .ah-lede, .br-hero-lede, .ah-meta, .ah-item, .ah-item time, .ah-by, .ah-by a),
html body.site-shell.site-shell.site-shell.site-shell .market-archive-hero p,
html body.site-shell.site-shell.site-shell.site-shell .portal-hero .portal-trust-list span,
html body.site-shell.site-shell.site-shell.site-shell .cmp-report-hero :is(.cmp-report-copy p, .cmp-report-tags span),
html body.site-shell.site-shell.site-shell.site-shell .cmp-directory-hero .cmp-directory-facts span { color: var(--text); }

html body.site-shell.site-shell.site-shell.site-shell .portal-hero :is(.portal-kicker, .portal-crumb span, .portal-trust-list i),
html body.site-shell.site-shell.site-shell.site-shell :is(.cmp-directory-hero, .cmp-report-hero) :is(.cmp-eyebrow, h1 em, .cmp-directory-facts b),
html body.site-shell.site-shell.site-shell.site-shell .cmp-breadcrumb span { color: var(--brand); }
html body.site-shell.site-shell.site-shell.site-shell .cmp-breadcrumb span { color: var(--muted); }

/* Boxes that were translucent dark panels */
html body.site-shell.site-shell.site-shell.site-shell :is(.article-hero, .cmp-report-hero) :is(.br-chip, .br-ratebadge, .br-hero-snapshot, .cmp-battleboard),
html body.site-shell.site-shell.site-shell.site-shell .cmp-report-hero .cmp-report-tags span,
html body.site-shell.site-shell.site-shell.site-shell .article-hero .hero-stats li {
  background: var(--card);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  box-shadow: none;
}
/* IPO stats: each figure is its own white box; the strip around them is just
   a row — no frame or fill, so no empty bordered area trails off to the right. */
html body.site-shell.site-shell.site-shell.site-shell .article-hero .ipo-stat-strip {
  background: transparent;
  border: 0;
  box-shadow: none;
}
html body.site-shell.site-shell.site-shell.site-shell .article-hero .ipo-stat-strip .s {
  background: var(--card);
  border: 1px solid var(--line-strong);
  color: var(--ink);
}
html body.site-shell.site-shell.site-shell.site-shell .article-hero .br-hero-facts > div {
  background: var(--card-alt);
  border: 1px solid var(--line);
}
html body.site-shell.site-shell.site-shell.site-shell :is(.article-hero, .cmp-report-hero) :is(.br-chip b, .br-ratebadge .score, .br-ratebadge .meta b, .br-hero-snapshot h2, .br-hero-snapshot-head span, .br-hero-facts dd, .cmp-battle-broker strong, .hero-stats b, .ipo-stat-strip b, .ipo-stat-strip strong) { color: var(--ink); }
html body.site-shell.site-shell.site-shell.site-shell :is(.article-hero, .cmp-report-hero) :is(.br-chip, .br-ratebadge .score small, .br-ratebadge .meta, .br-hero-facts dt, .br-hero-exchanges, .br-hero-exchanges span, .cmp-battle-broker small, .hero-stats span, .ipo-stat-strip span, .ipo-stat-strip small) { color: var(--muted); }
html body.site-shell.site-shell.site-shell.site-shell .article-hero .br-hero-snapshot-head .br-verified {
  background: var(--brand-050);
  border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent);
  color: var(--brand-700);
}
/* Light buttons: the theme's `body.site-shell .btn:hover { color:#fff }` would
   turn their label white on a light fill, so they get their own hover too. */
body.site-shell .btn.btn-light:is(:hover, :focus-visible, :active) {
  background: var(--card-alt);
  border-color: var(--line-strong);
  color: var(--ink);
}

/* ==========================================================================
   21. AUTHORS — /author directory and the author profile header
   ========================================================================== */
body.site-shell .au-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
body.site-shell .au-card {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  padding: 1.35rem;
  border: 1px solid var(--line-strong);
  border-top: 4px solid var(--brand);
  background: var(--card);
}
body.site-shell .au-head { display: flex; align-items: center; gap: .9rem; color: inherit; text-decoration: none; }
body.site-shell .au-head:hover .au-name { color: var(--brand); }
body.site-shell .au-av {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line-strong);
  background: var(--card);
}
body.site-shell .au-av-lg { width: 96px; height: 96px; }
body.site-shell .au-av-initials {
  display: grid;
  place-items: center;
  background: var(--brand-050);
  border-color: color-mix(in srgb, var(--brand) 35%, transparent);
  color: var(--brand-700);
  font-family: var(--display, inherit);
  font-size: 1.5rem;
  font-weight: 800;
}
body.site-shell .au-av-lg.au-av-initials { font-size: 2rem; }
body.site-shell .au-id { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
body.site-shell .au-name { font-family: var(--display, inherit); font-size: 1.15rem; font-weight: 800; line-height: 1.2; color: var(--ink); }
body.site-shell .au-role { font-size: .82rem; font-weight: 700; color: var(--brand-700); }
body.site-shell .au-bio { margin: 0; font-size: .9rem; line-height: 1.6; color: var(--text); }
body.site-shell .au-stats { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
body.site-shell .au-stats li {
  padding: .25rem .6rem;
  border: 1px solid var(--line);
  background: var(--card-alt);
  font-size: .78rem;
  color: var(--text);
}
body.site-shell .au-stats b { color: var(--ink); font-weight: 800; }
body.site-shell .au-stats a { color: inherit; text-decoration: none; }
body.site-shell .au-stats a:hover b { color: var(--brand); }
body.site-shell .au-stats-inline { margin-top: .55rem; }
body.site-shell .au-link { margin-top: auto; font-size: .82rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--brand-700); text-decoration: none; }
body.site-shell .au-link:hover { color: var(--brand); }
body.site-shell .au-note { margin: 2rem 0 0; font-size: .88rem; color: var(--muted); }
body.site-shell .au-directory .au-note a { color: var(--brand-700); font-weight: 700; }
/* ==========================================================================
   22. HOME — "Popular research" side panel

   The panel's rules were written for a dark box (white text, white-tinted
   dividers) but its background is white, so the whole panel read white on
   white. It is styled here as a light card to match the rest of the page.
   ========================================================================== */
body.site-shell .portal-home .portal-side-panel { background: var(--card); color: var(--ink); }
body.site-shell .portal-home .portal-side-panel-head { border-bottom-color: var(--line); color: var(--ink); }
body.site-shell .portal-home .portal-side-panel-head span:last-child,
body.site-shell .portal-home .portal-side-panel b { color: var(--brand); }
body.site-shell .portal-home .portal-side-panel > a { border-bottom-color: var(--line); color: var(--ink); }
body.site-shell .portal-home .portal-side-panel > a:hover { background: var(--brand-050); color: var(--brand-700); }
/* ==========================================================================
   23. HOME PAGE HEADINGS — one clear scale

   The home H2s had drifted to three different sizes (37.6px, 28px, 26.4px on
   desktop) depending on which section template they sat in. Every H2 on the
   home page now shares one size, and the H1 is set clearly larger than all of
   them. Written with the repeated-class prefix so it outranks each section's
   own heading rule.
   ========================================================================== */
html body.site-shell.site-shell.site-shell.site-shell .portal-home .portal-hero h1 {
  font-size: clamp(2.35rem, 1rem + 3.3vw, 3.5rem);    /* 38px phone → 56px desktop */
  line-height: 1.02;
  letter-spacing: -.04em;
  font-weight: 800;
}
html body.site-shell.site-shell.site-shell.site-shell .portal-home h2 {
  font-size: clamp(1.75rem, 1rem + 2vw, 2.375rem);    /* 28px phone → 38px desktop */
  line-height: 1.1;
  letter-spacing: -.035em;
  font-weight: 700;
}
/* Footer call-out heading ("Make your next money move…") — a notch smaller so
   it reads as a closing line rather than competing with the page's own H1. */
html body.site-shell.site-shell.site-shell.site-shell .site-footer .footer-signal-title h2 {
  font-size: clamp(2rem, 1rem + 2.6vw, 2.75rem);      /* 32px phone → 44px desktop */
  line-height: 1.05;
  letter-spacing: -.04em;
}
/* ==========================================================================
   24. READER ACCOUNTS — sign-in pages, account page, discussion box
   ========================================================================== */

/* Top ribbon account link */
body.site-shell .market-ribbon-in { gap: 1rem; }
body.site-shell .ribbon-account { margin-left: auto; display: inline-flex; align-items: center; gap: .45rem; font-size: .74rem; font-weight: 700; white-space: nowrap; }
body.site-shell .ribbon-account a { color: var(--on-dark, #fff); text-decoration: none; }
body.site-shell .ribbon-account a:hover { color: var(--accent-on-dark); text-decoration: underline; }
body.site-shell .ribbon-sep { opacity: .45; }
body.site-shell .ribbon-me { display: inline-flex; align-items: center; gap: .4rem; }
body.site-shell .ribbon-av { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; font-size: .58rem; font-weight: 800; }

/* Honeypot: off-screen for people, still a real input for bots */
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* Sign-in / sign-up cards */
body.site-shell .auth-page { padding: 3rem 0 4rem; background: linear-gradient(115deg, var(--card) 0%, var(--card-alt) 100%); }
body.site-shell .auth-card { max-width: 460px; margin: 0 auto; padding: 2rem 2rem 1.6rem; background: #fff; border: 1px solid var(--line-strong); border-top: 4px solid var(--brand); box-shadow: 0 18px 40px color-mix(in srgb, var(--ink) 7%, transparent); }
body.site-shell .auth-card-center { text-align: center; }
body.site-shell .auth-card h1 { margin: .15rem 0 .5rem; font-size: 1.75rem; line-height: 1.15; color: var(--ink); }
body.site-shell .auth-kicker { font-size: .7rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
body.site-shell .auth-sub { margin: 0 0 1.2rem; font-size: .92rem; line-height: 1.6; color: var(--text); }
body.site-shell .auth-icon { display: inline-grid; place-items: center; width: 58px; height: 58px; margin-bottom: .6rem; border-radius: 50%; background: var(--brand-050); color: var(--brand); }
body.site-shell .auth-form { display: flex; flex-direction: column; text-align: left; }
body.site-shell .af-label { margin: .8rem 0 .3rem; font-size: .8rem; font-weight: 700; color: var(--ink); }
body.site-shell .af-label-row { display: flex; justify-content: space-between; align-items: baseline; }
body.site-shell .af-link { font-size: .78rem; font-weight: 700; color: var(--brand-700); }
body.site-shell .af-input { width: 100%; padding: .65rem .75rem; border: 1px solid var(--line-strong); background: var(--card); font-size: .95rem; color: var(--ink); }
body.site-shell .af-input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
body.site-shell .af-input:disabled { background: var(--card-alt); color: var(--muted); }
body.site-shell .af-hint { margin-top: .3rem; font-size: .74rem; color: var(--muted); }
body.site-shell .af-rules { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin: .45rem 0 0; padding: 0; list-style: none; font-size: .74rem; color: var(--muted); }
body.site-shell .af-rules li::before { content: "○"; margin-right: .3rem; }
body.site-shell .af-rules li.is-ok { color: var(--brand-700); }
body.site-shell .af-rules li.is-ok::before { content: "✓"; }
body.site-shell .af-check { display: flex; gap: .55rem; align-items: flex-start; margin-top: 1rem; font-size: .8rem; line-height: 1.5; color: var(--text); }
body.site-shell .af-check input { margin-top: .2rem; accent-color: var(--brand); }
body.site-shell .af-check a { color: var(--brand-700); font-weight: 700; }
body.site-shell .af-submit { width: 100%; margin-top: 1.2rem; padding: .7rem 1rem; }
body.site-shell .auth-card .btn-brand { color: #fff; }
body.site-shell .auth-alt { margin: 1.2rem 0 0; font-size: .86rem; color: var(--text); text-align: center; }
body.site-shell .auth-alt a, body.site-shell .af-linkbtn { color: var(--brand-700); font-weight: 800; }
body.site-shell .af-linkbtn { border: 0; background: none; padding: 0; cursor: pointer; }
body.site-shell .auth-tips { margin: 1rem 0 0; padding: 0; list-style: none; font-size: .82rem; color: var(--muted); text-align: left; }
body.site-shell .auth-tips li { padding: .35rem 0 .35rem 1.2rem; position: relative; border-top: 1px dashed var(--line); }
body.site-shell .auth-tips li::before { content: "•"; position: absolute; left: .3rem; color: var(--brand); }
body.site-shell .auth-tips a { color: var(--brand-700); font-weight: 700; }
body.site-shell .auth-alert { margin: 0 0 1rem; padding: .7rem .85rem; border-left: 4px solid; font-size: .86rem; line-height: 1.5; text-align: left; }
body.site-shell .auth-alert.is-ok { border-color: var(--brand); background: var(--brand-050); color: var(--brand-700); }
body.site-shell .auth-alert.is-error { border-color: var(--danger, #d11f42); background: color-mix(in srgb, var(--danger, #d11f42) 8%, #fff); color: #8a1026; }
body.site-shell .auth-alert.is-info { border-color: #d97706; background: #fffaf0; color: #7c4a03; }

/* Account page */
body.site-shell .acct-head { padding: 2rem 0 0; background: linear-gradient(115deg, var(--card) 0%, var(--card-alt) 100%); border-bottom: 1px solid var(--line-strong); }
body.site-shell .acct-id { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
body.site-shell .acct-av { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 1.4rem; font-weight: 800; }
body.site-shell .acct-id h1 { margin: 0; font-size: 1.7rem; color: var(--ink); }
body.site-shell .acct-meta { margin: .2rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; font-size: .85rem; color: var(--text); }
body.site-shell .acct-badge { padding: .12rem .5rem; background: var(--brand-050); color: var(--brand-700); font-size: .72rem; font-weight: 800; }
body.site-shell .acct-since { color: var(--muted); }
body.site-shell .acct-tabs { display: flex; gap: .3rem; margin-top: 1.4rem; overflow-x: auto; }
body.site-shell .acct-tabs a { padding: .7rem 1rem; border-bottom: 3px solid transparent; font-size: .88rem; font-weight: 800; color: var(--text); text-decoration: none; white-space: nowrap; }
body.site-shell .acct-tabs a span { margin-left: .25rem; padding: .05rem .4rem; background: var(--card-alt); font-size: .72rem; }
body.site-shell .acct-tabs a.is-on { border-bottom-color: var(--brand); color: var(--ink); }
body.site-shell .acct-body { padding: 1.8rem 0 3.5rem; }
body.site-shell .acct-empty { max-width: 560px; padding: 2rem; border: 1px dashed var(--line-strong); background: var(--card); }
body.site-shell .acct-empty h2 { font-size: 1.2rem; margin: 0 0 .4rem; }
body.site-shell .acct-empty p { color: var(--text); }
body.site-shell .acct-filter { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
body.site-shell .acct-filter button { border: 1px solid var(--line-strong); background: var(--card); padding: .3rem .7rem; font-size: .78rem; font-weight: 700; color: var(--text); cursor: pointer; }
body.site-shell .acct-filter button span { color: var(--muted); }
body.site-shell .acct-filter button.is-on { border-color: var(--brand); background: var(--brand); color: #fff; }
body.site-shell .acct-filter button.is-on span { color: #fff; }
body.site-shell .acct-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line-strong); background: #fff; }
body.site-shell .acct-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: .5rem 1rem; align-items: center; padding: .85rem 1rem; border-top: 1px solid var(--line); }
body.site-shell .acct-list li:first-child { border-top: 0; }
body.site-shell .acct-list li[hidden] { display: none; }
body.site-shell .acct-type { padding: .15rem .5rem; background: var(--brand-050); color: var(--brand-700); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
body.site-shell .acct-title { font-weight: 700; color: var(--ink); text-decoration: none; }
body.site-shell .acct-title:hover { color: var(--brand); }
body.site-shell .acct-when { font-size: .76rem; color: var(--muted); white-space: nowrap; }
body.site-shell .acct-x { border: 0; background: none; padding: .2rem .4rem; font-size: .78rem; font-weight: 700; color: var(--danger, #d11f42); cursor: pointer; }
body.site-shell .acct-comments li { grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; }
body.site-shell .acct-cbody p { margin: .25rem 0; font-size: .88rem; color: var(--text); }
body.site-shell .acct-status { padding: .15rem .5rem; font-size: .68rem; font-weight: 800; white-space: nowrap; background: var(--card-alt); color: var(--text); }
body.site-shell .acct-status.is-approved { background: var(--brand-050); color: var(--brand-700); }
body.site-shell .acct-status.is-pending { background: #fff4d6; color: #7c4a03; }
body.site-shell .acct-status.is-hidden, body.site-shell .acct-status.is-spam { background: color-mix(in srgb, var(--danger, #d11f42) 10%, #fff); color: #8a1026; }
body.site-shell .acct-settings { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.2rem; align-items: start; }
body.site-shell .acct-card { padding: 1.3rem 1.4rem 1.5rem; border: 1px solid var(--line-strong); background: #fff; }
body.site-shell .acct-card h2 { margin: 0 0 .3rem; font-size: 1.1rem; }
body.site-shell .acct-card .btn { margin-top: 1rem; align-self: flex-start; }
body.site-shell .acct-note { font-size: .85rem; color: var(--text); }
body.site-shell .acct-danger { border-top: 3px solid var(--danger, #d11f42); }
@media (max-width: 575.98px) {
  body.site-shell .acct-list li { grid-template-columns: minmax(0, 1fr) auto; }
  body.site-shell .acct-list li .acct-type, body.site-shell .acct-list li .acct-status { grid-column: 1 / -1; justify-self: start; }
  body.site-shell .auth-card { padding: 1.5rem 1.2rem; }
}

/* Discussion box */
body.site-shell .community { padding: 2.5rem 0 3rem; border-top: 1px solid var(--line-strong); background: var(--card); }
body.site-shell .cm-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.2rem; }
body.site-shell .cm-title { margin: 0; font-size: clamp(1.4rem, 1rem + 1.2vw, 1.8rem); color: var(--ink); }
body.site-shell .cm-count { display: inline-block; margin-left: .4rem; padding: .1rem .55rem; background: var(--brand); color: #fff; font-size: .8rem; vertical-align: middle; }
body.site-shell .cm-sub { margin: .35rem 0 0; font-size: .88rem; color: var(--text); }
body.site-shell .cm-save { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .95rem; border: 1px solid var(--brand); background: #fff; color: var(--brand-700); font-family: inherit; font-size: .82rem; font-weight: 800; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s; }
body.site-shell .cm-save:hover { background: var(--brand-050); color: var(--brand-700); }
body.site-shell .cm-save.is-saved { background: var(--brand); color: #fff; }
body.site-shell .cm-save.is-saved:hover { background: var(--brand-700); color: #fff; }
body.site-shell .cm-save:disabled { opacity: .7; cursor: progress; }
body.site-shell .cm-gate { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: 1.1rem 1.2rem; margin-bottom: 1.4rem; border: 1px dashed var(--line-strong); background: #fff; }
body.site-shell .cm-gate p { flex: 1 1 280px; margin: 0; font-size: .9rem; color: var(--text); }

/* Compose */
body.site-shell .cm-compose { display: flex; gap: .85rem; margin-bottom: 1.6rem; }
body.site-shell .cm-compose-main { flex: 1; min-width: 0; }
body.site-shell .cm-form textarea { display: block; width: 100%; padding: .7rem .8rem; border: 1px solid var(--line-strong); background: #fff; font-size: .93rem; line-height: 1.55; color: var(--ink); resize: vertical; }
body.site-shell .cm-form textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
body.site-shell .cm-compose-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: .55rem; }
body.site-shell .cm-compose-foot small { flex: 1 1 240px; font-size: .74rem; color: var(--muted); }
body.site-shell .cm-counter { font-size: .74rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
body.site-shell .cm-counter.is-near { color: #b45309; }
body.site-shell .cm-msg { margin: .5rem 0 0; padding-left: .6rem; border-left: 3px solid var(--danger, #d11f42); font-size: .8rem; font-weight: 700; line-height: 1.45; color: #9f1239; }
body.site-shell .cm-msg[hidden] { display: none; }
body.site-shell .cm-form .btn.is-busy, body.site-shell .cm-act.is-busy { opacity: .7; cursor: progress; }

/* Thread */
body.site-shell .cm-av { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--brand-050); color: var(--brand-700); font-size: .8rem; font-weight: 800; }
body.site-shell .cm-list { border-top: 1px solid var(--line); }
body.site-shell .cm-list[hidden] { display: none; }
body.site-shell .cm-thread { padding: .2rem 0; border-bottom: 1px solid var(--line); }
body.site-shell .cm-item { display: flex; gap: .85rem; padding: 1rem 0; scroll-margin-top: calc(var(--hh, 80px) + 16px); }
body.site-shell .cm-item.is-reply { margin-left: calc(19px + .85rem); padding: .75rem 0 .75rem calc(19px + .85rem); border-left: 2px solid var(--line-strong); }
body.site-shell .cm-thread > .cm-item.is-reply:last-child { margin-bottom: .8rem; }
body.site-shell .cm-item.is-reply .cm-av { width: 30px; height: 30px; font-size: .68rem; }
body.site-shell .cm-item.is-deleted .cm-av { background: var(--card-alt); color: var(--muted); }
body.site-shell .cm-item:target, body.site-shell .cm-item.is-new { animation: cmFlash 2.6s ease-out; }
@keyframes cmFlash { from { background: color-mix(in srgb, var(--brand) 13%, transparent); } to { background: transparent; } }
body.site-shell .cm-main { flex: 1; min-width: 0; }
body.site-shell .cm-head { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .45rem; font-size: .82rem; line-height: 1.4; }
body.site-shell .cm-name { color: var(--ink); font-weight: 800; }
body.site-shell .cm-you { padding: .05rem .4rem; background: var(--brand); color: #fff; font-size: .64rem; font-weight: 800; letter-spacing: .02em; }
body.site-shell .cm-sep { color: var(--muted); opacity: .7; }
body.site-shell .cm-time, body.site-shell .cm-edited { color: var(--muted); }
body.site-shell .cm-pending { padding: .05rem .45rem; background: #fff4d6; color: #7c4a03; font-size: .7rem; font-weight: 700; }
body.site-shell .cm-body { margin: .3rem 0 0; font-size: .94rem; line-height: 1.6; color: var(--text); overflow-wrap: anywhere; }
body.site-shell .cm-gone { font-style: italic; color: var(--muted); }

/* Action bar — every action is the same button box, so they always line up */
body.site-shell .cm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .7rem; }
body.site-shell .cm-act-form { display: contents; }
body.site-shell .cm-act { display: inline-flex; align-items: center; justify-content: center; gap: .38rem; height: 30px; margin: 0; padding: 0 .75rem; border: 1px solid var(--line-strong); border-radius: 0; background: #fff; color: var(--text); font-family: inherit; font-size: .75rem; font-weight: 700; line-height: 1; white-space: nowrap; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
body.site-shell .cm-act svg { flex: none; }
body.site-shell .cm-act:hover { border-color: var(--brand); background: var(--brand-050); color: var(--brand-700); }
body.site-shell .cm-act:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
body.site-shell .cm-act[aria-expanded="true"] { border-color: var(--brand); background: var(--brand); color: #fff; }
body.site-shell .cm-act.is-danger:hover { border-color: var(--danger, #d11f42); background: color-mix(in srgb, var(--danger, #d11f42) 7%, #fff); color: #9f1239; }
body.site-shell .cm-act.is-flag { margin-left: auto; color: var(--muted); }
body.site-shell .cm-act.is-flag:hover { color: var(--brand-700); }
body.site-shell .cm-act[aria-expanded="true"], body.site-shell .cm-act[aria-expanded="true"]:hover,
body.site-shell .cm-act.is-flag[aria-expanded="true"], body.site-shell .cm-act.is-flag[aria-expanded="true"]:hover { border-color: var(--brand); background: var(--brand); color: #fff; }
body.site-shell .cm-act:disabled, body.site-shell .cm-act.is-done { border-color: var(--line); background: var(--card); color: var(--muted); cursor: default; }

/* Reply / edit / report panels */
body.site-shell .cm-panel { margin-top: .7rem; padding: .85rem .9rem .9rem; border: 1px solid var(--line-strong); border-left: 3px solid var(--brand); background: #fff; }
body.site-shell .cm-panel[hidden] { display: none; }
body.site-shell .cm-panel-head { display: block; margin: 0 0 .45rem; padding: 0; font-size: .8rem; font-weight: 800; color: var(--ink); }
body.site-shell .cm-panel-head small { font-weight: 600; color: var(--muted); }
body.site-shell .cm-panel textarea { font-size: .9rem; min-height: 84px; }
body.site-shell .cm-panel-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem; margin-top: .6rem; }
body.site-shell .cm-panel-foot .cm-msg { flex: 1 1 220px; margin: 0; }
body.site-shell .cm-panel-foot .btn { display: inline-flex; align-items: center; height: 30px; padding: 0 .95rem; font-size: .75rem; }
body.site-shell .cm-reasons { display: flex; flex-wrap: wrap; gap: .4rem; min-width: 0; margin: 0; padding: 0; border: 0; }
body.site-shell .cm-reasons legend { float: left; width: 100%; }
body.site-shell .cm-reasons label { display: inline-flex; align-items: center; gap: .4rem; padding: .38rem .7rem; border: 1px solid var(--line-strong); font-size: .8rem; color: var(--text); cursor: pointer; }
body.site-shell .cm-reasons input { margin: 0; accent-color: var(--brand); }
body.site-shell .cm-reasons label:has(input:checked) { border-color: var(--brand); background: var(--brand-050); color: var(--brand-700); font-weight: 700; }
body.site-shell .cm-empty { margin: 1rem 0 0; font-size: .9rem; color: var(--muted); }
body.site-shell .cm-empty[hidden] { display: none; }

/* Confirmation toast */
.cm-toast { position: fixed; left: 50%; bottom: 24px; z-index: 1090; display: flex; align-items: center; gap: .6rem; max-width: min(92vw, 460px); padding: .75rem 1.05rem; background: var(--ink, #0f161e); color: #fff; font-size: .86rem; font-weight: 600; line-height: 1.4; box-shadow: 0 12px 32px rgba(0, 0, 0, .28); opacity: 0; pointer-events: none; transform: translate(-50%, 14px); transition: opacity .2s ease, transform .2s ease; }
.cm-toast::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--accent-on-dark, #6fcf8f); }
.cm-toast.is-error::before { background: #ff7a8f; }
.cm-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 575.98px) {
  body.site-shell .cm-compose .cm-av { display: none; }
  body.site-shell .cm-item.is-reply { margin-left: .6rem; padding-left: .85rem; }
  body.site-shell .cm-act { height: 32px; padding: 0 .65rem; }
  body.site-shell .cm-panel-foot .cm-msg { flex-basis: 100%; }
  body.site-shell .acct-tabs { gap: 0; }
  body.site-shell .acct-tabs a { padding: .7rem .6rem; font-size: .84rem; }
}
@media (prefers-reduced-motion: reduce) {
  body.site-shell .cm-item:target, body.site-shell .cm-item.is-new { animation: none; }
  .cm-toast { transition: none; }
}

/* Account → My comments: Edit + Delete */
body.site-shell .acct-acts { display: flex; align-items: center; gap: .25rem; }
body.site-shell .acct-edit { padding: .2rem .4rem; font-size: .78rem; font-weight: 700; color: var(--brand-700); text-decoration: none; }
body.site-shell .acct-edit:hover { color: var(--brand); text-decoration: underline; }
/* Skip link: first thing keyboard users reach; hidden until focused. */
.skip-link { position: absolute; left: 12px; top: -100px; z-index: 2000; padding: .6rem 1rem; background: var(--ink, #0f161e); color: #fff; font-weight: 800; text-decoration: none; }
.skip-link:focus { top: 12px; color: #fff; outline: 3px solid var(--accent, #037c2f); outline-offset: 2px; }
/* `body.site-shell a` (0,1,2) outranked the white above and drew the link in dark ink on the ink box — invisible when a keyboard user tabbed to it. */
body.site-shell a.skip-link,
body.site-shell a.skip-link:focus { color: #fff; }
main:focus { outline: none; }
/* Logos carry width/height attributes so the browser reserves their space
   before they load (no layout jump); these keep the displayed size unchanged. */
body.site-shell .brand-image, body.site-shell .footer-image { width: auto; height: auto; }

/* ==========================================================================
   DPDP: consent checkbox, privacy banner, footer links, /data-rights
   (App\Libraries\Dpdp, partials/consent_check, partials/privacy_banner)
   ========================================================================== */
body.site-shell .consent-check { display: flex; align-items: flex-start; gap: .6rem; padding: .75rem .85rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card-alt, #f6f8f9); }
body.site-shell .consent-check input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: .15rem; accent-color: var(--brand); cursor: pointer; }
body.site-shell .consent-check label { margin: 0; font-size: .82rem; line-height: 1.5; color: var(--text); cursor: pointer; }
body.site-shell .consent-check label a { color: var(--brand-700); font-weight: 700; text-decoration: underline; }
body.site-shell .consent-check.is-small { margin: 0 0 .75rem; padding: .55rem .6rem; }
body.site-shell .consent-check.is-small label { font-size: .72rem; }

.pv-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1080;
  padding: .85rem 0; background: var(--dark-panel, #14282b); color: #eef3ef;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .18);
  transform: translateY(100%); transition: transform .22s ease;
}
.pv-bar.on { transform: none; }
.pv-in { display: flex; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.pv-text { margin: 0; font-size: .86rem; line-height: 1.55; color: #eef3ef; }
body.site-shell .pv-text a { margin-left: .25rem; color: #fff; font-weight: 800; text-decoration: underline; }
.pv-actions { display: flex; flex: 0 0 auto; gap: .5rem; }
.pv-btn { padding: .55rem 1.1rem; border: 1px solid var(--brand); border-radius: 8px; background: var(--brand); color: var(--on-brand, #fff); font: inherit; font-size: .84rem; font-weight: 800; cursor: pointer; }
.pv-btn:hover { filter: brightness(1.08); }
.pv-btn.pv-ghost { border-color: rgba(255, 255, 255, .55); background: transparent; color: #fff; }
.pv-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 767.98px) {
  .pv-in { flex-direction: column; align-items: stretch; }
  .pv-actions .pv-btn { flex: 1; }
}

body.site-shell .footer-privacy { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .35rem 1rem; }
body.site-shell .footer-privacy a,
body.site-shell .footer-privacy button { padding: 0; border: 0; background: none; font: inherit; font-size: .8rem; font-weight: 700; color: var(--on-dark-muted, #c9d4cc); text-decoration: underline; cursor: pointer; }
body.site-shell .footer-privacy a:hover,
body.site-shell .footer-privacy button:hover { color: #fff; }

body.site-shell .dr-block { margin-bottom: 1.6rem; padding: 1.4rem 1.5rem; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
body.site-shell .dr-block h2 { margin: 0 0 .75rem; font-size: 1.25rem; font-weight: 800; color: var(--ink); }
body.site-shell .dr-block p { color: var(--text); }
body.site-shell .dr-table { margin-bottom: .75rem; font-size: .86rem; }
body.site-shell .dr-table th, body.site-shell .dr-table td { padding: .7rem .6rem; vertical-align: top; color: var(--text); }
body.site-shell .dr-table thead th { font-size: .7rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
body.site-shell .dr-table tbody th { min-width: 140px; font-weight: 800; color: var(--ink); }
body.site-shell .dr-rights { margin: 0 0 1rem; padding-left: 1.1rem; }
body.site-shell .dr-rights li { margin-bottom: .55rem; line-height: 1.6; color: var(--text); }
body.site-shell .dr-officer { position: sticky; top: calc(var(--hh, 64px) + 16px); padding: 1.4rem; border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: 14px; background: var(--card); }
body.site-shell .dr-officer-name { margin: .35rem 0 .75rem; font-size: 1.15rem; font-weight: 800; color: var(--ink); }
body.site-shell .dr-officer ul { margin: .5rem 0 1rem; padding: 0; list-style: none; }
body.site-shell .dr-officer li { padding: .55rem 0; border-top: 1px solid var(--line); font-size: .9rem; color: var(--text); }
body.site-shell .dr-officer li span { display: block; font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* /data-rights: the notice is one admin-edited block (App\Libraries\SystemPages). */
body.site-shell .dr-body.prose { padding: 1.6rem 1.8rem; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
body.site-shell .dr-body.prose h2 { margin: 1.9rem 0 .75rem; padding-top: 1.4rem; border-top: 1px solid var(--line); font-size: 1.3rem; font-weight: 800; line-height: 1.25; color: var(--ink); }
body.site-shell .dr-body.prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
body.site-shell .dr-body.prose table { display: block; width: 100%; max-width: 100%; margin: .5rem 0 1rem; overflow-x: auto; border-collapse: collapse; font-size: .86rem; }
body.site-shell .dr-body.prose th,
body.site-shell .dr-body.prose td { min-width: 140px; padding: .7rem .6rem; border: 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; color: var(--text); }
/* The article style gives table headers a dark bar: white text on it. */
body.site-shell .dr-body.prose thead th { font-size: .7rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: #fff; }
body.site-shell .dr-body.prose li { margin-bottom: .5rem; }
@media (max-width: 575.98px) { body.site-shell .dr-body.prose { padding: 1.1rem 1rem; } }
