/* Aurexis Forex public site. Colours come only from aurexis-tokens.css. */

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-latin-400.woff2") format("woff2");
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/inter-latin-500.woff2") format("woff2");
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/inter-latin-600.woff2") format("woff2");
}

@font-face {
  font-family: Montserrat;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/montserrat-latin-600.woff2") format("woff2");
}

@font-face {
  font-family: Montserrat;
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/montserrat-latin-800.woff2") format("woff2");
}

:root {
  --font-heading: Montserrat, system-ui, "Segoe UI", Arial, sans-serif;
  --font-ui: Inter, system-ui, "Segoe UI", Arial, sans-serif;
  --page-max: 100%;
  --prose-max: 42rem;
  --header-pad-y: 8px;
  --header-pad-x: 12px;
  --header-pad-x-wide: 16px;
  --space-2: 4px;
  --space-3: 8px;
  --space-4: 12px;
  --space-5: 14px;
  --space-6: 16px;
  --space-7: 20px;
  --space-8: 24px;
  --space-9: 28px;
  --space-10: 32px;
  --space-11: 48px;
  --space-12: 56px;
  --space-13: 72px;
  --radius-xs: 2px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 16px;
  --radius-pill: 999px;
  --fs-caption: 9.5px;
  --fs-eyebrow: 9.5px;
  --fs-small: 10.5px;
  --fs-nav: 11.5px;
  --fs-body: 11.5px;
  --fs-card: 13px;
  --fs-lead: 13px;
  --fs-stat: 14px;
  --fs-h3: 14px;
  --fs-h2: 19.5px;
  --fs-h2-wide: 23px;
  --fs-h1: 24.5px;
  --fs-h1-mid: 30px;
  --fs-h1-wide: 35px;
  --tap: 36px;
  --logo-w: 140px;
  --logo-w-wide: 168px;
  --card-bg: var(--surface);
  --chip-bg: var(--bg);
  --focus-ring: var(--gold-text);
}

[data-theme="light"] {
  --card-bg: var(--surface);
  --chip-bg: var(--surface);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 96px;
}

html,
body {
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.45;
  overflow-wrap: break-word;
}

main {
  flex: 1 0 auto;
}

img {
  max-width: 100%;
  height: auto;
}

button,
input,
textarea {
  font-family: inherit;
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  line-height: 1.15;
  text-wrap: balance;
}

h1 {
  margin: 0;
  font-weight: 800;
  font-size: var(--fs-h1);
  line-height: 1.05;
}

h2 {
  margin: 0 0 var(--space-4);
  font-weight: 800;
  font-size: var(--fs-h2);
  line-height: 1.2;
}

h3 {
  margin: 0 0 var(--space-3);
  font-weight: 600;
  font-size: var(--fs-h3);
}

p {
  margin: 0;
}

a {
  color: var(--gold-text);
}

a:visited {
  color: var(--gold-text);
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: var(--space-6);
  top: 0;
  transform: translateY(-120%);
  background: var(--gold);
  color: var(--on-gold);
  font-weight: 600;
  text-decoration: none;
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-sm);
  z-index: 40;
}

.skip-link:focus {
  transform: translateY(var(--space-4));
}

.skip-link:visited {
  color: var(--on-gold);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.noscript {
  margin: 0;
  padding: var(--space-4) var(--space-6);
  background: var(--raised);
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-6);
  padding: var(--header-pad-y) var(--header-pad-x);
  background: var(--nav-bg);
  color: var(--nav-text);
  border-bottom: 1px solid var(--nav-border);
}

.logo-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
}

.site-header .logo-link {
  margin-right: auto;
}

.logo {
  width: var(--logo-w);
  height: auto;
  display: none;
}

[data-theme="dark"] .logo-dark,
:root:not([data-theme]) .logo-dark {
  display: block;
}

[data-theme="light"] .logo-light {
  display: block;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.theme-toggle,
.nav-toggle,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
}

.theme-toggle,
.nav-toggle {
  padding: 0 18px;
  border: 1px solid var(--nav-border);
  background: transparent;
  color: var(--nav-text);
  font-weight: 500;
  font-size: var(--fs-small);
  border-radius: var(--radius-pill);
}

html:not(.js) .theme-toggle,
html:not(.js) .nav-toggle {
  display: none;
}

.nav-toggle {
  display: none;
}

.btn {
  padding: 0 16px;
  min-height: 36px;
  border: 1.5px solid transparent;
  font-weight: 600;
  font-size: var(--fs-body);
  line-height: 1;
}

.btn-gold {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--on-gold);
}

.btn-gold:hover,
.btn-gold:visited {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--on-gold);
}

.btn-gold:hover {
  background: var(--gold-hover);
  border-color: var(--gold-hover);
}

.btn-ghost {
  background: transparent;
  border-color: var(--gold-text);
  color: var(--gold-text);
}

.btn-ghost:visited {
  color: var(--gold-text);
}

.btn-ghost:hover {
  text-decoration: underline;
}

.header-cta {
  min-height: var(--tap);
  padding: 0 22px;
  font-size: var(--fs-nav);
}

.nav-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 100%;
}

.nav-link {
  display: flex;
  align-items: center;
  min-width: var(--tap);
  min-height: var(--tap);
  padding: 0 var(--space-3);
  color: var(--nav-text);
  text-decoration: none;
  font-size: var(--fs-nav);
  font-weight: 500;
  border-radius: var(--radius-sm);
}

.nav-link:visited {
  color: var(--nav-text);
}

.nav-link[aria-current="page"] {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 6px;
}

.nav-cta {
  margin-top: var(--space-3);
}

.js .nav-panel {
  display: none;
}

.js .nav-panel.is-open {
  display: flex;
}

.js .nav-toggle {
  display: inline-flex;
}

.section {
  width: min(var(--page-max), 100%);
  margin-inline: auto;
  padding: var(--space-11) var(--header-pad-x);
}

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-11) var(--space-12);
  padding-top: var(--space-11);
  padding-bottom: var(--space-11);
}

.hero-copy {
  flex: 1 1 280px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  max-width: 560px;
}

.eyebrow {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-text);
}

.lead {
  margin: 0;
  max-width: 520px;
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--text-sub);
}

.hero-actions,
.stack-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
}

.equity-card,
.feature,
.panel,
.step,
.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  min-width: 0;
}

.equity-card {
  flex: 1 1 300px;
  max-width: 520px;
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-7);
}

.equity-head,
.stat-row {
  display: flex;
  gap: var(--space-4);
}

.equity-head {
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.equity-title {
  margin: 0;
  font-weight: 600;
  font-size: var(--fs-body);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 32px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--chip-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: var(--fs-small);
}

.marker {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-pill);
  flex: 0 0 auto;
}

.marker-pos {
  background: var(--pos);
}

.marker-neg {
  background: var(--neg);
}

.equity-svg {
  width: 100%;
  height: auto;
  display: block;
}

.equity-svg .grid {
  stroke: var(--border);
  stroke-width: 1;
}

