/* ==========================================================================
   PeterSteele.org — editorial magazine redesign (NME-style)
   Loaded AFTER tailwind.css and main.css, so equal-specificity rules win.
   Content-only file: restyles the existing .ns-* markup. No HTML content
   changes were made for this design.
   Remove the <link> to css/nme.css in index.html to revert completely.
   ========================================================================== */

:root {
  --nme-page: #ffffff;
  --nme-ink: #111111;
  --nme-muted: #6a6a6a;      /* 5.3:1 on white — AA for small text */
  --nme-hair: #e4e4e4;
  --nme-shell: 1200px;
}

/* ---------- Page frame: dark backdrop, centred white column ---------- */
.ns-page {
  background: var(--nme-page);
  padding: 0;
}
.ns-shell {
  max-width: var(--nme-shell);
  margin: 0 auto;
  background: #ffffff;
  overflow: hidden;
}
.ns-inner { padding: 0; }

/* ---------- Header ---------- */
.ns-head {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.1rem 2rem;
  background: #fff;
  border-bottom: 1px solid var(--nme-hair);
}
.ns-logo {
  font-family: 'Kanit', system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--nme-ink);
  text-decoration: none;
  flex-shrink: 0;
}
/* 90 subpages wrap the wordmark in a flex link with a microphone icon beside
   it; the homepage has the bare wordmark. Hide the icon so every page shows
   the same masthead, and let the wrapping link inherit the logo treatment. */
.ns-head > a.flex {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.ns-head > a.flex > span:not(.ns-logo) { display: none; }
.ns-head > a.flex > .ns-logo { display: inline-block; }

.ns-nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  /* main.css:407 sets `flex: 1`, so the nav already fills the row and
     margin:auto can't move it. Centre the links inside it instead. */
  flex: 1 1 auto;
  justify-content: center;
  margin-left: 0;
  margin-right: 0;
  flex-wrap: nowrap;
  min-width: 0;
}
.ns-nav a {
  font-family: 'Kanit', system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--nme-ink);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color .15s ease;
}
.ns-nav a:hover,
.ns-nav a:focus-visible { border-bottom-color: var(--nme-ink); }

.ns-head-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}
.ns-iconbtn {
  color: var(--nme-ink);
  background: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;              /* 44px touch target */
  height: 44px;
  border-radius: 0;
}
.ns-iconbtn:hover { color: #000; }
.ns-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1.6rem;
  background: var(--nme-ink);
  color: #fff;
  font-family: 'Kanit', system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 0;
  transition: background .15s ease;
}
.ns-cta:hover { background: #333; }

/* ---------- Hero ---------- */
/* Text-only masthead: the hero image and its veil were removed, so this is
   now a typographic block on white rather than an overlay on a photograph. */
.ns-hero {
  position: static;
  width: 100%;
  aspect-ratio: auto;
  max-height: none;
  overflow: visible;
  background: transparent;
  border-bottom: 1px solid var(--nme-hair);
}
.ns-hero-copy {
  position: static;
  padding: 3.25rem 2rem 2.75rem;
  max-width: 46rem;
}
.ns-kicker {
  display: block;
  font-family: 'Kanit', system-ui, sans-serif;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--nme-muted);
  margin-bottom: .7rem;
}
.ns-hero h1 {
  font-family: 'Kanit', system-ui, sans-serif;
  font-weight: 500;
  /* Scaled down from 4.5rem: the H1 now carries the full topical phrase
     rather than two words, so it needs room to breathe at column width. */
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 22ch;
  text-transform: uppercase;
  color: var(--nme-ink);
  margin: 0;
}

/* ---------- Shared section chrome ---------- */
.ns-sec,
.ns-faq { padding: 0 2rem; margin: 0 0 3.5rem; }

.ns-sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .9rem;
  margin-bottom: .25rem;
}
.ns-sec-head h2,
.ns-faq .ns-sec-head h2 {
  font-family: 'Kanit', system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.3rem, 2.6vw, 1.85rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--nme-ink);
  margin: 0;
}
.ns-more {
  font-family: 'Kanit', system-ui, sans-serif;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nme-ink);
  text-decoration: none;
  white-space: nowrap;
  padding: .5rem 0;
}
.ns-more:hover { text-decoration: underline; }

/* ---------- Card row under the hero ---------- */
.ns-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  padding: 2rem;
}
.ns-card { text-decoration: none; display: block; }
.ns-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  background: #eee;
}
.ns-card:hover img { opacity: .9; }
.ns-meta {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  margin: .8rem 0 .45rem;
}
.ns-meta span {
  font-family: 'Kanit', system-ui, sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nme-muted);
}
.ns-card h2,
.ns-card h3 {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  color: var(--nme-ink);
  margin: 0;
}
.ns-card:hover h2,
.ns-card:hover h3 { text-decoration: underline; }
.ns-card-desc {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--nme-muted);
  margin: .5rem 0 0;
}

