:root {
  --text: #222;
  --muted: #666;
  --link: #b51f52;
  --line: #d8d8d8;
  --paper: #fff;
  --page: #eee;
  --header: #292929;
  --max: 960px;
  --reading: 720px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

a { color: var(--link); }
a:hover { text-decoration: none; }
a:focus-visible { outline: 2px solid #e287aa; outline-offset: 2px; }
.shell { width: min(calc(100% - 24px), var(--max)); margin: 0 auto; }
.skip-link { position: absolute; left: 8px; top: -50px; padding: 6px 9px; background: #fff; color: #111; }
.skip-link:focus { top: 8px; }

.site-header { background: var(--header); border-bottom: 4px solid var(--link); }
.header-inner { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { color: #fff; font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-weight: bold; text-decoration: none; }
.site-nav { display: flex; gap: 16px; }
.site-nav a { color: #eee; font-size: 13px; text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }

h1, h2, h3 { margin-top: 0; color: #222; font-family: Georgia, "Times New Roman", serif; line-height: 1.2; }
h1 { font-size: 34px; }
h2 { font-size: 23px; }

.hero { background: #fff; border-bottom: 1px solid var(--line); padding: 26px 0 22px; }
.hero h1 { margin-bottom: 8px; }
.hero-copy { max-width: 700px; margin: 0; color: var(--muted); font-size: 16px; }
.homepage-feature { display: grid; grid-template-columns: 290px 1fr; gap: 16px; margin-top: 20px; padding: 14px; background: var(--paper); border: 1px solid var(--line); }
.feature-image { display: block; align-self: start; background: #ddd; border: 1px solid #ccc; }
.feature-photo { display: block; width: 100%; height: 184px; object-fit: cover; }
.homepage-feature h2 { margin-bottom: 8px; }
.homepage-feature p { margin: 0 0 10px; }
.homepage-feature p:last-child { margin-bottom: 0; padding-top: 10px; border-top: 1px solid var(--line); }

.latest { padding: 24px 0 36px; }
.articles-title { margin-bottom: 12px; font-size: 27px; }
.story-list { background: var(--paper); border: 1px solid var(--line); }
.story-card { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.story-card:last-child { border-bottom: 0; }
.story-thumb { display: block; width: 150px; height: 94px; overflow: hidden; background: #ddd; border: 1px solid #ccc; }
.story-thumb-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.story-card h2 { margin: 0 0 4px; font-size: 20px; }
.story-card h2 a { color: #222; text-decoration: none; }
.story-card h2 a:hover { color: var(--link); text-decoration: underline; }
.story-card p { margin: 0; color: var(--muted); }

.article-shell { max-width: calc(var(--reading) + 34px); padding-top: 20px; padding-bottom: 28px; }
.article-card { background: var(--paper); border: 1px solid var(--line); }
.article-head { padding: 20px 22px 16px; border-bottom: 1px solid var(--line); }
.article-head h1 { margin-bottom: 8px; }
.dek { margin: 0; color: var(--muted); font-size: 16px; }
.post-meta { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.article-image { margin: 0; height: 360px; overflow: hidden; background: #ddd; border-bottom: 1px solid var(--line); }
.article-photo { display: block; width: 100%; height: 100%; object-fit: cover; }
.image-pos-center { object-position: 50% 50%; }
.image-pos-upper { object-position: 50% 27%; }
.image-pos-lower { object-position: 50% 63%; }
.article-content { padding: 18px 22px 8px; }
.article-content > * { max-width: var(--reading); margin-left: auto; margin-right: auto; }
.article-content p { margin-top: 0; margin-bottom: 15px; }
.article-content h2 { margin-top: 25px; margin-bottom: 8px; }
.article-content ul { margin-top: 0; padding-left: 22px; }
.article-content li { margin-bottom: 5px; }
.editorial-link { font-weight: bold; }
.home-link { margin: 0; padding: 0 22px 18px; }

.related { padding: 16px 22px 18px; border-top: 1px solid var(--line); }
.related h2 { margin-bottom: 8px; font-size: 20px; }
.related ul { margin: 0; padding-left: 18px; }
.related li { margin: 5px 0; }
.image-credits { padding-left: 20px; }
.image-credits li { margin-bottom: 8px; overflow-wrap: anywhere; }

.site-footer { background: #ddd; border-top: 1px solid #c7c7c7; padding: 18px 0; color: #555; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.footer-inner p { margin: 0; font-size: 12px; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-inner a { color: #555; font-size: 12px; }

.error-page { min-height: 55vh; padding-top: 45px; padding-bottom: 45px; }
.error-page p { color: var(--muted); }

@media (max-width: 640px) {
  body { font-size: 14px; }
  .header-inner { align-items: flex-start; flex-direction: column; gap: 5px; padding: 10px 0; }
  .site-nav { gap: 12px; }
  h1 { font-size: 28px; }
  .hero { padding: 20px 0 18px; }
  .homepage-feature { grid-template-columns: 1fr; gap: 12px; padding: 11px; }
  .feature-photo { height: 180px; }
  .latest { padding-top: 18px; }
  .story-card { grid-template-columns: 110px 1fr; gap: 10px; padding: 10px; }
  .story-thumb { width: 110px; height: 74px; }
  .story-card h2 { font-size: 18px; }
  .story-card p { font-size: 13px; line-height: 1.4; }
  .article-shell { padding-top: 12px; }
  .article-head, .article-content, .related { padding-left: 15px; padding-right: 15px; }
  .article-image { height: 250px; }
  .home-link { padding-left: 15px; padding-right: 15px; }
  .footer-inner { align-items: flex-start; flex-direction: column; gap: 8px; }
}

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