/* ============================================
   1. :root — design tokens
   ============================================ */
:root {
  --primary: #E63946;
  --accent: #457B9D;
  --bg: #F1FAEE;
  --text: #1D3557;
  --muted: #A8DADC;
  --green-muted: #6B9080;
  --green-dark: #2D4A3E;
  --border: #C4D4C8;
  --white: #FFFFFF;
  --container: 960px;
  --gap: 0.75rem;
  --radius: 0;
  --font-serif: Georgia, "Times New Roman", Times, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
}

/* ============================================
   2. reset
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  min-height: 100vh;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

ul, ol {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ============================================
   3. typography — mixed-newsroom
   ============================================ */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--green-dark);
}

h1 { font-size: 1.875rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.0625rem; }

.lead {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text);
}

.meta, .byline, .date-line {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--green-muted);
}

.tag {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-label {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-muted);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 0.25rem;
  margin-bottom: var(--gap);
}

/* ============================================
   4. layout — 8-col-asymmetric, 960px container
   ============================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1rem;
}

.grid-8 {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: var(--gap);
}

.col-5 { grid-column: span 5; }
.col-3 { grid-column: span 3; }
.col-6 { grid-column: span 6; }
.col-2 { grid-column: span 2; }
.col-8 { grid-column: span 8; }

.site-header {
  border-bottom: 3px solid var(--green-dark);
  background: var(--white);
}

.header-top {
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0;
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green-dark);
  text-decoration: none;
}

.brand span {
  color: var(--primary);
}

.header-date {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--green-muted);
}

.header-nav {
  padding: 0.5rem 0;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.nav-list a {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid transparent;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  border-bottom-color: var(--primary);
  color: var(--primary);
}

.nav-toggle {
  display: none;
  padding: 0.375rem 0.75rem;
  border: 2px solid var(--text);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.main-content {
  padding: 1rem 0 2rem;
}

.sidebar-left {
  grid-column: span 2;
}

.content-main {
  grid-column: span 6;
}

.article-layout .sidebar-left {
  order: -1;
}

.article-layout .content-main {
  grid-column: span 5;
}

.article-layout .sidebar-right {
  grid-column: span 3;
}

/* hero — full-width-image + overlay */
.hero {
  position: relative;
  margin-bottom: 1rem;
  overflow: hidden;
}

.hero img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(29, 53, 87, 0.85) 0%, rgba(29, 53, 87, 0.3) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
}

.hero-overlay h1 {
  color: var(--white);
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.hero-overlay .lead {
  color: var(--muted);
  font-size: 1rem;
  max-width: 36rem;
}

.hero-overlay .tag {
  color: var(--muted);
  margin-bottom: 0.5rem;
}

/* magazine-columns for article list */
.magazine-columns {
  column-count: 1;
  column-gap: 1.5rem;
}

.site-footer {
  background: var(--green-dark);
  color: var(--muted);
  padding: 1.5rem 0;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.footer-grid h4 {
  color: var(--white);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.footer-grid a {
  color: var(--muted);
  font-size: 0.8125rem;
  text-decoration: none;
}

.footer-grid a:hover {
  color: var(--white);
}

.footer-grid ul li {
  margin-bottom: 0.375rem;
}

.footer-bottom {
  border-top: 1px solid rgba(168, 218, 220, 0.3);
  margin-top: 1rem;
  padding-top: 0.75rem;
  font-size: 0.75rem;
  text-align: center;
}

/* ============================================
   5. components
   ============================================ */
/* cards — bordered */
.card {
  border: 1px solid var(--border);
  background: var(--white);
  padding: 0.75rem;
  margin-bottom: var(--gap);
}

.card-bordered {
  border-left: 3px solid var(--accent);
}

.card h3 {
  margin-bottom: 0.375rem;
}

.card h3 a {
  color: var(--green-dark);
  text-decoration: none;
}

.card h3 a:hover {
  color: var(--primary);
}

.card .thumb {
  margin-bottom: 0.5rem;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--muted);
}

.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* lead story */
.lead-story {
  margin-bottom: 1rem;
}

.lead-story .thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin-bottom: 0.75rem;
  background: var(--muted);
}

.lead-story .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lead-story h2 {
  font-size: 1.625rem;
  margin-bottom: 0.5rem;
}

.lead-story h2 a {
  color: var(--green-dark);
  text-decoration: none;
}

.lead-story h2 a:hover {
  color: var(--primary);
}

/* byline — inline */
.byline {
  display: inline;
}

.byline a {
  color: var(--accent);
  font-weight: 600;
}

/* buttons — outlined */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
  border-radius: var(--radius);
}

