:root {
  --text-soft: var(--muted);
  --text-muted: var(--muted);
  --shadow-soft: var(--shadow);
  --shadow-medium: var(--shadow);
}

.blog-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 64px;
  color: #ffffff;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, .18), transparent 28%),
    radial-gradient(circle at 86% 12%, rgba(255, 255, 255, .12), transparent 24%),
    linear-gradient(135deg, #173f99 0%, #2563eb 52%, #6d28d9 100%);
}

.blog-hero::after {
  content: "GUIDES";
  position: absolute;
  right: -18px;
  bottom: -28px;
  color: rgba(255, 255, 255, .07);
  font-size: clamp(5rem, 16vw, 13rem);
  font-weight: 950;
  letter-spacing: -.08em;
  line-height: .75;
  pointer-events: none;
}

.blog-hero .section-inner {
  position: relative;
  z-index: 1;
}

.blog-hero .eyebrow,
.article-hero .eyebrow {
  color: #dbeafe;
}

.blog-hero h1,
.article-hero h1 {
  max-width: 900px;
  margin: 12px 0 18px;
  color: #ffffff;
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  line-height: 1.03;
  letter-spacing: -.055em;
}

.blog-hero p {
  max-width: 760px;
  margin: 0;
  color: #e0e7ff;
  font-size: clamp(1rem, 2.3vw, 1.18rem);
}

.blog-directory {
  padding: 52px 0 70px;
}

.blog-toolbar {
  margin: 24px 0 28px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.blog-search-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 850;
}

#blogSearchBox {
  width: 100%;
  min-height: 50px;
  padding: 12px 15px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface-soft);
  font: inherit;
}

#blogSearchBox:focus {
  outline: 3px solid rgba(37, 99, 235, .18);
  border-color: #2563eb;
}

.blog-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 15px;
}

.blog-filter-button {
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-soft);
  background: var(--surface-soft);
  font: inherit;
  font-size: .9rem;
  font-weight: 800;
  cursor: pointer;
}

.blog-filter-button:hover,
.blog-filter-button.is-active {
  border-color: #2563eb;
  color: #1d4ed8;
  background: #eff6ff;
}

.theme-dark .blog-filter-button:hover,
.theme-dark .blog-filter-button.is-active,
.dark-mode .blog-filter-button:hover,
.dark-mode .blog-filter-button.is-active {
  color: #bfdbfe;
  background: rgba(37, 99, 235, .22);
}

.blog-results-line {
  margin: 0 0 17px;
  color: var(--text-soft);
  font-weight: 750;
}

.blog-grid,
.latest-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.blog-card {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, .38);
  box-shadow: var(--shadow-medium);
}

.blog-card-media {
  position: relative;
  min-height: 210px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .82), transparent 20%),
    linear-gradient(135deg, #dbeafe, #ede9fe);
}

.blog-card-media img {
  width: 128px;
  height: 128px;
  object-fit: contain;
  filter: drop-shadow(0 18px 26px rgba(30, 64, 175, .18));
}

.blog-featured-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8, #6d28d9);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .02em;
}

.blog-card-content {
  flex: 1;
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 13px;
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 800;
}

.blog-card h3 {
  margin: 13px 0 10px;
  font-size: 1.28rem;
  line-height: 1.28;
}

.blog-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.blog-card h3 a:hover {
  color: #2563eb;
}

.blog-card p {
  margin: 0 0 18px;
  color: var(--text-soft);
}

.blog-read-link {
  margin-top: auto;
}

.blog-empty {
  grid-column: 1 / -1;
  padding: 40px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: 18px;
  background: var(--surface-soft);
  text-align: center;
}

.latest-guides-section {
  padding: 62px 0;
  background: linear-gradient(180deg, rgba(239, 246, 255, .75), rgba(255, 255, 255, 0));
}

.theme-dark .latest-guides-section,
.dark-mode .latest-guides-section {
  background: linear-gradient(180deg, rgba(30, 64, 175, .12), rgba(0, 0, 0, 0));
}

.latest-guides-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 23px;
}

.latest-guides-heading h2 {
  margin-bottom: 7px;
}

.latest-guides-heading p {
  margin: 0;
  color: var(--text-soft);
}

.article-main {
  padding: 38px 0 72px;
}

.article-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 7vw, 70px);
  border-radius: 28px;
  color: #ffffff;
  background:
    radial-gradient(circle at 14% 18%, rgba(255,255,255,.16), transparent 27%),
    radial-gradient(circle at 88% 13%, rgba(255,255,255,.12), transparent 22%),
    linear-gradient(135deg, #153e90 0%, #2563eb 50%, #6d28d9 100%);
  box-shadow: var(--shadow-medium);
}

.article-hero::after {
  content: "AI";
  position: absolute;
  right: -10px;
  bottom: -80px;
  color: rgba(255, 255, 255, .075);
  font-size: clamp(12rem, 33vw, 25rem);
  font-weight: 950;
  line-height: 1;
  pointer-events: none;
}

.article-hero > * {
  position: relative;
  z-index: 1;
}

.article-hero-summary {
  max-width: 800px;
  margin: 0;
  color: #e0e7ff;
  font-size: clamp(1.02rem, 2.2vw, 1.18rem);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 17px;
  margin-top: 23px;
  color: #dbeafe;
  font-size: .9rem;
  font-weight: 750;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  align-items: start;
  margin-top: 28px;
}

