/* Phone-only fixes. Everything is inside max-width media queries, so desktop/tablet are untouched.
   Loaded last on every page so it wins over the desktop rules that sit later in the older files. */

@media (max-width: 699px) {
  /* ---- Home: WhatsApp reports + Features ---- */
  .wf__inner { grid-template-columns: minmax(0, 1fr); max-width: none; column-gap: 0; row-gap: 24px; }
  .wf__title { font-size: clamp(26px, 7.4vw, 32px); }
  .wf__sub { max-width: none; font-size: 15px; margin-top: 0; }
  .wf__head { justify-content: flex-start; }
  .wf__feat { top: 0; gap: 16px; }
  .wf__track { grid-template-columns: minmax(0, 1fr); gap: 10px; row-gap: 10px; }
  .wf__card { grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 4px 14px; padding: 14px 16px; border-radius: 16px; }
  .wf__art { width: 44px; height: 44px; border-radius: 12px; }
  .wf__art .wf__svg { width: 120%; }
  .wf__body h3 { font-size: 16px; white-space: normal; }
  .wf__body p { font-size: 13.5px; line-height: 1.45; }
  .wf__stage { margin-top: 8px; }
  .wf__phone { width: min(78%, 300px); height: auto; max-height: none; transform: scale(1.1); transform-origin: 50% 20%; }
  .wf__phone > img { width: 100%; height: auto; }
  .wf__chat { right: 4%; top: 66%; }
  .wf__chat img { width: 46px; }
  .wf__chat { font-size: 12px; }
}