.equity-svg .curve {
  fill: none;
  stroke: var(--gold);
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.figure-note,
.sub {
  margin: 0;
  color: var(--text-sub);
  font-size: var(--fs-nav);
  line-height: 1.5;
}

.stat-row {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.stat {
  flex: 1 1 140px;
  background: var(--chip-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.stat-label {
  color: var(--text-sub);
  font-size: var(--fs-caption);
}

.stat-value {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text);
  font-weight: 600;
  font-size: var(--fs-stat);
}

.features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-7);
  padding-top: 0;
}

.feature {
  flex: 1 1 260px;
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.gold-rule {
  width: 36px;
  height: 4px;
  border-radius: var(--radius-xs);
  background: var(--gold);
}

.feature h2,
.feature h3 {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: var(--fs-card);
}

.feature p,
.step p,
.panel p,
.prose p {
  color: var(--text-sub);
  font-size: var(--fs-nav);
  line-height: 1.5;
}

.prose {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  max-width: var(--prose-max);
}

.prose.wide,
.wide {
  max-width: none;
}

.page-intro {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding-bottom: var(--space-8);
}

.banner {
  margin: 0;
  padding: var(--space-6) var(--space-6);
  background: var(--raised);
  color: var(--text);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-md);
}

.banner strong {
  font-weight: 600;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.step {
  border-radius: var(--radius-lg);
  padding: var(--space-7) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.step .eyebrow {
  letter-spacing: 0.14em;
}

.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.link-list a {
  display: flex;
  align-items: center;
  min-width: var(--tap);
  min-height: var(--tap);
  color: var(--gold-text);
  font-weight: 500;
}

.plain-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-sub);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.plain-list li::marker {
  color: var(--text);
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

caption {
  text-align: left;
  font-weight: 600;
  padding-bottom: var(--space-4);
  color: var(--text);
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-nav);
  overflow-wrap: anywhere;
}

th {
  font-weight: 600;
  color: var(--text);
  background: var(--raised);
}

td {
  color: var(--text);
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

.legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.legend li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  min-height: var(--tap);
  color: var(--text);
}

.faq-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.faq-item {
  background: transparent;
  border-width: 0 0 1px;
  border-radius: 0;
}

.faq-item summary {
  min-height: var(--tap);
  padding: var(--space-4) 0;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

.faq-item summary:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.faq-item p {
  margin: 0 0 var(--space-6);
  color: var(--text-sub);
  max-width: var(--prose-max);
}

.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  max-width: 520px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.field label,
.check span {
  font-weight: 500;
  font-size: var(--fs-nav);
  color: var(--text);
}

input,
textarea,
select {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--raised);
  color: var(--text);
  font-size: var(--fs-body);
  line-height: 1.5;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  min-height: var(--tap);
}

.check input {
  width: var(--tap);
  min-width: var(--tap);
  height: var(--tap);
  min-height: var(--tap);
  flex: 0 0 var(--tap);
  margin-top: 0;
  accent-color: var(--gold);
}

.form-status {
  margin: 0;
  padding: var(--space-4) var(--space-5);
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
}

.form-status[hidden] {
  display: none;
}

.site-footer .logo {
  width: 180px;
}

.equity-wrap {
  display: flex;
  justify-content: center;
}

.site-footer {
  margin-top: auto;
  background: var(--surface);
  color: var(--text);
  border-top: 1px solid var(--border);
}

.footer-inner {
  width: min(var(--page-max), 100%);
  margin-inline: auto;
  padding: var(--space-11) var(--header-pad-x) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8) var(--space-11);
}

.footer-col {
  flex: 1 1 180px;
  min-width: 0;
}

.footer-title {
  margin: 0 0 var(--space-3);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  display: flex;
  align-items: center;
  min-width: var(--tap);
  min-height: var(--tap);
  color: var(--gold-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  color: var(--text-sub);
  font-size: var(--fs-small);
}

.footer-logo {
  width: 160px;
  height: auto;
}

@media (min-width: 768px) {
  :root {
    --logo-w: 152px;
    --fs-h1: var(--fs-h1-mid);
    --header-pad-x: 16px;
  }

  h2 {
    font-size: var(--fs-h2-wide);
  }
}

@media (min-width: 1024px) {
  :root {
    --logo-w: var(--logo-w-wide);
    --fs-h1: var(--fs-h1-wide);
    --header-pad-x: var(--header-pad-x-wide);
    --fs-eyebrow-track: 0.3em;
  }

  .eyebrow {
    letter-spacing: 0.3em;
  }

  .site-header {
    flex-wrap: nowrap;
    padding-top: var(--header-pad-y);
    padding-bottom: var(--header-pad-y);
  }

  .site-header .logo-link {
    margin-right: 0;
  }

  .nav-panel {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-5);
    width: auto;
    margin-left: var(--space-3);
    margin-right: auto;
  }

  .js .nav-panel,
  .js .nav-panel.is-open {
    display: flex;
  }

  .js .nav-toggle,
  .nav-toggle {
    display: none;
  }

  .nav-cta {
    display: none;
  }

  .hero {
    padding-top: var(--space-13);
    padding-bottom: var(--space-11);
  }

  .features {
    padding-bottom: var(--space-13);
  }
}

@media (max-width: 1023px) {
  .header-cta {
    display: none;
  }
}

@media (min-width: 1024px) {
  .header-cta {
    display: inline-flex;
  }
}

@media (min-width: 1200px) {
  .nav-panel {
    gap: var(--space-6);
  }
}

@media (forced-colors: active) {
  .marker {
    border: 1px solid CanvasText;
  }

  :focus-visible {
    outline-color: CanvasText;
  }
}

p.eyebrow {
  color: var(--gold-text);
}

.prose .banner {
  color: var(--text);
}

[hidden] {
  display: none !important;
}

.stats-band {
  width: min(var(--page-max), 100%);
  margin: 0 auto;
  padding: var(--space-11) var(--header-pad-x);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8) var(--space-11);
  align-items: flex-end;
}

.ticker-label,
.band-note {
  margin: 0;
  color: var(--text-sub);
  font-size: var(--fs-nav);
}

.ticker-value {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 42px;
  line-height: 1;
  color: var(--text);
}

.risk-table td:first-child,
.fee-figure {
  font-weight: 600;
}

.risk-choices {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.risk-choices legend {
  font-weight: 500;
  font-size: var(--fs-nav);
  margin-bottom: var(--space-3);
  padding: 0;
}

.risk-choices label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--tap);
  color: var(--text);
}

.risk-choices input {
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  flex: 0 0 20px;
}

.page-register .site-header {
  padding-top: 4px;
  padding-bottom: 4px;
}

.page-register .logo {
  width: 120px;
}

.page-register .section {
  padding-top: 10px;
  padding-bottom: 8px;
}

.page-register h1 {
  font-size: 23px;
}

.page-register .lead,
.page-register .fee-note {
  font-size: 11.5px;
  line-height: 1.35;
}

.page-register .form {
  gap: 6px;
}

.page-register .field {
  gap: 2px;
}

.page-register .field label,
.page-register .risk-choices legend,
.page-register .check span {
  font-size: 11.5px;
}

.page-register input {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 12.5px;
}

.page-register .btn {
  min-height: 34px;
  padding: 0 16px;
  font-size: 12.5px;
}

.page-register .check {
  min-height: 32px;
  gap: 8px;
}

.page-register .check input {
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  flex: 0 0 22px;
}

.page-register .risk-choices label {
  min-height: 28px;
  font-size: 11.5px;
}

.page-register .risk-choices {
  gap: 2px;
}

.admin-gate,
.admin-panel {
  max-width: 760px;
}

.admin-panel textarea {
  min-height: 160px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 11.5px;
}

.risk-warning {
  margin: 0;
  color: var(--text-sub);
  font-size: var(--fs-small);
  line-height: 1.5;
}

.header-cta {
  font-size: 11.5px;
  padding: 0 14px;
}

.tv-frame {
  width: min(var(--page-max), 100%);
  margin: 0 auto;
  padding: 0 var(--header-pad-x) var(--space-8);
}

.tv-canvas,
.tv-offline {
  height: 420px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  overflow: hidden;
}

.tv-offline {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  text-align: center;
  padding: var(--space-8);
}

.aurexis-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.curve-path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.curve-path.draw {
  animation: aurexis-draw 1.8s ease forwards;
}

.end-dot {
  fill: var(--gold);
}

.pulse-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: aurexis-pulse 1.6s ease-in-out infinite;
}

/* v1.3: the light ray is clipped inside its card and "breathes" in place (widens slowly, then narrows).
   It never moves sideways, so it can never widen the page or add scrollbars. */
.shimmer {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  contain: paint;
}

.shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(110deg, transparent 34%, color-mix(in srgb, var(--gold) 16%, transparent) 50%, transparent 66%);
  transform-origin: 50% 50%;
  transform: scaleX(0.4);
  opacity: 0.45;
  animation: aurexis-breathe 8s ease-in-out infinite;
  pointer-events: none;
}

.shimmer > * {
  position: relative;
  z-index: 1;
}

.month-bars {
  display: flex;
  align-items: flex-end;
  gap: var(--space-3);
  min-height: 96px;
}

.month-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-sub);
  font-size: var(--fs-caption);
}

.month-bar {
  width: 18px;
  background: var(--gold);
  border-radius: var(--radius-xs);
}

.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-pills li {
  border: 1px solid var(--border);
  background: var(--raised);
  color: var(--text);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-size: var(--fs-small);
}

.broker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
}

.broker-card {
  flex: 1 1 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.broker-card img {
  width: 132px;
  height: 132px;
  background: var(--nav-bg);
}

.portal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.portal-nav a,
.portal-nav button {
  min-height: var(--tap);
}

.crypto-address {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  word-break: break-all;
  color: var(--text);
}

.fine-print {
  color: var(--text-sub);
  font-size: var(--fs-caption);
  margin: 0;
}

@keyframes aurexis-draw {
  from { stroke-dashoffset: 1400; }
  to { stroke-dashoffset: 0; }
}

@keyframes aurexis-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@keyframes aurexis-breathe {
  0%, 100% { transform: scaleX(0.4); opacity: 0.45; }
  50% { transform: scaleX(1.6); opacity: 1; }
}

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


/* ---------- v1.3 ---------- */

.btn-sm {
  min-height: var(--tap);
  padding: 0 18px;
  font-size: var(--fs-small);
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  text-decoration: none;
}

button.logout-btn {
  font-family: inherit;
}

/* Portal tabs: the current tab is a filled button. */
.portal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-6);
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  width: fit-content;
  max-width: 100%;
}

.portal-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  color: var(--text-sub);
  font-size: var(--fs-small);
  font-weight: 600;
  text-decoration: none;
}

.portal-tab:visited {
  color: var(--text-sub);
}

.portal-tab:hover {
  color: var(--text);
  background: var(--raised);
}

.portal-tab.is-active,
.portal-tab[aria-current="page"],
.portal-tab.is-active:visited {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--on-gold);
}

/* Compact portal typography */
.page-portal .section {
  padding-top: var(--space-8);
  padding-bottom: var(--space-11);
}

