/* Site layout + interactive bits the component CSS (dangerous-list.css) doesn't
   cover: page wrappers, the card grid, the SFW-first NSFW reveal, and tag
   filtering. Component look-and-feel stays in dangerous-list.css. */

/* Moved from inline styles (the <head> block and the .dla host in baseof.html)
   to allow a strict CSP without style-src 'unsafe-inline'. */
html, body { margin: 0; }
/* Default text colour: without it, unstyled content (e.g. the About prose)
   inherits the browser default black on the dark background. */
body { background: var(--dl-void); min-height: 100vh; color: var(--text-body); }

/* Prose pages (About) - the markdown content had no styling at all. */
.dl-prose { line-height: 1.7; }
.dl-prose p, .dl-prose li { color: var(--text-body); }
.dl-prose h2, .dl-prose h3 { font-family: var(--font-heading); color: var(--text-body); margin-top: 1.8rem; }
.dl-prose a { color: var(--color-link); text-decoration: underline; }
.dl-prose a:hover { color: var(--color-link-hover); }

/* Atmosphere host: full-viewport fixed layer sitting behind all content. */
.dla { position: fixed; inset: 0; z-index: -1; }

.dl-wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }
.dl-section { padding: 2.75rem 0; }
.dl-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0 0 1.4rem; }
.dl-section__title {
  font-family: var(--font-heading);
  color: var(--text-body);
  font-size: clamp(1.35rem, 1rem + 1.6vw, 1.9rem);
  font-weight: 700; margin: 0;
}

.dl-grid {
  display: grid; gap: 1.2rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* .dl-filters lives in dangerous-list.css (the component file) - keep it single-sourced. */

/* SFW-first NSFW reveal - CSS-checkbox hack (see docs/design-system-integration).
   #nsfw-reveal is a sibling that precedes the card grids / episode table.

   The checkbox is visually hidden but kept in the tab order and accessibility
   tree (a bare `hidden` attribute removes it from both, leaving keyboard and
   screen-reader users unable to reveal the content). The <label> is the visible
   control; a focus ring on its box shows where keyboard focus lands. This keeps
   the reveal working without JavaScript - matching the site's progressive
   enhancement - while being fully operable by keyboard and assistive tech. */
.dl-nsfw-checkbox {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}
#nsfw-reveal:focus-visible ~ * .dl-nsfw-toggle__box {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.is-nsfw { display: none; }
#nsfw-reveal:checked ~ * .is-nsfw { display: revert; }
#nsfw-reveal:checked ~ * .dl-nsfw-toggle__box {
  background: var(--color-accent); border-color: var(--color-accent);
}
#nsfw-reveal:checked ~ * .dl-nsfw-toggle__box::after {
  content: "✓"; color: #fff; font-size: 11px; line-height: 1;
}

/* The "18+ only" filter chip is only offered once 18+ content is revealed, so it
   mirrors the reveal's own sibling-combinator gating. filter.js also resets the
   filter when the reveal is switched off, keeping the two in step. */
.dl-chip--nsfw-only { display: none; }
#nsfw-reveal:checked ~ * .dl-chip--nsfw-only { display: revert; }

/* JS tag filtering adds this to non-matching cards; without JS, all show. */
.is-filtered-out { display: none !important; }

.dl-empty { color: var(--text-muted); padding: 2rem 0; }

.dl-404 { text-align: center; padding: 5rem 0; }
.dl-404__code {
  font-family: var(--font-heading);
  font-size: clamp(5rem, 12vw, 9rem); font-weight: 900;
  color: var(--color-accent); margin: 0; line-height: 1;
}
.dl-404__body { color: var(--text-muted); margin: 1rem 0 2rem; }
.dl-404__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