/* ---- Home hero: shorter on phones (less scrolling before the next section) ---- */
@media (max-width: 699px) {
  .ribbon__inner { padding-block: 3px; }
  .ribbon__item { padding-block: 0; row-gap: 0; }
  .hero--ref .hero__plate { padding-top: 22px; }
  .hero--ref .intro h1 { font-size: clamp(32px, 9.2vw, 38px); }
  .hero--ref .intro__lead { margin-top: 10px; font-size: 15px; max-width: none; }
  .hero--ref .hero__cta { margin-top: 16px; }
  .hero--ref .hero__cta .btn { height: 48px; font-size: 16px; max-width: none; }
  /* the two trust badges sit side by side instead of stacked */
  .hero--ref .hero__stats { margin-top: 16px; flex-wrap: nowrap; row-gap: 0; }
  .hero--ref .hero__stats li { gap: 8px; padding: 0 10px; flex: 1 1 0; }
  .hero--ref .hero__stats li:first-child { padding-left: 0; }
  .hero--ref .hs__ic { width: 32px; flex: none; }
  .hero--ref .hs__ic i { font-size: 16px; }
  .hero--ref .hero__stats b { font-size: 12.5px; white-space: normal; line-height: 1.2; }
  .hero--ref .hero__stats li span:not(.hs__ic) { font-size: 10.5px; white-space: normal; line-height: 1.25; }
  /* shorter picture: crop the empty floor under the pedestal */
  .hero--ref .hero__art { margin-top: 14px; aspect-ratio: 902 / 640; background-position: center top; }
  /* product pills: one swipeable row instead of four stacked rows */
  .hero--ref .hero__pills {
    flex-wrap: nowrap; overflow-x: auto; gap: 8px; padding: 12px var(--gutter) 22px; margin-inline: calc(var(--gutter) * -1);
    scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .hero--ref .hero__pills::-webkit-scrollbar { display: none; }
  .hero--ref .hchip { flex: none; height: 40px; scroll-snap-align: start; }
  .hero--ref .hchip__t { font-size: 13px; }
}

/* ---- Home hero on phones/tablets: the live orbit scene (built by js/hero-orbit.js) in a cropped window ---- */
@media (max-width: 899px) {
  .hero--ref .hero__art.is-live { position: relative; overflow: hidden; aspect-ratio: 940 / 720; background: none; }
  .hero__live {
    position: absolute; left: 0; top: 0; width: 1672px; height: 845px; transform-origin: 0 0; container-type: inline-size;
    background: url("../assets/hero/hero-plate.webp?v=4") 0 0 / 1672px 845px no-repeat;
  }
  .hero__live .hero__rings { display: block; }
  .hero__live .hero__cube { display: block; }
  .hero__live .hero__orbs { display: block; position: absolute; inset: 0; pointer-events: none; z-index: auto; }
  .hero__orbchips { position: absolute; inset: 0; z-index: auto; }
  /* orbiting chips are icon discs here (text would be unreadable at this scale) */
  .hero--ref .hero__live .hchip { position: absolute; width: 84px; height: 84px; padding: 0; gap: 0; justify-content: center; border-radius: 50%; flex: none; }
  .hero--ref .hero__live .hchip__ic { width: 78%; height: 78%; }
  .hero--ref .hero__live .hchip__ic i { font-size: 42px; }
  .hero--ref .hero__live .hchip__t { display: none; }
}
@media (max-width: 699px) {
  .hero--ref .hero__art.is-live { margin-top: 10px; aspect-ratio: 940 / 700; }
}

/* ---- Equity & ETFs hero: the globe's box has only absolutely-placed children, so with margin:auto in the
   one-column grid it collapsed to 0x0 on phones ---- */
@media (max-width: 900px) {
  .ph--globe .ph__art { width: 100%; }
}
@media (max-width: 699px) {
  .ph--globe { padding-top: 28px; }
  .ph--globe .ph__art { max-width: 400px; }
  .eqg__card { right: 0; top: 0; width: min(200px, 52%); padding: 10px 12px 8px; }
}

/* ---- Escalation Matrix / Key Management: keep the real table on phones (swipe sideways) instead of stacked cards.
   Selectors start with .rtable-wrap so they beat the rules accessibility.css adds after this file loads ---- */
@media (max-width: 720px) {
  .rtable-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; scrollbar-width: thin; }
  .rtable-wrap .rtable { display: table; width: 100%; min-width: 880px; border: 1px solid var(--line); background: #fff; border-radius: 16px; overflow: hidden; table-layout: auto; }
  .kmp .rtable-wrap .rtable { border: 1px solid var(--card-line, var(--line)); background: #fff; box-shadow: var(--card-shadow, none); }
  .rtable-wrap .rtable thead { display: table-header-group; position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .rtable-wrap .rtable tbody { display: table-row-group; }
  .rtable-wrap .rtable tr { display: table-row; }
  .rtable-wrap .rtable tbody tr, .kmp .rtable-wrap .rtable tbody tr { margin: 0; border: 0; border-radius: 0; box-shadow: none; overflow: visible; background: none; }
  .rtable-wrap .rtable th, .rtable-wrap .rtable td {
    display: table-cell; padding: 14px 16px; font-size: 14px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left;
    overflow-wrap: normal; word-break: normal; min-width: 120px;
  }
  .rtable-wrap .rtable tbody th { min-width: 150px; }
  .rtable-wrap .rtable tbody tr:nth-child(even) > * { background: #faf9fc !important; }
  .rtable-wrap .rtable tbody tr > :last-child { border-bottom: 1px solid var(--line); }
  .rtable-wrap .rtable tbody tr:last-child > * { border-bottom: 0; }
  .rtable-wrap .rtable td::before, .rtable-wrap .rtable tbody th::before { content: none; display: none; }
  .rtable-wrap .rtable td[data-label="Address"], .rtable-wrap .rtable td[data-label="Email ID"], .rtable-wrap .rtable td[data-label="Working hours"],
  .rtable-wrap .rtable td[data-label="Contact Person"], .rtable-wrap .rtable td[data-label="Contact person"], .rtable-wrap .rtable td[data-label="Contact no"],
  .rtable-wrap .rtable td[data-label="Contact No."], .rtable-wrap .rtable a[href^="tel:"] { white-space: nowrap; }
  .rtable-wrap .rtable thead th { background: var(--purple) !important; color: #fff; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; border-bottom: 0; }
  .kmp .rtable-wrap .rtable thead th { background: linear-gradient(90deg, #37305c, #4b3b8f) !important; }
}

/* ---- Home "Invest in Mutual Funds | Save 90% of Your Time": two self-contained blocks on phones
   (heading > its own phone > its cards), instead of one shared phone pair between the two halves ---- */
@media (max-width: 719px) {
  .split { padding-block: 40px 44px; }
  .split__inner { grid-template-areas: "mh" "mp" "mc" "wh" "wp" "wc"; row-gap: 20px; }
  .split__phones { display: contents; }
  .split__phones::after { content: none; }
  .split__phone, .split__phone--mf, .split__phone--wt { width: min(62%, 250px); justify-self: center; margin: 4px 0 6px; }
  .split__phone--mf { grid-area: mp; }
  .split__phone--wt { grid-area: wp; }
  .split__title { font-size: clamp(28px, 8vw, 34px); }
  .split__head--wt { margin-top: 0; padding-top: 34px; border-top: 1px solid rgba(55, 48, 92, 0.1); }
  .split__cards { margin-top: 0; }
  .split__card { padding: 12px 14px 12px 12px; gap: 12px; }
  .split__ic { width: 38px; height: 38px; }
  .split__txt strong { font-size: 15px; }
  .split__txt span { font-size: 13px; line-height: 1.4; }
  .split__intro { font-size: 10.5px; }
  .split__logo { width: 124px; }
}
