/*
Theme Name: Nebraska Underground
Description: Custom theme for nebraskaunderground.org
Version: 3.0
*/

:root {
  --bg: #0d0d0d;
  --bg-raised: #171717;
  --ink: #000;
  --border: #000;
  --text: #f2f2f2;
  --text-dim: #a8a8a8;
  --red: #d00000;
  --red-dim: #7a0000;
  --mono: 'VT323', ui-monospace, monospace;
  --pixel: 'Press Start 2P', var(--mono);
  --body: 'Space Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
}

a { color: var(--red); text-decoration: none; }
a:hover { color: #ff3b3b; text-decoration: underline; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--pixel);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 0.6em;
  line-height: 1.4;
  color: var(--text);
}

.nu-wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ---- retro window chrome ---- */

.win-chrome {
  border: 3px solid var(--ink);
  background: var(--bg-raised);
  margin: 0 auto;
  max-width: 1100px;
  box-shadow: 6px 6px 0 var(--ink);
}
.win-titlebar {
  background: var(--red);
  color: #fff;
  font-family: var(--pixel);
  font-size: 0.65rem;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  border-bottom: 3px solid var(--ink);
}
/* ---- header / nav ---- */

.site-header { position: relative; z-index: 100; }

.site-logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.site-logo-ascii {
  width: 44px;
  height: 44px;
  image-rendering: pixelated;
  flex-shrink: 0;
}
.site-logo {
  font-family: var(--pixel);
  font-size: 0.9rem;
  color: #fff;
  text-decoration: none;
}
.site-logo:hover { color: #fff; }

.account-links {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.95rem;
  text-transform: uppercase;
}
.account-links-sep { color: rgba(255,255,255,0.4); }
.account-links a { color: #fff; }
.account-links a:hover { color: var(--bg); }
.pixel-avatar-sm {
  width: 26px; height: 26px;
  border: 2px solid #fff;
  image-rendering: pixelated;
}
.pixel-avatar { image-rendering: pixelated; border: 2px solid var(--ink); }

.site-nav { background: var(--bg-raised); }
.site-nav ul {
  list-style: none;
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.site-nav li { border-right: 3px solid var(--ink); }
.site-nav li:last-child { border-right: none; }
.site-nav a {
  display: block;
  color: var(--text);
  font-family: var(--mono);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 16px;
}
.site-nav a:hover { background: var(--red); color: #fff; text-decoration: none; }

main { padding: 30px 0 80px; min-height: 60vh; }

/* ---- hero ---- */

.nu-hero {
  position: relative;
  padding: 40px 20px;
  margin: 0 -20px 30px;
  background: var(--bg-raised);
  border-bottom: 3px solid var(--red);
}
.nu-hero .hero-inner { max-width: 900px; }
.nu-hero h1 {
  color: var(--text);
  font-size: clamp(1.3rem, 4.5vw, 2.6rem);
  text-wrap: balance;
  overflow-wrap: break-word;
  margin: 0;
}
.nu-hero h1 .accent { color: var(--red); }
.nu-hero p {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 1.15rem;
  max-width: 560px;
}

/* ---- section headings ---- */

.nu-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border: 3px solid var(--ink);
  background: var(--red);
  padding: 8px 14px;
  margin: 40px 0 0;
}
.nu-section-title h2 { font-size: 0.9rem; color: #fff; margin: 0; }
.nu-section-title a {
  font-family: var(--mono);
  font-size: 1rem;
  color: #fff;
  text-transform: uppercase;
}
.nu-section-title a:hover { color: var(--bg); }

/* ---- filter bar ---- */

.nu-filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 20px 0 0;
  padding: 12px;
  background: var(--bg-raised);
  border: 3px solid var(--ink);
  border-bottom: none;
}
.nu-filter-bar select {
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--ink);
  font-family: var(--mono);
  font-size: 1rem;
  padding: 6px 10px;
  text-transform: uppercase;
}
.nu-filter-clear {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--text-dim);
  text-transform: uppercase;
}
.nu-filter-clear:hover { color: var(--red); }

/* ---- save button ---- */

.nu-save-btn {
  display: inline-block;
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--ink);
  font-family: var(--mono);
  text-transform: uppercase;
  font-size: 0.9rem;
  padding: 6px 12px;
  cursor: pointer;
  margin-bottom: 12px;
}
.nu-save-btn:hover { border-color: var(--red); color: var(--red); }
.nu-save-btn.is-saved { background: var(--red); color: #fff; border-color: var(--ink); }

/* ---- directory grid ---- */

.nu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0;
  border: 3px solid var(--ink);
  border-top: none;
}