.page-portal h1,
.portal-title {
  font-size: 19.5px;
  line-height: 1.2;
  font-weight: 800;
  margin: 0 0 var(--space-4);
}

.page-portal h2 {
  font-size: 15px;
  margin: var(--space-8) 0 var(--space-3);
}

.page-portal h3 {
  font-size: 14px;
}

.page-portal #portal-email {
  font-size: var(--fs-small);
  margin-bottom: var(--space-3);
}

.page-portal .stat-value {
  font-size: 16px;
}

@media (min-width: 1024px) {
  .page-portal h1,
  .portal-title {
    font-size: 23px;
  }
}

/* Deriv QR card */
.deriv-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-7);
  margin-top: var(--space-8);
  padding: var(--space-7);
  border: 1px solid color-mix(in srgb, var(--gold) 55%, var(--border));
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--gold) 10%, transparent), transparent 60%),
    var(--surface);
  max-width: 640px;
}

.deriv-card-qr {
  flex: 0 0 auto;
  padding: 8px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 2px solid var(--gold);
  line-height: 0;
}

.deriv-card-qr img {
  width: 148px;
  height: 148px;
  display: block;
}

.deriv-card-body {
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}

.deriv-card-body h3 {
  margin: 0;
}

.deriv-link-text {
  word-break: break-all;
}

/* Payments */
.pay-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-6);
}

.pay-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-7);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  min-width: 0;
}

.page-portal .pay-card h2 {
  margin: 0;
}

.pay-card .form {
  width: 100%;
}

.pay-qr {
  background: #ffffff;
  padding: 6px;
  border-radius: var(--radius-sm);
}

.pay-soon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  opacity: 0.8;
}

.pay-soon[hidden] {
  display: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--raised);
  color: var(--text-sub);
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field .fine-print {
  line-height: 1.5;
}

/* Password checklist */
.pw-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-caption);
  color: var(--text-sub);
}

.pw-rules li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pw-rules li::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--text-sub);
}

.pw-rules li.is-met {
  color: var(--pos);
}

.pw-rules li.is-met::before {
  background: var(--pos);
  border-color: var(--pos);
}

/* Public bots section */
.bots-promo {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8) var(--space-11);
  align-items: start;
}

.bots-promo-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.bots-promo-copy h2 {
  margin: 0;
}

.steps {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
  padding: var(--space-5) var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.steps h3 {
  margin: 0 0 2px;
  font-size: 14px;
}

.steps p {
  color: var(--text-sub);
  font-size: var(--fs-small);
}

.step-n {
  flex: 0 0 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gold);
  color: var(--on-gold);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 13px;
}

.bots-promo-note {
  grid-column: 1 / -1;
  max-width: 60rem;
}

@media (min-width: 900px) {
  .bots-promo {
    grid-template-columns: 1fr 1fr;
  }
}

/* Portal bots */
.bots-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: var(--space-5);
}

.risk-note {
  padding: var(--space-4) var(--space-6);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-sub);
  font-size: var(--fs-small);
  line-height: 1.55;
}

.risk-note strong {
  color: var(--text);
}

.bots-panel {
  margin-top: var(--space-7);
  padding: var(--space-6) var(--space-7);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

.bots-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.page-portal .bots-panel h2 {
  margin: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--raised);
  font-size: var(--fs-caption);
  font-weight: 600;
  color: var(--text-sub);
}

.status-pill.is-on {
  color: var(--pos);
  border-color: color-mix(in srgb, var(--pos) 45%, var(--border));
}

.deriv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.deriv-actions:has(> :not([hidden])) {
  margin-top: 2px;
}

.account-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-7);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.account-bar[hidden] {
  display: none;
}

.seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--raised);
}

.seg-btn {
  min-height: 38px;
  min-width: 76px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-sub);
  font-weight: 600;
  font-size: var(--fs-small);
  cursor: pointer;
}

.seg-btn.is-active {
  background: var(--gold);
  color: var(--on-gold);
}

.acct-real .seg-btn.is-active {
  background: var(--neg);
  color: #ffffff;
}

.balance-box .stat-label {
  margin: 0;
}

.balance-value {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 19.5px;
  font-variant-numeric: tabular-nums;
}

.acct-id {
  font-weight: 400;
  color: var(--text-sub);
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-sub);
  margin-right: calc(var(--space-7) * -1 + 8px);
}

.live-dot.is-on {
  background: var(--pos);
}

.bot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  align-items: start;
  gap: var(--space-6);
  margin-top: var(--space-7);
}

.bot-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  min-width: 0;
}

.bot-card.is-running {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold) inset;
}

.bot-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
}

.page-portal .bot-card h3 {
  margin: 0;
  font-size: 14px;
}

.risk-tag {
  flex: 0 0 auto;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-caption);
  font-weight: 600;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.risk-mod {
  color: var(--gold-text);
  border-color: color-mix(in srgb, var(--gold) 50%, var(--border));
}

.risk-high {
  color: var(--neg);
  border-color: color-mix(in srgb, var(--neg) 50%, var(--border));
}

.bot-desc {
  color: var(--text-sub);
  font-size: var(--fs-small);
  line-height: 1.5;
}

.bot-summary {
  font-size: var(--fs-caption);
  color: var(--text);
  background: var(--raised);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-variant-numeric: tabular-nums;
}

.bot-settings summary {
  cursor: pointer;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--gold-text);
  min-height: 32px;
  display: flex;
  align-items: center;
}

.bot-settings form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-top: var(--space-3);
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.field-sm label {
  font-size: var(--fs-caption);
  color: var(--text-sub);
}

.field-sm input,
.field-sm select {
  min-height: 38px;
  padding: 6px 10px;
  font-size: var(--fs-small);
}

.field-sm input:disabled {
  opacity: 0.6;
}

.check-sm {
  min-height: 32px;
  align-items: center;
}

.check-sm input {
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  flex: 0 0 20px;
}

.check-sm span {
  font-size: var(--fs-small);
}

.bot-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-top: auto;
}

.bot-dl {
  font-size: var(--fs-small);
  margin-left: auto;
}

.run-pl {
  margin: 0;
  font-size: var(--fs-small);
  color: var(--text-sub);
}

.run-pl strong {
  font-family: var(--font-heading);
  font-size: 17.5px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.pos,
.run-pl strong.pos {
  color: var(--pos);
}

.neg,
.run-pl strong.neg {
  color: var(--neg);
}

.table-wrap {
  overflow-x: auto;
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-small);
  font-variant-numeric: tabular-nums;
}

.data-table th,
.data-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table th {
  position: sticky;
  top: 0;
  background: var(--raised);
  color: var(--text-sub);
  font-weight: 600;
  font-size: var(--fs-caption);
}

.data-table tr.empty td {
  color: var(--text-sub);
  text-align: center;
  padding: 16px;
}

.risk-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin-top: var(--space-8);
  padding: 10px var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--nav-bg) 92%, transparent);
  backdrop-filter: blur(6px);
  color: var(--text-sub);
  font-size: var(--fs-caption);
  text-align: center;
}

@media (max-width: 480px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .portal-tab {
    padding: 0 11px;
  }
}

/* ===== v1.4 ===== */
/* Deriv account card: QR, one line, one button */
.deriv-card {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-6);
  max-width: 420px;
}
.deriv-card-text {
  margin: 0;
  color: var(--text);
  font-size: var(--fs-small);
  line-height: 1.55;
}

/* Bot cards */
.bot-features {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-caption);
  color: var(--text-sub);
}
.bot-features li::before {
  content: "\2022";
  color: var(--gold);
  font-weight: 800;
  margin-right: 6px;
}
.bot-actions .btn {
  min-width: 112px;
}
.bot-card.is-open {
  border-color: color-mix(in srgb, var(--gold) 70%, var(--border));
}
.bot-dl {
  margin-left: 0;
  font-size: var(--fs-small);
}

