/* ============================================================
   Nichora — dark glass

   A near-black canvas lit from behind by three soft colour
   fields. Every panel is a frosted sheet floating over that
   light, so the colour reads through the glass rather than
   sitting on top of it.

   Two colours carry meaning and nothing else does:
     lime   — the interface, and any figure worth reading
     ember  — reserved for videos past 30x their own median

   Long lists drop the blur on purpose. Frosted glass under a
   hundred scrolling rows costs legibility and frame rate, and
   neither is worth a texture.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700&display=swap');

:root {
  --void:   #0b0c0e;
  --panel:  rgba(20, 21, 24, .72);
  --solid:  #151719;
  --raised: rgba(255, 255, 255, .06);
  --rule:   rgba(255, 255, 255, .07);
  --rule-2: rgba(255, 255, 255, .14);

  --bone:  #eceef2;
  --mute:  #9aa2b1;
  --faint: #7f8694;

  --lime:    #c4f042;
  --lime-in: #1a2408;
  --ember:   #ff8a3d;
  --ember-in:#2b1305;

  --hot:   var(--lime);
  --cool:  #6fdcb6;
  --alert: #ff6b5e;

  /* legacy names kept so page-level CSS keeps working */
  --t0: rgba(255,255,255,.16);
  --t1: #8fb33a;
  --t2: #a8d13e;
  --t3: var(--ember);
  --t4: var(--lime);

  --glass: blur(26px) saturate(140%);
  --r-card: 22px;
  --r-soft: 14px;

  --display: 'Inter Tight', system-ui, sans-serif;
  --ui: 'Inter Tight', system-ui, -apple-system, sans-serif;

  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0; min-height: 100vh;
  font-family: var(--ui);
  font-variant-numeric: tabular-nums;
  font-size: 14px; line-height: 1.55;
  color: var(--bone);
  background: var(--void);
  background-image:
    radial-gradient(680px 380px at 12% -4%,  rgba(95, 122, 18, .40) 0%, rgba(0,0,0,0) 64%),
    radial-gradient(720px 400px at 90%  4%,  rgba(122, 77, 18, .34) 0%, rgba(0,0,0,0) 62%),
    radial-gradient(820px 460px at 58% 104%, rgba(47, 74, 58, .38) 0%, rgba(0,0,0,0) 62%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
::selection { background: var(--lime); color: var(--lime-in); }

/* ------------------------------------------------- the sheet */
.sheet, .card, .rival, .curve, .stats, .read, .hook, .toast {
  background: var(--panel);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--rule);
}

/* ------------------------------------------------------ nav */
header {
  position: sticky; top: 14px; z-index: 40;
  margin: 14px 16px 0;
  display: flex; align-items: center; gap: 14px;
  padding: 7px 7px 7px 18px;
  border-radius: 999px;
  background: var(--panel);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--rule);
}
.mark { font-size: 15.5px; font-weight: 700; letter-spacing: -.035em; }
.mark i { font-style: normal; color: var(--lime); }

nav { margin-left: auto; display: flex; gap: 2px; }
nav a {
  color: var(--mute); text-decoration: none; font-size: 12.5px; font-weight: 500;
  padding: 7px 15px; border-radius: 999px;
}
nav a:hover { color: var(--bone); background: var(--raised); }
nav a.on { background: var(--lime); color: var(--lime-in); font-weight: 600; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--lime); outline-offset: 2px;
}

main { padding: 22px 16px 80px; }

/* ----------------------------------------------- typography */
h1, h2, h3 { font-family: var(--display); letter-spacing: -.03em; margin: 0; }
h1 { font-size: 21px; font-weight: 700; }
h2 { font-size: 24px; font-weight: 700; }
h3 { font-size: 15.5px; font-weight: 600; margin-bottom: 5px; }

.sub, .lede, .hint, .tag { color: var(--faint); margin: 0 0 16px; max-width: 64ch; }
.hint { font-size: 12.5px; margin: 10px 4px 0; }
.err, .note.bad { color: var(--alert); margin: 18px 4px; }
.note.good { color: var(--cool); }
.state, .skeleton, .empty { color: var(--faint); padding: 52px 0; text-align: center; }
.dim { color: var(--faint); }

