/*
AI THEME CONTRACT V2
This file must exist even if the generated theme mostly uses Tailwind.
Use it for custom refinements, variables, layout tweaks and polish.
*/

:root {
  --abv-primary: #2563eb;
  --abv-accent: #0f172a;
  --abv-green: #16a34a;
  --abv-soft: #f8fafc;
  --abv-line: #e2e8f0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #f8fafc;
  color: #0f172a;
}

.mobile-nav-details summary::-webkit-details-marker,
details summary::-webkit-details-marker {
  display: none;
}

.mobile-call-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 58px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #ffffff;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 -10px 30px rgba(22, 163, 74, 0.28);
}

@media (min-width: 768px) {
  .mobile-call-bar {
    display: none;
  }
}

.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 {
  margin-top: 2.7rem;
  margin-bottom: 1rem;
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.article-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.9rem;
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 800;
  color: #0f172a;
}

.article-content h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
  line-height: 1.4;
  font-weight: 800;
  color: #1e293b;
}

.article-content p {
  margin: 1rem 0;
  color: #334155;
}

.article-content ul,
.article-content ol {
  margin: 1.1rem 0;
  padding-left: 1.4rem;
  color: #334155;
}

.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.45rem;
  margin-bottom: 0.45rem;
}

.article-content a {
  color: var(--abv-primary);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  font-weight: 700;
}

.article-content a:hover {
  color: #1d4ed8;
}

.article-content blockquote {
  margin: 1.6rem 0;
  padding: 1.25rem 1.25rem 1.25rem 1.4rem;
  border-left: 4px solid var(--abv-primary);
  background: linear-gradient(180deg, #eff6ff, #f8fafc);
  border-radius: 1rem;
  color: #1e3a8a;
  font-weight: 600;
}

.article-content table {
  width: 100%;
  margin: 1.75rem 0;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--abv-line);
  background: #ffffff;
  font-size: 0.98rem;
}

.article-content th,
.article-content td {
  border: 1px solid var(--abv-line);
  padding: 0.85rem 0.95rem;
  text-align: left;
}

.article-content th {
  background: #eff6ff;
  color: #0f172a;
  font-weight: 800;
}

.article-content figure {
  margin: 1.8rem 0;
}

.article-content figcaption {
  margin-top: 0.7rem;
  font-size: 0.92rem;
  color: #64748b;
  text-align: center;
}

.article-content code {
  padding: 0.15rem 0.45rem;
  border-radius: 0.45rem;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 0.92em;
}

.article-content pre {
  margin: 1.5rem 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  border-radius: 1rem;
  background: #0f172a;
  color: #e2e8f0;
}

.article-content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.article-content hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid var(--abv-line);
}

.article-toc {
  margin: 1.6rem 0 2rem;
  padding: 1.25rem;
  border: 1px solid #bfdbfe;
  border-radius: 1.25rem;
  background: linear-gradient(180deg, #eff6ff, #ffffff);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.08);
}

.article-toc-title {
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #1d4ed8;
}

.article-toc ul {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.article-toc li {
  margin: 0.4rem 0;
  padding-left: 0;
}

.article-toc li ul {
  margin-top: 0.45rem;
  margin-left: 0.9rem;
  padding-left: 0.9rem;
  border-left: 2px solid #bfdbfe;
}

.article-toc a {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 0.8rem;
  color: #1e3a8a;
  text-decoration: none;
  font-weight: 700;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.article-toc a:hover {
  background: #dbeafe;
  color: #1d4ed8;
  transform: translateX(2px);
}

.excerpt-html {
  font-size: 0.95rem;
}

.excerpt-html .article-toc {
  margin: 0;
  padding: 1rem;
}

.excerpt-html p,
.excerpt-html ul,
.excerpt-html ol {
  margin-top: 0.65rem;
  margin-bottom: 0.65rem;
}
