/* Visual-only article polish for /insights/ai-crawler-log-analysis/. */
html {
  scroll-padding-top: 88px;
}

body {
  background: #f8fafc;
}

body > header {
  background: #ffffff !important;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
}

main article {
  color: #0f172a;
}

main article > section:first-of-type {
  background:
    radial-gradient(circle at 18% 12%, rgba(37, 99, 235, 0.10), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 88%);
  border-bottom: 1px solid #e5e7eb;
  padding-top: 54px;
  padding-bottom: 42px;
}

main article > section:first-of-type > div,
main article > section:nth-of-type(2) > div {
  max-width: 860px;
}

main article > section:first-of-type h1 {
  max-width: 820px;
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: 0;
}

main article > section:first-of-type h1 + p {
  max-width: 820px;
  color: #334155;
  font-size: 1.125rem;
  line-height: 1.9;
}

main article > section:first-of-type h1 + p + div {
  gap: 10px;
}

main article > section:first-of-type h1 + p + div span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #ffffff;
  padding: 4px 10px;
  color: #475569;
}

main article > section:first-of-type .rounded-xl {
  border-color: #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.06);
}

main article > section:first-of-type .rounded-xl h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
  font-size: 1rem;
}

main article > section:first-of-type .rounded-xl h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: #2563eb;
}

main article > section:first-of-type .rounded-xl ul {
  gap: 8px 22px;
}

main article > section:first-of-type .rounded-xl li {
  position: relative;
  padding-left: 14px;
}

main article > section:first-of-type .rounded-xl li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #60a5fa;
}

main article > section:first-of-type .rounded-xl a {
  color: #1d4ed8;
  text-underline-offset: 3px;
}

main article > section:nth-of-type(2) {
  background: #ffffff;
  padding-top: 38px;
}

main article > section:nth-of-type(2) > div {
  font-size: 17px;
  line-height: 1.85;
}

main article > section:nth-of-type(2) p {
  margin: 1.05em 0;
  color: #243044;
  line-height: 1.9;
}

main article > section:nth-of-type(2) h2 {
  margin-top: 52px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
  color: #0f172a;
  font-size: clamp(1.55rem, 2vw, 1.9rem);
  line-height: 1.28;
  letter-spacing: 0;
}

main article > section:nth-of-type(2) h2::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 0.95em;
  margin-right: 10px;
  border-radius: 999px;
  background: #2563eb;
  transform: translateY(2px);
}

main article > section:nth-of-type(2) h3 {
  margin-top: 38px;
  margin-bottom: 12px;
  color: #111827;
  font-size: 1.32rem;
  line-height: 1.35;
  letter-spacing: 0;
}

main article > section:nth-of-type(2) ul,
main article > section:nth-of-type(2) ol {
  margin: 1.1em 0 1.25em;
  padding-left: 1.55em;
  color: #243044;
}

main article > section:nth-of-type(2) ul {
  list-style: disc;
}

main article > section:nth-of-type(2) ol {
  list-style: decimal;
}

main article > section:nth-of-type(2) li {
  margin: 0.42em 0;
  padding-left: 0.12em;
  line-height: 1.85;
}

main article > section:nth-of-type(2) a {
  color: #1d4ed8;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

main article > section:nth-of-type(2) code:not(pre code) {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f1f5f9;
  padding: 0.12em 0.38em;
  color: #0f172a;
  font-size: 0.9em;
  white-space: break-spaces;
}

main article > section:nth-of-type(2) pre {
  position: relative;
  margin: 22px 0 28px;
  overflow-x: auto;
  border: 1px solid #1e293b;
  border-radius: 8px;
  background: #0f172a;
  padding: 48px 20px 20px;
  color: #e5e7eb;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

main article > section:nth-of-type(2) pre::before {
  content: "Code";
  position: absolute;
  top: 12px;
  left: 14px;
  border: 1px solid rgba(148, 163, 184, 0.30);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  padding: 3px 10px;
  color: #cbd5e1;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

main article > section:nth-of-type(2) pre:has(code.language-bash)::before {
  content: "Bash";
}

main article > section:nth-of-type(2) pre:has(code.language-python)::before {
  content: "Python";
}

main article > section:nth-of-type(2) pre:has(code.language-nginx)::before {
  content: "Nginx";
}

main article > section:nth-of-type(2) pre:has(code.language-mermaid)::before {
  content: "Mermaid";
}

main article > section:nth-of-type(2) pre:has(code.language-txt)::before {
  content: "Text";
}

main article > section:nth-of-type(2) pre:has(code.language-md)::before {
  content: "Markdown";
}

main article > section:nth-of-type(2) pre:has(code.language-ini)::before {
  content: "INI";
}

main article > section:nth-of-type(2) pre code {
  display: block;
  min-width: max-content;
  background: transparent;
  color: inherit;
  font-size: 14px;
  line-height: 1.72;
  white-space: pre;
}

main article > section:nth-of-type(2) table {
  display: block;
  width: 100%;
  margin: 24px 0;
  overflow-x: auto;
  border-collapse: collapse;
}

main article > section:nth-of-type(2) th,
main article > section:nth-of-type(2) td {
  border: 1px solid #e2e8f0;
  padding: 10px 12px;
}

main article > section:nth-of-type(2) th {
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
}

main article > section:nth-of-type(2) hr {
  margin: 48px 0;
  border-color: #e5e7eb;
}

main article > section:nth-of-type(2) .rounded-xl {
  border-radius: 8px;
}

main article > section:nth-of-type(2) .rounded-xl.bg-slate-50 {
  border-color: #dbeafe;
  background: linear-gradient(180deg, #f8fbff 0%, #f1f5f9 100%);
}

main article > section:nth-of-type(2) .rounded-xl.bg-slate-50 h2 {
  margin-top: 0;
  border-bottom: 0;
  padding-bottom: 0;
}

main article > section:nth-of-type(2) .rounded-xl.bg-slate-50 h2::before {
  display: none;
}

@media (max-width: 767px) {
  html {
    scroll-padding-top: 78px;
  }

  main article > section:first-of-type {
    padding-top: 34px;
    padding-bottom: 30px;
  }

  main article > section:first-of-type h1 {
    font-size: 2rem;
    line-height: 1.18;
  }

  main article > section:first-of-type h1 + p {
    font-size: 1.02rem;
    line-height: 1.82;
  }

  main article > section:first-of-type h1 + p + div span {
    width: fit-content;
  }

  main article > section:first-of-type .rounded-xl {
    padding: 16px;
  }

  main article > section:first-of-type .rounded-xl ul {
    display: grid;
    grid-template-columns: 1fr;
  }

  main article > section:nth-of-type(2) {
    padding-top: 30px;
  }

  main article > section:nth-of-type(2) > div {
    font-size: 16px;
    line-height: 1.82;
  }

  main article > section:nth-of-type(2) h2 {
    margin-top: 42px;
    font-size: 1.45rem;
  }

  main article > section:nth-of-type(2) h3 {
    font-size: 1.2rem;
  }

  main article > section:nth-of-type(2) pre {
    margin-right: -4px;
    margin-left: -4px;
    padding: 46px 16px 18px;
  }

  main article > section:nth-of-type(2) pre code {
    font-size: 13px;
  }
}
