/* ============================================================
   winzheng.jp — "和モダン" Wa-Modern Japanese Editorial
   Inspired by Nikkei, ITmedia, Monocle, The Verge Japan
   Clean, precise, warm, information-dense but breathable.
   ============================================================ */

/* ============================================================
   1. Design Tokens
   ============================================================ */
:root {
  --bg: #ffffff;
  --bg-warm: #faf8f5;
  --bg-surface: #f5f4f1;
  --text: #1c1c1e;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --accent: #c5342e;
  --accent-hover: #a82a25;
  --accent-light: rgba(197, 52, 46, 0.06);
  --accent-bg: rgba(197, 52, 46, 0.04);
  --border: #e5e5e3;
  --border-light: #f0efed;
  --nav-bg: #111827;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08);
  --font-sans: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  --font-serif: 'Noto Serif JP', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --font-mono: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
  --container: 1140px;
  --header-h: 65px;
  --radius: 6px;
  --radius-lg: 10px;
  --radius-pill: 100px;
  --transition: 0.2s ease;
}


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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

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

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

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

::selection {
  background: var(--accent-light);
  color: var(--text);
}


/* ============================================================
   3. Layout & Utilities
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 10000;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 700;
}

.skip-link:focus {
  top: 8px;
  color: #fff;
}

.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;
}


/* ============================================================
   4. Header
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #fff;
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo:hover {
  opacity: 0.85;
}

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background-color: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  border-radius: 4px;
  letter-spacing: -0.5px;
  line-height: 1;
}

.logo-text {
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.logo-img {
  height: 45px;
  width: auto;
  display: block;
}

/* Header Navigation */
.header-nav {
  display: none;
  align-items: center;
  gap: 1px;
  margin-left: 24px;
}

.header-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 15px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  border-radius: 5px;
  transition: color var(--transition), background-color var(--transition);
  white-space: nowrap;
}

.header-nav__link i {
  font-size: 0.8em;
  opacity: 0.6;
}

.header-nav__link:hover i,
.header-nav__link.active i {
  opacity: 1;
}

.header-nav__link:hover {
  color: var(--text);
  background-color: var(--bg-surface);
}

.header-nav__link.active {
  color: var(--accent);
  font-weight: 600;
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-secondary);
  border-radius: 4px;
  transition: color var(--transition), background-color var(--transition);
}

.nav-search-btn:hover {
  color: var(--text);
  background-color: var(--bg-surface);
}

.header-rss-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-muted);
  border-radius: 4px;
  transition: color var(--transition), background-color var(--transition);
  text-decoration: none;
  font-size: 14px;
}

.header-rss-btn:hover {
  color: #f59e0b;
  background-color: rgba(245, 158, 11, 0.06);
}

.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-secondary);
  border-radius: 4px;
  transition: color var(--transition), background-color var(--transition);
}

.mobile-menu-btn:hover {
  color: var(--text);
  background-color: var(--bg-surface);
}

/* Mobile Nav Open */
.header-nav.mobile-open {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #fff;
  margin-left: 0;
  padding: 20px;
  gap: 2px;
  align-items: stretch;
  overflow-y: auto;
  z-index: 999;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  animation: slideDown 0.25s ease forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header-nav.mobile-open .header-nav__link {
  font-size: 15px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  border-radius: 0;
}


/* ============================================================
   5. Search Overlay
   ============================================================ */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background-color: rgba(17, 24, 39, 0.92);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 18vh;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.search-overlay.open {
  opacity: 1;
  visibility: visible;
}

.search-overlay__inner {
  width: 100%;
  max-width: 580px;
  padding: 0 20px;
}

.search-overlay__form {
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
  transform: translateY(12px);
  transition: transform 0.25s ease;
}

.search-overlay.open .search-overlay__form {
  transform: translateY(0);
}

.search-overlay__icon {
  position: absolute;
  left: 18px;
  color: var(--text-secondary);
  font-size: 18px;
  pointer-events: none;
  display: flex;
}

.search-overlay__input {
  width: 100%;
  padding: 18px 18px 18px 52px;
  border: none;
  outline: none;
  font-size: 16px;
  color: var(--text);
  background: transparent;
}

.search-overlay__input::placeholder {
  color: #b0b0b0;
}

.search-overlay__close {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  border-radius: var(--radius);
  transition: background-color var(--transition), color var(--transition);
}

.search-overlay__close:hover {
  background-color: var(--bg-surface);
  color: var(--text);
}


/* ============================================================
   6. Hero Section
   ============================================================ */
.hero,
.hero-section {
  background: var(--bg-warm);
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.hero__inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero__label,
.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  background: var(--accent-light);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 1.25rem;
}

.hero__label::before,
.hero__tag::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 1rem;
  color: var(--text);
}

