:root {
  --ink: #0f1117;
  --ink-mid: #3d4452;
  --ink-soft: #6b7280;
  --paper: #ffffff;
  --paper-2: #f8f9fb;
  --paper-3: #f1f3f7;
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --accent-light: #dbeafe;
  --border: #e2e6ed;
  --red: #dc2626;
  --gold: #d97706;
  --green: #16a34a;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --radius: 6px;
  --radius-lg: 10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: Arial, Helvetica, sans-serif; background: var(--paper); color: var(--ink); line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4,h5,h6 { line-height: 1.25; font-weight: 700; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.01em;
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  margin-bottom: 28px;
  color: var(--ink);
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.badge-blue { background: var(--accent-light); color: var(--accent); }
.badge-red { background: #fee2e2; color: var(--red); }
.badge-gold { background: #fef3c7; color: var(--gold); }
.badge-green { background: #dcfce7; color: var(--green); }

#site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .25s, transform .3s;
}
#site-header.header-scrolled { box-shadow: var(--shadow); }
#site-header.header-hidden { transform: translateY(-100%); }

.header-inner {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 0;
}

.logo-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 32px;
}
.logo-wordmark { font-size: 1rem; font-weight: 700; color: var(--ink); letter-spacing: -.02em; white-space: nowrap; }
.logo-wordmark span { color: var(--accent); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  list-style: none;
}
.nav-menu a {
  display: block;
  font-size: .84rem;
  font-weight: 600;
  color: var(--ink-mid);
  padding: 6px 11px;
  border-radius: var(--radius);
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.nav-menu a:hover { background: var(--paper-3); color: var(--ink); }
.nav-menu a.active { color: var(--accent); background: var(--accent-light); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius);
  color: var(--ink-mid);
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--paper-3); color: var(--ink); }

#nav-toggle { display: none; }

#search-bar {
  display: none;
  background: var(--paper);
  border-top: 1px solid var(--border);
  padding: 12px 0;
}
#search-bar.search-open { display: block; }
#search-input {
  width: 100%;
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .9rem;
  font-family: Arial, sans-serif;
  outline: none;
  transition: border-color .15s;
}
#search-input:focus { border-color: var(--accent); }

