/* ==========================================================================
   MEXC Crypto — Paper & Pine
   The desk reads like a well-set market letter: paper ground, ink type,
   hairlines instead of boxes. Pine is the only chrome accent; green and
   rust stay reserved for price direction. Fewer boxes, more air.
   Loaded after redesign.css on purpose: this is the current layer.
   ========================================================================== */

:root,
html[data-theme="light"] {
  --display: "Bahnschrift", "DIN Alternate", "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --sans: "IBM Plex Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --bg: #f3f2ec;
  --bg-side: #f8f7f1;
  --panel: #fcfbf6;
  --panel2: #ebe9df;
  --line: rgba(24, 33, 27, .10);
  --line2: rgba(24, 33, 27, .17);
  --tx: #18211b;
  --tx2: #44514a;
  --mut: #6c786f;
  --dim: #7d8880;

  --accent: #1d5b45;
  --accent-strong: #134130;
  --accent-soft: rgba(29, 91, 69, .075);
  --dex: #1d5b45;
  --dex-soft: rgba(29, 91, 69, .075);
  --dex-line: rgba(29, 91, 69, .34);
  --up: #1b6b49;
  --up2: #1b6b49;
  --down: #a8452d;
  --down2: #a8452d;
  --amber: #8a6414;
  --btc: #a85e00;
  --eth: #3e4fa6;
  --danger-soft: rgba(168, 69, 45, .075);

  --r-xs: 2px;
  --r-sm: 3px;
  --r-md: 4px;
  --r: 4px;
  --r-lg: 6px;
  --r-pill: 999px;
  --pad-card: 0px;
  --pad-page: 32px;
  --side-w: 232px;
  --side-rail: 66px;
  --top-h: 56px;
  --nav-row: 38px;
  --page-max: 1480px;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --dur-hover: .15s;
  --dur-menu: .2s;
  --dur-enter: .24s;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0f1613;
  --bg-side: #0b110e;
  --panel: #151e19;
  --panel2: #1d2822;
  --line: rgba(228, 238, 230, .10);
  --line2: rgba(228, 238, 230, .18);
  --tx: #e9efe9;
  --tx2: #b3c0b7;
  --mut: #8a9a90;
  --dim: #7d8d83;

  --accent: #79c4a3;
  --accent-strong: #9ad8bb;
  --accent-soft: rgba(121, 196, 163, .10);
  --dex: #79c4a3;
  --dex-soft: rgba(121, 196, 163, .10);
  --dex-line: rgba(121, 196, 163, .38);
  --up: #57c48f;
  --up2: #57c48f;
  --down: #e27a63;
  --down2: #e27a63;
  --amber: #d9b06a;
  --btc: #f0a04b;
  --eth: #8f9ddb;
  --danger-soft: rgba(226, 122, 99, .10);
  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--tx);
  font: 14px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--mut); }

/* --------------------------------------------------------------------------
   Shell: a paper margin, not a dashboard frame
   -------------------------------------------------------------------------- */

.side {
  background: var(--bg-side);
  border-right: 1px solid var(--line);
  padding: 20px 16px 16px;
}
.brand {
  gap: 11px;
  padding: 0 6px 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.logo {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  background: var(--accent);
  color: #f8f7f1;
  border-radius: 2px;
  box-shadow: none;
}
.brand b {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .005em;
  color: var(--tx);
}
.brand .subbrand {
  margin-top: 3px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .085em;
  color: var(--mut);
  text-transform: uppercase;
  font-weight: 400;
}

.nav { gap: 1px; }
.nav a {
  height: var(--nav-row);
  padding: 0 10px 0 12px;
  border-radius: 3px;
  border: 1px solid transparent;
  font-size: 13px;
  color: var(--tx2);
}
.nav a:hover { background: var(--accent-soft); color: var(--tx); }
.nav a.on {
  background: transparent;
  color: var(--tx);
  border-color: transparent;
  font-weight: 500;
}
.nav a.on::before {
  left: 0;
  top: 11px;
  bottom: 11px;
  width: 2px;
  border-radius: 0;
  background: var(--accent);
}
.nav .ico { color: var(--mut); }
.nav a.on .ico { color: var(--accent); }

.nav-sec {
  height: var(--nav-row);
  margin-top: 10px;
  padding: 0 10px 0 12px;
  border: 1px solid transparent;
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  color: var(--tx2);
}
.nav-sec:hover { background: var(--accent-soft); color: var(--tx); }
.nav-sec .sec-ico { color: var(--mut); }
.nav-sec em {
  font-size: 10px;
  color: var(--mut);
  letter-spacing: .02em;
}
.nav a.sub { height: var(--nav-row); padding-inline-start: 12px; }
.nav a.sub .ico {
  border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
  border-radius: 3px;
  background: color-mix(in srgb, currentColor 10%, transparent);
  font-size: 9px;
}
.nav a.off { opacity: .5; }

.side-foot {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0;
  color: var(--mut);
}
.side-foot .stamp { font-family: var(--mono); color: var(--tx2); font-size: 10px; }

/* top bar: quiet chrome */
.top {
  height: var(--top-h);
  padding-left: max(var(--pad-page), calc((100% - var(--page-max)) / 2 + var(--pad-page)));
  padding-right: max(var(--pad-page), calc((100% - var(--page-max)) / 2 + var(--pad-page)));
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  gap: 14px;
}
.crumb { font-family: var(--sans); font-size: 11px; letter-spacing: .02em; color: var(--mut); }
.crumb b {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--tx);
}
.crumb em { color: var(--line2); }
.clock { font-size: 11px; letter-spacing: .03em; color: var(--mut); font-family: var(--mono); }
.riskpill {
  border: 0;
  background: transparent;
  padding: 0;
  gap: 7px;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--mut);
}
.riskpill .lbl { font-size: 11px; color: var(--mut); }
.riskpill b { font-family: var(--mono); font-size: 12px; color: var(--tx); }
.theme-toggle {
  width: 30px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: var(--tx2);
}
.theme-toggle:hover { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.accountbtn {
  height: 32px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  padding-left: 4px;
}
.accountbtn:hover { background: var(--accent-soft); }
.accountbtn .av {
  width: 24px;
  height: 24px;
  border-radius: 2px;
  background: var(--accent);
  border-color: transparent;
  color: #f8f7f1;
  font-family: var(--display);
  font-size: 11px;
}
.accountbtn .an { font-size: 12px; color: var(--tx2); }
.accountmenu {
  border-radius: 4px;
  background: var(--panel);
  border-color: var(--line2);
  padding: 5px;
  box-shadow: 0 18px 44px rgba(10, 18, 13, .14);
}
.accountmenu button { border-radius: 2px; font-size: 12px; }
.accountmenu button:hover { background: var(--accent-soft); }

/* --------------------------------------------------------------------------
   Page frame / headings — no accent bars, no dashes
   -------------------------------------------------------------------------- */

.views {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 34px var(--pad-page) 72px;
  width: 100%;
}
h2.pg {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.1;
  margin: 0 0 26px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--line2);
}
h2.pg::before { display: none; content: none; }
h2.pg .dim {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--mut);
}

