/* XEKA.CC article v2 — standalone readable article design */
:root {
  --article-bg: #060a08;
  --article-surface: #0f1714;
  --article-surface-soft: #0a120f;
  --article-text: #f5f5f7;
  --article-muted: #b1b4bd;
  --article-faint: #7f8490;
  --article-line: #263a31;
  --article-accent: #3ee58c;
  --article-accent-soft: rgba(62, 229, 140, 0.1);
  --article-mint: #8bf7c1;
  --article-warning: #ffc66d;
  --article-danger: #ff8585;
  --article-width: 840px;
  --article-nav-width: 1280px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--article-bg);
}

body.blog-article-page {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 86% 0, rgba(62, 229, 140, 0.08), transparent 28rem),
    var(--article-bg);
  color: var(--article-text);
  font-family: Inter, "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.68;
  letter-spacing: 0.008em;
  text-rendering: optimizeLegibility;
}

body.blog-article-page a {
  color: inherit;
  text-decoration: none;
}

body.blog-article-page img {
  display: block;
  max-width: 100%;
  height: auto;
}

#particles {
  display: none;
}

body.blog-article-page > nav:first-of-type {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  height: auto;
  padding: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(8, 9, 12, 0.9) !important;
  backdrop-filter: blur(18px) !important;
}

body.blog-article-page > nav:first-of-type > .max-w-7xl {
  width: min(calc(100% - 40px), var(--article-nav-width));
  max-width: none;
  margin-inline: auto;
  padding: 0;
}

.nav-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  min-height: 64px;
}

.logo {
  display: inline-flex;
  grid-column: 1;
  align-items: center;
  justify-self: start;
  gap: 0.7rem;
  color: var(--article-text);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.logo img,
body.blog-article-page > nav:first-of-type .logo img {
  width: 38px !important;
  height: 38px !important;
  object-fit: contain;
  border: 0;
  border-radius: 0 !important;
}

.logo .gradient-text,
body.blog-article-page > nav:first-of-type .logo span {
  color: var(--article-text) !important;
  background: none !important;
  font-size: 1.08rem !important;
  -webkit-text-fill-color: currentColor !important;
}

.nav-links {
  display: flex;
  grid-column: 2;
  align-items: center;
  justify-self: center;
  gap: 1.2rem;
}

.nav-links a {
  color: var(--article-muted) !important;
  font-size: 0.88rem;
  font-weight: 750;
}

.nav-links a:hover,
.nav-links a[href="/blog/"] {
  color: var(--article-text) !important;
}

.nav-links a[href="/blog/"] {
  position: relative;
}

.nav-links a[href="/blog/"]::after {
  position: absolute;
  right: 0;
  bottom: -0.75rem;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--article-accent);
  content: "";
}

.mobile-menu-toggle {
  display: none;
  grid-column: 2;
  justify-self: center;
  cursor: pointer;
  width: 48px;
  height: 44px;
  border: 1px solid var(--article-line);
  border-radius: 8px;
  background: var(--article-surface);
  color: var(--article-text);
}

.mobile-menu {
  display: none;
  width: min(calc(100% - 28px), var(--article-nav-width));
  margin: 0 auto;
  padding: 0.4rem 0 0.8rem;
}

.mobile-menu a {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: 7px;
  color: var(--article-muted) !important;
  font-size: 0.9rem;
  font-weight: 700;
}

.mobile-menu a:hover,
.mobile-menu a[href="/blog/"] {
  background: var(--article-accent-soft);
  color: var(--article-text) !important;
}

.nav-links > a[href="/terms/"],
.mobile-menu > a[href="/terms/"] {
  display: none !important;
}

.article-content {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 40px), var(--article-width));
  max-width: var(--article-width);
  margin-inline: auto;
  padding: 2.5rem 0 3.5rem !important;
}

.article-content > .article-shell,
.article-content > .max-w-4xl,
.article-content > .max-w-5xl,
.article-content > .max-w-6xl,
.article-shell {
  width: 100%;
  max-width: none;
  margin-inline: auto;
}

.article-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 1.15rem;
  color: var(--article-faint);
  font-size: 0.78rem;
  line-height: 1.6;
}

.article-breadcrumb a:hover {
  color: var(--article-accent);
}

