/* Block0 Watch: the shared look for the dashboard and the coin check.
   Surfaces, inks and status colors are the validated chart palette, so the charts and the UI
   read as one system in light and dark. app.js sets data-theme before first paint; the media
   query below covers the no-script case. */

:root {
  color-scheme: light;
  --plane: #f9f9f9;
  --surface-1: #ffffff;
  --surface-2: #f3f3f3;
  --text-primary: #191919;
  --text-secondary: #666666;
  --grid: #e7e7e7;
  --axis: #c2c2c2;
  --border: rgba(11, 11, 11, 0.10);
  --border-strong: rgba(11, 11, 11, 0.18);
  --wash: rgba(11, 11, 11, 0.04);
  --wash-strong: rgba(11, 11, 11, 0.07);
  --series-1: #257de0;
  --series-2: #f47230;
  --accent: #257de0;
  --track: #cce3fd;
  --muted-bar: #c2c2c2;
  --good: #0aac23;
  --warning: #fbb315;
  --serious: #f18a59;
  --critical: #dc3c3d;
  --good-text: #006c10;
  --shadow-1: 0 1px 2px rgba(11, 11, 11, 0.04), 0 2px 10px rgba(11, 11, 11, 0.03);
  --shadow-2: 0 14px 36px rgba(11, 11, 11, 0.10), 0 2px 6px rgba(11, 11, 11, 0.05);
  --topbar: rgba(249, 249, 249, 0.82);
  --radius: 14px;
  --radius-sm: 9px;
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", sans-serif;
  --font-display: "Inter Display", "Inter", "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  --glow: rgba(37, 125, 224, 0.10);
  --highlight: rgba(255, 255, 255, 0);
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --plane: #0b0b0b; --surface-1: #191919; --surface-2: #222222;
    --text-primary: #efefef; --text-secondary: #9c9c9c;
    --grid: #303030; --axis: #474747;
    --border: rgba(255, 255, 255, 0.10); --border-strong: rgba(255, 255, 255, 0.18);
    --wash: rgba(255, 255, 255, 0.05); --wash-strong: rgba(255, 255, 255, 0.09);
    --series-1: #338ced; --series-2: #e76624; --accent: #338ced;
    --track: rgba(51, 140, 237, 0.20); --muted-bar: #474747; --good-text: #53c556;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-2: 0 18px 44px rgba(0, 0, 0, 0.6);
    --topbar: rgba(11, 11, 11, 0.78);
    --glow: rgba(51, 140, 237, 0.13); --highlight: rgba(255, 255, 255, 0.045);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --plane: #0b0b0b; --surface-1: #191919; --surface-2: #222222;
  --text-primary: #efefef; --text-secondary: #9c9c9c;
  --grid: #303030; --axis: #474747;
  --border: rgba(255, 255, 255, 0.10); --border-strong: rgba(255, 255, 255, 0.18);
  --wash: rgba(255, 255, 255, 0.05); --wash-strong: rgba(255, 255, 255, 0.09);
  --series-1: #338ced; --series-2: #e76624; --accent: #338ced;
  --track: rgba(51, 140, 237, 0.20); --muted-bar: #474747; --good-text: #53c556;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-2: 0 18px 44px rgba(0, 0, 0, 0.6);
  --topbar: rgba(11, 11, 11, 0.78);
  --glow: rgba(51, 140, 237, 0.13); --highlight: rgba(255, 255, 255, 0.045);
}

