/* ==========================================================================
   compare-accounts.css
   /account-type (Compare Trading Accounts). Ported from
   update/stage6/Trading/Compare Accounts.html.

   LOAD ORDER on that page is style.css → accounts.css → about.css → this file.
   accounts.css is there for .account-tabs (the Standard/Raw/Elite strip, whose
   border-top is also the fixed-navbar clearance) and for .compare-card, the
   shared account-card trio. about.css is the editorial kit everything below
   builds on.

   EVERY FIGURE IN THE MATRIX IS BRD §7 APPROVED DATA and matches
   page/{standard,raw,elite}-account.html row for row. Three accounts, no more:
   Standard and Raw take no minimum deposit, Elite takes USD 100,000. Do not add
   a tier, a deposit, a leverage cap or a commission rate that is not already on
   those three pages — a value that appears here and nowhere else is a value
   nobody has signed off.

   THE MOBILE COMPARATOR READS THE DESKTOP TABLE. It does not carry its own copy
   of the data (see js/compare-accounts.js), so the two views cannot drift and
   the matrix stays translatable through data-lang like every other table on the
   site. The stage6 source built both views from a JS array, which would have
   put twenty-two untranslatable strings into a script file.

   THE STAGE6 HEAD CARDS ARE NOT PORTED. The source opens with a trio of
   positioning cards above the matrix; this page already mounts
   partials/account-cards.html, the shared Standard/Raw/Elite trio that the
   homepage and all six market pages also mount (NFR-07). Two card trios on one
   page is one too many, and the thinner of the two is the one that would drift.
   The head cards' copy is not lost — it is the .th-note line under each account
   name in the matrix head.
   ========================================================================== */

/* Arabic sets no letter-spacing anywhere on this site — the script is joined
   and spacing breaks the ligatures. */
.rtl .cmp-matrix thead .th-name,
.rtl .cmp-matrix thead th.th-feat,
.rtl .cmp-cat th,
.rtl .cmp-mcat,
.rtl .cmp-msel label,
.rtl .cmp-mrow .cell .lab,
.rtl .cmp-vs {
  letter-spacing: normal;
}

/* --------------------------------------------------------------------------
   1. Desktop comparison matrix
   A real <table> with <th scope> throughout, so it is navigable by row and
   column in a screen reader and readable with JavaScript off.
   -------------------------------------------------------------------------- */
.cmp-matrix-wrap {
  margin-top: 52px;
}

.cmp-matrix {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.cmp-matrix col.col-feat {
  width: 28%;
}

.cmp-matrix col.col-acct {
  width: 24%;
}

/* Sticky account header. It parks under the fixed navbar rather than at the
   viewport top — --nav-h is published on :root by js/layout.js. */
.cmp-matrix thead th {
  position: sticky;
  top: var(--nav-h, 78px);
  z-index: 5;
  padding: 20px 22px;
  text-align: left;
  vertical-align: bottom;
  background: var(--ab-alt);
  color: var(--ab-ink);
}

.rtl .cmp-matrix thead th,
.rtl .cmp-matrix tbody th {
  text-align: right;
}

.cmp-matrix thead th.th-feat {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ab-ink-muted);
}

.cmp-matrix thead th.is-elite {
  box-shadow: inset 0 3px 0 var(--ab-gold);
}

.cmp-matrix thead .th-name {
  display: block;
  margin-bottom: 8px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ab-gold);
}

.cmp-matrix thead .th-title {
  font-size: 1.28rem;
  font-weight: 500;
}

.cmp-matrix thead .th-note {
  display: block;
  margin-top: 6px;
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--ab-ink-muted);
}

/* Category bands. A colgroup-scoped th, so the grouping is announced rather
   than merely drawn. */
.cmp-cat th {
  padding: 12px 22px;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ab-gold);
  background: var(--ab-base);
}

.cmp-matrix tbody tr {
  border-bottom: 1px solid var(--ab-line);
}

.cmp-matrix tbody th {
  padding: 18px 22px;
  text-align: left;
  vertical-align: top;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ab-ink);
}

.cmp-matrix tbody td {
  padding: 18px 22px;
  vertical-align: top;
  font-size: 0.9rem;
  color: var(--ab-ink-muted);
}

/* The Elite column is tinted, not boxed — a continuous wash down the table. */
.cmp-matrix td.is-elite {
  background: var(--ab-glow);
  color: var(--ab-ink);
}

.cmp-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ab-ink);
}

.cmp-check svg {
  flex-shrink: 0;
  color: var(--ab-gold);
}

/* --------------------------------------------------------------------------
   2. Mobile comparator
   Two accounts at a time, chosen by the reader. Hidden above the breakpoint and
   populated by js/compare-accounts.js from the table above; with JavaScript off
   it stays empty and the table remains the visible view.
   -------------------------------------------------------------------------- */
.cmp-mobile {
  display: none;
}