.article-content,
.article-sidebar-card {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.article-content {
  min-width: 0;
  padding: clamp(24px, 5vw, 54px);
}

.article-content > p:first-child {
  margin-top: 0;
  font-size: 1.08rem;
}

.article-content h2 {
  scroll-margin-top: 90px;
  margin: 48px 0 14px;
  color: var(--heading);
  font-size: clamp(1.55rem, 3.2vw, 2.1rem);
  line-height: 1.25;
  letter-spacing: -.025em;
}

.article-content h3 {
  margin: 29px 0 10px;
  color: var(--heading);
  font-size: 1.16rem;
}

.article-content p,
.article-content li {
  color: var(--text-soft);
}

.article-content a:not(.primary-button):not(.text-link) {
  font-weight: 780;
}

.article-quick-answer {
  margin: 24px 0 7px;
  padding: 20px 21px;
  border-left: 5px solid #2563eb;
  border-radius: 0 15px 15px 0;
  background: #eff6ff;
}

.theme-dark .article-quick-answer,
.dark-mode .article-quick-answer {
  background: rgba(37, 99, 235, .16);
}

.article-quick-answer p {
  margin: 0;
}

.tool-guide-heading {
  display: flex;
  align-items: center;
  gap: 13px;
}

.tool-guide-number {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  font-size: .93rem;
  font-weight: 950;
  box-shadow: 0 9px 22px rgba(37, 99, 235, .22);
}

.best-for-label {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 10px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  color: #15803d;
  background: #f0fdf4;
  font-size: .78rem;
  font-weight: 850;
}

.theme-dark .best-for-label,
.dark-mode .best-for-label {
  border-color: #166534;
  color: #86efac;
  background: rgba(22, 101, 52, .18);
}

.prompt-example {
  margin: 18px 0 22px;
  padding: 18px 20px;
  border: 1px dashed #93c5fd;
  border-radius: 14px;
  background: var(--surface-soft);
}

.prompt-example strong {
  display: block;
  margin-bottom: 6px;
  color: #1d4ed8;
}

.theme-dark .prompt-example strong,
.dark-mode .prompt-example strong {
  color: #93c5fd;
}

.prompt-example p {
  margin: 0;
  font-style: italic;
}

.article-table-wrap {
  margin: 23px 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
}

.article-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: .91rem;
}

.article-table th,
.article-table td {
  padding: 14px 15px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.article-table th {
  color: #ffffff;
  background: #1e40af;
  font-size: .78rem;
  letter-spacing: .025em;
  text-transform: uppercase;
}

.article-table tbody tr:nth-child(even) {
  background: var(--surface-soft);
}

.article-table tr:last-child td {
  border-bottom: 0;
}

.responsible-use-box {
  margin-top: 38px;
  padding: 24px;
  border: 1px solid #fde68a;
  border-radius: 18px;
  background: #fffbeb;
}

.theme-dark .responsible-use-box,
.dark-mode .responsible-use-box {
  border-color: #6f5812;
  background: rgba(113, 63, 18, .18);
}

.responsible-use-box h2 {
  margin-top: 0;
}

.article-check-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.article-check-list li {
  position: relative;
  margin: 9px 0;
  padding-left: 28px;
}

.article-check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #15803d;
  font-weight: 950;
}

.article-faq details {
  margin: 12px 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
}

.article-faq summary {
  padding: 17px 19px;
  cursor: pointer;
  font-weight: 850;
}

.article-faq details p {
  padding: 0 19px 18px;
  margin: 0;
}

.article-author-box {
  margin-top: 36px;
  padding: 22px;
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 15px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-soft);
}

.article-author-box img {
  width: 62px;
  height: 62px;
  object-fit: contain;
}

.article-author-box h2 {
  margin: 0 0 4px;
  font-size: 1.12rem;
}

.article-author-box p {
  margin: 0;
  font-size: .92rem;
}

.article-final-cta {
  margin-top: 38px;
  padding: 29px;
  border-radius: 20px;
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8, #6d28d9);
  text-align: center;
}

.article-final-cta h2 {
  margin: 0 0 9px;
  color: #ffffff;
}

.article-final-cta p {
  max-width: 660px;
  margin: 0 auto 17px;
  color: #e0e7ff;
}

.article-final-cta .primary-button {
  display: inline-flex;
  color: #1e40af;
  background: #ffffff;
}

.article-sidebar {
  position: sticky;
  top: 85px;
  display: grid;
  gap: 18px;
}

.article-sidebar-card {
  padding: 21px;
}

.article-sidebar-card h2 {
  margin: 0 0 13px;
  font-size: 1.05rem;
}

.article-toc,
.article-source-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-toc li + li,
.article-source-list li + li {
  margin-top: 7px;
}

.article-toc a {
  display: block;
  padding: 7px 8px;
  border-radius: 8px;
  color: var(--text-soft);
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
}

.article-toc a:hover {
  color: #2563eb;
  background: var(--surface-soft);
}

.article-source-list a {
  font-size: .87rem;
  overflow-wrap: anywhere;
}

.article-review-note,
.section-review-note {
  color: var(--text-muted);
  font-size: .88rem;
}

.breadcrumbs {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: .88rem;
  font-weight: 750;
}

.breadcrumbs a {
  color: inherit;
}

@media (max-width: 980px) {
  .blog-grid,
  .latest-blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
    grid-row: 1;
  }
}

@media (max-width: 680px) {
  .blog-hero {
    padding: 52px 0 48px;
  }

  .blog-grid,
  .latest-blog-grid {
    grid-template-columns: 1fr;
  }

  .latest-guides-heading {
    display: block;
  }

  .latest-guides-heading .primary-button {
    margin-top: 15px;
  }

  .article-main {
    padding-top: 18px;
  }

  .article-hero,
  .article-content,
  .article-sidebar-card {
    border-radius: 18px;
  }

  .article-meta {
    display: grid;
    gap: 4px;
  }

  .tool-guide-heading {
    align-items: flex-start;
  }

  .article-author-box {
    grid-template-columns: 1fr;
    text-align: center;
  }
}
