/* Anidex — dark ground, amber accent, mono numerals. */

:root {
  --ground:  #0C1014;
  --surface: #131A21;
  --surface-2: #182129;
  --border:  #232C35;
  --border-bright: #33404C;

  --amber:   #F0B24C;
  --gain:    #46C88A;
  --loss:    #E4635C;

  --text:    #E8EDF2;
  --text-dim: #9AA7B4;
  --text-faint: #66737F;

  --display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --ui: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 10px;
  --pad: 20px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Every digit in this product lines up in a column. */
.num, td.num, .mono, input[type="number"] {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: 30px; }
h2 { font-size: 20px; }
h3 { font-size: 15px; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--amber); }

.gain { color: var(--gain); }
.loss { color: var(--loss); }
.dim  { color: var(--text-dim); }
.faint { color: var(--text-faint); }

/* ---------------------------------------------------------------- shell -- */

.shell { max-width: 1120px; margin: 0 auto; padding: 0 24px 72px; }

header.top {
  border-bottom: 1px solid var(--border);
  background: rgba(12, 16, 20, 0.9);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.top-inner {
  max-width: 1120px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 28px;
}
.brand { font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.brand .dex { color: var(--amber); }
nav.main { display: flex; gap: 22px; font-size: 14px; }
nav.main a { color: var(--text-dim); padding: 4px 0; border-bottom: 2px solid transparent; }
nav.main a.active { color: var(--text); border-bottom-color: var(--amber); }
.top-spacer { flex: 1; }

.balance { display: flex; gap: 18px; align-items: center; font-size: 13px; }
.balance .amount { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }

.page-head { padding: 32px 0 20px; }
.page-head p.lede { color: var(--text-dim); margin: 8px 0 0; max-width: 62ch; }

/* --------------------------------------------------------- ticker plate -- */
/*
 * Generated, never an image. The tint hue is derived from the ticker string,
 * so an asset looks the same everywhere without any asset ever being fetched.
 */
.plate {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 600; letter-spacing: 0.02em;
  border-radius: 8px; padding: 0 10px;
  height: 34px; min-width: 58px; font-size: 13px;
  border: 1px solid;
  flex-shrink: 0;
}
.plate.lg { height: 52px; min-width: 88px; font-size: 18px; border-radius: 10px; }
.plate.sm { height: 26px; min-width: 46px; font-size: 11px; border-radius: 6px; padding: 0 7px; }

/* ---------------------------------------------------------------- cards -- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--pad);
}
.card + .card { margin-top: 16px; }
.card h3 { margin-bottom: 14px; color: var(--text); }
.card-sub { color: var(--text-faint); font-size: 12.5px; margin: -8px 0 14px; }

.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

.stat-row { display: flex; flex-wrap: wrap; gap: 28px; }
.stat { min-width: 96px; }
.stat .label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); }
.stat .value { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 19px; margin-top: 2px; }

/* --------------------------------------------------------------- tables -- */

table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: right; font-size: 11.5px; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-faint);
  padding: 0 0 10px; border-bottom: 1px solid var(--border);
}
thead th:first-child { text-align: left; }
tbody td { padding: 12px 0; border-bottom: 1px solid var(--border); text-align: right; }
tbody td:first-child { text-align: left; }
tbody tr:last-child td { border-bottom: none; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--surface-2); }
td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.asset-cell { display: flex; align-items: center; gap: 12px; }
.asset-cell .name { font-weight: 500; }
.asset-cell .meta { font-size: 12px; color: var(--text-faint); }

.table-scroll { overflow-x: auto; }

/* ------------------------------------------ what this price is made of -- */
/*
 * Splits the price into the part backed by measured attention and the part
 * that is just other players leaning on the book.
 */