/* ---------------------------------------------------- forms */
input, select, textarea {
  font: inherit; color: var(--bone);
  background: var(--raised);
  border: 1px solid var(--rule);
  border-radius: 10px; padding: 9px 13px;
}
input::placeholder { color: var(--faint); }
input:focus, select:focus { border-color: var(--rule-2); }

button {
  font: inherit; cursor: pointer;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--lime); color: var(--lime-in);
  font-weight: 650; padding: 9px 20px;
}
button:hover { filter: brightness(1.06); }
button:disabled { opacity: .4; cursor: default; filter: none; }

button.quiet, .reset, .act, .drop, .tools button, .tabs button {
  background: var(--raised); color: var(--mute);
  border: 1px solid var(--rule); font-weight: 500;
}
button.quiet:hover, .reset:hover, .act:hover, .tools button:hover, .tabs button:hover {
  color: var(--bone); border-color: var(--rule-2);
}
.act.danger:hover, .drop:hover { color: var(--alert); border-color: var(--alert); }
.act.go:hover { color: var(--cool); border-color: var(--cool); }
.tools button.done { color: var(--cool); border-color: var(--cool); }
.tabs button[aria-pressed="true"] {
  background: var(--lime); color: var(--lime-in); border-color: var(--lime); font-weight: 650;
}

.search { display: flex; gap: 10px; }
.search input { flex: 1; padding: 14px 18px; font-size: 15px; border-radius: 999px; }
.search button { padding: 14px 28px; font-size: 14.5px; font-weight: 700; }

/* ---------------------------------------------------- tables */
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-weight: 500; font-size: 11.5px; color: var(--faint);
  padding: 0 14px 9px 0; border-bottom: 1px solid var(--rule); white-space: nowrap;
}
td { padding: 11px 14px 11px 0; border-bottom: 1px solid var(--rule); }
tr:hover td { background: var(--raised); }
td a { color: inherit; text-decoration: none; }
td a:hover { color: var(--lime); }
.num { text-align: right; }

/* ------------------------------------------------- the signal */
.bar, .meter {
  height: 4px; border-radius: 4px;
  background: rgba(255,255,255,.07); margin-top: 8px; overflow: hidden;
}
.bar i, .meter i { display: block; height: 100%; border-radius: 4px; background: var(--lime); }
.bar.blaze i, .meter.hot i { background: var(--ember); }

/* the multiple, as a filled pill */
.mult, .mx { text-align: right; min-width: 64px; }
.mult b, .mx b {
  display: inline-block; font-size: 13px; font-weight: 650; letter-spacing: -.02em;
  padding: 6px 14px; border-radius: 999px;
  background: var(--lime); color: var(--lime-in);
}
.mult.blaze b, .mx.hot b { background: var(--ember); color: var(--ember-in); }
.mult.flat b, .mx.flat b { background: var(--raised); color: var(--mute); }
.mult span, .mx span { display: block; color: var(--faint); font-size: 10.5px; margin-top: 4px; }