.site-footer {
  background: #0f1117;
  color: #9ca3af;
  padding: 56px 0 0;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid #1f2937;
}
.footer-brand p { font-size: .85rem; line-height: 1.7; margin-top: 12px; max-width: 280px; }
.footer-col h4 { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #e5e7eb; margin-bottom: 16px; }
.footer-col a { display: block; font-size: .84rem; color: #9ca3af; margin-bottom: 10px; transition: color .15s; }
.footer-col a:hover { color: #f3f4f6; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; font-size: .78rem; flex-wrap: wrap; gap: 8px; }
.footer-logo-text { font-size: .95rem; font-weight: 700; color: #f3f4f6; letter-spacing: -.01em; }
.footer-logo-text span { color: #3b82f6; }

.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-img { aspect-ratio: 16/9; overflow: hidden; position: relative; background: var(--paper-3); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; display: block; }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: 20px; }
.card-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.card-title { font-size: 1rem; font-weight: 700; line-height: 1.3; margin-bottom: 8px; color: var(--ink); }
.card-title a:hover { color: var(--accent); }
.card-excerpt { font-size: .85rem; color: var(--ink-soft); line-height: 1.6; }
.card-author { font-size: .78rem; color: var(--ink-soft); margin-top: 14px; }

.star { color: #f59e0b; font-size: .9rem; }

[data-animate] { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease; }
[data-animate].animated { opacity: 1; transform: translateY(0); }
[data-animate][data-delay="1"] { transition-delay: .1s; }
[data-animate][data-delay="2"] { transition-delay: .2s; }
[data-animate][data-delay="3"] { transition-delay: .3s; }
[data-animate][data-delay="4"] { transition-delay: .4s; }
[data-animate][data-delay="5"] { transition-delay: .5s; }

.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--ink-soft); margin-bottom: 24px; flex-wrap: wrap; }
.breadcrumb a { color: var(--accent); }

.page-hero {
  background: var(--paper-2);
  border-bottom: 1px solid var(--border);
  padding: 48px 0;
  margin-bottom: 48px;
}
.page-hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 12px; }
.page-hero p { font-size: 1rem; color: var(--ink-mid); max-width: 560px; }

.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

.toc-sidebar {
  background: var(--paper-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky;
  top: 80px;
}
.toc-sidebar h3 { font-size: .82rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 16px; }
#toc-list { list-style: none; }
#toc-list li { border-left: 2px solid var(--border); padding-left: 12px; margin-bottom: 8px; }
#toc-list li.toc-sub { padding-left: 24px; }
#toc-list a { font-size: .83rem; color: var(--ink-soft); transition: color .15s; display: block; padding: 2px 0; }
#toc-list a:hover, #toc-list a.toc-active { color: var(--accent); }
#toc-list li:has(a.toc-active) { border-color: var(--accent); }

.article-layout { display: grid; grid-template-columns: 1fr 280px; gap: 48px; align-items: start; }
.article-body { max-width: 720px; }
.article-body h2 { font-size: 1.4rem; margin: 36px 0 16px; padding-top: 8px; border-top: 1px solid var(--border); }
.article-body h3 { font-size: 1.15rem; margin: 28px 0 12px; }
.article-body p { margin-bottom: 20px; font-size: .95rem; line-height: 1.75; color: var(--ink-mid); }
.article-body ul, .article-body ol { margin: 0 0 20px 20px; }
.article-body li { font-size: .95rem; line-height: 1.7; color: var(--ink-mid); margin-bottom: 6px; }
.article-body .callout { background: var(--accent-light); border-left: 3px solid var(--accent); padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; margin: 24px 0; font-size: .9rem; color: var(--ink-mid); }

.tags-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.tag { padding: 5px 14px; background: var(--paper-3); border: 1px solid var(--border); border-radius: 20px; font-size: .78rem; color: var(--ink-mid); transition: background .15s; }
.tag:hover { background: var(--accent-light); color: var(--accent); }

.rating-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.rating-bar-label { font-size: .82rem; width: 120px; color: var(--ink-mid); }
.rating-bar-track { flex: 1; height: 6px; background: var(--paper-3); border-radius: 3px; overflow: hidden; }
.rating-bar-fill { height: 100%; background: var(--accent); border-radius: 3px; }
.rating-bar-score { font-size: .82rem; font-weight: 700; width: 28px; text-align: right; }

.verdict-box { background: var(--paper-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; margin: 32px 0; }
.verdict-box h4 { font-size: 1rem; font-weight: 700; margin-bottom: 16px; }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pros h5 { color: var(--green); font-size: .82rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 10px; }
.cons h5 { color: var(--red); font-size: .82rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 10px; }
.pros li, .cons li { font-size: .85rem; color: var(--ink-mid); margin-bottom: 6px; }

.legal-body h2 { font-size: 1.3rem; margin: 36px 0 14px; }
.legal-body h3 { font-size: 1.05rem; margin: 24px 0 10px; }
.legal-body p { font-size: .9rem; line-height: 1.8; color: var(--ink-mid); margin-bottom: 16px; }
.legal-body ul { margin: 0 0 16px 20px; }
.legal-body li { font-size: .9rem; color: var(--ink-mid); margin-bottom: 6px; }
.legal-updated { font-size: .82rem; color: var(--ink-soft); margin-bottom: 32px; }

@media (max-width: 960px) {
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: 1fr; }
  .toc-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  #nav-toggle { display: flex !important; }
  .nav-menu {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    gap: 2px;
    overflow-y: auto;
    border-top: 1px solid var(--border);
    z-index: 199;
  }
  .nav-menu.nav-open { display: flex; }
  .nav-menu a { font-size: 1rem; padding: 12px 16px; width: 100%; border-radius: var(--radius); }
}

@media (max-width: 640px) {
  .article-grid { grid-template-columns: 1fr; }
  .pros-cons { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
