/* frac x2 dashboard.
   Colours and type are the frac brand's (frac_web: frac.css): mint teal and orange on a deep
   teal-black, Inter. Every colour is a token here; nothing below this block names a hex. */
:root {
  color-scheme: dark;
  --bg: #0e1a1e;
  --surface: #121920;
  --card: #0f1a1f;
  --card-head: #121f25;
  --raise: #16262d;
  --line: rgba(255, 255, 255, 0.10);
  --line-soft: rgba(255, 255, 255, 0.06);
  --text: #ffffff;
  --text-2: rgba(255, 255, 255, 0.74);
  --text-3: rgba(255, 255, 255, 0.56);
  --teal: #97fde4;            /* brand primary: links, the active item, focus */
  --teal-strong: #22dfbe;
  --teal-wash: rgba(151, 253, 228, 0.08);
  --teal-wash-2: rgba(151, 253, 228, 0.16);
  --orange: #f69318;          /* brand accent: shadow mode, attention */
  --orange-wash: rgba(246, 147, 24, 0.14);
  --up: #55f3d3;
  --down: #ff8177;
  --down-wash: rgba(255, 129, 119, 0.14);
  /* Data marks: the brand's two hues, stepped to pass on this surface (lightness band,
     colour-blind separation 13.7, contrast >= 3:1; checked with the chart validator). */
  --series-1: #0aa890;
  --series-2: #d6790c;
  --series-1-wash: rgba(10, 168, 144, 0.14);
  --series-3: #5d6b72;         /* a part of a chart whose kind is not known */
  --grid: rgba(255, 255, 255, 0.07);
  --radius: 10px;
  --radius-s: 8px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Roboto Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--teal); color: var(--bg);
        padding: 8px 12px; border-radius: var(--radius-s); font-weight: 600; z-index: 10; }
.skip:focus { left: 8px; }
.mono { font-family: var(--mono); font-size: 0.93em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
.up { color: var(--up); }
.down { color: var(--down); }

/* -- frame ---------------------------------------------------------------------------------- */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 20px 14px 16px; background: var(--surface); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-mark rect { fill: var(--teal-wash-2); }
.brand-mark path { fill: none; stroke: var(--teal); stroke-width: 2.6; stroke-linecap: round;
                   stroke-linejoin: round; }
.brand-name { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.brand-name b { color: var(--teal); font-weight: 700; margin-left: 1px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 0 10px;
  border-radius: var(--radius-s); color: var(--text-2); font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav a:hover { background: var(--teal-wash); color: var(--text); }
.nav a[aria-current="page"] { background: var(--teal-wash-2); color: var(--teal); }
.nav svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor;
           stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav .count { margin-left: auto; font-size: 12px; color: var(--text-3);
              font-variant-numeric: tabular-nums; }
.side-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line-soft);
             display: grid; gap: 4px; }
.conn { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex: none; }
.conn.on .dot { background: var(--up); box-shadow: 0 0 0 4px rgba(85, 243, 211, 0.16); }
.conn.off .dot { background: var(--down); }
.conn.late .dot { background: var(--orange); }
.side-note { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.main { min-width: 0; }
.top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 20px;
  padding: 16px 28px; background: rgba(14, 26, 30, 0.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.top-title { min-width: 0; flex: 1; }
.top h1 { font-size: 20px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.25;
          overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs { font-size: 12px; color: var(--text-3); min-height: 18px; }
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--teal); }

.search { position: relative; width: min(360px, 42vw); }
.search > svg { position: absolute; left: 11px; top: 11px; width: 16px; height: 16px;
                fill: none; stroke: var(--text-3); stroke-width: 1.8; stroke-linecap: round; }
.search input {
  width: 100%; height: 38px; padding: 0 38px 0 34px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-s); outline-offset: 0;
}
.search input::placeholder { color: var(--text-3); }
.search input:focus { border-color: var(--teal-strong); }
.search kbd { position: absolute; right: 9px; top: 9px; font: 11px var(--mono); color: var(--text-3);
              border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
.search-list {
  position: absolute; top: 44px; left: 0; right: 0; margin: 0; padding: 6px; list-style: none;
  background: var(--card-head); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); max-height: 340px; overflow: auto;
}
.search-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px;
                  border-radius: 6px; cursor: pointer; }
.search-list li[aria-selected="true"], .search-list li:hover { background: var(--teal-wash-2); }
.search-list small { color: var(--text-3); }

#view { padding: 24px 28px 56px; max-width: 1500px; outline: none; }