/* --------------------------------------------------------------------------
   Sections, not cards
   -------------------------------------------------------------------------- */

.card {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line2);
  border-radius: 0;
  padding: 20px 0 6px;
  box-shadow: none;
}
.card > h3 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--tx);
  padding: 0;
  border: 0;
  margin: 0 0 14px;
}
.card > h3::before { display: none; content: none; }
.card > h3 .r {
  margin-left: auto;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0;
  color: var(--mut);
  font-weight: 400;
  display: flex;
  gap: 10px;
  align-items: center;
}
.card > h3 .r a { color: var(--accent); }

/* the rare true panel */
.sheet {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 22px;
}
.sheet > h3 { margin-top: 0; }

.hint { font-size: 12px; line-height: 1.7; color: var(--mut); margin-top: 10px; }
.sub { color: var(--mut); }
.empty { padding: 26px 0; font-size: 13px; color: var(--mut); }

/* figures */
.stat, .kpi {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line2);
  border-radius: 0;
  padding: 16px 0 10px;
}
.stat .l, .kpi .kh {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .01em;
  color: var(--mut);
  margin-bottom: 8px;
}
.stat .n, .kpi .v {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat .s, .kpi .f { margin-top: 7px; font-size: 11px; color: var(--mut); }

/* --------------------------------------------------------------------------
   Controls
   -------------------------------------------------------------------------- */

.chip {
  border: 0;
  border-radius: 2px;
  padding: 2px 7px;
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.55;
  letter-spacing: .01em;
  background: var(--panel2);
  color: var(--tx2);
}
.chip i { width: 4px; height: 4px; }
.chip.g { background: rgba(27, 107, 73, .09); color: var(--up); }
.chip.r { background: var(--danger-soft); color: var(--down); }
.chip.a { background: rgba(138, 100, 20, .09); color: var(--amber); }
.chip.b, .chip.v, .chip.n { background: var(--panel2); color: var(--tx2); }
html[data-theme="dark"] .chip.g { background: rgba(87, 196, 143, .12); }
html[data-theme="dark"] .chip.a { background: rgba(217, 176, 106, .12); }

.btn {
  height: 36px;
  padding: 0 15px;
  border-radius: 3px;
  border: 1px solid var(--line2);
  background: transparent;
  color: var(--tx);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .01em;
  transition: background var(--dur-hover) var(--ease), border-color var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease);
}
.btn:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.btn:active { transform: none; }
.btn.pri {
  background: var(--accent);
  border-color: var(--accent);
  color: #f8f7f1;
}
.btn.pri:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #f8f7f1; }
.btn.ghost { background: transparent; border-color: var(--line2); }
.btn.danger { color: var(--down); border-color: rgba(168, 69, 45, .34); background: var(--danger-soft); }
.btn .ico { width: 15px; height: 15px; }

.s-btn, .s-select, .s-input {
  border-radius: 3px;
  background: var(--panel);
  border-color: var(--line2);
}
.s-btn { border-color: var(--accent); background: transparent; color: var(--accent); }
.s-btn:hover { background: var(--accent-soft); }
.s-btn.ghost { border-color: var(--line2); color: var(--tx2); }

.input,
.s-input,
.s-select,
textarea.input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line2);
  border-radius: 3px;
  background: var(--panel);
  color: var(--tx);
  font: 13px/1.4 var(--sans);
  box-sizing: border-box;
  transition: border-color var(--dur-hover) var(--ease), box-shadow var(--dur-hover) var(--ease);
}
.input::placeholder, .s-input::placeholder { color: var(--dim); }
.input:focus, .s-input:focus, .s-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.field label { margin-bottom: 6px; color: var(--mut); font-size: 11px; }