/* Bot panel (Deriv Bot style) */
.bot-panel {
  margin-top: var(--space-8);
  padding: var(--space-6);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--border));
  border-radius: var(--radius-lg);
  background: var(--surface);
  scroll-margin-top: 90px;
}
.bot-panel[hidden] { display: none; }
.bp-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border);
}
.bp-head > div:first-child { flex: 1 1 200px; }
.bp-head .eyebrow { margin: 0; }
.page-portal .bp-head h2 { margin: 0; font-size: 19.5px; }
.bp-balance .stat-label { margin: 0; }
.bp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-7);
  margin-top: var(--space-7);
}
@media (min-width: 1024px) {
  .bp-grid { grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); }
}
.bp-chart { min-width: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); flex-wrap: wrap; }
.chart-market { margin: 0; font-weight: 600; font-size: var(--fs-small); }
.chart-quote { margin: 0; font-family: var(--font-heading); font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.chart-digit { font-family: var(--font-ui); font-weight: 600; font-size: var(--fs-caption); color: var(--gold-text); margin-left: 8px; }
.chart-box {
  position: relative;
  height: 220px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  overflow: hidden;
}
.chart-box canvas { display: block; }
.chart-offline {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: var(--space-6);
  text-align: center;
  color: var(--text-sub);
  font-size: var(--fs-small);
}
.chart-offline[hidden] { display: none; }
.bp-side { display: flex; flex-direction: column; gap: var(--space-6); min-width: 0; }
.run-summary {
  padding: var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--raised);
}
.page-portal .run-summary h3 { margin: 0 0 var(--space-4); font-size: 13px; }
.sum-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4) var(--space-4);
  margin: 0;
}
.sum-grid div { min-width: 0; }
.sum-grid dt { font-size: 9.5px; color: var(--text-sub); line-height: 1.3; }
.sum-grid dd { margin: 2px 0 0; font-family: var(--font-heading); font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.run-bar {
  position: relative;
  margin-top: var(--space-6);
  height: 30px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}
.run-bar-fill {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--gold) 35%, transparent);
  transition: background-color 0.3s ease;
}
.run-bar.is-win .run-bar-fill { background: var(--pos); }
.run-bar.is-loss .run-bar-fill { background: var(--neg); }
.run-bar.is-running .run-bar-fill {
  background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.18) 0 10px, transparent 10px 20px);
  background-size: 28px 28px;
  animation: run-stripes 0.9s linear infinite;
}
.run-bar.is-running:not(.is-win):not(.is-loss) .run-bar-fill { background-color: color-mix(in srgb, var(--gold) 60%, transparent); }
.run-bar.is-running.is-win .run-bar-fill { background-color: var(--pos); }
.run-bar.is-running.is-loss .run-bar-fill { background-color: var(--neg); }
@keyframes run-stripes { to { background-position: 28px 0; } }
.run-bar-text {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: var(--fs-caption);
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.run-bar.is-win .run-bar-text,
.run-bar.is-loss .run-bar-text { color: #ffffff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.run-state { margin: var(--space-4) 0 0; font-size: var(--fs-caption); }
.bp-actions { display: flex; gap: var(--space-4); margin-top: var(--space-4); }
.bp-actions .btn { flex: 1 1 0; }
.bp-settings { padding: 0 var(--space-6) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-md); }
.bp-log { margin-top: var(--space-7); display: flex; flex-direction: column; gap: var(--space-4); }
.page-portal .bp-log h3 { margin: 0; font-size: 13px; }
.bp-log .bots-panel-head { margin-top: var(--space-4); }
@media (max-width: 600px) {
  .chart-box { height: 240px; }
  .sum-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bot-panel { padding: var(--space-4); }
}
@media (prefers-reduced-motion: reduce) {
  .run-bar.is-running .run-bar-fill { animation: none; }
}

/* TP / SL modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background: rgba(0, 0, 0, 0.6);
}
.modal[hidden] { display: none; }
.modal-box {
  width: min(100%, 380px);
  padding: var(--space-8);
  border: 1px solid var(--gold);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.page-portal .modal-box h2 { margin: 0 0 var(--space-3); font-size: 19.5px; font-variant-numeric: tabular-nums; }
.modal-box p { margin: 0 0 var(--space-7); color: var(--text-sub); }
.modal-box .btn { min-width: 120px; }
/* v1.6: OK is green when take profit was hit, red when stop loss was hit. */
#modal-ok.is-tp {
  background: var(--pos);
  border-color: var(--pos);
  color: #111111;
}
#modal-ok.is-tp:hover,
#modal-ok.is-tp:visited {
  background: var(--pos);
  border-color: var(--pos);
  color: #111111;
}
[data-theme="light"] #modal-ok.is-tp,
[data-theme="light"] #modal-ok.is-tp:hover,
[data-theme="light"] #modal-ok.is-tp:visited {
  color: #ffffff;
}
#modal-ok.is-sl,
#modal-ok.is-sl:hover,
#modal-ok.is-sl:visited {
  background: var(--neg);
  border-color: var(--neg);
  color: #ffffff;
}

/* Store */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: var(--space-6);
  margin-top: var(--space-6);
}
.store-grid[hidden] { display: none; }
.store-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  min-width: 0;
}
.store-card h3 { margin: 0; font-size: 15px; }
.store-prices, .price-choice {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--raised);
}
.price-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  margin: 0;
  font-size: var(--fs-small);
  color: var(--text-sub);
}
.price-line strong { font-family: var(--font-heading); font-size: 16px; color: var(--text); font-variant-numeric: tabular-nums; }
.price-choice .price-line { padding: 6px 10px; border-radius: var(--radius-sm); border: 1px solid transparent; }
.price-choice .price-line.is-on { border-color: var(--gold); background: var(--surface); color: var(--text); }
.price-total { margin: 4px 0 0; font-size: var(--fs-small); }
.store-soon-title { margin-top: var(--space-11); }
.store-note { margin-top: var(--space-8); }
.store-panel {
  padding: var(--space-8);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  max-width: 860px;
}
.checkout-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-6); }
.checkout-head h2 { margin: 0; }
.checkout-form { max-width: none; }
.checkout-form .pay-card h3 { margin: 0; }
.deriv-id-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }
.deriv-id-row input { flex: 1 1 200px; max-width: 280px; text-transform: uppercase; letter-spacing: 0.04em; }
.deriv-id-open { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.deriv-id-open .fine-print { margin: 0; }
.optional { font-weight: 400; color: var(--text-sub); }
.field-error { margin: 0; color: var(--neg); font-size: var(--fs-caption); }
.field-error[hidden] { display: none; }
input[aria-invalid="true"] { border-color: var(--neg); }
.order-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px var(--space-6); margin: var(--space-4) 0 var(--space-7); }
.order-facts dt { color: var(--text-sub); }
.order-facts dd { margin: 0; font-weight: 600; }
.store-order[hidden], .store-checkout[hidden], .store-list[hidden] { display: none; }

/* Admin store */
.admin-store { margin-top: var(--space-11); }
.admin-table-wrap { max-height: none; }
.admin-products input, .admin-products select, .admin-products textarea {
  width: 100%;
  min-width: 90px;
  min-height: 34px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 11.5px;
}
.admin-products textarea { min-width: 220px; min-height: 60px; white-space: normal; }
.admin-products td { vertical-align: top; white-space: normal; }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
@media (min-width: 1024px) {
  .chart-box { height: 400px; }
}
.bp-settings .settings-grid > .field:first-child { grid-column: 1 / -1; }
.admin-table-wrap { overflow-x: auto; }
.admin-products { min-width: 1180px; }
.admin-products input[type="text"], .admin-products td:first-child input { min-width: 130px; }
.admin-products button, .admin-store .data-table button { white-space: nowrap; }

/* ===================== v1.5 ===================== */
/* Trade-type icons (own SVGs, Deriv-style green/red) */
.tt-icon { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; flex: none; }
.tt-icon svg { display: block; }
.tt-pos { color: var(--pos); }
.tt-neg { color: var(--neg); }
.tt-pair { display: inline-flex; gap: 6px; align-items: center; }
.bot-types { margin: 2px 0 var(--space-2); }
.bp-types { display: inline-flex; margin-top: 6px; }
.contract-cell { white-space: nowrap; }
.contract-cell .tt-icon { margin-right: 2px; }

