:root {
  --shell-hover: #25312d;
  --shell-surface: #182129;
  --shell-label: #cbd5df;
}

.header-tools, .card-header-actions { display: flex; align-items: center; gap: 5px; }
.header-tools { flex: 0 0 auto; }
.shell-popover { position: relative; }
.shell-tool {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 34px;
  min-height: 34px;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--shell-label);
  cursor: pointer;
  list-style: none;
}
.shell-tool::-webkit-details-marker { display: none; }
.shell-tool:hover, .shell-popover[open] > .shell-tool { background: var(--shell-hover); border-color: var(--border); color: var(--text); }
.shell-tool:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.language-indicator { color: var(--muted); font-size: 9px; font-weight: 650; }
.notification-count {
  position: absolute;
  inset: 1px 2px auto auto;
  min-width: 14px;
  padding-inline: 2px;
  text-align: center;
  border-radius: 8px;
  background: var(--accent);
  color: #142015;
  font-weight: 700;
  font-size: 9px;
}
.shell-menu {
  position: absolute;
  z-index: 9;
  inset: calc(100% + 7px) 0 auto auto;
  min-width: 157px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--shell-surface);
  box-shadow: 0 12px 36px #0003;
  color: var(--text);
}
.shell-menu :is(button, a) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 37px;
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.shell-menu :is(button, a):hover, .language-menu button[aria-pressed="true"] { background: var(--shell-hover); }
.language-menu button[aria-pressed="true"]::after { content: '✓'; color: var(--accent); }
.profile-menu { min-width: 214px; }
.identity-status { color: var(--muted); font-size: 11px; font-weight: 550; }
.notification-menu { width: min(315px, calc(100vw - 26px)); }
.notification-menu h2 { padding: 8px 11px; font-size: 13px; border-bottom: 1px solid var(--border); }
.notification-menu [data-notice-list] { max-height: 280px; overflow: auto; }
.notice-empty { padding: 14px 11px; color: var(--muted); }
.notice-entry { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; padding: 10px 11px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.notice-entry:last-child { border-bottom: 0; }
.notice-entry p { grid-column: 1 / -1; color: var(--muted); }
.notice-entry time { font-size: 11px; color: var(--muted); }
.notice-error strong { color: var(--down); }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px 26px;
  margin: 32px 0 0;
  padding: 26px clamp(14px, 3vw, 48px);
  border-top: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
}
.site-footer-identity strong { color: var(--text); font-size: 14px; letter-spacing: .06em; }
.site-footer-identity strong span { color: var(--accent); }
.site-footer-identity p { margin-top: 4px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px 19px; }
.site-footer nav :is(button, a) { padding: 3px 0; border: 0; background: transparent; color: var(--shell-label); font: inherit; }
.site-footer nav :is(button, a):hover { color: var(--accent); text-decoration: underline; }
.site-info { width: min(94vw, 520px); padding: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); color: var(--text); }
.site-info-copy { display: grid; gap: 13px; padding: 17px 21px 21px; font-size: 14px; line-height: 1.6; color: var(--muted); }

.verification-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin: 16px 0 28px; }
.verification-overview > section, .identity-step { padding: clamp(16px, 2.7vw, 27px); }
.verification-overview > section { display: grid; align-content: start; gap: 9px; }
.verification-overview h2 { color: var(--muted); font-size: 13px; font-weight: 550; }
.verification-overview strong { font-size: clamp(17px, 2vw, 25px); line-height: 1.2; }
.verification-overview small { color: var(--muted); }
.verification-email-status { display: inline-flex; align-items: center; gap: 5px; color: var(--up); font-size: 12px; }
.verification-email-status svg { width: 15px; height: 15px; }
.verification-steps h2 { margin-bottom: 12px; font-size: 18px; }
.identity-step { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; }
.identity-step h3 { margin-bottom: 5px; font-size: 14px; }
.identity-step p { color: var(--muted); }
.identity-step button { flex-shrink: 0; }

.card-header-actions { justify-content: flex-end; flex-wrap: wrap; }

