:root {
  --ap-bg: #040813;
  --ap-bg-soft: #08101e;
  --ap-panel: rgba(10, 17, 30, 0.9);
  --ap-panel-strong: rgba(8, 13, 23, 0.96);
  --ap-border: rgba(255, 255, 255, 0.1);
  --ap-border-strong: rgba(242, 185, 75, 0.24);
  --ap-text: #f5f7fb;
  --ap-muted: #a8b4c8;
  --ap-gold: #f2b94b;
  --ap-gold-soft: rgba(242, 185, 75, 0.16);
  --ap-green: #68e0a6;
  --ap-red: #ff8b87;
  --ap-blue: #2b74ff;
  --ap-blue-soft: rgba(43, 116, 255, 0.22);
  --ap-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --ap-radius: 24px;
  --ap-radius-sm: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.account-performance-page {
  margin: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  font-family: "Manrope", sans-serif;
  color: var(--ap-text);
  background:
    radial-gradient(circle at 12% 0%, rgba(21, 81, 255, 0.18), transparent 28%),
    radial-gradient(circle at 100% 8%, rgba(55, 144, 255, 0.18), transparent 30%),
    radial-gradient(circle at 76% 18%, rgba(242, 185, 75, 0.08), transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(7, 48, 165, 0.16), transparent 34%),
    linear-gradient(180deg, #040813 0%, #07101c 36%, #050912 70%, #040711 100%);
}

body.account-performance-page::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  min-height: 100%;
  pointer-events: none;
  z-index: -2;
  background:
    linear-gradient(rgba(255, 255, 255, 0.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.016) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.94), transparent 92%);
}

body.account-performance-page::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.42;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 1600 720' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='0'%3E%3Cstop stop-color='%23004dff'/%3E%3Cstop offset='0.55' stop-color='%23158cff'/%3E%3Cstop offset='1' stop-color='%2367c2ff'/%3E%3C/linearGradient%3E%3Cfilter id='b'%3E%3CfeGaussianBlur stdDeviation='7'/%3E%3C/filter%3E%3C/defs%3E%3Cpath d='M-120 600 C 180 420 350 690 690 520 S 1280 410 1710 510' stroke='url(%23g)' stroke-width='10' fill='none' opacity='.95' filter='url(%23b)'/%3E%3Cpath d='M-90 628 C 250 500 425 735 770 565 S 1340 455 1710 552' stroke='%23008bff' stroke-width='2' fill='none' opacity='.96'/%3E%3Cpath d='M-120 666 C 220 580 430 770 850 620 S 1320 565 1705 650' stroke='%232e6cff' stroke-width='2' fill='none' opacity='.78'/%3E%3C/svg%3E"),
    radial-gradient(circle at 78% 20%, rgba(242, 185, 75, 0.1), transparent 18%),
    radial-gradient(circle at 24% 76%, rgba(242, 185, 75, 0.07), transparent 22%);
  background-repeat: repeat-y, no-repeat, no-repeat;
  background-position: center 160px, 82% 120px, 18% calc(100% - 220px);
  background-size: 100% 820px, 420px 320px, 460px 340px;
}

.account-performance-page a {
  color: inherit;
}

.ap-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.ap-shell > *,
.ap-panel,
.ap-account-card,
.ap-hero__copy,
.ap-stat-card,
.ap-mini-stat,
.ap-list-item,
.ap-score-row,
.ap-table-row,
.ap-chart-meta__item,
.ap-meta-chip,
.ap-live-focus__stats div {
  min-width: 0;
}

.ap-skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 50;
  padding: 12px 16px;
  border-radius: 999px;
  background: #ffffff;
  color: #111723;
  text-decoration: none;
}

.ap-skip-link:focus {
  top: 16px;
}

.ap-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 10px 0;
  backdrop-filter: none;
  background: transparent;
}

.ap-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(10, 17, 30, 0.92), rgba(7, 12, 22, 0.76));
  box-shadow: 0 18px 44px rgba(3, 9, 22, 0.3);
}