.nu-card {
  background: var(--bg-raised);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-right: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  position: relative;
}
.nu-card:hover { background: #1f1f1f; }

.nu-card .thumb {
  aspect-ratio: 1;
  background: #131313;
  border: 3px solid var(--ink);
  overflow: hidden;
  margin-bottom: 4px;
  image-rendering: pixelated;
}
.nu-card .thumb img { width: 100%; height: 100%; object-fit: cover; }

.thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    repeating-linear-gradient(45deg, #1a1a1a, #1a1a1a 10px, #131313 10px, #131313 20px);
}
.thumb-placeholder span {
  font-family: var(--pixel);
  font-size: 2.4rem;
  color: var(--red);
  text-shadow: 3px 3px 0 var(--ink);
}

/* make the whole card clickable, not just the title text */
.nu-card .card-stretch-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.nu-card h3, .nu-card .meta-date, .nu-card .meta-sub, .nu-card .nu-tag { position: relative; z-index: 2; pointer-events: none; }
.nu-card h3 a { pointer-events: none; }

.nu-card .meta-date {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--red);
  text-transform: uppercase;
}

.nu-card h3 { font-size: 1.05rem; margin: 0; color: var(--text); font-family: var(--mono); text-transform: none; letter-spacing: 0; }
.nu-card a.card-link { color: inherit; }
.nu-card a.card-link:hover { color: var(--red); text-decoration: none; }

.nu-card .meta-sub {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--text-dim);
}

.nu-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 1px 7px;
  border: 2px solid var(--ink);
  background: var(--red);
  color: #fff;
  margin-right: 5px;
  margin-top: 4px;
}

/* ---- single post/detail pages ---- */