/* -- pieces --------------------------------------------------------------------------------- */
.grid { display: grid; gap: 16px; }
.grid.halves { grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr)); align-items: start; }
.tiles { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 16px; }
.split { grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); align-items: start; }
.stack { display: grid; gap: 16px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
        min-width: 0; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px;
             border-bottom: 1px solid var(--line-soft); min-height: 54px; }
.card-head h2 { font-size: 14px; font-weight: 600; letter-spacing: -0.005em; }
.card-head .sub { color: var(--text-3); font-size: 12.5px; }
.card-head .end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.card-body { padding: 16px 18px; }
.card-body.flush { padding: 0; }
.card-foot { padding: 10px 18px 14px; color: var(--text-3); font-size: 12.5px; }

.tile { padding: 16px 18px; display: grid; gap: 4px; align-content: start; }
.tile .label { color: var(--text-2); font-size: 12.5px; font-weight: 500; }
.tile .value { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }
.tile .foot { color: var(--text-3); font-size: 12.5px; min-height: 19px; }
.tile .trend { margin-top: 6px; height: 30px; }
a.tile.go { color: inherit; text-decoration: none; }
.rows .with-line { display: inline-flex; align-items: center; gap: 10px; }
.rows .with-line .spark { width: 72px; height: 20px; }
.stack > div:empty { display: none; }
a.tile.go:hover { border-color: var(--teal-strong); }
a.tile.go .label::after { content: " →"; color: var(--text-3); }
.grid.tiles:empty { display: none; }
.hero { font-size: 48px; font-weight: 650; letter-spacing: -0.03em; line-height: 1.05; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px;
        border-radius: 11px; font-size: 12px; font-weight: 550; white-space: nowrap;
        background: rgba(255, 255, 255, 0.07); color: var(--text-2); }
.pill.live { background: var(--teal-wash-2); color: var(--teal); }
.pill.shadow { background: var(--orange-wash); color: var(--orange); }
.pill.signal { background: transparent; color: var(--text-3); box-shadow: inset 0 0 0 1px var(--line); }
.pill.bad { background: var(--down-wash); color: var(--down); }
.pill .dot { width: 6px; height: 6px; background: currentColor; }
.pulse .dot { animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(151, 253, 228, 0.5); }
                   100% { box-shadow: 0 0 0 8px rgba(151, 253, 228, 0); } }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px;
        border: 1px solid var(--line); border-radius: 6px; font-size: 12.5px; color: var(--text-2);
        white-space: nowrap; transition: border-color 0.15s, color 0.15s; }
button.chip { background: none; cursor: pointer; }
a.chip:hover, button.chip:hover { border-color: var(--teal-strong); color: var(--teal); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.seg { display: inline-flex; padding: 3px; background: var(--surface); border: 1px solid var(--line);
       border-radius: var(--radius-s); }
.seg button { border: 0; background: none; height: 28px; padding: 0 12px; border-radius: 6px;
              color: var(--text-2); font-weight: 500; font-size: 13px; cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--teal-wash-2); color: var(--teal); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.filters input[type="search"] { height: 36px; width: 260px; padding: 0 12px; background: var(--surface);
                                border: 1px solid var(--line); border-radius: var(--radius-s); }
.filters .count { color: var(--text-3); font-size: 13px; margin-left: auto; }

/* -- feed ----------------------------------------------------------------------------------- */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 4px 12px;
           padding: 13px 18px; border-bottom: 1px solid var(--line-soft); align-items: start; }
.feed li:last-child { border-bottom: 0; }
.feed li.new { animation: arrive 1.6s ease-out; }
@keyframes arrive { 0% { background: var(--teal-wash-2); } 100% { background: transparent; } }
.badge { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center;
         background: var(--teal-wash); color: var(--teal); }
.badge svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8;
             stroke-linecap: round; stroke-linejoin: round; }