/* ------------------------------------------------------------------ base */
* { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0; color: var(--text-primary);
  background: radial-gradient(1100px 440px at 50% -170px, var(--glow), transparent 72%) no-repeat, var(--plane);
  font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-x: clip;
  font-feature-settings: "cv11", "ss01"; /* Inter: single-storey a, open digits; ignored by other fonts */
  min-height: 100vh; display: flex; flex-direction: column;
}
body > main { flex: 1 0 auto; }
a { color: inherit; text-decoration-color: var(--axis); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
h1, h2, .brand, .tile .value { font-family: var(--font-display); }
.muted { color: var(--text-secondary); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------ top bar */
.topbar {
  position: sticky; top: 0; z-index: 30; background: var(--topbar);
  -webkit-backdrop-filter: saturate(1.5) blur(14px); backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar .container { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 680; font-size: 15px; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.brand svg { width: 28px; height: 28px; flex: none; }
.nav { display: flex; gap: 2px; }
.nav a { padding: 7px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 550; color: var(--text-secondary); text-decoration: none; white-space: nowrap; }
.nav a:hover { color: var(--text-primary); background: var(--wash); }
.nav a[aria-current="page"] { color: var(--text-primary); background: var(--wash-strong); }
.nav .short { display: none; }
@media (max-width: 480px) { .nav .full { display: none; } .nav .short { display: inline; } }
.topbar .spacer { flex: 1; }
.quick {
  display: flex; align-items: center; gap: 8px; height: 34px; width: 290px; padding: 0 5px 0 10px;
  border: 1px solid var(--border); border-radius: 9px; background: var(--surface-1); color: var(--text-secondary);
  transition: border-color 0.15s, box-shadow 0.15s, width 0.2s;
}
.quick:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); width: 340px; }
.quick.bad { border-color: var(--critical); box-shadow: 0 0 0 3px color-mix(in srgb, var(--critical) 18%, transparent); }
.quick svg { width: 15px; height: 15px; flex: none; }
.quick input { flex: 1; border: 0; outline: 0; background: transparent; font: inherit; font-size: 13px; color: var(--text-primary); min-width: 0; height: 100%; }
.quick input::placeholder { color: var(--text-secondary); }
kbd {
  font: 11px/1 var(--mono); padding: 3px 6px; border-radius: 5px; border: 1px solid var(--border);
  border-bottom-width: 2px; color: var(--text-secondary); background: var(--surface-2);
}
@media (max-width: 1020px) { .quick { display: none; } }
.live {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px;
  font-size: 12.5px; color: var(--text-secondary); border: 1px solid var(--border);
  border-radius: 99px; background: var(--surface-1); white-space: nowrap;
}
.live b { color: var(--text-primary); font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--axis); position: relative; flex: none; display: inline-block; }
.dot.good { background: var(--good); }
.dot.warning { background: var(--warning); }
.dot.critical { background: var(--critical); }
.dot.accent { background: var(--accent); }
.live .dot.good::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--good); opacity: 0; animation: ping 2s ease-out infinite;
}
@keyframes ping { 0% { transform: scale(0.6); opacity: 0.7; } 100% { transform: scale(1.6); opacity: 0; } }
.icon-btn {
  width: 34px; height: 34px; display: inline-grid; place-items: center; flex: none;
  border-radius: 9px; border: 1px solid var(--border); background: var(--surface-1);
  color: var(--text-primary); cursor: pointer; padding: 0;
}
.icon-btn:hover { background: var(--wash); }
.icon-btn svg { width: 17px; height: 17px; }
a.icon-btn { text-decoration: none; }
.icon-btn.x-link svg { width: 15px; height: 15px; }
:root[data-theme="dark"] .i-moon, :root:not([data-theme="dark"]) .i-sun { display: none; }
@media (max-width: 720px) {
  .topbar .container { gap: 10px; }
  .brand .brand-name { display: none; }
  .live .txt { display: none; }
  .nav a { padding: 7px 10px; }
}

/* ------------------------------------------------------------------ page head */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 28px; padding: 34px 0 22px; }
.page-head h1 { font-size: 34px; line-height: 1.1; letter-spacing: -0.032em; font-weight: 720; margin: 8px 0 10px; }
.lede { margin: 0; color: var(--text-secondary); font-size: 15px; line-height: 1.55; max-width: 66ch; }
.meta-line { margin-top: 12px; font-size: 12.5px; color: var(--text-secondary); display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-secondary); }
@media (max-width: 640px) { .page-head { padding-top: 24px; } .page-head h1 { font-size: 26px; } }
.eyebrow.chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 8px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface-1); letter-spacing: 0.03em; font-size: 11.5px; }

