/* Channel 304 chrome v1.6.0 — dark charcoal default + paper-white light theme (toggle), magenta #C2185B accent */
/* ---------- Palettes (BUG-1). Dark charcoal is the default (:root); light = paper-white, opt-in via html[data-theme="light"].
   html:root / html[data-theme] out-rank core global-styles ":root" presets. ---------- */
:root,
html:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --c304-paper: #121214;
  --c304-surface: #1C1C21;
  --c304-ink: #ECECEE;
  --c304-muted: #B4B4BE;
  --c304-rule: #3A3A42;
  --c304-card-top: #4A4A55;
  --c304-accent: #C2185B;      /* brand magenta: fills, rules, borders */
  --c304-accent-dark: #8E1043;
  --c304-on-accent: #FFFFFF;
  --c304-link: #FF7AAD;        /* magenta tint for text on charcoal (7.0:1 on cards) */
  --c304-link-hover: #FFB0CE;
  --c304-kicker: #FF7AAD;
  --c304-focus: #FF7AAD;
  --c304-masthead: #0A0A0C;
  --c304-masthead-text: #ECECEE;
  --c304-footer-bg: #0A0A0C;
  --c304-footer-text: #E4E4E7;
  --c304-banner-bg: #0A0A0C;
  --c304-field-border: #B4B4BE;
  --wp--preset--color--paper: #121214;
  --wp--preset--color--surface: #1C1C21;
  --wp--preset--color--ink: #ECECEE;
  --wp--preset--color--muted: #B4B4BE;
  --wp--preset--color--rule: #3A3A42;
  --wp--preset--color--accent: #FF7AAD;
  --wp--preset--color--accentdark: #FFB0CE;
  --wp--preset--color--masthead: #0A0A0C;
  --wp--preset--color--base: #121214;
  --wp--preset--color--contrast: #ECECEE;
  --wp--preset--color--accent-1: #FF7AAD;
  --wp--preset--color--accent-2: #2A1520;
  --wp--preset--color--accent-3: #FFB0CE;
  --wp--preset--color--accent-4: #B4B4BE;
  --wp--preset--color--accent-5: #26262C;
  --wp--preset--color--accent-6: #3A3A42;
}
html[data-theme="light"] {
  color-scheme: light;
  --c304-paper: #F7F7F5;
  --c304-surface: #FFFFFF;
  --c304-ink: #151517;
  --c304-muted: #4A4A50;
  --c304-rule: #D9D9D4;
  --c304-card-top: #151517;
  --c304-accent: #C2185B;
  --c304-accent-dark: #8E1043;
  --c304-on-accent: #FFFFFF;
  --c304-link: #C2185B;
  --c304-link-hover: #8E1043;
  --c304-kicker: #C2185B;
  --c304-focus: #C2185B;
  --c304-masthead: #0E0F14;
  --c304-masthead-text: #ECECEE;
  --c304-footer-bg: #151517;
  --c304-footer-text: #E4E4E7;
  --c304-banner-bg: #151517;
  --c304-field-border: #4A4A50;
  --wp--preset--color--paper: #F7F7F5;
  --wp--preset--color--surface: #FFFFFF;
  --wp--preset--color--ink: #151517;
  --wp--preset--color--muted: #4A4A50;
  --wp--preset--color--rule: #D9D9D4;
  --wp--preset--color--accent: #C2185B;
  --wp--preset--color--accentdark: #8E1043;
  --wp--preset--color--masthead: #0E0F14;
  --wp--preset--color--base: #F7F7F5;
  --wp--preset--color--contrast: #151517;
  --wp--preset--color--accent-1: #C2185B;
  --wp--preset--color--accent-2: #F2E6EB;
  --wp--preset--color--accent-3: #8E1043;
  --wp--preset--color--accent-4: #4A4A50;
  --wp--preset--color--accent-5: #ECECE8;
  --wp--preset--color--accent-6: #D9D9D4;
}

