/* ==========================================================================
   Orblivion: My account (web/account.html)
   On top of the docs' tokens and top bar (/docs/docs.css): the same colours, type and light/dark themes.
   ========================================================================== */

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* the brand's gradient stops, themed (the docs set these inline; this page allows no inline styles) */
#mk-ring stop:nth-child(1) { stop-color: var(--mk-ring-0); }
#mk-ring stop:nth-child(2) { stop-color: var(--mk-ring-1); }
#mk-orbit stop:nth-child(1) { stop-color: var(--mk-orbit-0); }
#mk-orbit stop:nth-child(2) { stop-color: var(--mk-orbit-1); }
#mk-orbit stop:nth-child(3) { stop-color: var(--mk-orbit-2); }
#wm-o-grad stop:nth-child(1) { stop-color: var(--wm-o-0); }
#wm-o-grad stop:nth-child(2) { stop-color: var(--wm-o-1); }
#wm-o-grad stop:nth-child(3) { stop-color: var(--wm-o-2); }

.acct {
  max-width: 1120px; margin: 0 auto; padding: 36px var(--gutter) 64px; outline: none;
  overflow-wrap: anywhere;
}
.acct-head { max-width: 760px; margin-bottom: 26px; }
.acct-eyebrow {
  margin: 0 0 10px; font: 500 11px var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3);
}
.acct h1 {
  margin: 0 0 12px;
  font-family: var(--display); font-weight: 400; font-size: clamp(24px, 3.6vw, 34px); line-height: 1.2;
  letter-spacing: 0.02em;
  background: var(--heading); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.acct-lead { margin: 0; font-size: 16.5px; color: var(--text-2); }
.acct-note { color: var(--text-2); }
.acct-footer { margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); }
.acct-footer p { margin: 0; }
.acct-footer p + p { margin-top: 8px; }

/* ---------- Buttons and inputs ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font: 500 14px var(--font); white-space: nowrap;
  transition: border-color .15s, background-color .15s, opacity .15s;
}
.btn:hover { border-color: var(--accent-line); text-decoration: none; }
.btn:disabled { opacity: 0.55; cursor: progress; }
.btn-primary { border-color: transparent; background: var(--accent-grad); color: #fff; }
.btn-primary:hover { border-color: transparent; opacity: 0.92; }
.btn-sm { min-height: 32px; padding: 0 13px; font-size: 13px; }
.btn-link { border: 0; background: none; padding: 0; min-height: 0; color: var(--accent-bright); font: inherit; }

.field {
  width: 100%; min-width: 0; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text);
  font: 13px var(--mono);
}
.field:focus { outline: 2px solid var(--focus); outline-offset: 1px; }

/* ---------- Cards ---------- */

.card {
  margin: 0 0 18px; padding: 20px 22px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface);
  min-width: 0;
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.card h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.005em; }
.card-sub { margin: 0; font-size: 13px; color: var(--text-3); }
.card p { margin: 0 0 12px; }
.card p:last-child { margin-bottom: 0; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.grid-2 > .card { margin: 0; }
.stack { display: grid; gap: 18px; margin-bottom: 18px; }

/* the signed-in bar */
.whoami {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 0 0 18px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2);
}
.whoami-id { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.whoami-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--up); flex: none; }
.mono { font-family: var(--mono); }
.muted { color: var(--text-3); }
.small { font-size: 12.5px; }

/* sign-in */
.signin { max-width: 640px; }
.signin-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.signin details { margin-top: 16px; }
.signin summary { cursor: pointer; color: var(--text-2); font-size: 14px; }
.signin .key-row { display: flex; gap: 8px; margin-top: 10px; }
.signin .key-row .field { flex: 1 1 auto; }

/* errors */
.err {
  margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--line-strong); border-left: 3px solid var(--down);
  border-radius: var(--radius-sm); background: var(--down-soft); font-size: 14px;
}
.err.warn { border-left-color: var(--amber); background: var(--amber-soft); }
.err strong { display: block; margin-bottom: 2px; }
.err code { font: 12px var(--mono); color: var(--text-2); }

/* ---------- Portfolio ---------- */

.total { margin: 0 0 4px; font: 500 30px/1.15 var(--font); letter-spacing: -0.01em; }
.total-note { margin: 0 0 16px; font-size: 13px; color: var(--text-3); }

.tbl-wrap { overflow-x: auto; scrollbar-width: thin; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.45; }
.tbl th, .tbl td { padding: 9px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.tbl thead th {
  font: 500 10.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); white-space: nowrap;
}
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl td.num { font-family: var(--mono); font-size: 13px; }
.tok { display: flex; flex-direction: column; min-width: 0; }
.tok-sym { font-weight: 600; }
.tok-addr { font: 11.5px var(--mono); color: var(--text-3); }

.badge {
  display: inline-block; padding: 1px 8px; border-radius: 999px; white-space: nowrap;
  font: 600 10.5px/1.75 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-2); background: var(--surface-3);
}
.badge-up { color: var(--up); background: var(--up-soft); }
.badge-down { color: var(--down); background: var(--down-soft); }
.badge-warn { color: var(--amber); background: var(--amber-soft); }
.badge-live { color: var(--live); background: var(--live-soft); }

/* ---------- Fee tier ---------- */

.tier-now { margin: 0 0 2px; font: 500 28px/1.15 var(--font); }
.tier-sub { margin: 0 0 16px; font-size: 13px; color: var(--text-3); }
.bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin: 8px 0 8px; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--accent-grad); }
.tiers { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.tiers li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: var(--radius-sm); }
.tiers li.on { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }

/* ---------- Trades ---------- */

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.pair { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.arrow { color: var(--text-3); }
.more { margin-top: 14px; text-align: center; }
.tx { font: 12.5px var(--mono); white-space: nowrap; }
.empty { margin: 4px 0 0; color: var(--text-3); font-size: 14px; }

/* ---------- Sessions ---------- */

.items { display: grid; gap: 10px; }
.item { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.item-title { font-weight: 600; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 14px; margin: 6px 0 0; font-size: 13.5px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; min-width: 0; }
.routes { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-3); font-size: 12.5px; }
.routes code { font: 12px var(--mono); }

/* ---------- Phone ---------- */

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .acct { padding-top: 26px; }
  .card { padding: 16px 14px; }
  .total { font-size: 26px; }
  /* tables become cards: each row a block, each value under its column's label */
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .tbl tbody tr:last-child { border-bottom: 0; }
  .tbl td { padding: 2px 0; border: 0; }
  .tbl td.num { text-align: right; }
  /* each value on its label's line: the label left, the value right */
  .tbl td[data-label] { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  .tbl td[data-label]::before {
    content: attr(data-label); flex: none;
    font: 500 10px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3);
  }
  .tbl td[data-label] > * { min-width: 0; text-align: right; }
  .tbl td:first-child { font-weight: 600; margin-bottom: 2px; }
  .tbl td:first-child::before { display: none; }
  .tbl td.num, .tx { white-space: normal; }
  .signin .key-row { flex-direction: column; }
  .kv { grid-template-columns: minmax(0, 1fr); }
  .kv dd { margin-bottom: 4px; }
}
@media (max-width: 480px) {
  .topbar-home { display: none; }                 /* the brand links home; room for the League link on a phone */
}
