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

:root {
  --yellow: #FFBB28;
  --dark: #292929;
  --success: #48BB78;
  --danger: #FF6028;
  --cart-cta: #EADB1C;
  --bg: #FAFAFA;
  --white: #FFFFFF;
  --gray-100: #F5F5F5;
  --gray-200: #E5E5E5;
  --gray-400: #A3A3A3;
  --gray-600: #525252;
  --gray-800: #262626;
  --radius: 12px;
  --max-width: 780px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--gray-800);
  background: var(--bg);
  line-height: 1.7;
}

a { color: var(--dark); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* === Header === */
.site-header {
  background: var(--dark);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-header__logo { height: 36px; width: auto; }

.site-header__title {
  color: var(--yellow);
  font-size: 1.25rem;
  font-weight: 700;
}

.site-header__nav { margin-left: auto; }
.site-header__nav a {
  color: var(--gray-200);
  font-size: 0.875rem;
  margin-left: 20px;
  transition: color 0.2s;
}
.site-header__nav a:hover { color: var(--yellow); }

/* === Hero === */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, #3a3a3a 100%);
  color: var(--white);
  padding: 64px 24px;
  text-align: center;
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.hero p {
  font-size: 1.125rem;
  color: var(--gray-400);
  max-width: 540px;
  margin: 0 auto;
}

/* === Blog List (index) === */
.blog-list {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  gap: 32px;
}

.post-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  transition: box-shadow .2s, transform .2s;
}
.post-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.1);
  transform: translateY(-2px);
}

.post-card__img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.post-card__body { padding: 24px; }

.post-card__tag {
  display: inline-block;
  background: var(--yellow);
  color: var(--dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 8px;
}

.post-card__title {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.post-card__excerpt {
  color: var(--gray-600);
  font-size: 0.9375rem;
  margin-bottom: 16px;
}

.post-card__meta {
  font-size: 0.8125rem;
  color: var(--gray-400);
}

/* === Article === */
.article-hero {
  background: linear-gradient(135deg, var(--dark) 0%, #3a3a3a 100%);
  color: var(--white);
  padding: 56px 24px 48px;
  text-align: center;
}

.article-hero__tag {
  display: inline-block;
  background: var(--yellow);
  color: var(--dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 16px;
}

.article-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  max-width: var(--max-width);
  margin: 0 auto 12px;
  line-height: 1.25;
}

.article-hero__meta {
  font-size: 0.875rem;
  color: var(--gray-400);
}

.article {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.article h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 48px 0 16px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--yellow);
}

.article h3 {
  font-size: 1.175rem;
  font-weight: 600;
  margin: 32px 0 12px;
}

.article p { margin-bottom: 16px; }

.article ul, .article ol {
  margin: 0 0 16px 24px;
}
.article li { margin-bottom: 6px; }

.article strong { font-weight: 600; }

.article blockquote {
  border-left: 4px solid var(--yellow);
  background: var(--gray-100);
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--gray-600);
  font-style: italic;
}

.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.9375rem;
}

.article th {
  background: var(--dark);
  color: var(--white);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
}

.article td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--gray-200);
}

.article tr:hover td { background: var(--gray-100); }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge--red { background: #FEE2E2; color: #991B1B; }
.badge--green { background: #D1FAE5; color: #065F46; }
.badge--yellow { background: #FEF3C7; color: #92400E; }
.badge--blue { background: #DBEAFE; color: #1E40AF; }
.badge--purple { background: #EDE9FE; color: #5B21B6; }

.tip-box {
  background: #FEF3C7;
  border-left: 4px solid var(--yellow);
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.tip-box strong { color: #92400E; }

.note-box {
  background: #DBEAFE;
  border-left: 4px solid #3B82F6;
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.note-box strong { color: #1E40AF; }

/* Steps */
.steps { counter-reset: step-counter; list-style: none; margin-left: 0; }
.steps li {
  counter-increment: step-counter;
  position: relative;
  padding-left: 40px;
  margin-bottom: 12px;
}
.steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 2px;
  width: 28px;
  height: 28px;
  background: var(--yellow);
  color: var(--dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8125rem;
}

/* TOC */
.toc {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 40px;
}

.toc__title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 12px;
}

.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 6px; }
.toc a {
  color: var(--gray-600);
  font-size: 0.9375rem;
  transition: color .2s;
}
.toc a:hover { color: var(--yellow); }

/* === Footer === */
.site-footer {
  background: var(--dark);
  color: var(--gray-400);
  text-align: center;
  padding: 32px 24px;
  font-size: 0.8125rem;
}

.site-footer a { color: var(--yellow); }

/* === Responsive === */
@media (max-width: 640px) {
  .hero h1 { font-size: 1.625rem; }
  .article-hero h1 { font-size: 1.5rem; }
  .article h2 { font-size: 1.25rem; }
  .post-card__img { height: 160px; }
}
