/* ── hafizr283.github.io · dark terminal telemetry ─────────────────
   Committed dark design. Palette roles from the validated reference
   palette (dark column); text always wears ink tokens, never series
   color. */

:root {
  --bg:        #0d0d0d;
  --surface:   #1a1a19;
  --surface-2: #222220;
  --ink:       #ffffff;
  --ink-2:     #c3c2b7;
  --muted:     #898781;
  --grid:      #2c2c2a;
  --baseline:  #383835;
  --border:    rgba(255,255,255,.08);
  --accent:    #3987e5;
  --good:      #0ca30c;
  --warn:      #fab219;
  --crit:      #d03b3b;
  --down:      #e66767;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scrollbar-color: var(--baseline) var(--bg); }

body {
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(1100px 420px at 50% -160px, rgba(57,135,229,.07), transparent 70%);
  background-repeat: no-repeat;
}

::selection { background: rgba(57,135,229,.35); color: var(--ink); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.wrap { max-width: 1060px; margin: 0 auto; padding: 28px 20px 48px; }

/* ── terminal header ─────────────────────────────────────────── */

.term {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 18px 50px -28px rgba(0,0,0,.9);
}

.term-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-r { background: #d03b3b; } .dot-y { background: #c98500; } .dot-g { background: #008300; }
.term-title { margin-left: 8px; color: var(--muted); font-size: 12px; }

.term-body {
  padding: 16px 18px 14px;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0 1px, transparent 1px 3px);
}
.term-line { white-space: nowrap; overflow: hidden; }
.prompt { color: var(--good); }
.p-sep  { color: var(--muted); }
.p-path { color: var(--accent); }
.cmd    { color: var(--ink); margin-left: 8px; }

.cursor {
  display: inline-block; width: 8px; height: 15px;
  background: var(--ink-2); margin-left: 2px; vertical-align: -2px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.status-lines { list-style: none; margin-top: 10px; }
.status-lines li {
  display: flex; align-items: baseline; gap: 10px;
  color: var(--muted); font-size: 13px; padding: 1.5px 0;
}
.status-lines .src { color: var(--ink-2); min-width: 104px; }
.status-lines .leader { flex: 1; border-bottom: 1px dotted var(--baseline); transform: translateY(-4px); }
.status-lines .state          { color: var(--muted); }
.status-lines .state.live     { color: var(--good); }
.status-lines .state.cached   { color: var(--warn); }
.status-lines .state.error    { color: var(--down); }

/* ── identity ────────────────────────────────────────────────── */

.hero { padding: 34px 4px 6px; }
.hero h1 { color: var(--ink); font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.tagline { color: var(--muted); margin-top: 6px; font-size: 13px; }

.links { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; }
.links a {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 12.5px;
  color: var(--ink-2);
  transition: border-color .15s, color .15s;
}
.links a::before { content: "» "; color: var(--accent); }
.links a:hover { border-color: var(--accent); color: var(--ink); text-decoration: none; }

/* ── stat tiles ──────────────────────────────────────────────── */

.tiles {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px 12px;
  position: relative;
  overflow: hidden;
}
.tile::after {                       /* corner glyph, pure decoration */
  content: "▖"; position: absolute; right: 8px; bottom: 2px;
  color: var(--surface-2); font-size: 18px;
}
.tile .t-label {
  color: var(--muted); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: .12em;
}
.tile .t-value {
  color: var(--ink); font-size: 27px; font-weight: 700;
  margin-top: 4px; letter-spacing: -.01em;
}
.tile .t-sub { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.tile .t-sub .up   { color: var(--good); }
.tile .t-sub .down { color: var(--down); }

/* ── cards / grid ────────────────────────────────────────────── */

.grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px 14px;
  min-width: 0;
}
.card.wide { grid-column: 1 / -1; }

.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-head h2 { color: var(--ink); font-size: 14.5px; font-weight: 700; }
.card-head h2::before { content: "## "; color: var(--baseline); font-weight: 400; }
.card-sub { color: var(--muted); font-size: 12px; }
.card-foot { color: var(--muted); font-size: 12px; margin-top: 10px; }

/* ── charts ──────────────────────────────────────────────────── */

.chart-box { margin-top: 12px; }
.chart-box svg { display: block; width: 100%; height: auto; }

.bars { margin-top: 14px; display: flex; flex-direction: column; gap: 11px; }
.bar-row { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 10px; }
.bar-row .b-label { color: var(--ink-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .b-track { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bar-row .b-fill {
  height: 14px;
  border-radius: 0 4px 4px 0;      /* rounded data-end, square baseline */
  min-width: 2px;
  transition: width .5s cubic-bezier(.2,.7,.3,1);
}
.bar-row .b-val { color: var(--ink); font-size: 12.5px; flex-shrink: 0; }

/* ── heatmap ─────────────────────────────────────────────────── */

.heatmap-box { margin-top: 14px; overflow-x: auto; padding-bottom: 4px; }
.heatmap-box svg { display: block; }
.heat-legend {
  display: flex; align-items: center; gap: 4px; justify-content: flex-end;
  color: var(--muted); font-size: 11px; margin-top: 6px;
}
.heat-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* ── repos ───────────────────────────────────────────────────── */

.repo-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.repo {
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color .15s;
}
.repo:hover { border-color: var(--accent); }
.repo .r-name { color: var(--accent); font-size: 13px; font-weight: 700; word-break: break-word; }
.repo .r-desc {
  color: var(--muted); font-size: 12px; line-height: 1.45; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.repo .r-meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11.5px; }
.repo .r-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 5px; vertical-align: -1px; }

/* ── other judges ────────────────────────────────────────────── */

.judge-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}
.judge {
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 2px;
  transition: border-color .15s;
}
.judge:hover { border-color: var(--accent); text-decoration: none; }
.judge .j-name {
  color: var(--muted); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: .12em;
}
.judge .j-value { color: var(--ink); font-size: 22px; font-weight: 700; }
.judge .j-sub { color: var(--muted); font-size: 11.5px; }

.chip-row { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip-label { color: var(--muted); font-size: 11px; margin-right: 4px; }
.chip {
  border: 1px solid var(--border); border-radius: 999px;
  padding: 2px 10px; font-size: 11px; color: var(--muted);
}
.chip b { color: var(--ink-2); font-weight: 600; }

/* ── tables (accessibility view) ─────────────────────────────── */

.tbl { margin-top: 12px; }
.tbl summary {
  color: var(--muted); font-size: 11.5px; cursor: pointer;
  list-style: none; user-select: none;
}
.tbl summary::before { content: "▸ "; }
.tbl[open] summary::before { content: "▾ "; }
.tbl summary:hover { color: var(--ink-2); }
.tbl-scroll { overflow: auto; max-height: 280px; margin-top: 8px; }
.tbl table { border-collapse: collapse; font-size: 12px; min-width: 320px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { text-align: left; padding: 4px 14px 4px 0; border-bottom: 1px solid var(--grid); white-space: nowrap; }
.tbl th { color: var(--muted); font-weight: 400; }
.tbl td { color: var(--ink-2); }

/* ── tooltip ─────────────────────────────────────────────────── */

.tooltip {
  position: fixed; z-index: 10; pointer-events: none;
  background: #050505; border: 1px solid var(--baseline);
  border-radius: 6px; padding: 7px 10px;
  font-size: 12px; color: var(--ink-2); line-height: 1.5;
  max-width: 280px;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,.8);
}
.tooltip .tt-title { color: var(--ink); }
.tooltip .up { color: var(--good); }
.tooltip .down { color: var(--down); }

/* ── footer ──────────────────────────────────────────────────── */

.foot { margin-top: 26px; color: var(--muted); font-size: 11.5px; text-align: center; }
.foot p + p { margin-top: 4px; }

/* ── reveal animation ────────────────────────────────────────── */

.reveal { opacity: 0; transform: translateY(10px); animation: rise .55s ease forwards; }
.reveal:nth-of-type(2) { animation-delay: .07s; }
.reveal:nth-of-type(3) { animation-delay: .14s; }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  .cursor { animation: none; }
  .bar-row .b-fill { transition: none; }
}

@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 22px; }
  .wrap { padding: 16px 12px 40px; }
}
