/* XChain Platform — landing page styles
   Brand: primary blue #1E90C7, secondary purple #7B2C8F (sampled from the logo).
   Copyright © 2025–2026 Dankest, LLC
   SPDX-License-Identifier: AGPL-3.0-or-later
   Licensed under the GNU Affero GPL v3.0 or later; see LICENSE.md.
   A commercial license is available — contact legal@dankest.llc. */

:root {
    --blue: #1E90C7;
    --purple: #7B2C8F;
    --ink: #0f1722;
    --body: #3b4151;
    --muted: #6b7280;
    --line: #e6e9ef;
    --bg: #ffffff;
    --bg-alt: #f6f8fb;
    --bg-dark: #0f1722;
    --grad: linear-gradient(100deg, var(--blue) 0%, var(--purple) 100%);
    --radius: 14px;
    --shadow: 0 10px 30px rgba(15, 23, 34, 0.08);
    --maxw: min(1840px, 94vw);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--body);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; letter-spacing: -0.02em; }
a { color: var(--blue); text-decoration: none; }
img { max-width: 100%; display: block; }

.grad {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 0.95rem;
    padding: 0.7em 1.3em; border-radius: 10px;
    border: 1.5px solid transparent; cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(30, 144, 199, 0.32); }
.btn--primary:hover { box-shadow: 0 9px 24px rgba(123, 44, 143, 0.36); }
.btn--outline { border-color: var(--line); color: var(--ink); background: #fff; }
.btn--outline:hover { border-color: var(--blue); color: var(--blue); }
.btn--outline.btn--light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.btn--outline.btn--light:hover { border-color: #fff; }
.btn--ghost { color: var(--ink); }
.btn--ghost:hover { color: var(--blue); }
.btn--lg { padding: 0.85em 1.6em; font-size: 1.02rem; }

/* ─── Nav ─── */
.nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.nav__inner {
    max-width: var(--maxw); margin: 0 auto; padding: 0.8rem 1.5rem;
    display: flex; align-items: center; gap: 2rem;
}
.nav__links { display: flex; gap: 1.5rem; margin-left: auto; }
.nav__links a { color: var(--body); font-weight: 500; font-size: 0.95rem; }
.nav__links a:hover { color: var(--blue); }
.nav__links a.is-active { color: var(--ink); font-weight: 600; }
.section__cta { text-align: center; margin-top: 2.5rem; display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }
.card__uses { font-size: 0.78rem; color: var(--muted); margin-top: 0.8rem; font-weight: 600; letter-spacing: 0.02em; text-align: left; }

/* ─── Learn topic prose ─── */
.prose { max-width: 760px; margin: 0 auto; }
.prose .lead { font-size: 1.2rem; color: var(--ink); line-height: 1.6; margin-bottom: 1.5rem; }
.prose h2 { font-size: 1.4rem; margin: 2.4rem 0 0.7rem; }
.prose p { color: var(--body); margin-bottom: 1rem; font-size: 1.05rem; line-height: 1.7; }
.prose ul { list-style: disc; margin: 0 0 1.2rem 1.3rem; }
.prose li { color: var(--body); margin-bottom: 0.45rem; line-height: 1.6; }
.prose strong { color: var(--ink); }
.prose__fig { margin: 1.8rem 0 0.6rem; }
.prose__fig figcaption { text-align: center; font-size: 0.85rem; color: var(--muted); margin-top: 0.6rem; }
.prose__related { margin-top: 2.6rem; padding: 1.3rem 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-alt); }
.prose__related h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 0.6rem; }
.prose__related a { display: inline-block; margin-right: 1.2rem; font-weight: 600; font-size: 0.95rem; }