.tabs {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line2);
  border-radius: 0;
  padding: 0;
  gap: 26px;
}
.tabs button {
  height: 40px;
  padding: 0;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  margin-bottom: -1px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--mut);
  font-weight: 400;
}
.tabs button:hover { background: none; color: var(--tx); }
.tabs button.on { background: none; color: var(--tx); border-bottom-color: var(--accent); font-weight: 500; }

.tf button { border-radius: 2px; background: transparent; border-color: var(--line); color: var(--mut); }
.tf button.on { background: var(--accent-soft); border-color: var(--dex-line); color: var(--accent); }
.seg { border-radius: 3px; background: var(--panel2); border-color: var(--line); }
.seg button { border-radius: 2px; }
.seg button.on { background: var(--panel); color: var(--tx); }

/* tables: a ledger, not a grid */
.tbw { overflow-x: auto; }
.tbw table { width: 100%; border-collapse: collapse; }
.tbw th, table th {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .02em;
  color: var(--mut);
  border-bottom: 1px solid var(--line2);
  padding: 0 12px 9px;
  text-align: left;
}
.tbw td, table td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  font-size: 13px;
  color: var(--tx2);
  text-align: left;
}
.tbw th:first-child, .tbw td:first-child { padding-left: 0; }
.tbw th:last-child, .tbw td:last-child { padding-right: 0; }
.tbw th.num, .tbw td.num { text-align: right; }
.tbw tbody tr:hover td { background: var(--accent-soft); }
.tbw tr:last-child td { border-bottom: 0; }
.tbw td .sub { display: block; margin-top: 2px; font-size: 11px; color: var(--mut); }

/* notes */
.note {
  border-left: 2px solid var(--accent);
  border-radius: 0;
  background: var(--accent-soft);
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--tx2);
}
.note.a { border-color: var(--amber); background: rgba(138, 100, 20, .06); }
.note.r { border-color: var(--down); background: var(--danger-soft); }
.note.g { border-color: var(--up); background: rgba(27, 107, 73, .06); }
.note b { font-weight: 500; color: var(--tx); }

/* overlays */
.modal-bg { background: rgba(16, 24, 19, .38); backdrop-filter: blur(2px); }
.modal {
  border-radius: 3px;
  background: var(--panel);
  border-color: var(--line2);
  box-shadow: 0 26px 70px rgba(10, 18, 13, .18);
}
#tip, #toast {
  border-radius: 3px;
  background: var(--panel);
  border-color: var(--line2);
  box-shadow: 0 16px 40px rgba(10, 18, 13, .16);
}
.bar { background: var(--panel2); border-radius: 0; }
.bar > i { border-radius: 0; }

/* --------------------------------------------------------------------------
   Home — masthead, lead quotes, tape, split, heat map, agenda
   -------------------------------------------------------------------------- */

.home-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin: 0 0 30px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line2);
}
.home-kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .035em;
  color: var(--mut);
  margin-bottom: 10px;
}
.home-title {
  font-family: var(--display);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.04;
  color: var(--tx);
}
.home-title span {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--mut);
  margin-left: 14px;
}
.home-status {
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--mut);
  white-space: nowrap;
}
.home-status b { font-weight: 400; color: var(--tx2); }
.home-status .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--up);
  display: inline-block;
  margin-right: 7px;
  vertical-align: 1px;
}

.lead-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
}
.quote {
  min-width: 0;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.quote.lead {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 2px solid var(--tx);
  border-radius: 2px;
  padding: 22px 24px 16px;
}
.quote.alt {
  border-top: 1px solid var(--line2);
  padding: 20px 2px 6px;
}
.quote-top { display: flex; align-items: baseline; gap: 10px; }
.quote-name { font-family: var(--display); font-size: 13px; font-weight: 500; letter-spacing: .02em; color: var(--tx); }
.quote-long { font-size: 12px; color: var(--mut); }
.quote-ath { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--mut); white-space: nowrap; }
.quote-ath b { font-weight: 400; color: var(--down); }

.quote-fig {
  margin-top: 20px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--display);
  font-size: 54px;
  font-weight: 500;
  line-height: .94;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
  color: var(--tx);
}
.quote-fig small { font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .05em; color: var(--mut); }
.quote.alt .quote-fig { font-size: 36px; margin-top: 16px; }

.quote-chg {
  margin-top: 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .01em;
}
.quote-chg span:last-child { font-family: var(--sans); font-size: 11px; color: var(--mut); }

.quote-spark { height: 66px; margin: 20px -2px 0; }
.quote.alt .quote-spark { height: 46px; margin-top: 16px; }

.quote-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 16px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--mut);
}
.quote-foot b { font-weight: 400; color: var(--tx2); }

