/* narrow.css — styles for the animated "ways to narrow it" demo (js/narrow.js) */

.nd {
  display: grid;
  grid-template-columns: 208px 1fr;
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  background: #0d0d0d;
  box-shadow: 0 26px 64px rgba(0,0,0,.7);
}

/* ── method list ─────────────────────────────── */
.nd-side {
  background: #131313;
  border-right: 1px solid var(--line-soft);
  padding: 12px 8px;
}
.nd-side-h {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .14em;
  color: var(--text-3);
  padding: 2px 8px 10px;
}
.nd-item {
  display: block; width: 100%; text-align: left;
  background: transparent; border: 0; cursor: pointer;
  font-family: var(--sans); font-size: .82rem; color: var(--text-2);
  padding: 7px 10px; border-radius: 0; line-height: 1.3;
  border-left: 2px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.nd-item:hover { background: rgba(255,255,255,.045); color: var(--text); }
.nd-item.on {
  background: rgba(255,201,0,.11);
  color: var(--gold-pale);
  border-left-color: var(--gold);
  font-weight: 600;
}

/* ── control strip ───────────────────────────── */
.nd-main { display: flex; flex-direction: column; min-width: 0; }
.nd-ctrlwrap {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: #1a1a1a;
  min-height: 52px;
  display: flex; align-items: center;
}
.nd-ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.nd-lab {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em;
  color: var(--text-3);
}
.nd-chip {
  font-family: var(--mono); font-size: .72rem;
  color: var(--gold); border: 1px solid var(--gold-dim);
  background: rgba(255,201,0,.09);
  border-radius: 0; padding: 3px 9px;
  animation: ndPop .28s ease both;
}
.nd-chip.nd-and    { color: #7fd6ff; border-color: #35617d; background: rgba(58,114,224,.14); }
.nd-chip.nd-not    { color: #ff9a9a; border-color: #7d3535; background: rgba(208,42,42,.14); }
.nd-chip.nd-brush  { color: #d7a6ff; border-color: #6a3f88; background: rgba(155,79,208,.14); }
.nd-chip.nd-on     { background: var(--gold); color: #1a1400; border-color: var(--gold); font-weight: 700; }
.nd-colview .nd-chip { color: var(--text-2); border-color: var(--line); background: rgba(255,255,255,.02); }
.nd-colview .nd-chip.nd-on { color: #1a1400; }

@keyframes ndPop { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

.nd-field {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: 0;
  background: #0a0a0a; padding: 3px 10px; min-width: 190px;
}
.nd-typed { font-family: var(--mono); font-size: .76rem; color: var(--gold); }
.nd-caret {
  display: inline-block; width: 1px; height: 13px;
  background: var(--gold); margin-left: 2px;
  animation: ndBlink 1s step-end infinite;
}
@keyframes ndBlink { 50% { opacity: 0; } }

/* ── grid ────────────────────────────────────── */
.nd-grid { padding: 0; }
.nd-row {
  display: grid;
  grid-template-columns: 1.45fr 1.25fr 52px 46px 84px;
  gap: 10px;
  padding: 5px 14px;
  font-size: .8rem;
  color: var(--text-2);
  border-bottom: 1px solid rgba(255,255,255,.03);
  align-items: center;
  transition: opacity .32s ease, filter .32s ease, background .2s, color .2s;
}
.nd-row.nd-head {
  font-family: var(--mono); font-size: .63rem; letter-spacing: .1em;
  color: var(--text-3);
  background: #202020; border-bottom: 1px solid var(--line-soft);
}
.nd-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nd-row .nd-t { color: var(--text); }
.nd-row .nd-bpm, .nd-row .nd-key { font-family: var(--mono); font-size: .74rem; text-align: right; }
.nd-row.nd-head .nd-bpm, .nd-row.nd-head .nd-key { text-align: right; }
.nd-row .nd-key { color: #7fd6ff; }

/* filtered out */
.nd-row.out { opacity: .17; filter: saturate(0); }

/* highlighted match field */
.nd-row .mk {
  color: var(--gold) !important; font-weight: 700;
  background: rgba(255,201,0,.12); border-radius: 0;
}
.nd-row.out .mk { background: transparent; }

/* live-brush demo styling */
.nd-row.br-hi { color: var(--gold-pale); font-weight: 700; background: rgba(255,201,0,.07); }
.nd-row.br-hi .nd-t { color: var(--gold); }
.nd-row.br-strike .nd-t { text-decoration: line-through; opacity: .72; }

/* ── footer ──────────────────────────────────── */
.nd-foot {
  margin-top: auto;
  display: flex; align-items: baseline; gap: 14px;
  padding: 11px 14px;
  border-top: 1px solid var(--line-soft);
  background: #131313;
  flex-wrap: wrap;
}
.nd-count {
  font-family: var(--mono); font-size: .74rem; color: var(--gold);
  font-weight: 700; white-space: nowrap;
}
.nd-count.zero { color: var(--red); }
.nd-blurb { font-size: .8rem; color: var(--text-3); line-height: 1.45; }

.nd-hint {
  font-family: var(--mono); font-size: .68rem; color: var(--text-3);
  margin-top: 10px; text-align: right;
}

@media (max-width: 860px) {
  .nd { grid-template-columns: 1fr; }
  .nd-side {
    border-right: 0; border-bottom: 1px solid var(--line-soft);
    display: flex; gap: 5px; overflow-x: auto; padding: 9px;
  }
  .nd-side-h { display: none; }
  .nd-item {
    width: auto; white-space: nowrap; border-left: 0;
    border-bottom: 2px solid transparent; border-radius: 0; font-size: .76rem;
  }
  .nd-item.on { border-left: 0; border-bottom-color: var(--gold); }
  .nd-row { grid-template-columns: 1.3fr 46px 42px; }
  .nd-row .nd-a, .nd-row .nd-g { display: none; }
}