/* One dynamic Run / Stop button, Reset beside it */
.run-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: #fff; border: 1px solid transparent; font-weight: 600; }
.run-toggle.is-run { background: #1F9D63; border-color: #1F9D63; }
.run-toggle.is-run:hover { background: #18844f; }
.run-toggle.is-stop { background: #D23F3A; border-color: #D23F3A; }
.run-toggle.is-stop:hover { background: #b5322e; }
.run-toggle .ic-stop { display: none; }
.run-toggle.is-stop .ic-play { display: none; }
.run-toggle.is-stop .ic-stop { display: inline; }
.run-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.bp-reset[disabled] { opacity: 0.5; cursor: not-allowed; }
.stop-reason { margin: 6px 0 0; padding: 8px 10px; border-radius: var(--radius-md, 8px); border: 1px solid color-mix(in srgb, var(--neg) 45%, var(--border)); background: color-mix(in srgb, var(--neg) 10%, transparent); color: var(--text); font-size: 12.5px; }

/* Reconnecting indicator */
.conn-pill { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--gold-text); border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); }
.conn-pill[hidden] { display: none; }
.conn-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: conn-blink 1s ease-in-out infinite; }
@keyframes conn-blink { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .conn-dot { animation: none; } }

/* Summary | Transactions tabs */
.bp-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: var(--space-3); }
.bp-tab { appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; color: var(--text-sub); font: inherit; font-weight: 600; cursor: pointer; margin-bottom: -1px; }
.bp-tab.is-active { color: var(--text); border-bottom-color: var(--gold); }
.bp-tab:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.tx-recent { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-height: 140px; }
.tx-recent .tx-empty, .tx-recent .empty { color: var(--text-sub); font-size: 12.5px; padding: 8px 0; }
.tx-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-md, 8px); background: var(--surface); }
.tx-mid { flex: 1 1 auto; min-width: 0; }
.tx-mid p { margin: 0; }
.tx-type { font-weight: 600; font-size: 12.5px; }
.tx-meta { color: var(--text-sub); font-size: 10.5px; }
.tx-profit { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.tx-profit.pos { color: var(--pos); }
.tx-profit.neg { color: var(--neg); }

/* Chart zoom */
.chart-zoom { display: inline-flex; gap: 4px; margin-left: auto; }
.zoom-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.zoom-btn:hover:not([disabled]) { border-color: var(--gold); }
.zoom-btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.zoom-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.max-hint { margin-top: 4px; }

/* Managed options card on the Bots page, service choice on Payments */
.managed-card { margin-top: var(--space-7, 40px); padding: var(--space-5, 20px) var(--space-6, 24px); border: 1px solid var(--border); border-radius: var(--radius-md, 10px); background: var(--surface); }
.managed-card h2 { margin-top: 0; font-size: 17.5px; }
.service-choice { border: 1px solid var(--border); border-radius: var(--radius-md, 10px); padding: var(--space-4, 16px); margin: 0 0 var(--space-5, 20px); display: grid; gap: 10px; }
.service-choice legend { font-weight: 700; padding: 0 6px; }
.service-option { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; background: var(--bg); }
.service-option:has(input:checked) { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.service-option input { margin-top: 4px; accent-color: var(--gold); }
.service-body { display: flex; flex-direction: column; gap: 2px; }

/* ---------- Admin ---------- */
.admin-main { max-width: none; width: 100%; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); margin: var(--space-4, 16px) 0 var(--space-5, 20px); }
.admin-tab { appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; font: inherit; font-weight: 600; color: var(--text-sub); cursor: pointer; margin-bottom: -1px; }
.admin-tab.is-active { color: var(--text); border-bottom-color: var(--gold); }
.admin-tab:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.admin-sec > h2:first-child, .admin-sec-head h2 { margin: 0; }
.admin-sec-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.admin-sec .form-status.is-error, .form-status.is-error { color: var(--neg); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.data-table td.num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table td.strong { font-weight: 700; }
.fine-print.block { display: block; }
.rev-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 12px 0 20px; }
.rev-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; background: var(--surface); }
.rev-card.is-main { border-color: var(--gold); }
.rev-card p { margin: 0; }
.rev-card-label { color: var(--text-sub); font-size: 11.5px; }
.rev-card-value { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 4px !important; }
.rev-card-sub { color: var(--text-sub); font-size: 10.5px; margin-top: 4px !important; }
.rev-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 16px; }
@media (min-width: 980px) { .rev-grid { grid-template-columns: 1.4fr 1fr; } }
.rev-panel { border: 1px solid var(--border); border-radius: 10px; padding: 16px; background: var(--surface); min-width: 0; }
.rev-panel h3 { margin: 0 0 10px; font-size: 14px; }
.rev-chart { width: 100%; }
.rev-svg { display: block; width: 100%; height: 240px; }
.rev-gridline { stroke: var(--border); stroke-width: 1; }
.rev-axis { fill: var(--text-sub); font-size: 9.5px; font-family: inherit; }
.rev-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0; margin: 10px 0 0; font-size: 11.5px; color: var(--text-sub); }
.rev-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.rev-donut-wrap { display: flex; justify-content: center; margin-bottom: 10px; }
.rev-donut-bg { stroke: var(--raised); }
.rev-donut-total { fill: var(--text); font-size: 13px; font-weight: 800; font-family: inherit; }
.rev-pending, .rev-claim-list { list-style: none; padding: 0; margin: 0; }
.rev-pending li, .rev-claim-list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.rev-claim-list { margin-top: 10px; }
.rev-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: end; }
.rev-form .rev-wide { grid-column: 1 / -1; }
.rev-import { margin-top: 12px; }
.rev-import textarea { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; }
.admin-fs { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px 16px; margin: 0 0 16px; min-width: 0; }
.admin-fs legend { font-weight: 700; padding: 0 6px; }
.admin-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 14px; }
.admin-fields .admin-wide { grid-column: 1 / -1; }
.admin-h3 { font-size: 13px; margin: 16px 0 8px; }
.is-invalid { border-color: var(--neg) !important; box-shadow: 0 0 0 1px var(--neg) inset; }
.row-editor { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.re-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.re-num { font-weight: 700; color: var(--text-sub); padding-top: 26px; text-align: center; }
.re-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 12px; min-width: 0; }
.re-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.re-field.re-wide { grid-column: 1 / -1; }
.re-label { font-size: 10.5px; color: var(--text-sub); font-weight: 600; }
.re-field input, .re-field textarea { width: 100%; }
.re-tools { display: flex; flex-direction: column; gap: 4px; padding-top: 20px; }
.re-tools .btn { min-width: 36px; padding-left: 8px; padding-right: 8px; }
.rte-tabs { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.rte-tab { appearance: none; border: 1px solid var(--border); background: var(--bg); color: var(--text-sub); padding: 6px 12px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; }
.rte-tab.is-active { color: var(--text); border-color: var(--gold); }
.rte-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border: 1px solid var(--border); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--raised); }
.rte-toolbar button { appearance: none; border: 1px solid transparent; background: none; color: var(--text); padding: 4px 9px; border-radius: 6px; font: inherit; font-size: 11.5px; cursor: pointer; }
.rte-toolbar button:hover, .rte-toolbar button:focus-visible { border-color: var(--gold); outline: none; }
.rte { min-height: 320px; max-height: 620px; overflow: auto; padding: 12px 16px; border: 1px solid var(--border); border-radius: 0 0 8px 8px; background: var(--surface); color: var(--text); }
.rte:focus { outline: 2px solid var(--gold); outline-offset: -2px; }
.rte h2 { font-size: 16.5px; margin: 18px 0 8px; }
.rte h3 { font-size: 14px; margin: 14px 0 6px; }
.admin-products input, .admin-products select, .admin-products textarea { min-width: 90px; }
.admin-clients-table td { vertical-align: top; }
@media (max-width: 640px) {
  .rev-form { grid-template-columns: 1fr; }
  .re-row { grid-template-columns: 1fr; }
  .re-num { padding-top: 0; text-align: left; }
  .re-tools { flex-direction: row; padding-top: 0; }
}
.admin-main .admin-form, .admin-main .rev-form { max-width: none; width: 100%; }
.admin-main .rev-form { display: grid; }
.rev-table { font-size: 11.5px; }
.rev-table th, .rev-table td { padding-left: 8px; padding-right: 8px; }
@media (min-width: 980px) { .rev-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }

/* v1.5: public fee tables show every row (the 360px cap is for portal/admin history tables). */
.table-wrap.table-full { max-height: none; overflow-y: visible; border: 0; }
.table-full th[scope="row"] { min-width: 7.5rem; word-break: normal; overflow-wrap: normal; hyphens: manual; }
@media (max-width: 520px) { .table-full th, .table-full td { padding: 10px 8px; } }