.cmp-mcontrols {
  position: sticky;
  top: var(--nav-h, 78px);
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: end;
  padding: 16px 0 14px;
  background: var(--ab-base);
  border-bottom: 1px solid var(--ab-line);
}

.ab-band--alt .cmp-mcontrols {
  background: var(--ab-alt);
}

.cmp-msel {
  position: relative;
}

.cmp-msel label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ab-ink-muted);
}

.cmp-msel select {
  width: 100%;
  padding: 12px 34px 12px 14px;
  appearance: none;
  -webkit-appearance: none;
  font-size: 1.02rem;
  color: var(--ab-ink);
  background: var(--ab-panel);
  border: 1px solid var(--ab-line);
  border-radius: 0;
  cursor: pointer;
}

.rtl .cmp-msel select {
  padding: 12px 14px 12px 34px;
}

.cmp-msel select:focus-visible {
  outline: 2px solid var(--ab-gold);
  outline-offset: 2px;
}

.cmp-msel::after {
  content: '';
  position: absolute;
  right: 14px;
  bottom: 18px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--ab-gold);
  border-bottom: 1.5px solid var(--ab-gold);
  transform: rotate(45deg);
  pointer-events: none;
}

.rtl .cmp-msel::after {
  right: auto;
  left: 14px;
}

.cmp-msel.is-elite select {
  box-shadow: inset 0 2px 0 var(--ab-gold);
}

.cmp-vs {
  padding-bottom: 14px;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ab-gold);
}

.cmp-mcat {
  margin: 26px 0 4px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ab-gold);
}

.cmp-mrow {
  padding: 20px 2px;
  border-bottom: 1px solid var(--ab-line);
}

.cmp-mrow .feat {
  margin-bottom: 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ab-ink);
}

.cmp-mrow .pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.cmp-mrow .cell .lab {
  margin-bottom: 5px;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ab-gold);
}

.cmp-mrow .cell .val {
  font-size: 0.9rem;
  color: var(--ab-ink);
}

/* --------------------------------------------------------------------------
   3. Closing note and the three account CTAs
   -------------------------------------------------------------------------- */
.cmp-note {
  max-width: 900px;
  margin: 26px 0 0;
  font-size: 0.82rem;
  color: var(--ab-ink-muted);
}

.cmp-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 18px;
}

.cmp-actions .ab-btn {
  min-width: 232px;
}

.cmp-disc {
  max-width: 900px;
  margin: 0 auto;
  padding: 22px 28px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--ab-ink-muted);
  background: var(--ab-panel);
  border: 1px solid var(--ab-line);
}

/* --------------------------------------------------------------------------
   4. Demo account
   Not from the stage6 source — this section already existed on the page and is
   carried through unchanged in substance, restyled onto the kit. The MT5 demo
   is a real product and its 30-day expiry is published elsewhere on the site.
   -------------------------------------------------------------------------- */
.cmp-demo p {
  max-width: 820px;
  margin: 0 0 14px;
  color: var(--ab-ink-muted);
}

.cmp-hints {
  max-width: 820px;
  margin-top: 32px;
  padding: 28px 30px;
  background: var(--ab-panel);
  border: 1px solid var(--ab-line);
  border-left: 2px solid var(--ab-gold);
}

.rtl .cmp-hints {
  border-left: 1px solid var(--ab-line);
  border-right: 2px solid var(--ab-gold);
}

.cmp-hints h3 {
  margin: 0 0 14px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ab-gold);
}

.rtl .cmp-hints h3 {
  letter-spacing: normal;
}

.cmp-hints ol {
  margin: 0;
  padding-left: 20px;
  color: var(--ab-ink-muted);
}

.rtl .cmp-hints ol {
  padding-left: 0;
  padding-right: 20px;
}

.cmp-hints li {
  margin-bottom: 10px;
  font-size: 0.92rem;
}

.cmp-hints li:last-child {
  margin-bottom: 0;
}

.cmp-hints li::marker {
  color: var(--ab-gold);
}

/* --------------------------------------------------------------------------
   5. Responsive
   The swap between the two views happens once, at 991.98px. Above it the table
   is the view and the comparator is absent; below it the reverse. Both are
   never present at the same time.
   -------------------------------------------------------------------------- */
@media (max-width: 1199.98px) {
  .cmp-matrix thead .th-title {
    font-size: 1.12rem;
  }

  .cmp-matrix thead th {
    padding: 16px;
  }

  .cmp-matrix tbody th,
  .cmp-matrix tbody td,
  .cmp-cat th {
    padding: 15px 16px;
  }
}

@media (max-width: 991.98px) {
  .cmp-matrix-wrap {
    display: none;
  }

  .cmp-mobile {
    display: block;
  }

  .cmp-actions .ab-btn {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 575.98px) {
  .cmp-mrow .pair {
    gap: 10px;
  }

  .cmp-hints {
    padding: 22px 20px;
  }
}