.nu-single {
  max-width: 720px;
  background: var(--bg-raised);
  border: 3px solid var(--ink);
  padding: 24px;
  margin-top: 20px;
}
.nu-single .meta-date {
  font-family: var(--mono);
  color: var(--red);
  font-size: 1.1rem;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.nu-single h1 { font-size: 1.6rem; margin-bottom: 16px; }
.nu-single .field-row {
  display: flex;
  gap: 10px;
  font-family: var(--mono);
  font-size: 1rem;
  padding: 8px 0;
  border-bottom: 2px dashed #333;
}
.nu-single .field-row .label { color: var(--text-dim); min-width: 110px; text-transform: uppercase; }
.nu-single .content { margin-top: 24px; line-height: 1.7; font-family: var(--body); color: var(--text); }

.nu-ig-embed { margin-bottom: 20px; border: 3px solid var(--ink); background: #fff; padding: 4px; }
.nu-ig-embed blockquote.instagram-media { margin: 0 !important; min-width: 0 !important; width: 100% !important; }

.nu-map-wrap {
  display: block;
  position: relative;
  border: 3px solid var(--ink);
  margin-top: 16px;
  aspect-ratio: 16/9;
  overflow: hidden;
  cursor: pointer;
}
.nu-map-frame { width: 100%; height: 100%; border: 0; filter: grayscale(0.5) invert(0.9) contrast(0.9); }
.nu-map-tap {
  position: absolute;
  bottom: 8px; left: 8px;
  background: var(--red);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.9rem;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 2px solid var(--ink);
}

.nu-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.nu-links a {
  border: 2px solid var(--ink);
  background: var(--red);
  color: #fff;
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 1rem;
  text-transform: uppercase;
  box-shadow: 3px 3px 0 var(--ink);
}
.nu-links a:hover { background: #ff3b3b; text-decoration: none; transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }

/* ---- responsive ---- */

@media (max-width: 900px) {
  .nu-single { max-width: 100%; }
}

@media (max-width: 640px) {
  body { overflow-x: hidden; }
  .nu-wrap { padding: 0 14px; }

  .win-chrome { margin: 0 auto; box-shadow: 4px 4px 0 var(--ink); }
  .win-titlebar { padding: 8px; }
  .site-logo { font-size: 0.6rem; }
  .site-logo-ascii { width: 36px; height: 36px; }
  .account-links { font-size: 0.85rem; gap: 6px; }
  .pixel-avatar-sm { width: 20px; height: 20px; }

  .site-nav a { padding: 8px 10px; font-size: 0.9rem; }

  .nu-hero { padding: 34px 14px 28px; margin: 0 -14px 24px; }
  .nu-hero p { font-size: 1rem; }

  .nu-section-title { flex-direction: column; align-items: flex-start; gap: 4px; }

  .nu-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .nu-card { padding: 10px; }
  .thumb-placeholder span { font-size: 1.8rem; }

  .nu-single { padding: 16px; }
  .nu-single h1 { font-size: 1.3rem; }
  .nu-single .field-row { flex-direction: column; gap: 2px; }
  .nu-single .field-row .label { min-width: 0; }

  .nu-links { flex-direction: column; }
  .nu-links a { text-align: center; }

  /* bbPress: drop the least essential columns instead of squeezing them unreadable */
  .bbp-forum-freshness, .bbp-topic-freshness,
  .bbp-forums .forum-titles li.bbp-forum-freshness,
  .bbp-topics .topic-titles li.bbp-topic-freshness { display: none; }
  .bbp-forum-topic-count, .bbp-forum-reply-count,
  .bbp-topic-voice-count, .bbp-topic-reply-count { flex-basis: 50px; }
  ul.bbp-replies li.bbp-body > div { flex-direction: column; }
  .bbp-reply-author { flex: none; flex-direction: row; text-align: left; display: flex; align-items: center; gap: 8px; }
  .bbp-reply-author img.avatar { margin: 0; }
}

.nu-ig-gallery { margin-bottom: 20px; }
.nu-ig-gallery figure { margin: 0; border: 3px solid var(--ink); background: #000; }
.nu-ig-gallery img { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: contain; }
.nu-ig-gallery figcaption { font-size: .75em; padding: 6px 8px; border-top: 3px solid var(--ink); overflow-wrap: anywhere; }
.nu-ig-gallery.is-strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.nu-ig-gallery.is-strip figure { flex: 0 0 min(80%, 420px); scroll-snap-align: start; display: flex; flex-direction: column; }
.nu-ig-gallery.is-strip figure > a, .nu-ig-gallery.is-strip figure > img { flex: 1; display: flex; align-items: center; }
.nu-ig-gallery.is-strip img { max-height: 520px; }

/* ---- site search ---- */

.site-nav { display: flex; align-items: stretch; justify-content: space-between; flex-wrap: wrap; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nu-search { position: relative; display: flex; align-items: stretch; flex: 0 1 340px; min-width: 220px; border-left: 3px solid var(--ink); }
.nu-search input[type=search] {
  flex: 1; min-width: 0; appearance: none; border: 0; border-radius: 0; outline: 0;
  background: var(--bg); color: var(--text); font-family: var(--mono); font-size: 1.05rem;
  letter-spacing: 0.03em; padding: 8px 34px 8px 12px;
}
.nu-search input::placeholder { color: var(--text-dim); text-transform: uppercase; font-size: 0.95rem; }
.nu-search input::-webkit-search-cancel-button { filter: grayscale(1) invert(1); }
.nu-search input:focus { background: #000; box-shadow: inset 0 0 0 2px var(--red); }
.nu-search button {
  border: 0; border-left: 3px solid var(--ink); border-radius: 0; background: var(--red); color: #fff;
  line-height: 0; padding: 0 12px; cursor: pointer; display: flex; align-items: center;
}
.nu-search button:hover { background: #ff1f1f; }
.nu-search-key {
  position: absolute; right: 56px; top: 50%; transform: translateY(-50%); pointer-events: none;
  font-family: var(--mono); font-size: 0.85rem; color: var(--text-dim); border: 1px solid #444; padding: 0 5px; line-height: 1.3;
}
.nu-search input:focus ~ .nu-search-key, .nu-search input:not(:placeholder-shown) ~ .nu-search-key { display: none; }

.nu-search-pop {
  position: absolute; z-index: 1000; top: calc(100% + 3px); right: -3px; width: min(460px, 94vw);
  max-height: min(70vh, 560px); overflow-y: auto; background: var(--bg-raised);
  border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink);
}
.nu-search-pop a { text-transform: none; letter-spacing: 0; font-size: inherit; }
.nu-search-pop .nu-sp-item, .nu-sr {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center;
  padding: 8px 10px; color: var(--text); border-bottom: 2px solid #000;
}
.nu-search-pop .nu-sp-item:hover, .nu-search-pop .nu-sp-item.is-active, .nu-search-pop .nu-sp-all.is-active { background: #262626; text-decoration: none; color: var(--text); }
.nu-sp-item.is-active { box-shadow: inset 4px 0 0 var(--red); }
.nu-sp-body, .nu-sr-body { display: flex; flex-direction: column; min-width: 0; }
.nu-sp-title, .nu-sr-title { font-family: var(--mono); font-size: 1.15rem; line-height: 1.15; overflow-wrap: anywhere; }
.nu-sp-sub, .nu-sr-sub { font-family: var(--mono); font-size: 0.9rem; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nu-sp-empty { padding: 14px; font-family: var(--mono); color: var(--text-dim); }
.nu-search-pop .nu-sp-all { display: block; text-transform: uppercase; padding: 10px 12px; font-family: var(--mono); text-transform: uppercase; background: #000; color: var(--red); position: sticky; bottom: 0; }
.nu-search-pop .nu-sp-all:hover { background: var(--red); color: #fff; text-decoration: none; }
.nu-search mark, .nu-sr mark, .nu-sr-genre mark { background: var(--red); color: #fff; padding: 0 1px; }
.is-past { opacity: 0.55; }

.nu-sr-thumb {
  width: 44px; height: 44px; border: 2px solid #000; background: #000; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.nu-sr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.nu-sr-thumb.is-empty { font-family: var(--pixel); font-size: 0.9rem; color: var(--red); background: repeating-linear-gradient(45deg, #1b1b1b 0 6px, #141414 6px 12px); }

.nu-type {
  font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 1px 6px; border: 2px solid #000; background: #2a2a2a; color: #ddd; white-space: nowrap;
}
.nu-type-nu_event { background: var(--red); color: #fff; }
.nu-type-nu_artist { background: #f2f2f2; color: #000; }
.nu-type-nu_venue { background: #3a3a3a; color: #fff; }
.nu-type-genre { background: #000; color: var(--red); border-color: var(--red); }

/* results page */
.nu-search-hero .nu-search.is-page { max-width: 720px; margin-top: 18px; border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); flex: none; }
.nu-search.is-page input[type=search] { font-size: 1.35rem; padding: 12px 40px 12px 14px; }
.nu-search.is-page .nu-search-key { display: none; }
.nu-search-count { margin: 14px 0 0; }
.nu-search-count strong { color: var(--text); }
.nu-search-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.nu-search-chips a {
  font-family: var(--mono); font-size: 1rem; text-transform: uppercase; padding: 4px 10px;
  border: 3px solid var(--ink); background: var(--bg-raised); color: var(--text);
}
.nu-search-chips a span { color: var(--text-dim); margin-left: 4px; }
.nu-search-chips a:hover, .nu-search-chips a.is-on { background: var(--red); color: #fff; text-decoration: none; }
.nu-search-chips a.is-on span, .nu-search-chips a:hover span { color: #fff; }
.nu-sr-group { margin-bottom: 10px; }
.nu-sr-list { border: 3px solid var(--ink); border-top: 0; background: var(--bg-raised); }
.nu-sr { grid-template-columns: 64px 1fr auto; padding: 10px 14px; }
.nu-sr:last-child { border-bottom: 0; }
.nu-sr:hover { background: #222; text-decoration: none; color: var(--text); box-shadow: inset 5px 0 0 var(--red); }
.nu-sr .nu-sr-thumb { width: 64px; height: 64px; }
.nu-sr-title { font-size: 1.35rem; }
.nu-sr-sub { font-size: 1rem; white-space: normal; }
.nu-sr-tags { margin-top: 4px; }
.nu-sr-tags .nu-tag { margin-bottom: 3px; }
.nu-sr-genres { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); border: 3px solid var(--ink); border-top: 0; background: var(--ink); gap: 3px; }
.nu-sr-none .nu-sr-genres { margin-top: 12px; border-top: 3px solid var(--ink); }
.nu-sr-genre { display: flex; flex-direction: column; padding: 10px 12px; background: var(--bg-raised); color: var(--text); }
.nu-sr-genre strong { font-family: var(--mono); font-size: 1.2rem; font-weight: 400; text-transform: uppercase; }
.nu-sr-genre span { font-family: var(--mono); font-size: 0.85rem; color: var(--text-dim); }
.nu-sr-genre:hover { background: var(--red); text-decoration: none; color: #fff; }
.nu-sr-genre:hover span { color: #fff; }

.nu-tags { margin-bottom: 6px; }
a.nu-tag { margin-bottom: 4px; }
a.nu-tag:hover { background: #fff; color: #000; text-decoration: none; }

@media (max-width: 640px) {
  .nu-search { flex: 1 1 100%; border-left: 0; border-top: 3px solid var(--ink); }
  .nu-search-key { display: none; }
  .nu-search-pop { left: -3px; right: -3px; width: auto; }
  .nu-sr { grid-template-columns: 48px 1fr; }
  .nu-sr .nu-sr-thumb { width: 48px; height: 48px; }
  .nu-sr .nu-type { display: none; }
  .nu-sr-title { font-size: 1.15rem; }
}

/* ---- merged from live: upcoming/past split, today highlight, photo credit ---- */
.nu-now-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 28px 0;
  padding: 10px 0;
  border-top: 3px solid var(--red);
  border-bottom: 3px solid var(--red);
  background: var(--bg-raised);
}
.nu-now-divider span {
  font-family: var(--pixel);
  font-size: 0.85rem;
  letter-spacing: 3px;
  color: var(--red);
}

.nu-card-today {
  background: var(--red-dim);
}
.nu-card-today:hover { background: var(--red); }
.nu-card-today .meta-date { color: #fff; }

.nu-grid-past { opacity: 0.75; }
.nu-grid-past .nu-card:hover { opacity: 1; }


.nu-photo-credit {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  text-align: right;
  margin-top: -14px;
  margin-bottom: 20px;
}
.nu-photo-credit::before { content: '\00a9\ '; }


/* ---- audit fixes: a11y, forms, consistency ---- */
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 2000; background: var(--red); color: #fff; padding: 8px 14px; font-family: var(--mono); text-transform: uppercase; border: 3px solid var(--ink); }
.skip-link:focus { top: 8px; }
main:focus { outline: none; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, .nu-card:focus-within {
  outline: 3px solid #fff; outline-offset: 2px;
}
.nu-card .card-stretch-link:focus-visible { outline: none; }
.site-nav a.is-current { background: var(--red); color: #fff; }
.nu-hero.nu-hero-compact { padding-top: 20px; }
.nu-single .thumb.nu-single-thumb { aspect-ratio: 16 / 9; margin-bottom: 20px; }
.nu-map-frame { pointer-events: none; }
.nu-single h2 { font-size: 0.9rem; margin: 28px 0 6px; }
.nu-ig-gallery img { height: auto; }
.nu-save-btn.is-error { background: #444; }

/* submission form — match the site instead of browser defaults */
.nu-submit-form { max-width: 520px; }
.nu-submit-form label { display: block; font-family: var(--mono); font-size: 1.05rem; text-transform: uppercase; color: var(--text-dim); letter-spacing: 0.03em; }
.nu-submit-form input[type=text], .nu-submit-form input[type=url], .nu-submit-form input[type=date] {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border: 3px solid var(--ink); border-radius: 0;
  background: var(--bg); color: var(--text); font-family: var(--mono); font-size: 1.1rem; color-scheme: dark;
}
.nu-submit-form input:focus { border-color: var(--red); outline: none; }
.nu-submit-form button[type=submit] {
  margin-top: 6px; padding: 10px 18px; border: 3px solid var(--ink); border-radius: 0; background: var(--red); color: #fff;
  font-family: var(--mono); font-size: 1.1rem; text-transform: uppercase; cursor: pointer; box-shadow: 4px 4px 0 var(--ink);
}
.nu-submit-form button[type=submit]:hover { background: #ff1f1f; }
.nu-submit-msg { font-family: var(--mono); padding: 10px 12px; border: 3px solid var(--ink); background: var(--red-dim); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* ---- browser-only saves ---- */
.nu-save-btn .nu-save-icon { color: var(--red); }
.nu-save-btn.is-saved .nu-save-icon { color: #ffd23f; }
.nu-toast {
  position: fixed; z-index: 3000; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  width: min(520px, calc(100vw - 24px)); padding: 14px 40px 14px 16px; background: var(--bg-raised); color: var(--text);
  border: 3px solid var(--red); box-shadow: 6px 6px 0 var(--ink); font-family: var(--mono); font-size: 1.05rem; line-height: 1.35;
}
.nu-toast strong { color: #fff; }
.nu-toast-close { position: absolute; top: 6px; right: 8px; background: none; border: 0; color: var(--text-dim); font-size: 1.4rem; cursor: pointer; }
.nu-saved-note { font-family: var(--mono); color: var(--text-dim); border-left: 4px solid var(--red); padding: 6px 10px; margin: 0 0 16px; }

/* ---- dynamic stacking grid: cards pack by height; photo-less cards become compact type cards ---- */
.nu-grid.is-masonry { grid-auto-rows: 1px; grid-auto-flow: row; column-gap: 3px; row-gap: 0; background: var(--ink); align-items: start; }
.nu-grid.is-masonry > .nu-card { border: 0; height: auto; }
.nu-card.no-thumb {
  justify-content: flex-start; min-height: 0; padding: 12px 14px 14px;
  background:
    linear-gradient(180deg, rgba(208,0,0,.14), transparent 55%),
    repeating-linear-gradient(135deg, #191919 0 10px, #151515 10px 20px);
  box-shadow: inset 5px 0 0 var(--red);
}
.nu-card.no-thumb:hover { background: linear-gradient(180deg, rgba(208,0,0,.28), transparent 60%), #1c1c1c; }
.nu-card.no-thumb h3 { font-size: 1.3rem; line-height: 1.15; overflow-wrap: anywhere; }
.nu-card.no-thumb .meta-date { font-size: 1.05rem; }
.nu-card.nu-card-today.no-thumb { box-shadow: inset 5px 0 0 #fff; background: var(--red-dim); }
.nu-sr.no-thumb { grid-template-columns: 1fr auto; }
.nu-search-pop .nu-sp-item.no-thumb { grid-template-columns: 1fr auto; }
@media (max-width: 640px) {
  .nu-card.no-thumb h3 { font-size: 1.1rem; }
  .nu-sr.no-thumb { grid-template-columns: 1fr; }
}

/* ---- labelled link buttons with pixel icons ---- */
.nu-link-btn { display: inline-flex; align-items: center; gap: 8px; }
.nu-link-btn .nu-icon { width: 16px; height: 16px; flex: none; image-rendering: pixelated; }
@media (max-width: 640px) { .nu-link-btn { justify-content: center; } }

.nu-card > div:has(> .nu-tag) { display: flex; flex-wrap: wrap; gap: 4px; }
.nu-card > div > .nu-tag { margin: 0; }
.nu-card h3, .nu-card .meta-sub, .nu-card .meta-date { margin: 0; }
.home .nu-wrap > .nu-section-title:first-of-type { margin-top: 0; }

/* ================= black & white + genre colour coding ================= */
:root { --red: #f2f2f2; --red-dim: #2b2b2b; }
a:hover { color: #fff; }
.win-titlebar, .win-titlebar a, .site-logo, .account-links, .account-links a, .account-links-sep { color: #000; }
.site-logo-ascii { filter: invert(1); }
.nu-section-title h2, .nu-section-title a, .nu-links a, .nu-map-tap, .site-nav a:hover, .site-nav a.is-current,
.nu-save-btn.is-saved, .nu-search button, .nu-search-pop .nu-sp-all:hover, .nu-search mark, .nu-sr mark, .nu-sr-genre mark,
.nu-type-nu_event, .nu-search-chips a:hover, .nu-search-chips a.is-on, .nu-search-chips a.is-on span, .nu-search-chips a:hover span,
.skip-link, .nu-submit-form button[type=submit], .nu-card-today:hover, .nu-card-today:hover .meta-date { color: #000; }
.nu-section-title a:hover { color: #555; }
.nu-links a:hover, .nu-search button:hover, .nu-submit-form button[type=submit]:hover { background: #fff; }
.nu-type-genre { color: #fff; border-color: #fff; }
.nu-card .meta-date, .nu-card.no-thumb .meta-date { color: var(--text-dim); }
.nu-card-today .meta-date { color: #fff; }
.nu-save-btn .nu-save-icon { color: #fff; }
.nu-save-btn.is-saved .nu-save-icon { color: #000; }
.nu-toast { border-color: #fff; }

/* genre colour: --g is set per card / tag */
.nu-tag { background: var(--g, #e6e6e6); color: #000; border: 2px solid #000; }
a.nu-tag:hover { background: #fff; color: #000; }
.nu-card { box-shadow: inset 5px 0 0 var(--g, #8a8a8a); }
.nu-card .thumb { margin-left: 2px; }
.nu-kind { display: flex; align-items: center; gap: 6px; min-width: 0; font-family: var(--mono); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); line-height: 1.2; }
.nu-kind-genre { color: var(--g, var(--text-dim)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nu-swatch { width: 10px; height: 10px; flex: none; background: var(--g, #8a8a8a); border: 1px solid #000; }
.nu-card.no-thumb {
  background: linear-gradient(180deg, color-mix(in srgb, var(--g, #888) 14%, transparent), transparent 60%), repeating-linear-gradient(135deg, #191919 0 10px, #151515 10px 20px);
  box-shadow: inset 5px 0 0 var(--g, #8a8a8a);
}
.nu-card.no-thumb:hover { background: linear-gradient(180deg, color-mix(in srgb, var(--g, #888) 26%, transparent), transparent 65%), #1c1c1c; }
.nu-card.nu-card-today, .nu-card.nu-card-today.no-thumb { background: #262626; box-shadow: inset 5px 0 0 var(--g, #fff), inset 0 0 0 2px #fff; }
.nu-card.nu-card-today:hover { background: #333; }
.nu-card.nu-card-today:hover .meta-date { color: #fff; }
.nu-sr-genre { box-shadow: inset 5px 0 0 var(--g, #888); }
.nu-sr-genre:hover { background: var(--g, #fff); color: #000; }
.nu-sr-genre:hover span { color: #000; }
.nu-now-divider { border-color: #fff; }
.nu-now-divider span { color: #fff; }
.nu-hero { border-bottom-color: #fff; }
.nu-hero h1 .accent { color: #fff; }
.nu-search input:focus { box-shadow: inset 0 0 0 2px #fff; }
@media (max-width: 640px) { .nu-kind { font-size: .72rem; } }

.nu-kind-type { flex: none; white-space: nowrap; }
.nu-kind-genre { flex: 1 1 auto; min-width: 0; }

/* ---- filters: compact, labelled, never wider than the screen ---- */
.nu-filter-bar { gap: 10px 14px; align-items: flex-end; }
.nu-f { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 0 1 190px; }
.nu-f > span { font-family: var(--mono); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
.nu-f select { width: 100%; max-width: 100%; text-overflow: ellipsis; }
.nu-filter-clear { align-self: center; }
@media (max-width: 640px) { .nu-f { flex: 1 1 calc(50% - 8px); } }

/* ---- today: holographic moving border + gold TODAY pill (static when reduced motion is on) ---- */
.nu-card.nu-card-today, .nu-card.nu-card-today.no-thumb {
  border: 3px solid transparent;
  background: linear-gradient(#1b1b1b, #1b1b1b) padding-box,
              linear-gradient(90deg, #ff4fd8, #8b5cff, #36c8ff, #3dffa8, #ffd23f, #ff4fd8) border-box;
  background-size: 100% 100%, 300% 100%;
  box-shadow: 0 0 18px rgba(139, 92, 255, .35);
  animation: nu-holo 8s linear infinite;
}
.nu-card.nu-card-today:hover { background: linear-gradient(#232323, #232323) padding-box, linear-gradient(90deg, #ff4fd8, #8b5cff, #36c8ff, #3dffa8, #ffd23f, #ff4fd8) border-box; background-size: 100% 100%, 300% 100%; }
@keyframes nu-holo { to { background-position: 0 0, 300% 0; } }
.nu-card-today .meta-date, .nu-card.nu-card-today:hover .meta-date { color: #fff; }
.nu-today-pill { display: inline-block; background: #ffd23f; color: #000; font-weight: 700; padding: 0 6px; margin-right: 6px; letter-spacing: .06em; }
@media (prefers-reduced-motion: reduce) { .nu-card.nu-card-today { animation: none; } }

/* ---- missing info + suggest ---- */
.nu-missing { color: var(--text-dim); font-style: italic; }
.nu-suggest { margin-left: 10px; font-family: var(--mono); font-size: .85rem; text-transform: uppercase; color: #fff; border-bottom: 1px dashed #fff; }
.nu-suggest:hover { text-decoration: none; border-bottom-style: solid; }
.site-footer { max-width: 1100px; margin: 0 auto 40px; padding: 18px 20px; border-top: 3px solid #fff; font-family: var(--mono); color: var(--text-dim); display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; }
.site-footer a { display: inline-flex; align-items: center; gap: 6px; color: #fff; }

/* ---- tiles spaced apart, each with its own frame ---- */
.nu-grid, .nu-grid.is-masonry { gap: 14px; column-gap: 14px; row-gap: 14px; border: 0; background: none; }
.nu-grid.is-masonry { row-gap: 0; }
.nu-grid > .nu-card, .nu-grid.is-masonry > .nu-card { border: 3px solid #000; box-shadow: inset 5px 0 0 var(--g, #8a8a8a), 4px 4px 0 #000; }
.nu-filter-bar { border: 3px solid var(--ink); margin: 0 0 16px; }
.nu-sr-list, .nu-sr-genres { border-top: 3px solid var(--ink); }

/* ---- today: the card's genre colour wraps the whole border ---- */
.nu-card.nu-card-today, .nu-card.nu-card-today.no-thumb, .nu-card.nu-card-today:hover {
  animation: none; background: #1d1d1d; border: 3px solid var(--g, #fff);
  box-shadow: 0 0 0 1px #000, 4px 4px 0 #000;
}
.nu-today-pill { background: var(--g, #fff); color: #000; }

/* ---- section banners: full width, no orphans; "view all" lives under the grid ---- */
.nu-section-title { display: block; margin: 44px 0 16px; padding: 10px 14px; }
.nu-section-title h2 { text-wrap: balance; line-height: 1.35; }
h1, h2, h3, .nu-card h3 { text-wrap: balance; }
.nu-view-all { display: flex; justify-content: flex-end; margin-top: 16px; }
.nu-view-all .nu-link-btn { padding: 8px 14px; }

/* ---- header buttons match the footer ones (pixel icons) ---- */
.account-links { display: flex; gap: 8px; align-items: center; }
.nu-head-btn { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 2px solid #000; background: #fff; color: #000 !important; font-family: var(--mono); text-transform: uppercase; font-size: .85rem; line-height: 1; }
.nu-head-btn:hover { background: #000; color: #fff !important; text-decoration: none; }
.nu-head-btn .nu-icon { width: 14px; height: 14px; }

/* ---- save button pixel star ---- */
.nu-save-icon { display: inline-flex; }
.nu-save-icon .nu-icon { width: 14px; height: 14px; }
.nu-save-icon .nu-icon + .nu-icon, .nu-save-btn.is-saved .nu-save-icon .nu-icon:first-child { display: none; }
.nu-save-btn.is-saved .nu-save-icon .nu-icon + .nu-icon { display: inline-block; }
.nu-save-btn { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 640px) {
  .nu-grid, .nu-grid.is-masonry { column-gap: 10px; }
  .nu-head-btn span:not([data-nu-saved-count]) { font-size: .75rem; }
}

/* ---- dark top bar: logo + icon buttons on one row; nav row below fills the width ---- */
.win-titlebar { background: #1a1a1a; color: #fff; display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 3px solid #000; }
.win-titlebar .site-logo, .win-titlebar a.site-logo-wrap { color: #fff; }
.site-logo-wrap { min-width: 0; display: flex; align-items: center; gap: 10px; }
.site-logo { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-logo-ascii { filter: none; }
.account-links { flex: none; }
.nu-head-btn { background: transparent; color: #fff !important; border: 2px solid #fff; padding: 6px; position: relative; min-width: 34px; min-height: 34px; justify-content: center; }
.nu-head-btn:hover, .nu-head-btn:focus-visible { background: #fff; color: #000 !important; }
.nu-head-btn .nu-icon { width: 16px; height: 16px; }
.nu-head-count:empty { display: none; }
.nu-head-count { position: absolute; top: -8px; right: -8px; min-width: 18px; height: 18px; padding: 0 4px; background: #fff; color: #000; border: 2px solid #000; font-size: .7rem; line-height: 14px; text-align: center; }
.site-nav ul { flex: 1 1 auto; }
.site-nav li { flex: 1 1 auto; }
.site-nav li a, .site-nav .nav-disabled { text-align: center; }
.nav-disabled { display: block; padding: 10px 16px; font-family: var(--mono); font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; color: #767676; cursor: not-allowed; }
.nav-disabled small { font-size: .7em; }
@media (max-width: 640px) {
  .site-nav ul { flex: 1 1 100%; }
  .site-nav a, .nav-disabled { padding: 9px 6px; font-size: .85rem; }
}
@media (max-width: 340px) { .win-titlebar { flex-wrap: wrap; } }