.tape {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line2);
  border-bottom: 1px solid var(--line2);
  margin: 32px 0 36px;
}
.tape-cell { padding: 16px 20px; border-left: 1px solid var(--line); min-width: 0; }
.tape-cell:first-child { border-left: 0; padding-left: 0; }
.tape-cell > span {
  display: block;
  font-size: 11px;
  color: var(--mut);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tape-cell > b {
  display: block;
  margin-top: 8px;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: var(--tx);
  white-space: nowrap;
}
.tape-cell > small {
  display: block;
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-split {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr);
  gap: 36px;
  margin-bottom: 38px;
  align-items: start;
}
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line2);
  margin-bottom: 16px;
}
.sec-head h3 { font-family: var(--display); font-size: 15px; font-weight: 500; letter-spacing: .01em; color: var(--tx); }
.sec-head span { font-family: var(--mono); font-size: 11px; color: var(--mut); letter-spacing: .01em; }

.ratio-fig {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -.025em;
  font-variant-numeric: tabular-nums;
  color: var(--tx);
}
.ratio-fig em { font-family: var(--mono); font-style: normal; font-size: 12px; letter-spacing: .01em; }
.ratio-spark { height: 88px; margin: 12px -2px 0; }

.desk-note {
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  padding: 18px 20px 16px;
}
.desk-note .dn-kicker {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--accent);
  margin-bottom: 9px;
}
.desk-note p { font-size: 13px; line-height: 1.75; color: var(--tx2); }
.desk-note .kvlist { margin-top: 12px; border-top: 1px solid rgba(29, 91, 69, .16); padding-top: 4px; }
.desk-note .kv { padding: 7px 0; border-bottom-color: rgba(29, 91, 69, .12); font-size: 11px; }
.desk-note .kv span { font-size: 11px; color: var(--mut); }
.desk-note .kv b { font-size: 11px; color: var(--tx2); }
html[data-theme="dark"] .desk-note .kvlist { border-top-color: rgba(121, 196, 163, .16); }
html[data-theme="dark"] .desk-note .kv { border-bottom-color: rgba(121, 196, 163, .12); }

.heat-sec { margin-bottom: 38px; }
.heat-frame {
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
}
.heat-frame canvas { display: block; width: 100%; }
.heat-legend { margin-top: 10px; font-size: 11px; }
.heat-legend .heat-scale {
  width: 132px;
  height: 6px;
  border-radius: 0;
  background: linear-gradient(90deg, rgba(168, 69, 45, .75), rgba(168, 69, 45, .10), rgba(24, 33, 27, .08), rgba(29, 91, 69, .10), rgba(29, 91, 69, .75));
}

.agenda { border-top: 1px solid var(--line2); }
.agenda-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  transition: background var(--dur-hover) var(--ease);
}
.agenda-row:hover { background: var(--accent-soft); }
.agenda-time { font-family: var(--mono); font-size: 11px; color: var(--mut); letter-spacing: .02em; }
.agenda-title { font-size: 13px; color: var(--tx); line-height: 1.45; }
.agenda-meta { margin-top: 3px; font-family: var(--mono); font-size: 11px; color: var(--mut); }
.agenda-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 2px;
  background: var(--panel2);
  color: var(--tx2);
  white-space: nowrap;
}
.agenda-tag.high { background: var(--danger-soft); color: var(--down); }
.agenda-tag.mid { background: rgba(138, 100, 20, .08); color: var(--amber); }

/* --------------------------------------------------------------------------
   Account / settings: horizontal tabs, statement header, metric rail
   -------------------------------------------------------------------------- */

.settings-grid { display: block; }
.settings-nav {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 26px;
  position: static;
  overflow-x: auto;
  border-bottom: 1px solid var(--line2);
  margin: 0 0 26px;
  padding: 0;
}
.settings-nav button {
  width: auto;
  flex: 0 0 auto;
  height: 40px;
  padding: 0 0 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  margin-bottom: -1px;
  background: none;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--mut);
  white-space: nowrap;
}
.settings-nav button:hover { color: var(--tx); }
.settings-nav button.on {
  background: none;
  border-left: 0;
  border-bottom-color: var(--accent);
  color: var(--tx);
  font-weight: 500;
}
.settings-panel { display: flex; flex-direction: column; gap: 30px; }
.settings-panel > .card:first-child { border-top: 0; padding-top: 0; }

.set-account {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0 0 8px;
  margin-bottom: 0;
}
.set-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 2px;
  background: var(--accent-soft);
  border: 1px solid var(--dex-line);
  color: var(--accent);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 500;
}
.set-account .who { min-width: 0; flex: 1; }
.set-account .who b { display: block; font-family: var(--display); font-size: 15px; font-weight: 500; }
.set-account .who > span { display: block; margin-top: 2px; font-family: var(--mono); font-size: 11px; color: var(--mut); }
.set-account .who .chip {
  display: inline-flex;
  width: auto;
  height: 18px;
  padding: 0 6px;
  margin-left: 7px;
  vertical-align: 1px;
  font-size: 10px;
  line-height: 18px;
}
.set-account .amt { margin-left: auto; text-align: right; display: flex; flex-direction: column; gap: 3px; }
.set-account .amt > span { font-family: var(--sans); font-size: 11px; color: var(--mut); display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; }
.set-account .amt b { font-family: var(--display); font-size: 20px; font-weight: 500; letter-spacing: -.02em; }
.set-account .s-btn { height: 32px; }
.set-account .set-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.set-account .set-actions .s-btn { height: 32px; }