.hero__title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

.hero__title a:hover {
  color: var(--accent);
}

.hero__excerpt {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.9;
  max-width: 560px;
  margin: 0 auto 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hero__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  background: var(--accent);
  padding: 9px 24px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background-color var(--transition);
  margin-top: 0.75rem;
  text-decoration: none;
}

.hero__link:hover {
  background-color: var(--accent-hover);
  color: #fff;
}

/* Hero fallback */
.hero-none {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
}


/* ============================================================
   7. Section Headers
   ============================================================ */
.section-head,
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.section-head h2,
.section-header h2 {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.3;
}

.section-head h2 svg,
.section-header h2 svg,
.section-head h2 i,
.section-header h2 i {
  color: var(--accent);
  font-size: 1.1em;
}

.section-head__more,
.section-header__more {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: color var(--transition);
}

.section-head__more:hover,
.section-header__more:hover {
  color: var(--accent);
}


/* ============================================================
   8. Card Grid
   ============================================================ */
.card-grid,
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2.5rem;
}


/* ============================================================
   9. Cards
   ============================================================ */
.card,
.article-card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
}

.card:hover,
.article-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #d5d5d3;
}

.card > a,
.article-card > a {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
}

.card__image,
.article-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-card__body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Card Badge */
.card__badge,
.article-card__source-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  color: #fff;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 0.65rem;
  align-self: flex-start;
  letter-spacing: 0.03em;
  background-color: var(--text-secondary);
}

/* Card Title */
.card__title,
.article-card__title {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
}

.card__title a,
.article-card__title a {
  color: var(--text);
  text-decoration: none;
}

.article-card__title a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.card__title a:hover,
.article-card__title a:hover {
  color: var(--accent);
}

/* Card Excerpt */
.card__excerpt,
.article-card__excerpt {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* Card Tags */
.card__tags,
.article-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
  position: relative;
  z-index: 2;
}

.card__tag,
.article-card__tag {
  display: inline-block;
  font-size: 0.68rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid var(--border-light);
  transition: color var(--transition), background-color var(--transition);
  text-decoration: none;
}

.card__tag:hover,
.article-card__tag:hover {
  color: var(--accent);
  background: var(--accent-light);
}

/* Card Meta */
.card__meta,
.article-card__meta,
.article-card__info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-light);
}

.card__meta span,
.article-card__meta span,
.article-card__info span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Featured Card */
.article-card--featured {
  border-color: transparent;
  background: linear-gradient(135deg, #fefefe, var(--bg-warm));
  box-shadow: var(--shadow-sm);
}

.article-card--featured .article-card__title {
  font-size: 1.05rem;
}


/* ============================================================
   10. Popular / Ranking List
   ============================================================ */
.popular-list,
.ranking {
  list-style: none;
  padding: 0;
  margin: 0;
}

.popular-item,
.ranking__item {
  display: flex;
  gap: 0.85rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border-light);
  align-items: flex-start;
}

.popular-item:last-child,
.ranking__item:last-child {
  border-bottom: none;
}

.popular-rank,
.ranking__num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.popular-rank--1,
.ranking__num--1 {
  background: var(--accent-light);
  color: var(--accent);
  border-color: rgba(197, 52, 46, 0.2);
}

.popular-rank--2,
.ranking__num--2 {
  background: rgba(197, 52, 46, 0.04);
  color: rgba(197, 52, 46, 0.8);
  border-color: rgba(197, 52, 46, 0.15);
}

.popular-rank--3,
.ranking__num--3 {
  background: rgba(197, 52, 46, 0.03);
  color: rgba(197, 52, 46, 0.65);
  border-color: rgba(197, 52, 46, 0.1);
}

