/* MERIDIAN / SUBPAGES — Motion Home companion.
 * Scoped to non-home bodies. Existing hooks, state classes and inline dynamic
 * visibility remain authoritative. No overlays or animation on trading data.
 * Breakpoints: 1280 / 1024 / 768 / 480. Print documents retain their own rules.
 */
body.md-subpage {
  --md-night: #030a1d;
  --md-ice: #a8c7ff;
  --md-gutter: clamp(20px, 4vw, 64px);
  --r-sm: 6px; --r-md: 8px; --r-lg: 8px; --r-xl: 12px;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased;
}
.md-subpage *, .md-subpage *::before, .md-subpage *::after { box-sizing: border-box; }
.md-subpage :is(button, a, input, select, textarea):focus-visible {
  outline: 2px solid var(--gold); outline-offset: 4px;
}
.md-subpage :is(.app-wrap, .admin-wrap) { width: 100%; max-width: 1440px; padding: 48px var(--md-gutter) 96px; }
.md-subpage :is(.pg-head, .sec-title) { gap: 20px; }
.md-subpage .pg-head { padding-bottom: 28px; margin: 0 0 32px; border-bottom: 1px solid var(--line); align-items: flex-end; }
.md-subpage .pg-eyebrow { font: 10px/1.5 var(--font-mono); letter-spacing: .15em; margin-bottom: 16px; color: var(--gold); }
.md-subpage .pg-head h1 { font-size: clamp(32px, 4vw, 56px); line-height: 1.12; font-weight: 500; letter-spacing: -.045em; }
.md-subpage .pg-head h1 .chip { vertical-align: middle; letter-spacing: 0; font-size: 11px; margin-left: 12px; }
.md-subpage .pg-head-sub { max-width: 64ch; margin-top: 18px; line-height: 1.8; }
.md-subpage .sec-title h3 { font-weight: 600; letter-spacing: -.02em; }
.md-subpage .card { box-shadow: none; border-color: var(--line); background: var(--surface); }
.md-subpage .card-p { padding: 24px; }
.md-subpage .card-p-lg { padding: 32px; }
.md-subpage .card-p-sm { padding: 16px; }
.md-subpage :is(.input, .mx-input, textarea.input) { border-radius: 6px; background: var(--bg-1); border-color: var(--line); min-height: 46px; }
.md-subpage :is(.input, .mx-input):focus { background: var(--surface); border-color: var(--gold); }
.md-subpage .btn { min-height: 44px; border-radius: 100px; font-weight: 600; padding-inline: 22px; }
.md-subpage .btn-sm { min-height: 36px; padding-inline: 16px; }
.md-subpage .btn-gold { box-shadow: none; }
.md-subpage .btn-ghost { border-color: var(--line); }
.md-subpage .chip { min-height: 32px; }
.md-subpage :is(.act-filters, .mkt-cats) { gap: 8px; padding-block: 8px; }
.md-subpage :is(.pg-stats, .admin-kpis) { box-shadow: none; }
.md-subpage .pg-stats { background: var(--bg-1); border-radius: 0; border: 0; border-block: 1px solid var(--line); margin-bottom: 32px; }
.md-subpage .pg-stats > div { padding: 24px; }
.md-subpage .pg-stats b { font-weight: 500; font-size: clamp(20px, 2.4vw, 30px); letter-spacing: -.04em; }
.md-subpage :is(td, th) { font-variant-numeric: tabular-nums; }
.md-subpage th { font-size: 10px; letter-spacing: .06em; }
.md-subpage :is(.mx-empty, .tr-empty) { color: var(--text-3); }
.md-subpage .mx-empty { padding: 48px 24px; }
.md-subpage :is(.modal, .modal-body) { max-width: 100%; }
.md-subpage .modal { border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 24px 80px #0004; }
.md-subpage .modal-head { border-bottom: 1px solid var(--line); }
.md-subpage .mhead { background: var(--bg); backdrop-filter: none; box-shadow: none; }
.md-subpage .mfoot { background: var(--bg); padding-top: 56px; margin-top: 0; }
.md-subpage .mfoot-cols h5 { font: 10px/1.6 var(--font-mono); letter-spacing: .12em; }
.md-subpage .mfoot-bot { font-size: 11px; line-height: 1.8; }

/* Entry: the home film's navy stage, quiet contour art and large light type. */
.md-family-auth .auth { min-height: 100svh; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.md-family-auth .auth-aside { background: var(--md-night); color: #fff; border: 0; padding: clamp(32px, 5vw, 80px); isolation: isolate; }
.md-family-auth .auth-aside::before { inset: 15% -35% -30% -20%; width: auto; height: auto; z-index: -1; background: repeating-radial-gradient(ellipse at 70% 55%, transparent 0 26px, #6298ff30 27px 28px, transparent 29px 49px); transform: rotate(-25deg); }
.md-family-auth .auth-aside::after { content: 'MERIDIAN'; position: absolute; bottom: 25%; left: 8%; font: 600 clamp(70px, 9vw, 160px)/1 var(--font-display); letter-spacing: -.07em; color: transparent; -webkit-text-stroke: 1px #ffffff26; z-index: -1; }
.md-family-auth .auth-aside .brand { color: #fff; }
.md-family-auth .auth-claim { font-size: clamp(40px, 4.6vw, 72px); line-height: 1.12; font-weight: 500; letter-spacing: -.045em; max-width: 9ch; margin-block: 72px 120px; }
.md-family-auth .auth-points { border-top: 1px solid #ffffff30; padding-top: 28px; }
.md-family-auth .auth-points li { color: #ccd6e8; font-size: 12px; }
.md-family-auth .auth-points .mi { color: var(--md-ice); }
.md-family-auth .auth-main { padding: 64px clamp(24px, 5vw, 80px); background: var(--bg); }
.md-family-auth .auth-form { max-width: 440px; }
.md-family-auth .auth-form h1 { font-size: clamp(32px, 3vw, 46px); font-weight: 500; line-height: 1.18; letter-spacing: -.04em; }
.md-family-auth .auth-form .muted { margin-top: 16px; line-height: 1.8; }
.md-family-auth .auth-form .input { min-height: 52px; }
.md-family-auth .auth-form .btn-block { min-height: 52px; }
.md-family-auth .auth-alt { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 32px; }
.md-family-auth .steps { margin-bottom: 32px; }

/* Discovery: broad editorial opening, restrained rows, independent rail. */
.md-family-market .pg-head { padding-block: 24px 40px; }
.md-family-market .markets-grid { grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; }
.md-family-market .markets-grid > .card { border-inline: 0; border-radius: 0; }
.md-family-market .markets-rail { gap: 24px; }
.md-family-market .markets-rail .card { background: var(--bg-1); border: 0; border-top: 2px solid var(--gold); border-radius: 0; }
.md-family-market .mkt-toolbar { padding-block: 20px; }
.md-family-market .mkt-scroll { max-height: 800px; }
.md-family-market .mkt-cats .chip { border-radius: 0; border-width: 0 0 2px; background: transparent; }
.md-family-market .mkt-cats .chip-gold { border-color: var(--gold); color: var(--gold); }
.md-family-market :is(.market-table, .holdings) td { padding-block: 20px; }
.md-page-coin .app-wrap > .mgrid { margin-top: 32px; }
.md-subpage .md-coin-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 32px; padding-block: 16px 32px; border-bottom: 1px solid var(--line); }
.md-subpage .md-coin-title { font: 500 clamp(32px, 4vw, 52px)/1.15 var(--font-display); margin: 0; letter-spacing: -.04em; }
.md-page-watchlist .card { border-inline: 0; border-radius: 0; }
.md-page-leaderboard .pg-stats, .md-page-competitions .pg-stats { background: var(--gold-soft); }

/* Trading: stable, dense work surfaces; typography echoes the home terminal. */
.md-family-terminal { background: var(--terminal-ground); }
.md-family-terminal .app-wrap.trade-terminal, .md-page-web3-token .app-wrap { max-width: none; padding: 20px 24px 48px; }
.md-family-terminal .pg-head { margin-bottom: 24px; padding-bottom: 20px; }
.md-family-terminal .pg-head h1 { font-size: 32px; }
.md-family-terminal .pg-eyebrow { margin-bottom: 8px; }
.md-family-terminal .card { border-radius: 4px; }
.md-family-terminal .card-p { padding: 18px; }
.md-family-terminal .card-p-sm { padding: 14px; }
.md-family-terminal .btn { min-height: 36px; border-radius: 4px; padding-inline: 16px; }
.md-family-terminal .btn-block { min-height: 44px; }
.md-family-terminal :is(.input, .mx-input) { min-height: 40px; border-radius: 4px; }
.md-family-terminal .tr-header { padding: 20px; border-top: 2px solid var(--gold); gap: 28px; }
.md-family-terminal .tr-mark { font-size: 23px; font-weight: 500; letter-spacing: -.04em; }
.md-family-terminal .tr-sl { font: 10px/1.5 var(--font-mono); letter-spacing: .05em; }
.md-family-terminal :is(.trade-tab, .tr-tt) { min-height: 42px; }
.md-family-terminal .trade-grid { gap: 8px; }
.md-family-terminal .tr-fld { min-height: 44px; }
.md-family-terminal .mfoot { background: var(--surface); }
.md-page-otc .mgrid-2, .md-page-bot .mgrid-rail { gap: 24px; }

/* Account: quiet navigation and a single prominent balance surface. */
.md-family-account .acct-shell, .md-page-rewards .acct-shell { grid-template-columns: 184px minmax(0, 1fr); gap: 40px; }
.md-subpage .acct-content { min-width: 0; }
.md-subpage .acct-nav { gap: 4px; border-right: 1px solid var(--line); padding-right: 20px; }
.md-subpage .acct-navlink { min-height: 44px; border-radius: 0; font-size: 13px; padding-left: 12px; border-left: 2px solid transparent; }
.md-subpage .acct-navlink.is-on { border-left-color: var(--gold); background: var(--gold-soft); }
.md-family-account .pg-head h1, .md-page-rewards .pg-head h1 { font-size: clamp(32px, 3.5vw, 44px); }
.md-page-wallet .wallet-profile { border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.md-page-wallet .bal-hero { gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.md-page-wallet .bal-card { border: 0; border-radius: 0; padding: 32px; }
.md-page-wallet .bal-card:first-child { background: var(--md-night); color: #fff; }
.md-page-wallet .md-balance-meta { font-size: 13px; color: #a7b6d1; overflow-wrap: anywhere; }
.md-page-wallet .bal-card:first-child .lbl { color: #a7b6d1; }
.md-page-wallet .bal-card:first-child .btn-ghost { color: #fff; border-color: #ffffff50; background: transparent; }
.md-page-wallet .bal-card:first-child .btn-soft { background: #ffffff14; color: #fff; }
.md-page-wallet .bal-card:first-child .btn-gold { color: #fff; background: #1652f0; }
.md-subpage .bal-big { font-size: clamp(26px, 3vw, 42px); font-weight: 500; letter-spacing: -.05em; overflow-wrap: anywhere; }
.md-page-portfolio .mgrid-4 > .card { border-radius: 0; border-width: 0 0 1px; background: var(--bg-1); }
.md-page-security .pg-stats, .md-page-kyc .kyc-status-card { background: var(--gold-soft); }
.md-page-kyc .kyc-wrap { max-width: 800px; }
.md-page-kyc .drop { border-radius: 6px; background: var(--bg-1); }
.md-page-referrals .input.mono { font-size: 13px; }
.md-page-activity .card, .md-page-futures-history .card, .md-page-card-history .card { border-radius: 0; }

/* Funding: focussed form, comfortably spaced networks and confirmation. */
.md-family-funding .app-wrap { max-width: 1160px; }
.md-family-funding .pg-head { margin-bottom: 40px; }
.md-page-deposit .dep-grid { grid-template-columns: 240px minmax(0, 1fr); gap: 32px; }
.md-page-deposit .coin-picker { background: var(--bg-1); }
.md-page-deposit .addr-box { background: var(--bg-1); border: 1px solid var(--line); border-radius: 6px; overflow-wrap: anywhere; }
.md-page-convert .md-convert-stack { max-width: 540px; margin: 40px auto 0; }
.md-page-convert .md-convert-stack > .card:first-child { padding: 32px; border-top: 3px solid var(--gold); }
.md-page-convert [data-cv-flip] { color: var(--on-gold) !important; border-radius: 50% !important; }
.md-page-convert :is([data-cv-from-sym], [data-cv-to-sym]) { min-height: 44px; }

/* Product shelves: restrained blue surfaces, contours and clear hierarchy. */
.md-family-product .pg-head { padding-block: 24px 36px; }
.md-family-product .pg-head h1 { max-width: 20ch; }
.md-family-product .feat-grid { gap: 24px; }
.md-family-product .feat-grid > .card { border-radius: 8px; box-shadow: none; }
.md-family-product .earn-card { border-radius: 8px; box-shadow: none; border-color: var(--line); padding: 28px; }
.md-family-product .earn-card::before { background: var(--gold); height: 2px; }
.md-family-product .earn-card:hover { transform: none; border-color: var(--gold); }
.md-page-earn .bal-hero { gap: 0; border-block: 1px solid var(--line); }
.md-page-earn .bal-card { border: 0; border-radius: 0; background: var(--bg-1); border-right: 1px solid var(--line); }
.md-page-earn .bal-card:last-child { border-right: 0; }
.md-page-earn .earn-hero { border-radius: 8px; border: 1px solid var(--line); background: var(--gold-soft); }
.md-page-earn .earn-hero-slide { padding: 32px; }
.md-page-staking2 .mgrid-4 { gap: 16px; }
.md-page-launchpad .pg-stats { background: var(--gold-soft); }
.md-page-card .card-preview { box-shadow: 0 24px 48px #030a1d26; border: 1px solid #ffffff30; }
.md-page-card .card-specs { border-top: 1px solid var(--line); padding-top: 24px; }
.md-page-card-earn .feat-grid > .card, .md-page-card-events .feat-grid > .card, .md-page-rewards-events .feat-grid > .card { border-top: 2px solid var(--gold); }
.md-page-rewards .feat-grid .card { background: var(--bg-1); border: 0; }
.md-page-rewards-tasks .act-filters { border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.md-page-solana .pg-head { position: relative; background: var(--gold-soft); padding: 32px; border-bottom: 2px solid var(--gold); }
.md-page-copy-trading .pg-head { border-bottom-color: var(--gold); }
.md-page-web3-portfolio .pg-head { border-bottom-color: var(--gold); }

/* Support: readable lists, generous questions and a focussed ticket form. */
.md-family-support .pg-head { padding-block: 16px 36px; }
.md-family-support :is(.notice-row, .thread-row) { padding-block: 24px; }
.md-family-support .notice-list > * + * { border-top: 1px solid var(--line); }
.md-page-support .support-grid { gap: 32px; }
.md-page-support .faq-q { padding: 22px 24px; font-weight: 500; min-height: 60px; }
.md-page-support .faq-a { line-height: 1.85; }
.md-page-support .cert-item { padding-block: 20px; }
.md-page-community .community-side { border-right: 1px solid var(--line); padding-right: 24px; }
.md-page-status .st-banner { border-radius: 0; border-width: 1px 0; padding: 28px; }
.md-page-status .st-uptime-card { background: var(--bg-1); border: 0; }
.md-page-status .st-uptime { gap: 3px; }

/* Editorial and fallback: the home page's long-form, typographic rhythm. */
.md-family-editorial .content-band { background: var(--md-night); border-radius: 0; overflow: hidden; }
.md-family-editorial .content-page { max-width: 820px; margin: 48px auto 0; }
.md-family-editorial .content-page h1 { font-size: clamp(36px, 4.6vw, 64px); font-weight: 500; line-height: 1.12; letter-spacing: -.045em; }
.md-family-editorial .content-updated { border-bottom: 1px solid var(--line); padding-bottom: 28px; margin-bottom: 32px; font: 11px/1.8 var(--font-mono); }
.md-family-editorial .post-body { font-size: 16px; line-height: 1.95; }
.md-family-editorial .post-body h2 { margin-top: 48px; font-size: 28px; font-weight: 500; }
.md-page-app-download .lp-hero { background: var(--md-night); color: #fff; padding-block: 72px; }
.md-page-app-download .lp-hero .pg-head { border-color: #ffffff30; }
.md-page-app-download .lp-hero :is(.pg-eyebrow, .sub) { color: var(--md-ice); }
.md-page-app-download .lp-hero .pg-head h1 { color: #fff; }
.md-page-index .app-wrap { min-height: 60vh; display: grid; align-content: center; }
.md-page-single-meridian_notice .post-detail { max-width: 820px; margin-inline: auto; }
.md-subpage .md-article-head { margin-block: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.md-subpage .md-article-title { font: 500 clamp(32px, 4vw, 52px)/1.2 var(--font-display); margin: 20px 0 0; letter-spacing: -.04em; }

/* Document and operator flows prioritise legibility, density and printing. */
.md-family-document .app-wrap { max-width: 1080px; }
.md-family-document .stmt-doc { box-shadow: none; border: 1px solid var(--line); }
.md-page-sign [data-sign-pad-card] { border-top: 2px solid var(--gold); }
.md-family-operator .admin-wrap { max-width: none; padding: 24px 32px 48px; }
.md-family-operator .admin-head { border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.md-family-operator .admin-head h1 { font-size: 30px; font-weight: 500; }
.md-family-operator .admin-kpis { gap: 1px; background: var(--line); border: 1px solid var(--line); }
.md-family-operator .kpi { border: 0; border-radius: 0; background: var(--surface); padding: 24px; }
.md-family-operator .admin-tabs { overflow-x: auto; }
.md-family-operator .admin-tab { flex-shrink: 0; min-height: 44px; }
.md-family-operator .btn { border-radius: 5px; min-height: 36px; font-size: 12px; }
.md-family-operator .card-p { padding: 20px; }

@media (min-width: 1280px) {
  .md-family-support .support-grid { grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); }
}
@media (max-width: 1279px) {
  .md-family-account .acct-shell, .md-page-rewards .acct-shell { gap: 24px; grid-template-columns: 160px minmax(0, 1fr); }
  .md-family-market .markets-grid { grid-template-columns: minmax(0, 1fr) 240px; gap: 24px; }
}
@media (max-width: 1023px) {
  .md-subpage :is(.app-wrap, .admin-wrap) { padding-inline: 24px; }
  .md-family-market .markets-grid { grid-template-columns: 1fr; }
  .md-family-market .markets-rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md-family-account .acct-shell, .md-page-rewards .acct-shell { grid-template-columns: 1fr; }
  .md-subpage .acct-sidebar { position: static; }
  .md-subpage .acct-nav { flex-direction: row; overflow-x: auto; border: 0; border-bottom: 1px solid var(--line); padding: 0 0 12px; }
  .md-subpage .acct-navlink { flex-shrink: 0; border-left: 0; border-bottom: 2px solid transparent; }
  .md-subpage .acct-navlink.is-on { border-bottom-color: var(--gold); }
  .md-family-auth .auth-aside { padding: 40px 32px; }
  .md-family-auth .auth-claim { font-size: 48px; }
  .md-page-deposit .dep-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .md-subpage :is(.app-wrap, .admin-wrap) { padding: 28px 20px 56px; }
  .md-subpage .pg-head { margin-bottom: 24px; padding-block: 0 24px; gap: 16px; }
  .md-subpage .pg-head h1 { font-size: 34px; overflow-wrap: anywhere; }
  .md-subpage .pg-eyebrow { margin-bottom: 12px; }
  .md-subpage .pg-head-act { width: 100%; }
  .md-subpage .pg-head-act .btn { flex: 1; }
  .md-subpage .card-p, .md-subpage .card-p-lg { padding: 20px; }
  .md-subpage .pg-stats { flex-wrap: wrap; }
  .md-subpage .pg-stats > div { padding: 16px; flex: 1 1 40%; min-width: 0; }
  .md-subpage .btn { min-height: 44px; }
  .md-subpage .mfoot { padding-top: 32px; }
  .md-family-auth .auth { display: block; }
  .md-family-auth .auth-aside { display: flex; min-height: 160px; padding: 28px 24px; }
  .md-family-auth .auth-claim { font-size: 34px; max-width: none; margin: 28px 0 0; }
  .md-family-auth .auth-aside::after, .md-family-auth .auth-points { display: none; }
  .md-family-auth .auth-main { padding: 36px 24px 56px; }
  .md-family-auth .auth-form { max-width: 480px; }
  .md-family-auth .auth-form h1 { font-size: 32px; }
  .md-family-market .markets-rail { grid-template-columns: 1fr; }
  .md-family-market .mkt-toolbar { padding-block: 12px; }
  .md-family-terminal .app-wrap.trade-terminal, .md-page-web3-token .app-wrap { padding: 12px 12px 32px; }
  .md-family-terminal .pg-head h1 { font-size: 28px; }
  .md-family-terminal .tr-header { padding: 16px; gap: 16px; }
  .md-family-terminal .tr-mark { font-size: 20px; }
  .md-family-terminal .btn, .md-family-terminal .trade-tab, .md-family-terminal .tr-tt { min-height: 44px; }
  .md-page-wallet .bal-hero { grid-template-columns: 1fr; }
  .md-page-wallet .bal-card { padding: 24px; }
  .md-page-wallet .bal-big { font-size: clamp(26px, 7vw, 38px); }
  .md-page-convert .md-convert-stack { margin-top: 24px; }
  .md-page-convert .md-convert-stack > .card:first-child { padding: 20px; }
  .md-page-earn .bal-hero { grid-template-columns: 1fr; }
  .md-page-earn .bal-card { border-right: 0; border-bottom: 1px solid var(--line); padding: 24px; }
  .md-page-earn .earn-hero-slide { padding: 20px; }
  .md-page-solana .pg-head { padding: 24px; }
  .md-page-community .community-side { border-right: 0; padding-right: 0; }
  .md-family-editorial .content-page { margin-top: 32px; }
  .md-family-editorial .content-page h1 { font-size: 38px; }
  .md-family-editorial .post-body { font-size: 15px; }
  .md-page-app-download .lp-hero { padding-block: 40px; }
  .md-family-operator .admin-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md-family-operator .admin-head { flex-wrap: wrap; gap: 16px; }
}
@media (max-width: 479px) {
  .md-subpage .pg-head h1 { font-size: 30px; }
  .md-subpage .pg-head h1 .chip { display: inline-flex; margin: 12px 0 0; }
  .md-subpage .pg-head h1:has(.chip) { display: flex; align-items: flex-start; flex-direction: column; }
  .md-page-convert .md-convert-stack > .card:first-child { padding: 16px; }
  .md-page-convert :is([data-cv-from-sym], [data-cv-to-sym]) { width: 105px !important; }
  .md-family-auth .auth-claim { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .md-subpage *, .md-subpage *::before, .md-subpage *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .md-subpage .rise { opacity: 1; transform: none; }
}
@media print {
  .md-family-document { background: white; color: black; }
  .md-family-document .app-wrap { max-width: none; padding: 0; }
  .md-family-document .stmt-doc { border: 0; box-shadow: none; }
}
