/*
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 {
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #2563eb;
  --accent: #0f172a;
  --radius-xl: 28px;
  --radius-2xl: 32px;
  --shadow-soft: 0 18px 50px rgba(15, 23, 42, 0.07);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
}

body.mobile-nav-open {
  overflow: hidden;
}

.hero-mesh {
  background:
    radial-gradient(circle at 15% 20%, rgba(37, 99, 235, 0.14), transparent 28%),
    radial-gradient(circle at 85% 18%, rgba(15, 23, 42, 0.08), transparent 24%),
    radial-gradient(circle at 70% 75%, rgba(37, 99, 235, 0.1), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.section-kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
}

.studio-card,
.glass-panel,
.sidebar-card,
.empty-panel {
  border-radius: var(--radius-2xl);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.glass-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(248,250,252,0.95));
}

.empty-panel {
  padding: 2rem;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.decorative-lines {
  position: relative;
  overflow: hidden;
}

.decorative-lines::before,
.decorative-lines::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.decorative-lines::before {
  width: 180px;
  height: 180px;
  right: -70px;
  top: -70px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.14), transparent 65%);
}

.decorative-lines::after {
  width: 140px;
  height: 140px;
  left: -50px;
  bottom: -50px;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.08), transparent 68%);
}

.orbit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  height: 3rem;
  padding: 0 0.75rem;
  border-radius: 1rem;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.9rem;
  font-weight: 700;
}

.orbit-ring {
  position: relative;
}

.orbit-ring::after {
  content: '';
  position: absolute;
  inset: 9px;
  border-radius: 999px;
  border: 1px dashed rgba(37, 99, 235, 0.3);
}

.page-chip-link,
.category-orbit-card,
.post-hero-panel,
.sidebar-card {
  transition: all 0.25s ease;
}

.kp-credit a {
  color: var(--primary);
  text-decoration: none;
}

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

.line-clamp-5 {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

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

.article-content h2 {
  margin: 2.8rem 0 1rem;
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.article-content h3 {
  margin: 2.2rem 0 0.9rem;
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.article-content h4 {
  margin: 1.8rem 0 0.75rem;
  font-size: 1.15rem;
  line-height: 1.4;
  font-weight: 700;
  color: #0f172a;
}

.article-content p {
  margin: 1rem 0;
  color: #334155;
}

.article-content ul,
.article-content ol {
  margin: 1rem 0 1.2rem;
  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;
  color: #334155;
}

.article-content li > ul,
.article-content li > ol {
  margin-top: 0.6rem;
  margin-bottom: 0.6rem;
}

.article-content a {
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

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

.article-content blockquote {
  margin: 1.8rem 0;
  border-left: 4px solid #2563eb;
  border-radius: 0 1.25rem 1.25rem 0;
  background: linear-gradient(180deg, #eff6ff, #f8fbff);
  padding: 1.2rem 1.3rem;
  color: #1e3a8a;
  font-weight: 600;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8rem 0;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--line);
}

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

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

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

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

.article-content code {
  border-radius: 0.5rem;
  background: #eff6ff;
  padding: 0.18rem 0.45rem;
  font-size: 0.92em;
  color: #1e40af;
}

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

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

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

.article-toc {
  margin: 0 0 2rem;
  border: 1px solid #bfdbfe;
  border-radius: 1.5rem;
  background: linear-gradient(180deg, #f8fbff, #eff6ff);
  padding: 1.25rem 1.25rem 1rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.article-toc-title {
  margin-bottom: 0.8rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #1d4ed8;
}

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

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

.article-toc li ul {
  margin-top: 0.35rem;
  margin-left: 0.9rem;
  padding-left: 0.9rem;
  border-left: 1px solid rgba(37, 99, 235, 0.18);
}

.article-toc a {
  display: block;
  border-radius: 0.9rem;
  padding: 0.5rem 0.7rem;
  color: #0f172a;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.article-toc a:hover {
  background: rgba(255,255,255,0.8);
  color: #1d4ed8;
  transform: translateX(2px);
}

.page-content,
.article-content {
  overflow-wrap: anywhere;
}

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

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

button,
.button,
[type='submit'] {
  transition: all 0.2s ease;
}

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

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

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