:root {
  --ink: #17212b;
  --muted: #65717d;
  --paper: #f7f5ef;
  --card: #ffffff;
  --accent: #b5222b;
  --line: #dedbd3;
  --page-width: 1180px;
  --page-gutter: 24px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 16px; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.6;
  overflow-wrap: break-word;
}

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

h1, h2, h3 {
  line-height: 1.15;
  overflow-wrap: break-word;
  hyphens: auto;
  text-wrap: balance;
}

p {
  overflow-wrap: break-word;
  hyphens: auto;
  text-wrap: pretty;
}

a { -webkit-tap-highlight-color: transparent; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.topline { height: 7px; background: var(--accent); }

/* HEADER AND RESPONSIVE LOGO */
.site-header {
  width: 100%;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 28px var(--page-gutter) 24px;
  display: grid;
  grid-template-columns: clamp(82px, 9vw, 118px) minmax(0, 1fr) minmax(145px, 205px);
  align-items: center;
  gap: clamp(14px, 2vw, 25px);
}

.site-logo-link {
  display: block;
  width: 100%;
  max-width: 118px;
  justify-self: start;
}

.site-logo {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.brand { min-width: 0; }

.brand-name {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 3.35rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -1.4px;
}

.brand-name a { color: inherit; text-decoration: none; }

.motto {
  margin: 9px 0 0;
  color: var(--accent);
  font: italic 700 clamp(0.82rem, 1.4vw, 1rem)/1.4 Arial, sans-serif;
  letter-spacing: 0.4px;
}

.edition {
  align-self: center;
  min-width: 0;
  color: var(--muted);
  font: 12px/1.7 Arial, sans-serif;
  text-align: right;
  overflow-wrap: anywhere;
}

/* NAVIGATION */
nav {
  background: var(--ink);
  color: white;
  font-family: Arial, sans-serif;
}

.nav-inner {
  width: 100%;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: clamp(16px, 2.2vw, 28px);
}

nav a {
  display: block;
  padding: 14px 0;
  color: white;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  overflow-wrap: anywhere;
}

nav a:hover { color: #ffc9cc; }
nav a:focus-visible { outline: 2px solid #ffc9cc; outline-offset: 4px; }

/* MAIN PAGE LAYOUT */
main {
  width: 100%;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 30px var(--page-gutter) 56px;
}

.section-label {
  margin: 0 0 16px;
  padding-bottom: 9px;
  border-bottom: 2px solid var(--ink);
  font: 700 12px/1.4 Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.category {
  display: inline-block;
  color: var(--accent);
  font: 700 11px/1.5 Arial, sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.headline-link {
  color: inherit;
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.headline-link:hover { color: var(--accent); text-decoration: underline; }
.headline-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }

/* ===================== FRONT PAGE ===================== */

/* FEATURED STORIES */
.lead-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 38px;
}

.front-page-feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.38fr);
  gap: 24px;
  align-items: start;
}

.front-page-feature-layout > * { min-width: 0; }

.lead-story, .article-card {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
}

.lead-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--line);
}

.lead-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.story-content {
  min-width: 0;
  padding: clamp(16px, 2vw, 24px);
}

.lead-story h2 {
  margin: 10px 0 14px;
  font-size: clamp(1.65rem, 2.9vw, 2.6rem);
  letter-spacing: -0.5px;
}

.lead-story p, .article-card p {
  margin: 0;
  color: #4d5861;
  font-size: 15px;
  line-height: 1.75;
}

.byline {
  display: block;
  margin-top: 15px;
  color: var(--muted);
  font: 12px/1.6 Arial, sans-serif;
  overflow-wrap: anywhere;
}

/* Side story (own image class so it never inherits card-image rules) */
.front-page-side-story {
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
}

.side-image {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  margin-bottom: 14px;
  background: var(--line);
}

.side-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.front-page-side-story .story-category {
  margin: 0 0 7px;
  color: var(--accent);
  font: 800 0.72rem/1.4 Arial, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.front-page-side-story h2 {
  margin: 0 0 10px;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.front-page-side-story .story-summary {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.front-page-side-story .story-meta {
  margin: 0;
  color: var(--muted);
  font: 0.75rem/1.5 Arial, sans-serif;
}

/* LATEST STORIES */
.latest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 20px;
}

.article-card {
  display: flex;
  flex-direction: column;
}

.story-image {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--line);
}

.story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Photos whose subject sits low in the frame ("Shift crop down" in the editor) */
.story-image img.fit-image { object-position: center 60%; }

.article-card .story-content { flex: 1; padding: 19px; }

.article-card h3 {
  margin: 9px 0 12px;
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
}

/* ===================== ARTICLE PAGE ===================== */

.breadcrumb {
  margin: 0 0 24px;
  color: var(--muted);
  font: 12px/1.7 Arial, sans-serif;
}

.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.article {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  line-height: 1.7;
}

.article-header {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 54px) clamp(20px, 5vw, 64px) 30px;
}

.article-header .category { letter-spacing: 1.2px; }

.article-title {
  margin: 14px 0 18px;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -1px;
}

.standfirst {
  margin: 0;
  color: #4d5861;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.65;
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 12px/1.7 Arial, sans-serif;
}

.hero-image {
  width: 100%;
  aspect-ratio: 16 / 8;
  overflow: hidden;
  background: var(--line);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-caption {
  padding: 10px var(--page-gutter);
  color: var(--muted);
  font: 11px/1.6 Arial, sans-serif;
  border-bottom: 1px solid var(--line);
}

/* ARTICLE BODY (the text your writers type in the editor) */
.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 30px clamp(20px, 5vw, 48px) 52px;
}

.article-body p {
  margin: 0 0 22px;
  font-size: 1.08rem;
  line-height: 1.9;
}

.article-body h2 { margin: 38px 0 16px; font-size: clamp(1.55rem, 3vw, 2rem); }
.article-body h3 { margin: 30px 0 12px; font-size: 1.35rem; }

.article-body a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article-body ul,
.article-body ol { margin: 0 0 24px; padding-left: 26px; }

.article-body li { margin-bottom: 8px; padding-left: 4px; }

.article-body img { margin: 28px auto; }

.article-body blockquote {
  margin: 32px 0;
  padding: 8px 0 8px 24px;
  border-left: 4px solid var(--accent);
  color: var(--ink);
  font-size: 1.4rem;
  font-style: italic;
  line-height: 1.6;
}

.article-body blockquote p { margin: 0; font-size: inherit; line-height: inherit; }
.article-body blockquote p + p { margin-top: 12px; }

.article-body blockquote cite {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font: 12px/1.6 Arial, sans-serif;
  font-style: normal;
}

.article-end {
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 12px/1.7 Arial, sans-serif;
}

.article-end p { font: inherit; margin: 0; }

.back-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.back-link:hover { text-decoration: underline; }

/* MORE STORIES */
.related { margin-top: 38px; }
.related .section-label { margin-bottom: 18px; }

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.related-card {
  min-width: 0;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
}

.related-card h3 { margin: 10px 0; font-size: 1.25rem; }
.related-card h3 a { color: var(--ink); text-decoration: none; }
.related-card h3 a:hover { color: var(--accent); }

.related-card p {
  margin: 0;
  color: #4d5861;
  font-size: 14px;
  line-height: 1.75;
}

/* FOOTER */
footer {
  padding: 30px var(--page-gutter);
  color: #e6e8eb;
  background: var(--ink);
  text-align: center;
  font: 13px/1.7 Arial, sans-serif;
}

footer strong {
  display: block;
  margin-bottom: 5px;
  color: white;
  font: 700 20px/1.4 Georgia, serif;
  overflow-wrap: break-word;
}

footer p { margin: 12px 0 0; }

/* ===================== RESPONSIVE ===================== */

/* TABLETS AND SMALL LAPTOPS */
@media (max-width: 960px) {
  :root { --page-gutter: 22px; }

  .site-header {
    grid-template-columns: clamp(76px, 11vw, 100px) minmax(0, 1fr);
    gap: 16px 20px;
  }

  .edition { grid-column: 1 / -1; text-align: left; }

  /* Stack the feature earlier so the side story is never squeezed */
  .front-page-feature-layout { grid-template-columns: minmax(0, 1fr); }

  /* Side story: image beside text while there is room */
  .front-page-side-story {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 4px 20px;
    align-items: start;
  }
  .front-page-side-story .side-image { grid-row: 1 / span 4; margin-bottom: 0; align-self: stretch; aspect-ratio: auto; min-height: 200px; }

  /* Two-column latest grid; an odd last card spans the full row */
  .latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .article-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .article-card:last-child:nth-child(odd) .story-image { aspect-ratio: 16 / 7; }
}

/* MOBILE AND NARROW TABLETS */
@media (max-width: 760px) {
  :root { --page-gutter: 18px; }

  .site-header {
    padding-top: 22px;
    padding-bottom: 22px;
    grid-template-columns: clamp(68px, 15vw, 90px) minmax(0, 1fr);
    gap: 14px 16px;
  }

  .brand-name { font-size: clamp(1.6rem, 5.7vw, 2.4rem); line-height: 1.08; letter-spacing: -0.8px; }
  .motto { margin-top: 7px; font-size: clamp(0.78rem, 2.4vw, 0.95rem); letter-spacing: 0.2px; }
  .edition { font-size: 11px; }
  .nav-inner { column-gap: 20px; }
  nav a { padding: 12px 0; font-size: 11px; }

  main { padding-top: 24px; padding-bottom: 42px; }
  .lead-grid { margin-bottom: 32px; }
  .front-page-feature-layout { gap: 20px; }
  .lead-story h2 { font-size: clamp(1.65rem, 5.5vw, 2.25rem); }
  .lead-story p, .article-card p { font-size: 14px; }
  .section-label { margin-bottom: 14px; }
  .latest-grid { gap: 16px; }

  /* article page */
  .article-title { letter-spacing: -0.5px; }
  .article-body p { font-size: 1rem; line-height: 1.85; }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .related-card { padding: 17px; }
}

/* SMALL PHONES */
@media (max-width: 600px) {
  /* Everything single column, full-size images */
  .front-page-side-story { display: block; }
  .front-page-side-story .side-image { aspect-ratio: 16 / 10; min-height: 0; margin-bottom: 14px; }

  .latest-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .story-image,
  .article-card:last-child:nth-child(odd) .story-image { aspect-ratio: 16 / 10; }

  .lead-image { aspect-ratio: 16 / 10; }
  .article-card .story-content { padding: 18px; }
  .article-card h3 { font-size: 1.3rem; }
  .lead-story .story-content { padding: 18px; }
  footer { padding-top: 25px; padding-bottom: 25px; }
}

@media (max-width: 520px) {
  .article-header { padding-top: 28px; }
  .hero-image { aspect-ratio: 4 / 3; }
  .article-body { padding-top: 24px; padding-bottom: 35px; }
  .related-grid { grid-template-columns: minmax(0, 1fr); }
}

/* VERY NARROW SCREENS */
@media (max-width: 380px) {
  :root { --page-gutter: 14px; }

  .site-header { grid-template-columns: 62px minmax(0, 1fr); gap: 12px; }
  .brand-name { font-size: 1.55rem; letter-spacing: -0.7px; }
  .motto { font-size: 0.76rem; }
  .lead-story h2 { font-size: 1.55rem; }
  .lead-story .story-content,
  .article-card .story-content { padding: 15px; }
  .front-page-side-story { padding: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