.ap-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.ap-brand__logo {
  width: 42px;
  height: 42px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.28));
}

.ap-brand__copy {
  display: grid;
  gap: 2px;
}

.ap-brand__copy strong {
  font-size: 1rem;
  letter-spacing: 0.03em;
}

.ap-brand__copy small {
  color: var(--ap-muted);
  font-size: 0.75rem;
}

.ap-nav {
  display: flex;
  gap: 18px;
}

.ap-nav a {
  color: var(--ap-muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.ap-nav a:hover,
.ap-nav a:focus-visible {
  color: var(--ap-text);
}

.ap-nav--desktop {
  display: none;
}

.ap-nav--mobile {
  display: grid;
  gap: 10px;
  width: min(1240px, calc(100% - 32px));
  margin: 8px auto 0;
  padding: 14px 16px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(10, 17, 30, 0.96), rgba(7, 12, 22, 0.88));
  box-shadow: 0 18px 40px rgba(3, 9, 22, 0.28);
}

.ap-nav--mobile[hidden] {
  display: none !important;
}

.ap-nav--mobile a {
  display: block;
  padding: 10px 12px;
  border-radius: 14px;
}

.ap-nav--mobile a:hover,
.ap-nav--mobile a:focus-visible {
  background: rgba(255, 255, 255, 0.04);
}

.ap-header__actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.ap-link-button,
.ap-button,
.ap-chip,
.ap-menu-toggle {
  border: 0;
  font: inherit;
}

.ap-link-button,
.ap-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.ap-link-button:hover,
.ap-button:hover,
.ap-link-button:focus-visible,
.ap-button:focus-visible {
  transform: translateY(-1px);
}

.ap-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.ap-link-button,
.ap-button--secondary,
.ap-button--ghost {
  color: var(--ap-text);
  border: 1px solid var(--ap-border);
  background: rgba(255, 255, 255, 0.03);
}

.ap-button--primary {
  color: #111723;
  background: linear-gradient(180deg, #ffe093, #f2bf44);
  box-shadow: 0 12px 30px rgba(244, 197, 82, 0.24);
}

.ap-button--ghost {
  background: rgba(255, 255, 255, 0.01);
}

.ap-menu-toggle {
  width: 44px;
  height: 44px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  border-radius: 14px;
  border: 1px solid var(--ap-border);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.ap-menu-toggle span {
  width: 18px;
  height: 2px;
  margin: 0 auto;
  border-radius: 999px;
  background: var(--ap-text);
}

.ap-main {
  padding: 22px 0 80px;
}

.ap-hero {
  display: grid;
  gap: 18px;
  align-items: start;
}

.ap-hero__copy,
.ap-account-card,
.ap-panel,
.ap-live-focus__card,
.ap-notice,
.ap-footer__inner {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 24%),
    linear-gradient(150deg, rgba(10, 17, 30, 0.96), rgba(7, 12, 22, 0.92));
  box-shadow: var(--ap-shadow);
}

.ap-panel-copy {
  margin: 0 0 18px;
  color: var(--ap-muted);
  line-height: 1.65;
}

.ap-panel--publish {
  padding: 24px;
}

.ap-panel__topline--publish-header {
  display: block;
}

.ap-panel__topline--compact {
  margin-top: 22px;
}

.ap-panel__topline--compact h3 {
  margin: 0;
  font-size: 1.15rem;
}

.ap-publish-toggle-head {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 18px 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(242, 185, 75, 0.1), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 42%),
    linear-gradient(180deg, rgba(8, 13, 23, 0.72), rgba(7, 12, 22, 0.48));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 10px 24px rgba(0, 0, 0, 0.08);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.ap-publish-toggle-head h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
}

.ap-publish-toggle-head__copy {
  flex: 1 1 auto;
  min-width: 0;
}

.ap-publish-toggle-head__hint {
  display: block;
  margin-top: 8px;
  color: var(--ap-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.ap-publish-toggle-head__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ap-publish-summary-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  max-width: 100%;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.04);
  color: #dce5f2;
  font-size: 0.74rem;
  font-weight: 650;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.ap-publish-toggle-head__side {
  flex: 0 0 auto;
  display: grid;
  justify-items: end;
  gap: 10px;
}

.ap-publish-toggle-head__icon {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ap-publish-toggle-head__icon::before,
.ap-publish-toggle-head__icon::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 2px;
  border-radius: 999px;
  background: var(--ap-gold);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.ap-publish-toggle-head__icon::after {
  transform: rotate(90deg);
}

.ap-publish-toggle-head[aria-expanded="true"] .ap-publish-toggle-head__icon::after {
  opacity: 0;
  transform: rotate(90deg) scaleX(0.4);
}

.ap-publish-toggle-head[aria-expanded="true"] .ap-publish-toggle-head__icon {
  border-color: rgba(242, 185, 75, 0.28);
  background: rgba(242, 185, 75, 0.1);
}

.ap-publish-toggle-head:hover,
.ap-publish-toggle-head:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(242, 185, 75, 0.16);
  background:
    radial-gradient(circle at top right, rgba(242, 185, 75, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 48%),
    linear-gradient(180deg, rgba(8, 13, 23, 0.78), rgba(7, 12, 22, 0.56));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 14px 32px rgba(0, 0, 0, 0.1);
}

.ap-publish-toggle-head:hover .ap-publish-toggle-head__icon,
.ap-publish-toggle-head:focus-visible .ap-publish-toggle-head__icon {
  border-color: rgba(242, 185, 75, 0.28);
}

.ap-publish-toggle-head:focus-visible {
  outline: 2px solid rgba(242, 185, 75, 0.3);
  outline-offset: 4px;
  border-radius: 24px;
}

.ap-publish-collapsible {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ap-publish-toggle-head__side .ap-pill {
  min-height: 32px;
  padding-inline: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.ap-publish-form {
  display: grid;
  gap: 18px;
}

.ap-publish-grid {
  display: grid;
  gap: 14px;
}

.ap-publish-grid--meta {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.ap-field {
  display: grid;
  gap: 8px;
}

.ap-field span {
  color: var(--ap-muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ap-field input,
.ap-field select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ap-text);
  font: inherit;
}

.ap-field input::placeholder {
  color: rgba(168, 180, 200, 0.72);
}

.ap-field--toggle {
  align-content: start;
}

.ap-field--toggle span {
  margin-bottom: 4px;
}

.ap-field--toggle input {
  width: 22px;
  min-height: 22px;
  height: 22px;
  padding: 0;
  accent-color: var(--ap-gold);
}

.ap-publish-grid--meta .ap-field--toggle {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 60%),
    rgba(255, 255, 255, 0.02);
}

.ap-publish-link-row,
.ap-publish-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.ap-publish-link-row strong,
.ap-publish-hint strong {
  display: block;
}

.ap-publish-link-row strong {
  margin-top: 6px;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.ap-publish-toggle-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.ap-visibility-tile {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 136px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 60%),
    rgba(255, 255, 255, 0.02);
  cursor: pointer;
}

.ap-visibility-tile input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--ap-gold);
}

.ap-visibility-tile strong,
.ap-visibility-tile small {
  padding-right: 4px;
}

.ap-visibility-tile strong {
  font-size: 0.98rem;
  line-height: 1.4;
}

.ap-visibility-tile small,
.ap-publish-hint small {
  color: var(--ap-muted);
  line-height: 1.55;
}

.ap-visibility-tile:has(input:checked) {
  border-color: rgba(242, 185, 75, 0.34);
  background:
    linear-gradient(180deg, rgba(242, 185, 75, 0.12), transparent 55%),
    rgba(255, 255, 255, 0.025);
}

.ap-visibility-tile:hover,
.ap-visibility-tile:focus-within {
  border-color: rgba(242, 185, 75, 0.22);
}

.ap-hero__copy,
.ap-account-card,
.ap-panel,
.ap-live-focus__card,
.ap-footer__inner {
  padding: 20px;
}

.ap-kicker-row,
.ap-panel__topline,
.ap-account-card__head,
.ap-account-card__footer,
.ap-inline-badge-row,
.ap-hero__actions,
.ap-hero__meta,
.ap-chart__summary,
.ap-footer__inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ap-kicker,
.ap-card-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  color: var(--ap-gold);
  margin: 0 0 10px;
}

.ap-hero h1,
.ap-panel h2,
.ap-account-card h2,
.ap-live-focus__card h2 {
  margin: 0;
  line-height: 1.02;
}

.ap-hero h1 {
  font-size: clamp(2rem, 7vw, 3.6rem);
  max-width: 12ch;
}

.ap-hero__lead {
  margin: 14px 0 0;
  max-width: 62ch;
  color: var(--ap-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.ap-hero__meta {
  margin-top: 18px;
}

.ap-meta-chip {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 48%),
    linear-gradient(180deg, rgba(12, 19, 32, 0.88), rgba(8, 14, 24, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 24px rgba(0, 0, 0, 0.12);
}

.ap-meta-chip__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ap-muted);
}

.ap-meta-chip strong,
.ap-account-grid dd,
.ap-stat-card strong,
.ap-mini-stat strong,
.ap-score-row strong,
.ap-list-item strong,
.ap-live-focus__stats strong {
  font-family: "IBM Plex Mono", monospace;
}

.ap-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--ap-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ap-text);
  font-size: 0.78rem;
  font-weight: 700;
}

.ap-pill--accent {
  border-color: rgba(244, 197, 82, 0.22);
  background: rgba(244, 197, 82, 0.12);
  color: #ffe29c;
}

.ap-pill--good {
  border-color: rgba(104, 224, 166, 0.24);
  background: rgba(104, 224, 166, 0.13);
  color: #9df0c0;
}

.ap-pill--warn {
  border-color: rgba(255, 139, 135, 0.24);
  background: rgba(255, 139, 135, 0.13);
  color: #ffb6b2;
}

.ap-pill--ghost {
  color: var(--ap-muted);
}

.ap-account-card__identity {
  display: grid;
  gap: 4px;
  margin: 16px 0 18px;
}

.ap-account-card__identity strong {
  font-size: 1.1rem;
}

.ap-account-card__identity span {
  color: var(--ap-muted);
  line-height: 1.5;
}

.ap-account-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ap-account-grid dt {
  margin: 0 0 4px;
  color: var(--ap-muted);
  font-size: 0.8rem;
}

.ap-account-grid dd {
  margin: 0;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.ap-inline-cta {
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--ap-gold);
}

.ap-notice {
  margin-top: 18px;
  padding: 14px 18px;
  line-height: 1.5;
  color: #d8e4f6;
}

.ap-notice--info {
  border: 1px solid rgba(133, 184, 255, 0.22);
  background: rgba(43, 116, 255, 0.08);
}

.ap-notice--error {
  border: 1px solid rgba(255, 139, 135, 0.22);
  background: rgba(255, 139, 135, 0.08);
}

.ap-notice--warn {
  border: 1px solid rgba(242, 185, 75, 0.24);
  background: rgba(242, 185, 75, 0.08);
}

.hidden {
  display: none !important;
}

.ap-stats-grid,
.ap-mini-grid {
  gap: 12px;
}

.ap-stats-grid {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin-top: 18px;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.ap-stats-grid::-webkit-scrollbar {
  display: none;
}

.ap-stat-card,
.ap-mini-stat,
.ap-list-item,
.ap-score-row,
.ap-table-row,
.ap-chart-meta__item {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 24%),
    linear-gradient(180deg, rgba(12, 19, 32, 0.98), rgba(8, 14, 24, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 12px 30px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px) saturate(104%);
}

.ap-stat-card {
  flex: 0 0 min(82vw, 250px);
  min-height: 112px;
  display: grid;
  align-content: start;
  gap: 8px;
  scroll-snap-align: start;
}

.ap-stat-card.is-locked {
  border-color: rgba(242, 185, 75, 0.2);
  background:
    radial-gradient(circle at top right, rgba(242, 185, 75, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(12, 19, 32, 0.98), rgba(8, 14, 24, 0.97));
}

.ap-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ap-stat-card span,
.ap-mini-stat span,
.ap-live-focus__stats span,
.ap-score-row span,
.ap-table-row span,
.ap-list-item span,
.ap-chart-meta__item span {
  color: var(--ap-muted);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.ap-stat-card strong {
  font-size: 1.1rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ap-stat-card small,
.ap-mini-stat small,
.ap-list-item small,
.ap-score-row small {
  color: var(--ap-muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ap-mini-stat strong,
.ap-list-item strong,
.ap-score-row strong,
.ap-chart-meta__item strong,
.ap-live-focus__stats strong,
.ap-table-row strong {
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ap-chart-section {
  margin-top: 18px;
}

.ap-panel {
  margin-top: 18px;
}

.ap-panel--chart {
  margin-top: 0;
}

.ap-panel__topline {
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.ap-panel__topline > div:first-child {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.ap-chart__summary {
  justify-content: flex-end;
  text-align: right;
}

.ap-chart__summary strong {
  display: block;
  font-size: 1.1rem;
  color: var(--ap-gold);
}

.ap-toolbar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-top: 16px;
  scrollbar-width: none;
}

.ap-toolbar::-webkit-scrollbar {
  display: none;
}

.ap-chip {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--ap-muted);
  border: 1px solid var(--ap-border);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
}

.ap-chip.is-active {
  color: #111723;
  border-color: transparent;
  background: linear-gradient(180deg, #ffe093, #f2bf44);
}

.ap-chart-skeleton {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.ap-chart-skeleton span {
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(244, 197, 82, 0.14), rgba(255, 255, 255, 0.05));
  background-size: 200% 100%;
  animation: apPulse 1.4s linear infinite;
}

.ap-chart-skeleton span:nth-child(2) {
  width: 84%;
}

.ap-chart-skeleton span:nth-child(3) {
  width: 64%;
}

@keyframes apPulse {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.ap-empty-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  color: var(--ap-muted);
}

.ap-chart-wrap {
  position: relative;
  margin-top: 20px;
  min-height: 260px;
}

#performanceChart {
  width: 100%;
  height: 260px;
}

.ap-chart-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.ap-chart-meta__item strong {
  display: block;
  margin-top: 6px;
  font-size: 1rem;
}

.ap-grid {
  display: grid;
  gap: 18px;
}

.ap-list-stack,
.ap-score-stack,
.ap-recent-trades,
.ap-table-card {
  display: grid;
  gap: 12px;
}

.ap-compact-scroller {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}

.ap-compact-scroller::-webkit-scrollbar {
  height: 8px;
}

.ap-compact-scroller::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.ap-compact-scroller::-webkit-scrollbar-thumb {
  background: rgba(244, 197, 82, 0.32);
  border-radius: 999px;
}

.ap-compact-card {
  flex: 0 0 min(78vw, 240px);
}

.ap-compact-card--symbol {
  flex-basis: min(76vw, 220px);
  min-height: 176px;
  aspect-ratio: auto;
}

.ap-list-item,
.ap-score-row,
.ap-table-row {
  display: grid;
  gap: 8px;
  align-content: start;
}

.ap-score-row__track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.ap-score-row__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #c98c1d, #f4c552, #72dfab);
}

.ap-tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ap-trade-tag {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ap-muted);
}

.ap-trade-tag.is-good {
  background: rgba(104, 224, 166, 0.13);
  color: #9df0c0;
}

.ap-trade-tag.is-warn {
  background: rgba(255, 139, 135, 0.13);
  color: #ffb6b2;
}

.ap-trade-tag.is-accent {
  background: rgba(244, 197, 82, 0.13);
  color: #ffe29c;
}

.ap-grid--two,
.ap-grid--three {
  margin-top: 18px;
}

.ap-panel--premium {
  isolation: isolate;
}

.ap-lock-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 26px;
  border-radius: inherit;
  background: rgba(9, 13, 19, 0.78);
  backdrop-filter: blur(14px);
}

.ap-lock-overlay strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.ap-lock-overlay p {
  margin: 0 0 16px;
  color: var(--ap-muted);
  line-height: 1.6;
}

.ap-live-focus__card {
  margin-top: 18px;
}

.ap-live-focus__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.ap-live-focus__stats div {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
}

.ap-table-row {
  grid-template-columns: 1fr;
}

.ap-table-row strong {
  display: block;
  margin-top: 4px;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.ap-trade-row {
  position: relative;
}

.ap-trade-cell {
  min-width: 0;
}

.ap-trade-side {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.8rem;
}

.ap-trade-side--long {
  border-color: rgba(104, 224, 166, 0.22);
  background: rgba(104, 224, 166, 0.12);
  color: #9df0c0;
}

.ap-trade-side--short {
  border-color: rgba(255, 139, 135, 0.22);
  background: rgba(255, 139, 135, 0.12);
  color: #ffb6b2;
}

.ap-trade-side--neutral {
  border-color: rgba(242, 185, 75, 0.18);
  background: rgba(242, 185, 75, 0.1);
  color: #ffe29c;
}

.ap-table-header {
  display: none;
}

.ap-recent-trades .ap-table-row {
  grid-template-columns: 1fr;
}

#symbolPerformanceTable .ap-compact-scroller--symbols {
  gap: 10px;
  padding: 2px 2px 10px;
  scroll-snap-type: x proximity;
}

#symbolPerformanceTable .ap-table-row {
  align-content: start;
  gap: 6px;
  padding: 12px;
  border-radius: 18px;
  scroll-snap-align: start;
}

#symbolPerformanceTable .ap-table-row > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

#symbolPerformanceTable .ap-table-row span {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#symbolPerformanceTable .ap-table-row strong {
  margin-top: 0;
  font-size: 0.86rem;
  line-height: 1.22;
  word-break: break-word;
}

#symbolPerformanceTable .ap-table-row > div:first-child strong,
#symbolPerformanceTable .ap-table-row > div:nth-child(3) strong {
  font-size: 1rem;
}

.ap-value-positive {
  color: var(--ap-green);
}

.ap-value-negative {
  color: var(--ap-red);
}

.ap-value-accent {
  color: var(--ap-gold);
}

.ap-value-neutral {
  color: var(--ap-text);
}

#periodPerformanceGrid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#periodPerformanceGrid .ap-mini-stat {
  display: grid;
  align-content: start;
  justify-items: start;
  text-align: left;
  min-height: 132px;
  gap: 8px;
}

#periodPerformanceGrid .ap-mini-stat strong {
  display: block;
  font-size: 1.08rem;
}