/* toolbar: data summary on the left, filters on the right; sticks under the top bar on wide screens */
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px;
  margin: 0 -24px 18px; padding: 10px 24px; border-bottom: 1px solid transparent;
  position: sticky; top: 61px; z-index: 20; transition: background 0.2s, border-color 0.2s;
}
.toolbar .meta-line { margin-top: 0; }
.toolbar.stuck { background: var(--topbar); border-bottom-color: var(--border); -webkit-backdrop-filter: saturate(1.5) blur(14px); backdrop-filter: saturate(1.5) blur(14px); }
@media (max-width: 720px) { .toolbar { position: static; margin: 0 0 16px; padding: 0; } }
@media (max-width: 640px) { .toolbar { margin: 0 0 14px; } }

/* ------------------------------------------------------------------ layout */
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack > * + * { margin-top: 16px; }
@media (max-width: 980px) { .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 780px) { .cols-2 { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------------ cards */
.card {
  --pad: 22px;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px var(--pad); box-shadow: inset 0 1px 0 var(--highlight), var(--shadow-1);
}
@media (max-width: 640px) { .card { --pad: 16px; padding-top: 16px; padding-bottom: 16px; } .container { padding: 0 14px; } }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.card h2 { font-size: 16px; font-weight: 650; letter-spacing: -0.015em; margin: 0; }
.card h3 { font-size: 13.5px; font-weight: 620; margin: 18px 0 8px; }
.card .sub { color: var(--text-secondary); font-size: 13px; line-height: 1.5; margin: 4px 0 0; max-width: 72ch; }
.note { font-size: 12.5px; color: var(--text-secondary); margin: 12px 0 0; line-height: 1.5; }

/* stat tiles */
.tile { display: flex; flex-direction: column; }
.tile .label { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }
.tile .value { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin: auto 0 0; padding-top: 12px; font-variant-numeric: tabular-nums; }
.spark { position: relative; height: 38px; margin: 12px 0 2px; cursor: crosshair; }
.spark svg { display: block; width: 100%; height: 100%; overflow: visible; }
.spark .pt { position: absolute; width: 8px; height: 8px; margin: -6px 0 0 -6px; border-radius: 50%; border: 2px solid var(--surface-1); box-sizing: content-box; display: none; pointer-events: none; }
.tile .foot { min-height: 19px; }
.tile .foot { font-size: 12.5px; color: var(--text-secondary); margin-top: 6px; }
.tile .foot .bad { color: var(--critical); font-weight: 650; }
.tile .foot .good { color: var(--good-text); font-weight: 650; }
.meter { height: 6px; border-radius: 99px; background: var(--track); overflow: hidden; margin-top: 10px; }
.meter i { display: block; height: 100%; background: var(--series-1); border-radius: 99px; }

/* ------------------------------------------------------------------ controls */
.btn {
  font: inherit; font-size: 14px; font-weight: 620; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 10px; border: 1px solid transparent;
  background: var(--text-primary); color: var(--surface-1); cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: opacity 0.15s, transform 0.06s, background 0.15s;
}
.btn:hover { opacity: 0.88; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.btn-ghost { background: var(--surface-1); color: var(--text-primary); border-color: var(--border); }
.btn-ghost:hover { background: var(--wash); opacity: 1; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; font-weight: 550; border-radius: 8px; gap: 6px; }
.btn svg { width: 14px; height: 14px; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 10px; background: var(--wash-strong); border: 1px solid var(--border); }
.seg .seg-label { font-size: 12px; font-weight: 550; color: var(--text-secondary); padding: 0 6px 0 8px; }
.seg button {
  font: inherit; font-size: 13px; font-weight: 550; border: 0; background: transparent; color: var(--text-secondary);
  padding: 5px 11px; border-radius: 7px; cursor: pointer; white-space: nowrap;
}
.seg button:hover { color: var(--text-primary); }
.seg button[aria-pressed="true"] { background: var(--surface-1); color: var(--text-primary); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.10), 0 0 0 1px var(--border); }

/* badges and tags: status color always comes with its label */
.badge {
  display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px 0 9px;
  font-size: 12.5px; font-weight: 600; border-radius: 99px; border: 1px solid var(--border); background: var(--surface-1); white-space: nowrap;
}
.tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 550; line-height: 1.6;
  padding: 0 8px; border-radius: 99px; background: var(--wash-strong); color: var(--text-secondary); margin: 2px 4px 2px 0; white-space: nowrap;
}
.tag.hot { background: color-mix(in srgb, var(--critical) 13%, transparent); color: var(--text-primary); }
.tag.hot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--critical); }
/* status icon: always next to a text label (OK, caution, warning, unknown) */
.ic { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #fff; flex: none; line-height: 1; }
.ic.ok { background: var(--good); }
.ic.caution { background: var(--warning); color: #0b0b0b; }
.ic.warning { background: var(--critical); }
.ic.unknown { background: var(--axis); color: var(--text-primary); }
.badge .ic { width: 17px; height: 17px; font-size: 10px; }
/* a coin name or ticker blanked by the server's offensive-word filter */
.hidden-name { font-style: italic; }
.hidden-tag { margin: 0 0 0 10px; vertical-align: 3px; letter-spacing: 0; cursor: help; }

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; margin: 0 calc(-1 * var(--pad, 22px)); }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
th {
  text-align: left; font-weight: 600; font-size: 12px; color: var(--text-secondary); padding: 9px 12px;
  border-bottom: 1px solid var(--grid); white-space: nowrap; background: var(--surface-2);
}
thead tr:first-child th { border-top: 1px solid var(--grid); }
td { padding: 10px 12px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
th:first-child, td:first-child { padding-left: var(--pad, 22px); }
th:last-child, td:last-child { padding-right: var(--pad, 22px); }
tbody tr:last-child td { border-bottom: 0; }
table.hover tbody tr:hover td { background: var(--wash); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-cell { display: inline-flex; align-items: center; gap: 10px; justify-content: flex-end; }
.bar-cell .track { width: 90px; height: 6px; display: block; }
.bar-cell .track i { display: block; height: 100%; min-width: 2px; background: var(--series-1); border-radius: 0 3px 3px 0; }
.bar-cell .n { min-width: 2.5ch; text-align: right; }
@media (max-width: 640px) { .bar-cell .track { width: 48px; } }
.coin-link { font-weight: 640; text-decoration: none; }
.coin-link:hover { text-decoration: underline; }

/* key-value lists */
.kv { display: grid; grid-template-columns: minmax(110px, 0.75fr) minmax(0, 2fr); gap: 9px 14px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--text-secondary); }
.kv dd { margin: 0; }

/* table-view / accordion disclosure */
details.disclose { margin-top: 12px; font-size: 12.5px; }
details.disclose > summary { color: var(--text-secondary); cursor: pointer; width: max-content; font-weight: 550; }
details.disclose > summary:hover { color: var(--text-primary); }
details.disclose[open] > summary { margin-bottom: 10px; }
.faq details { border-top: 1px solid var(--grid); }
.faq details:first-of-type { border-top: 0; }
.faq summary { list-style: none; cursor: pointer; padding: 13px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-secondary); font-weight: 500; font-size: 16px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 14px; color: var(--text-secondary); max-width: 80ch; }

/* skeleton loading */
.skeleton {
  border-radius: 8px; background: linear-gradient(90deg, var(--wash) 0%, var(--wash-strong) 50%, var(--wash) 100%);
  background-size: 200% 100%; animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.empty { color: var(--text-secondary); padding: 32px 0; text-align: center; }

/* ------------------------------------------------------------------ footer */
.site-foot { border-top: 1px solid var(--border); margin-top: 56px; padding: 22px 0 36px; color: var(--text-secondary); font-size: 12.5px; }
.site-foot .container { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; align-items: center; }
.site-foot .foot-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text-primary); font-weight: 620; }
.site-foot .foot-brand svg { width: 20px; height: 20px; }
.site-foot .foot-brand span { color: var(--text-secondary); font-weight: 400; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-foot nav a { text-decoration: none; }
.site-foot nav a:hover { color: var(--text-primary); }

@media (prefers-reduced-motion: reduce) {
  .skeleton, .live .dot.good::after { animation: none; }
  .btn { transition: none; }
}