/* ─── Framework diagram (dark, clickable SVG) ─── */
.framework { max-width: 860px; margin: 0 auto; }
.framework svg { width: 100%; height: auto; display: block; box-shadow: var(--shadow); border-radius: 18px; }
.framework .fw-node { transition: stroke 0.15s ease; }
.framework a { cursor: pointer; }
.framework a:hover .fw-node { stroke: #fff; stroke-width: 3; }
.framework figcaption { text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 0.8rem; }

/* ─── Architecture map (clickable component flow) ─── */
.archmap { max-width: 920px; margin: 0 auto; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem 1.5rem; }
.archmap__lane { text-align: center; }
.archmap__tag { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 700; margin-bottom: 0.6rem; }
.archmap__row { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; align-items: center; }
.archmap__node { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.6rem 1rem; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-weight: 600; font-size: 0.92rem; color: var(--ink); }
a.archmap__node { transition: border-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease; }
a.archmap__node:hover { border-color: var(--blue); color: var(--blue); box-shadow: var(--shadow); }
.archmap__node--chain { background: linear-gradient(135deg, rgba(30, 144, 199, 0.12), rgba(123, 44, 143, 0.12)); border-color: transparent; cursor: default; }
.archmap__embed { font-size: 0.74rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.archmap__flow { text-align: center; color: var(--muted); font-size: 1.25rem; line-height: 1; margin: 0.7rem 0; }
.archmap__side { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px dashed var(--line); }

/* ─── Closing CTA band ─── */
.cta-final { max-width: none; background: var(--grad); padding: 4.5rem 1.5rem; text-align: center; }
.cta-final__inner { max-width: 720px; margin: 0 auto; }
.cta-final h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.cta-final p { color: rgba(255, 255, 255, 0.92); margin: 0.8rem 0 1.8rem; font-size: 1.1rem; }
.cta-final__actions { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }
.cta-final .btn--primary { background: #fff; color: var(--purple); }
.cta-final .btn--primary:hover { background: #f3f0f7; }
.cta-final .btn--outline { border-color: rgba(255, 255, 255, 0.65); color: #fff; background: transparent; }
.cta-final .btn--outline:hover { border-color: #fff; color: #fff; }

/* ─── Glossary ─── */
.glossary { max-width: 820px; margin: 0 auto; }
.glossary h2 { font-size: 1.25rem; margin: 2.4rem 0 0.6rem; }
.glossary h2:first-child { margin-top: 0; }
.glossary dl { margin: 0; }
.glossary dt { font-weight: 700; color: var(--ink); margin-top: 1.1rem; }
.glossary dd { margin: 0.25rem 0 0; color: var(--body); line-height: 1.65; }

/* ─── FAQ (native accordion) ─── */
.faq { max-width: 820px; margin: 0 auto; }
.faq h2 { font-size: 1.25rem; margin: 2.4rem 0 0.9rem; }
.faq h2:first-child { margin-top: 0; }
.faq details { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 0.7rem; background: #fff; }
.faq summary { cursor: pointer; padding: 1rem 2.6rem 1rem 1.2rem; font-weight: 600; color: var(--ink); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 1.2rem; top: 0.9rem; color: var(--blue); font-weight: 700; font-size: 1.2rem; }
.faq details[open] summary::after { content: '−'; }
.faq details p { padding: 0 1.2rem 1.1rem; color: var(--body); line-height: 1.7; margin: 0; }
.faq details p + p { padding-top: 0.8rem; }
.nav__cta { display: flex; gap: 0.6rem; }
/* Mobile menu (no-JS native disclosure); shown only on small screens */
.nav__mobile { display: none; position: relative; }
.nav__mobile summary { list-style: none; cursor: pointer; color: var(--ink); display: grid; place-items: center; padding: 0.3rem; }
.nav__mobile summary::-webkit-details-marker { display: none; }
.nav__mobile__panel { position: absolute; right: 0; top: 2.6rem; z-index: 60; display: flex; flex-direction: column; min-width: 210px; padding: 0.5rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.nav__mobile__panel a { padding: 0.65rem 0.8rem; border-radius: 8px; color: var(--ink); font-weight: 600; font-size: 0.98rem; }
.nav__mobile__panel a:hover, .nav__mobile__panel a.is-active { background: var(--bg-alt); color: var(--blue); }

/* ── Nav dropdowns (CSS-only: hover + keyboard focus-within; no JS) ───────── */
.nav__links { align-items: center; }
.nav__item { position: relative; display: inline-flex; align-items: center; }
.nav__toggle { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; margin: 0; padding: 0; font: inherit; font-weight: 500; font-size: 0.95rem; color: var(--body); cursor: pointer; }
.nav__toggle:hover, .nav__item--menu:focus-within .nav__toggle { color: var(--blue); }
.nav__toggle.is-active { color: var(--ink); font-weight: 600; }
.nav__toggle .nav__caret { color: var(--muted); font-size: 0.72em; width: auto; margin-left: 1px; transition: transform 0.15s ease; }
.nav__item--menu:hover .nav__caret, .nav__item--menu:focus-within .nav__caret { transform: rotate(180deg); }
.nav__item--menu::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 0.7rem; }
.nav__menu { position: absolute; top: calc(100% + 0.7rem); left: 50%; transform: translateX(-50%) translateY(6px); z-index: 70; display: flex; flex-direction: column; min-width: 200px; padding: 0.4rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.15s ease, transform 0.15s ease; }
.nav__item--menu:hover .nav__menu, .nav__item--menu:focus-within .nav__menu { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.nav__menu a { display: flex; align-items: center; gap: 8px; white-space: nowrap; padding: 0.55rem 0.8rem; border-radius: 8px; color: var(--ink); font-weight: 500; font-size: 0.92rem; }
.nav__menu a:hover { background: var(--bg-alt); color: var(--blue); }
.nav__menu a .gh-icon { width: 16px; height: 16px; }
/* Mobile (<details> panel): grouped subsections */
.nav__mgroup { display: flex; flex-direction: column; }
.nav__mhead { padding: 0.55rem 0.8rem 0.2rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }

/* Nav Font Awesome icons (blue, width-normalized for alignment) */
.nav__links a, .nav__toggle { display: inline-flex; align-items: center; gap: 6px; }
.nav__links a i, .nav__toggle i { color: var(--blue); font-size: 0.9em; width: 1em; text-align: center; }
.nav__menu a i { color: var(--blue); width: 1.15em; text-align: center; }
.nav__mobile__panel a { display: flex; align-items: center; gap: 9px; }
.nav__mobile__panel a i, .nav__mhead i { color: var(--blue); width: 1.2em; text-align: center; }
.nav__mhead { display: flex; align-items: center; gap: 9px; }

/* ─── Hero ─── */
.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(900px 400px at 80% -10%, rgba(123, 44, 143, 0.10), transparent 60%),
        radial-gradient(900px 400px at 0% 0%, rgba(30, 144, 199, 0.12), transparent 55%);
    padding: 5.5rem 1.5rem 4.5rem;
    text-align: center;
}
.hero__bg {
    position: absolute; inset: 0; z-index: 0; opacity: 0.5; pointer-events: none;
    animation: heroFloat 16s ease-in-out infinite;
}
.hero__bg svg { width: 100%; height: 100%; display: block; }
.hb-pulse { animation: hbPulse 5s ease-in-out infinite; }
@keyframes heroFloat { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, -12px, 0); } }
@keyframes hbPulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hero__bg { animation: none; } .hb-pulse { animation: none; } }

/* Scroll-in reveals — only active with JS (see inline head script). Content shows by default without JS. */
.js .card, .js .feature, .js .arch__group, .js .chart, .js .pipefig, .js .compare {
    opacity: 0; transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}
.js .card.in, .js .feature.in, .js .arch__group.in, .js .chart.in, .js .pipefig.in, .js .compare.in {
    opacity: 1; transform: none;
}
/* Gentle stagger within a grid/group row. */
.js .card:nth-child(2) { transition-delay: 0.06s; }
.js .card:nth-child(3) { transition-delay: 0.12s; }
.js .card:nth-child(4) { transition-delay: 0.18s; }
@media (prefers-reduced-motion: reduce) {
    .js .card, .js .feature, .js .arch__group, .js .chart, .js .pipefig, .js .compare {
        opacity: 1; transform: none; transition: none;
    }
}
.hero__inner { position: relative; z-index: 1; max-width: 880px; margin: 0 auto; }
.eyebrow {
    text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem;
    font-weight: 700; color: var(--blue); margin-bottom: 1rem;
}
.eyebrow--light { color: #7fd0f4; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 800; margin-bottom: 1.2rem; }
.hero__sub { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--body); max-width: 680px; margin: 0 auto 2rem; }
.hero__actions { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }
.hero__chains { margin-top: 2.2rem; color: var(--muted); font-size: 0.95rem; }
.hero__chains strong { color: var(--ink); }
.hero__chains .dot { margin: 0 0.5rem; color: var(--line); }
.hero__chains span:first-child { margin-right: 0.5rem; }

/* ─── Trust strip ─── */
.strip { border-block: 1px solid var(--line); background: var(--bg-alt); }
.strip__inner {
    max-width: var(--maxw); margin: 0 auto; padding: 1.8rem 1.5rem;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; text-align: center;
}
.strip__inner div { display: flex; flex-direction: column; }
.strip__inner b { font-size: 1.9rem; font-weight: 800; color: var(--ink); }
.strip__inner span { font-size: 0.85rem; color: var(--muted); }

/* ─── Sections ─── */
.section { max-width: var(--maxw); margin: 0 auto; padding: 5rem 1.5rem; }
.section--alt { max-width: none; background: var(--bg-alt); }
.section--alt > * { max-width: var(--maxw); margin-inline: auto; }
/* Head spans the full content width so the h2 stays on ONE line as long as it fits,
   wrapping only when the viewport forces it; eyebrow + sub-text stay at a readable width. */
.section__head { text-align: center; max-width: var(--maxw); margin: 0 auto 3rem; }
.section__head h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 800; margin-bottom: 1rem; text-wrap: balance; }
.section__head > p { max-width: 720px; margin-inline: auto; }
.section__head p { font-size: 1.1rem; color: var(--body); }

/* ─── Feature grid ─── */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.card {
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.6rem; transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.card__icon {
    width: 88px; height: 88px; border-radius: 18px; display: grid; place-items: center;
    margin: 0 auto 1.2rem; /* centered in the card */
    background: linear-gradient(135deg, rgba(30,144,199,0.12), rgba(123,44,143,0.12));
}
.ico {
    width: 48px; height: 48px; fill: none;
    stroke: url(#ig); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.card h3 { font-size: 1.12rem; margin-bottom: 0.45rem; }
.card__icon + h3 { text-align: center; } /* center icon-card titles under the centered icon */
/* Font Awesome glyphs used as card icons (e.g. tool logos) — gradient-filled to match the line icons. */
.card__icon i { font-size: 38px; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--purple); }
/* Coverage cards: component name + clickable per-type test bubbles (link to repo source). */
.cov-card { position: relative; }
.cov-card h3 a { color: var(--ink); }
.cov-card h3 a:hover { color: var(--blue); }
/* Per-component total — green pill (same color & size as the E2E bubble) pinned to the card's top-right corner.
   Scoped to .cov-card so it beats the larger `.card p` font-size. */
.cov-card .cov-total {
    position: absolute; top: 0.85rem; right: 0.85rem; margin: 0; white-space: nowrap; text-align: center;
    font-family: 'SF Mono', Menlo, Consolas, monospace; font-size: 0.78rem; font-weight: 600; line-height: 1.2;
    padding: 0.32em 0.7em; border-radius: 999px;
    color: hsl(145 55% 33%); background: hsl(145 50% 42% / 0.15);
}
.cov-total b { font-weight: 800; }
.cov-bubbles { display: flex; flex-wrap: wrap; gap: 0.45rem; justify-content: center; margin-top: 0.9rem; }
.cov-bubble {
    font-family: 'SF Mono', Menlo, Consolas, monospace; font-size: 0.78rem; font-weight: 600;
    padding: 0.32em 0.7em; border-radius: 999px; display: inline-flex; align-items: center; gap: 0.35em;
    line-height: 1.2; transition: filter 0.12s ease, transform 0.12s ease;
}
.cov-bubble b { font-weight: 800; }
.cov-bubble:hover { filter: brightness(0.95) saturate(1.15); transform: translateY(-1px); }
/* One hue per test type — every bubble of a given type shares its color across all components. */
.cov-bubble.t-unit        { color: hsl(210 60% 42%); background: hsl(210 65% 50% / 0.12); }
.cov-bubble.t-integration { color: hsl(265 48% 52%); background: hsl(265 55% 56% / 0.13); }
.cov-bubble.t-e2e         { color: hsl(145 55% 33%); background: hsl(145 50% 42% / 0.15); }
.cov-bubble.t-boundary    { color: hsl(28 72% 41%);  background: hsl(28 82% 50% / 0.15); }
.cov-bubble.t-security    { color: hsl(2 64% 49%);   background: hsl(2 70% 56% / 0.12); }
.cov-bubble.t-fuzz        { color: hsl(322 55% 48%); background: hsl(322 60% 56% / 0.12); }
.cov-bubble.t-chaos       { color: hsl(40 72% 36%);  background: hsl(42 82% 50% / 0.18); }
.cov-bubble.t-mutation    { color: hsl(186 64% 32%); background: hsl(186 60% 42% / 0.15); }
.cov-bubble.t-performance { color: hsl(240 52% 56%); background: hsl(240 58% 60% / 0.14); }
.cov-bubble.t-regression  { color: hsl(218 16% 42%); background: hsl(218 18% 50% / 0.15); }
.cov-bubble.t-smoke       { color: hsl(22 26% 42%);  background: hsl(22 32% 50% / 0.16); }
.cov-bubble.t-actions     { color: hsl(300 48% 49%); background: hsl(300 55% 56% / 0.12); }
.cov-bubble.t-determinism { color: hsl(100 42% 30%); background: hsl(100 45% 42% / 0.16); }
/* Coverage matrix: components × test types, counts heat-shaded per column. */
.cov-matrix-cap { text-align: center; color: var(--muted); font-size: 0.9rem; max-width: 720px; margin: 2.6rem auto 1.1rem; }
.cov-matrix-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 0.4rem; }
.cov-matrix { border-collapse: separate; border-spacing: 0; margin: 0 auto; font-size: 0.82rem; table-layout: fixed; min-width: 79rem; }
/* Uniform width for every test-type column; the row label and Total get their own. */
.cov-matrix th, .cov-matrix td { width: 5.4rem; padding: 0.5rem 0.4rem; text-align: center; white-space: nowrap; }
.cov-matrix thead th span { font-size: 0.7rem; font-weight: 700; }
.cov-matrix .cov-matrix__rh { width: 9rem; text-align: right; font-weight: 700; padding-right: 0.9rem; position: sticky; left: 0; background: var(--bg); }
.cov-matrix .cov-matrix__rh a { color: var(--ink); }
.cov-matrix .cov-matrix__rh a:hover { color: var(--blue); }
.cov-matrix .cov-matrix__tot { width: 4.6rem; }
.cov-matrix tbody td { font-family: 'SF Mono', Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); border-bottom: 1px solid var(--line); border-right: 1px solid #f1f3f7; border-radius: 6px; }
.cov-matrix td.cov-z { color: #cbd2dc; font-weight: 400; }
.cov-matrix td.cov-z::before { content: '·'; }
.cov-matrix .cov-matrix__tot { font-weight: 800; color: hsl(145 55% 33%); background: hsl(145 50% 42% / 0.14); }
.cov-matrix thead .cov-matrix__tot { background: none; }
.cov-matrix tfoot td, .cov-matrix tfoot th { border-top: 2px solid var(--line); font-weight: 800; color: var(--ink); padding-top: 0.7rem; }
/* Universal | Specialized column split: a divider line down the first specialized
   column, plus the group-header row labelling each block. */
.cov-matrix .cov-div { border-left: 2px solid var(--line); }
/* Tag-homed cell: coverage exists but lives under another discipline (e.g. an
   @regression tag counted under Unit). Hollow/outlined ⌗, distinct from both a
   filled heat cell and an empty dot. */
.cov-matrix td.cov-tag { color: var(--muted); font-weight: 700; cursor: help; box-shadow: inset 0 0 0 1.5px var(--line); background: repeating-linear-gradient(135deg, transparent, transparent 5px, #f4f6fa 5px, #f4f6fa 7px); }
.cov-tag-key { color: var(--muted); font-weight: 800; }
.cov-matrix__group th { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); padding: 0.1rem 0.4rem 0.35rem; }
.cov-matrix__group .cov-matrix__rh, .cov-matrix__group .cov-matrix__tot { background: var(--bg); }
.card p { font-size: 0.95rem; color: var(--body); text-align: justify; }

/* ─── Steps ─── */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; list-style: none; counter-reset: step; }
.steps li { position: relative; padding: 1.6rem; border: 1px solid var(--line); border-radius: var(--radius); text-align: center; }
.steps__n {
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
    background: var(--grad); color: #fff; font-weight: 700; margin: 0 auto 0.9rem;
}
.steps h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.steps p { font-size: 0.94rem; color: var(--body); }

/* ─── Developers ─── */
.section--dark { max-width: none; background: var(--bg-dark); color: #c7d0dc; }
.dev {
    max-width: var(--maxw); margin: 0 auto;
    display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
}
.dev__copy h2 { color: #fff; font-size: clamp(1.7rem, 3.5vw, 2.3rem); margin-bottom: 1rem; }
.dev__copy p { color: #aab4c2; font-size: 1.08rem; margin-bottom: 1.6rem; }
.dev__actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.code {
    background: #0a0f17; border: 1px solid #1e2a3a; border-radius: var(--radius);
    padding: 1.4rem 1.6rem; overflow-x: auto; font-size: 0.9rem; line-height: 1.7;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Menlo, Consolas, monospace;
    color: #d6deea;
}
.c-com { color: #5f7186; font-style: italic; }
.c-kw { color: #5fb3e8; }
.c-str { color: #9ad18a; }

/* ─── Ecosystem ─── */
.grid--eco { grid-template-columns: repeat(4, 1fr); }
.eco {
    display: block; padding: 1.6rem; border: 1px solid var(--line); border-radius: var(--radius);
    background: #fff; transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.eco:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--blue); }
.eco h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.eco p { color: var(--body); font-size: 0.94rem; }

/* ─── Open source ─── */
.os { text-align: center; max-width: 720px; margin: 0 auto; }
.os h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); margin-bottom: 1rem; }
.os p { font-size: 1.1rem; color: var(--body); margin-bottom: 1.8rem; }
.os__actions { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }

/* ─── Footer ─── */
.footer { background: var(--bg-dark); color: #9aa6b4; padding: 3.5rem 1.5rem 2rem; }
.footer__inner {
    max-width: var(--maxw); margin: 0 auto;
    display: grid; grid-template-columns: 1.3fr 2.7fr; gap: 2.5rem;
}
.footer__brand img { margin-bottom: 0.9rem; filter: brightness(0) invert(1); opacity: 0.95; }
.footer__brand p { font-size: 0.92rem; max-width: 260px; }
.footer__cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.footer__cols h4 { color: #fff; font-size: 0.95rem; margin-bottom: 0.8rem; }
.footer__cols a { display: block; color: #9aa6b4; font-size: 0.9rem; padding: 0.22rem 0; }
.footer__cols a:hover { color: #fff; }
.footer__bar {
    max-width: var(--maxw); margin: 2.5rem auto 0; padding-top: 1.5rem;
    border-top: 1px solid #1e2a3a; display: flex; justify-content: space-between;
    flex-wrap: wrap; gap: 0.5rem; font-size: 0.85rem; color: #6b7888;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .grid, .grid--eco, .steps { grid-template-columns: repeat(2, 1fr); }
    .dev { grid-template-columns: 1fr; }
    .footer__inner { grid-template-columns: 1fr; }
    .nav__links { display: none; }
    .nav__cta { margin-left: auto; }
    .nav__mobile { display: block; }
}
@media (max-width: 560px) {
    .strip__inner { grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
    .grid, .grid--eco, .steps { grid-template-columns: 1fr; }
    .footer__cols { grid-template-columns: repeat(2, 1fr); }
    .nav__cta .btn--ghost { display: none; }
}

/* ─── Feature blocks (the "moat") ─── */
.feature {
    display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center;
    padding: 3rem 0;
}
.feature + .feature { border-top: 1px solid var(--line); }
.feature--reverse .feature__copy { order: 2; }
.tag {
    display: inline-block; text-transform: uppercase; letter-spacing: 0.1em;
    font-size: 0.72rem; font-weight: 700; color: var(--purple);
    background: rgba(123, 44, 143, 0.09); padding: 0.3em 0.7em; border-radius: 999px; margin-bottom: 1rem;
}
.feature__copy h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 800; margin-bottom: 0.9rem; }
.feature__copy > p { font-size: 1.05rem; color: var(--body); margin-bottom: 1rem; }
.feature__eg {
    font-size: 0.95rem; color: var(--body); background: var(--bg-alt);
    border-left: 3px solid var(--blue); border-radius: 0 8px 8px 0; padding: 0.9rem 1.1rem;
}
.feature__eg code, .feature__copy code {
    background: rgba(30, 144, 199, 0.1); color: var(--blue); padding: 0.1em 0.4em;
    border-radius: 5px; font-size: 0.88em; font-family: 'SF Mono', Menlo, Consolas, monospace;
}

/* diagram panels */
.diagram {
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 1.6rem; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-align: center;
}
.diagram__node {
    width: 100%; max-width: 360px; padding: 0.85rem 1rem; border-radius: 10px;
    font-weight: 600; font-size: 0.95rem; background: var(--bg-alt); border: 1px solid var(--line); color: var(--ink);
}
.diagram__node.n-contract { background: linear-gradient(135deg, rgba(30,144,199,0.12), rgba(123,44,143,0.12)); border-color: transparent; }
.diagram__node.n-ok { border-color: #198754; color: #157347; }
.diagram__node.n-lock { background: #0f1722; color: #fff; border-color: transparent; }
.diagram__node.n-key { background: linear-gradient(135deg, rgba(123,44,143,0.14), rgba(30,144,199,0.10)); border-color: transparent; }
.diagram__arrow { color: var(--muted); font-size: 1.1rem; line-height: 1; }
.diagram__sub { font-size: 0.78rem; color: var(--muted); }
.diagram__fan { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
.diagram__fan span {
    background: var(--bg-alt); border: 1px solid var(--line); border-radius: 8px;
    padding: 0.5rem 0.8rem; font-size: 0.9rem; font-weight: 600;
}
.diagram__cap { font-size: 0.82rem; color: var(--muted); }
.c-fn { color: #d6a76a; }

/* compact band */
.band {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
    margin-top: 3rem; padding-top: 2.5rem; border-top: 1px solid var(--line);
}
.band h4 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.band p { font-size: 0.94rem; color: var(--body); }

/* use cases */
.grid--use { grid-template-columns: repeat(3, 1fr); }
.use {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.use:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.use__tag {
    display: inline-block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--blue); background: rgba(30, 144, 199, 0.1); padding: 0.25em 0.6em; border-radius: 999px; margin-bottom: 0.8rem;
}
.use h3 { font-size: 1.08rem; margin-bottom: 0.4rem; }
.use p { font-size: 0.93rem; color: var(--body); }
.section__more { text-align: center; margin-top: 2rem; }
.section__more a { font-weight: 600; }
.feature__more { margin-top: 1.1rem; }
.feature__more a { font-weight: 600; }

@media (max-width: 900px) {
    .feature, .feature--reverse .feature__copy { grid-template-columns: 1fr; order: 0; }
    .feature__visual { order: 2; }
    .band, .grid--use { grid-template-columns: 1fr; }
    .band { gap: 1.2rem; }
}

/* ─── 3-col grid (trade) ─── */
.grid--3 { grid-template-columns: repeat(3, 1fr); margin-bottom: 1rem; }

/* ─── Architecture groups ─── */
.arch { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.arch__group {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem;
}
.arch__group h4 { font-size: 1.05rem; margin-bottom: 0.7rem; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.arch--4 { grid-template-columns: repeat(4, 1fr); }
.cnt { font-size: 0.72rem; font-weight: 700; color: var(--purple); background: rgba(123, 44, 143, 0.09); border-radius: 999px; padding: 0.15em 0.55em; }
@media (max-width: 900px) { .arch--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .arch--4 { grid-template-columns: 1fr; } }
.arch__group p { font-size: 0.92rem; color: var(--body); margin-top: 0.8rem; }
.pills { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pills span, .pills a {
    font-family: 'SF Mono', Menlo, Consolas, monospace; font-size: 0.8rem;
    background: linear-gradient(135deg, rgba(30,144,199,0.1), rgba(123,44,143,0.1));
    color: var(--ink); padding: 0.25em 0.6em; border-radius: 6px;
}
.pills a { transition: background 0.12s ease, color 0.12s ease; display: inline-flex; align-items: center; gap: 0.4em; }
.pills a i { font-size: 0.85em; color: var(--accent, #1e90c7); width: 1em; text-align: center; }
.pills a:hover { background: var(--grad); color: #fff; }
.pills a:hover i { color: #fff; }
.action-h1 { display: flex; align-items: center; gap: 0.5em; }
.action-h1__icon { font-size: 0.78em; color: var(--accent, #1e90c7); flex: none; }

@media (max-width: 900px) {
    .grid--3, .arch { grid-template-columns: 1fr; }
}

/* ─── Chain-agnostic callout band ─── */
.callout { background: var(--grad); color: #fff; padding: 4rem 1.5rem; text-align: center; }
.callout__inner { max-width: 760px; margin: 0 auto; }
.callout h2 { color: #fff; font-size: clamp(1.6rem, 3.2vw, 2.2rem); margin-bottom: 1rem; }
.callout p { font-size: 1.08rem; color: rgba(255, 255, 255, 0.92); margin-bottom: 1.8rem; }
.callout .eyebrow--light { color: rgba(255, 255, 255, 0.85); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: #f0f3f8; }
.callout__note { font-size: 0.85rem; color: rgba(255, 255, 255, 0.75); margin: 1.2rem 0 0; }

/* ─── EVM-vs-XChain compare ─── */
.compare { display: grid; gap: 1rem; }
.compare__col { padding: 1.3rem 1.5rem; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.compare__col h4 { font-size: 1rem; margin-bottom: 0.4rem; }
.compare__col p { font-size: 0.93rem; color: var(--body); }
.compare__col--bad { background: rgba(220, 53, 69, 0.05); border-color: rgba(220, 53, 69, 0.28); }
.compare__col--bad h4 { color: #b02a37; }
.compare__col--good { background: rgba(25, 135, 84, 0.06); border-color: rgba(25, 135, 84, 0.32); }
.compare__col--good h4 { color: #157347; }

/* ─── Component sub-pages ─── */
.subhero {
    background:
        radial-gradient(800px 320px at 85% -20%, rgba(123, 44, 143, 0.10), transparent 60%),
        radial-gradient(800px 320px at 0% 0%, rgba(30, 144, 199, 0.12), transparent 55%);
    border-bottom: 1px solid var(--line);
    padding: 2.2rem 1.5rem 3rem;
}
.subhero__inner { max-width: var(--maxw); margin: 0 auto; }
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.2rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--blue); }
.badge {
    display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--purple); background: rgba(123, 44, 143, 0.09); padding: 0.3em 0.7em; border-radius: 999px; margin-bottom: 0.9rem;
}
.subhero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; margin-bottom: 0.6rem; font-family: var(--font); }
.subhero__tag { font-size: 1.15rem; color: var(--body); max-width: 640px; margin-bottom: 1.6rem; }
.subhero__actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }

.pagesec { padding-top: 3rem; padding-bottom: 4rem; }
.pagesec__inner { max-width: var(--maxw); margin: 0 auto; }
/* Full-width content page: two columns of blocks, each with a readable measure. */
.pagegrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.4rem 3rem; }
.pageblock { margin-bottom: 0; }
.pageblock h2 { font-size: 1.3rem; margin-bottom: 0.7rem; }
.pageblock > p { font-size: 1.05rem; color: var(--body); max-width: 68ch; }
@media (max-width: 820px) { .pagegrid { grid-template-columns: 1fr; gap: 2.2rem; } }

/* ─── Per-component mini flow-diagram ─── */
.minimap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
.minimap__inner {
    background: linear-gradient(135deg, rgba(30, 144, 199, 0.06), rgba(123, 44, 143, 0.06));
    border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem 1.6rem;
}
.minimap__label {
    text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; font-weight: 700;
    color: var(--muted); text-align: center; margin-bottom: 1.1rem;
}
.flow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.55rem 0.5rem; }
.flow__node {
    font-size: 0.9rem; font-weight: 600; color: var(--ink); background: #fff;
    border: 1px solid var(--line); border-radius: 10px; padding: 0.55rem 0.95rem;
    box-shadow: 0 1px 2px rgba(15, 23, 34, 0.05);
}
.flow__node--active {
    color: #fff; background: var(--grad); border-color: transparent;
    box-shadow: 0 6px 18px rgba(123, 44, 143, 0.28);
}
.flow__arrow { color: var(--purple); font-weight: 700; opacity: 0.55; }
.flow__note { text-align: center; color: var(--body); font-size: 0.95rem; margin: 1.1rem auto 0; max-width: 720px; }
.caplist { list-style: none; display: grid; gap: 0.6rem; }
.caplist li { position: relative; padding-left: 1.7rem; font-size: 1rem; color: var(--body); }
.caplist li::before {
    content: ''; position: absolute; left: 0; top: 0.55em; width: 8px; height: 8px; border-radius: 50%;
    background: var(--grad);
}
.caplist--tech li { color: var(--muted); font-size: 0.95rem; }
.caplist--tech li::before { background: var(--line); }
.pagesec__more { margin-top: 2.5rem; }
.pagesec__more a { font-weight: 600; }

/* component index */
.cgroup { margin-bottom: 2.6rem; }
.cgroup__title {
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted);
    margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--line);
}
.card--link { display: block; }
.card--link h3 { font-size: 1.05rem; margin-bottom: 0.3rem; font-family: 'SF Mono', Menlo, Consolas, monospace; }
.card--link p { font-size: 0.92rem; color: var(--body); }
/* Component cards carry the canonical styleguide icon beside the name */
.comp-card__head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.3rem; }
.comp-card__head h3 { margin-bottom: 0; }
.comp-card__icon {
    flex: none; width: 1.55rem; height: 1.55rem; font-size: 1.35rem; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
}
.comp-card__icon svg { width: 1.4rem; height: 1.4rem; display: block; }
/* Action cards carry the Font Awesome action icon beside the name */
.act-card__head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.3rem; }
.act-card__head h3 { margin-bottom: 0; }
.act-card__icon {
    flex: none; width: 1.55rem; height: 1.55rem; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
}
.act-card__icon i { font-size: 1.1rem; color: var(--accent, #1e90c7); }
/* Component page hero: the same canonical icon, sized up beside the title */
.comp-hero__head { display: flex; align-items: center; gap: 0.85rem; }
.comp-hero__head h1 { margin: 0; }
.comp-hero__icon {
    flex: none; width: 2.6rem; height: 2.6rem; font-size: 2.15rem; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
}
.comp-hero__icon svg { width: 2.4rem; height: 2.4rem; display: block; }
/* GitHub mark — sits before any "GitHub" link label, inherits the link color */
.gh-icon { width: 1.05em; height: 1.05em; flex: none; vertical-align: -0.16em; margin-right: 0.45em; }

/* ─── Pipeline diagram ─── */
.pipefig { max-width: var(--maxw); margin: 0 auto 2.5rem; }
.pipefig svg { width: 100%; height: auto; display: block; }
.pipefig figcaption { text-align: center; font-size: 0.9rem; color: var(--muted); margin-top: 1.2rem; max-width: 720px; margin-inline: auto; }

/* ─── Charts ─── */
.charts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.chart { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem 1.8rem; }
.chart h3 { font-size: 1.12rem; margin-bottom: 0.3rem; }
.chart__sub { font-size: 0.88rem; color: var(--muted); margin-bottom: 1.4rem; }
.bar-row { display: grid; grid-template-columns: 120px 1fr auto; align-items: center; gap: 0.9rem; margin-bottom: 0.8rem; }
.bar-row__label { font-size: 0.9rem; color: var(--body); }
.bar-track { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 999px; height: 13px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--grad); }
.bar-row__val { font-size: 0.85rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart__note { font-size: 0.82rem; color: var(--muted); margin-top: 1rem; }
@media (max-width: 900px) { .charts { grid-template-columns: 1fr; } }
