/* test publisher — Verge-style editorial layout.
 * No external fonts, no framework. Pure CSS.
 */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: #fff;
  color: #111;
  line-height: 1.5;
}

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

/* ---------- Header ---------- */

.site-header {
  border-bottom: 3px solid #111;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.site-logo svg {
  height: 32px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar { display: none; }

.site-nav a {
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #111;
  white-space: nowrap;
  padding: 4px 0;
}

.site-nav a:hover {
  color: #ff4e13;
  text-decoration: none;
}

.site-nav a.active {
  color: #ff4e13;
}

/* ---------- Layout ---------- */

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px;
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
}

@media (min-width: 1024px) {
  .home-layout {
    grid-template-columns: minmax(0, 2fr) 300px;
    align-items: start;
  }
}

/* ---------- Category tag ---------- */

.tag {
  display: inline-block;
  background: #ff4e13;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 2px;
  margin-bottom: 10px;
}

/* ---------- Cards ---------- */

.card {
  display: block;
  border: 1px solid #eee;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  color: inherit;
}

.card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
  text-decoration: none;
}

.card .card-media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f5f5f5;
  overflow: hidden;
}

.card .card-media img,
.card .card-media svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card .card-body {
  padding: 16px;
}

.card .card-title {
  margin: 0 0 10px 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: #111;
}

.card .card-meta {
  font-size: 12px;
  color: #666;
  margin: 0;
}

.card .card-meta .sep {
  margin: 0 6px;
  color: #bbb;
}

/* Hero card (featured) */
.hero-card .card-title {
  font-size: 30px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.01em;
}

@media (min-width: 768px) {
  .hero-card .card-title {
    font-size: 36px;
  }
}

/* Grid of non-hero cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-btn {
  background: #fff;
  border: 1px solid #ddd;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #111;
  cursor: pointer;
  border-radius: 2px;
  font-family: inherit;
}

.filter-btn:hover { border-color: #111; }

.filter-btn.active {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* ---------- Sidebar ad wrapper ---------- */

.sidebar {
  position: sticky;
  top: 100px;
}

#ad-slot-wrapper {
  display: flex;
  justify-content: center;
}

#ad-slot-1 {
  background: #fafafa;
  border: 1px dashed #ddd;
}

/* ---------- Article page ---------- */

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

@media (min-width: 1024px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

.article-main {
  max-width: 720px;
}

.article-main h1 {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  margin: 12px 0 16px 0;
  letter-spacing: -0.01em;
}

@media (min-width: 768px) {
  .article-main h1 {
    font-size: 44px;
  }
}

.article-main .byline {
  color: #666;
  font-size: 14px;
  margin-bottom: 24px;
}

.article-main .hero {
  margin: 0 0 28px 0;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #f5f5f5;
}

.article-main .hero img,
.article-main .hero svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-main .body {
  font-size: 17px;
  line-height: 1.7;
  color: #222;
}

.article-main .body p {
  margin: 0 0 1.2em 0;
}

.sidebar-sticky {
  position: sticky;
  top: 100px;
}

.sidebar-sticky h3 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #666;
  margin: 0 0 12px 0;
  border-top: 2px solid #111;
  padding-top: 10px;
}

.sidebar-sticky ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}

.sidebar-sticky li {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.sidebar-sticky li a:hover { color: #ff4e13; }

.not-found {
  padding: 40px 0;
  text-align: center;
}

.not-found h1 { font-size: 28px; margin-bottom: 12px; }

.not-found a { color: #ff4e13; font-weight: 600; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid #eee;
  margin-top: 64px;
  padding: 32px 20px;
  color: #666;
  font-size: 13px;
}

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer nav { display: flex; gap: 18px; }

/* ---------- Responsive breakpoint ---------- */

@media (max-width: 767px) {
  .site-header-inner { gap: 16px; padding: 12px 16px; }
  .site-nav a { font-size: 13px; }
  .wrap { padding: 20px 16px; }
  .card-grid { gap: 18px; margin-top: 24px; }
  .sidebar, .sidebar-sticky { position: static; top: auto; }
}