.badge.shadow { background: var(--orange-wash); color: var(--orange); }
.feed .kind { color: var(--teal); font-size: 12px; font-weight: 550; letter-spacing: 0.02em; }
.feed .what { font-weight: 600; font-size: 15px; letter-spacing: -0.005em; overflow-wrap: anywhere; }
.feed .detail { color: var(--text-3); font-size: 12.5px; overflow-wrap: anywhere; margin-top: 1px; }
.feed .meta { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.feed time { color: var(--text-3); font-size: 12.5px; white-space: nowrap;
             font-variant-numeric: tabular-nums; }
.empty { padding: 36px 18px; text-align: center; color: var(--text-3); }
.empty strong { display: block; color: var(--text-2); font-weight: 550; margin-bottom: 2px; }

/* -- tables --------------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 11px 18px; text-align: left; white-space: nowrap;
         border-bottom: 1px solid var(--line-soft); }
tbody tr:last-child td { border-bottom: 0; }
th { position: sticky; top: 0; background: var(--card-head); color: var(--text-2);
     font-size: 12px; font-weight: 550; letter-spacing: 0.01em; z-index: 1; }
th.r, td.r { text-align: right; }
tbody th { position: static; background: none; color: var(--text); font-size: inherit;
           font-weight: 500; letter-spacing: 0; }
tbody tr:last-child th { border-bottom: 0; }
th button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
th button:hover { color: var(--text); }
th button:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 3px; }
th[aria-sort] button { color: var(--teal); }
th .arrow { font-size: 10px; opacity: 0.9; }
tbody tr.link { cursor: pointer; transition: background 0.12s; }
tbody tr.link:hover { background: var(--teal-wash); }
td .name { font-weight: 600; }
td .tag { color: var(--text-3); font-size: 12px; margin-left: 7px; }
td a:hover { color: var(--teal); }
.meter { display: inline-block; width: 64px; height: 6px; border-radius: 3px; vertical-align: middle;
         background: rgba(10, 168, 144, 0.22); overflow: hidden; margin-left: 8px; }
.meter i { display: block; height: 100%; background: var(--series-1); border-radius: 3px; }

/* -- lists ---------------------------------------------------------------------------------- */
.rows { list-style: none; margin: 0; padding: 6px 0; }
.rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center;
           padding: 9px 18px; }
.rows a:hover .name { color: var(--teal); }
.bar-row { grid-template-columns: minmax(0, 132px) minmax(0, 1fr) auto !important; }
.bar { height: 8px; border-radius: 0 4px 4px 0; background: var(--series-1); min-width: 2px; }
.bar.other { background: var(--series-2); }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px;
            vertical-align: -1px; }
.legend .line { width: 14px; height: 2px; border-radius: 1px; vertical-align: 3px; }
.legend .mark { border-radius: 50%; }