.article-header {
  margin: 0 0 1.5rem;
  padding-bottom: 1.35rem;
  border-bottom: 1px solid var(--article-line);
}

.article-title,
.article-header h1 {
  margin: 0;
  color: var(--article-text);
  font-size: clamp(2.15rem, 4.2vw, 3.2rem);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.045em;
}

.article-title .gradient-text,
.article-header h1 .gradient-text {
  color: var(--article-text) !important;
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
}

.article-title .text-white,
.article-header h1 .text-white {
  display: inline-block;
  margin-top: 0.3rem;
  color: var(--article-accent) !important;
  font-size: 0.55em;
  letter-spacing: -0.02em;
}

.article-lead {
  margin: 0.85rem 0 0;
  color: var(--article-muted) !important;
  font-size: 1.05rem;
  line-height: 1.65;
}

.article-meta,
.article-date {
  margin-top: 0.75rem;
  color: var(--article-faint);
  font-size: 0.8rem;
}

.article-toc {
  margin: 0 0 1.8rem;
  padding: 1rem 1.15rem !important;
  border: 1px solid var(--article-line) !important;
  border-radius: 10px !important;
  background: var(--article-surface-soft) !important;
  box-shadow: none !important;
}

.article-toc h2 {
  margin: 0 0 0.6rem;
  color: var(--article-text);
  font-size: 1rem;
}