/* ---------- Editorial statement band ---------- */
/* Two-up editorial block: heading left, copy and link right, boxed. */
.ns-statement {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  column-gap: 3rem;
  row-gap: 1.25rem;
  align-items: start;
  padding: 2.75rem;
  margin: 0 2rem 3.5rem;
  /* --nme-hair (#e4e4e4) is ~1.2:1 on white — fine for row rules, invisible
     as a box outline. This one needs to actually read as a border. */
  border: 1px solid #b0b0b0;
  text-align: left;
}
.ns-statement h2 {
  grid-column: 1;
  grid-row: 1 / span 2;
}
.ns-statement p  { grid-column: 2; grid-row: 1; }
.ns-statement .ns-inline-link {
  grid-column: 2;
  grid-row: 2;
  justify-self: start;
}
.ns-statement h2 {
  font-family: 'Kanit', system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  color: var(--nme-ink);
  margin: 0 0 1rem;
}
.ns-statement p {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: #3d3d3d;
  max-width: none;
  margin: 0;
}
.ns-inline-link {
  font-family: 'Kanit', system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nme-ink);
  text-decoration: none;
  border-bottom: 2px solid var(--nme-ink);
  padding-bottom: .2rem;
}
.ns-inline-link:hover { color: #000; }

/* ---------- List rows: label | copy | thumbnail ---------- */
.ns-row {
  display: grid;
  grid-template-columns: 8.5rem 1fr 11rem;
  gap: 1.5rem;
  align-items: start;
  padding: 1.4rem 0;
  border-top: 1px solid var(--nme-hair);
  text-decoration: none;
}
.ns-row:first-of-type { border-top: 1px solid var(--nme-hair); }
.ns-rowlabel {
  font-family: 'Kanit', system-ui, sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nme-muted);
  padding-top: .15rem;
}
.ns-row h3 {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.32;
  color: var(--nme-ink);
  margin: 0 0 .4rem;
  text-transform: none;
  letter-spacing: 0;
}
.ns-row:hover h3 { text-decoration: underline; }
.ns-row p {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--nme-muted);
  margin: 0;
}
.ns-row img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  background: #eee;
}
.ns-row:hover img { opacity: .9; }

/* ---------- FAQ reuses the row rhythm ---------- */
.ns-faq .ns-faq-row {
  display: grid;
  grid-template-columns: 1fr 11rem;
  gap: 1.5rem;
  align-items: start;
  padding: 1.4rem 0;
  border-top: 1px solid var(--nme-hair);
}
.ns-faq h3 {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.32;
  color: var(--nme-ink);
  margin: 0 0 .4rem;
}
.ns-faq p {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--nme-muted);
  margin: 0;
}
.ns-faq a { color: var(--nme-ink); text-decoration: underline; }
.ns-faq .ns-faq-row img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  background: #eee;
}

/* ---------- "Latest Updates" grid ---------- */
[aria-labelledby="latest-pages-heading"] {
  padding: 0 2rem 3.5rem;
  background: #fff;
}
[aria-labelledby="latest-pages-heading"] > div { max-width: none; }
[aria-labelledby="latest-pages-heading"] .text-center { text-align: left; margin-bottom: 1.5rem; }
[aria-labelledby="latest-pages-heading"] h2 {
  font-family: 'Kanit', system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.3rem, 2.6vw, 1.85rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--nme-ink);
}
[aria-labelledby="latest-pages-heading"] .text-center p {
  font-family: 'Kanit', system-ui, sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nme-muted);
  margin-top: .35rem;
}
[aria-labelledby="latest-pages-heading"] .grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem 1.75rem;
  border-top: 1px solid var(--nme-hair);
  padding-top: 1.75rem;
}
[aria-labelledby="latest-pages-heading"] .text-center:last-child { text-align: center; }

