:root {
  --comic-yellow: #ffd700;
  --comic-blue: #1e40af;
  --comic-red: #ef4444;
  --comic-paper: #fbfbf8;
  --ink: #0f0f10;
  --muted: #4b5563;
  --panel: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--comic-paper);
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 1px 1px, rgba(15, 15, 16, 0.08) 1px, transparent 1.7px) 0 0 / 18px 18px,
    linear-gradient(135deg, rgba(255, 215, 0, 0.26), transparent 34%),
    linear-gradient(180deg, #f8fbff 0%, #fff8d9 52%, #f9fafb 100%);
  color: var(--ink);
  font-family: "Roboto Condensed", Arial, Helvetica, sans-serif;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(30, 64, 175, 0.08), transparent 22%, transparent 78%, rgba(239, 68, 68, 0.08)),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(15, 15, 16, 0.045) 31px 32px);
}

main {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 72px;
}

a {
  color: var(--comic-blue);
  font-weight: 900;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--comic-red);
}

a:focus-visible {
  outline: 4px solid var(--comic-yellow);
  outline-offset: 4px;
}

.back-link,
.breadcrumb {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  border: 3px solid var(--ink);
  background: var(--panel);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  padding: 8px 12px;
  text-decoration: none;
  text-transform: uppercase;
}

.breadcrumb {
  display: flex;
  width: fit-content;
  max-width: 100%;
}

.breadcrumb span {
  color: var(--muted);
}

.shell,
article {
  position: relative;
  overflow: hidden;
  border: 5px solid var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 12px 12px 0 var(--ink);
}

.shell {
  padding: clamp(22px, 4vw, 42px);
}

article {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px);
}

.shell {
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.shell::before,
article::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle, rgba(15, 15, 16, 0.08) 1px, transparent 1.6px) 0 0 / 12px 12px,
    linear-gradient(180deg, rgba(255, 215, 0, 0.08), transparent 180px);
}

.shell::before {
  content: none;
}

.shell > *,
article > * {
  position: relative;
  z-index: 1;
}

.gazette-logo {
  margin: 0 0 26px;
  border: 4px solid var(--ink);
  background: #fff;
  box-shadow: 8px 8px 0 var(--ink);
  padding: 14px;
}

.gazette-logo img {
  display: block;
  width: min(100%, 760px);
  height: auto;
  margin: 0 auto;
}

.eyebrow,
.tag {
  display: inline-block;
  border: 3px solid var(--ink);
  background: var(--ink);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  line-height: 1;
  margin: 0 0 16px;
  padding: 9px 12px;
  text-transform: uppercase;
}

.tag {
  background: var(--comic-red);
}

h1,
.featured h2,
.story-card h2,
.topic-section h2,
.mini-card h3 {
  font-family: "Bangers", Impact, fantasy;
  font-weight: 400;
  letter-spacing: 0;
}

h1 {
  color: var(--comic-blue);
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.92;
  margin: 0 0 18px;
  text-transform: uppercase;
  text-shadow: 4px 4px 0 var(--comic-yellow), 6px 6px 0 var(--ink);
  -webkit-text-stroke: 1px var(--ink);
}

article h1 {
  max-width: 820px;
  font-size: clamp(2.6rem, 6vw, 5.2rem);
}

h2 {
  color: var(--ink);
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  line-height: 1.1;
  margin: 42px 0 14px;
}

h3 {
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.25;
}

p,
li {
  font-size: clamp(1.05rem, 1.5vw, 1.15rem);
}

p {
  margin: 0 0 18px;
}

ul {
  margin: 0 0 24px;
  padding-left: 1.4rem;
}

li {
  margin-bottom: 8px;
}

.dek {
  max-width: 820px;
  border-left: 8px solid var(--comic-red);
  color: #263244;
  font-size: clamp(1.2rem, 2.2vw, 1.65rem);
  font-weight: 900;
  line-height: 1.35;
  margin: 0 0 26px;
  padding-left: 18px;
}

.meta {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.featured,
.topic-section,
.mini-card,
.story-card,
.related-articles,
.faq-section,
.cta,
.note {
  border: 4px solid var(--ink);
  box-shadow: 7px 7px 0 var(--ink);
}

.featured {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(250px, 0.8fr);
  gap: 28px;
  margin: 34px 0;
  background: var(--comic-yellow);
  padding: clamp(20px, 3vw, 32px);
}

.featured h2 {
  color: var(--ink);
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 0.95;
  margin: 0 0 14px;
  text-shadow: 3px 3px 0 #fff;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
}

.button,
.cta {
  display: inline-block;
  background: var(--ink);
  color: var(--comic-yellow);
  font-weight: 900;
  letter-spacing: 0.12em;
  padding: 13px 18px;
  text-decoration: none;
  text-transform: uppercase;
}

.button.primary {
  background: var(--ink);
  color: var(--comic-yellow);
}

.button.secondary {
  background: var(--comic-blue);
  color: #fff;
}

.button:hover,
.cta:hover {
  transform: translateY(-2px);
}

.topic-sections,
.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 34px;
}

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

.topic-section,
.mini-card,
.story-card {
  background: var(--panel);
  padding: 20px;
}

.topic-section:nth-child(1) {
  background: #eaf2ff;
}

.topic-section:nth-child(2) {
  background: #fff6bd;
}

.topic-section:nth-child(3) {
  background: #fff;
}

.topic-section:nth-child(4) {
  background: #ffe7e7;
}

.topic-section h2,
.mini-card h3,
.story-card h2 {
  color: var(--comic-blue);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 0.98;
  margin: 0 0 12px;
}

.story-card h2 {
  color: var(--comic-red);
}

.stories {
  display: grid;
  gap: 22px;
  margin-top: 34px;
}

.story-card {
  display: grid;
  gap: 6px;
}

.article-image {
  margin: 32px 0 38px;
}

.article-image img {
  display: block;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  border: 4px solid var(--ink);
  background: #fff;
  box-shadow: 8px 8px 0 var(--ink);
}

.article-image figcaption {
  max-width: 760px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 900;
}

.note {
  background: #fff3a3;
  border-left-width: 12px;
  font-weight: 900;
  padding: 18px;
}

.cta {
  display: block;
  margin-top: 40px;
}

.cta a {
  color: #fff;
}

.faq-section,
.related-articles {
  margin-top: 42px;
  padding: clamp(18px, 3vw, 26px);
}

.faq-section {
  background: #fff6bd;
}

.related-articles {
  background: #eaf2ff;
}

.faq-section h2,
.related-articles h2 {
  margin-top: 0;
}

.faq-section h3 {
  margin: 22px 0 8px;
}

.term-grid {
  columns: 2;
  column-gap: 36px;
  margin-top: 24px;
}

.term {
  break-inside: avoid;
  margin-bottom: 8px;
}

.term h2 {
  color: var(--comic-blue);
  margin-top: 0;
}

@media (max-width: 860px) {
  main {
    width: min(100% - 24px, 760px);
    padding-top: 22px;
  }

  .featured,
  .topic-sections,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .shell,
  article {
    box-shadow: 7px 7px 0 var(--ink);
  }
}

@media (max-width: 560px) {
  main {
    width: min(100% - 16px, 520px);
  }

  .shell,
  article {
    border-width: 4px;
    padding: 20px;
  }

  h1 {
    text-shadow: 3px 3px 0 var(--comic-yellow), 5px 5px 0 var(--ink);
  }

  .breadcrumb,
  .back-link {
    width: 100%;
  }

  .term-grid {
    columns: 1;
  }
}