/* ---------- v1.6 Digit statistics (chance rings, red→amber→green) ---------- */
.digit-stats {
  --ds-red: #E5534B;
  --ds-amber: #E0B12E;
  --ds-green: #2ECC8F;
  --ds-track: #2E2E2E;
  margin: var(--space-8) 0;
  padding: var(--space-7);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
[data-theme="light"] .digit-stats {
  --ds-red: #C73E3A;
  --ds-amber: #B8860A;
  --ds-green: #178A5B;
  --ds-track: #E3DDCF;
}
.digit-stats .ds-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--space-5);
}
.digit-stats .eyebrow { color: var(--gold-text); margin: 0 0 var(--space-2); }
.page-bots .digit-stats h2, .page-portal .digit-stats h2 { margin: 0 0 var(--space-2); font-size: 1.32rem; }
.ds-controls { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.ds-controls .field { margin: 0; min-width: 12rem; }
.ds-status { margin: 0 0 var(--space-4); color: var(--text-sub); }
.ds-status[hidden] { display: none; }
.ds-caption { margin: 0 0 var(--space-3); color: var(--text-sub); font-size: var(--fs-caption); }
.ds-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0 0 var(--space-5);
  font-size: 10.5px;
  color: var(--text-sub);
}
.ds-legend-bar {
  display: inline-block;
  width: 88px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ds-red), var(--ds-amber), var(--ds-green));
}
.ds-legend-note { color: var(--text-sub); }
.ds-digits {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.ds-digit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-3) 4px var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--raised);
  text-align: center;
}
.ds-ring-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.ds-ring-box {
  position: relative;
  width: 76px;
  height: 76px;
}
.ds-ring { width: 100%; height: 100%; display: block; }
.ds-ring-bg { stroke: var(--ds-track); }
.ds-ring-fg {
  stroke: var(--ds-amber);
  transition: stroke-dasharray 0.45s ease, stroke 0.45s ease;
}
.ds-centre {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-family: Montserrat, "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: 1.364rem;
  line-height: 1;
  color: var(--text);
  transition: color 0.45s ease;
}
.ds-ring-wrap.is-split .ds-centre { font-size: 0.722rem; font-weight: 700; letter-spacing: 0; text-transform: none; padding: 0 4px; text-align: center; }
.ds-ring-wrap.is-mini .ds-ring-box { width: 52px; height: 52px; }
.ds-ring-wrap.is-mini .ds-centre { font-size: 0.546rem; font-weight: 700; }
.ds-pct {
  margin: 2px 0 0;
  font-weight: 700;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  transition: color 0.45s ease;
}
.ds-word {
  margin: 0;
  font-size: 9.5px;
  letter-spacing: 0.02em;
  color: var(--text-sub);
  text-transform: lowercase;
}
.ds-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.ds-card {
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--raised);
}
.page-portal .ds-card h3, .page-portal .ds-ou h3, .page-portal .ds-streaks h3 { margin: 0 0 var(--space-2); font-size: 13px; }
.ds-split-rings { display: flex; justify-content: space-around; gap: var(--space-4); margin-top: var(--space-3); }
.ds-split-rings .ds-ring-box { width: 84px; height: 84px; }
.ds-ou { margin-bottom: var(--space-6); }
.ds-ou-list { display: flex; flex-direction: column; gap: var(--space-3); }
.ds-ou-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--raised);
}
.ds-ou-barrier { margin: 0; font-weight: 700; min-width: 5.5rem; }
.ds-ou-rings { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.ds-streak-list { margin: 0; padding-left: 1.2em; color: var(--text); }
.ds-lock { text-align: center; padding: var(--space-8) var(--space-4); }
.ds-fine { margin: var(--space-5) 0 0; }
@media (max-width: 700px) {
  .ds-split-grid { grid-template-columns: 1fr; }
  .digit-stats { padding: var(--space-5); }
}
/* 5×2 grid on mobile: keep five columns, shrink the rings. */
@media (max-width: 600px) {
  .ds-digits { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .ds-digit { padding: 8px 1px 6px; }
  .ds-ring-box { width: 52px; height: 52px; }
  .ds-centre { font-size: 1.012rem; }
  .ds-pct { font-size: 9.5px; }
  .ds-word { font-size: 8px; }
  .ds-split-rings .ds-ring-box { width: 72px; height: 72px; }
  .ds-legend-bar { width: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .ds-ring-fg, .ds-centre, .ds-pct { transition: none; }
}

/* v1.6 Open panel: mode switch, manual buys, live take profit */
.bp-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 var(--space-4);
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
  background: var(--raised);
}
.bp-mode {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-sub);
  font: inherit;
  font-weight: 600;
  font-size: 11.5px;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.bp-mode.is-active { background: var(--gold); color: var(--on-gold); }
.bp-mode:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.manual-buys {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--raised);
}
.manual-buys[hidden] { display: none; }
.manual-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.manual-buys .field { margin: 0; min-width: 7rem; }
.m-buy {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  font-size: 11.5px;
  padding: 8px 12px;
  min-height: 44px;
  border-radius: var(--radius-md);
  cursor: pointer;
}
.m-buy.is-up { border-color: var(--pos); color: var(--pos); }
.m-buy.is-down { border-color: var(--neg); color: var(--neg); }
.m-buy:disabled { opacity: 0.5; cursor: not-allowed; }
.m-buy:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.auto-status { margin: var(--space-3) 0 0; font-size: var(--fs-caption); color: var(--text-sub); }
.live-note { margin: var(--space-3) 0 0; }
@media (max-width: 600px) {
  .bp-modes { width: 100%; }
  .bp-mode { flex: 1 1 auto; text-align: center; }
  .bp-actions { flex-wrap: wrap; }
  .bp-actions .btn { flex: 1 1 calc(50% - var(--space-4)); }
}


/* v1.7: theme icon, nav balance, ranked digit pads, Over/Under bubbles, trade toasts */

.theme-toggle {
  width: var(--tap);
  min-width: var(--tap);
  padding: 0;
  border-radius: 50%;
}
.theme-toggle .theme-icon {
  display: none;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
[data-theme="dark"] .theme-toggle .theme-icon-sun,
:root:not([data-theme]) .theme-toggle .theme-icon-sun {
  display: block;
}
[data-theme="light"] .theme-toggle .theme-icon-moon {
  display: block;
}

.nav-balance {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--tap);
  height: var(--tap);
  padding: 0 2px;
  margin: 0;
  line-height: 1;
}
.nav-balance[hidden] {
  display: none !important;
}
.nav-balance-tag {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--nav-text);
  opacity: 0.7;
  line-height: 1;
  display: flex;
  align-items: center;
}
.nav-balance-value {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--pos);
  line-height: 1;
  display: flex;
  align-items: center;
}

@media (max-width: 1023px) {
  .header-tools {
    margin-left: auto;
  }
  .nav-balance {
    order: 0;
  }
  .theme-toggle {
    order: 1;
  }
  .nav-toggle {
    order: 2;
  }
  .nav-balance-value {
    font-size: 13px;
  }
}

.ds-trade-hint {
  margin: 0 0 var(--space-3);
  color: var(--text);
  font-size: var(--fs-caption);
  font-weight: 600;
}
.ds-matches { margin-bottom: var(--space-6); }
.page-portal .ds-matches h3 { margin: 0 0 var(--space-2); font-size: 13px; }
.ds-digit, .ds-split-pad, .ds-bubble, .ds-pad {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  text-align: center;
}
.ds-digit {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: default;
}
.ds-rank {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-sub);
  margin-bottom: 2px;
}
.ds-pct {
  text-align: center;
  line-height: 1.25;
  max-width: 7.2rem;
}
.ds-word {
  text-align: center;
  max-width: 7.2rem;
}
button.ds-pad {
  cursor: default;
}
.is-trading button.ds-pad:not(:disabled) {
  cursor: pointer;
}
.is-trading button.ds-pad:not(:disabled):hover,
.is-trading button.ds-pad:not(:disabled):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}
button.ds-pad:disabled {
  cursor: default;
  opacity: 1;
}

.ds-split-rings {
  align-items: flex-start;
}
.ds-split-pad {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  border: 0;
  padding: 4px;
}

.ds-ou { margin-bottom: var(--space-6); }
.ds-bubble-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.ds-bubble-label {
  margin: 0;
  font-weight: 700;
  font-size: 13px;
}
.ds-bubbles {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px 6px;
  align-items: end;
  justify-items: center;
}
.ds-bubble {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
  padding: 2px;
  background: transparent;
  border: 0;
}
.ds-bubble-ball {
  width: var(--bubble-size, 48px);
  height: var(--bubble-size, 48px);
  max-width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 420ms ease, height 420ms ease, background-color 420ms ease;
  box-shadow: 0 0 0 1px color-mix(in srgb, currentColor 12%, transparent);
}
.ds-bubble-num {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(9.5px, 2.4vw, 14px);
  color: #fff;
  line-height: 1;
}
[data-theme="light"] .ds-bubble-num { color: #fff; }
.ds-bubble-pct {
  font-size: 9px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  max-width: 100%;
}

@media (max-width: 719px) {
  .ds-bubbles { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px 6px; }
  .ds-bubble-pct { font-size: 8px; }
  .ds-digit { padding: 6px 1px 4px; }
  .ds-pct { font-size: 9px; max-width: 4.8rem; }
  .ds-word { font-size: 8px; }
  .ds-rank { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .ds-bubble-ball, .ds-digit { transition: none; }
}

.tool-trade {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  margin: 0 0 var(--space-5);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--raised);
}
.tool-trade-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.tool-trade-label {
  font-weight: 600;
  font-size: var(--fs-small);
}
.tool-trade-help {
  margin: 0;
  color: var(--text-sub);
  font-size: var(--fs-caption);
}
.switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
  border: 0;
  padding: 0;
  border-radius: 999px;
  background: var(--border);
  cursor: pointer;
}
.switch[aria-checked="true"] {
  background: var(--pos);
}
.switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform 160ms ease;
}
.switch[aria-checked="true"] .switch-knob {
  transform: translateX(20px);
}
.switch:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.trade-toasts {
  position: fixed;
  top: 88px;
  right: 16px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: min(240px, calc(100vw - 24px));
}
.trade-toast {
  pointer-events: none;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-small);
  color: #fff;
  box-shadow: 0 8px 24px color-mix(in srgb, #000 28%, transparent);
  animation: toast-in 220ms ease;
}
.trade-toast.is-profit { background: var(--pos); }
.trade-toast.is-loss { background: var(--neg); }
.trade-toast.is-out { animation: toast-out 220ms ease forwards; }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateX(12px); }
}
@media (max-width: 719px) {
  .trade-toasts {
    top: auto;
    bottom: 16px;
    right: 12px;
    left: 12px;
    max-width: none;
    align-items: flex-end;
  }
}
@media (prefers-reduced-motion: reduce) {
  .trade-toast, .trade-toast.is-out { animation: none; }
}

/* ===== v1.8 layout: full width, compact Deriv-like sizes, one-screen trading, admin efficiency ===== */

@media (min-width: 768px) {
  :root { --header-pad-x: 16px; }
}
@media (min-width: 1024px) {
  :root { --header-pad-x: 16px; --header-pad-x-wide: 16px; }
}

.section,
.footer-inner {
  width: 100%;
  max-width: none;
}

