/*
AI THEME CONTRACT V2
*/

:root {
  --a11-primary: #2563eb;
  --a11-accent: #0f172a;
  --a11-soft-blue: #eff6ff;
  --a11-soft-amber: #fefce8;
  --a11-soft-slate: #f8fafc;
  --a11-border: #e2e8f0;
  --a11-text: #0f172a;
  --a11-muted: #475569;
  --a11-radius-lg: 1.5rem;
  --a11-radius-xl: 2rem;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--a11-text);
}

img {
  display: block;
  max-width: 100%;
}

.nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle-bars span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #0f172a;
  display: block;
}

.article-content {
  color: #1e293b;
  font-size: 1.05rem;
  line-height: 1.9;
}

.article-content > *:first-child {
  margin-top: 0;
}

.article-content > *:last-child {
  margin-bottom: 0;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  color: #0f172a;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.article-content h2 {
  margin: 2.6rem 0 1rem;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  padding-bottom: 0.7rem;
  border-bottom: 1px solid #dbeafe;
}

.article-content h3 {
  margin: 2rem 0 0.8rem;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
}

.article-content h4 {
  margin: 1.6rem 0 0.7rem;
  font-size: 1.15rem;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote,
.article-content table,
.article-content figure,
.article-content pre,
.article-content hr {
  margin: 1.1rem 0;
}

.article-content p {
  color: #334155;
}

.article-content ul,
.article-content ol {
  padding-left: 1.35rem;
}

.article-content ul {
  list-style: disc;
}

.article-content ol {
  list-style: decimal;
}

.article-content li {
  margin: 0.45rem 0;
  padding-left: 0.2rem;
}

.article-content li > ul,
.article-content li > ol {
  margin-top: 0.55rem;
  margin-bottom: 0.55rem;
  padding-left: 1.25rem;
}

.article-content a {
  color: var(--a11-primary);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color .2s ease, text-decoration-color .2s ease;
}

.article-content a:hover {
  color: #1d4ed8;
  text-decoration-color: #93c5fd;
}

.article-content blockquote {
  border-left: 5px solid var(--a11-primary);
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  padding: 1.1rem 1.2rem;
  border-radius: 1rem;
  color: #1e3a8a;
  font-weight: 600;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid #dbeafe;
  display: block;
  overflow-x: auto;
}

.article-content thead th {
  background: #eff6ff;
  color: #0f172a;
  font-weight: 800;
}

.article-content th,
.article-content td {
  border: 1px solid #e2e8f0;
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: top;
  white-space: normal;
}

.article-content figure {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  padding: 0.8rem;
}

.article-content figure img {
  border-radius: 0.9rem;
}

.article-content figcaption {
  margin-top: 0.7rem;
  color: #64748b;
  font-size: 0.95rem;
  text-align: center;
}

.article-content code {
  background: #eff6ff;
  color: #1e3a8a;
  padding: 0.15rem 0.4rem;
  border-radius: 0.45rem;
  font-size: 0.92em;
}

.article-content pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  overflow-x: auto;
}

.article-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.article-content hr {
  border: 0;
  border-top: 1px solid #dbeafe;
}

.article-toc {
  margin: 0 0 2rem;
  padding: 1.25rem 1.25rem 1.1rem;
  border-radius: 1.25rem;
  border: 1px solid #bfdbfe;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
  box-shadow: 0 12px 40px rgba(37, 99, 235, 0.08);
}

.article-toc-title {
  margin-bottom: 0.8rem;
  color: #1e3a8a;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.article-toc li {
  margin: 0.25rem 0;
  padding: 0;
}

.article-toc li ul {
  margin-top: 0.35rem;
  margin-left: 0.8rem;
  padding-left: 0.9rem;
  border-left: 1px dashed #93c5fd;
}

.article-toc a {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 0.85rem;
  color: #1e3a8a;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.5;
}

.article-toc a:hover {
  background: #dbeafe;
  color: #0f172a;
}

.category-excerpt .article-toc {
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.category-excerpt .article-toc-title {
  display: none;
}

.category-excerpt .article-toc ul {
  list-style: disc;
  padding-left: 1.25rem;
}

.category-excerpt .article-toc a {
  display: inline;
  padding: 0;
  background: none;
  text-decoration: underline;
}

form,
input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--a11-border);
  border-radius: 1rem;
  background: #fff;
  padding: 0.85rem 1rem;
  color: var(--a11-text);
}

input:focus,
textarea:focus,
select:focus {
  outline: 0;
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

button,
[type="submit"] {
  cursor: pointer;
}

@media (max-width: 1023px) {
  .nav-dropdown {
    display: none !important;
  }

  .article-content {
    font-size: 1rem;
    line-height: 1.8;
  }
}
