*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; }
body {
  font-family: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.7;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; height: auto; }

a { color: #2962ff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.logo {
  font-weight: 800;
  font-size: 20px;
  color: #1a1a1a;
  text-decoration: none;
}
.logo span { color: #2962ff; }
.logo:hover { text-decoration: none; }
.nav-links { display: flex; gap: 20px; }
.nav-links a {
  color: #555;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.nav-links a:hover { color: #2962ff; text-decoration: none; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  width: 36px;
  height: 36px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #333;
  margin: 5px auto;
  transition: transform .2s, opacity .2s;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Content */
.content-wrap {
  flex: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 12px;
  color: #888;
  margin: 12px 0;
}
.breadcrumb a { color: #666; text-decoration: none; }
.breadcrumb a:hover { color: #2962ff; }

/* Article */
article {
  background: #fff;
  border-radius: 8px;
  padding: 28px 24px;
  margin: 20px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
article h1 {
  font-size: 26px;
  line-height: 1.3;
  color: #1a1a1a;
  margin-bottom: 8px;
}
.meta {
  font-size: 13px;
  color: #888;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}
article h2 {
  font-size: 19px;
  color: #1a1a1a;
  margin: 24px 0 10px;
}
article p {
  margin-bottom: 16px;
  color: #444;
  font-size: 16px;
}
article ul, article ol {
  margin: 0 0 16px 20px;
  color: #444;
}
article li {
  margin-bottom: 6px;
  font-size: 15px;
}
.highlight {
  background: #e3f2fd;
  border-left: 3px solid #2962ff;
  padding: 12px 16px;
  margin: 16px 0;
  border-radius: 4px;
  font-size: 14px;
}

/* Ad slots */
.ad-slot {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 16px auto;
  overflow: hidden;
  max-width: 100%;
}
.ad-slot > div { max-width: 100%; }
.ad-header {
  background: #f0f0f0;
  border-bottom: 1px solid #e0e0e0;
  padding: 8px 0;
}
.ad-footer {
  background: #f0f0f0;
  border-top: 1px solid #e0e0e0;
  padding: 12px 0;
}
.ad-content {
  margin: 20px auto;
}

/* Related */
.related {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}
.related h3 {
  font-size: 15px;
  color: #1a1a1a;
  margin-bottom: 10px;
}
.related a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
}

/* Footer */
.site-footer {
  background: #1a1a1a;
  color: #888;
  padding: 24px 16px;
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
}
.site-footer a {
  color: #aaa;
  text-decoration: none;
  display: inline-block;
  padding: 6px 4px;
  min-height: 44px;
  line-height: 32px;
}
.site-footer a:hover { color: #fff; }

/* Article images */
.article-hero {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 20px;
  display: block;
}
article figure {
  margin: 20px 0;
}
article figure img {
  width: 100%;
  border-radius: 6px;
  display: block;
}
article figcaption {
  font-size: 13px;
  color: #888;
  margin-top: 6px;
  text-align: center;
}

/* Homepage */
.hero-section {
  background: #fff;
  border-radius: 8px;
  padding: 28px 24px;
  margin: 20px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.hero-section h1 {
  font-size: 24px;
  color: #1a1a1a;
  margin-bottom: 10px;
  line-height: 1.3;
}
.hero-section p {
  font-size: 15px;
  color: #555;
  margin-bottom: 12px;
  line-height: 1.6;
}
.hero-section > p:last-of-type { margin-bottom: 0; }
.page-title {
  font-size: 14px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 24px 0 16px;
}
.article-grid {
  display: grid;
  gap: 16px;
}
.article-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  text-decoration: none;
  color: inherit;
  display: block;
}
.article-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  text-decoration: none;
}
.card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.card-body {
  padding: 16px 20px 20px;
}
.article-card .card-cat {
  font-size: 11px;
  font-weight: 600;
  color: #2962ff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.article-card h2 {
  font-size: 18px;
  line-height: 1.35;
  color: #1a1a1a;
  margin: 0 0 8px;
}
.article-card .card-meta {
  font-size: 13px;
  color: #888;
}
.article-card p {
  font-size: 14px;
  color: #666;
  margin-top: 8px;
  line-height: 1.5;
}

/* Static pages */
.static-page {
  background: #fff;
  border-radius: 8px;
  padding: 28px 24px;
  margin: 20px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.static-page h1 {
  font-size: 24px;
  color: #1a1a1a;
  margin-bottom: 16px;
}
.static-page h2 {
  font-size: 18px;
  color: #1a1a1a;
  margin: 20px 0 8px;
}
.static-page p {
  margin-bottom: 14px;
  color: #444;
  font-size: 15px;
}
.static-page ul {
  margin: 0 0 14px 20px;
  color: #444;
}
.static-page li {
  margin-bottom: 4px;
  font-size: 15px;
}

/* Tablet */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    flex-direction: column;
    padding: 8px 16px 12px;
    gap: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 10px 0;
    font-size: 15px;
    border-bottom: 1px solid #f0f0f0;
  }
  .nav-links a:last-child { border-bottom: none; }
  .ad-slot { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .writers-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { flex-direction: column; gap: 24px; }
  .footer-links-grid { gap: 32px; }
}

/* Mobile */
@media (max-width: 480px) {
  article { padding: 18px 14px; }
  article h1 { font-size: 22px; }
  .card-body { padding: 14px 16px 16px; }
  .card-img { height: 140px; }
  .article-card h2 { font-size: 16px; }
  .static-page { padding: 18px 14px; }
  .hero-section { padding: 20px 16px; }
  .hero-section h1 { font-size: 20px; }
}

/* Writers grid */
.writers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.writer-card {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  text-decoration: none;
  color: inherit;
  display: block;
}
.writer-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  text-decoration: none;
}
.writer-card h3 {
  font-size: 15px;
  color: #1a1a1a;
  margin-bottom: 4px;
}
.writer-card p {
  font-size: 13px;
  color: #888;
  line-height: 1.4;
}

/* Category cross-links */
.cross-links {
  margin: 20px 0;
  padding: 16px 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  font-size: 14px;
  color: #666;
}
.cross-links span { font-weight: 600; color: #555; }
.cross-links a { margin: 0 6px; }

/* Hero stats */
.hero-stats {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}
.stat-item {
  display: flex;
  flex-direction: column;
}
.stat-item strong {
  font-size: 20px;
  color: #2962ff;
  line-height: 1.2;
}
.stat-item span {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}

/* Category nav pills */
.category-nav {
  display: flex;
  gap: 8px;
  margin: 16px 0;
  flex-wrap: wrap;
}
.cat-pill {
  display: inline-block;
  padding: 6px 16px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  text-decoration: none;
  transition: all .15s;
}
.cat-pill:hover {
  background: #2962ff;
  color: #fff;
  border-color: #2962ff;
  text-decoration: none;
}

/* Featured card */
.featured-section { margin: 8px 0 24px; }
.featured-card {
  display: block;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  text-decoration: none;
  color: inherit;
}
.featured-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  text-decoration: none;
}
.featured-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}
.featured-body {
  padding: 20px 24px 24px;
}
.featured-body .card-cat {
  font-size: 11px;
  font-weight: 600;
  color: #2962ff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.featured-body h2 {
  font-size: 22px;
  line-height: 1.3;
  color: #1a1a1a;
  margin: 0 0 10px;
}
.featured-body p {
  font-size: 15px;
  color: #555;
  line-height: 1.5;
  margin: 0 0 10px;
}
.featured-body .card-meta {
  font-size: 13px;
  color: #888;
}

/* Newsletter */
.newsletter-section {
  background: #1a2332;
  color: #fff;
  border-radius: 8px;
  padding: 32px 28px;
  margin: 28px 0;
  text-align: center;
}
.newsletter-section h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: #fff;
}
.newsletter-section p {
  font-size: 14px;
  color: #a0aec0;
  margin-bottom: 20px;
}
.newsletter-form {
  display: flex;
  gap: 8px;
  max-width: 400px;
  margin: 0 auto;
}
.newsletter-form input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #3a4a5c;
  border-radius: 6px;
  background: #253040;
  color: #fff;
  font-size: 14px;
  outline: none;
}
.newsletter-form input::placeholder { color: #6b7a8d; }
.newsletter-form input:focus { border-color: #2962ff; }
.newsletter-form button {
  padding: 10px 20px;
  background: #2962ff;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.newsletter-form button:hover { background: #1e50d9; }
.newsletter-form button:disabled { background: #2e7d32; cursor: default; }
.newsletter-note {
  font-size: 12px;
  color: #6b7a8d;
  margin-top: 12px;
}

/* Trending */
.trending-section {
  margin: 8px 0 24px;
}
.trending-list {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  overflow: hidden;
}
.trending-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  color: inherit;
  transition: background .1s;
}
.trending-item:last-child { border-bottom: none; }
.trending-item:hover { background: #fafafa; text-decoration: none; }
.trending-num {
  font-size: 24px;
  font-weight: 800;
  color: #e0e0e0;
  min-width: 32px;
  text-align: center;
}
.trending-item:hover .trending-num { color: #2962ff; }
.trending-item h4 {
  font-size: 15px;
  color: #1a1a1a;
  margin: 0 0 2px;
  line-height: 1.3;
}
.trending-meta {
  font-size: 12px;
  color: #888;
}

/* Expanded footer */
.footer-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  gap: 40px;
  padding: 0 16px;
  text-align: left;
}
.footer-brand {
  flex: 1;
}
.footer-logo {
  font-weight: 800;
  font-size: 18px;
  color: #ccc;
}
.footer-logo span { color: #4a8aff; }
.footer-brand p {
  font-size: 13px;
  color: #777;
  margin-top: 8px;
  line-height: 1.5;
}
.footer-links-grid {
  display: flex;
  gap: 40px;
}
.footer-links-grid h4 {
  font-size: 13px;
  color: #aaa;
  font-weight: 600;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.footer-links-grid a {
  display: block;
  font-size: 13px;
  color: #888;
  padding: 3px 0;
  text-decoration: none;
  min-height: auto;
  line-height: 1.6;
}
.footer-links-grid a:hover { color: #fff; }
.footer-bottom {
  max-width: 720px;
  margin: 20px auto 0;
  padding: 16px 16px 0;
  border-top: 1px solid #333;
  text-align: center;
}
.footer-bottom p {
  font-size: 12px;
  color: #666;
}

@media (max-width: 480px) {
  .hero-stats { flex-direction: column; gap: 12px; }
  .hero-stats .stat-item { flex-direction: row; gap: 8px; align-items: baseline; }
  .featured-img { height: 180px; }
  .featured-body { padding: 16px 18px 20px; }
  .featured-body h2 { font-size: 18px; }
  .newsletter-section { padding: 24px 18px; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form button { width: 100%; padding: 12px; }
  .trending-item { padding: 12px 16px; gap: 12px; }
  .trending-item h4 { font-size: 14px; }
  .footer-links-grid { flex-direction: column; gap: 20px; }
}

/* Small mobile */
@media (max-width: 360px) {
  .header-inner { height: 48px; }
  .logo { font-size: 18px; }
  article { padding: 14px 10px; }
  article h1 { font-size: 20px; }
  article h2 { font-size: 17px; }
  .meta { font-size: 12px; }
  .card-img { height: 120px; }
  .card-body { padding: 12px 14px 14px; }
  .article-card h2 { font-size: 15px; }
  .static-page { padding: 14px 10px; }
  .hero-section { padding: 16px 12px; }
  .hero-section h1 { font-size: 18px; }
  .site-footer { font-size: 12px; }
  .featured-img { height: 140px; }
  .category-nav { gap: 6px; }
  .cat-pill { padding: 5px 12px; font-size: 12px; }
}