.btn:hover {
  background: var(--accent);
  color: var(--white);
}

.btn-primary {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary);
  color: var(--white);
}

/* sidebar widgets */
.widget {
  margin-bottom: 1rem;
}

.widget ul li {
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.widget ul li a {
  color: var(--text);
  text-decoration: none;
}

.widget ul li a:hover {
  color: var(--primary);
}

.author-box {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.author-box img {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.author-box p {
  font-size: 0.8125rem;
  line-height: 1.45;
}

/* article body */
.article-body p {
  margin-bottom: 1rem;
}

.article-body h2 {
  margin: 1.5rem 0 0.75rem;
}

.article-body ul {
  list-style: disc;
  margin: 0 0 1rem 1.25rem;
}

.article-body ul li {
  margin-bottom: 0.375rem;
}

.article-header {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.article-header h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.related-articles {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 2px solid var(--border);
}

.related-articles h3 {
  margin-bottom: 0.75rem;
}

/* contact form */
.form-group {
  margin-bottom: 0.75rem;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border);
  background: var(--white);
  font: inherit;
  border-radius: var(--radius);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

/* cookie — bottom-bar */
.cookie-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--green-dark);
  color: var(--white);
  padding: 0.75rem 1rem;
  z-index: 1000;
  display: none;
  border-top: 3px solid var(--primary);
}

.cookie-bar.is-visible {
  display: block;
}

.cookie-bar .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.cookie-bar p {
  font-size: 0.8125rem;
  flex: 1;
  min-width: 200px;
}

.cookie-bar a {
  color: var(--muted);
}

.cookie-actions {
  display: flex;
  gap: 0.5rem;
}

.cookie-bar .btn {
  border-color: var(--white);
  color: var(--white);
  font-size: 0.75rem;
  padding: 0.375rem 0.75rem;
}

.cookie-bar .btn:hover {
  background: var(--white);
  color: var(--green-dark);
}

/* prose pages */
.prose h2 {
  margin: 1.25rem 0 0.5rem;
}

.prose p {
  margin-bottom: 0.75rem;
}

.prose ul {
  list-style: disc;
  margin: 0 0 0.75rem 1.25rem;
}

.prose ul li {
  margin-bottom: 0.25rem;
}

/* feed list on homepage */
.feed-list .card {
  break-inside: avoid;
}

.picks-list .card {
  padding: 0.5rem;
}

.picks-list h4 {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.picks-list h4 a {
  color: var(--green-dark);
  text-decoration: none;
}

.picks-list h4 a:hover {
  color: var(--primary);
}

/* ============================================
   6. utilities
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.75rem; }
.mb-2 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.75rem; }

.hidden { display: none; }

/* ============================================
   7. media queries — 480 / 768 / 1024
   ============================================ */
@media (min-width: 480px) {
  h1 { font-size: 2rem; }
  .hero-overlay h1 { font-size: 2rem; }
  .magazine-columns { column-count: 2; }
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .nav-toggle { display: none; }
  .nav-list { display: flex; }

  .article-layout .sidebar-left {
    grid-column: span 2;
  }
}

@media (min-width: 1024px) {
  .main-content { padding: 1.5rem 0 2.5rem; }
  .lead-story h2 { font-size: 1.875rem; }
  .article-header h1 { font-size: 2.125rem; }
}

@media (max-width: 767px) {
  .nav-toggle { display: block; }

  .nav-list {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0;
  }

  .nav-list.is-open { display: flex; }

  .col-5, .col-3, .col-6, .col-2, .col-8,
  .sidebar-left, .content-main,
  .article-layout .content-main,
  .article-layout .sidebar-right {
    grid-column: span 8;
  }

  .article-layout .sidebar-left {
    order: 0;
  }

  .hero-overlay h1 { font-size: 1.375rem; }
}