:root[data-theme="light"] {
  color-scheme: light;
  --background: #f4f6f3;
  --panel: #ffffff;
  --raised: #edf1ed;
  --field: #f8faf7;
  --border: #d9e1da;
  --muted: #56665c;
  --soft: #62736a;
  --text: #1b2b21;
  --accent: #397345;
  --up: #236e49;
  --down: #ac364a;
  --shell-hover: #e9f0e9;
  --shell-surface: #ffffff;
  --shell-label: #344d3d;
}
:root[data-theme="light"] .button.primary,
:root[data-theme="light"] .notification-count { color: #fff; }
:root[data-theme="light"] .button.primary:not(:disabled):hover { background: #2e5f3b; }
:root[data-theme="light"] :where(.topbar, .account-rail, .nav-popover, .balance-breakdown, dialog, .toast,
  .ticker-strip, .chart-tab-bar, .auth-tabs, .segmented, .checkout-summary, .account-record-detail,
  .button.subdued, .market-filters button, .amount-presets button, .favorite-button, .market-open) {
  background: var(--panel);
  border-color: var(--border);
}
:root[data-theme="light"] :where(.field, .search-field, .dark-select, .chart-status, .signin-panel, .registration-check) {
  background: var(--field);
  border-color: var(--border);
  color: var(--text);
}
:root[data-theme="light"] :where(.ticker-item strong, .chart-meta, .account-rail button, .account-rail a, .text-button, .top-balance span,
  .chart-tab button, .balance-breakdown dt, .market-highlight > small, .data-table th, .toast span, .setup-storage-note) { color: var(--shell-label); }
:root[data-theme="light"] :where(.ticker-item:hover, .watch-row:hover, .data-table tbody tr:hover, .instruments-table tbody tr:hover,
  .landing-quotes tbody tr:hover, .account-rail a:hover, .account-rail button:hover, .nav-popover a:hover, .nav-popover button:hover,
  .button.subdued:hover, .account-card.selected-account, .account-record.selected-account) {
  background: var(--shell-hover);
  border-color: var(--border);
}
:root[data-theme="light"] :where(.account-rail a[aria-current="page"], .ticker-item[aria-current="true"], .chart-tab.selected,
  .watch-row.active, .landing-market-categories button[aria-pressed="true"], .auth-tabs a[aria-current], .market-filters button[aria-pressed="true"],
  .amount-presets button[aria-pressed="true"], .segmented button[aria-pressed="true"], .verification-address span, .email-banner) {
  background: #e2f0e0;
  color: #275839;
  border-color: #bdd3bf;
}
:root[data-theme="light"] :where(.email-banner p, .auth-aside p, .welcome-copy p) { color: #445f4e; }
:root[data-theme="light"] :where(.welcome-cover, .auth-aside, .landing-terminal, .referral-content, .card-setup-page) {
  background-color: #edf3eb;
  color: var(--text);
}
:root[data-theme="light"] :where(.welcome-cover, .auth-aside, .landing-terminal, .card-setup-page) {
  background-image: linear-gradient(124deg, #f7faf5, #e8f1e5);
}
:root[data-theme="light"] .welcome-cover::after { background: none; }
:root[data-theme="light"] :where(.welcome-market, .market-highlight, .quote-change, .card-option, .deposit-summary) {
  background: var(--raised);
  border-color: var(--border);
  color: var(--text);
}
:root[data-theme="light"] .quote-change.up { background: #dceee2; color: var(--up); }
:root[data-theme="light"] .quote-change.down { background: #f7e4e8; color: var(--down); }
:root[data-theme="light"] .order-side button[data-side="buy"][aria-pressed="true"] { background: #dcf0e4; color: #225638; }
:root[data-theme="light"] .order-side button[data-side="sell"][aria-pressed="true"] { background: #f6e1e6; color: #8b3145; }

@media (max-width: 780px) {
  .header-tools { gap: 3px; }
  .shell-tool { min-width: 29px; padding-inline: 4px; }
  .shell-tool svg { width: 17px; height: 17px; }
  .language-indicator { display: none; }
  .site-footer { margin-top: 22px; padding-block: 19px; }
}
@media (max-width: 460px) {
  .topbar .top-actions { flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
  .notification-menu { position: fixed; inset: 62px 13px auto auto; }
  .verification-overview { grid-template-columns: 1fr; }
  .topbar .brand { gap: 6px; font-size: 17px; }
  .topbar .brand-mark { width: 20px; }
  .topbar .top-balance { min-width: 0; max-width: 85px; padding-right: 5px; }
  .topbar .top-balance span { max-width: 65px; overflow: hidden; text-overflow: ellipsis; }
  .topbar .top-balance strong { font-size: 13px; }
}
