/*
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 {
  --theme-primary: #2563eb;
  --theme-accent: #0f172a;
  --theme-bg: #020617;
  --theme-panel: #0f172a;
  --theme-panel-soft: rgba(255,255,255,0.04);
  --theme-border: rgba(255,255,255,0.1);
  --theme-text: #e2e8f0;
  --theme-muted: #94a3b8;
  --theme-white: #ffffff;
  --article-text: #0f172a;
  --article-muted: #475569;
  --article-border: #dbe4f0;
  --article-link: #1d4ed8;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--theme-bg);
  color: var(--theme-text);
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

.article-content {
  color: var(--article-text);
  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: 2.2rem 0 1rem;
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 900;
  color: #0b1220;
  letter-spacing: -0.02em;
}

.article-content h3 {
  margin: 1.9rem 0 0.9rem;
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 800;
  color: #10203a;
}

.article-content h4 {
  margin: 1.6rem 0 0.8rem;
  font-size: 1.2rem;
  line-height: 1.4;
  font-weight: 800;
  color: #17305d;
}

.article-content p {
  margin: 1rem 0;
  color: var(--article-text);
}

.article-content ul,
.article-content ol {
  margin: 1.1rem 0 1.3rem;
  padding-left: 1.5rem;
}

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

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

.article-content li {
  margin: 0.45rem 0;
  color: var(--article-text);
}

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

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

.article-content a:hover {
  color: #1e40af;
}

.article-content blockquote {
  margin: 1.6rem 0;
  border-left: 5px solid var(--theme-primary);
  background: linear-gradient(135deg, rgba(37,99,235,0.08), rgba(15,23,42,0.04));
  padding: 1.2rem 1.25rem;
  border-radius: 1rem;
  color: #0f172a;
  font-weight: 600;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.7rem 0;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
}

.article-content th,
.article-content td {
  border: 1px solid var(--article-border);
  padding: 0.9rem 1rem;
  text-align: left;
}

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

.article-content tr:nth-child(even) td {
  background: #f8fafc;
}

.article-content figure {
  margin: 1.8rem 0;
}

.article-content figcaption {
  margin-top: 0.7rem;
  font-size: 0.95rem;
  color: var(--article-muted);
  text-align: center;
}

.article-content code {
  background: #e2e8f0;
  color: #0f172a;
  border-radius: 0.5rem;
  padding: 0.15rem 0.4rem;
  font-size: 0.92em;
}

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

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

.article-content hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid var(--article-border);
}

.article-toc {
  margin: 1.6rem 0 2rem;
  padding: 1.25rem;
  border: 1px solid #bfdbfe;
  border-radius: 1.25rem;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.08);
}

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

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

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

.article-toc a {
  display: block;
  border-radius: 0.85rem;
  padding: 0.7rem 0.85rem;
  background: rgba(255,255,255,0.75);
  color: #0f172a;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid rgba(37,99,235,0.1);
}

.article-toc a:hover {
  background: #dbeafe;
  color: #1d4ed8;
}

.kp-credit a {
  text-decoration: underline;
}

.mobile-callbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: 0.75rem;
  background: linear-gradient(180deg, rgba(2,6,23,0), rgba(2,6,23,0.96) 35%);
}

.mobile-callbar__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  border-radius: 1rem;
  padding: 0.95rem 1rem;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

.mobile-callbar__label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.9;
}

.mobile-callbar__phone {
  font-size: 1.05rem;
  font-weight: 900;
}

@media (max-width: 1023px) {
  .page-related-column {
    order: 2;
  }
}

@media (max-width: 767px) {
  .article-content {
    font-size: 1rem;
    line-height: 1.8;
  }

  .article-content h2 {
    font-size: 1.6rem;
  }

  .article-content h3 {
    font-size: 1.3rem;
  }

  .article-content h4 {
    font-size: 1.1rem;
  }
}
