/* ============================================================
   AFTERPAD — the terminal. Denser than the landing page, same
   monochrome system: colour only on market data.
   ============================================================ */

.t-body { font-size: 13px; background: var(--bg); }
.t-body a { color: inherit; }
.t-top {
  display: flex; align-items: center; gap: 18px; height: 52px; padding: 0 16px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 20;
}
.t-top .brand-name { font-size: 18px; }
.t-sub { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-left: 6px; letter-spacing: .04em; }
.t-tabs { display: flex; gap: 2px; margin-left: 8px; overflow-x: auto; scrollbar-width: none; }
.t-tabs button {
  border: 0; background: none; padding: 8px 12px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap;
}
.t-tabs button:hover { background: var(--bg-2); color: var(--ink); }
.t-tabs button.is-on { background: var(--ink); color: #fff; }
.t-status { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); display: flex; gap: 12px; align-items: center; white-space: nowrap; }
.t-connect { height: 34px; padding: 0 14px; font-size: 13px; }
.t-connect.is-on { background: var(--bg-2); color: var(--ink); }
.t-connect.is-wrong { background: #fdecec; color: var(--down); }

.t-ticker {
  display: flex; gap: 18px; padding: 7px 16px; border-bottom: 1px solid var(--line); overflow: hidden; white-space: nowrap;
  font-family: var(--mono); font-size: 11.5px; font-variant-numeric: tabular-nums; background: #fff;
}
.t-ticker span { display: inline-flex; gap: 6px; }
.t-ticker b { font-weight: 600; }
.t-ticker .t-tick-live { animation: t-flash .6s ease; }
@keyframes t-flash { from { background: #fff7d6; } to { background: transparent; } }

.t-main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; min-height: calc(100vh - 92px); }
.t-view { min-width: 0; padding: 16px; }
.t-trade { border-left: 1px solid var(--line); padding: 16px; position: sticky; top: 92px; height: calc(100vh - 92px); overflow: auto; background: #fff; }
@media (max-width: 1000px) {
  .t-main { grid-template-columns: 1fr; }
  .t-trade { position: static; height: auto; border-left: 0; border-top: 1px solid var(--line); }
}

.t-loading, .t-empty { color: var(--muted); padding: 24px 0; }
.t-label { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.t-h { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 4px 0 12px; }
.t-h h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.t-h .t-meta { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.t-note { font-size: 12px; color: var(--muted); margin: 0 0 12px; max-width: 70em; }
.t-note code { font-family: var(--mono); font-size: 11px; background: var(--bg-2); padding: 1px 5px; border-radius: 4px; }

/* tables */
.t-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.t-table th { text-align: left; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t-table td { padding: 8px 8px; border-bottom: 1px solid #f0f0ed; white-space: nowrap; vertical-align: middle; }
.t-table tr.is-row { cursor: pointer; }
.t-table tr.is-row:hover td { background: #fafaf8; }
.t-table tr.is-picked td { background: #f3f3f0; }
.t-table .r { text-align: right; }
.t-table .sym { font-weight: 600; }
.t-table .nm { color: var(--muted); font-size: 11.5px; display: inline-block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.t-table .mono { font-family: var(--mono); font-size: 11.5px; }
.t-table img { display: inline-block; width: 18px; height: 18px; border-radius: 5px; vertical-align: -4px; margin-right: 6px; object-fit: cover; }
.t-table .cell-btn { border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 500; cursor: pointer; }
.t-table .cell-btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.t-wrap { overflow-x: auto; }

.risk { display: inline-block; padding: 2px 7px; border-radius: 999px; border: 1px solid; font-size: 9.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.risk-clean { color: #0b6b43; background: #eefaf3; border-color: #bfeed3; }
.risk-caution { color: #8a5a00; background: #fff6e0; border-color: #f4dc9a; }
.risk-danger { color: #9b1c22; background: #fdecec; border-color: #f5bcbf; }

.share { display: inline-block; width: 90px; height: 6px; border-radius: 3px; background: #f1d0d3; overflow: hidden; vertical-align: middle; }
.share i { display: block; height: 100%; background: var(--up); }

.t-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 14px; }
.t-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.t-card .t-label { margin-bottom: 4px; }
.t-card b { display: block; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.t-card small { color: var(--muted); font-size: 11.5px; }

.t-two { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 1300px) { .t-two { grid-template-columns: 1fr; } }
.t-panel { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.t-panel-h { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.t-panel .t-table th { border-bottom-color: #f0f0ed; }

.t-chart { width: 100%; height: 220px; display: block; background: #fff; }
.t-chart-axis { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10px; color: var(--muted); padding: 4px 12px 8px; }

.t-form { display: flex; gap: 8px; margin-bottom: 14px; }
.t-form input { flex: 1; height: 38px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 12px; font: inherit; font-family: var(--mono); font-size: 12.5px; }
.t-form input:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.t-form .btn { height: 38px; }

.t-list img { display: inline-block; }
.t-list li { display: grid; grid-template-columns: 44px 1fr auto auto; gap: 10px; align-items: center; padding: 7px 12px; border-bottom: 1px solid #f0f0ed; font-variant-numeric: tabular-nums; }
.t-list .side { font-weight: 700; font-size: 10px; letter-spacing: .04em; }
.t-list .who { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.t-list li.is-new { animation: tape-in .35s ease both; }

/* trade panel */
.t-trade-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.t-pool { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; margin-top: 2px; }
.t-pool-sub { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 2px; word-break: break-all; }
.t-side { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 2px; }
.t-side button { border: 0; background: none; padding: 5px 12px; border-radius: 999px; font-weight: 600; font-size: 12px; cursor: pointer; color: var(--muted); }
.t-side button.is-on { background: var(--ink); color: #fff; }
.t-side button[data-side="sell"].is-on { background: var(--down); }
.t-presets { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.t-presets button { border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: 500; cursor: pointer; }
.t-presets button.is-on, .t-presets button:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.t-field { display: block; margin-bottom: 8px; }
.t-field span { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.t-field input, .t-field select { width: 100%; height: 38px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 12px; font: inherit; font-size: 14px; background: #fff; }
.t-field input:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.t-quote { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 6px 0 10px; font-variant-numeric: tabular-nums; }
.t-quote-empty { color: var(--muted); font-size: 12px; }
.t-quote-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.t-quote-row span:first-child { color: var(--muted); }
.t-quote-row b { font-weight: 600; }
.t-quote-big { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; margin: 2px 0 6px; }
.t-warn { margin-top: 8px; font-size: 12px; color: #8a5a00; background: #fff6e0; border-radius: 8px; padding: 6px 8px; }
.t-err { margin-top: 8px; font-size: 12px; color: var(--down); background: #fdecec; border-radius: 8px; padding: 6px 8px; word-break: break-word; }
.t-steps { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; font-size: 12px; }
.t-steps div { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.t-steps div::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: none; }
.t-steps div.is-done { color: var(--ink); }
.t-steps div.is-done::before { background: var(--up); border-color: var(--up); }
.t-steps div.is-now { color: var(--ink); font-weight: 600; }
.t-steps div.is-now::before { border-color: var(--ink); }
.t-sign { width: 100%; height: 44px; font-size: 14px; }
.t-sign:disabled { opacity: .45; cursor: not-allowed; }
.t-txlog { margin-top: 10px; font-family: var(--mono); font-size: 11px; color: var(--ink-2); display: grid; gap: 4px; word-break: break-all; }
.t-txlog a { text-decoration: underline; }
.t-fees { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); display: grid; gap: 4px; font-size: 11.5px; color: var(--muted); }
.t-fees b { color: var(--ink); font-weight: 600; }

.t-follow { border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 500; cursor: pointer; }
.t-follow.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.t-kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 12.5px; }
.t-kv dt { color: var(--muted); }
.t-kv dd { margin: 0; font-family: var(--mono); font-size: 11.5px; word-break: break-all; }
.t-reasons { margin: 8px 0 0; padding-left: 18px; font-size: 12px; color: var(--ink-2); }
.t-reasons li { margin: 2px 0; }

/* phones: tabs drop to their own scrollable row, the status text goes */
@media (max-width: 760px) {
  .t-top { flex-wrap: wrap; height: auto; padding: 8px 12px 6px; gap: 6px 10px; }
  .t-connect { margin-left: auto; height: 32px; padding: 0 12px; font-size: 12px; }
  .t-status { display: none; }
  .t-tabs { order: 3; width: 100%; margin: 0; }
  .t-tabs button { padding: 7px 10px; font-size: 12.5px; }
  .t-view { padding: 12px; }
  .t-h { flex-direction: column; align-items: flex-start; gap: 4px; }
  .t-cards { grid-template-columns: 1fr 1fr; }
  .t-form { flex-wrap: wrap; }
  .t-form input { min-width: 0; flex-basis: 100%; }
}

/* logos in tables, lists and the trade head */
.t-table img, .t-list img, .t-ticker img, .t-pool img, .t-side img, .t-card .t-label img { display: inline-block; width: 18px; height: 18px; border-radius: 5px; vertical-align: -4px; margin-right: 6px; object-fit: cover; background: #fff; }
.t-ticker img { width: 14px; height: 14px; vertical-align: -3px; margin-right: 2px; border-radius: 4px; }
.t-side img { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; border-radius: 4px; }
.t-card .t-label img { width: 14px; height: 14px; vertical-align: -3px; margin-right: 3px; }
.logo-blank { display: inline-block; border-radius: 5px; background: var(--bg-2); vertical-align: -4px; margin-right: 6px; }
.t-paywith { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.t-side-sm button { padding: 4px 10px; font-size: 11.5px; }

/* air */
.t-view { padding: 28px 28px 48px; }
.t-h { margin: 8px 0 18px; }
.t-h h2 { font-size: 22px; }
.t-note { margin-bottom: 22px; font-size: 12.5px; }
.t-table th { padding: 10px 10px; }
.t-table td { padding: 12px 10px; }
.t-cards { gap: 14px; margin-bottom: 22px; }
.t-card { padding: 18px 20px; }
.t-card b { font-size: 24px; margin: 6px 0 4px; }
.t-two { gap: 22px; }
.t-panel-h { padding: 11px 16px; }
.t-list li { padding: 11px 16px; }
.t-form { margin-bottom: 22px; }
.t-trade { padding: 24px; }
.t-trade-head { margin-bottom: 18px; }
.t-quote { padding: 16px; margin: 10px 0 16px; }
.t-quote-row { padding: 5px 0; }
.t-steps { gap: 8px; margin: 4px 0 14px; }
.t-fees { margin-top: 22px; padding-top: 16px; gap: 7px; }
.t-ticker { padding: 10px 24px; gap: 24px; }
@media (max-width: 760px) { .t-view { padding: 16px 14px 32px; } .t-trade { padding: 18px 14px; } }
.t-table .logo-init, .t-list .logo-init, .t-ticker .logo-init, .t-pool .logo-init, .t-quote .logo-init, .t-quote-big img { display: inline-flex; align-items: center; justify-content: center; border-radius: 5px; background: #e9e9e5; color: #4b4b4b; font-family: var(--mono); font-weight: 600; vertical-align: -4px; margin-right: 6px; line-height: 1; }
.t-quote-big img, .t-quote-big .logo-init { width: 18px; height: 18px; border-radius: 5px; vertical-align: -3px; margin-right: 6px; object-fit: cover; }
.t-pool .logo-init { width: 20px; height: 20px; }