.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 9px 22px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* -- charts --------------------------------------------------------------------------------- */
.chart { position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid-line { stroke: var(--grid); stroke-width: 1; }
.chart .axis { fill: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round;
               stroke-linecap: round; }
.chart .area { fill: var(--series-1-wash); }
.chart .cross { stroke: var(--text-3); stroke-width: 1; }
.chart .buy { fill: var(--series-1); }
.chart .sell { fill: var(--series-2); }
.chart .marker { fill: var(--orange); stroke: var(--card); stroke-width: 2; }
.chart .focus { fill: var(--series-1); stroke: var(--card); stroke-width: 2; }
.chart .hit { fill: transparent; cursor: crosshair; }
.spark { width: 96px; height: 28px; }
.spark path { fill: none; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.tip { position: fixed; z-index: 20; pointer-events: none; min-width: 140px; padding: 9px 11px;
       background: var(--card-head); border: 1px solid var(--line); border-radius: var(--radius-s);
       box-shadow: var(--shadow); font-size: 12.5px; }
.tip .when { color: var(--text-3); margin-bottom: 4px; }
.tip .row { display: flex; justify-content: space-between; gap: 18px; }
.tip .row b { font-weight: 600; font-variant-numeric: tabular-nums; }
.tip .row span i { display: inline-block; width: 12px; height: 2px; border-radius: 1px;
                   margin-right: 7px; vertical-align: 4px; }
details.data { border-top: 1px solid var(--line-soft); }
details.data summary { padding: 10px 18px; color: var(--text-2); cursor: pointer; font-size: 13px; }
details.data summary:hover { color: var(--teal); }
details.data .table-wrap { max-height: 320px; overflow: auto; }

/* -- pipeline ------------------------------------------------------------------------------- */
.pipe { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; align-items: stretch; }
.node { position: relative; padding: 16px 18px; border-right: 1px solid var(--line-soft); display: grid;
        gap: 6px; align-content: start; }
.node:last-child { border-right: 0; }
.node:not(:last-child)::after {
  content: ""; position: absolute; right: -7px; top: 26px; width: 12px; height: 12px;
  background: var(--card); border-top: 1px solid var(--line); border-right: 1px solid var(--line);
  transform: rotate(45deg); z-index: 1;
}
.node h3 { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.node .does { color: var(--text-3); font-size: 12.5px; min-height: 38px; }
.node .rate { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; }
.node .rate small { font-size: 12.5px; font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.state { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.state.ok { background: var(--up); }
.state.late { background: var(--down); }

.detector { display: grid; gap: 10px; padding: 18px; align-content: start; }
.detector h3 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.detector p { color: var(--text-2); }
.detector .counts { display: flex; gap: 22px; }
.detector .counts b { display: block; font-size: 20px; font-weight: 650; letter-spacing: -0.015em; }
.detector .counts span { color: var(--text-3); font-size: 12.5px; }
.cards { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }

/* -- other widths ---------------------------------------------------------------------------
   Three frames: the full side bar from 1181px, a bar of icons down to 861px, and below that a
   bar along the bottom with the first pages and the others behind "More". Tables do not go
   by these widths: one that does not fit its place is stacked (see .stacked). */
.nav .more { display: none; }
.more-sheet { display: contents; }
@media (max-width: 1180px) { .split { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 861px) and (max-width: 1180px) {
  .shell { grid-template-columns: 64px minmax(0, 1fr); }
  .side { padding: 16px 10px; align-items: center; }
  .brand { padding: 4px 0 18px; }
  .brand-name, .nav a span, .side-note, #connText { display: none; }
  .nav a { width: 44px; justify-content: center; padding: 0; }
  .side-foot { padding: 12px 0 0; justify-items: center; }
  #view { padding: 20px 20px 48px; }
  .top { padding: 14px 20px; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: auto 0 0 0; height: auto; flex-direction: row; padding: 6px 8px;
          padding-bottom: calc(6px + env(safe-area-inset-bottom)); z-index: 8;
          border-right: 0; border-top: 1px solid var(--line); }
  .brand, .side-foot, .nav .count { display: none; }
  .nav { flex-direction: row; flex: 1; gap: 2px; }
  .nav a, .nav .more { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center;
                       gap: 3px; font-size: 11px; min-height: 50px; padding: 4px 2px; }
  .nav a span, .nav .more span { max-width: 100%; overflow: hidden; text-overflow: ellipsis;
                                 white-space: nowrap; }
  .nav .more { display: flex; align-items: center; border: 0; background: none; cursor: pointer;
               border-radius: var(--radius-s); color: var(--text-2); font-weight: 500; }
  .nav .more[aria-current="page"], .nav.open .more { background: var(--teal-wash-2); color: var(--teal); }
  .more-sheet { display: none; position: fixed; left: 8px; right: 8px;
                bottom: calc(70px + env(safe-area-inset-bottom)); padding: 8px;
                grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px;
                background: var(--card-head); border: 1px solid var(--line);
                border-radius: var(--radius); box-shadow: var(--shadow); }
  .nav.open .more-sheet { display: grid; }
  .more-sheet a { min-height: 60px; }
  /* in the sheet a long name takes two lines; in the bar below it is cut */
  .more-sheet a span { white-space: normal; text-align: center; line-height: 1.2; }
  .top { position: static; flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
  .top-title { flex-basis: 100%; }
  .top h1 { font-size: 19px; }
  .crumbs { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .search { width: 100%; }
  .search kbd { display: none; }
  #view { padding: 16px 16px calc(92px + env(safe-area-inset-bottom)); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tile { padding: 14px; }
  .tile .value { font-size: 22px; overflow-wrap: anywhere; }
  .tiles > :first-child:has(.hero) { grid-column: 1 / -1; }
  .pipe { grid-template-columns: minmax(0, 1fr); }
  .node { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .node::after { display: none; }
  .node .does { min-height: 0; }
  .hero { font-size: 36px; }
  th, td { padding: 10px 14px; }
  .card-head { flex-wrap: wrap; padding: 12px 14px; }
  .card-head .end { margin-left: 0; flex-wrap: wrap; }
  .card-body { padding: 14px; }
  .card-foot { padding: 10px 14px 12px; }
  .feed li { padding: 12px 14px; }
  .filters { gap: 8px; }
  .filters .count { margin-left: 0; flex-basis: 100%; }
  .filters input[type="search"] { width: 100%; }
  .filter-form { padding: 14px; gap: 12px; }
  .filter-form label, .filter-form label input, .filter-form label select { width: 100%; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
  .wallet { flex-wrap: wrap; }
  .tip { max-width: calc(100vw - 16px); }
}
@media (max-width: 420px) {
  .tiles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .tile .value { font-size: 20px; }
  .spike .facts { grid-template-columns: minmax(0, 1fr); }
}
/* Nothing is wider than its place, at any width. */
.cards { grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); }
.grid.spike-cards { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.split { min-width: 0; }
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button { flex: none; white-space: nowrap; }
.filters select, .filters input { max-width: 100%; }
.chips { min-width: 0; }
.chip { max-width: 100%; }
.chip.mono { overflow: hidden; text-overflow: ellipsis; }
.note.alert { flex-wrap: wrap; }
.mono.small { overflow-wrap: anywhere; }
/* A finger needs more room than a pointer. */
@media (pointer: coarse) {
  .chip { height: 32px; padding: 0 12px; }
  .seg button { height: 34px; }
  .filters select, .filters input[type="search"] { height: 40px; }
  th button { padding: 6px 0; }
}

/* -- a table as cards ------------------------------------------------------------------------
   Set by the script on a table's wrapper when the table is wider than its place. A row is a
   card: its first column is the title, every other value stands under its column's name. */
.sort-pick { display: none; }
.stacked { overflow-x: visible; }
.stacked table, .stacked tbody { display: block; }
.stacked thead { display: none; }
.stacked tr { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
              gap: 8px 14px; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); }
.stacked tbody tr:last-child { border-bottom: 0; }
.stacked td, .stacked tbody th { display: flex; flex-direction: column; align-items: flex-start;
              gap: 1px; padding: 0 !important; border: 0; text-align: left; white-space: normal;
              min-width: 0; overflow-wrap: anywhere; }
.stacked td::before { content: attr(data-label); color: var(--text-3); font-size: 11.5px;
                      font-weight: 500; letter-spacing: 0.01em; }
.stacked td:not([data-label])::before { content: none; }
.stacked td.wide, .stacked td.bare, .stacked tbody th.wide { grid-column: 1 / -1; }
.stacked td.wide { font-size: 15px; }
.stacked td.rank { display: none; }
.stacked td.bare { flex-direction: row; flex-wrap: wrap; gap: 6px; }
.stacked td .two { align-items: flex-start; }
.stacked td .meter, .stacked td .spark { margin-left: 0; }
.stacked .sort-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
                      padding: 12px 16px; border-bottom: 1px solid var(--line-soft);
                      color: var(--text-3); font-size: 12.5px; }
.stacked .sort-pick select { height: 34px; padding: 0 8px; background: var(--surface);
                             color: var(--text); border: 1px solid var(--line);
                             border-radius: var(--radius-s); }
details.data .table-wrap.stacked { max-height: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* A note above a page: what its numbers cover. */
.note { margin: 0 0 16px; padding: 10px 14px; border-radius: var(--radius-s); background: var(--orange-wash);
  color: var(--text-2); font-size: 13px; box-shadow: inset 3px 0 0 var(--orange); }
.note strong { color: var(--text); font-weight: 600; }
.tile .foot .line { display: block; }
td .hot { color: var(--teal); font-weight: 600; }
td .ours { color: var(--text-2); font-style: italic; }
.meter.split { width: 36px; margin-left: 8px; background: var(--series-2); }
.chart .unknown { fill: var(--series-3); }
td .tag { margin-left: 8px; }
.dense th, .dense td { padding-left: 12px; padding-right: 12px; }
.dense th:first-child, .dense td:first-child { padding-left: 18px; }
.dense th:last-child, .dense td:last-child { padding-right: 18px; }
/* a table that is a little too wide for its place (set by the script, before it stacks) */
.squeezed th, .squeezed td { padding-left: 10px; padding-right: 10px; }
.squeezed th:first-child, .squeezed td:first-child { padding-left: 18px; }
.squeezed th:last-child, .squeezed td:last-child { padding-right: 18px; }
/* ... and a whole address in it takes two lines of 21 characters */
.squeezed td .mono { display: inline-block; max-width: 21ch; white-space: normal; overflow-wrap: anywhere; letter-spacing: 0; vertical-align: middle; }
.dense .spark { width: 80px; }
.rows .hot { color: var(--teal); font-weight: 600; }
.wallet { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; max-width: 100%; }
.chip.copy { color: var(--text-3); }
.chip.copy:hover, a.chip:hover { color: var(--teal); border-color: var(--teal); }
.feed .holds { margin-top: 6px; font-size: 13px; color: var(--text-2); }
.feed .holds b { font-weight: 600; }
.holds .up, td .up { color: var(--up); } .holds .down, td .down { color: var(--down); }
#view > .card { margin-bottom: 16px; }
.feed .holds.then:empty { display: none; }
.feed .holds.then b { color: var(--text); }

/* Spikes */
.pill.good { background: var(--teal-wash-2); color: var(--up); }
.tile.lit { box-shadow: inset 0 0 0 1px var(--teal-strong); background: var(--teal-wash); }
.tile.lit .value { color: var(--teal); }
.grid.spike-cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.spike { padding: 16px 18px; display: grid; gap: 14px; background: var(--surface); }
.spike.is-up { box-shadow: inset 3px 0 0 var(--up); } .spike.is-down { box-shadow: inset 3px 0 0 var(--down); }
.spike header, .spike footer { display: flex; align-items: center; justify-content: space-between; }
.spike header .name { font-size: 18px; font-weight: 650; }
.spike .facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.spike .label { display: block; color: var(--text-3); font-size: 12px; }
.spike .facts p { margin: 0; font-variant-numeric: tabular-nums; color: var(--text-2); }
.spike .facts p.strong { color: var(--text); font-weight: 600; font-size: 15px; }
.spike .facts p.up { color: var(--up); } .spike .facts p.down { color: var(--down); }
.spike footer { padding-top: 12px; border-top: 1px solid var(--line-soft); }
.spike .score { text-align: right; } .spike .score b { font-size: 22px; font-weight: 650; }
.note.alert { display: flex; align-items: center; gap: 10px; background: var(--teal-wash-2); box-shadow: inset 3px 0 0 var(--teal-strong); }
.note.alert .chip { margin-left: auto; }
td b.up { color: var(--up); } td b.down { color: var(--down); }

/* -- copy signals ------------------------------------------------------------------------- */
.chip.primary { background: var(--teal-strong); color: #06231e; font-weight: 600; border-color: transparent; }
.chip.track[aria-pressed="true"] { background: var(--teal-wash-2); color: var(--teal); }
button.chip { cursor: pointer; font: inherit; }
button.chip:disabled { opacity: .5; cursor: default; }
a.who { display: inline-flex; flex-direction: column; gap: 1px; color: inherit; text-decoration: none; }
a.who:hover .mono { color: var(--teal); }
.mono.small { font-size: 11px; color: var(--text-3); letter-spacing: -0.01em; }
/* a whole address on two lines of 21 characters, where one line makes the table too wide */
.mono.small.halves { max-width: 21ch; white-space: normal; overflow-wrap: anywhere; letter-spacing: 0; }
td .tag.down { color: var(--down); }
.filters select, .filter-form select, .filter-form input[type="text"], .filter-form input[type="number"] {
  height: 36px; padding: 0 10px; background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-s); font: inherit; }
.filters form, form.filters { margin-bottom: 14px; }
.filter-form { display: flex; flex-wrap: wrap; align-items: end; gap: 14px 18px; padding: 16px;
  border-bottom: 1px solid var(--line); background: var(--teal-wash-2); }
.filter-form > p { flex-basis: 100%; margin: 0; font-size: 13px; }
.filter-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--text-3); }
.filter-form fieldset { border: 0; padding: 0; margin: 0; display: flex; gap: 12px; align-items: center;
  height: 36px; }
.filter-form legend { font-size: 12.5px; color: var(--text-3); padding: 0; margin-bottom: 5px; }
.filter-form label.check { flex-direction: row; align-items: center; gap: 5px; color: var(--text); font-size: 13px; }
.filter-form .row { display: flex; gap: 8px; align-items: center; }
td .two { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
td .two small { font-size: 11.5px; }
td .two small.clip { max-width: 26ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* -- top trades, discover ------------------------------------------------------------------ */
td .two.left { align-items: flex-start; }
.filters label.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
  color: var(--text-2); cursor: pointer; }
.filters label.check input { accent-color: var(--teal-strong); width: 15px; height: 15px; }
.card-foot strong { color: var(--text-2); font-weight: 600; }
details.data[open] summary { border-bottom: 1px solid var(--line-soft); }
td .tag.hot { color: var(--orange); }
.tight th, .tight td { padding-left: 9px; padding-right: 9px; }
td .two.left .pill { margin-top: 4px; }

/* A post in the news feed: its text wraps, however long. */
td .news-text { white-space: normal; max-width: 720px; min-width: 260px; }
td .news-text small { white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }

/* long against short: one bar, the sums under it */
.ls { display: inline-flex; flex-direction: column; gap: 4px; min-width: 180px; width: 100%; max-width: 320px; }
.ls-bar { display: block; height: 8px; border-radius: 4px; background: var(--down); overflow: hidden; }
.ls-bar i { display: block; height: 100%; background: var(--up); border-right: 2px solid var(--card); }
/* three parts: up, sideways, and the rest (the bar's own colour) down */
.ls-bar.three { display: flex; }
/* a market's candle chart */
.candles { height: 440px; }
.candle-read { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 10px 0 0; font-size: 13px; min-height: 20px; }
.candle-note { margin: 8px 0 0; font-size: 12.5px; color: var(--text-2); max-width: 110ch; }
.candle-note:empty, .candle-read:empty { display: none; }
.candle-note.marked { margin: 0 0 12px; overflow-wrap: anywhere; }
.chart-chips { margin-bottom: 12px; }
.candle-credit { margin: 6px 0 0; font-size: 11.5px; color: var(--text-3); }
.candle-credit a { color: inherit; }
.chart-tools .legend { white-space: nowrap; }
@media (min-width: 701px) { .chart-tools { flex-shrink: 0; } }
@media (max-width: 700px) { .candles { height: 340px; } }
/* three marks beside a trend line: the trend on 1 hour, 4 hours, 1 day */
.marks { display: inline-flex; gap: 2px; margin-left: 6px; vertical-align: middle; font-size: 9px; cursor: help; }
.marks i { font-style: normal; width: 9px; text-align: center; }
td .two .marks { margin-left: 0; }
.ls-bar.three b { display: block; height: 100%; background: var(--line); border-right: 2px solid var(--card); }
.ls-sums { display: flex; justify-content: space-between; font-size: 12px; font-variant-numeric: tabular-nums; }

/* the liquidation map */
.liqmap { display: block; width: 100%; height: 190px; }
.liqmap-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); margin-top: 4px;
  font-variant-numeric: tabular-nums; }

.standing { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }

/* under a figure's name: by how much it moved, each amount kept in one piece */
.rows .flows { display: block; margin-top: 2px; font-size: 12.5px; }
.rows .flows > span { white-space: nowrap; }

/* the API screen: one line per endpoint that opens to its parameters and its own text */
.api-intro { padding: 2px 0; max-width: 78ch; }
.api-intro p { margin: 0 0 10px; color: var(--text-2); line-height: 1.55; }
.api-intro pre, .api-body pre { margin: 0 0 12px; padding: 10px 12px; overflow-x: auto; font: 12.5px var(--mono);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-soft); border-radius: var(--radius-s); }
code { font: 0.92em var(--mono); padding: 1px 5px; border-radius: 4px; background: rgba(255, 255, 255, 0.06); }
.api-endpoint { border-top: 1px solid var(--line-soft); }
.api-endpoint:first-child { border-top: 0; }
.api-endpoint summary { display: grid; grid-template-columns: 58px minmax(0, auto) minmax(0, 1fr); gap: 12px;
  align-items: baseline; padding: 11px 18px; cursor: pointer; list-style: none; }
.api-endpoint summary::-webkit-details-marker { display: none; }
.api-endpoint summary:hover { background: rgba(255, 255, 255, 0.025); }
.api-endpoint[open] summary { background: rgba(255, 255, 255, 0.035); }
.api-endpoint .method { font: 600 11px var(--mono); letter-spacing: 0.04em; color: var(--up); }
.api-endpoint .method.put, .api-endpoint .method.delete { color: var(--down); }
.api-endpoint .path { background: none; padding: 0; font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.api-endpoint .what { color: var(--text-2); font-size: 13px; line-height: 1.45; }
.api-body { padding: 4px 18px 16px; }
.api-body .table-wrap { margin: 4px -18px 12px; }
.api-params td { vertical-align: top; white-space: normal; }
.api-params td:first-child { white-space: nowrap; }
.api-text { max-width: 86ch; }
.api-text p { margin: 0 0 10px; color: var(--text-2); line-height: 1.6; font-size: 13.5px; }
@media (max-width: 760px) {
  .api-endpoint summary { grid-template-columns: 46px minmax(0, 1fr); }
  .api-endpoint .what { grid-column: 1 / -1; }
}

/* the account's keys on the API screen */
.connect .chip { color: var(--teal); border-color: var(--teal); }
.api-intro .keys { margin: 4px -18px 10px; }
.api-intro .keys li { padding-left: 18px; padding-right: 18px; }
.api-intro .new-key pre { user-select: all; overflow-wrap: anywhere; white-space: pre-wrap; }

/* what a wallet holds now comes a moment after its row: room for two lines is kept */
.feed .holds.now { min-height: 39px; }
/* new detections waiting to be shown: laid over the top of the list, taking no room of its own */
.feed-more { position: sticky; top: 84px; z-index: 3; display: block; margin: 8px auto -36px; height: 28px; padding: 0 14px;
  font: 600 12.5px Inter, system-ui, sans-serif; color: #06211c; background: var(--teal); border: 0; border-radius: 14px;
  cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }
.feed-more[hidden] { display: none; }

/* pop-ups for new spikes and signals: over the corner of the page, moving nothing */
.popups { position: fixed; right: 18px; bottom: 18px; z-index: 30; display: grid; gap: 10px; width: min(340px, calc(100vw - 36px)); pointer-events: none; }
.popup { pointer-events: auto; position: relative; display: grid; gap: 3px; padding: 12px 36px 12px 14px; cursor: pointer;
  background: var(--surface-2, #16262b); border: 1px solid var(--line); border-left: 3px solid var(--teal);
  border-radius: var(--radius-s); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); font-size: 13px; }
.popup strong { color: var(--text); }
.popup span { color: var(--text-2); overflow-wrap: anywhere; }
.popup-close { position: absolute; top: 6px; right: 8px; width: 24px; height: 24px; border: 0; background: none;
  color: var(--text-3); font-size: 18px; line-height: 1; cursor: pointer; border-radius: 6px; }
.popup-close:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
@media (max-width: 760px) { .popups { bottom: 84px; } }

/* The account and the pop-up switch, in the top corner at every width. The side bar's foot
   was no place for them: under a long menu it is off the screen on anything but a tall one. */
.account-top { display: flex; align-items: center; gap: 8px; flex: none; }
.account-top:has(#accountTop:empty):has(#popupSwitch:empty) { display: none; }
.account-mini { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px;
  color: var(--text-2); border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface);
  font-size: 12.5px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.account-mini:hover { color: var(--teal); border-color: var(--teal); }
.account-mini svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round; }
.account-mini .dot { position: absolute; top: -4px; right: -4px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--text-3); border: 2px solid var(--bg, #0e1a1e); }
.account-mini.ok .dot { background: var(--up); }
.account-mini.low .dot { background: var(--down); }
.account-mini.in .dot { background: var(--teal); }
.account-mini-wallet { color: var(--text-3); font-weight: 400; letter-spacing: 0; }
#popupSwitch .chip { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0;
  border-radius: var(--radius-s); background: var(--surface); }
#popupSwitch .chip svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
#popupSwitch .chip span { display: none; }
#popupSwitch .chip[aria-pressed="true"] { color: var(--teal); border-color: var(--teal); background: var(--teal-wash-2); }
@media (max-width: 1180px) { .account-mini-wallet { display: none; } }
@media (max-width: 860px) {
  /* the title, the switch and the account share the first row; the search has the second */
  .top-title { flex: 1 1 0; min-width: 0; }
  .account-top { order: 1; }
  .search { order: 2; }
  .account-mini, #popupSwitch .chip { height: 36px; }
  #popupSwitch .chip { width: 36px; }
}

/* a visitor's answers are not live: said once, in the top corner */
#accountTop { display: inline-flex; align-items: center; gap: 8px; }
.delay-note {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface);
  color: var(--text-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; text-decoration: none;
}
.delay-note:hover { color: var(--text); }
.delay-note .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); flex: none; }
.delay-short { display: none; }
@media (max-width: 1100px) { .delay-more { display: none; } }
@media (max-width: 640px) { .delay-long { display: none; } .delay-short { display: inline; } .delay-note { padding: 0 10px; } }

/* the bar under a long table: which rows are shown, and the way to the next ones */
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap;
         padding: 10px 18px; border-top: 1px solid var(--line); font-size: 12.5px;
         font-variant-numeric: tabular-nums; position: sticky; left: 0; }
.pager > :first-child { margin-right: auto; }
.pager button[disabled] { opacity: 0.4; cursor: default; }

/* the star of the watchlist, and what stands at the end of a row of wallets */
.chip.star { padding: 2px 8px; font-size: 15px; line-height: 1.2; color: var(--text-3); text-decoration: none; }
.chip.star[aria-pressed="true"] { color: var(--orange); border-color: currentColor; }
.row-end { display: inline-flex; align-items: center; gap: 6px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--teal); cursor: pointer; }
.linkish:hover { text-decoration: underline; }