.ap-feed-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ap-gold);
  box-shadow: 0 0 0 8px rgba(244, 197, 82, 0.08);
}

.ap-footer {
  padding: 20px 0 34px;
}

.ap-footer__inner {
  justify-content: space-between;
}

.ap-footer__inner p {
  margin: 6px 0 0;
  max-width: 60ch;
  color: var(--ap-muted);
  line-height: 1.6;
}

.ap-footer__links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.ap-footer__links a {
  color: var(--ap-muted);
  text-decoration: none;
}

.ap-footer__links a:hover,
.ap-footer__links a:focus-visible {
  color: var(--ap-text);
}

.ap-panel[data-lazy-section].is-pending {
  min-height: 220px;
}

.ap-panel[data-lazy-section].is-pending > *:not(.ap-panel__topline) {
  opacity: 0;
}

.ap-panel[data-lazy-section].is-pending::after {
  content: "";
  position: absolute;
  inset: auto 20px 20px;
  height: 80px;
  border-radius: 20px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(244, 197, 82, 0.12), rgba(255, 255, 255, 0.04));
  background-size: 200% 100%;
  animation: apPulse 1.4s linear infinite;
}

body.account-performance-page.account-performance-page--live .ap-header,
body.account-performance-page.account-performance-page--live .ap-footer,
body.account-performance-page.account-performance-page--live .ap-grid,
body.account-performance-page.account-performance-page--live #recentTradesSection,
body.account-performance-page.account-performance-page--live #systemNotice,
body.account-performance-page.account-performance-page--live #topStatsGrid,
body.account-performance-page.account-performance-page--live .ap-account-card__footer .ap-inline-cta {
  display: none !important;
}

