/* Subwoofer 101: the new look, on the real pages.
 *
 * The design is redesign/index.html (palette, header, nav, cards, footer);
 * this file applies it to the markup every page already has, which is
 * WordPress's Twenty Fourteen theme. scripts/build-restyle.mjs removes the
 * theme's own stylesheets and links this one instead, so nothing here fights
 * the old CSS. Content markup is never changed to suit the styling.
 *
 * Preview only until Ryan approves it (see build-restyle.mjs).
 */

:root {
  /* Palette from Ryan's header image, contrast-tested (redesign/index.html). */
  --crimson: #8B0F26;
  --crimson-deep: #5A0714;
  --charcoal: #1C1C22;
  --charcoal-2: #26262E;
  --ink: #23232B;
  --ink-soft: #55555F;
  --link: #0C6F93;        /* replaces the colourblind-unsafe green */
  --link-hover: #095470;
  --amber: #E09400;       /* dark surfaces only: "you are pointing at this" */
  --paper: #FFFFFF;
  --mist: #F4F5F7;
  --line: #E2E4E8;
  --wrap: 1180px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
  font-feature-settings: "kern" 1;
}
img, video { max-width: 100%; height: auto; }
iframe, embed, object { max-width: 100%; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover, a:focus { color: var(--link-hover); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

.screen-reader-text,
.site-title,
.site-description {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  clip: auto;
  clip-path: none;
  height: auto;
  width: auto;
  margin: 0;
  left: 8px;
  top: 8px;
  z-index: 1000;
  display: block;
  padding: 12px 20px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}
.hide { display: none; }

/* ── Header: two layers (redesign/header-spec.md) ─────────────────────────
   The band is horizontally uniform, so it is STRETCHED to any width; the
   lockup sets the height and is never cropped. No vertical padding here, or
   the tagline drifts out of the charcoal strip. */
.rs-masthead {
  background-color: var(--crimson);
  background-image: url(/redesign/band.webp);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  line-height: 0;
}
/* Up to the wrap width the band is never drawn wider than 1180px, so the
   1086px band does; the full one is only for wider screens. */
@media (max-width: 1180px) {
  .rs-masthead { background-image: url(/redesign/band-1x.webp); }
}
.rs-masthead a { display: block; width: 100%; max-width: var(--wrap); }
.rs-masthead img { display: block; width: 100%; height: auto; }

/* ── Menu bar ─────────────────────────────────────────────────────────── */
.site-header {
  background: var(--charcoal);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-main { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.search-toggle, .search-box-wrapper { display: none; }
.primary-navigation ul { list-style: none; margin: 0; padding: 0; }
.menu-toggle { display: none; }

.nav-menu { display: flex; flex-wrap: wrap; justify-content: space-between; }
.nav-menu > li { position: relative; }
.nav-menu > li > a {
  display: block;
  padding: 15px 10px 12px;
  color: #EDEDF2;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .03em;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.nav-menu > li.menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  margin-left: 6px;
  vertical-align: 2px;
  border: 4px solid transparent;
  border-top-color: currentColor;
  border-bottom: 0;
  opacity: .7;
}
/* Amber means one thing: you are pointing at this. The current page gets no
   menu treatment (Gary's call, redesign/header-spec.md). */
.nav-menu > li:hover > a,
.nav-menu > li.focus > a,
.nav-menu > li:focus-within > a {
  color: #fff;
  background: rgba(255, 255, 255, .09);
  border-bottom-color: var(--amber);
}
.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 60;
  min-width: 280px;
  padding: 8px 0;
  background: var(--charcoal-2);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .35);
}
.nav-menu > li:nth-last-child(-n+2) > .sub-menu { left: auto; right: 0; }
.nav-menu > li:hover > .sub-menu,
.nav-menu > li.focus > .sub-menu,
.nav-menu > li:focus-within > .sub-menu { display: block; }
.sub-menu a {
  display: block;
  padding: 9px 20px;
  color: #DADAE2;
  text-decoration: none;
  font-size: 15px;
  line-height: 1.4;
}
.sub-menu a:hover, .sub-menu a:focus { color: var(--amber); background: rgba(255, 255, 255, .07); }

/* Nine top-level items fit one row from about 1160px; tighten them below
   that, and switch to the tap-to-open menu before they would wrap. */
@media (max-width: 1180px) and (min-width: 1081px) {
  .nav-menu > li > a { padding-left: 8px; padding-right: 8px; font-size: 12px; letter-spacing: .02em; }
}
@media (max-width: 1080px) {
  .header-main { padding: 0 16px; }
  .menu-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 15px 0;
    background: none;
    border: 0;
    color: #fff;
    font: 600 14px/1 var(--sans);
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
  }
  .menu-toggle::before {
    content: "";
    width: 18px;
    height: 2px;
    margin: 6px 0;
    background: currentColor;
    box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
  }
  .nav-menu { display: none; padding: 0 0 14px; }
  .primary-navigation.toggled-on .nav-menu {
    display: block;
    max-height: calc(100vh - 52px);
    overflow-y: auto;
  }
  .nav-menu > li > a {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    white-space: normal;
  }
  .nav-menu > li > a:hover, .nav-menu > li:focus-within > a { background: none; border-bottom-color: rgba(255, 255, 255, .08); color: var(--amber); }
  .nav-menu > li.menu-item-has-children > a::after { display: none; }
  .sub-menu,
  .nav-menu > li:nth-last-child(-n+2) > .sub-menu {
    display: block;
    position: static;
    min-width: 0;
    padding: 4px 0 8px 14px;
    background: none;
    box-shadow: none;
  }
  .sub-menu a { padding: 8px 0; }
}

/* ── Layout ───────────────────────────────────────────────────────────── */
/* Single pages wrap content and sidebar in #main-content; tag archives do
   not. Laying out #main and dissolving the wrapper covers both. */
.site-main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 44px 24px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px;
  align-items: start;
}
.main-content { display: contents; }
@media (max-width: 900px) {
  .site-main { padding: 28px 16px 48px; grid-template-columns: minmax(0, 1fr); gap: 40px; }
}