/* Keep prose readable; trading, store, admin and dashboards use the full width. */
.page-legal .section,
.page-faq .section,
.page-about .section,
.page-how .section { }

.admin-main { max-width: none; width: 100%; padding-left: var(--header-pad-x); padding-right: var(--header-pad-x); }
.admin-tabs { flex-wrap: wrap; gap: 4px; }
.admin-tab { padding: 6px 10px; font-size: var(--fs-nav); min-height: 32px; }

.community-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: var(--space-4) 0;
}
.community-links[hidden],
.community-links:empty { display: none; }
.community-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text);
  text-decoration: none;
  font-size: var(--fs-small);
  font-weight: 600;
  background: var(--surface);
}
.community-btn:hover { border-color: var(--gold); color: var(--gold-text); }
.community-line { margin: var(--space-4) 0; }

/* Compact digit strip (ranked not-seen, green -> red) */
.ds-digits,
.ds-matches .ds-digits {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  overflow-x: auto;
  justify-content: flex-start;
  padding-bottom: 2px;
  grid-template-columns: none;
}
.ds-digits .ds-digit,
.ds-strip .ds-digit {
  flex: 1 1 0;
  min-width: 56px;
  max-width: 88px;
  padding: 4px 2px;
  border-radius: 8px;
}
.ds-digits .ds-ring-box { width: 36px; height: 36px; }
.ds-digits .ds-centre { font-size: 12.5px; }
.ds-digits .ds-pct { font-size: 9px; }
.ds-digits .ds-word { font-size: 8px; }
.ds-digits .ds-rank { font-size: 8px; }

/* Smaller Over/Under bubbles in a compact grid */
.ds-bubble-row,
.ds-ou-rings,
.ds-bubbles {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px;
  align-items: end;
  justify-items: center;
}
.ds-bubble {
  min-width: 0 !important;
  width: 100%;
  max-width: 64px;
  padding: 2px !important;
}
.ds-bubble .ds-pct,
.ds-bubble .ds-word { font-size: 8px; }

/* Trading workspace: chart, controls, digit stats, summary fit a 1440x900 screen */
@media (min-width: 1100px) {
  .page-bots .section { padding-top: var(--space-5); padding-bottom: var(--space-5); }
  .bots-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
    grid-template-areas:
      "panel panel"
      "stats stats";
    gap: var(--space-4);
    align-items: start;
  }
  .page-bots .bot-panel:not([hidden]) ~ .digit-stats,
  .bots-workspace .digit-stats { grid-area: stats; margin: 0; padding: var(--space-4); }
  .bots-workspace .bot-panel { grid-area: panel; margin: 0; }
  .page-bots .bot-panel:not([hidden]) {
    /* When a bot is open, pull digit stats up beside the work area via layout below */
  }
  .bp-grid { grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: var(--space-4); margin-top: var(--space-4); }
  .chart-box { height: 220px; }
  .bp-side { gap: var(--space-3); }
  .run-summary { padding: var(--space-4); }
  .bot-settings, .bp-settings { padding: var(--space-3); }
  .bp-log { margin-top: var(--space-4); }
  /* Open bot + compact stats share the viewport */
  .page-bots #bot-panel:not([hidden]) {
    display: block;
  }
  .page-bots.bot-panel-open .digit-stats {
    padding: var(--space-4);
  }
  .page-bots.bot-panel-open .bots-head,
  .page-bots.bot-panel-open .bots-panel,
  .page-bots.bot-panel-open .bot-grid { margin-bottom: var(--space-3); }
  /* Give the open trading workspace the viewport: cards stay one click away (Close). */
  .page-bots.bot-panel-open .bot-grid { display: none; }
}

@media (max-width: 1099px) {
  .ds-digits, .ds-matches .ds-digits { flex-wrap: wrap; } /* v1.9: the .ds-matches rule above had kept phones on one scrolling row */
  .ds-bubble-row, .ds-ou-rings, .ds-bubbles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .chart-box { height: 200px; }
  .bp-grid { grid-template-columns: 1fr; }
}

/* Settings form denser */
.bp-settings .settings-grid { gap: var(--space-3); }
.field-sm label, .field label { font-size: var(--fs-caption); }
.field input, .field select, .field textarea { font-size: var(--fs-body); min-height: 32px; padding: 4px 8px; }

/* EFT details */
.eft-details {
  margin-top: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
}
.eft-details dl { display: grid; grid-template-columns: 10rem 1fr; gap: 6px 12px; margin: 0; }
.eft-details dt { color: var(--text-sub); font-size: var(--fs-caption); }
.eft-details dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; word-break: break-all; }
.eft-soon { color: var(--text-sub); }

/* Quick strategy */
.qs-box { margin: var(--space-3) 0; padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-md); }
.qs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--space-3); }

/* Admin bot editor */
.bot-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-4); }
@media (max-width: 900px) { .bot-editor { grid-template-columns: 1fr; } }
.lock-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: var(--fs-small); }
.lock-row label { margin: 0; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--space-3) 0; }

/* Deriv Bot frame (only used if framing is allowed; otherwise hidden) */
.deriv-frame { width: 100%; min-height: 640px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg); }

/* v1.9: Aurexis Flip and Quick Strategy panels */
.bot-panel.is-flip .bp-modes, .bot-panel.is-quick .bp-modes,
.bot-panel.is-flip #qs-box, .bot-panel.is-quick #qs-box,
.bot-panel.is-flip #tool-trade, .bot-panel.is-quick #tool-trade { display: none; }
.flip-mode { margin: 0 0 var(--space-3); }
.flip-mode .stat-label { margin: 0 0 6px; }
.flip-seg .seg-btn { min-width: 128px; }
.acct-real .flip-seg .seg-btn.is-active { background: var(--gold); color: var(--on-gold); }
.flip-status { margin: var(--space-3) 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--raised); font-size: var(--fs-small); font-variant-numeric: tabular-nums; }
.qs-note, .qs-card-note { color: var(--text-sub); }
.bot-panel.is-flip .bp-actions #bp-take:not([hidden]) { border-color: var(--pos); color: var(--pos); }

/* v1.9: crypto payment details (admin preview, checkout and payments) */
.crypto-admin { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: var(--space-4); align-items: start; }
@media (max-width: 900px) { .crypto-admin { grid-template-columns: 1fr; } }
.qr-preview { display: grid; gap: 8px; justify-items: start; }
.qr-preview img { width: 160px; height: 160px; object-fit: contain; background: #ffffff; border-radius: var(--radius-md); padding: 6px; border: 1px solid var(--border); }
.qr-empty { width: 160px; height: 160px; display: grid; place-items: center; text-align: center; border: 1px dashed var(--border); border-radius: var(--radius-md); color: var(--text-sub); font-size: var(--fs-caption); padding: 8px; }
.crypto-memo { font-size: var(--fs-small); }
.crypto-memo strong { word-break: break-all; }

/* ===================== v2.0 ===================== */
/* Bot cards: three per row, one top line, 16:9 picture, one-line description and features line */
.bot-grid { grid-template-columns: 1fr; gap: var(--space-5); }
@media (min-width: 700px) { .bot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .bot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bot-card-v2 { gap: var(--space-3); padding: var(--space-4); }
.bot-card-v2 .bot-card-head { align-items: center; gap: var(--space-3); flex-wrap: nowrap; }
.bot-card-v2 .bot-card-head h3 { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bot-card-v2 .bot-types { display: inline-flex; gap: 4px; flex: 0 0 auto; color: var(--text-sub); }
.bot-pic { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-md, 10px); overflow: hidden; background: var(--raised); border: 1px solid var(--border); }
.bot-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bot-pic.is-empty::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, var(--raised), var(--surface)); }
.bot-card-v2 .bot-desc, .bot-feature-line { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bot-card-v2 .bot-desc { color: var(--text); font-size: var(--fs-body); }
.bot-feature-line { color: var(--text-sub); font-size: var(--fs-caption); }
.bot-card-v2 .bot-actions { display: flex; gap: var(--space-3); margin-top: auto; }
.bot-card-v2 .bot-actions .btn { flex: 1 1 0; }

/* Quick Strategy steppers */
.stepper { display: flex; align-items: stretch; gap: 0; }
.stepper input { flex: 1 1 auto; min-width: 0; border-radius: 0 !important; text-align: center; }
.step-btn { flex: 0 0 34px; border: 1px solid var(--border); background: var(--raised); color: var(--text); font-size: 16px; font-weight: 700; line-height: 1; cursor: pointer; user-select: none; touch-action: manipulation; }
.step-btn:hover { border-color: var(--gold); }
.step-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.step-minus { border-radius: 8px 0 0 8px; }
.step-plus { border-radius: 0 8px 8px 0; }

/* Ladder warning (stake-linked limits would pass Deriv's max stake) */
.ladder-note { margin: 0; padding: 8px 10px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--neg) 55%, var(--border)); color: var(--neg); font-size: var(--fs-caption); }
.seg-inline { display: inline-flex; gap: 0; }