.wallet-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  background: none;
  border: 0;
  border-top: 2px solid var(--tx);
  border-radius: 0;
  padding: 20px 0 24px;
  margin-bottom: 0;
  flex-wrap: wrap;
}
.wallet-main { display: flex; flex-direction: column; gap: 0; }
.wallet-main > span { font-family: var(--sans); font-size: 11px; letter-spacing: .02em; color: var(--mut); }
.wallet-main > b {
  display: block;
  margin-top: 9px;
  font-family: var(--display);
  font-size: 46px;
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}
.wallet-main > b em {
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  font-weight: 400;
  letter-spacing: .05em;
  color: var(--mut);
  margin-left: 7px;
}
.wallet-main small { display: block; margin-top: 9px; font-size: 11px; color: var(--dim); }
.wallet-side { display: grid; grid-template-columns: repeat(3, auto); gap: 0; }
.wallet-side > div { padding: 0 24px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.wallet-side > div:last-child { padding-right: 0; }
.wallet-side span { font-family: var(--sans); font-size: 11px; color: var(--mut); }
.wallet-side b { font-family: var(--display); font-size: 15px; font-weight: 500; letter-spacing: -.01em; }

.wallet-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line2);
  margin: 0 0 8px;
}
.wallet-metrics .card {
  background: none;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  padding: 15px 20px;
}
.wallet-metrics .card:first-child { border-left: 0; padding-left: 0; }
.wallet-metrics span { font-family: var(--sans); font-size: 11px; color: var(--mut); }
.wallet-metrics b { display: block; margin-top: 6px; font-family: var(--display); font-size: 17px; font-weight: 500; letter-spacing: -.015em; }
.wallet-metrics small { display: block; margin-top: 4px; font-family: var(--mono); font-size: 10px; color: var(--dim); }

.grid2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}
#v-account .s-group, #v-settings .s-group { max-width: 860px; }
.set-note {
  border: 0;
  border-left: 2px solid var(--line2);
  border-radius: 0;
  background: transparent;
  padding: 3px 0 3px 12px;
  font-size: 11px;
  color: var(--mut);
  line-height: 1.7;
}

.s-group { padding: 0; }
.s-row { padding: 16px 0; border-bottom: 1px solid var(--line); }
.s-row .txt b { font-size: 13px; font-weight: 500; }
.s-row .txt span { font-size: 11px; color: var(--mut); line-height: 1.6; }

/* deposit / withdraw */
.deposit-grid { grid-template-columns: 360px minmax(0, 1fr); gap: 36px; }
.dep-chain {
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--panel);
  padding: 11px 12px;
}
.dep-chain:hover { border-color: var(--line2); }
.dep-chain.on { border-color: var(--accent); background: var(--accent-soft); color: var(--tx); }
.dep-chain b { font-size: 12px; font-weight: 500; }
.dep-chain span { font-size: 10px; color: var(--mut); }
.dep-asset { border-radius: 2px; background: var(--panel); border-color: var(--line); }
.dep-asset.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.dep-address {
  border: 1px solid var(--line2);
  border-radius: 2px;
  background: var(--panel);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .02em;
  padding: 16px;
}
.dep-memo { border-radius: 2px; border-color: var(--line); }
.deposit-form { gap: 14px; }

/* --------------------------------------------------------------------------
   Detail page
   -------------------------------------------------------------------------- */

.detail-hero {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 2px solid var(--tx);
  border-radius: 2px;
  box-shadow: none;
}
.dh-quote { background: var(--bg); border-left: 1px solid var(--line); }
.dh-facts { border-color: var(--line); }
.dh-fact + .dh-fact { border-color: var(--line); }
.dh-price { letter-spacing: -.03em; color: var(--tx); }
.dh-price.up, .dh-price.dn { color: var(--tx); }
.dh-live i { background: var(--up); box-shadow: 0 0 0 3px var(--accent-soft); }
.dh-track i { border-color: var(--bg); }

/* --------------------------------------------------------------------------
   Trading terminal — calmer, fewer rows
   -------------------------------------------------------------------------- */

.tr-grid { gap: 26px; grid-template-columns: minmax(0, 1fr) 292px 324px; }
.tr-main, .tr-bookcol, .tr-form { gap: 26px; }