/* ---------- Footer: dark slab ---------- */
.ns-footer {
  background: #111111;
  padding: 4rem 2rem 2.5rem;
  border-top: 0;
}
.ns-footer h4 {
  color: #ffffff;
  font-family: 'Kanit', system-ui, sans-serif;
  letter-spacing: 0.14em;
}
.ns-footer a {
  color: #9a9a9a;                 /* 6.1:1 on #111 */
  font-family: 'Kanit', system-ui, sans-serif;
  transition: color .15s ease;
}
.ns-footer a:hover { color: #ffffff; }
.ns-footer .border-t { border-top-color: #2c2c2c; }
.ns-footer p { color: #8d8d8d; }

/* ---------- Overrides for higher-specificity rules in main.css ----------
   main.css loads first but some of its selectors outrank the ones above,
   so they are restated here at matching or greater specificity. --------- */

/* main.css: .ns-row .ns-rowlabel — Open Sans 700 / .16em */
.ns-row .ns-rowlabel {
  font-family: 'Kanit', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--nme-muted);
}
/* main.css: .ns-row draws a bottom rule; this design rules the top instead */
.ns-sec .ns-row,
.ns-faq .ns-row { border-bottom: 0; }

/* main.css: .ns-latest-card is a tinted box with inner padding — NME cards
   are plain white and flush, matching the other card grids on the page. */
.ns-latest-card { background: transparent; padding: 0; }
.ns-latest-card .ns-meta { margin-top: .8rem; padding: 0; border-top: 0; }
.ns-latest-card h3 { padding: 0; }
.ns-latest-card .ns-card-desc { padding: 0; }

/* main.css desaturates every editorial image (lines 497 / 593 / 701 / 732).
   The reference design is built on full-colour photography, so the filter is
   lifted everywhere inside the shell. */
.ns-card img,
.ns-card:hover img,
.ns-row img,
.ns-row:hover img,
.ns-faq img,
.ns-faq .ns-faq-row img,
.ns-shell img { filter: none; }

/* main.css: .ns-thumb ships greyscale; the reference runs full colour */
.ns-latest-card .ns-thumb {
  filter: none;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
  display: block;
}
.ns-latest-card:hover .ns-thumb { filter: none; opacity: .9; }

/* ---------- Sidebar TAGS block ----------
   Markup is <div class="space-y-4"><span>TAGS</span><div class="flex…">pills</div></div>.
   :has() scopes this to the tags block only, so no other .space-y-4 is hit. */
div.space-y-4:has(> div.flex.flex-wrap.gap-2) {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: .7rem;
  text-align: left;
}
/* kill the 1rem margin-top space-y-4 injects between its children */
div.space-y-4:has(> div.flex.flex-wrap.gap-2) > :not([hidden]) ~ :not([hidden]) {
  margin-top: 0;
}
div.space-y-4:has(> div.flex.flex-wrap.gap-2) > span.block {
  display: inline-block;
  margin: 0;
  flex-shrink: 0;
  color: var(--nme-muted);
}
div.space-y-4:has(> div.flex.flex-wrap.gap-2) > div.flex {
  justify-content: flex-start;
  gap: .4rem;
  margin: 0;
}
/* editorial pill treatment */
div.space-y-4:has(> div.flex.flex-wrap.gap-2) > div.flex > span {
  background: transparent;
  border: 1px solid var(--nme-hair);
  padding: .25rem .6rem;
  font-family: 'Kanit', system-ui, sans-serif;
  letter-spacing: .06em;
  color: var(--nme-ink);
}

/* ---------- Subpage hero (the .prism-overlay banner) ----------
   Markup carries Tailwind's min-h-[921px] and pb-24. :has() outranks both
   without editing 12 files. The H1 was removed from this block, so it is now
   a pure image banner. */
section:has(> div > .prism-overlay) {
  min-height: 370px;
  height: 370px;
  padding-top: 0;
  padding-bottom: 0;
  align-items: flex-end;
}
section:has(> div > .prism-overlay) > .relative {
  padding-bottom: 1.75rem;
}
section:has(> div > .prism-overlay) img {
  height: 100%;
  object-fit: cover;
}

/* ---------- "All Topics in This Section" hub list ----------
   Generated as uppercase pills, which breaks down with 40+ character titles.
   Re-cast as a two-column ruled index: sentence case, hairline rows. */
section[aria-label="All topics in this section"] {
  background: #fff;
  padding: 0 2rem 3.5rem;
}
section[aria-label="All topics in this section"] > div { max-width: none; }
section[aria-label="All topics in this section"] h3 {
  font-family: 'Kanit', system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.3rem, 2.6vw, 1.85rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--nme-ink);
  margin: 0 0 .25rem;
}
section[aria-label="All topics in this section"] > div > .flex {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 2.5rem;
  gap: 0;
  border-top: 1px solid #b0b0b0;
  margin-top: .9rem;
}
section[aria-label="All topics in this section"] a {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  padding: .85rem .25rem;
  background: transparent;
  border-bottom: 1px solid var(--nme-hair);
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;          /* generated markup forces uppercase */
  color: var(--nme-ink);
  text-decoration: none;
}
section[aria-label="All topics in this section"] a::before {
  content: "→";
  color: var(--nme-muted);
  flex-shrink: 0;
  font-size: .85em;
}
section[aria-label="All topics in this section"] a:hover {
  background: #fafafa;
  text-decoration: underline;
}

@media (max-width: 700px) {
  section[aria-label="All topics in this section"] { padding: 0 1.25rem 2.5rem; }
  section[aria-label="All topics in this section"] > div > .flex {
    grid-template-columns: 1fr;
  }
}

/* ---------- Content list blocks ("tables") ----------
   The discography/spec lists (<ul class="space-y-3 my-6 ml-4">, 178 across
   46 pages) read as tables to visitors. Box them: border + soft shadow. */
ul.space-y-3.my-6 {
  border: 1px solid #b0b0b0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
  background: #fff;
  padding: 1.1rem 1.4rem;
  margin-left: 0;
}
/* the hub "All Topics" index gets the same boxed treatment */
section[aria-label="All topics in this section"] > div > .flex {
  border: 1px solid #b0b0b0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
  padding: .35rem 1.1rem;
  background: #fff;
}
/* and the bordered statement box picks up the matching shadow */
.ns-statement { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07); }