/* Options tools tab */
.tools-grid { align-items: stretch; }
.tools-grid .ou-card { height: 100%; }
.tools-grid .ou-ring-box { max-width: 236px; }
.ou-locked { justify-content: flex-start; }
.ou-lock-icon { color: var(--gold-text); margin-top: var(--space-2); }
.ou-lock-msg { margin: 0; font-weight: 700; font-size: 0.924rem; text-align: center; }
.ou-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; width: 100%; }
.ou-tier { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); cursor: pointer; font: inherit; }
.ou-tier.is-active { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.ou-tier-name { font-weight: 600; font-size: var(--fs-caption); }
.ou-tier-price { font-weight: 800; font-size: 1.056rem; }
.ou-tier-per { font-size: 9.5px; color: var(--text-sub); }
.ou-subscribe { width: 100%; }
.ou-solo { display: flex; justify-content: center; margin-top: var(--space-5); }
.ou-solo .ou-card { width: 100%; max-width: 420px; }

/* Tool beside Quick Strategy */
.qs-tool { min-width: 0; }
@media (min-width: 1100px) {
  .bot-panel.has-tool .bp-grid { grid-template-columns: minmax(0, 1.25fr) minmax(270px, 1fr) minmax(260px, 300px); }
}

/* Community buttons with icons */
.community-btn { display: inline-flex; align-items: center; gap: 8px; }
.community-ic { flex: 0 0 auto; }
.contact-public { list-style: none; padding: 0; margin: 0 0 var(--space-4); display: grid; gap: 4px; }
.footer-company { color: var(--text-sub); font-size: var(--fs-caption); margin: var(--space-3) 0 0; }
.perf-period-tag { color: var(--text-sub); font-weight: 500; }
.perf-period-tag::before { content: "· "; }

/* Videos */
.video-list { margin-top: var(--space-6); }
.video-list-title { margin: 0 0 var(--space-2); font-size: 17.5px; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-4); margin-top: var(--space-3); }
.video-card { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 0 0 var(--space-3); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); color: var(--text); cursor: pointer; font: inherit; }
.video-card:disabled { opacity: .55; cursor: default; }
.video-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--raised); }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-play { position: absolute; inset: auto 10px 10px auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--on-gold); font-size: 12.5px; }
.video-name { padding: 0 var(--space-3); font-weight: 600; }
.video-cap { padding: 0 var(--space-3); color: var(--text-sub); font-size: var(--fs-caption); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-player { margin-top: var(--space-6); }
.video-player-box video { width: 100%; max-height: 70vh; background: #000; border-radius: 12px; }

/* Trading pool */
.pool-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-3); margin: var(--space-5) 0; }
.pool-form { display: grid; gap: var(--space-3); max-width: 560px; margin-bottom: var(--space-5); }

/* Admin v2.0 */
.v20-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-3); }
.v20-sub { margin: var(--space-5) 0 var(--space-2); font-size: 14px; }
.v20-row { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }
.v20-pic { width: 160px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); background: var(--raised); }
.archive-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.archive-list li { display: flex; justify-content: space-between; gap: var(--space-3); align-items: center; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; }
.sort-btn { background: none; border: 0; color: inherit; font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.sort-btn[aria-sort="ascending"]::after { content: " ▲"; }
.sort-btn[aria-sort="descending"]::after { content: " ▼"; }

/* v2.0: headings that take focus by script (tabindex=-1) show no box outline */
.bot-panel [tabindex="-1"]:focus { outline: none; }

/* v2.1: crypto wallet button, EA account details, Paid form, courses and EAs in the Store, My courses */
.wallet-btn { display: inline-flex; margin: 0 0 var(--space-3, 12px); }
.ea-account { border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px 14px; margin: 0 0 var(--space-5, 20px); display: grid; gap: 10px; }
.ea-account legend { font-weight: 700; padding: 0 6px; }
.paid-card { margin-top: var(--space-5, 20px); }
.paid-form { display: grid; gap: 10px; margin-top: 12px; }
.store-courses-title, .store-eas-title { margin-top: var(--space-11); }
.my-courses { margin-bottom: var(--space-11); }
.v21-block { margin: 0 0 var(--space-7, 28px); }

/* v2.4: Deriv-style progress bar for each contract (ticks or time, live profit/loss, result) */
.cp-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.cp-list[hidden] { display: none; }
.cp-card { border: 1px solid var(--border); border-radius: var(--radius-md, 8px); background: var(--surface); padding: 6px 9px; }
.cp-top, .cp-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cp-type { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: var(--fs-small); }
.cp-pl { font-weight: 700; font-variant-numeric: tabular-nums; font-size: var(--fs-small); }
.cp-pl.pos { color: var(--pos); }
.cp-pl.neg { color: var(--neg); }
.cp-bar { position: relative; height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; margin: 5px 0 4px; }
.cp-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px; background: var(--gold); transition: width .25s linear; }
.cp-card.is-buying .cp-fill { width: 30%; opacity: .5; animation: cp-pulse 1s ease-in-out infinite alternate; }
.cp-card.is-won .cp-fill { background: var(--pos); }
.cp-card.is-lost .cp-fill { background: var(--neg); }
.cp-card.is-won { border-color: color-mix(in srgb, var(--pos) 45%, var(--border)); }
.cp-card.is-lost { border-color: color-mix(in srgb, var(--neg) 45%, var(--border)); }
.cp-foot { color: var(--text-sub); font-size: var(--fs-caption); }
.cp-card.is-won .cp-status { color: var(--pos); font-weight: 700; }
.cp-card.is-lost .cp-status { color: var(--neg); font-weight: 700; }
@keyframes cp-pulse { from { opacity: .35; } to { opacity: .8; } }
@media (prefers-reduced-motion: reduce) { .cp-fill { transition: none; } .cp-card.is-buying .cp-fill { animation: none; } }

/* v2.4: community buttons with brand icons, side by side; admin rows (icon, link, Show switch) */
.community-links { align-items: center; }
.community-ic { width: 16px; height: 16px; }
.community-tiktok .community-ic path { fill: var(--text); }
.social-rows { display: flex; flex-direction: column; gap: 8px; }
.social-row { display: grid; grid-template-columns: 24px 110px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.social-row .social-name { font-weight: 600; font-size: var(--fs-small); margin: 0; }
.social-row input[type="url"] { width: 100%; min-width: 0; }
.social-row .social-ic path[fill="currentColor"] { fill: var(--text); }
.show-switch { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-small); cursor: pointer; white-space: nowrap; }
.show-switch input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 34px; height: 20px; border-radius: 999px; background: var(--border); position: relative; margin: 0; cursor: pointer; transition: background .15s; flex: 0 0 auto; }
.show-switch input[type="checkbox"]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-sub); transition: transform .15s, background .15s; }
.show-switch input[type="checkbox"]:checked { background: var(--gold); }
.show-switch input[type="checkbox"]:checked::after { transform: translateX(14px); background: var(--on-gold, #111); }
.show-switch input[type="checkbox"]:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (max-width: 560px) { .social-row { grid-template-columns: 24px minmax(0, 1fr) auto; } .social-row .social-name { grid-column: 2 / 4; } .social-row input[type="url"] { grid-column: 1 / 3; } }
.store-prices select.ea-plan { width: 100%; }

/* v2.4: portal Trading robots */
.robot-licences { margin-top: var(--space-6, 24px); }
.robot-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.robot-card { border: 1px solid var(--border); border-radius: var(--radius-md, 8px); background: var(--surface); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.robot-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.robot-head h3 { margin: 0; font-size: var(--fs-h3); }
.robot-status { font-size: var(--fs-caption); font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-sub); }
.robot-status.is-active, .robot-status.is-awaiting_account { color: var(--pos); border-color: var(--pos); }
.robot-status.is-expired, .robot-status.is-revoked { color: var(--neg); border-color: var(--neg); }
.robot-facts { margin: 0; display: grid; gap: 4px; }
.robot-facts div { display: grid; grid-template-columns: 110px 1fr; gap: 8px; align-items: center; }
.robot-facts dt { color: var(--text-sub); font-size: var(--fs-small); }
.robot-facts dd { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--fs-small); }
.robot-key { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; color: var(--gold-text); }
.robot-update { margin: 0; color: var(--gold-text); font-size: var(--fs-small); font-weight: 600; }
/* v2.4: a single course or robot card keeps the normal card width instead of stretching across the page */
#store-eas, #store-courses { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
/* v2.4: the Show switch keeps its own size inside admin forms (generic input rules would make it a round box) */
.social-row .show-switch input[type="checkbox"] { width: 34px !important; min-width: 34px !important; max-width: 34px !important; height: 20px !important; min-height: 20px !important; padding: 0 !important; border: 1px solid var(--border) !important; box-shadow: none !important; }
.social-row .show-switch input[type="checkbox"]:checked { border-color: var(--gold) !important; }
/* v2.4: licence table actions wrap instead of running off the table */
#lic-rows td:last-child { white-space: normal; min-width: 240px; }
#lic-rows td:last-child .btn { margin: 2px 2px 2px 0; }
.robot-facts div { align-items: start; }
.robot-facts dt { padding-top: 3px; }
