/* =====================================================================
   REDTAIL CAPITAL MARKETS - PREMIUM DESIGN SYSTEM
   Shared by public, client and admin areas. Prefix: rtx-
   ===================================================================== */

:root {
    --rtx-ink: #0b0d11;
    --rtx-ink-2: #14181f;
    --rtx-ink-3: #1d232d;
    --rtx-red: #c8102e;
    --rtx-red-deep: #9f0c25;
    --rtx-red-soft: #fdeceb;
    --rtx-gold: #d5b36a;
    --rtx-gold-deep: #a9833a;
    --rtx-paper: #f6f7f9;
    --rtx-white: #ffffff;
    --rtx-line: #e4e7ec;
    --rtx-line-dark: rgba(255,255,255,.09);
    --rtx-text: #1d2330;
    --rtx-muted: #5d6675;
    --rtx-up: #0e9f6e;
    --rtx-down: #d92d20;
    --rtx-radius: 16px;
    --rtx-radius-sm: 10px;
    --rtx-shadow: 0 1px 2px rgba(15,20,30,.05), 0 8px 24px rgba(15,20,30,.06);
    --rtx-shadow-lg: 0 2px 4px rgba(15,20,30,.06), 0 24px 56px rgba(15,20,30,.14);
    --rtx-font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --rtx-display: "Newsreader", Georgia, "Times New Roman", serif;
    --rtx-ease: cubic-bezier(.2,.8,.2,1);
    --rtx-tab-h: 64px;
    --rtx-safe-b: env(safe-area-inset-bottom, 0px);
    --rtx-safe-t: env(safe-area-inset-top, 0px);
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(200,16,46,.45); outline-offset: 2px; border-radius: 6px; }
img { max-width: 100%; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------------------------------------------------------------------
   Layout primitives
   --------------------------------------------------------------------- */
.rtx { font-family: var(--rtx-font); color: var(--rtx-text); background: var(--rtx-white); line-height: 1.65; }
.rtx *, .rtx *::before, .rtx *::after { box-sizing: border-box; }
.rtx h1, .rtx h2, .rtx h3, .rtx h4 { margin: 0; line-height: 1.15; color: var(--rtx-ink); letter-spacing: -.02em; }
.rtx h1, .rtx h2 { font-family: var(--rtx-display); font-weight: 600; }
.rtx p { margin: 0; }
.rtx a { color: inherit; }
.rtx-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.rtx-narrow { max-width: 780px; }
.rtx-section { padding: 88px 0; }
.rtx-section.alt { background: var(--rtx-paper); }
.rtx-section.dark { background: var(--rtx-ink); color: #e8eaee; }
.rtx-section.dark h2, .rtx-section.dark h3 { color: #fff; }
.rtx-section.dark .rtx-lead, .rtx-section.dark p { color: #a9b0bc; }
.rtx-head { max-width: 680px; margin-bottom: 44px; }
.rtx-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.rtx-head h2 { font-size: clamp(30px, 4.2vw, 46px); margin-bottom: 14px; }
.rtx-lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--rtx-muted); line-height: 1.7; }
.rtx-kicker { display: inline-block; font-size: 13px; font-weight: 700; color: var(--rtx-red); margin-bottom: 12px; }
.rtx-section.dark .rtx-kicker { color: var(--rtx-gold); }

.rtx-grid { display: grid; gap: 20px; }
.rtx-g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rtx-g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rtx-g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.rtx-card {
    background: var(--rtx-white);
    border: 1px solid var(--rtx-line);
    border-radius: var(--rtx-radius);
    padding: 26px;
    box-shadow: var(--rtx-shadow);
}
.rtx-card h3 { font-size: 20px; margin-bottom: 8px; letter-spacing: -.01em; font-family: var(--rtx-font); font-weight: 800; }
.rtx-card p { color: var(--rtx-muted); font-size: 15px; }
.rtx-card.flat { box-shadow: none; }
.rtx-card.dark { background: var(--rtx-ink-2); border-color: var(--rtx-line-dark); }
.rtx-card.dark h3 { color: #fff; }
.rtx-card.dark p { color: #a9b0bc; }
a.rtx-card { display: block; text-decoration: none; transition: transform .25s var(--rtx-ease), box-shadow .25s var(--rtx-ease), border-color .25s; }
a.rtx-card:hover { transform: translateY(-3px); box-shadow: var(--rtx-shadow-lg); border-color: #d3d8e0; }

.rtx-ico {
    width: 46px; height: 46px; border-radius: 13px;
    display: inline-grid; place-items: center;
    background: var(--rtx-red-soft); color: var(--rtx-red);
    font-size: 21px; font-weight: 800; margin-bottom: 16px;
}
.rtx-card.dark .rtx-ico { background: rgba(213,179,106,.12); color: var(--rtx-gold); }

/* Buttons */
.rtx-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 50px; padding: 0 26px; border-radius: 12px; border: 1px solid transparent;
    font: 800 15px var(--rtx-font); text-decoration: none; cursor: pointer;
    transition: transform .2s var(--rtx-ease), background .2s, box-shadow .2s;
}
.rtx-btn:active { transform: scale(.98); }
.rtx-btn.primary { background: var(--rtx-red); color: #fff; box-shadow: 0 10px 24px rgba(200,16,46,.28); }
.rtx-btn.primary:hover { background: var(--rtx-red-deep); }
.rtx-btn.ghost { background: transparent; color: var(--rtx-ink); border-color: #cfd4dc; }
.rtx-btn.ghost:hover { background: var(--rtx-paper); }
.rtx-btn.light { background: #fff; color: var(--rtx-ink); }
.rtx-btn.gold { background: var(--rtx-gold); color: #1a1407; }
.rtx-btn.sm { min-height: 40px; padding: 0 18px; font-size: 14px; border-radius: 10px; }
.rtx-btn.block { width: 100%; }
.rtx-section.dark .rtx-btn.ghost, .rtx-hero .rtx-btn.ghost { color: #fff; border-color: rgba(255,255,255,.28); }
.rtx-section.dark .rtx-btn.ghost:hover, .rtx-hero .rtx-btn.ghost:hover { background: rgba(255,255,255,.08); }
.rtx-btn[disabled] { opacity: .55; pointer-events: none; }

.rtx-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
    border-radius: 999px; font-size: 12.5px; font-weight: 700;
    background: var(--rtx-paper); color: var(--rtx-muted); border: 1px solid var(--rtx-line);
}
.rtx-chip.red { background: var(--rtx-red-soft); color: var(--rtx-red); border-color: #f6cfcb; }
.rtx-chip.gold { background: #faf3e3; color: #7a5a14; border-color: #efdfb6; }
.rtx-chip.green { background: #e7f7f0; color: #08744f; border-color: #bfe8d6; }

/* ---------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------- */
.rtx-hero {
    position: relative; overflow: hidden; color: #fff;
    background:
        radial-gradient(900px 480px at 85% -10%, rgba(200,16,46,.38), transparent 60%),
        radial-gradient(600px 400px at -10% 110%, rgba(213,179,106,.14), transparent 60%),
        var(--rtx-ink);
    padding: 76px 0 96px;
}
.rtx-hero.compact { padding: 64px 0 60px; }
.rtx-hero h1 { color: #fff; font-size: clamp(38px, 6.2vw, 72px); max-width: 15ch; margin-bottom: 22px; }
.rtx-hero.compact h1 { font-size: clamp(34px, 5vw, 56px); max-width: 20ch; }
.rtx-hero .rtx-lead { color: #b6bcc7; max-width: 56ch; margin-bottom: 32px; }
.rtx-hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.rtx-cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.rtx-trust { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 34px; color: #98a0ad; font-size: 13.5px; font-weight: 600; }
.rtx-trust span::before { content: "\2713"; color: var(--rtx-gold); margin-right: 8px; font-weight: 800; }
.rtx-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13.5px; color: #98a0ad; margin-bottom: 18px; }
.rtx-crumbs a { color: #cfd4dc; text-decoration: none; }
.rtx-crumbs a:hover { color: #fff; }

/* Live allocation card in the hero */
.rtx-panel {
    background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
    border: 1px solid rgba(255,255,255,.14); border-radius: 22px; padding: 26px;
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 30px 70px rgba(0,0,0,.45);
}
.rtx-panel h3 { color: #fff; font-family: var(--rtx-font); font-size: 15px; font-weight: 700; color: #cfd4dc; margin-bottom: 4px; }
.rtx-panel .big { font-family: var(--rtx-display); font-size: 44px; font-weight: 600; color: #fff; letter-spacing: -.02em; }
.rtx-bar-row { margin-top: 18px; }
.rtx-bar-row .lbl { display: flex; justify-content: space-between; font-size: 13.5px; color: #cfd4dc; margin-bottom: 7px; font-weight: 600; }
.rtx-bar { height: 8px; background: rgba(255,255,255,.1); border-radius: 99px; overflow: hidden; }
.rtx-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--rtx-red), #ff5a6e); }
.rtx-bar i.g { background: linear-gradient(90deg, var(--rtx-gold-deep), var(--rtx-gold)); }
.rtx-bar i.b { background: linear-gradient(90deg, #3b82f6, #7cb2ff); }
.rtx-bar i.s { background: linear-gradient(90deg, #0e9f6e, #4bd6a3); }

/* Market ticker */
.rtx-ticker { background: #07080b; border-bottom: 1px solid var(--rtx-line-dark); overflow: hidden; white-space: nowrap; }
.rtx-ticker-track { display: inline-flex; gap: 38px; padding: 10px 0; animation: rtxTick 60s linear infinite; }
.rtx-ticker:hover .rtx-ticker-track { animation-play-state: paused; }
.rtx-tick { font-size: 13px; font-weight: 700; color: #cfd4dc; }
.rtx-tick b { color: #fff; margin-right: 6px; }
.rtx-tick .up { color: #4bd6a3; } .rtx-tick .dn { color: #ff7b6e; }
@keyframes rtxTick { to { transform: translateX(-50%); } }

/* Stat strip */
.rtx-stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--rtx-line); border-radius: var(--rtx-radius); background: #fff; box-shadow: var(--rtx-shadow); overflow: hidden; }
.rtx-stat { padding: 26px 24px; border-right: 1px solid var(--rtx-line); }
.rtx-stat:last-child { border-right: 0; }
.rtx-stat strong { display: block; font-family: var(--rtx-display); font-size: 38px; font-weight: 600; color: var(--rtx-ink); letter-spacing: -.02em; line-height: 1.1; }
.rtx-stat span { font-size: 14px; color: var(--rtx-muted); font-weight: 600; }

/* Steps */
.rtx-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.rtx-step { position: relative; padding: 26px; border-radius: var(--rtx-radius); background: #fff; border: 1px solid var(--rtx-line); box-shadow: var(--rtx-shadow); }
.rtx-step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--rtx-ink); color: var(--rtx-gold); font-weight: 800; margin-bottom: 16px; }
.rtx-step h3 { font-size: 18px; margin-bottom: 6px; font-family: var(--rtx-font); font-weight: 800; letter-spacing: -.01em; }
.rtx-step p { font-size: 14.5px; color: var(--rtx-muted); }

/* Sector cards */
.rtx-sector { display: flex; flex-direction: column; gap: 12px; height: 100%; }
.rtx-sector .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rtx-sector .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }

/* FAQ */
.rtx-faq details { background: #fff; border: 1px solid var(--rtx-line); border-radius: 14px; margin-bottom: 12px; overflow: hidden; }
.rtx-faq summary { cursor: pointer; list-style: none; padding: 20px 56px 20px 22px; font-weight: 800; font-size: 16.5px; color: var(--rtx-ink); position: relative; }
.rtx-faq summary::-webkit-details-marker { display: none; }
.rtx-faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 24px; color: var(--rtx-red); font-weight: 600; transition: transform .2s; }
.rtx-faq details[open] summary::after { content: "\2212"; }
.rtx-faq .ans { padding: 0 22px 22px; color: var(--rtx-muted); font-size: 15.5px; }

/* Education & articles */
.rtx-article { font-size: 17.5px; line-height: 1.85; color: #2a3140; }
.rtx-article h2 { font-size: clamp(26px, 3.4vw, 34px); margin: 52px 0 14px; }
.rtx-article h3 { font-size: 21px; margin: 32px 0 10px; font-family: var(--rtx-font); font-weight: 800; }
.rtx-article p { margin: 0 0 18px; }
.rtx-article ul, .rtx-article ol { margin: 0 0 22px; padding-left: 24px; }
.rtx-article li { margin-bottom: 8px; }
.rtx-article a { color: var(--rtx-red); font-weight: 600; }
.rtx-article blockquote { margin: 26px 0; padding: 18px 22px; border-left: 4px solid var(--rtx-gold); background: var(--rtx-paper); border-radius: 0 12px 12px 0; font-family: var(--rtx-display); font-size: 21px; color: var(--rtx-ink); }
.rtx-article img { border-radius: 14px; margin: 18px 0; height: auto; }
.rtx-callout { display: flex; gap: 14px; padding: 18px 20px; border-radius: 14px; background: #faf3e3; border: 1px solid #efdfb6; margin: 26px 0; font-size: 15.5px; color: #54400f; }
.rtx-callout.red { background: var(--rtx-red-soft); border-color: #f6cfcb; color: #6e1a15; }
.rtx-callout strong { color: inherit; }
.rtx-toc { position: sticky; top: 96px; align-self: start; }
.rtx-toc a { display: block; padding: 9px 14px; border-left: 2px solid var(--rtx-line); color: var(--rtx-muted); text-decoration: none; font-size: 14.5px; font-weight: 600; }
.rtx-toc a:hover, .rtx-toc a.on { color: var(--rtx-red); border-left-color: var(--rtx-red); background: var(--rtx-red-soft); }
.rtx-two { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; }
.rtx-glossary dt { font-weight: 800; color: var(--rtx-ink); margin-top: 16px; }
.rtx-glossary dd { margin: 4px 0 0; color: var(--rtx-muted); }
.rtx-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.rtx-pill { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--rtx-line); background: #fff; font-weight: 700; font-size: 14px; text-decoration: none; color: var(--rtx-text); }
.rtx-pill.on, .rtx-pill:hover { background: var(--rtx-ink); color: #fff; border-color: var(--rtx-ink); }

/* Blog */
.rtx-post { display: flex; flex-direction: column; overflow: hidden; padding: 0; height: 100%; }
.rtx-post .cover { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--rtx-ink), var(--rtx-red-deep)); position: relative; }
.rtx-post .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rtx-post .body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.rtx-post h3 { font-size: 19px; line-height: 1.3; }
.rtx-post .by { margin-top: auto; font-size: 13px; color: var(--rtx-muted); font-weight: 600; }

/* Tables and forms (also used inside client/admin) */
.rtx-table-wrap { overflow-x: auto; border: 1px solid var(--rtx-line); border-radius: 14px; background: #fff; -webkit-overflow-scrolling: touch; }
.rtx-table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
.rtx-table th { text-align: left; padding: 14px 16px; background: var(--rtx-paper); color: var(--rtx-muted); font-size: 12.5px; font-weight: 800; border-bottom: 1px solid var(--rtx-line); }
.rtx-table td { padding: 14px 16px; border-bottom: 1px solid var(--rtx-line); vertical-align: top; }
.rtx-table tr:last-child td { border-bottom: 0; }

.rtx-field { margin-bottom: 18px; }
.rtx-field label { display: block; font-weight: 800; font-size: 14px; margin-bottom: 7px; color: var(--rtx-ink); }
.rtx-field small { display: block; margin-top: 6px; color: var(--rtx-muted); font-size: 13px; }
.rtx-input, .rtx-select, .rtx-textarea {
    width: 100%; min-height: 50px; padding: 12px 15px; border-radius: 12px;
    border: 1px solid #cfd4dc; background: #fff; font: 600 16px var(--rtx-font); color: var(--rtx-ink);
    transition: border-color .15s, box-shadow .15s;
}
.rtx-textarea { min-height: 150px; resize: vertical; line-height: 1.6; font-weight: 500; }
.rtx-input:focus, .rtx-select:focus, .rtx-textarea:focus { outline: 0; border-color: var(--rtx-red); box-shadow: 0 0 0 4px rgba(200,16,46,.12); }
.rtx-alert { padding: 14px 18px; border-radius: 12px; margin-bottom: 20px; font-weight: 600; font-size: 14.5px; }
.rtx-alert.ok { background: #e7f7f0; color: #08744f; border: 1px solid #bfe8d6; }
.rtx-alert.err { background: #fdeceb; color: #a1170f; border: 1px solid #f6cfcb; }
.rtx-alert.info { background: #eef4ff; color: #1d4ed8; border: 1px solid #cddcff; }

.rtx-badge { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.rtx-badge.pending { background: #fff4d6; color: #8a5a00; }
.rtx-badge.active, .rtx-badge.published, .rtx-badge.sent { background: #e2f6ec; color: #08744f; }
.rtx-badge.declined, .rtx-badge.failed { background: #fdeceb; color: #a1170f; }
.rtx-badge.draft, .rtx-badge.closed { background: #eceef2; color: #4b5563; }

/* CTA band */
.rtx-cta-band {
    border-radius: 26px; padding: 56px 40px; text-align: center; color: #fff;
    background: radial-gradient(700px 300px at 80% 0, rgba(200,16,46,.5), transparent 60%), var(--rtx-ink);
}
.rtx-cta-band h2 { color: #fff; font-size: clamp(28px, 4vw, 42px); margin-bottom: 12px; }
.rtx-cta-band p { color: #b6bcc7; max-width: 52ch; margin: 0 auto 26px; }
.rtx-cta-band .rtx-cta-row { justify-content: center; }

.rtx-disclaimer { font-size: 13px; color: var(--rtx-muted); line-height: 1.7; padding: 22px 0; border-top: 1px solid var(--rtx-line); }

/* Calculator / allocator */
.rtx-calc { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: start; }
.rtx-range { width: 100%; accent-color: var(--rtx-red); height: 32px; }
.rtx-alloc-row { display: grid; grid-template-columns: 1fr 64px; gap: 10px 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rtx-line); }
.rtx-alloc-row:last-child { border-bottom: 0; }
.rtx-alloc-row .nm { font-weight: 800; display: flex; align-items: center; gap: 10px; }
.rtx-alloc-row .pc { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.rtx-alloc-row input[type=range] { grid-column: 1 / -1; }
.rtx-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.rtx-choice label { position: relative; display: block; cursor: pointer; }
.rtx-choice input { position: absolute; opacity: 0; inset: 0; }
.rtx-choice .opt { display: block; padding: 16px; border-radius: 14px; border: 2px solid var(--rtx-line); background: #fff; transition: border-color .15s, background .15s; height: 100%; }
.rtx-choice .opt b { display: block; font-size: 15.5px; color: var(--rtx-ink); }
.rtx-choice .opt span { font-size: 13px; color: var(--rtx-muted); }
.rtx-choice input:checked + .opt { border-color: var(--rtx-red); background: var(--rtx-red-soft); }
.rtx-choice input:focus-visible + .opt { outline: 3px solid rgba(200,16,46,.4); outline-offset: 2px; }

/* Reveal: one orchestrated entrance, not per-element */
.rtx-rise { animation: rtxRise .7s var(--rtx-ease) both; }
@keyframes rtxRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 1000px) {
    .rtx-g4, .rtx-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rtx-g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rtx-hero-grid, .rtx-calc, .rtx-two { grid-template-columns: 1fr; }
    .rtx-toc { position: static; display: flex; overflow-x: auto; gap: 6px; padding-bottom: 6px; }
    .rtx-toc a { white-space: nowrap; border-left: 0; border-bottom: 2px solid var(--rtx-line); }
    .rtx-stats { grid-template-columns: repeat(2, 1fr); }
    .rtx-stat:nth-child(2) { border-right: 0; }
    .rtx-stat:nth-child(-n+2) { border-bottom: 1px solid var(--rtx-line); }
}
@media (max-width: 640px) {
    .rtx-wrap { padding: 0 18px; }
    .rtx-section { padding: 56px 0; }
    .rtx-hero { padding: 44px 0 52px; }
    .rtx-hero.compact { padding: 40px 0 36px; }
    .rtx-panel .big { font-size: 30px; }
    .rtx-g2, .rtx-g3, .rtx-g4, .rtx-steps { grid-template-columns: 1fr; }
    .rtx-card { padding: 22px; }
    .rtx-cta-band { padding: 40px 22px; border-radius: 20px; }
    .rtx-cta-row .rtx-btn { flex: 1 1 100%; }
    .rtx-head { margin-bottom: 30px; }
    .rtx-stat strong { font-size: 30px; }
    .rtx-article { font-size: 16.5px; }
}

/* ---------------------------------------------------------------------
   MOBILE APP SHELL (all areas)
   --------------------------------------------------------------------- */
.rtx-tabbar, .rtx-sheet, .rtx-sheet-bg, .rtx-appbar, .rtx-fab, .rtx-toast-host, .rtx-install { display: none; }

@media (max-width: 900px) {
    html.rtx-has-tabs body { padding-bottom: calc(var(--rtx-tab-h) + var(--rtx-safe-b) + 8px); }

    .rtx-tabbar {
        display: grid; grid-template-columns: repeat(5, 1fr);
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000;
        height: calc(var(--rtx-tab-h) + var(--rtx-safe-b));
        padding: 6px 6px var(--rtx-safe-b);
        background: rgba(11,13,17,.94);
        -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px);
        border-top: 1px solid var(--rtx-line-dark);
        font-family: var(--rtx-font);
    }
    .rtx-tab {
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        border: 0; background: none; color: #8d95a3; text-decoration: none;
        font: 700 10.5px var(--rtx-font); border-radius: 12px; cursor: pointer; min-width: 0;
        -webkit-touch-callout: none; user-select: none;
    }
    .rtx-tab svg { width: 23px; height: 23px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .rtx-tab.on { color: #fff; }
    .rtx-tab.on svg { stroke: var(--rtx-gold); }
    .rtx-tab:active { background: rgba(255,255,255,.07); }
    .rtx-tab.hero-tab span.ring { display: grid; place-items: center; width: 44px; height: 44px; margin-top: -20px; border-radius: 50%; background: var(--rtx-red); box-shadow: 0 8px 20px rgba(200,16,46,.5), 0 0 0 5px var(--rtx-ink); color: #fff; }
    .rtx-tab.hero-tab svg { stroke: #fff; }
    .rtx-tab.hero-tab { color: #fff; }

    .rtx-sheet-bg { display: block; position: fixed; inset: 0; z-index: 9100; background: rgba(5,6,8,.6); opacity: 0; pointer-events: none; transition: opacity .25s; }
    .rtx-sheet-bg.open { opacity: 1; pointer-events: auto; }
    .rtx-sheet {
        display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9200;
        max-height: 82vh; overflow-y: auto; overscroll-behavior: contain;
        background: #fff; color: var(--rtx-text); border-radius: 24px 24px 0 0;
        padding: 10px 18px calc(24px + var(--rtx-safe-b));
        transform: translateY(105%); transition: transform .32s var(--rtx-ease);
        font-family: var(--rtx-font); box-shadow: 0 -20px 60px rgba(0,0,0,.35);
    }
    .rtx-sheet.open { transform: none; }
    .rtx-sheet .grab { width: 44px; height: 5px; border-radius: 9px; background: #d6dae1; margin: 4px auto 14px; }
    .rtx-sheet h4 { font: 800 13px var(--rtx-font); color: var(--rtx-muted); margin: 14px 4px 6px; }
    .rtx-sheet a.row { display: flex; align-items: center; gap: 14px; padding: 14px 10px; border-radius: 12px; color: var(--rtx-ink); text-decoration: none; font-weight: 700; font-size: 16px; }
    .rtx-sheet a.row:active, .rtx-sheet a.row:hover { background: var(--rtx-paper); }
    .rtx-sheet a.row svg { width: 22px; height: 22px; stroke: var(--rtx-red); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
    .rtx-sheet a.row small { display: block; font-weight: 500; font-size: 12.5px; color: var(--rtx-muted); }
    .rtx-sheet .cta2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 4px; }

    /* Floating back button (bottom-left): you can always get out of a page */
    .rtx-appbar {
        display: flex; align-items: center; gap: 10px;
        position: fixed; left: 14px; z-index: 8400;
        bottom: calc(var(--rtx-tab-h) + var(--rtx-safe-b) + 14px);
    }
    .rtx-appbar button {
        width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18);
        background: rgba(11,13,17,.78); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
        color: #fff; display: grid; place-items: center; cursor: pointer;
    }
    .rtx-appbar svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
    html:not(.rtx-can-back) .rtx-appbar { display: none; }

    .rtx-fab {
        display: grid; place-items: center; position: fixed; right: 14px; z-index: 8400;
        bottom: calc(var(--rtx-tab-h) + var(--rtx-safe-b) + 14px);
        width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
        background: var(--rtx-ink); color: #fff; box-shadow: 0 8px 22px rgba(0,0,0,.35);
        opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s, transform .2s;
    }
    .rtx-fab.show { opacity: 1; transform: none; pointer-events: auto; }
    .rtx-fab svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

    /* The old Crisp chat bubble must not sit under the tab bar */
    html.rtx-has-tabs .crisp-client .cc-1brb6 { bottom: calc(var(--rtx-tab-h) + var(--rtx-safe-b) + 66px) !important; }

    /* Public site: compact, app-like footer */
    html.rtx-ctx-public .redtail-footer { padding-bottom: 12px; }

    /* Client area polish */
    html.rtx-ctx-client .rt-client-footer { display: none; }
    html.rtx-ctx-client .rt-client-main { padding-bottom: 8px; }

    /* Admin: replace the stacked sidebar with a real drawer */
    html.rtx-ctx-admin .sidebar {
        position: fixed; top: 0; left: 0; bottom: 0; width: min(84vw, 320px); height: 100%;
        transform: translateX(-102%); transition: transform .3s var(--rtx-ease);
        padding: 20px 14px calc(24px + var(--rtx-safe-b)); box-shadow: 0 0 60px rgba(0,0,0,.5);
    }
    html.rtx-ctx-admin.rtx-drawer .sidebar { transform: none; }
    html.rtx-ctx-admin .sidebar a { display: flex; width: auto; margin-right: 0; }
    html.rtx-ctx-admin .main { margin-left: 0; padding: 14px; }
    html.rtx-ctx-admin .topbar { position: sticky; top: 8px; z-index: 50; }
    html.rtx-ctx-admin table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
}

/* Add-to-home-screen hint */
@media (max-width: 900px) {
    .rtx-install {
        display: none; position: fixed; left: 12px; right: 12px; z-index: 9050;
        bottom: calc(var(--rtx-tab-h) + var(--rtx-safe-b) + 12px);
        background: #fff; color: var(--rtx-ink); border-radius: 16px; padding: 14px 16px;
        box-shadow: var(--rtx-shadow-lg); align-items: center; gap: 12px; font: 600 14px var(--rtx-font);
    }
    .rtx-install.show { display: flex; }
    .rtx-install img { width: 40px; height: 40px; border-radius: 10px; }
    .rtx-install div { flex: 1; line-height: 1.35; }
    .rtx-install button { border: 0; border-radius: 10px; padding: 10px 14px; font: 800 13px var(--rtx-font); cursor: pointer; }
    .rtx-install .go { background: var(--rtx-red); color: #fff; }
    .rtx-install .no { background: transparent; color: var(--rtx-muted); }
}

/* Toasts */
.rtx-toast-host { display: block; position: fixed; left: 50%; transform: translateX(-50%); bottom: 90px; z-index: 9500; width: min(92vw, 420px); pointer-events: none; }
.rtx-toast { background: var(--rtx-ink); color: #fff; padding: 13px 18px; border-radius: 12px; margin-top: 8px; font: 700 14px var(--rtx-font); box-shadow: var(--rtx-shadow-lg); animation: rtxRise .3s var(--rtx-ease) both; }

/* Standalone (installed app) tweaks */
@media (display-mode: standalone) {
    body { overscroll-behavior-y: none; }
    html.rtx-ctx-public .rt-header { padding-top: var(--rtx-safe-t); }
}

/* ---------------------------------------------------------------------
   Skin for existing client and admin pages (low specificity, additive)
   --------------------------------------------------------------------- */
html.rtx-ctx-client body, html.rtx-ctx-admin body { font-family: var(--rtx-font); }
html.rtx-ctx-client .rt-card, html.rtx-ctx-client .rt-panel { border-radius: 18px; }
html.rtx-ctx-admin .topbar, html.rtx-ctx-admin .card { border-radius: 14px; }
html.rtx-ctx-admin .sidebar a.active { box-shadow: inset 3px 0 0 var(--rtx-red); }
html.rtx-ctx-client input, html.rtx-ctx-client select, html.rtx-ctx-client textarea,
html.rtx-ctx-admin input, html.rtx-ctx-admin select, html.rtx-ctx-admin textarea { font-size: 16px; }

@media print { .rtx-tabbar, .rtx-sheet, .rtx-fab, .rtx-appbar, .rtx-install { display: none !important; } }

/* ---------------------------------------------------------------------
   Container for new pages inside the client and admin shells
   --------------------------------------------------------------------- */
.rtx-app { font-family: var(--rtx-font); color: var(--rtx-text); max-width: 1120px; margin: 0 auto; padding: 28px 24px 40px; line-height: 1.6; }
.rtx-app *, .rtx-app *::before, .rtx-app *::after { box-sizing: border-box; }
.rtx-app h1, .rtx-app h2, .rtx-app h3 { margin: 0; color: var(--rtx-ink); letter-spacing: -.02em; line-height: 1.2; }
.rtx-app h1 { font-family: var(--rtx-display); font-weight: 600; font-size: clamp(28px, 4vw, 38px); }
.rtx-app h2 { font-size: 20px; font-weight: 800; margin-bottom: 14px; }
.rtx-app .rtx-sub { color: var(--rtx-muted); margin: 8px 0 26px; font-size: 15.5px; }
.rtx-app .rtx-card { margin-bottom: 20px; }
.rtx-app a { color: inherit; }
.rtx-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.rtx-kpi { background: #fff; border: 1px solid var(--rtx-line); border-radius: 16px; padding: 18px 20px; box-shadow: var(--rtx-shadow); }
.rtx-kpi small { display: block; color: var(--rtx-muted); font-weight: 700; font-size: 13px; }
.rtx-kpi strong { font-family: var(--rtx-display); font-size: 30px; font-weight: 600; color: var(--rtx-ink); letter-spacing: -.02em; }
.rtx-stepper { display: flex; gap: 8px; margin-bottom: 22px; overflow-x: auto; }
.rtx-stepper span { flex: 1 0 auto; min-width: 96px; text-align: center; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--rtx-line); font-weight: 800; font-size: 13px; color: var(--rtx-muted); }
.rtx-stepper span.on { background: var(--rtx-ink); color: #fff; border-color: var(--rtx-ink); }
.rtx-stepper span.done { color: var(--rtx-up); }
.rtx-meter { height: 10px; border-radius: 99px; background: linear-gradient(90deg, #0e9f6e, #f0b429 55%, #d92d20); position: relative; margin: 10px 0 8px; }
.rtx-meter i { position: absolute; top: -5px; width: 6px; height: 20px; border-radius: 4px; background: var(--rtx-ink); border: 2px solid #fff; transform: translateX(-50%); transition: left .25s var(--rtx-ease); box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.rtx-sticky-actions { position: sticky; bottom: calc(var(--rtx-tab-h) + var(--rtx-safe-b) + 8px); z-index: 20; }
.rtx-total { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--rtx-paper); font-weight: 800; }
.rtx-total.bad { background: #fdeceb; color: #a1170f; }
.rtx-total.good { background: #e7f7f0; color: #08744f; }
.rtx-spark { width: 100%; height: 150px; display: block; }
@media (min-width: 901px) { .rtx-sticky-actions { bottom: 12px; } }
@media (max-width: 640px) { .rtx-app { padding: 18px 14px 28px; } }

/* ---------------------------------------------------------------------
   Regulatory badges, live widgets, tabs, quiz
   --------------------------------------------------------------------- */
.rtx-reg { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 30px; }
.rtx-reg-label { font-size: 12px; font-weight: 800; color: #98a0ad; width: 100%; }
.rtx-reg a { display: inline-flex; gap: 8px; align-items: center; padding: 10px 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,.16); color: #e8eaee; text-decoration: none; font-size: 13.5px; font-weight: 600; background: rgba(255,255,255,.05); }
.rtx-reg a strong { color: var(--rtx-gold); }
.rtx-reg a em { font-style: normal; color: #fff; background: var(--rtx-red); padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 800; }
.rtx-reg:not(.dark) a { color: var(--rtx-text); border-color: var(--rtx-line); background: #fff; }
.rtx-reg:not(.dark) a strong { color: var(--rtx-red); }
.rtx-reg:not(.dark) .rtx-reg-label { color: var(--rtx-muted); }
.rtx-tv { border: 1px solid var(--rtx-line); border-radius: 16px; overflow: hidden; background: #fff; box-shadow: var(--rtx-shadow); }
.rtx-tv-load { display: grid; place-items: center; min-height: 200px; color: var(--rtx-muted); font-weight: 700; }
.rtx-tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 20px; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.rtx-tabs::-webkit-scrollbar { display: none; }
.rtx-tabs button { flex: 0 0 auto; padding: 11px 20px; border-radius: 999px; border: 1px solid var(--rtx-line); background: #fff; font: 800 14px var(--rtx-font); color: var(--rtx-text); cursor: pointer; }
.rtx-tabs button.on { background: var(--rtx-ink); color: #fff; border-color: var(--rtx-ink); }
.rtx-panelx { display: none; }
.rtx-panelx.on { display: block; animation: rtxRise .4s var(--rtx-ease) both; }
.rtx-result { background: var(--rtx-ink); color: #fff; border-radius: 18px; padding: 26px; }
.rtx-result .big { font-family: var(--rtx-display); font-size: clamp(34px, 5vw, 48px); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.rtx-result small { color: #a9b0bc; font-weight: 700; display: block; margin-bottom: 4px; }
.rtx-result .row { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--rtx-line-dark); font-size: 14.5px; color: #cfd4dc; }
.rtx-quiz-q { margin-bottom: 26px; }
.rtx-quiz-q h3 { font-size: 17px; margin-bottom: 12px; font-family: var(--rtx-font); font-weight: 800; }
.rtx-trustbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.rtx-orbit { position: relative; aspect-ratio: 1; max-width: 420px; margin: 0 auto; border-radius: 50%; border: 1px dashed rgba(255,255,255,.18); display: grid; place-items: center; }
.rtx-orbit::before { content: ""; position: absolute; inset: 14%; border-radius: 50%; border: 1px solid rgba(213,179,106,.35); }
.rtx-orbit .core { width: 34%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #ff5a6e, var(--rtx-red-deep)); display: grid; place-items: center; font-family: var(--rtx-display); font-size: 34px; color: #fff; box-shadow: 0 0 80px rgba(200,16,46,.55); }
.rtx-orbit .tag { position: absolute; padding: 8px 14px; border-radius: 99px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); color: #fff; font-size: 12.5px; font-weight: 700; backdrop-filter: blur(8px); }

/* ---------------------------------------------------------------------
   Fixes found during page testing
   --------------------------------------------------------------------- */
body { margin: 0; }
/* The original nav only animates in the first six links; give the new ones a delay index so they become visible */
.rt-nav-link:nth-child(7) { --i: 7; }
.rt-nav-link:nth-child(8) { --i: 8; }
/* Eight links need more room: below 1320px the two newest live in the footer, tab bar and mobile menu */
@media (min-width: 1051px) and (max-width: 1320px) {
    .rt-nav-link:nth-child(n+7) { display: none; }
}
.rtx-cta-band .rtx-btn.ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.rtx-cta-band .rtx-btn.ghost:hover { background: rgba(255,255,255,.08); }
.rtx-sticky-actions { position: static; }

/* ---------------------------------------------------------------------
   Logo: transparent artwork that blends with each surface (no white box)
   --------------------------------------------------------------------- */
.rt-logo { width: auto; max-width: 100%; height: auto; max-height: 52px; background: none; }
.rt-brand { height: 64px; }
.redtail-footer-logo { width: auto; max-width: 270px; max-height: 68px; background: none; }
.rt-client-brand-name img { max-width: 190px; max-height: 50px; transform: none; background: none; }

/* Sign-in and sign-up sit on light cards: use the dark-text transparent logo with no badge behind it */
.redtail-login-logo { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; min-width: 0 !important; min-height: 0 !important; overflow: visible !important; }
.redtail-login-logo::before, .redtail-login-logo::after { display: none !important; }
.redtail-login-logo img { max-width: 230px !important; max-height: 60px !important; filter: none !important; }
.redtail-signup-mark { width: auto !important; height: auto !important; background: none !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important; margin-bottom: 22px !important; opacity: 1 !important; transform: none !important; animation: none !important; }
.redtail-signup-mark::before, .redtail-signup-mark::after { display: none !important; }
.redtail-signup-mark img { max-width: 230px !important; max-height: 60px !important; filter: none !important; }

@media (max-width: 650px) { .rt-logo { max-height: 46px; } .redtail-footer-logo { max-width: 220px; } }

/* No sideways scrolling: stray glow/shadow layers must never make the page wider than the screen.
   "clip" (unlike "hidden") keeps the sticky header working. */
html, body { overflow-x: clip; max-width: 100%; }
.redtail-signup-mark { justify-content: flex-start !important; }
.rt-client-brand { height: auto !important; min-height: 0 !important; padding: 22px 24px 20px !important; overflow: visible !important; }
.rt-client-brand-name { height: auto !important; }
.rt-client-brand { flex: 0 0 auto !important; }
.rt-client-nav { min-height: 0; }