/* ── Page header: section chip, title, byline ─────────────────────────── */
.entry-header { margin: 0 0 28px; }
.rs-kicker {
  display: inline-block;
  margin: 0 0 16px;
  padding: 5px 11px;
  background: var(--crimson);
  color: #fff;
  border-radius: 3px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
}
.rs-kicker:hover, .rs-kicker:focus { background: var(--crimson-deep); color: #fff; }
.entry-title {
  margin: 0;
  font-size: clamp(30px, 4.2vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--ink);
}
.entry-title a { color: inherit; text-decoration: none; }
.entry-title a:hover { color: var(--link); }
.rs-byline {
  margin: 12px 0 0;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 14.5px;
}
.rs-byline a { color: inherit; }
.rs-byline a:hover { color: var(--link); }
.entry-meta { margin: 8px 0 0; color: var(--ink-soft); font-size: 14px; }
.entry-meta a { color: inherit; }

/* ── Article text ─────────────────────────────────────────────────────── */
.entry-content, .page-content { font-size: 18px; line-height: 1.7; }
.entry-content > :first-child { margin-top: 0; }
.entry-content p { margin: 0 0 1.2em; }
.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5, .entry-content h6 { color: var(--ink); clear: both; }
.entry-content h2 {
  margin: 1.9em 0 .6em;
  padding-left: 14px;
  border-left: 4px solid var(--crimson);
  font-size: 27px;
  line-height: 1.25;
  letter-spacing: -.01em;
}
.entry-content h3 { margin: 1.7em 0 .5em; font-size: 22px; line-height: 1.3; }
.entry-content h4 { margin: 1.6em 0 .5em; font-size: 19px; line-height: 1.35; }
.entry-content h5 { margin: 1.5em 0 .5em; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; }
/* Ryan uses h6 for a page's opening paragraph, so it reads as one. */
.entry-content h6 {
  margin: 0 0 1.2em;
  color: #33333C;
  font-size: 19.5px;
  font-weight: 600;
  line-height: 1.6;
}
.entry-content ul, .entry-content ol { margin: 0 0 1.3em; padding-left: 1.4em; }
.entry-content li { margin: 0 0 .4em; }
.entry-content li > ul, .entry-content li > ol { margin: .4em 0 0; }
.entry-content figure { margin: 1.8em 0; }
.entry-content img { border-radius: 6px; }
.wp-caption, .entry-content figure { max-width: 100%; }
.wp-caption-text, .entry-content figcaption {
  margin: .6em 0 0;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.5;
  text-align: center;
}
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.entry-content::after { content: ""; display: table; clear: both; }
.entry-content iframe { max-width: 100%; border: 0; border-radius: 8px; }
.entry-content iframe[src*="youtube"],
.comment-content iframe[src*="youtube"] {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  margin: 0 0 1.4em;
}
.entry-content div[style*="padding-bottom:56.25%"] { border-radius: 8px; }
.entry-content blockquote {
  margin: 1.8em 0;
  padding: 18px 24px;
  background: var(--mist);
  border-left: 4px solid var(--amber);
  border-radius: 0 6px 6px 0;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content hr, .wp-block-separator { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.entry-content table { border-collapse: collapse; width: 100%; margin: 0 0 1.5em; font-size: 16px; }
.entry-content th, .entry-content td { padding: 9px 12px; border: 1px solid var(--line); text-align: left; }
.entry-content th { background: var(--mist); }

/* ── Tag archives and the 404 page ───────────────────────────────────── */
.archive-header, .page-header { margin: 0 0 32px; padding: 0 0 16px; border-bottom: 1px solid var(--line); }
.archive-title, .page-title {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.site-content > article + article { margin-top: 52px; padding-top: 44px; border-top: 1px solid var(--line); }
footer.entry-meta { margin: 24px 0 0; }
.tag-links { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-links a {
  display: inline-block;
  padding: 3px 10px;
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.tag-links a:hover { border-color: var(--link); color: var(--link); }
.post-thumbnail { display: block; margin: 0 0 22px; }
.post-thumbnail img { display: block; width: 100%; height: auto; border-radius: 8px; }
.paging-navigation { margin: 52px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.page-numbers {
  display: inline-block;
  min-width: 42px;
  margin: 0 4px 6px 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}
.page-numbers.current { background: var(--crimson); border-color: var(--crimson); color: #fff; }

/* ── Comments ────────────────────────────────────────────────────────── */
.comments-area { margin-top: 56px; padding-top: 32px; border-top: 3px solid var(--charcoal); }
.comments-title, .comment-reply-title {
  margin: 0 0 20px;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -.01em;
}
.comment-list { list-style: none; margin: 0 0 40px; padding: 0; }
.comment-body { padding: 20px 0; border-bottom: 1px solid var(--line); }
.comment-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin: 0 0 6px; }
.comment-author { font-size: 16px; }
.comment-author .fn { font-weight: 700; }
.comment-author .fn a { color: var(--ink); text-decoration: none; }
.comment-author .says { display: none; }
.comment-metadata { color: var(--ink-soft); font-size: 13.5px; }
.comment-metadata a { color: inherit; text-decoration: none; }
.comment-content { font-size: 16.5px; line-height: 1.65; overflow-wrap: anywhere; }
.comment-content p { margin: 0 0 .8em; }
.comment-content p:last-child { margin-bottom: 0; }
/* Ryan's own replies: he answers about half the comments on the site. */
.bypostauthor > .comment-body {
  margin: 8px 0;
  padding: 18px 18px;
  background: #FBF3F4;
  border: 0;
  border-left: 3px solid var(--crimson);
  border-radius: 0 8px 8px 0;
}
.bypostauthor > .comment-body .fn::after {
  content: "Site author";
  margin-left: 8px;
  padding: 2px 7px;
  background: var(--crimson);
  color: #fff;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  vertical-align: 2px;
}
.reply { margin-top: 8px; font-size: 14px; }
.comment-reply-link { font-weight: 600; text-decoration: none; }
.comment-respond { margin-top: 28px; }
.comment-notes, .logged-in-as, .akismet_comment_form_privacy_notice { color: var(--ink-soft); font-size: 14px; }
.comment-form p { margin: 0 0 16px; }
.comment-form label { display: block; margin: 0 0 6px; font-size: 14.5px; font-weight: 600; }
.comment-form .comment-form-cookies-consent { display: flex; gap: 8px; align-items: baseline; }
.comment-form .comment-form-cookies-consent label { display: inline; font-weight: 400; }
.required { color: var(--crimson); }

/* ── Forms (comments, contact, search) ───────────────────────────────── */
input[type="text"], input[type="email"], input[type="url"], input[type="search"],
input[type="tel"], textarea {
  width: 100%;
  max-width: 100%;
  padding: 11px 13px;
  border: 1px solid #CFD3DA;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: 16px/1.4 var(--sans);
}
input:focus, textarea:focus { border-color: var(--link); outline: 2px solid rgba(12, 111, 147, .22); outline-offset: 0; }
input[type="submit"], button[type="submit"] {
  padding: 12px 22px;
  border: 0;
  border-radius: 6px;
  background: var(--crimson);
  color: #fff;
  font: 600 16px/1.2 var(--sans);
  cursor: pointer;
}
input[type="submit"]:hover, button[type="submit"]:hover { background: var(--crimson-deep); }
.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1; min-width: 0; }
.search-form .search-submit { padding: 11px 16px; }

/* ── Sidebar cards ───────────────────────────────────────────────────── */
.rs-sidebar { font-size: 15px; }
.rs-card {
  margin: 0 0 22px;
  padding: 20px;
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.rs-card-title {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.rs-card ul { list-style: none; margin: 0; padding: 0; }
.rs-card li { padding: 9px 0; border-bottom: 1px solid var(--line); line-height: 1.45; }
.rs-card li:last-child { border-bottom: 0; }
.rs-card a { font-weight: 500; text-decoration: none; }
.rs-card a:hover { text-decoration: underline; }
.rs-card ul.rs-previews li { padding: 0 0 16px; border-bottom: 0; }
.rs-card a.rs-preview { display: block; color: var(--ink); font-size: 15.5px; font-weight: 700; line-height: 1.35; }
.rs-card a.rs-preview:hover { text-decoration: none; }
.rs-card a.rs-preview:hover span { color: var(--link); text-decoration: underline; }
.rs-preview img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin: 0 0 8px;
  border-radius: 6px;
  background: var(--charcoal);
}
.rs-card .rs-previews p { margin: 4px 0 0; color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.rs-more { display: inline-block; margin-top: 12px; font-size: 14.5px; font-weight: 600 !important; }
.rs-card p { margin: 0 0 12px; color: var(--ink-soft); line-height: 1.5; }

/* ── Footer ──────────────────────────────────────────────────────────── */
.rs-footer { background: var(--charcoal); color: #B9B9C4; font-size: 15px; }
.rs-footer .rs-wrap { max-width: var(--wrap); margin: 0 auto; padding: 48px 24px 36px; }
.rs-fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.rs-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 12.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.rs-footer ul { list-style: none; margin: 0; padding: 0; }
.rs-footer li { margin: 0 0 9px; line-height: 1.4; }
.rs-footer a { color: #C9C9D4; text-decoration: none; }
.rs-footer a:hover, .rs-footer a:focus { color: var(--amber); text-decoration: underline; }
.rs-rule {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  color: #8C8C99;
  font-size: 13.5px;
}
.rs-rule img { display: block; width: 150px !important; max-width: 150px !important; height: auto; }
@media (max-width: 900px) {
  .rs-footer .rs-wrap { padding: 40px 16px 32px; }
}