.popular-body,
.ranking__body {
  flex: 1;
  min-width: 0;
}

.popular-title,
.ranking__title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.popular-title a,
.ranking__title a {
  color: var(--text);
  text-decoration: none;
  transition: color var(--transition);
}

.popular-title a:hover,
.ranking__title a:hover {
  color: var(--accent);
}

.popular-excerpt {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
}

.popular-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.6rem;
  margin-top: 4px;
}


/* ============================================================
   11. Home Layout
   ============================================================ */
.home-grid,
.home-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding: 2.5rem 0;
}

.sidebar-section {
  margin-bottom: 2rem;
}


/* ============================================================
   12. Channel Navigation & Tags
   ============================================================ */
.channel-nav {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--header-h);
  z-index: 100;
}

.channel-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 20px;
  max-width: var(--container);
  margin: 0 auto;
}

.channel-tabs::-webkit-scrollbar {
  display: none;
}

.channel-tab {
  display: inline-block;
  padding: 12px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  text-decoration: none;
}

.channel-tab:hover {
  color: var(--text);
}

.channel-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* Tags Navigation */
.tags-nav {
  background: var(--bg-warm);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

.tags-list {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 20px;
  max-width: var(--container);
  margin: 0 auto;
}

.tags-list::-webkit-scrollbar {
  display: none;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  white-space: nowrap;
  transition: color var(--transition), background-color var(--transition), border-color var(--transition);
  text-decoration: none;
}

.tag:hover {
  color: var(--text);
  background: var(--bg-surface);
}

.tag.active {
  color: var(--accent);
  background: var(--accent-light);
  border-color: var(--accent);
  font-weight: 600;
}


/* ============================================================
   13. Article Detail Layout
   ============================================================ */
.article-layout {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 1.5rem 0 3rem;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  padding-top: 1rem;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span {
  color: #ccc;
}

/* Article Title */
.article__title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 1rem;
}

/* Article Meta */
.article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.article__meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.article__meta-item svg,
.article__meta-item i {
  font-size: 13px;
  opacity: 0.5;
}

/* Article Tags */
.article__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 2rem;
}

.article__tag {
  display: inline-block;
  padding: 3px 12px;
  font-size: 0.8rem;
  color: var(--accent);
  border: 1px solid rgba(197, 52, 46, 0.4);
  border-radius: var(--radius-pill);
  transition: background-color var(--transition), color var(--transition);
  text-decoration: none;
}

.article__tag:hover {
  background-color: var(--accent);
  color: #fff;
}


/* ============================================================
   14. Article Content — The Most Important Section
   Perfect Japanese reading typography.
   ============================================================ */
.article__content {
  font-size: 1.05rem;
  line-height: 2.0;
  color: var(--text);
}

.article__content > * + * {
  margin-top: 1.5em;
}

.article__content h2 {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 2.5em;
  margin-bottom: 0.6em;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
  line-height: 1.4;
}

.article__content h3 {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: 0.4em;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
  line-height: 1.4;
}

.article__content h4 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  margin-top: 1.5em;
  margin-bottom: 0.3em;
  line-height: 1.4;
}

.article__content p {
  margin-bottom: 0;
}

.article__content ul,
.article__content ol {
  padding-left: 1.5em;
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}

.article__content ul {
  list-style: disc;
}

.article__content ol {
  list-style: decimal;
}

.article__content li {
  margin-bottom: 0.3em;
  line-height: 2.0;
}

.article__content li::marker {
  color: var(--accent);
}

.article__content blockquote {
  margin: 1.5em 0;
  padding: 16px 20px;
  border-left: 4px solid rgba(197, 52, 46, 0.4);
  background: var(--bg-warm);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.article__content blockquote p {
  margin: 0;
}

.article__content code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 2px 5px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--accent);
}

.article__content pre {
  margin: 1.5em 0;
  padding: 20px;
  background: #1e1e2e;
  color: #cdd6f4;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}

.article__content pre code {
  padding: 0;
  background: none;
  border: none;
  color: inherit;
  font-size: inherit;
}

.article__content img {
  border-radius: var(--radius-lg);
  margin: 1.5em 0;
}

.article__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.9rem;
}

