:root {
  --blue: #1b6ca8;
  --green: #0f6e56;
  --red: #a32d2d;
  --ink: #0d1117;
  --text: #24292f;
  --muted: #57606a;
  --bg: #f4f6fa;
  --line: #d0d7de;
  --white: #ffffff;
  --soft-blue: #e8f3fb;
  --soft-green: #e4f6ef;
  --soft-gold: #fff7ed;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.shell {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.topbar,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.topbar {
  min-height: 76px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(244, 246, 250, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar nav,
.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topbar nav a,
.footer nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 900;
}

.brand::before {
  content: "";
  width: 30px;
  height: 30px;
  display: inline-block;
  flex: 0 0 auto;
  background: url("/favicon.svg") center / contain no-repeat;
}

.blog-hero,
.article-hero {
  background:
    linear-gradient(135deg, rgba(27, 108, 168, 0.12), rgba(15, 110, 86, 0.08)),
    var(--white);
  border-bottom: 1px solid var(--line);
}

.blog-hero {
  padding: 86px 0 62px;
}

.article-hero {
  padding: 68px 0;
}

.article-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 58px;
  align-items: end;
}

.crumb {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 13px;
}

.eyebrow,
.meta-row span,
.guide-category {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.eyebrow {
  padding: 8px 12px;
  color: var(--blue);
  background: var(--soft-blue);
}

h1 {
  max-width: 880px;
  margin: 16px 0;
  font-family: Poppins, Inter, sans-serif;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: 0;
  color: var(--ink);
}

h2,
h3 {
  font-family: Poppins, Inter, sans-serif;
  color: var(--ink);
  letter-spacing: 0;
}

h2 {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.22;
}

p,
li {
  line-height: 1.75;
}

.lead {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.65;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.meta-row span {
  padding: 8px 11px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
}

.hero-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
}

.hero-card strong {
  display: block;
  margin-bottom: 10px;
  color: #9cf3d8;
  font-family: Poppins, Inter, sans-serif;
  font-size: 22px;
}

.hero-card p {
  margin: 0 0 18px;
  color: #f0f3f6;
}

.hero-card a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
}

.guide-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  padding: 56px 0 72px;
}

.guide-card {
  display: grid;
  grid-template-rows: 172px 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.guide-card > div {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 22px;
}

.guide-card h2 {
  margin: 0;
  font-size: 20px;
}

.guide-card p {
  margin: 0;
  color: var(--muted);
}

.guide-category {
  width: fit-content;
  padding: 7px 10px;
  color: var(--green);
  background: var(--soft-green);
}

.read-more {
  width: fit-content;
  margin-top: 4px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: -32px 0 72px;
}

.pagination a,
.pagination span {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-weight: 900;
}

.pagination span {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

.pagination a:hover {
  border-color: var(--blue);
  background: var(--soft-blue);
  color: var(--blue);
  text-decoration: none;
}

.card-media {
  display: block;
  background:
    url('/favicon.svg') center / 76px 76px no-repeat,
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.96) 0 30%, transparent 31%),
    linear-gradient(135deg, #1b6ca8, #0f6e56);
}

.tone-1 {
  background:
    url('/favicon.svg') center / 76px 76px no-repeat,
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.96) 0 30%, transparent 31%),
    linear-gradient(135deg, #0f6e56, #b45309);
}

.tone-2 {
  background:
    url('/favicon.svg') center / 76px 76px no-repeat,
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.96) 0 30%, transparent 31%),
    linear-gradient(135deg, #a32d2d, #1b6ca8);
}

.tone-3 {
  background:
    url('/favicon.svg') center / 76px 76px no-repeat,
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.96) 0 30%, transparent 31%),
    linear-gradient(135deg, #0d1117, #1b6ca8);
}

.tone-4 {
  background:
    url('/favicon.svg') center / 76px 76px no-repeat,
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.96) 0 30%, transparent 31%),
    linear-gradient(135deg, #b45309, #0f6e56);
}

.related-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.related-tools a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.article-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 760px);
  gap: 54px;
  align-items: start;
  padding: 56px 0 72px;
}

.toc {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.toc strong {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.toc a {
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
}

.toc a:hover {
  background: var(--soft-blue);
  color: var(--blue);
  text-decoration: none;
}

.article-body {
  display: grid;
  gap: 30px;
}

.article-section {
  scroll-margin-top: 92px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.article-section p {
  margin: 0;
  color: var(--text);
  font-size: 17px;
}

.note {
  border-color: #fed7aa;
  background: var(--soft-gold);
}

.footer {
  min-height: 96px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
}

@media (max-width: 980px) {
  .article-hero-grid,
  .article-layout,
  .guide-list {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

  .guide-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 24px, 1120px);
  }

  .topbar,
  .footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 12px 0;
  }

  .blog-hero,
  .article-hero {
    padding: 42px 0;
  }

  h1 {
    font-size: 36px;
    overflow-wrap: anywhere;
  }

  .lead {
    font-size: 17px;
  }

  .guide-list {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-top: 26px;
  }

  .pagination {
    justify-content: flex-start;
    margin: -8px 0 46px;
  }

  .guide-card {
    grid-template-rows: 132px 1fr;
  }

  .article-layout {
    gap: 22px;
    padding: 30px 0 48px;
  }

  .article-section,
  .hero-card {
    padding: 22px;
  }
}