/* ---------- Click-to-load media facades ---------- */
.yt-facade, .sp-facade {
  position: relative;
  cursor: pointer;
  border: 1px solid #b0b0b0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
  background: #fff;
  max-width: 640px;
}
.yt-facade img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: none;
}
.yt-facade .yt-play,
.sp-facade .sp-cta {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Kanit', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.yt-facade .yt-play {
  color: #fff;
  background: rgba(0, 0, 0, .35);
  font-size: 2.4rem;
  transition: background .15s ease;
}
.yt-facade:hover .yt-play { background: rgba(0, 0, 0, .55); }
.sp-facade {
  min-height: 96px;
}
.sp-facade .sp-cta {
  position: static;
  padding: 2rem 1.5rem;
  color: var(--nme-ink);
  font-size: .8rem;
  gap: .6rem;
}
.sp-facade:hover .sp-cta { text-decoration: underline; }
.embed-note {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: .78rem;
  color: var(--nme-muted);
  margin-top: .6rem;
}

/* ---------- Focus visibility (never removed) ---------- */
.ns-shell a:focus-visible,
.ns-shell button:focus-visible {
  outline: 2px solid #c81e32;
  outline-offset: 3px;
}
.ns-footer a:focus-visible { outline-color: #ffffff; }

/* ---------- Responsive ---------- */
/* The hamburger carries Tailwind's .lg\:hidden, but .ns-iconbtn above sets
   display:inline-flex at equal specificity and loads later, which resurrected
   it on desktop. The ID wins outright. */
@media (min-width: 1025px) {
  #mobile-menu-open { display: none !important; }
}
@media (max-width: 1024px) {
  .ns-nav { display: none; }        /* mobile menu button takes over */
}
@media (max-width: 900px) {
  .ns-cards { grid-template-columns: repeat(2, 1fr); }
  [aria-labelledby="latest-pages-heading"] .grid { grid-template-columns: repeat(2, 1fr); }
  .ns-row { grid-template-columns: 7rem 1fr 9rem; gap: 1rem; }
}
@media (max-width: 640px) {
  .ns-head { padding: .9rem 1.1rem; gap: .5rem; }
  .ns-logo { font-size: 1.25rem; }
  .ns-cta { padding: 0 1rem; font-size: .66rem; }
  .ns-hero-copy { padding: 2rem 1.25rem 1.75rem; }
  .ns-cards { grid-template-columns: 1fr; gap: 1.5rem; padding: 1.25rem; }
  .ns-sec, .ns-faq { padding: 0 1.25rem; margin-bottom: 2.5rem; }
  .ns-statement {
    grid-template-columns: 1fr;      /* stack on phones */
    margin: 0 1.25rem 2.5rem;
    padding: 1.75rem 1.25rem;
    column-gap: 0;
  }
  .ns-statement h2,
  .ns-statement p,
  .ns-statement .ns-inline-link { grid-column: 1; grid-row: auto; }
  [aria-labelledby="latest-pages-heading"] { padding: 0 1.25rem 2.5rem; }
  [aria-labelledby="latest-pages-heading"] .grid { grid-template-columns: 1fr; }
  .ns-row { grid-template-columns: 1fr 6.5rem; gap: .9rem; }
  .ns-rowlabel { grid-column: 1 / -1; padding-top: 0; margin-bottom: -.6rem; }
  .ns-faq .ns-faq-row { grid-template-columns: 1fr 6.5rem; gap: .9rem; }
  .ns-footer { padding: 2.5rem 1.25rem 2rem; }
}

/* ---------- Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  .ns-nav a, .ns-cta, .ns-footer a { transition: none; }
}
