:root {
    --ink: #101116;
    --muted: #606575;
    --paper: #ffffff;
    --soft: #f4f6fa;
    --line: #dfe3ec;
    --blue: #3b82f6;
    --violet: #a855f7;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; line-height: 1.7; overflow-x: hidden; }
a { color: var(--blue); }

.site-header { background: #000; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16); color: #fff; left: 0; position: fixed; right: 0; top: 0; z-index: 1000; }
.site-nav { align-items: center; display: flex; justify-content: space-between; margin: 0 auto; max-width: 1200px; min-height: 86px; padding: 0 2rem; }
.logo-text { align-items: center; display: flex; font-size: 1.5rem; letter-spacing: 0.15em; text-decoration: none; white-space: nowrap; }
.logo-eureka { background: linear-gradient(135deg, var(--blue), var(--violet)); background-clip: text; font-weight: 900; margin-right: 0.3rem; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.logo-engine { color: #fff; font-weight: 300; }
.nav-links { align-items: center; display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: #fff; font-weight: 500; text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #9f7aea; }
.mobile-menu-toggle { background: transparent; border: 0; cursor: pointer; display: none; padding: 8px; }
.mobile-menu-toggle span { background: #fff; border-radius: 3px; display: block; height: 3px; margin: 5px 0; transition: 0.2s ease; width: 25px; }

.blog-hero { align-items: flex-end; background: #000; color: #fff; display: flex; min-height: 560px; overflow: hidden; padding: 150px 2rem 76px; position: relative; }
.blog-hero::before { background-image: linear-gradient(rgba(59, 130, 246, 0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(168, 85, 247, 0.12) 1px, transparent 1px); background-size: 64px 64px; content: ""; inset: 0; mask-image: linear-gradient(to bottom, transparent, #000); position: absolute; }
.blog-hero-inner { margin: 0 auto; max-width: 1120px; position: relative; width: 100%; z-index: 1; }
.eyebrow { color: #a7c7ff; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.16em; margin-bottom: 1rem; text-transform: uppercase; }
.blog-hero h1 { font-size: clamp(3rem, 8vw, 6.5rem); line-height: 0.96; margin-bottom: 1.5rem; }
.blog-hero p { color: #c9cedb; font-size: 1.2rem; max-width: 680px; }
.blog-index { margin: 0 auto; max-width: 1120px; padding: 80px 2rem 100px; }
.section-heading { align-items: end; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; margin-bottom: 2rem; padding-bottom: 1rem; }
.section-heading h2 { font-size: 2rem; }
.section-heading span { color: var(--muted); font-size: 0.9rem; }
.post-card { width: 100%; }
.post-card + .post-card { border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 3rem; }
.post-card-copy { padding: 1rem 0; }
.post-meta { color: var(--muted); display: flex; flex-wrap: wrap; font-size: 0.9rem; gap: 0.65rem; margin-bottom: 1rem; }
.post-card h2 { font-size: clamp(2rem, 5vw, 3.3rem); line-height: 1.08; margin-bottom: 1.25rem; }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover { color: var(--blue); }
.post-card p { color: #454a58; font-size: 1.1rem; margin-bottom: 1.6rem; }
.read-link { align-items: center; display: inline-flex; font-weight: 800; gap: 0.5rem; text-decoration: none; }
.read-link::after { content: "\2192"; transition: transform 0.2s ease; }
.read-link:hover::after { transform: translateX(4px); }

.article-hero { background: #000; color: #fff; padding: 150px 2rem 76px; position: relative; }
.article-hero-inner { margin: 0 auto; max-width: 1120px; }
.article-hero h1 { font-size: clamp(2.7rem, 7vw, 5.7rem); line-height: 1.02; margin-bottom: 1.5rem; }
.article-hero .standfirst { color: #c9cedb; font-size: 1.2rem; max-width: 760px; }
.article-meta { color: #9da4b5; display: flex; flex-wrap: wrap; font-size: 0.92rem; gap: 0.75rem; margin-top: 2rem; }
.article-layout { display: grid; gap: 4rem; grid-template-columns: minmax(0, 760px) 180px; justify-content: center; padding: 72px 2rem 100px; }
.article-body > * + * { margin-top: 1.35rem; }
.article-body h2 { font-size: 2.15rem; line-height: 1.2; margin-top: 4rem; }
.article-body h3 { font-size: 1.45rem; line-height: 1.3; margin-top: 2.8rem; }
.article-body p, .article-body li { color: #303541; font-size: 1.08rem; }
.article-body ul, .article-body ol { padding-left: 1.5rem; }
.article-body li + li { margin-top: 0.55rem; }
.article-body blockquote { border-left: 4px solid var(--blue); color: #272b35; font-size: 1.15rem; font-weight: 600; padding: 0.4rem 0 0.4rem 1.5rem; }
.article-body pre { background: #0d0f14; border-left: 4px solid var(--violet); color: #dbe8ff; overflow-x: auto; padding: 1.25rem; }
.article-body code { font-family: Consolas, "Courier New", monospace; }
.article-body :not(pre) > code { background: #eef1f6; border-radius: 4px; overflow-wrap: anywhere; padding: 0.1em 0.3em; }
.article-figure { margin: 2.8rem 0; }
.article-figure picture { display: block; }
.article-figure img { background: #090a0e; border: 1px solid #242733; display: block; height: auto; width: 100%; }
.article-figure figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 0.7rem; }
.article-figure-light img { background: #eef0f4; border-color: var(--line); }
.glossary-content { border-top: 1px solid var(--line); padding: 1rem 1.2rem; }
.article-body .glossary-content ul { margin: 0; }
.article-body .glossary-content li { font-size: 1rem; }
.cost-overview { border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 2rem 0 1rem; padding: 1.25rem 0; }
.cost-overview div { border-left: 2px solid var(--blue); padding: 0 1rem; }
.cost-overview span { color: var(--muted); display: block; font-size: 0.82rem; margin-bottom: 0.2rem; }
.cost-overview strong { color: var(--ink); display: block; font-size: 1.35rem; }
.article-details { border: 1px solid var(--line); margin: 1rem 0 2rem; }
.article-details summary { align-items: center; cursor: pointer; display: grid; gap: 0.15rem 1rem; grid-template-columns: 1fr auto; list-style: none; padding: 1rem 3.5rem 1rem 1.2rem; position: relative; }
.article-details summary::-webkit-details-marker { display: none; }
.article-details summary::after { color: var(--blue); content: "+"; font-size: 1.7rem; line-height: 1; position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%); }
.article-details[open] summary::after { content: "\2212"; }
.article-details summary:hover, .article-details summary:focus-visible { background: var(--soft); }
.article-details summary span { color: var(--ink); font-weight: 800; }
.article-details summary small { color: var(--muted); font-size: 0.82rem; grid-column: 1; }
.cost-details .article-table-wrapper { border-top: 1px solid var(--line); margin: 0; }
.article-table-wrapper { margin: 2rem 0; overflow-x: auto; }
.article-body table { border-collapse: collapse; font-size: 0.96rem; width: 100%; }
.article-body th, .article-body td { border-bottom: 1px solid var(--line); padding: 0.7rem 0.8rem; text-align: left; vertical-align: top; }
.article-body th { background: var(--soft); color: var(--ink); font-weight: 800; }
.article-body th:last-child, .article-body td:last-child { text-align: right; white-space: nowrap; }
.article-body tfoot td { border-top: 2px solid var(--ink); font-weight: 800; }
.technical-note { background: var(--soft); border: 1px solid var(--line); padding: 1.5rem; }
.technical-note strong:first-child { color: var(--blue); }
.article-aside { align-self: start; position: sticky; top: 120px; }
.article-aside p { color: var(--muted); font-size: 0.82rem; margin-bottom: 0.7rem; text-transform: uppercase; }
.article-aside a { color: var(--ink); display: block; font-size: 0.9rem; padding: 0.45rem 0; text-decoration: none; }
.article-aside a:hover { color: var(--blue); }
.article-footer-cta { background: #0a0b0f; color: #fff; padding: 64px 2rem; text-align: center; }
.article-footer-cta h2 { font-size: 2rem; margin-bottom: 0.7rem; }
.article-footer-cta p { color: #aeb4c3; margin-bottom: 1.4rem; }

.site-footer { background: #000; color: #fff; padding: 2.4rem 2rem; text-align: center; }
.site-footer p { color: #fff; margin-bottom: 0.35rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 1.4rem; }
.footer-links a { color: #fff; text-decoration: none; }
.footer-links a:hover { color: #a77bf4; }
.back-to-top { align-items: center; background: linear-gradient(135deg, var(--blue), var(--violet)); border: 0; border-radius: 50%; bottom: 24px; color: #fff; cursor: pointer; display: flex; height: 48px; justify-content: center; opacity: 0; position: fixed; right: 24px; transition: 0.2s ease; visibility: hidden; width: 48px; z-index: 900; }
.back-to-top.show { opacity: 1; visibility: visible; }

@media (max-width: 900px) {
    .article-layout { display: block; }
    .article-aside { display: none; }
}

@media (max-width: 768px) {
    .site-nav { min-height: 70px; padding: 0 1rem; }
    .mobile-menu-toggle { display: block; }
    .nav-links { background: #000; flex-direction: column; gap: 0; height: calc(100vh - 70px); left: -100%; padding: 1.5rem 0; position: fixed; text-align: center; top: 70px; transition: left 0.25s ease; width: 100%; }
    .nav-links.active { left: 0; }
    .nav-links li { margin: 1rem 0; }
    .blog-hero { min-height: 480px; padding: 120px 1.25rem 58px; }
    .blog-index, .article-layout { padding-left: 1.25rem; padding-right: 1.25rem; }
    .section-heading { align-items: start; flex-direction: column; gap: 0.3rem; }
    .article-hero { padding: 120px 1.25rem 58px; }
    .article-body h2 { font-size: 1.75rem; }
    .cost-overview { gap: 1.2rem 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0.01ms !important; }
}