body.account-performance-page.account-performance-page--live .ap-main {
  padding-top: 18px;
}

body.account-performance-page.account-performance-page--live .ap-shell {
  width: min(1440px, calc(100% - 24px));
}

body.account-performance-page.account-performance-page--live .ap-hero {
  grid-template-columns: 1fr;
}

body.account-performance-page.account-performance-page--live .ap-hero__copy,
body.account-performance-page.account-performance-page--live .ap-account-card,
body.account-performance-page.account-performance-page--live .ap-panel--chart,
body.account-performance-page.account-performance-page--live .ap-live-focus {
  border-radius: 28px;
}

body.account-performance-page.account-performance-page--live .ap-hero__lead,
body.account-performance-page.account-performance-page--live .ap-hero__meta,
body.account-performance-page.account-performance-page--live .ap-account-card__footer,
body.account-performance-page.account-performance-page--live .ap-account-grid {
  display: none !important;
}

body.account-performance-page.account-performance-page--live .ap-chart-wrap,
body.account-performance-page.account-performance-page--live #performanceChart {
  min-height: min(70vh, 720px);
  height: min(70vh, 720px);
}

@media (min-width: 768px) {
  .ap-shell {
    width: min(1240px, calc(100% - 48px));
  }

  .ap-nav--mobile {
    width: min(1240px, calc(100% - 48px));
  }

  .ap-nav--desktop {
    display: flex;
  }

  .ap-menu-toggle {
    display: none;
  }

  .ap-main {
    padding-top: 32px;
  }

  .ap-hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  }

  .ap-stats-grid {
    display: grid;
    overflow: visible;
    scroll-snap-type: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ap-stat-card {
    flex: initial;
  }

  .ap-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ap-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ap-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ap-chart-meta {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ap-chart-wrap {
    min-height: 380px;
  }

  #performanceChart {
    height: 380px;
  }

  .ap-live-focus__card {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .ap-live-focus__stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ap-table-header {
    display: grid;
    grid-template-columns: 1.1fr 0.8fr 0.8fr 0.9fr 0.9fr 0.9fr 1.2fr;
    gap: 12px;
    padding: 0 14px;
    color: var(--ap-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
  }

  .ap-recent-trades .ap-table-row {
    grid-template-columns: 1.1fr 0.8fr 0.8fr 0.9fr 0.9fr 0.9fr 1.2fr;
    align-items: start;
  }

  .ap-recent-trades .ap-table-row span {
    display: block;
  }

  .ap-trade-side {
    min-height: 26px;
    padding: 0 8px;
    font-size: 0.74rem;
  }

  .ap-compact-card {
    flex-basis: 210px;
  }

  .ap-compact-card--symbol {
    flex-basis: 196px;
    min-height: 164px;
  }
}

@media (min-width: 1100px) {
  .ap-stats-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .ap-mini-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .ap-hero__copy,
  .ap-account-card,
  .ap-panel,
  .ap-live-focus__card,
  .ap-footer__inner {
    padding: 16px;
    border-radius: 20px;
  }

  .ap-account-grid,
  .ap-chart-meta {
    grid-template-columns: 1fr;
  }

  .ap-header {
    padding-top: 8px;
  }

  .ap-header__inner {
    min-height: 70px;
    padding: 10px 12px;
    border-radius: 22px;
  }

  .ap-nav--mobile {
    width: calc(100% - 32px);
    border-radius: 20px;
  }

  #periodPerformanceGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ap-hero h1 {
    max-width: none;
    font-size: clamp(1.85rem, 8vw, 2.4rem);
  }

  .ap-header__actions .ap-link-button {
    display: none;
  }

  .ap-panel--publish {
    padding: 18px;
  }

  .ap-publish-toggle-head {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
  }

  .ap-publish-toggle-head__copy {
    width: 100%;
  }

  .ap-publish-toggle-head__hint {
    font-size: 0.88rem;
  }

  .ap-publish-toggle-head__summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ap-publish-toggle-head__side {
    width: 100%;
    grid-template-columns: auto auto;
    align-items: center;
    justify-content: space-between;
    justify-items: auto;
  }

  .ap-publish-summary-pill {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    padding: 10px 12px;
    border-radius: 14px;
    min-height: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
  }

  .ap-publish-toggle-head__side .ap-pill {
    justify-self: start;
  }

  .ap-publish-collapsible {
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
  }

  .ap-publish-grid--meta,
  .ap-publish-toggle-grid {
    grid-template-columns: 1fr;
  }

  .ap-publish-link-row,
  .ap-publish-actions {
    align-items: stretch;
    padding: 14px;
  }

  .ap-publish-link-row .ap-button,
  .ap-publish-actions .ap-button {
    width: 100%;
  }

  .ap-visibility-tile {
    min-height: 0;
    padding: 15px;
    border-radius: 16px;
  }

  .ap-visibility-tile strong {
    font-size: 0.95rem;
  }

  .ap-hero__actions {
    align-items: stretch;
  }

  .ap-hero__actions .ap-button,
  .ap-hero__actions .ap-link-button {
    flex: 1 1 100%;
  }

  .ap-footer__inner {
    display: grid;
    gap: 18px;
  }

  .ap-stat-card {
    flex-basis: min(78vw, 230px);
    min-height: 98px;
  }

  .ap-stat-card small,
  .ap-mini-stat small,
  .ap-list-item small,
  .ap-score-row small {
    font-size: 0.82rem;
  }

  .ap-compact-card {
    flex-basis: min(74vw, 220px);
  }

  .ap-compact-card--symbol {
    flex-basis: min(72vw, 205px);
    min-height: 168px;
  }

  .ap-live-focus__stats {
    grid-template-columns: 1fr;
  }

  .ap-table-row {
    padding: 12px;
  }

  .ap-recent-trades {
    gap: 14px;
  }

  .ap-recent-trades .ap-trade-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
    padding: 14px;
    border-radius: 20px;
  }

  .ap-recent-trades .ap-trade-cell {
    display: grid;
    gap: 5px;
  }

  .ap-recent-trades .ap-trade-cell--date {
    grid-column: 1 / -1;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .ap-recent-trades .ap-trade-cell--symbol strong,
  .ap-recent-trades .ap-trade-cell--profit strong {
    font-size: 1rem;
  }

  .ap-recent-trades .ap-trade-cell--profit {
    text-align: right;
    align-items: end;
  }

  .ap-recent-trades .ap-trade-cell--profit span {
    text-align: right;
  }

  .ap-recent-trades .ap-trade-cell--badge {
    grid-column: 1 / -1;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .ap-recent-trades .ap-tag-row {
    gap: 6px;
  }

  .ap-recent-trades .ap-trade-tag {
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.7rem;
    letter-spacing: 0.01em;
  }

  .ap-recent-trades .ap-trade-side {
    justify-self: start;
  }

  .ap-chart-wrap {
    min-height: 240px;
  }

  #performanceChart {
    height: 240px;
  }

  body.account-performance-page.account-performance-page--live .ap-chart-wrap,
  body.account-performance-page.account-performance-page--live #performanceChart {
    min-height: 54vh;
    height: 54vh;
  }
}