/* Base overrides for hard-coded paper colours in style.css */
html,
body,
body.c304-news {
  background: var(--c304-paper);
  color: var(--c304-ink);
}
body.c304-news h1, body.c304-news h2, body.c304-news h3,
body.c304-news h4, body.c304-news h5, body.c304-news h6 {
  color: var(--c304-ink);
}
.c304-section__title {
  color: var(--c304-ink);
  border-bottom-color: var(--c304-ink);
}
.c304-empty { color: var(--c304-muted); }
.c304-pagination .page-numbers a,
.c304-pagination .page-numbers span,
.pagination .page-numbers {
  color: var(--c304-ink);
  background: var(--c304-surface);
  border-color: var(--c304-field-border);
}
.c304-pagination .page-numbers .current,
.pagination .page-numbers.current {
  background: var(--c304-accent);
  border-color: var(--c304-accent);
  color: var(--c304-on-accent);
}
.c304-pagination .page-numbers a:hover,
.c304-pagination .page-numbers a:focus-visible,
.pagination a.page-numbers:hover,
.pagination a.page-numbers:focus-visible {
  border-color: var(--c304-link);
  color: var(--c304-link);
}

body.c304-news {
  font-weight: 400;
  -webkit-font-smoothing: auto;
}
body.c304-news p,
body.c304-news li {
  font-weight: 400;
}

/* Skip link */
.c304-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
  background: var(--c304-ink);
  color: #FFFFFF;
  padding: 0.75rem 1rem;
  font-weight: 700;
  text-decoration: none;
}
.c304-skip:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* Adults-only notice */
.c304-site-banner {
  background: var(--c304-banner-bg) !important;
  color: #FFFFFF !important;
}

