/*
Theme Name: Bold Editorial
Description: Black, off-white and signal red. Heavy type, hard lines, a post grid with a featured post, and a sidebar for an ad slot, categories (with a filter box), tags, latest updates and archives. Ads and partner links are managed as widgets; colors, top strip and footer text in Appearance → Customize → Theme options.
Version: 1.0.9
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bold-editorial
*/

:root {
  --paper: #f3f0e8;
  --card: #fbfaf6;
  --ink: #111111;
  --muted: #5e5a52;
  --line: #111111;
  --soft-line: #d8d3c7;
  --red: #ff3b1f;
  --blue: #2340ff;

  --font-display: "Archivo Black", "Arial Black", Impact, sans-serif;
  --font-body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 40px);
  --sidebar: 320px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.screen-reader-text,
.skip-link:not(:focus) {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  background: var(--red); color: #fff; padding: 8px 14px; font-weight: 700; text-decoration: none;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Top strip ---------- */
.top-strip {
  background: var(--red);
  color: #fff;
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .14em;
}
.top-strip .wrap { display: flex; justify-content: space-between; gap: 16px; padding-block: 7px; }
.top-strip a { text-decoration: none; }
.top-strip a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header { background: var(--paper); border-bottom: 3px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 84px;
}
.site-branding { display: flex; align-items: baseline; gap: 10px; }
.site-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.site-title a { text-decoration: none; }
.age-badge {
  font-family: var(--font-display);
  font-size: .8rem;
  color: var(--red);
  letter-spacing: 0;
}

.header-search { justify-self: end; width: min(100%, 340px); margin-right: 16px; }
.search-form { display: flex; border: 2px solid var(--line); background: var(--card); }
.search-form label { flex: 1; display: flex; }
.search-field {
  flex: 1; min-width: 0;
  border: 0; background: transparent;
  padding: 10px 12px;
  font: inherit; font-size: .95rem; color: var(--ink);
}
.search-field:focus { outline: none; }
.search-form:focus-within { outline: 3px solid var(--blue); outline-offset: 2px; }
.search-submit {
  border: 0; border-left: 2px solid var(--line);
  background: var(--ink); color: var(--paper);
  padding: 0 16px;
  font: inherit; font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em;
  cursor: pointer;
}
.search-submit:hover { background: var(--red); }

.main-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; }
.main-navigation a {
  font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em;
  text-decoration: none;
  padding-block: 6px;
  border-bottom: 3px solid transparent;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a { border-bottom-color: var(--red); }

.menu-toggle {
  display: none;
  font: inherit; font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em;
  background: var(--ink); color: var(--paper);
  border: 0; padding: 10px 14px; cursor: pointer;
}

/* ---------- Category rail ---------- */
.category-rail { border-bottom: 1px solid var(--soft-line); background: var(--card); }
.category-bar {
  display: flex; gap: 0;
  margin: 0; padding: 0; list-style: none;
  overflow-x: auto; scrollbar-width: none;
}
.category-bar::-webkit-scrollbar { display: none; }
.category-bar a {
  display: block; white-space: nowrap;
  padding: 12px 18px;
  font-weight: 700; font-size: .9rem;
  text-decoration: none;
  border-right: 1px solid var(--soft-line);
}
.category-bar li:first-child a { border-left: 1px solid var(--soft-line); }
.category-bar a:hover { background: var(--ink); color: var(--paper); }
.category-bar .is-active a { background: var(--red); color: #fff; }

/* ---------- Layout ---------- */
.site-content .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar);
  gap: clamp(32px, 4vw, 56px);
  padding-block: clamp(28px, 4vw, 48px);
}

