/*
Theme Name: Goonj Times
Theme URI: https://example.com/goonj-times
Author: Goonj Times
Description: A WordPress news theme for Goonj Times with homepage, category, single article, policy pages, and AdSense-ready ad slots.
Version: 1.1.9
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: goonj-times
*/

:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #636363;
  --line: #ded8ce;
  --paper: #fffdf8;
  --panel: #f5f1e9;
  --surface: #fff;
  --header-bg: rgba(255, 253, 248, 0.96);
  --nav-text: #363636;
  --button-ink: #fff;
  --ad-bg: repeating-linear-gradient(135deg, #fafafa, #fafafa 10px, #f1f1f1 10px, #f1f1f1 20px);
  --ad-text: #777;
  --field-bg: #fff;
  --field-line: #494949;
  --newsletter-muted: #d8d8d8;
  --accent: #b42318;
  --accent-dark: #7a1a12;
  --olive: #5b6b35;
  --gold: #c98b25;
  --shadow: 0 16px 36px rgba(23, 23, 23, 0.09);
  --site-width: 1280px;
  --sidebar-width: 340px;
  --hero-image-height: 390px;
  --thumb-width: 220px;
  --thumb-height: 156px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f4f0e8;
  --muted: #b9b1a5;
  --line: #3a342c;
  --paper: #12100d;
  --panel: #1e1a16;
  --surface: #181511;
  --header-bg: rgba(18, 16, 13, 0.96);
  --nav-text: #e7dfd3;
  --button-ink: #15110e;
  --ad-bg: repeating-linear-gradient(135deg, #201c18, #201c18 10px, #181512 10px, #181512 20px);
  --ad-text: #a79d91;
  --field-bg: #15120f;
  --field-line: #474038;
  --newsletter-muted: #5d554d;
  --accent: #f06c5f;
  --accent-dark: #ff9388;
  --olive: #b4c27f;
  --gold: #f0b858;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

a[href*="terms-and-conditions"],
a[href*="advertising"],
a[href*="publisher"] {
  display: none !important;
}

.utility-bar ul,
.nav-links ul,
.site-footer ul {
  display: contents;
  margin: 0;
  padding: 0;
  list-style: none;
}

.utility-bar li,
.nav-links li,
.site-footer li {
  display: contents;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
}

.topbar,
.ticker,
.utility-bar,
.simple-header,
main,
.site-footer {
  width: min(var(--site-width), calc(100% - 32px));
  margin-inline: auto;
}

.utility-bar {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.utility-bar nav,
.simple-header nav {
  display: flex;
  align-items: center;
  gap: 10px 16px;
  flex-wrap: wrap;
}

.topbar {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(23, 23, 23, 0.08);
  overflow: hidden;
}

[data-theme="dark"] .brand-mark {
  background: #fffdf8;
  border-color: #5a5148;
}

.brand-mark img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-name {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.48rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.brand-kicker {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex: 1;
  color: var(--nav-text);
  font-size: 0.88rem;
  font-weight: 700;
  min-width: 0;
}

.subscribe-button,
.email-row button {
  border: 0;
  background: var(--ink);
  color: var(--button-ink);
  border-radius: 4px;
  font-weight: 800;
  padding: 11px 16px;
  cursor: pointer;
}

.subscribe-button:hover,
.email-row button:hover {
  background: var(--accent);
  color: #fff;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 8px 12px;
}

.theme-toggle::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: inset -5px -5px 0 0 currentColor;
}

[data-theme="dark"] .theme-toggle::before {
  box-shadow: inset 5px 5px 0 0 currentColor;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.ticker {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 10px 0 12px;
  font-size: 0.92rem;
  color: var(--muted);
  overflow: hidden;
}

.ticker span {
  display: block;
  min-width: 0;
}

.ticker span.is-sliding {
  animation: ticker-slide 620ms ease;
}

@keyframes ticker-slide {
  from {
    opacity: 0;
    transform: translateX(34px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.ticker strong,
.section-label {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

main {
  padding: 26px 0 46px;
}

.ad-slot {
  display: none;
  place-items: center;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--ad-bg);
  color: var(--ad-text);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ad-slot-custom {
  display: block;
  padding: 10px;
  text-align: center;
  text-transform: none;
}

.ad-slot-custom ins,
.ad-slot-custom iframe {
  margin-inline: auto;
  max-width: 100%;
}

.ad-slot-wide {
  min-height: 76px;
  margin-bottom: 22px;
}

.ad-slot-box {
  min-height: 220px;
}

.ad-slot-inline {
  min-height: 120px;
  margin: 30px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
  gap: 22px;
  align-items: stretch;
}

.lead-story {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 0.8fr);
  border-bottom: 3px solid var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.image-wrap {
  display: block;
  min-height: var(--hero-image-height);
  height: 100%;
  overflow: hidden;
}

.image-wrap img,
.story-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-wrap img {
  min-height: var(--hero-image-height);
}

.story-content {
  padding: clamp(20px, 3vw, 34px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
  text-wrap: balance;
}

h1,
h2 {
  font-family: "Source Serif 4", Georgia, serif;
}

h1 {
  margin-top: 12px;
  max-width: 13ch;
  font-size: clamp(1.8rem, 3.1vw, 3rem);
  font-weight: 800;
}

.lead-story h1 {
  max-width: 18ch;
  font-size: clamp(1.9rem, 2.6vw, 2.55rem);
  line-height: 1.08;
}

.lead-story h1 a {
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.12em;
}

.lead-story h1 a:hover {
  text-decoration: underline;
}

.story-content p,
.story-card p,
.newsletter p,
.site-footer p {
  color: var(--muted);
}

.lead-story,
.story-card,
.briefing-panel,
.side-section,
.text-page,
.publisher-form,
.publisher-output,
.article-body,
.article-image {
  color: var(--ink);
}

.lead-story a,
.story-card a,
.briefing-panel a,
.side-section a,
.text-page a,
.article-body a {
  color: var(--ink);
}

.text-page p,
.article-body p,
.article-body li,
.article-standfirst,
.page-hero p,
.story-content p,
.story-card p,
.site-footer p {
  color: var(--muted);
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.text-page h1,
.text-page h2,
.text-page h3,
.story-card h3,
.side-section h2,
.newsletter h2 {
  color: var(--ink);
}

.text-page a,
.article-body a,
.side-section a:hover,
.story-card a:hover {
  color: var(--accent);
}

.story-content p {
  font-size: 1rem;
}

.story-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.briefing-panel,
.side-section,
.newsletter {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 18px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.briefing-item {
  display: block;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.briefing-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.briefing-item span {
  display: block;
  color: var(--olive);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.briefing-item strong {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.04rem;
  line-height: 1.18;
  text-wrap: balance;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
  gap: 30px;
  margin-top: 34px;
}

.section-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 30px;
  background: var(--line);
  border: 1px solid var(--line);
}

.section-strip a {
  display: grid;
  gap: 4px;
  min-height: 78px;
  background: var(--surface);
  padding: 15px;
}

.section-strip strong {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.08rem;
}

.section-strip span {
  color: var(--muted);
  font-size: 0.88rem;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 14px;
  margin-bottom: 22px;
}

.section-heading h2,
.side-section h2,
.newsletter h2 {
  font-size: clamp(1.25rem, 1.6vw, 1.55rem);
}

.section-heading a {
  color: var(--accent);
  font-weight: 800;
}

.story-list {
  display: grid;
  gap: 18px;
}

.latest-empty {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-weight: 700;
  margin: 0;
  padding: 18px;
}

.story-card {
  display: grid;
  grid-template-columns: var(--thumb-width) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.story-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
}

.story-thumb {
  display: block;
  width: var(--thumb-width);
  height: var(--thumb-height);
  overflow: hidden;
  background: var(--panel);
}

.story-thumb img,
.story-card .wp-post-image {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.story-card h3 {
  margin-top: 8px;
  font-family: "Source Serif 4", Georgia, serif;
  max-width: 24ch;
  font-size: clamp(1.1rem, 1.35vw, 1.32rem);
  line-height: 1.16;
}

.story-card p {
  margin: 8px 0 12px;
  font-size: 0.93rem;
}

.sidebar {
  display: grid;
  gap: 24px;
  align-content: start;
}

.trending-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: trending;
}

.trending-list li {
  counter-increment: trending;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.16;
}

.trending-list li::before {
  content: counter(trending, decimal-leading-zero);
  color: var(--gold);
  font-family: Inter, Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
}

.newsletter {
  background: var(--ink);
  color: var(--button-ink);
  border-color: var(--ink);
}

[data-theme="dark"] .newsletter {
  background: #f4f0e8;
  color: #15110e;
  border-color: #f4f0e8;
}

[data-theme="dark"] .newsletter h2,
[data-theme="dark"] .newsletter label {
  color: #15110e;
}

.newsletter p {
  color: var(--newsletter-muted);
}

[data-theme="dark"] .newsletter p {
  color: #4f463d;
}

.newsletter label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.84rem;
  font-weight: 800;
}

.email-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.email-row input {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--field-line);
  border-radius: 4px;
  background: var(--field-bg);
  color: var(--ink);
  padding: 12px;
  font: inherit;
}

.email-row input::placeholder,
.contact-form input::placeholder,
.contact-form textarea::placeholder,
.publisher-form input::placeholder,
.publisher-form textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

.email-row button {
  background: var(--accent);
}

.email-row button:hover {
  background: var(--accent-dark);
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px 28px;
  border-top: 1px solid var(--line);
  padding: 28px 0 20px;
  color: var(--muted);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 800;
}

.footer-brand img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: contain;
}

[data-theme="dark"] .footer-brand img {
  background: #fffdf8;
  box-shadow: 0 0 0 4px #fffdf8;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-weight: 700;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 12px;
  font-size: 0.84rem;
  font-weight: 800;
}

.social-links a {
  color: var(--accent);
}

.copyright {
  grid-column: 1 / -1;
  justify-self: center;
  width: 100%;
  border-top: 1px solid var(--line);
  margin: 4px 0 0;
  padding-top: 16px;
  text-align: center;
  font-size: 0.82rem;
}

.page-hero,
.article-header,
.text-page {
  width: 100%;
}

.article-header {
  border-bottom: 2px solid var(--ink);
  padding: 10px 0 26px;
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.article-breadcrumb span::before {
  content: "/";
  margin-right: 9px;
  color: var(--line);
}

.page-hero {
  border-bottom: 2px solid var(--ink);
  padding: 24px 0 20px;
}

.page-hero h1,
.article-header h1,
.text-page h1 {
  margin-top: 10px;
  font-family: "Source Serif 4", Georgia, serif;
  max-width: 22ch;
  font-size: clamp(1.8rem, 3.8vw, 3.25rem);
  line-height: 1.07;
}

.article-header h1 {
  max-width: 980px;
  font-size: clamp(1.8rem, 2.5vw, 2.45rem);
  line-height: 1.12;
  overflow-wrap: break-word;
}

.page-hero p,
.article-standfirst {
  color: var(--muted);
  font-size: clamp(1rem, 1.45vw, 1.14rem);
}

.article-standfirst {
  max-width: 920px;
  margin: 18px 0 0;
  line-height: 1.55;
}

.article-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.author-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.author-avatar {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--button-ink);
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
}

.author-lockup strong,
.author-lockup span {
  display: block;
}

.author-lockup strong {
  font-size: 0.94rem;
}

.author-lockup span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.article-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.article-actions a {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 8px 12px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
}

[data-theme="dark"] .article-actions a,
[data-theme="dark"] .theme-toggle,
[data-theme="dark"] .nav-links a {
  color: var(--ink);
}

.article-actions a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.article-shell {
  display: grid;
  gap: 24px;
  width: 100%;
  max-width: var(--site-width);
  margin-inline: auto;
}

.article-image {
  width: min(960px, 100%);
  margin: 0;
}

.article-image img {
  display: block;
  width: 100%;
  height: clamp(220px, 34vw, 360px);
  object-fit: cover;
}

.article-image figcaption {
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
  padding: 10px 0 14px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  align-items: start;
  justify-content: stretch;
}

.article-body {
  font-family: Inter, Arial, sans-serif;
  font-size: clamp(0.98rem, 1.05vw, 1.06rem);
  line-height: 1.72;
  min-width: 0;
  max-width: none;
  overflow-wrap: anywhere;
}

.article-body > * {
  max-width: 100%;
}

.article-body p {
  margin: 0 0 18px;
}

.article-body > p:first-child {
  font-size: clamp(1.02rem, 1.18vw, 1.12rem);
  color: var(--ink);
}

.article-body ul,
.article-body ol {
  margin: 0 0 20px 22px;
  padding: 0;
}

.article-body li {
  margin-bottom: 10px;
}

.article-body img,
.article-body .wp-block-image img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.article-body figure,
.article-body .wp-block-image {
  width: 100%;
  max-width: 100%;
  margin: 22px 0;
}

.article-body .alignwide,
.article-body .alignfull,
.article-body .size-full,
.article-body .size-large {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.article-body iframe,
.article-body video,
.article-body embed {
  max-width: 100%;
}

.article-body figcaption,
.wp-caption-text {
  color: var(--muted);
  font-family: Inter, Arial, sans-serif;
  font-size: 0.86rem;
  line-height: 1.45;
  margin-top: 8px;
}

.article-body .wp-block-quote {
  border-left: 3px solid var(--accent);
  color: var(--muted);
  margin: 28px 0;
  padding: 8px 0 8px 18px;
}

.article-body h2,
.text-page h2 {
  margin: 28px 0 10px;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.28rem, 1.9vw, 1.7rem);
  line-height: 1.14;
}

.article-body h3,
.article-body h4 {
  margin: 24px 0 8px;
  font-family: "Source Serif 4", Georgia, serif;
  line-height: 1.18;
}

.article-aside {
  display: grid;
  gap: 22px;
  position: sticky;
  top: 142px;
}

.article-note,
.correction-note {
  border-left: 3px solid var(--accent);
  background: var(--panel);
  padding: 16px 18px;
}

.article-note {
  font-family: Inter, Arial, sans-serif;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.55;
}

.correction-note {
  margin-top: 28px;
}

.article-info-list {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
}

.article-info-list div {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.article-info-list dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.article-info-list dd {
  margin: 3px 0 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.22;
}

.related-link {
  display: block;
  border-top: 1px solid var(--line);
  padding: 14px 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.18;
}

.nav-links .current-menu-item > a,
.nav-links .current-cat > a {
  color: var(--accent);
}

.nav-links .page-numbers,
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  font-weight: 800;
  padding: 6px 10px;
}

.page-numbers.current {
  background: var(--ink);
  color: var(--button-ink);
}

.navigation.pagination {
  margin-top: 28px;
}

.nav-links {
  align-items: center;
}

.simple-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 82px;
  border-bottom: 1px solid var(--line);
}

.simple-header nav,
.mini-footer {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.page-main {
  min-height: calc(100vh - 170px);
}

.text-page {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 54px);
  overflow-wrap: anywhere;
}

.page-intro {
  max-width: 920px;
  color: var(--ink);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.6;
}

.policy-date,
.form-note {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.text-page p,
.contact-grid p {
  color: var(--muted);
}

.text-page a {
  color: var(--accent);
  font-weight: 800;
}

.info-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0;
}

.info-cards section {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 18px;
}

.info-cards h2 {
  margin-top: 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 28px 0;
}

.contact-grid div {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 18px;
}

.contact-grid h2 {
  margin-top: 0;
  font-size: 1.3rem;
}

.contact-form {
  display: grid;
  gap: 10px;
}

.contact-form label {
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--field-bg);
  color: var(--ink);
  padding: 12px;
  font: inherit;
}

.contact-form button {
  width: max-content;
  border: 0;
  border-radius: 4px;
  background: var(--ink);
  color: var(--button-ink);
  cursor: pointer;
  font-weight: 800;
  padding: 12px 18px;
}

.publisher-page {
  display: grid;
  gap: 28px;
}

.publisher-form,
.publisher-output {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(20px, 4vw, 34px);
}

.publisher-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.publisher-form label,
.publisher-output h2 {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

.publisher-form label:nth-last-of-type(-n + 2) {
  grid-column: 1 / -1;
}

.publisher-form input,
.publisher-form textarea,
.publisher-output textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--field-bg);
  color: var(--ink);
  padding: 12px;
  font: inherit;
  font-weight: 500;
}

.publisher-form textarea,
.publisher-output textarea {
  resize: vertical;
}

.publisher-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.publisher-actions button {
  border: 0;
  border-radius: 4px;
  background: var(--ink);
  color: var(--button-ink);
  cursor: pointer;
  font-weight: 800;
  padding: 12px 16px;
}

.publisher-actions button:hover {
  background: var(--accent);
  color: #fff;
}

.mini-footer {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 16px;
  padding: 24px 0;
}

.mini-footer span {
  order: 2;
  flex: 0 0 100%;
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 14px;
  text-align: center;
}

.mini-footer a {
  order: 1;
}

@media (max-width: 980px) {
  .site-header {
    position: static;
  }

  .topbar {
    flex-wrap: wrap;
    padding: 16px 0;
    gap: 16px;
  }

  .nav-links {
    order: 3;
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px 8px;
    padding-bottom: 8px;
  }

  .nav-links a {
    flex: 0 1 auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    padding: 8px 12px;
    max-width: 100%;
  }

  .hero-grid,
  .content-layout,
  .lead-story,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .section-strip,
  .contact-grid,
  .publisher-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-aside {
    position: static;
  }

  .article-shell {
    max-width: 760px;
  }

  .article-image {
    width: 100%;
  }

  .article-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .article-body {
    max-width: 100%;
  }

  .image-wrap {
    min-height: 280px;
  }

  .image-wrap img {
    min-height: 280px;
  }

  .story-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .ad-slot-box {
    min-height: 150px;
  }
}

@media (max-width: 640px) {
  .topbar,
  .ticker,
  .utility-bar,
  .simple-header,
  main,
  .site-footer {
    width: min(100% - 22px, var(--site-width));
  }

  .utility-bar,
  .simple-header {
    align-items: center;
    flex-direction: column;
    gap: 8px;
    padding: 10px 0;
    text-align: center;
  }

  .utility-bar nav,
  .simple-header nav {
    width: 100%;
    justify-content: center;
    gap: 8px;
  }

  .simple-header .theme-toggle {
    margin-top: 2px;
  }

  .utility-bar > span {
    display: none;
  }

  .utility-bar nav a,
  .simple-header nav a {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
    color: var(--muted);
    font-size: 0.78rem;
  }

  .brand-name {
    font-size: 1.22rem;
  }

  .brand {
    width: 100%;
    justify-content: center;
    min-width: 0;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
  }

  .brand-mark img {
    width: 34px;
    height: 34px;
  }

  .subscribe-button {
    display: none;
  }

  .topbar .theme-toggle {
    margin-inline: auto;
  }

  .nav-links {
    width: 100%;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    justify-content: center;
    gap: 8px 12px;
    margin-top: 2px;
    padding: 10px 0;
  }

  .nav-links a {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0 4px;
    color: var(--nav-text);
    font-size: 0.82rem;
    text-transform: uppercase;
  }

  .ticker {
    align-items: flex-start;
    border-top: 0;
    background: var(--surface);
    border-left: 3px solid var(--accent);
    margin-top: 8px;
    padding: 10px 12px;
    gap: 8px;
    font-size: 0.84rem;
  }

  .story-content {
    padding: 18px;
  }

  h1 {
    max-width: 16ch;
    font-size: clamp(1.65rem, 8.5vw, 2.25rem);
  }

  .lead-story h1 {
    max-width: 100%;
    font-size: clamp(1.7rem, 7.5vw, 2.15rem);
    line-height: 1.07;
  }

  .page-hero h1,
  .article-header h1,
  .text-page h1 {
    max-width: 17ch;
    font-size: clamp(1.65rem, 8.5vw, 2.35rem);
    line-height: 1.06;
  }

  .article-header h1 {
    max-width: 100%;
    font-size: clamp(1.5rem, 6.6vw, 1.9rem);
    line-height: 1.12;
  }

  .image-wrap {
    min-height: 210px;
  }

  .image-wrap img {
    min-height: 210px;
  }

  .lead-story {
    box-shadow: 0 10px 24px rgba(23, 23, 23, 0.08);
  }

  .briefing-panel,
  .side-section,
  .newsletter {
    padding: 15px;
  }

  .story-card {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .story-thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
  }

  .section-strip,
  .contact-grid,
  .info-cards,
  .publisher-form {
    grid-template-columns: 1fr;
  }

  .publisher-form label,
  .publisher-form label:nth-last-of-type(-n + 2) {
    grid-column: 1;
  }

  .publisher-actions button {
    width: 100%;
  }

  .story-card img {
    aspect-ratio: 16 / 10;
  }

  .story-card h3 {
    font-size: 1.18rem;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .section-strip a {
    min-height: auto;
  }

  .article-shell {
    width: min(100%, 640px);
    gap: 16px;
    margin-inline: auto;
  }

  .article-header {
    border-bottom-width: 1px;
    padding: 2px 0 18px;
  }

  .article-breadcrumb {
    margin-bottom: 12px;
    font-size: 0.72rem;
  }

  .article-standfirst {
    margin-top: 12px;
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .article-meta-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
  }

  .author-avatar {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    font-size: 0.7rem;
  }

  .author-lockup {
    align-items: flex-start;
  }

  .author-lockup strong {
    font-size: 0.88rem;
  }

  .author-lockup span {
    font-size: 0.75rem;
    line-height: 1.45;
  }

  .article-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .article-actions a {
    padding: 7px 10px;
    font-size: 0.74rem;
  }

  .article-image {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--surface);
    overflow: hidden;
  }

  .article-image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    max-height: 230px;
    object-fit: cover;
  }

  .article-image figcaption {
    border-bottom: 0;
    padding: 8px 10px 10px;
    font-size: 0.76rem;
    line-height: 1.4;
  }

  .article-layout {
    gap: 18px;
  }

  .article-body {
    width: 100%;
    max-width: 100%;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    font-size: 1rem;
    line-height: 1.72;
    padding: 22px 18px;
  }

  .article-body p,
  .article-body > p:first-child {
    color: var(--muted);
    margin-bottom: 16px;
    font-size: 1rem;
    line-height: 1.72;
  }

  .article-body > p:first-child {
    color: var(--ink);
  }

  .article-body ul,
  .article-body ol {
    margin-bottom: 16px;
    margin-left: 20px;
  }

  .article-body figure,
  .article-body .wp-block-image {
    margin: 18px 0;
  }

  .article-body img,
  .article-body .wp-block-image img {
    border: 1px solid var(--line);
    background: var(--surface);
  }

  .article-body h2,
  .text-page h2 {
    margin-top: 24px;
    font-size: 1.28rem;
    line-height: 1.18;
  }

  .article-body h3,
  .article-body h4 {
    margin-top: 20px;
    font-size: 1.12rem;
  }

  .article-aside {
    gap: 14px;
  }

  .article-aside .ad-slot,
  .article-aside .side-section:last-of-type {
    display: none;
  }

  .article-note,
  .correction-note {
    padding: 14px;
  }

  .ad-slot-wide {
    min-height: 62px;
    margin-bottom: 18px;
  }

  .ad-slot-box {
    min-height: 116px;
  }

  .ad-slot-inline {
    min-height: 92px;
    margin: 24px 0;
  }

  .email-row {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: center;
    grid-template-columns: 1fr;
    text-align: center;
    padding: 26px 0 30px;
  }

  .site-footer > div {
    order: 1;
  }

  .site-footer nav {
    order: 2;
  }

  .site-footer .copyright {
    order: 3;
  }

  .site-footer nav,
  .mini-footer {
    width: 100%;
    justify-content: center;
    gap: 0;
  }

  .site-footer nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
  }

  .site-footer nav a {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    padding: 11px 8px;
    color: var(--ink);
    font-size: 0.84rem;
  }

  .mini-footer a {
    order: 1;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0 8px;
  }

  .mini-footer span {
    order: 2;
    width: 100%;
  }

  .text-page {
    padding: 22px;
  }

  .contact-form button {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .topbar,
  .ticker,
  .utility-bar,
  .simple-header,
  main,
  .site-footer {
    width: min(100% - 16px, 1180px);
  }

  .brand-name {
    font-size: 1.18rem;
  }

  .brand-kicker {
    font-size: 0.68rem;
  }

  .nav-links a {
    padding: 0 3px;
    font-size: 0.78rem;
  }

  .story-content,
  .briefing-panel,
  .side-section,
  .newsletter,
  .text-page {
    padding: 16px;
  }

  .trending-list li {
    grid-template-columns: 30px 1fr;
    font-size: 1.06rem;
  }
}

@media (max-width: 768px) {
  body.single main {
    width: min(100% - 20px, 640px);
    padding-top: 18px;
  }

  body.single .article-shell,
  body.single .article-header,
  body.single .article-image,
  body.single .article-layout,
  body.single .article-body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body.single .article-header {
    border-bottom: 1px solid var(--line);
    padding-bottom: 16px;
  }

  body.single .article-header h1 {
    max-width: 100%;
    font-size: clamp(1.45rem, 6.4vw, 1.9rem);
    line-height: 1.14;
  }

  body.single .article-standfirst {
    font-size: 0.98rem;
    line-height: 1.55;
  }

  body.single .article-image {
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 8px 22px rgba(23, 23, 23, 0.08);
    overflow: hidden;
  }

  body.single .article-image img,
  body.single .article-image .wp-post-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    max-height: 230px;
    object-fit: cover;
  }

  body.single .article-layout {
    display: block;
  }

  body.single .article-body {
    display: block;
    margin-top: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 10px 26px rgba(23, 23, 23, 0.08);
    color: var(--muted);
    font-family: Inter, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.72;
    padding: 22px 18px;
  }

  body.single .article-body p,
  body.single .article-body li {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.72;
  }

  body.single .article-body > p:first-child {
    color: var(--ink);
  }

  body.single .article-body img,
  body.single .article-body figure,
  body.single .article-body .wp-block-image,
  body.single .article-body .alignwide,
  body.single .article-body .alignfull,
  body.single .article-body .size-full,
  body.single .article-body .size-large {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  body.single .article-aside {
    display: none;
  }
}

/* WordPress single post hardening: prevents editor images/blocks from escaping the viewport. */
body.single,
body.single main,
body.single .article-shell,
body.single .article-header,
body.single .article-image,
body.single .article-layout,
body.single .article-body {
  box-sizing: border-box;
}

body.single {
  overflow-x: hidden;
}

body.single .article-shell {
  width: min(100%, 980px);
  max-width: 100%;
  margin-inline: auto;
}

body.single .article-image {
  max-width: 100%;
  overflow: hidden;
}

body.single .article-featured-image,
body.single .article-image img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

body.single .article-body {
  overflow-wrap: break-word;
  word-break: normal;
}

body.single .article-body *,
body.single .article-body *::before,
body.single .article-body *::after {
  box-sizing: border-box;
  max-width: 100%;
}

body.single .article-body img,
body.single .article-body figure,
body.single .article-body iframe,
body.single .article-body video,
body.single .article-body embed,
body.single .article-body table,
body.single .article-body pre,
body.single .article-body .wp-block-image,
body.single .article-body .wp-block-embed,
body.single .article-body .wp-block-table,
body.single .article-body .alignwide,
body.single .article-body .alignfull,
body.single .article-body .size-full,
body.single .article-body .size-large {
  max-width: 100%;
}

body.single .article-body table,
body.single .article-body pre {
  display: block;
  overflow-x: auto;
}

@media (max-width: 900px) {
  body.single main {
    width: min(100% - 24px, 720px) !important;
    margin-inline: auto !important;
    padding-top: 18px;
  }

  body.single .article-shell,
  body.single .article-header,
  body.single .article-image,
  body.single .article-layout,
  body.single .article-body {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.single .article-layout {
    display: block !important;
  }

  body.single .article-image {
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 8px 22px rgba(23, 23, 23, 0.08);
  }

  body.single .article-featured-image,
  body.single .article-image img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
  }

  body.single .article-body {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 10px 26px rgba(23, 23, 23, 0.08);
    color: var(--ink);
    font-family: Inter, Arial, sans-serif;
    font-size: 16px !important;
    line-height: 1.75 !important;
    margin-top: 16px !important;
    padding: 22px 18px !important;
  }

  body.single .article-body p,
  body.single .article-body li {
    color: var(--muted);
    font-size: 16px !important;
    line-height: 1.75 !important;
  }

  body.single .article-body h2 {
    font-size: 1.32rem !important;
    line-height: 1.2 !important;
  }

  body.single .article-body h3,
  body.single .article-body h4 {
    font-size: 1.12rem !important;
    line-height: 1.22 !important;
  }

  body.single .article-body img,
  body.single .article-body .wp-block-image img {
    width: 100% !important;
    height: auto !important;
  }

  body.single .article-aside {
    display: none !important;
  }
}

@media (max-width: 600px) {
  body.single main {
    width: 100% !important;
    padding: 14px 11px 42px !important;
  }

  body.single .article-shell {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.single .article-header,
  body.single .article-image,
  body.single .article-body {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.single .article-header {
    margin-bottom: 14px !important;
  }

  body.single .article-header h1 {
    font-size: clamp(1.45rem, 7vw, 1.9rem) !important;
    line-height: 1.16 !important;
  }

  body.single .article-image {
    margin-bottom: 16px !important;
  }

  body.single .article-featured-image,
  body.single .article-image img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
  }

  body.single .article-body {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    box-shadow: var(--shadow) !important;
    color: var(--ink) !important;
    font-size: 17px !important;
    line-height: 1.74 !important;
    padding: 24px 20px !important;
  }

  body.single .article-body p,
  body.single .article-body li {
    color: var(--ink) !important;
    font-size: 17px !important;
    line-height: 1.74 !important;
    margin-bottom: 17px !important;
  }

  body.single .article-body h2 {
    color: var(--ink) !important;
    font-size: 1.38rem !important;
    line-height: 1.22 !important;
    margin: 26px 0 12px !important;
  }

  body.single .article-body h3,
  body.single .article-body h4 {
    color: var(--ink) !important;
    font-size: 1.18rem !important;
    line-height: 1.24 !important;
    margin: 22px 0 10px !important;
  }

  body.single .article-body figure,
  body.single .article-body .wp-block-image {
    margin: 20px 0 !important;
  }

  body.single .article-body img,
  body.single .article-body .wp-block-image img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }
}

@media (max-width: 768px) {
  body.single main {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 10px 40px !important;
    overflow-x: hidden !important;
  }

  body.single .single-article {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: 100% !important;
    max-width: 560px !important;
    margin: 0 auto !important;
    overflow: hidden !important;
  }

  body.single .single-article .article-header,
  body.single .single-article .article-image,
  body.single .single-article .article-body {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  body.single .single-article .article-header {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    box-shadow: 0 8px 22px rgba(23, 23, 23, 0.07) !important;
    padding: 18px 16px !important;
  }

  body.single .single-article .article-breadcrumb {
    margin: 0 0 10px !important;
    font-size: 0.7rem !important;
    line-height: 1.3 !important;
  }

  body.single .single-article .section-label {
    display: inline-block !important;
    margin-bottom: 8px !important;
  }

  body.single .single-article .article-header h1 {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    color: var(--ink) !important;
    font-size: clamp(1.42rem, 6vw, 1.9rem) !important;
    line-height: 1.16 !important;
    overflow-wrap: break-word !important;
    text-wrap: auto !important;
  }

  body.single .single-article .article-standfirst {
    width: 100% !important;
    max-width: 100% !important;
    margin: 12px 0 0 !important;
    color: var(--muted) !important;
    font-size: 0.98rem !important;
    line-height: 1.55 !important;
  }

  body.single .single-article .article-meta-row {
    display: block !important;
    margin-top: 14px !important;
    padding-top: 12px !important;
  }

  body.single .single-article .author-lockup {
    align-items: flex-start !important;
  }

  body.single .single-article .article-actions {
    margin-top: 12px !important;
  }

  body.single .single-article .article-image {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    box-shadow: 0 8px 22px rgba(23, 23, 23, 0.07) !important;
    overflow: hidden !important;
  }

  body.single .single-article .article-featured-image,
  body.single .single-article .article-image img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    object-fit: cover !important;
  }

  body.single .single-article .article-image figcaption {
    padding: 8px 10px 10px !important;
    color: var(--muted) !important;
    font-size: 0.76rem !important;
    line-height: 1.4 !important;
  }

  body.single .single-article .article-layout {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  body.single .single-article .article-body {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    box-shadow: 0 8px 22px rgba(23, 23, 23, 0.07) !important;
    color: var(--ink) !important;
    font-family: Inter, Arial, sans-serif !important;
    font-size: 16.5px !important;
    line-height: 1.72 !important;
    padding: 22px 18px !important;
    overflow: hidden !important;
  }

  body.single .single-article .article-body p,
  body.single .single-article .article-body li {
    color: var(--ink) !important;
    font-size: 16.5px !important;
    line-height: 1.72 !important;
    margin: 0 0 16px !important;
  }

  body.single .single-article .article-body h2 {
    color: var(--ink) !important;
    font-size: 1.32rem !important;
    line-height: 1.22 !important;
    margin: 24px 0 10px !important;
  }

  body.single .single-article .article-body h3,
  body.single .single-article .article-body h4 {
    color: var(--ink) !important;
    font-size: 1.14rem !important;
    line-height: 1.24 !important;
    margin: 20px 0 8px !important;
  }

  body.single .single-article .article-body img,
  body.single .single-article .article-body figure,
  body.single .single-article .article-body iframe,
  body.single .single-article .article-body video,
  body.single .single-article .article-body table,
  body.single .single-article .article-body pre,
  body.single .single-article .article-body .wp-block-image,
  body.single .single-article .article-body .alignwide,
  body.single .single-article .article-body .alignfull {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.single .single-article .article-body table,
  body.single .single-article .article-body pre {
    overflow-x: auto !important;
  }

  body.single .single-article .article-aside {
    display: none !important;
  }
}

@media (max-width: 768px) {
  body.single .article-shell {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: 100% !important;
    max-width: 560px !important;
    margin: 0 auto !important;
    overflow: hidden !important;
  }

  body.single .article-shell .article-header,
  body.single .article-shell .article-image,
  body.single .article-shell .article-body {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  body.single .article-shell .article-header {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    box-shadow: 0 8px 22px rgba(23, 23, 23, 0.07) !important;
    padding: 18px 16px !important;
  }

  body.single .article-shell .article-header h1 {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    color: var(--ink) !important;
    font-size: clamp(1.42rem, 6vw, 1.9rem) !important;
    line-height: 1.16 !important;
    overflow-wrap: break-word !important;
    text-wrap: auto !important;
  }

  body.single .article-shell .article-standfirst {
    width: 100% !important;
    max-width: 100% !important;
    margin: 12px 0 0 !important;
    color: var(--muted) !important;
    font-size: 0.98rem !important;
    line-height: 1.55 !important;
  }

  body.single .article-shell .article-image {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    box-shadow: 0 8px 22px rgba(23, 23, 23, 0.07) !important;
    overflow: hidden !important;
  }

  body.single .article-shell .article-featured-image,
  body.single .article-shell .article-image img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    object-fit: cover !important;
  }

  body.single .article-shell .article-layout {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  body.single .article-shell .article-body {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    box-shadow: 0 8px 22px rgba(23, 23, 23, 0.07) !important;
    color: var(--ink) !important;
    font-family: Inter, Arial, sans-serif !important;
    font-size: 16.5px !important;
    line-height: 1.72 !important;
    padding: 22px 18px !important;
    overflow: hidden !important;
  }

  body.single .article-shell .article-body p,
  body.single .article-shell .article-body li {
    color: var(--ink) !important;
    font-size: 16.5px !important;
    line-height: 1.72 !important;
    margin: 0 0 16px !important;
  }

  body.single .article-shell .article-body h1,
  body.single .article-shell .article-body h2 {
    color: var(--ink) !important;
    font-size: 1.32rem !important;
    line-height: 1.22 !important;
    margin: 24px 0 10px !important;
  }

  body.single .article-shell .article-body h3,
  body.single .article-shell .article-body h4 {
    color: var(--ink) !important;
    font-size: 1.14rem !important;
    line-height: 1.24 !important;
    margin: 20px 0 8px !important;
  }

  body.single .article-shell .article-body img,
  body.single .article-shell .article-body figure,
  body.single .article-shell .article-body iframe,
  body.single .article-shell .article-body video,
  body.single .article-shell .article-body table,
  body.single .article-shell .article-body pre,
  body.single .article-shell .article-body .wp-block-image,
  body.single .article-shell .article-body .alignwide,
  body.single .article-shell .article-body .alignfull {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.single .article-shell .article-body table,
  body.single .article-shell .article-body pre {
    overflow-x: auto !important;
  }

  body.single .article-shell .article-aside {
    display: none !important;
  }
}

/* Responsive stability patch: keeps the WordPress theme from overflowing on tablet,
   small laptop, and narrow mobile widths, even with long menu labels or titles. */
.site-header,
.topbar,
.utility-bar,
.ticker,
main,
.site-footer,
.hero-grid,
.content-layout,
.article-shell,
.article-layout,
.lead-story,
.story-card,
.section-strip,
.sidebar,
.article-body,
.article-aside {
  min-width: 0;
}

.brand,
.brand-copy,
.nav-links,
.nav-links a,
.utility-bar nav,
.ticker span,
.story-content,
.story-card > div,
.briefing-item,
.section-strip a,
.article-header,
.article-standfirst,
.author-lockup,
.author-lockup > div,
.article-actions,
.side-section,
.newsletter,
.text-page {
  min-width: 0;
  overflow-wrap: anywhere;
}

.brand {
  flex-shrink: 1;
}

.brand-mark {
  flex: 0 0 auto;
}

.nav-links a {
  line-height: 1.25;
}

.lead-story,
.briefing-panel,
.story-card,
.side-section,
.newsletter,
.text-page,
.article-header,
.article-image,
.article-body {
  max-width: 100%;
}

.story-thumb,
.story-card img,
.image-wrap,
.image-wrap img,
.article-featured-image,
.article-image img {
  max-width: 100%;
}

.article-body iframe,
.article-body video,
.article-body embed {
  width: 100%;
}

.article-body table,
.article-body pre,
.wp-block-table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

@media (max-width: 1180px) {
  .topbar,
  .ticker,
  .utility-bar,
  .simple-header,
  main,
  .site-footer {
    width: min(var(--site-width), calc(100% - 28px));
  }

  .topbar {
    flex-wrap: wrap;
  }

  .brand {
    max-width: min(100%, 360px);
  }

  .nav-links {
    order: 3;
    flex: 1 0 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px 12px;
    padding-bottom: 6px;
  }
}

@media (max-width: 1060px) {
  .hero-grid,
  .content-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lead-story {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.82fr);
  }

  .article-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .article-aside {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .lead-story {
    grid-template-columns: 1fr;
  }

  .image-wrap,
  .image-wrap img {
    min-height: 260px;
  }

  .section-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-meta-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .topbar,
  .ticker,
  .utility-bar,
  .simple-header,
  main,
  .site-footer {
    width: min(100% - 20px, var(--site-width));
  }

  .topbar {
    justify-content: center;
    gap: 12px;
  }

  .brand {
    width: 100%;
    justify-content: center;
    max-width: 100%;
    text-align: left;
  }

  .nav-links {
    justify-content: center;
  }

  .nav-links a {
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }

  .theme-toggle {
    flex: 0 0 auto;
  }

  .ticker {
    align-items: flex-start;
  }

  .section-strip,
  .sidebar,
  .article-aside,
  .contact-grid,
  .info-cards,
  .publisher-form {
    grid-template-columns: 1fr;
  }

  .story-card {
    grid-template-columns: 1fr;
  }

  .story-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .story-card h3 {
    max-width: 100%;
  }

  .article-shell,
  body.single .article-shell {
    width: 100% !important;
    max-width: 640px !important;
  }

  .article-header h1,
  .page-hero h1,
  .text-page h1 {
    max-width: 100%;
    text-wrap: auto;
  }

  .article-image img,
  body.single .article-image img,
  body.single .article-featured-image {
    height: auto !important;
    max-height: none !important;
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }

  .article-body,
  body.single .article-body,
  body.single .single-article .article-body,
  body.single .article-shell .article-body {
    overflow: visible !important;
  }
}

@media (max-width: 430px) {
  .topbar,
  .ticker,
  .utility-bar,
  .simple-header,
  main,
  .site-footer {
    width: min(100% - 14px, var(--site-width));
  }

  .brand-name {
    font-size: clamp(1rem, 7vw, 1.18rem);
    overflow-wrap: anywhere;
  }

  .brand-kicker {
    font-size: 0.66rem;
  }

  .nav-links {
    gap: 8px 10px;
  }

  .nav-links a {
    font-size: 0.76rem;
  }

  .story-content,
  .briefing-panel,
  .side-section,
  .newsletter,
  .text-page,
  .article-body,
  body.single .article-body,
  body.single .single-article .article-body,
  body.single .article-shell .article-body {
    padding: 16px !important;
  }

  .image-wrap,
  .image-wrap img {
    min-height: 190px;
  }

  .article-meta-row,
  .author-lockup,
  .article-actions {
    width: 100%;
  }

  .article-actions a {
    flex: 1 1 auto;
    text-align: center;
  }
}

/* Full-width desktop patch for every template, not only the homepage. */
@media (min-width: 901px) {
  main,
  .topbar,
  .ticker,
  .utility-bar,
  .site-footer,
  body.single main {
    width: min(var(--site-width), calc(100% - 32px)) !important;
  }

  .page-hero,
  .article-shell,
  .article-header,
  .article-layout,
  .article-body,
  .text-page,
  .publisher-page,
  .publisher-form,
  .publisher-output,
  body.single .article-shell,
  body.single .article-header,
  body.single .article-layout,
  body.single .article-body,
  body.single .single-article {
    width: 100% !important;
    max-width: 100% !important;
  }

  .article-shell,
  body.single .article-shell,
  body.single .single-article {
    max-width: var(--site-width) !important;
  }

  .article-layout,
  body.single .article-layout,
  body.single .single-article .article-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 320px !important;
    gap: 34px !important;
  }

  .article-body,
  body.single .article-body,
  body.single .single-article .article-body,
  body.single .article-shell .article-body {
    max-width: none !important;
  }

  .article-header h1,
  .page-hero h1,
  .text-page h1 {
    max-width: 24ch !important;
  }

  .article-standfirst,
  .page-intro {
    max-width: 920px !important;
  }
}
