*, *::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;
}
.ad-header {
  background: #f0f0f0;
  border-bottom: 1px solid #e0e0e0;
  padding: 8px 0;
}
.ad-footer {
  background: #f0f0f0;
  border-top: 1px solid #e0e0e0;
  padding: 12px 0;
}

/* 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-child { 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; }
}

/* 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; }

@media (max-width: 768px) {
  .writers-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 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; }
}