.composition .bar {
  display: flex; height: 34px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border-bright); margin: 6px 0 14px;
}
.composition .seg-fundamental { background: linear-gradient(180deg, #2A3C4B, #223543); }
.composition .seg-premium-pos { background: linear-gradient(180deg, #F0B24C, #C88F35); }
.composition .seg-premium-neg { background: linear-gradient(180deg, #E4635C, #B84B45); }
.composition .seg { display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11.5px; color: #0C1014; font-weight: 600; }
.composition .seg-fundamental { color: var(--text); }
.composition .legend { display: grid; gap: 10px; }
.composition .legend-row { display: flex; align-items: baseline; gap: 10px; font-size: 13.5px; }
.composition .swatch { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; align-self: center; }
.composition .legend-row .val { margin-left: auto; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.composition .note { margin-top: 14px; font-size: 12.5px; color: var(--text-faint); line-height: 1.55; }

/* ------------------------------------------------------ air-day rhythm -- */
/*
 * Seven bars, one per weekday. A weekly series spikes on the day it airs; that
 * spike is the clearest evidence the asset tracks something real.
 */
.rhythm { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 108px; }
.rhythm .bar-wrap { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; gap: 6px; }
.rhythm .bar {
  background: linear-gradient(180deg, #2E4351, #22323D);
  border-radius: 5px 5px 2px 2px; min-height: 3px;
  border: 1px solid var(--border-bright); border-bottom: none;
}
.rhythm .bar.peak { background: linear-gradient(180deg, var(--amber), #C08A32); border-color: var(--amber); }
.rhythm .day { text-align: center; font-size: 11px; color: var(--text-faint); font-family: var(--mono); }
.rhythm .day.peak { color: var(--amber); }
.rhythm-note { margin-top: 12px; font-size: 12.5px; color: var(--text-faint); }

/* --------------------------------------------------------------- trade -- */

.ticket label { display: block; font-size: 11.5px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-faint); margin-bottom: 6px; }
.ticket input[type="number"] {
  width: 100%; background: var(--ground); border: 1px solid var(--border-bright);
  color: var(--text); border-radius: 8px; padding: 11px 12px; font-size: 15px;
}
.ticket input:focus { outline: none; border-color: var(--amber); }
.side-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 16px; }
.side-picker button {
  background: var(--ground); border: 1px solid var(--border-bright); color: var(--text-dim);
  padding: 9px 0; border-radius: 8px; font-family: var(--ui); font-size: 13px; cursor: pointer;
}
.side-picker button.active { background: var(--amber); border-color: var(--amber); color: #0C1014; font-weight: 600; }
.side-picker button:hover:not(.active) { border-color: var(--amber); color: var(--text); }

.btn {
  display: inline-block; width: 100%; text-align: center; cursor: pointer;
  background: var(--amber); color: #0C1014; border: none; border-radius: 8px;
  padding: 12px 18px; font-family: var(--ui); font-weight: 600; font-size: 15px;
}
.btn:hover { background: #F6C169; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.ghost { background: transparent; border: 1px solid var(--border-bright); color: var(--text); }
.btn.ghost:hover { border-color: var(--amber); color: var(--amber); }

.estimate { margin-top: 14px; font-size: 13px; display: grid; gap: 7px; }
.estimate .row { display: flex; justify-content: space-between; }
.estimate .row .v { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.msg { margin-top: 14px; padding: 11px 13px; border-radius: 8px; font-size: 13.5px; display: none; }
.msg.show { display: block; }
.msg.ok { background: rgba(70, 200, 138, 0.12); border: 1px solid rgba(70, 200, 138, 0.35); color: var(--gain); }
.msg.err { background: rgba(228, 99, 92, 0.12); border: 1px solid rgba(228, 99, 92, 0.35); color: var(--loss); }

/* --------------------------------------------------------------- misc -- */

.pill {
  display: inline-block; font-size: 11px; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--border-bright); color: var(--text-dim);
  font-family: var(--mono); letter-spacing: 0.03em;
}
.pill.warn { border-color: rgba(240, 178, 76, 0.5); color: var(--amber); }
.pill.risk { border-color: rgba(228, 99, 92, 0.5); color: var(--loss); }

#chart { height: 320px; width: 100%; }

.empty { padding: 44px 20px; text-align: center; color: var(--text-faint); }

/*
 * The attribution line. It appears in full on every asset page and in short
 * form in the footer, and says plainly that a title is an identifier here and
 * nothing more.
 */
.disclaimer {
  margin-top: 18px; padding: 13px 15px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.02); border: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-faint); line-height: 1.6;
}

footer.site {
  border-top: 1px solid var(--border); margin-top: 56px; padding: 26px 0 40px;
  color: var(--text-faint); font-size: 12.5px; line-height: 1.7;
}
footer.site .shell { padding-bottom: 0; }
footer.site strong { color: var(--text-dim); font-weight: 600; }

.auth-card { max-width: 420px; margin: 60px auto; }
.auth-card input[type="email"], .auth-card input[type="password"] {
  width: 100%; background: var(--ground); border: 1px solid var(--border-bright);
  color: var(--text); border-radius: 8px; padding: 11px 12px; font-size: 15px; margin-bottom: 12px;
}
.auth-card input:focus { outline: none; border-color: var(--amber); }
/* Provider button: the provider's own mark on our surface, not their colour. */
.btn.provider {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--border-bright); color: var(--text);
}
.btn.provider:hover { background: var(--surface-2); border-color: var(--amber); color: var(--amber); }
.btn.provider svg { flex: none; }

.auth-or {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0; color: var(--text-faint); font-size: 12px;
}
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.auth-tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.auth-tabs button {
  flex: 1; background: var(--ground); border: 1px solid var(--border-bright);
  color: var(--text-dim); padding: 9px; border-radius: 8px; cursor: pointer; font-size: 13px;
}
.auth-tabs button.active { background: var(--surface-2); color: var(--text); border-color: var(--amber); }