.article__content table th,
.article__content table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.article__content table th {
  font-weight: 600;
  background: var(--bg-surface);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.article__content table tr:hover td {
  background: var(--bg-surface);
}

.article__content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(197, 52, 46, 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--transition);
}

.article__content a:hover {
  text-decoration-color: var(--accent);
}

.article__content strong {
  font-weight: 700;
}

.article__content em {
  font-style: italic;
}

/* Share Buttons */
.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: color var(--transition), border-color var(--transition), background-color var(--transition);
  text-decoration: none;
}

.share-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background-color: var(--accent-light);
}

.share-btn svg,
.share-btn i {
  font-size: 14px;
}


/* ============================================================
   15. Related Section
   ============================================================ */
.related-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related-section h2 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  padding-left: 10px;
  border-left: 3px solid var(--accent);
  margin-bottom: 1.25rem;
  line-height: 1.3;
}

.related-list {
  display: flex;
  flex-direction: column;
}

.related-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  transition: color var(--transition);
}

.related-item:last-child {
  border-bottom: none;
}

.related-item:hover {
  color: var(--accent);
}

.related-item__title {
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.5;
  flex: 1;
  min-width: 0;
}

.related-item__date {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  margin-top: 2px;
  flex-shrink: 0;
}


/* ============================================================
   16. Sidebar
   ============================================================ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-widget {
  background: var(--bg-warm);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  border: 1px solid var(--border-light);
}

.sidebar-widget__header {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-widget__header svg,
.sidebar-widget__header i {
  color: var(--accent);
  font-size: 1em;
}

.sidebar-widget__list {
  display: flex;
  flex-direction: column;
}

.sidebar-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  font-size: 0.82rem;
  line-height: 1.5;
  transition: color var(--transition);
}

.sidebar-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-item:first-child {
  padding-top: 0;
}

.sidebar-item:hover {
  color: var(--accent);
}

.sidebar-item__rank {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.sidebar-item__title {
  flex: 1;
  font-weight: 500;
  min-width: 0;
}

.sidebar-item__meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}


/* ============================================================
   17. Verification Badge
   ============================================================ */
.verification-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  line-height: 1.5;
}

.verification-badge.verified,
.verification-badge--verified {
  background: #e8f5e9;
  color: #2e7d32;
}

.verification-badge.unverified,
.verification-badge--unverified {
  background: #fff3e0;
  color: #e65100;
}

.verification-badge svg,
.verification-badge i {
  font-size: 12px;
}


/* ============================================================
   18. Pagination
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 2.5rem 0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  transition: color var(--transition), background-color var(--transition), border-color var(--transition);
}

.pagination a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background-color: var(--accent-light);
}

.pagination .current {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}

.pagination .dots {
  border: none;
  color: var(--text-muted);
  min-width: auto;
  padding: 0 4px;
}


/* ============================================================
   19. Page Title
   ============================================================ */
.page-title {
  font-family: var(--font-sans);
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  font-weight: 700;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
  margin: 1.5rem 0;
  line-height: 1.3;
}


/* ============================================================
   20. Empty State
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-secondary);
}

.empty-state__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.empty-state p {
  font-size: 1rem;
  line-height: 1.8;
}


/* ============================================================
   21. Footer
   ============================================================ */
.footer {
  background: var(--bg-warm);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.5rem;
}

.footer-brand a {
  display: block;
  text-decoration: none;
}

.footer-logo-img {
  height: 30px;
  width: auto;
  display: block;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.footer-brand a:hover .footer-logo-img {
  opacity: 1;
}

.footer-logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background-color: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  border-radius: 3px;
  line-height: 1;
}

.footer-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.footer-tagline {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 1.5rem;
}

.footer-nav a {
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-nav a:hover {
  color: var(--accent);
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 14px;
  transition: color var(--transition), border-color var(--transition), background-color var(--transition);
  text-decoration: none;
}

.footer-social a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background-color: var(--accent-light);
}

.footer-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.footer-lang a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-lang a:hover {
  color: var(--accent);
}

.footer-lang__current {
  color: var(--text);
  font-weight: 600;
}

.footer-lang__sep {
  color: var(--border);
  font-size: 0.7rem;
}