.article-toc ul {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-toc li {
  margin: 0;
}

.article-toc a {
  display: block;
  padding: 0.25rem 0;
  color: var(--article-muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.article-toc a:hover {
  color: var(--article-accent);
}

.prose,
.article-body,
.article-content {
  color: var(--article-muted);
}

.prose > section,
.article-body > section,
.article-content > section,
.article-shell > section {
  margin: 0 0 1.9rem !important;
  scroll-margin-top: 100px;
}

.prose h2,
.article-body h2,
.article-content section > h2 {
  margin: 0 0 0.75rem !important;
  color: var(--article-text) !important;
  background: none !important;
  font-size: clamp(1.5rem, 2.8vw, 1.85rem) !important;
  font-weight: 850;
  line-height: 1.45;
  letter-spacing: -0.025em;
  -webkit-text-fill-color: currentColor !important;
}

.prose h3,
.article-body h3,
.article-content section h3 {
  margin: 1.3rem 0 0.5rem !important;
  color: var(--article-text) !important;
  font-size: 1.24rem !important;
  line-height: 1.5;
}

.prose h4,
.article-body h4,
.article-content section h4 {
  margin: 1.1rem 0 0.45rem !important;
  color: var(--article-text) !important;
  font-size: 1.02rem !important;
  line-height: 1.55;
}

.prose p,
.article-body p,
.article-content section p {
  margin: 0 0 0.6rem !important;
  color: var(--article-muted) !important;
  font-size: 1rem;
  line-height: 1.68 !important;
}

.prose strong,
.article-body strong,
.article-content section strong {
  color: var(--article-text) !important;
  font-weight: 800;
}

.prose ul,
.prose ol,
.article-body ul,
.article-body ol,
.article-content section ul,
.article-content section ol {
  display: grid;
  gap: 0.35rem;
  margin: 0.65rem 0 0.9rem;
  padding-left: 1.35rem;
}

.prose li,
.article-body li,
.article-content section li {
  margin: 0 !important;
  color: var(--article-muted) !important;
  line-height: 1.7;
}

.prose li::marker,
.article-body li::marker,
.article-content section li::marker {
  color: var(--article-accent);
}

.card,
.prose .card,
.article-content section > .card {
  margin: 0;
  padding: 1.1rem !important;
  border: 1px solid var(--article-line) !important;
  border-radius: 10px !important;
  background: var(--article-surface) !important;
  box-shadow: none !important;
}

.card .card,
.card [class*="bg-gradient"],
.card [class*="from-red-"],
.card [class*="from-green-"],
.card [class*="from-yellow-"],
.card [class*="from-blue-"],
.card [class*="from-purple-"] {
  margin: 0.75rem 0 !important;
  padding: 0.85rem !important;
  border: 1px solid var(--article-line) !important;
  border-radius: 8px !important;
  background: var(--article-surface-soft) !important;
}

.text-white {
  color: var(--article-text) !important;
}

.text-gray-300,
.text-gray-400,
.text-gray-500 {
  color: var(--article-muted) !important;
}

.text-cyan-400,
.text-green-400 {
  color: var(--article-mint) !important;
}

.text-purple-400,
.text-pink-400,
.gradient-text {
  color: var(--article-accent) !important;
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
}

.text-red-400,
.text-orange-400 {
  color: var(--article-danger) !important;
}

.text-yellow-400 {
  color: var(--article-warning) !important;
}

.text-sm {
  font-size: 0.82rem;
}

.text-lg {
  font-size: 1.05rem;
}

.text-xl {
  font-size: 1.12rem;
}

.text-2xl {
  font-size: 1.35rem;
}

.text-3xl,
.text-4xl,
.text-5xl {
  font-size: inherit;
}

.font-bold,
.font-black {
  font-weight: 800;
}

.leading-relaxed {
  line-height: 1.75;
}

.mb-2 {
  margin-bottom: 0.4rem;
}

.mb-3,
.mb-4 {
  margin-bottom: 0.7rem;
}

.mb-6 {
  margin-bottom: 1.1rem;
}

.mb-8 {
  margin-bottom: 1.5rem;
}

.mb-12,
.mb-16 {
  margin-bottom: 2.2rem;
}

.space-y-2 > * + * {
  margin-top: 0.35rem;
}

.space-y-3 > * + *,
.space-y-4 > * + * {
  margin-top: 0.55rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.text-center {
  text-align: center;
}

.w-full {
  width: 100%;
}

.overflow-x-auto {
  overflow-x: auto;
}

.prose table,
.article-content table {
  width: 100%;
  margin: 0.9rem 0;
  border-collapse: collapse;
  font-size: 0.88rem;
}

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

.prose th,
.article-content th {
  background: var(--article-surface-strong, #171a22);
  color: var(--article-text);
}

.prose blockquote,
.article-content blockquote {
  margin: 0.9rem 0;
  padding: 0.8rem 0.9rem;
  border-left: 3px solid var(--article-accent);
  background: var(--article-accent-soft);
  color: var(--article-muted);
}

.prose pre,
.article-content pre {
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--article-line);
  border-radius: 8px;
  background: #07080a;
  font-size: 0.85rem;
}

.prose code,
.article-content code {
  font-family: Consolas, "SFMono-Regular", monospace;
}

.prose img,
.article-body img,
.article-content section img {
  width: auto;
  max-width: 100%;
  max-height: 460px;
  margin: 1rem auto;
  border: 1px solid var(--article-line);
  border-radius: 10px;
  object-fit: contain;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.7rem 1rem !important;
  border: 1px solid var(--article-accent) !important;
  border-radius: 8px !important;
  background: var(--article-accent) !important;
  color: #03160d !important;
  font-size: 0.9rem;
  font-weight: 850;
}

.btn-secondary {
  border-color: var(--article-line) !important;
  background: var(--article-surface) !important;
  color: var(--article-text) !important;
}

body.blog-article-page > footer {
  margin: 0 !important;
  padding: 1.8rem 20px !important;
  border-top: 1px solid var(--article-line) !important;
  background: #06070a !important;
  color: var(--article-faint);
}

body.blog-article-page > footer > * {
  width: min(100%, var(--article-nav-width));
  margin-inline: auto;
}

body.blog-article-page > footer p,
body.blog-article-page > footer a {
  color: var(--article-muted) !important;
}

@media (min-width: 769px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  body.blog-article-page > nav:first-of-type > .max-w-7xl,
  .article-content {
    width: min(calc(100% - 28px), var(--article-width));
  }

  .nav-container {
    min-height: 64px;
  }

  .nav-links {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-menu.active,
  .mobile-menu.open {
    display: block;
  }

  .article-content {
    padding: 2rem 0 3rem !important;
  }

  .article-title,
  .article-header h1 {
    font-size: clamp(1.9rem, 9vw, 2.5rem);
  }

  .article-lead {
    font-size: 1rem;
  }

  .prose > section,
  .article-body > section,
  .article-content > section,
  .article-shell > section {
    margin-bottom: 1.75rem !important;
  }

  .card,
  .prose .card,
  .article-content section > .card {
    padding: 1rem !important;
  }

  .grid,
  .md\:grid-cols-2,
  .md\:grid-cols-3 {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