/* Masthead — dark band only to host the logo artwork */
.c304-masthead {
  background: var(--c304-masthead);
  border-bottom: 3px solid var(--c304-accent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1.25rem;
}
.c304-masthead img {
  height: 56px;
  width: auto;
  max-width: min(70vw, 320px);
  object-fit: contain;
  display: block;
}
.c304-masthead-tag {
  color: var(--c304-masthead-text);
  font-size: 0.875rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .c304-masthead-tag { display: none; }
  .c304-masthead img { height: 48px; }
}

/* Section tabs — paper strip, dark text */
.c304-tabs {
  background: var(--c304-surface);
  border-bottom: 1px solid var(--c304-rule);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.c304-tabs ul {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0 auto;
  max-width: 72rem;
  padding: 0 0.75rem;
  min-height: 44px;
  align-items: stretch;
}
.c304-tabs a {
  display: flex;
  align-items: center;
  padding: 0.75rem 0.9rem;
  color: var(--c304-ink);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.c304-tabs a:hover,
.c304-tabs a:focus-visible {
  color: var(--c304-link);
  border-bottom-color: var(--c304-accent);
}
.c304-tabs a[aria-current="page"],
.c304-tabs .current-menu-item > a {
  color: var(--c304-ink);
  font-weight: 800;
  border-bottom-color: var(--c304-accent);
}

/* Hero — full headline, never clipped (BUG-19) */
.c304-hero {
  background: var(--c304-surface);
  border: 1px solid var(--c304-rule);
  border-left: 5px solid var(--c304-accent);
  padding: 1.75rem 1.5rem 2rem;
  margin-bottom: 2rem;
}
.c304-hero__kicker {
  color: var(--c304-kicker);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8125rem;
  font-weight: 800;
  margin: 0 0 0.6rem;
}
.c304-hero h1,
#c304-hero-heading {
  color: var(--c304-ink);
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  line-height: 1.18;
  font-weight: 800;
  margin: 0 0 0.85rem;
  max-width: 48rem;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: none;
  height: auto;
  max-height: none;
  overflow-wrap: break-word;
}
.c304-hero__dek {
  color: var(--c304-muted);
  font-size: 1.125rem;
  max-width: 44rem;
  margin: 0 0 0.85rem;
}
.c304-hero__meta,
.c304-hero__meta time {
  color: var(--c304-muted);
  font-size: 0.9375rem;
  margin: 0 0 1rem;
}
.c304-hero__cta {
  display: inline-block;
  color: var(--c304-link);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.c304-hero__cta:hover,
.c304-hero__cta:focus-visible {
  color: var(--c304-link-hover);
}

/* Cards — white surface, dark headline (BUG-2) */
.c304-card {
  background: var(--c304-surface);
  border: 1px solid var(--c304-rule);
  border-top: 3px solid var(--c304-card-top);
  border-radius: 2px;
  padding: 1rem 1rem 1.15rem;
}
.c304-card:hover,
.c304-card:focus-within {
  border-top-color: var(--c304-accent);
}
.c304-card__cat {
  color: var(--c304-kicker);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  margin: 0 0 0.4rem;
}
.c304-card h3 {
  font-size: 1.125rem;
  line-height: 1.3;
  margin: 0 0 0.5rem;
  font-weight: 800;
  color: var(--c304-ink);
}
.c304-card h3 a,
.c304-card a {
  color: var(--c304-ink);
  text-decoration: none;
}
.c304-card h3 a:hover,
.c304-card h3 a:focus-visible {
  color: var(--c304-link);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.c304-card__dek {
  color: var(--c304-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
  margin: 0.4rem 0 0;
}

/* Single article */
.c304-front article.post,
.c304-front article.page {
  margin: 0 auto;
}
.c304-front article h1 {
  font-size: clamp(1.75rem, 4.5vw, 2.6rem);
  line-height: 1.18;
  font-weight: 800;
  margin: 0.5rem 0 0.75rem;
  color: var(--c304-ink);
}
.c304-byline {
  color: var(--c304-muted);
  font-size: 0.9375rem;
  margin: 0 0 1.5rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--c304-rule);
}
.c304-byline a {
  color: var(--c304-ink);
  font-weight: 700;
  text-decoration: none;
}
.c304-byline a:hover,
.c304-byline a:focus-visible {
  color: var(--c304-link);
  text-decoration: underline;
}
.entry-content {
  color: var(--c304-ink);
  font-size: 1.125rem;
  line-height: 1.7;
}
.entry-content a {
  color: var(--c304-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.entry-content a:hover,
.entry-content a:focus-visible {
  color: var(--c304-link-hover);
}
.entry-content h2,
.entry-content h3 {
  color: var(--c304-ink);
  margin-top: 2rem;
}

/* Footer — one landmark, paper-friendly dark band */
.c304-footer {
  background: var(--c304-footer-bg);
  color: var(--c304-footer-text);
  padding: 1.5rem 1.25rem 2rem;
  font-size: 0.9375rem;
  border-top: 3px solid var(--c304-accent);
  margin-top: 2rem;
}
.c304-footer p {
  max-width: 72rem;
  margin: 0 auto;
}
.c304-footer a {
  color: #FFFFFF;
  text-decoration: underline;
}
.c304-footer .c304-18 {
  color: #FFFFFF;
  font-weight: 700;
}

/* Focus visible globally for keyboard / VoiceOver */
:focus-visible {
  outline: 3px solid var(--c304-focus);
  outline-offset: 2px;
}
.c304-masthead :focus-visible,
.c304-footer :focus-visible {
  outline-color: #FFFFFF;
}
a:focus:not(:focus-visible) {
  outline: none;
}

/* BUG-24: "Sources" promoted from h3 to h2 for heading order; keep the h3 look */
.entry-content h2.c304-sources-heading {
  font-size: var(--wp--preset--font-size--large);
  font-weight: 700;
  color: var(--c304-ink);
  margin-top: 2rem;
}

/* ================= v1.5.0 additions ================= */

/* NEW-1: cards are a tidy column; dek always present, no stretched blank block */
.c304-card-grid { align-items: start; }
.c304-card { display: flex; flex-direction: column; }
.c304-card__media { display: block; margin: -1rem -1rem 0.85rem; line-height: 0; }
.c304-card__media img,
.c304-hero__media img,
.c304-featured img {
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  display: block;
  background: var(--c304-rule);
}
.c304-card__dek { overflow-wrap: break-word; }
.c304-hero__media { display: block; margin: -1.75rem -1.5rem 1.25rem; line-height: 0; }
.c304-featured { margin: 0 0 1.5rem; }

/* BUG-1: theme toggle (real <button>, 44px target, visible focus) */
.c304-masthead { flex-wrap: wrap; }
.c304-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  border: 2px solid #FFFFFF;
  border-radius: 999px;
  background: transparent;
  color: #FFFFFF;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.c304-theme-toggle:hover { background: rgba(255, 255, 255, 0.12); }
.c304-theme-toggle:focus-visible {
  outline: 3px solid #FFFFFF;
  outline-offset: 3px;
}
.c304-theme-toggle__icon { font-size: 1.05rem; }

/* BUG-16/30: search bar, rendered server-side on every page */
.c304-searchbar {
  background: var(--c304-surface);
  border-bottom: 1px solid var(--c304-rule);
}
.c304-search {
  display: flex;
  gap: 0.5rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.5rem 1.25rem;
  justify-content: flex-end;
}
.c304-search--inline { justify-content: flex-start; padding: 0; margin: 0 0 1.5rem; }
.c304-search input[type="search"] {
  min-height: 44px;
  width: min(100%, 20rem);
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--c304-field-border);
  border-radius: 4px;
  background: var(--c304-surface);
  color: var(--c304-ink);
  font: inherit;
}
.c304-search input[type="search"]::placeholder { color: var(--c304-muted); opacity: 1; }
.c304-search button {
  min-height: 44px;
  min-width: 44px;
  padding: 0.5rem 1rem;
  border: 0;
  border-radius: 4px;
  background: var(--c304-accent);
  color: var(--c304-on-accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.c304-search button:hover { background: var(--c304-accent-dark); }
.c304-search input:focus-visible,
.c304-search button:focus-visible { outline: 3px solid var(--c304-focus); outline-offset: 2px; }

/* BUG-38/39: archive + search intro */
.c304-archive__desc,
.c304-archive__count,
.c304-search__count { color: var(--c304-muted); margin: -0.5rem 0 1.25rem; }

/* BUG-4/15: not-found page */
.c304-404 h1 { font-size: clamp(1.75rem, 4.5vw, 2.6rem); margin: 0.5rem 0 0.75rem; }
.c304-404 ul { padding-left: 1.2rem; }
.c304-404 li { margin: 0.35rem 0; }
.c304-404 a { color: var(--c304-link); }

/* BUG-12 / BUG-40: share, prev/next, related */
.c304-share, .c304-postnav, .c304-related {
  margin: 2.25rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--c304-rule);
}
.c304-share h2, .c304-related h2, .c304-postnav h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.75rem;
}
.c304-share ul, .c304-related ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.entry-content .c304-share a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--c304-field-border);
  border-radius: 4px;
  color: var(--c304-ink);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
}
.entry-content .c304-share a:hover,
.entry-content .c304-share a:focus-visible { border-color: var(--c304-link); color: var(--c304-link); }
.c304-postnav ul {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem;
}
.c304-postnav li { margin: 0; }
.c304-postnav__label { display: block; color: var(--c304-muted); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; }
.c304-postnav__next { text-align: right; }
.c304-related ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1rem; }
.c304-related li { margin: 0; font-size: 1rem; line-height: 1.4; }
.entry-content .c304-related a, .entry-content .c304-postnav a { font-weight: 700; }

/* BUG-41: footer links + copyright */
.c304-footer nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  max-width: 72rem;
  margin: 0.85rem auto;
  padding: 0;
}
.c304-footer nav a { display: inline-block; padding: 0.35rem 0; }
.c304-footer__copy { font-size: 0.875rem; }

@media (max-width: 640px) {
  .c304-search { justify-content: stretch; }
  .c304-search input[type="search"] { width: 100%; flex: 1; }
}