.footer-copyright {
  font-size: 0.72rem;
  color: var(--text-muted);
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}


/* ============================================================
   22. Back to Top
   ============================================================ */
.back-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition), color var(--transition), border-color var(--transition);
  z-index: 500;
  text-decoration: none;
}

.back-top:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.back-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}


/* ============================================================
   23. 404 Error Page
   ============================================================ */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  text-align: center;
  padding: 40px 20px;
}

.error-page__icon {
  font-size: 72px;
  margin-bottom: 16px;
  opacity: 0.25;
  color: var(--text-muted);
}

.error-page h1 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.error-page p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.8;
}

.error-page a {
  display: inline-block;
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background-color var(--transition);
  text-decoration: none;
}

.error-page a:hover {
  background: var(--accent-hover);
  color: #fff;
}


/* ============================================================
   24. Responsive: Mobile (default, < 768px)
   ============================================================ */

/* Mobile: header-nav hidden (already set above) */
/* Mobile: grids are 1fr (already set above) */
/* Mobile: home-grid single column (already set above) */


/* ============================================================
   25. Responsive: Tablet (768px+)
   ============================================================ */
@media (min-width: 768px) {
  .header-nav {
    display: flex;
  }

  .mobile-menu-btn {
    display: none;
  }

  .articles-grid,
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .article-card--featured {
    grid-column: span 2;
  }

  .article-card--featured .article-card__body {
    padding: 1.5rem;
  }

  .article-card--featured .article-card__title {
    font-size: 1.1rem;
  }

  .hero,
  .hero-section {
    padding: 3rem 0;
  }

  .hero__title {
    font-size: clamp(1.8rem, 3.5vw, 2.2rem);
  }

  .article__title {
    font-size: clamp(1.7rem, 4vw, 2.2rem);
  }

  .page-title {
    font-size: clamp(1.4rem, 3vw, 1.6rem);
  }

  .container {
    padding-left: 24px;
    padding-right: 24px;
  }
}


/* ============================================================
   26. Responsive: Desktop (1024px+)
   ============================================================ */
@media (min-width: 1024px) {
  .articles-grid,
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .article-card--featured {
    grid-column: span 2;
  }

  .home-grid,
  .home-layout {
    grid-template-columns: 1fr 340px;
  }

  .article-layout {
    flex-direction: row;
  }

  .article-layout > main,
  .article-layout > .article-main {
    flex: 1;
    min-width: 0;
    max-width: 720px;
  }

  .article-layout > .sidebar {
    width: 280px;
    flex-shrink: 0;
  }

  .hero,
  .hero-section {
    padding: 3.5rem 0;
  }

  .hero__title {
    font-size: 2.2rem;
  }

  .article__title {
    font-size: 2.2rem;
  }

  .container {
    padding-left: 20px;
    padding-right: 20px;
  }
}


/* ============================================================
   27. Large Desktop (1200px+)
   ============================================================ */
@media (min-width: 1200px) {
  .hero__inner {
    max-width: 760px;
  }

  .article-layout > main,
  .article-layout > .article-main {
    max-width: 740px;
  }

  .article-layout > .sidebar {
    width: 300px;
  }
}


/* ============================================================
   28. Print Styles
   ============================================================ */
@media print {
  .header,
  .footer,
  .sidebar,
  .share-buttons,
  .back-top,
  .search-overlay,
  .channel-nav,
  .tags-nav,
  .pagination,
  .breadcrumb,
  .article__tags,
  .related-section {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
    font-size: 12pt;
    line-height: 1.8;
  }

  .article__title {
    font-size: 18pt;
    line-height: 1.4;
  }

  .article__content {
    font-size: 11pt;
    line-height: 1.9;
  }

  .article__content a {
    color: #000;
    text-decoration: underline;
  }

  .article__content a::after {
    content: ' (' attr(href) ')';
    font-size: 9pt;
    color: #666;
  }

  .article__content pre {
    background: #f5f5f5;
    color: #000;
    border: 1px solid #ccc;
  }

  .article__content img {
    max-width: 100%;
    page-break-inside: avoid;
  }
}


/* ============================================================
   29. Accessibility
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}


/* ============================================================
   30. Reduced Motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