.trade-bar {
  display: flex;
  align-items: center;
  gap: 26px;
  margin: 0 0 26px;
  padding: 0 0 22px;
  border-bottom: 1px solid var(--line2);
  flex-wrap: wrap;
}
.trade-bar .pairlist { flex: 1; min-width: 0; }
.trade-bar-note { font-size: 11px; color: var(--mut); white-space: nowrap; letter-spacing: .01em; }
.pair {
  border-radius: 2px;
  border: 1px solid var(--line);
  background: transparent;
  padding: 9px 14px;
  gap: 12px;
}
.pair:hover { border-color: var(--line2); background: var(--panel); }
.pair.on { border-color: var(--accent); background: var(--accent-soft); }
.pair .pic { width: 28px; height: 28px; border-radius: 2px; color: #f8f7f1; }
.pair .px { font-family: var(--display); font-size: 15px; font-weight: 500; letter-spacing: -.01em; }
.pair .chg { font-size: 11px; }
.pair .meta { font-size: 10px; gap: 12px; }
.pair .meta b { font-size: 10px; }

.tr-estimates { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; margin-top: 6px; }
.tr-estimates .kv { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.tr-estimates .kv span { font-size: 11px; }
.tr-estimates .kv b { font-size: 11px; }

.tr-main > .card:first-child {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 2px solid var(--tx);
  border-radius: 2px;
  padding: 20px 22px 16px;
}
.tr-main > .card { padding-top: 18px; }
.trade-head { border-left: 0; border-top: 0; }
.tr-ticker { gap: 22px; }
.tr-px { font-size: 38px; letter-spacing: -.03em; color: var(--tx); }
.tr-px.up, .tr-px.dn { color: var(--tx); }
.tr-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 20px; margin-top: 18px; padding-top: 14px; }
.tr-stats .s span { font-size: 11px; }
.tr-stats .s b { font-size: 12px; }
.tr-form > .card:first-child { border-top: 1px solid var(--line2); padding-top: 16px; }
#tr-formcard {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 2px solid var(--tx);
  border-radius: 2px;
  padding: 18px 18px 16px;
}
#tr-formcard > h3 { margin-bottom: 12px; }
.tr-eq { margin: 2px 0 14px; }
.tr-eq span { font-size: 11px; }
.tr-eq b { font-size: 28px; }
.tr-seg { padding: 2px; border-radius: 2px; background: var(--panel2); border-color: var(--line); }
.tr-seg button { height: 30px; border-radius: 2px; }
.tr-seg button.on { background: var(--panel); color: var(--tx); }
.tr-lbl { margin: 16px 0 6px; font-size: 11px; }
.tr-field { height: 40px; border-radius: 2px; background: var(--panel); border-color: var(--line2); }
.tr-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.tr-field input { font-size: 13px; }
.tr-range { height: 3px; background: var(--panel2); margin: 14px 0 10px; }
.tr-range::-webkit-slider-thumb { width: 12px; height: 12px; background: var(--accent); border: 2px solid var(--panel); }
.lev-quick button { height: 26px; border-radius: 2px; background: transparent; border-color: var(--line); }
.lev-quick button.on { background: var(--accent-soft); border-color: var(--dex-line); color: var(--accent); }
.pct-row button { height: 26px; border-radius: 2px; }
.tr-btn {
  height: 42px;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
}
.tr-btn.long { background: var(--up); border-color: var(--up); color: #f7fbf8; }
.tr-btn.long:hover { background: var(--up); border-color: var(--up); filter: brightness(.93); }
.tr-btn.short { background: var(--down); border-color: var(--down); color: #fdf8f6; }
.tr-btn.short:hover { background: var(--down); border-color: var(--down); filter: brightness(.93); }
.tr-tpsl { margin: 16px 0 8px; font-size: 11px; }
.tr-eq em { font-size: 10px; }
.bk-head, .bk-head2 { font-size: 10px; color: var(--mut); padding: 0 2px 6px; }
.bk-row { padding: 2px 2px; font-size: 11px; border-radius: 0; }
.bk-row:hover { background: var(--accent-soft); }
.bk-mid { padding: 8px 2px; margin: 8px 0; border-color: var(--line); }
.bk-mid b { font-size: 17px; }
.bk-ratio { margin-top: 12px; }
.tk-row { padding: 2px 2px; font-size: 10px; border-radius: 0; grid-template-columns: 1fr .9fr auto; }
.tr-bookcol .card { padding-top: 16px; }
.tr-panel { background: transparent; border: 0; border-top: 1px solid var(--line2); border-radius: 0; padding: 20px 0 0; margin-top: 30px; }
.tr-panel .tabs { display: flex; max-width: 100%; }
.tr-panel .tb td { padding: 11px 10px; font-size: 12px; }
.pos-card { border-radius: 2px; background: var(--bg); border-color: var(--line); }

/* --------------------------------------------------------------------------
   Calendar: a wall calendar of hairlines, not a tray of cards
   -------------------------------------------------------------------------- */

.cal-head { margin-bottom: 18px; }
.cal-head .m { font-family: var(--display); font-size: 17px; font-weight: 500; letter-spacing: -.01em; }
.calnav a, .calnav button {
  height: 32px;
  border-radius: 2px;
  border-color: var(--line2);
  background: transparent;
  color: var(--tx2);
  font-size: 12px;
}
.calnav a:hover, .calnav button:hover { background: var(--accent-soft); color: var(--accent); }
.cal-grid {
  gap: 0;
  border-top: 1px solid var(--line2);
  border-left: 1px solid var(--line2);
}
.cal-grid .dow {
  padding: 9px 10px;
  text-align: left;
  font-size: 11px;
  color: var(--mut);
  border-bottom: 1px solid var(--line2);
}
.cal-grid .cell {
  min-height: 112px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 10px;
  gap: 4px;
}
.cal-grid .cell:hover { background: var(--accent-soft); border-color: var(--line); }
.cal-grid .cell.dim { opacity: .35; }
.cal-grid .cell.today { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.cal-grid .cell .d { font-size: 11px; color: var(--tx2); }
.cal-grid .cell .ev {
  background: transparent;
  border-left: 2px solid var(--mut);
  border-radius: 0;
  padding: 1px 0 1px 6px;
  font-size: 10px;
  line-height: 1.5;
  color: var(--tx2);
}
.cal-grid .cell .ev.e1 { background: var(--danger-soft); color: var(--down); border-color: var(--down); }
.cal-grid .cell .ev.e2 { background: rgba(138, 100, 20, .07); color: var(--amber); border-color: var(--amber); }
.cal-grid .cell .ev.e3,
.cal-grid .cell .ev.e4,
.cal-grid .cell .ev.e6,
.cal-grid .cell .ev.e7 { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.cal-grid .cell .ev.e5,
.cal-grid .cell .ev.e9 { background: var(--panel2); color: var(--tx2); border-color: var(--mut); }
.cal-grid .cell .more { font-size: 10px; color: var(--mut); }
html[data-theme="dark"] .cal-grid .cell .ev.e2 { background: rgba(217, 176, 106, .10); }

/* settings: keep forms at reading width */
#v-settings .settings-panel { max-width: 840px; }
#v-settings .s-row .ctl { max-width: 300px; }

/* deposit declaration: a short form, not a full-width field */
.deposit-declare { max-width: 680px; }



/* --------------------------------------------------------------------------
   Login
   -------------------------------------------------------------------------- */

.login-screen { background: var(--bg); color: var(--tx); }
html[data-theme="light"] .login-left { background: var(--bg-side); }
.login-left {
  padding: 48px 56px 40px;
  background: var(--bg-side);
  border-right: 1px solid var(--line);
  gap: 32px;
}
.login-left::before { display: none; }
.login-brand .mark { border-radius: 2px; background: var(--accent); border-color: var(--accent); color: #f8f7f1; }
.login-brand b { font-family: var(--display); font-size: 14px; letter-spacing: .02em; }
.login-brand span { font-family: var(--sans); font-size: 10px; letter-spacing: .09em; }
.login-hero h1 {
  font-family: var(--display);
  font-size: clamp(40px, 4.6vw, 64px);
  font-weight: 500;
  line-height: 1.01;
  letter-spacing: -.035em;
  max-width: 620px;
}
.login-hero h1 em { color: var(--accent); font-style: normal; }
.login-hero .chip { border-radius: 2px; background: var(--accent-soft); color: var(--accent); }
.login-hero p { font-size: 14px; line-height: 1.75; color: var(--mut); max-width: 520px; }
.login-stats {
  max-width: 520px;
  gap: 0;
  border-top: 1px solid var(--line2);
  border-bottom: 1px solid var(--line2);
}
.login-stat {
  border: 0;
  border-radius: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  padding: 16px 20px;
}
html[data-theme="light"] .login-stat { background: transparent; }
.login-stat:first-child { border-left: 0; padding-left: 0; }
.login-stat .k { font-family: var(--sans); font-size: 10px; letter-spacing: .04em; color: var(--mut); }
.login-stat b { font-family: var(--display); font-size: 22px; letter-spacing: -.02em; }
.login-feats { font-family: var(--sans); font-size: 11px; color: var(--mut); gap: 18px; }
.login-feats i { border-radius: 0; width: 4px; height: 4px; }
.login-right {
  width: min(440px, 100%);
  min-height: 100vh;
  padding: 48px;
  background: var(--panel);
  border-left: 1px solid var(--line);
}
.login-box { max-width: 340px; }
.login-box h2 { font-family: var(--display); font-size: 26px; font-weight: 500; letter-spacing: -.02em; }
.login-box .sub { font-family: var(--sans); font-size: 12px; color: var(--mut); line-height: 1.7; }
.login-tabs { border-bottom-color: var(--line2); margin: 24px 0 20px; gap: 22px; }
.login-tabs button { font-family: var(--sans); font-size: 12px; letter-spacing: 0; border-bottom-width: 2px; }
.login-tabs button.on { border-color: var(--accent); color: var(--tx); }
.login-field label { font-family: var(--sans); font-size: 11px; color: var(--mut); letter-spacing: 0; }
.login-field input {
  height: 44px;
  border-radius: 2px;
  background: var(--bg);
  border-color: var(--line2);
  color: var(--tx);
  font-size: 13px;
}
.login-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.login-submit {
  height: 44px;
  border-radius: 2px;
  background: var(--accent);
  color: #f8f7f1;
  font-weight: 500;
  letter-spacing: .02em;
}
.login-submit:hover { background: var(--accent-strong); }
.wallet-btn { border-radius: 2px; border-color: var(--dex-line); background: var(--accent-soft); color: var(--accent); }
.wallet-btn:hover { background: var(--accent-soft); filter: brightness(.97); }
.login-legal { color: var(--mut); border-top-color: var(--line); font-size: 11px; line-height: 1.65; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1240px) {
  .lead-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; }
  .home-split { grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr); gap: 30px; }
  .tr-grid { grid-template-columns: minmax(0, 1fr) 336px; grid-template-areas: "main form" "book form"; }
  .wallet-metrics { grid-template-columns: repeat(3, 1fr); }
  .wallet-metrics .card:nth-child(4) { border-left: 0; padding-left: 0; }
  .wallet-metrics .card:nth-child(n+4) { border-top: 1px solid var(--line); }
  .settings-nav { gap: 22px; }
}

@media (max-width: 980px) {
  .side { padding: 16px 8px; }
  .nav a { padding: 0; justify-content: center; width: 48px; margin: 0 auto; }
  .nav a.sub { padding: 0; }
  .brand { padding: 0 0 20px; }
  .lead-grid { grid-template-columns: 1fr; gap: 28px; }
  .quote.alt { padding-top: 22px; }
  .tape { grid-template-columns: repeat(3, 1fr); }
  .tape-cell:nth-child(4) { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .tape-cell:nth-child(5) { border-top: 1px solid var(--line); }
  .home-split { grid-template-columns: 1fr; gap: 32px; }
  .settings-nav { gap: 20px; }
  .deposit-grid { grid-template-columns: 1fr; gap: 28px; }
  .tr-grid { grid-template-columns: 1fr; grid-template-areas: "main" "form" "book"; }
  .wallet-hero { gap: 28px; }
  .wallet-side > div:first-child { padding-left: 0; border-left: 0; }
}

@media (max-width: 760px) {
  .views { padding: 20px 16px 88px; }
  .top { padding: 0 16px; }
  .side { padding: 4px 8px env(safe-area-inset-bottom); }
  h2.pg { font-size: 23px; padding-bottom: 12px; margin-bottom: 20px; }
  .home-head { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 24px; }
  .home-title { font-size: 27px; }
  .home-title span { display: block; margin: 6px 0 0; }
  .quote.lead { padding: 18px 16px 14px; }
  .quote-fig { font-size: 40px; margin-top: 16px; }
  .quote.alt .quote-fig { font-size: 30px; }
  .quote-spark { height: 52px; }
  .tape { grid-template-columns: 1fr 1fr; margin: 26px 0 30px; }
  .tape-cell { padding: 14px 14px; border-top: 1px solid var(--line); }
  .tape-cell:nth-child(odd) { border-left: 0; padding-left: 0; }
  .tape-cell:nth-child(1), .tape-cell:nth-child(2) { border-top: 0; }
  .tape-cell > b { font-size: 19px; }
  .home-split { gap: 28px; }
  .ratio-fig { font-size: 28px; }
  .ratio-spark { height: 64px; }
  .agenda-row { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 12px 0; }
  .agenda-tag { grid-column: 2; justify-self: start; margin-top: 6px; }
  .settings-nav { gap: 18px; margin-bottom: 22px; }
  .settings-nav button { font-size: 12px; }
  .set-account .amt { margin-left: 0; width: 100%; text-align: left; align-items: flex-start; }
  .set-account .amt > span { justify-content: flex-start; }
  .set-account .s-btn { height: 34px; }
  .wallet-hero { flex-direction: column; align-items: stretch; gap: 24px; padding: 18px 0 22px; }
  .wallet-main > b { font-size: 36px; }
  .wallet-side { grid-template-columns: repeat(3, 1fr); }
  .wallet-side > div { padding: 0 14px; }
  .wallet-side > div:first-child { padding-left: 0; }
  .wallet-metrics { grid-template-columns: 1fr 1fr; }
  .wallet-metrics .card { padding: 14px 16px; }
  .wallet-metrics .card:nth-child(odd) { border-left: 0; padding-left: 0; }
  .wallet-metrics .card:nth-child(n+3) { border-top: 1px solid var(--line); }
  .grid2 { gap: 28px; grid-template-columns: minmax(0, 1fr); }
  .tr-main > .card:first-child { padding: 16px 16px 14px; }
  .tr-px { font-size: 30px; }
  #tr-formcard { padding: 16px; }
  .card { padding-top: 18px; }
  .card > h3 { margin-bottom: 12px; }
  .tbw { margin-right: -4px; }
}

@media (max-width: 480px) {
  .home-status { display: none; }
  .quote-fig { font-size: 34px; }
  .quote-foot { gap: 14px; }
  .tape-cell > b { font-size: 18px; }
  .wallet-side { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wallet-side > div { padding: 0 12px; }
  .wallet-side > div:nth-child(3) { border-left: 1px solid var(--line); padding-left: 12px; padding-top: 0; }
  .wallet-side b { font-size: 13px; }
  .settings-nav { gap: 16px; }
}

@media (max-width: 760px) {
  .set-account .who { flex: 1 1 calc(100% - 54px); }
  .set-account .set-actions { flex: 1 1 100%; margin-left: 0; padding-left: 54px; }
  .agenda-tag { display: none; }
  .agenda-row { grid-template-columns: 52px minmax(0, 1fr); }
  .tbw th, .tbw td { padding: 10px 6px; font-size: 12px; }
  .tbw td .sub { font-size: 10px; }
}

@media (max-width: 560px) {
  .tr-stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cal-head { gap: 10px; }
  .cal-head .m { min-width: 0; font-size: 16px; }
  .cal-grid .dow { padding: 6px 4px; font-size: 10px; text-align: center; }
  .cal-grid .cell { min-height: 82px; padding: 5px; }
  .cal-grid .cell .d { font-size: 10px; }
  .cal-grid .cell .ev { font-size: 10px; padding-left: 4px; }
  .cal-grid .cell .more { font-size: 10px; }
  .login-right { min-height: 100dvh; padding: 34px 24px 44px; }
}

/* terminal: breakpoints must restate columns + areas together */
@media (max-width: 1480px) {
  .tr-grid {
    grid-template-columns: minmax(0, 1fr) 336px;
    grid-template-areas: "main form" "book form";
  }
  .tr-bookcol { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; align-items: start; }
}
@media (max-width: 1080px) {
  .tr-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "form" "book"; }
  .tr-bookcol { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .trade-bar { gap: 14px; padding-bottom: 16px; margin-bottom: 20px; }
  .trade-bar-note { display: none; }
}