.pill, .badge, .kind, .word {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  font-size: 11.5px; font-weight: 500; white-space: nowrap;
  background: var(--raised); color: var(--mute);
}
.p-blaze { background: var(--ember); color: var(--ember-in); font-weight: 650; }
.p-warm  { background: var(--lime); color: var(--lime-in); font-weight: 650; }
.p-flat  { background: var(--raised); color: var(--faint); }
.active { background: rgba(111,220,182,.16); color: var(--cool); }
.suspended { background: rgba(255,107,94,.16); color: #ffa89f; }
.locked { background: rgba(255,138,61,.16); color: var(--ember); }
.free { background: var(--raised); color: var(--faint); }
.pro { background: rgba(143,179,58,.18); color: #cbe97a; }
.agency { background: var(--lime); color: var(--lime-in); font-weight: 600; }
.win { color: var(--cool); }
.fail { color: var(--alert); }

.heat { position: relative; display: inline-block; min-width: 46px; padding: 3px 10px; border-radius: 999px; }
.heat::before { content: ''; position: absolute; inset: 0; border-radius: 999px; background: var(--alert); opacity: calc(var(--w) * .5); }
.heat span { position: relative; font-weight: 700; }

/* --------------------------------------------- panels, rows */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-radius: var(--r-soft); overflow: hidden; gap: 0;
}
.stat { padding: 15px 18px; border-left: 1px solid var(--rule); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font-size: 23px; font-weight: 650; letter-spacing: -.03em; }
.stat span { color: var(--faint); font-size: 11.5px; }

.read, .hook {
  border-radius: var(--r-soft); padding: 16px 20px;
  line-height: 1.75; color: var(--mute);
}
.read { margin: 20px 0 40px; border-left: 2px solid var(--lime); }
.read b, .hook { color: var(--bone); }
.hook { font-size: 15.5px; margin-bottom: 30px; border-left: 2px solid var(--lime); }

.curve { border-radius: var(--r-card); padding: 22px; }
section { margin-bottom: 44px; }

/* video rows — solid, no blur, so long lists stay crisp */
.vid {
  display: grid; grid-template-columns: 150px 1fr auto;
  gap: 16px; align-items: center; padding: 12px;
  border-radius: var(--r-soft); text-decoration: none; color: inherit; position: relative;
}
.vid:hover { background: var(--raised); }
.vid + .vid { margin-top: 2px; }
.vid .thumb, .vid img {
  width: 150px; aspect-ratio: 16/9; object-fit: cover;
  border-radius: 12px; background: var(--raised); display: block;
}
.vid .title, .vid .t {
  font-weight: 500; margin-bottom: 6px; color: inherit; text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.vid:hover .title, .vid .t:hover { color: var(--lime); }
.vid .facts, .vid .f { color: var(--faint); font-size: 12px; }
.vid .f a { color: var(--mute); text-decoration: none; }
.vid .f a:hover { color: var(--lime); }

/* channel cards */
.card { border-radius: var(--r-card); padding: 17px; position: relative; }
.card:hover, .rival:hover { border-color: var(--rule-2); }
.card .top { display: flex; gap: 12px; align-items: center; margin-bottom: 13px; }
.card img, .rival img { width: 42px; height: 42px; border-radius: 50%; flex: none; background: var(--raised); }
.card .nm, .rival .nm {
  font-weight: 600; text-decoration: none; color: inherit; display: block;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card .nm:hover, .rival:hover .nm { color: var(--lime); }
.card .hd, .rival .sm { color: var(--faint); font-size: 11.5px; }
.card .row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; }
.card .row span { color: var(--faint); }
.big { color: var(--lime); font-weight: 700; font-size: 15px; }

.rival { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: var(--r-soft); }
.rival .match { margin-left: auto; text-align: right; flex: none; }
.rival .match b { display: block; color: var(--lime); font-weight: 700; font-size: 15px; letter-spacing: -.02em; }
.rival .match span { color: var(--faint); font-size: 10.5px; }

.grid, .rivals { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 11px; }

.save {
  position: absolute; top: 12px; right: 12px;
  background: transparent; border: 0; cursor: pointer; padding: 3px;
  color: var(--faint); font-size: 17px; line-height: 1; border-radius: 50%;
}
.save:hover, .save.on { color: var(--lime); background: transparent; }

.words { display: flex; flex-wrap: wrap; gap: 7px; }
.word b { color: var(--lime); font-weight: 700; }

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  border-radius: 999px; padding: 11px 22px; z-index: 60;
}
.toast:empty { display: none; }

.hide { display: none; }

@media (max-width: 880px) {
  header { margin: 10px 10px 0; padding: 6px 6px 6px 14px; gap: 8px; flex-wrap: wrap; border-radius: 20px; }
  nav { gap: 0; width: 100%; overflow-x: auto; }
  nav a { padding: 6px 11px; font-size: 12px; }
  main { padding: 18px 12px 70px; }
  .vid { grid-template-columns: 108px 1fr; }
  .vid .thumb, .vid img { width: 108px; }
  .mult, .mx { grid-column: 2; text-align: left; padding-right: 0; }
}