/* ---------- Section heading ---------- */
.section-heading {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin: clamp(36px, 5vw, 56px) 0 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--line);
}
.section-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  line-height: 1;
}
.section-heading .count { font-weight: 700; font-size: .85rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

/* ---------- Posts ---------- */
.post { position: relative; display: flex; flex-direction: column; }

.post-thumbnail {
  position: relative; display: block;
  aspect-ratio: 3 / 2;
  border: 2px solid var(--line);
  background: var(--ink);
  transition: transform .2s ease, box-shadow .2s ease;
}
.post-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.posts-grid .post:hover .post-thumbnail,
.featured-post:hover .post-thumbnail { transform: translate(-6px, -6px); box-shadow: 6px 6px 0 var(--blue); }

.ph { width: 100%; height: 100%; }
.ph-1 { background: linear-gradient(90deg, var(--ink) 0 50%, var(--red) 50%); }
.ph-2 { background: radial-gradient(circle at 35% 50%, var(--red) 0 30%, transparent 30.5%), var(--ink); }
.ph-3 { background: repeating-linear-gradient(0deg, var(--ink) 0 14px, var(--paper) 14px 28px); }
.ph-4 { background: linear-gradient(135deg, var(--blue) 0 50%, var(--paper) 50%); }
.ph-5 { background: conic-gradient(var(--ink) 25%, var(--red) 0 50%, var(--ink) 0 75%, var(--paper) 0) 0 0 / 50% 50%; }

.entry-wrap { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; }

.cat-links { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.cat-links a {
  font-weight: 800; font-size: .75rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--red); text-decoration: none;
}
.cat-links a:hover { text-decoration: underline; }

.entry-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.entry-title a { text-decoration: none; }
.entry-title a:hover { background: var(--ink); color: var(--paper); box-decoration-break: clone; -webkit-box-decoration-break: clone; }

.entry-summary { margin: 0; color: var(--muted); font-size: .95rem; }
.entry-summary p { margin: 0; }

.entry-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
}
.entry-meta .sep { width: 6px; height: 6px; background: var(--red); }

.more-link {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  margin-top: 6px; padding: 12px 22px;
  background: var(--ink); color: var(--paper);
  font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em;
  text-decoration: none;
  transition: background .15s;
}
.more-link:hover { background: var(--red); }

/* Featured */
.post.featured-post {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(20px, 3vw, 36px);
  align-items: end;
  padding-bottom: clamp(28px, 4vw, 40px);
  border-bottom: 1px solid var(--soft-line);
}
.featured-post .post-thumbnail { aspect-ratio: 4 / 3; }
.featured-post .entry-wrap { padding-top: 0; }
.featured-post .entry-title { font-size: clamp(2rem, 3.6vw, 3.2rem); line-height: 1; }
.sticker {
  position: absolute; top: 0; left: 0; z-index: 2;
  padding: 6px 12px;
  background: var(--red); color: #fff;
  font-weight: 800; font-size: .75rem; text-transform: uppercase; letter-spacing: .14em;
  pointer-events: none;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 3.5vw, 44px) clamp(20px, 3vw, 36px);
}

/* ---------- Pagination ---------- */
.pagination { margin-block: clamp(44px, 6vw, 64px) 0; padding-top: 24px; border-top: 3px solid var(--line); }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.page-numbers {
  display: grid; place-items: center;
  min-width: 44px; height: 44px; padding-inline: 14px;
  border: 2px solid var(--line);
  font-weight: 800; text-decoration: none;
  transition: background .15s, color .15s;
}
a.page-numbers:hover { background: var(--ink); color: var(--paper); }
.page-numbers.current { background: var(--red); border-color: var(--red); color: #fff; }
.page-numbers.dots { border-color: transparent; }
.page-numbers.next { margin-left: auto; padding-inline: 20px; }

/* ---------- Sidebar / widgets ---------- */
.widget-area { display: flex; flex-direction: column; gap: 32px; }
.widget-area .sticky-zone { position: sticky; top: 108px; display: flex; flex-direction: column; gap: 32px; }

.widget { background: var(--card); border: 2px solid var(--line); }
.widget-title {
  margin: 0;
  padding: 10px 14px;
  background: var(--ink); color: var(--paper);
  font-family: var(--font-display);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.widget-body { padding: 14px; }

/* Ad slot (300x250) */
.widget_ad { border-style: dashed; background: transparent; }
.widget_ad .widget-title { background: transparent; color: var(--muted); font-family: var(--font-body); font-size: .7rem; font-weight: 700; letter-spacing: .14em; padding: 6px 10px 0; }
.ad-slot {
  width: 300px; max-width: 100%; height: 250px;
  margin: 8px auto 12px;
  display: grid; place-items: center;
  background: repeating-linear-gradient(45deg, transparent 0 10px, rgba(17, 17, 17, .05) 10px 20px);
  color: var(--muted); font-weight: 700; font-size: .85rem;
}

/* Categories with live filter */
.cat-filter {
  width: 100%;
  margin-bottom: 10px;
  padding: 9px 10px;
  border: 2px solid var(--line); background: var(--paper);
  font: inherit; font-size: .9rem;
}
.cat-filter:focus { outline: 3px solid var(--blue); outline-offset: 1px; }
.widget_categories ul {
  list-style: none; margin: 0; padding: 0 4px 0 0;
  max-height: 320px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--ink) transparent;
}
.widget_categories li {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--soft-line);
  font-size: .78rem; font-weight: 700; color: var(--muted);
}
.widget_categories li[hidden] { display: none; }
.widget_categories li a { font-size: .95rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.widget_categories li a:hover { color: var(--red); }

/* Tag cloud */
.tagcloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tagcloud a {
  font-size: .82rem !important;
  font-weight: 700;
  padding: 5px 10px;
  border: 2px solid var(--line);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.tagcloud a:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* Latest updates */
.widget_recent_entries ul,
.widget_recent_entries ol { counter-reset: latest; list-style: none; margin: 0; padding: 0; }
.widget_recent_entries li {
  counter-increment: latest;
  display: grid; grid-template-columns: 30px 1fr; gap: 6px;
  padding: 8px 0; border-bottom: 1px solid var(--soft-line);
}
.widget_recent_entries li:last-child { border-bottom: 0; }
.widget_recent_entries li::before {
  content: counter(latest, decimal-leading-zero);
  font-family: var(--font-display); font-size: .9rem; color: var(--red);
}
.widget_recent_entries a { font-weight: 600; font-size: .95rem; line-height: 1.3; text-decoration: none; }
.widget_recent_entries a:hover { text-decoration: underline; }

/* Archives dropdown */
.widget_archive select {
  width: 100%;
  padding: 10px 36px 10px 10px;
  border: 2px solid var(--line); border-radius: 0;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23111' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center;
  font: inherit; font-weight: 600; font-size: .95rem;
  appearance: none; -webkit-appearance: none;
  cursor: pointer;
}

/* ---------- Footer ---------- */
.site-footer { margin-top: clamp(40px, 6vw, 72px); background: var(--ink); color: var(--paper); }
.footer-top { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; padding-block: 48px 32px; }
.site-footer .site-title { font-size: 2rem; }
.footer-note { margin: 12px 0 0; color: #a9a49a; font-size: .9rem; max-width: 32ch; }
.footer-heading {
  margin: 0 0 14px;
  font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .16em; color: var(--red);
}
.partner-links {
  list-style: none; margin: 0; padding: 0;
  columns: 3 160px; column-gap: 24px;
}
.partner-links li { break-inside: avoid; padding: 4px 0; }
.partner-links a, .footer-links a { text-decoration: none; color: #d9d4ca; font-size: .92rem; }
.partner-links a:hover, .footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  padding-block: 18px 28px;
  border-top: 1px solid #333;
  font-size: .82rem; color: #a9a49a;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; margin: 0; padding: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .site-content .wrap { grid-template-columns: 1fr; }
  .widget-area { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); align-items: start; }
  .widget-area .sticky-zone { position: static; display: contents; }
}
@media (max-width: 860px) {
  .site-header .wrap { grid-template-columns: 1fr auto; row-gap: 0; padding-block: 12px; }
  .header-search { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; width: 100%; margin: 12px 0 0; }
  .post.featured-post { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .menu-toggle { display: inline-block; }
  .main-navigation { position: relative; }
  .main-navigation ul {
    display: none; position: absolute; right: 0; top: calc(100% + 12px); z-index: 60;
    flex-direction: column; gap: 4px; min-width: 200px; padding: 12px 16px;
    background: var(--card); border: 2px solid var(--line); box-shadow: 6px 6px 0 var(--ink);
  }
  .main-navigation.toggled ul { display: flex; }
}
@media (max-width: 600px) {
  .posts-grid { grid-template-columns: 1fr; }
  .site-header { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* =========================================================================
   WordPress output (menus, widgets, ads, single posts, comments)
   ========================================================================= */

/* Header bits */
.top-links { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; }
.custom-logo-link { display: block; }
.custom-logo { max-height: 56px; width: auto; }
.category-bar .current-menu-item a,
.category-bar .current-cat a { background: var(--red); color: #fff; }
.search-submit { font-family: inherit; }

/* Widgets as WordPress renders them */
.widget { padding: 0 14px 14px; }
.widget-title { margin: 0 -14px 14px; }
.widget select,
.widget .search-form { width: 100%; }
.widget_categories li { flex-wrap: wrap; }
.widget_categories ul ul,
.widget_categories .children { max-height: none; overflow: visible; width: 100%; padding: 4px 0 0 12px; }
.widget_categories .children li:last-child { border-bottom: 0; }

.widget_archive ul,
.widget_nav_menu ul,
.widget_pages ul,
.widget_meta ul,
.widget_recent_comments ul { list-style: none; margin: 0; padding: 0; }
.widget_archive li,
.widget_nav_menu li,
.widget_pages li,
.widget_meta li,
.widget_recent_comments li {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--soft-line);
  font-size: .78rem; font-weight: 700; color: var(--muted);
}
.widget_archive li a,
.widget_nav_menu li a,
.widget_pages li a,
.widget_meta li a,
.widget_recent_comments li a { font-size: .95rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.widget_archive li a:hover,
.widget_nav_menu li a:hover,
.widget_pages li a:hover { color: var(--red); }

.textwidget > :first-child { margin-top: 0; }
.textwidget > :last-child { margin-bottom: 0; }

/* Ads */
.widget_ad { padding: 0 10px 12px; }
.widget_ad .widget-title { margin: 0 0 8px; padding: 6px 0 0; }
.widget_ad .textwidget,
.widget_ad .custom-html-widget { display: flex; justify-content: center; }
.widget_ad iframe,
.widget_ad img { max-width: 100%; }
.widget_ad--empty .ad-slot { text-align: center; padding: 16px; }
.widget_ad--empty .ad-slot a { color: var(--ink); }
.infeed-ad { grid-column: 1 / -1; }
.infeed-ad .widget { margin: 0; }

/* Footer partner links (Navigation Menu / Custom HTML widget) */
.footer-widgets .widget { background: none; border: 0; padding: 0; color: #d9d4ca; }
.footer-widgets .widget + .widget { margin-top: 24px; }
.footer-widgets .widget-title {
  margin: 0 0 14px; padding: 0; background: none;
  font-family: var(--font-body);
  font-size: .75rem; font-weight: 800; letter-spacing: .16em; color: var(--red);
}
.footer-widgets ul { list-style: none; margin: 0; padding: 0; columns: 3 160px; column-gap: 24px; }
.footer-widgets li { break-inside: avoid; padding: 4px 0; border: 0; display: block; }
.footer-widgets a { color: #d9d4ca; font-size: .92rem; font-weight: 400; text-decoration: none; }
.footer-widgets a:hover { color: #fff; text-decoration: underline; }
.site-footer .site-title a { color: var(--paper); }

/* Archive / search headings */
.site-main > .section-heading:first-child { margin-top: 0; }
.section-heading h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  line-height: 1;
}
.archive-description { margin: -8px 0 24px; color: var(--muted); }
.archive-description > :first-child { margin-top: 0; }
.no-results { display: flex; flex-direction: column; gap: 16px; max-width: 520px; }

/* Single posts & pages */
.single-entry { display: block; }
.single-entry .entry-header {
  display: flex; flex-direction: column; gap: 12px;
  padding-bottom: 20px; margin-bottom: 28px;
  border-bottom: 3px solid var(--line);
}
.single-entry .entry-title {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.03em;
}
.entry-content { font-size: 1.08rem; line-height: 1.7; }
.entry-content > * { margin-block: 0 1.2em; }
.entry-content a { color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.entry-content h2,
.entry-content h3,
.entry-content h4 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.02em; margin-top: 1.6em; }
.entry-content img,
.entry-content video { max-width: 100%; height: auto; }
.entry-content figure { margin-inline: 0; }
.entry-content blockquote { margin-left: 0; padding: 4px 0 4px 20px; border-left: 6px solid var(--red); font-weight: 600; }
.entry-content .more-link { color: var(--paper); }
figcaption, .wp-caption-text, .gallery-caption { font-size: .85rem; color: var(--muted); }
.aligncenter { margin-inline: auto; }
.alignleft { float: left; margin: .3em 1.4em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.4em; }
.page-links { font-weight: 700; margin-top: 24px; }

/* Galleries: classic WP, block gallery and NextGEN thumbnails */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.gallery br { display: none; }
.gallery-item { margin: 0; width: auto !important; max-width: none !important; }
.gallery-item img,
.ngg-gallery-thumbnail img,
.wp-block-gallery img { border: 2px solid var(--ink); transition: transform .15s ease, box-shadow .15s ease; }
.gallery-item a:hover img,
.ngg-gallery-thumbnail a:hover img { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--blue); }
.ngg-galleryoverview { display: flex; flex-wrap: wrap; gap: 10px; }
.ngg-galleryoverview .ngg-gallery-thumbnail-box { float: none !important; }

/* Tags under a post */
.entry-footer { margin-top: 28px; }
.tags-links { display: flex; flex-wrap: wrap; gap: 6px; }
.tags-links a {
  font-size: .82rem; font-weight: 700;
  padding: 5px 10px;
  border: 2px solid var(--line);
  text-decoration: none;
}
.tags-links a:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* Previous / next post */
.post-navigation { margin-top: 40px; padding-top: 20px; border-top: 3px solid var(--line); }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.post-navigation a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.post-navigation .nav-next { text-align: right; grid-column: 2; }
.post-navigation .nav-subtitle { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--red); }
.post-navigation .nav-title { font-family: var(--font-display); font-size: 1.1rem; line-height: 1.15; }
.post-navigation a:hover .nav-title { text-decoration: underline; }

/* Comments */
.comments-area { margin-top: 48px; }
.comments-title,
.comment-reply-title { font-family: var(--font-display); font-size: 1.5rem; text-transform: uppercase; margin: 0 0 16px; }
.comment-list { list-style: none; margin: 0 0 32px; padding: 0; }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-body { padding: 16px 0; border-bottom: 1px solid var(--soft-line); }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: .85rem; }
.comment-author .avatar { float: left; margin-right: 10px; }
.comment-metadata a { color: var(--muted); text-decoration: none; }
.reply a { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--red); }
.comment-form label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 4px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%; padding: 10px 12px;
  border: 2px solid var(--line); border-radius: 0; background: var(--card);
  font: inherit;
}
.comment-form .submit {
  background: var(--ink); color: var(--paper);
  border: 0; padding: 12px 22px; cursor: pointer;
  font: inherit; font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em;
}
.comment-form .submit:hover { background: var(--red); }

/* 404 */
.error-404 .search-form { max-width: 420px; margin-bottom: 20px; }

@media (max-width: 760px) {
  .top-links { display: none; }
  .post-navigation .nav-links { grid-template-columns: 1fr; }
  .post-navigation .nav-next { grid-column: auto; text-align: left; }
}

/* =========================================================================
   Block-based widgets (WordPress' default widgets screen)
   ========================================================================= */
.widget_block { padding: 14px; }
.widget_block > .wp-block-heading:first-child,
.widget_block .wp-block-group__inner-container > .wp-block-heading:first-child,
.widget_block .wp-block-group > .wp-block-heading:first-child {
  margin: -14px -14px 14px;
  padding: 10px 14px;
  background: var(--ink); color: var(--paper);
  font-family: var(--font-display);
  font-size: 1rem; line-height: 1.3;
  text-transform: uppercase; letter-spacing: .02em;
}
.widget_block .wp-block-group { margin: 0; }
.widget_block > :last-child,
.widget_block .wp-block-group__inner-container > :last-child { margin-bottom: 0; }
.widget_block ul,
.widget_block ol { list-style: none; margin: 0; padding: 0; }
.widget_block li {
  padding: 7px 0;
  border-bottom: 1px solid var(--soft-line);
  font-size: .78rem; font-weight: 700; color: var(--muted);
}
.widget_block li:last-child { border-bottom: 0; }
.widget_block li a { font-size: .95rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.widget_block li a:hover { color: var(--red); }

/* Categories block: scrollable, filterable */
.wp-block-categories-list { max-height: 320px; overflow-y: auto; padding-right: 4px !important; scrollbar-width: thin; scrollbar-color: var(--ink) transparent; }
.wp-block-categories-list li,
.wp-block-archives-list li { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.wp-block-categories-list li[hidden] { display: none; }
.wp-block-categories-list .children { max-height: none; width: 100%; padding-left: 12px; }

/* Latest posts block, numbered */
.wp-block-latest-posts { counter-reset: latest; }
.wp-block-latest-posts li { counter-increment: latest; display: grid; grid-template-columns: 30px 1fr; gap: 2px 6px; }
.wp-block-latest-posts li::before { content: counter(latest, decimal-leading-zero); font-family: var(--font-display); font-size: .9rem; color: var(--red); }
.wp-block-latest-posts li > :not(a) { grid-column: 2; }
.wp-block-latest-posts a { line-height: 1.3; }

/* Tag cloud block */
.wp-block-tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.wp-block-tag-cloud a {
  font-size: .82rem !important; font-weight: 700;
  padding: 5px 10px; margin: 0 !important;
  border: 2px solid var(--line); text-decoration: none;
}
.wp-block-tag-cloud a:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* Search block */
.wp-block-search__label { display: block; margin-bottom: 8px; font-family: var(--font-display); text-transform: uppercase; }
.wp-block-search__inside-wrapper { display: flex; border: 2px solid var(--line); background: var(--card); padding: 0 !important; }
.wp-block-search__input { flex: 1; min-width: 0; border: 0 !important; background: transparent; padding: 10px 12px; font: inherit; font-size: .95rem; }
.wp-block-search__input:focus { outline: none; }
.wp-block-search__inside-wrapper:focus-within { outline: 3px solid var(--blue); outline-offset: 2px; }
.wp-block-search__button {
  margin: 0 !important; border: 0; border-left: 2px solid var(--line); border-radius: 0;
  background: var(--ink); color: var(--paper); padding: 0 14px; cursor: pointer;
  font: inherit; font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em;
}
.wp-block-search__button:hover { background: var(--red); }

/* Dropdowns (archives / categories as dropdown) */
.widget select {
  width: 100%;
  padding: 10px 36px 10px 10px;
  border: 2px solid var(--line); border-radius: 0;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23111' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center;
  font: inherit; font-weight: 600; font-size: .95rem;
  appearance: none; -webkit-appearance: none; cursor: pointer;
}

/* Ad blocks */
.widget_ad.widget_block { padding: 10px; text-align: center; }
.widget_ad.widget_block .wp-block-heading:first-child {
  margin: 0 0 8px; padding: 0; background: none; color: var(--muted);
  font-family: var(--font-body); font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-align: left;
}

/* Footer blocks */
.footer-widgets .widget_block { padding: 0; }
.footer-widgets .widget_block .wp-block-heading:first-child {
  margin: 0 0 14px; padding: 0; background: none; color: var(--red);
  font-family: var(--font-body); font-size: .75rem; font-weight: 800; letter-spacing: .16em;
}
.footer-widgets .widget_block ul { columns: 3 160px; column-gap: 24px; }
.footer-widgets .widget_block li { border: 0; padding: 4px 0; break-inside: avoid; }
.footer-widgets .widget_block li a { color: #d9d4ca; font-weight: 400; font-size: .92rem; }

/* Fixes */
.search-form label { min-width: 0; }
.search-field { width: 100%; }
.wp-block-archives-dropdown > label,
.wp-block-categories-dropdown > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* =========================================================================
   1.0.1 — long site titles, featured layout, empty widgets
   ========================================================================= */
[hidden] { display: none !important; }

/* Header copes with long site titles: the title wraps, search keeps its room */
.site-header .wrap { grid-template-columns: minmax(0, max-content) minmax(240px, 1fr) auto; }
.site-branding { flex-wrap: wrap; align-items: baseline; min-width: 0; column-gap: 10px; row-gap: 0; padding-block: 10px; }
.site-title { font-size: clamp(1.4rem, 2.4vw, 2.2rem); line-height: 1.05; overflow-wrap: anywhere; }
.site-description {
  flex-basis: 100%;
  margin: 4px 0 0;
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted);
}
.header-search { justify-self: end; width: 100%; max-width: 340px; }

/* Featured post: image and text start at the same line; label sits on the image */
.post.featured-post { align-items: start; }
.featured-post .entry-title { font-size: clamp(1.7rem, 2.6vw, 2.4rem); line-height: 1.05; }
.featured-post .entry-summary p {
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}

@media (max-width: 860px) {
  .header-search { max-width: none; }
  .site-branding { padding-block: 0; }
}
@media (max-width: 600px) {
  .site-title { font-size: 1.35rem; }
  .site-description { font-size: .68rem; }
}

/* =========================================================================
   1.0.2 — header: title + tagline on the first row, search + menu below
   ========================================================================= */
.site-header .wrap {
  grid-template-columns: minmax(0, 1fr) auto;
  row-gap: 12px;
  min-height: 0;
  padding-block: 14px;
}
.site-branding {
  grid-column: 1 / -1;
  grid-row: 1;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 16px;
  row-gap: 2px;
  padding-block: 0;
}
.site-description {
  flex-basis: auto;
  margin: 0;
  font-size: .85rem;
}
.header-search { grid-column: 1; grid-row: 2; justify-self: start; max-width: 460px; margin: 0; }
.main-navigation { grid-column: 2; grid-row: 2; }

@media (max-width: 860px) {
  .site-branding { grid-column: 1; }
  .main-navigation { grid-column: 2; grid-row: 1; align-self: center; }
  .header-search { grid-column: 1 / -1; grid-row: 2; max-width: none; justify-self: stretch; }
  .site-description { font-size: .72rem; }
}

/* =========================================================================
   1.0.3 — every thumbnail is the same shape, whatever the image's size
   ========================================================================= */
.post-thumbnail { position: relative; overflow: hidden; min-height: 0; height: auto; }
.post-thumbnail img,
.post-thumbnail .ph {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  object-fit: cover;
  object-position: center 25%;
}
.post-thumbnail .sticker { z-index: 2; }

/* 1.0.5 — longer pagination rows wrap neatly on phones */
@media (max-width: 600px) {
  .nav-links { gap: 5px; }
  .page-numbers { min-width: 38px; height: 38px; padding-inline: 8px; font-size: .9rem; }
  .page-numbers.next,
  .page-numbers.prev { flex: 1 1 calc(50% - 3px); order: 1; margin-left: 0; }
}

/* =========================================================================
   1.0.9 — Age verification screen
   ========================================================================= */
.age-gate { display: none; }

html.age-locked,
html.age-locked body { overflow: hidden; }

html.age-locked body > *:not(.age-gate):not(script) {
  filter: blur(24px);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

html.age-locked .age-gate {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow-y: auto;
  background: rgba(17, 17, 17, .55);
}

.age-gate__card {
  width: min(100%, 540px);
  padding: clamp(24px, 5vw, 44px);
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 10px 10px 0 var(--red);
  text-align: center;
}
.age-gate__badge {
  display: inline-grid; place-items: center;
  width: 76px; height: 76px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--red); color: #fff;
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: -0.02em;
}
.age-gate__site {
  margin: 0 0 4px;
  font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .14em;
  color: var(--muted);
}
.age-gate__title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.age-gate__text { margin: 0 0 26px; color: var(--muted); font-size: .98rem; line-height: 1.55; }
.age-gate__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.age-gate__enter,
.age-gate__leave {
  display: inline-grid; place-items: center;
  padding: 14px 22px;
  border: 3px solid var(--ink);
  font: inherit; font-weight: 800; font-size: .9rem;
  text-transform: uppercase; letter-spacing: .06em;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.age-gate__enter { flex: 1 1 240px; background: var(--red); color: #fff; }
.age-gate__enter:hover { background: var(--ink); }
.age-gate__leave { flex: 0 1 auto; background: transparent; color: var(--ink); }
.age-gate__leave:hover { background: var(--ink); color: var(--paper); }
.age-gate__enter:focus-visible,
.age-gate__leave:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

@media (max-width: 480px) {
  .age-gate__leave { flex: 1 1 100%; }
}
