/* Monetic landing page — the m0 brand.
 *
 * Consumes the theme CSS variables set by `services/theme/applicator.rs`.
 * No hardcoded colors — every visual property reads from `var(--*)` so
 * a single theme application re-skins the entire page.
 *
 * The m0 brand language: anthracite surfaces, electric-blue primary
 * accent (the rails), warm gold secondary accent (the white-glove),
 * Orbitron display + IBM Plex Mono body. The signature blue→gold
 * gradient is the visual signature of that pairing.
 */

/* ── Reset + base ──────────────────────────────────────────────── */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* The VDN (Value Delivery Network) texture is an inline SVG component
 * (<VdnTexture/>) positioned fixed behind the page content. It replaces
 * the old CSS grid with a network graph — nodes + edges + active routes
 * — reading as a value delivery network rather than a blank grid. */

/* ── VDN texture ───────────────────────────────────────────────── */

.vdn-texture {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.vdn-texture svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Edges: the connections between nodes — thin, low-opacity. */
.vdn-edge {
    stroke: var(--vdn-edge);
    stroke-width: 1;
    stroke-linecap: round;
}

/* Active routes: value flowing through the network, in gold. */
.vdn-route {
    stroke: var(--vdn-route);
    stroke-width: 1.5;
    stroke-linecap: round;
}

/* Nodes: the hubs in the network — slightly more visible than edges. */
.vdn-node {
    fill: var(--vdn-node);
}

.vdn-node-hub {
    fill: var(--vdn-node);
}

/* ── Vault seal ────────────────────────────────────────────────── */
/* A hexagonal engraved seal marking sovereign/owned elements. The
 * body sits on the elevated surface; the border is the engraved blue
 * edge; the key-line is the gold sovereign mark. Theme-aware via CSS
 * variables so the seal re-skins when the theme toggles. */

.vault-seal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vault-seal svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* The seal body — a hexagon on the elevated surface. */
.seal-body {
    fill: var(--bg-elevated);
    stroke: var(--accent-primary);
    stroke-width: 1.5;
    stroke-linejoin: round;
}

/* The engraved inner border — a smaller hexagon, stroke only. */
.seal-border {
    fill: none;
    stroke: var(--accent-primary);
    stroke-width: 1;
    stroke-linejoin: round;
    opacity: 0.55;
}

/* The sovereign key-line — a ring in gold. */
.seal-key {
    fill: none;
    stroke: var(--accent-secondary);
    stroke-width: 1.5;
}

/* The sovereign point — a dot in gold at the center. */
.seal-key-dot {
    fill: var(--accent-secondary);
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

a {
    color: var(--text-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-primary);
}

.accent {
    color: var(--accent-primary);
}

/* ── Layout ────────────────────────────────────────────────────── */

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 28px;
    position: relative;
    z-index: 1;
}

section {
    padding: 110px 0;
    position: relative;
    z-index: 1;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin-bottom: 20px;
}

.section-title {
    font-size: clamp(1.875rem, 4vw, 2.75rem);
    margin-bottom: 18px;
    max-width: 820px;
}

.section-subtitle {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    max-width: 680px;
    margin-bottom: 56px;
}

.callout-label {
    color: var(--text-primary);
    font-weight: 600;
}

/* ── The m0 mark ───────────────────────────────────────────────── */

.m0-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-accent);
    box-shadow: var(--shadow-glow-accent), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
    overflow: hidden;
    /* The SVG letterforms inherit `color` via fill="currentColor". */
    color: var(--accent-primary);
    /* Brushed-metal feel: a subtle vertical sheen layered over the
     * elevated surface, picking up the accent at the edges. */
    background-image:
        linear-gradient(160deg, rgba(255, 255, 255, 0.06) 0%, transparent 38%, transparent 62%, rgba(0, 0, 0, 0.18) 100%),
        var(--bg-gradient);
}

.m0-mark svg {
    width: 100%;
    height: 100%;
    display: block;
    /* The m0 letterforms are portrait (832×1248); pad slightly so the
     * mark reads as a centered glyph inside the square surface. */
    padding: 12%;
}

/* The "m" letterforms — electric blue (the rails). */
.m0-mark .m0-m {
    color: var(--accent-primary);
}

/* The "0" — warm gold (the white-glove). The blue→gold pairing is
 * the m0 brand signature. */
.m0-mark .m0-zero {
    color: var(--accent-secondary);
}

/* ── Buttons ───────────────────────────────────────────────────── */

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 34px;
    background: var(--accent-gradient);
    color: var(--bg-base);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: 0.02em;
    border-radius: var(--radius-pill);
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 0 28px var(--accent-primary-glow), 0 2px 8px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 40px var(--accent-primary-glow), 0 4px 12px rgba(0, 0, 0, 0.4);
    color: var(--bg-base);
    filter: brightness(1.08);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 34px;
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: 0.02em;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-accent);
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    background: var(--bg-elevated);
    color: var(--text-primary);
}

/* ── Nav ───────────────────────────────────────────────────────── */

.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background-color: var(--bg-base);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    max-width: 1180px;
    margin: 0 auto;
    gap: 24px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.0625rem;
    letter-spacing: 0.04em;
}

.nav-brand:hover {
    color: var(--text-primary);
}

.nav-brand-text {
    line-height: 1;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-accent);
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.nav-cta:hover {
    border-color: var(--accent-primary);
    background: var(--bg-elevated);
    color: var(--accent-primary);
}

@media (max-width: 880px) {
    .nav-links {
        display: none;
    }
}

/* ── Hero ──────────────────────────────────────────────────────── */

.hero {
    padding: 140px 0 110px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* The radial glow behind the m0 mark — the "halo" that makes the
 * hero feel premium without a heavy image asset. */
.hero-glow {
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 720px;
    height: 720px;
    max-width: 120vw;
    background: radial-gradient(
        circle at center,
        var(--accent-primary-glow) 0%,
        transparent 62%
    );
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
    filter: blur(8px);
}

.hero-mark-row {
    display: flex;
    justify-content: center;
    margin-bottom: 36px;
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent-primary);
    padding: 7px 18px;
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-pill);
    margin-bottom: 32px;
    background: rgba(80, 144, 208, 0.06);
}

.hero-title {
    font-size: clamp(2.5rem, 7.5vw, 5rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.025em;
    margin-bottom: 26px;
    max-width: 940px;
    margin-left: auto;
    margin-right: auto;
}

.hero-title .accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1.0625rem, 2vw, 1.3125rem);
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.hero-pills {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    background: var(--bg-surface);
}

/* ── Promise ───────────────────────────────────────────────────── */

.promise {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.promise-statement {
    font-size: clamp(1.125rem, 2.2vw, 1.4375rem);
    color: var(--text-primary);
    line-height: 1.7;
    max-width: 880px;
    margin-bottom: 64px;
    font-weight: 400;
}

.promise-statement .accent {
    color: var(--accent-primary);
    font-weight: 500;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat {
    padding: 28px 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.stat:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

.stat-value {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--accent-primary);
    line-height: 1;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

/* ── Why — comparison table ────────────────────────────────────── */

.comparison-table {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 40px;
    background: var(--bg-surface);
}

.comparison-row {
    display: grid;
    grid-template-columns: 1.2fr 1.4fr 1.4fr;
    gap: 0;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-subtle);
    align-items: center;
}

.comparison-row:last-child {
    border-bottom: none;
}

.comparison-header {
    background: var(--bg-elevated);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 14px 24px;
}

.comparison-header > div {
    padding-right: 16px;
}

.comparison-alt {
    font-weight: 600;
    color: var(--text-primary);
    padding-right: 16px;
}

.comparison-row > div:nth-child(2) {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    padding-right: 16px;
}

.comparison-takes {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.comparison-monetic {
    background: rgba(80, 144, 208, 0.06);
    border-top: 1px solid var(--border-accent);
}

.comparison-monetic .comparison-alt {
    color: var(--accent-primary);
}

.comparison-monetic > div:nth-child(2) {
    color: var(--text-primary);
    font-weight: 600;
}

.comparison-monetic .comparison-takes {
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .comparison-row {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 16px 20px;
    }
    .comparison-header {
        display: none;
    }
    .comparison-row > div {
        padding-right: 0;
    }
    .comparison-alt::before {
        content: "— ";
        color: var(--text-muted);
    }
}

/* ── Why — ADR-018 boundary card ───────────────────────────────── */

.boundary-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.boundary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.boundary-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.boundary-tag {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--accent-primary);
    padding: 4px 12px;
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-pill);
}

.boundary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

@media (max-width: 768px) {
    .boundary-grid {
        grid-template-columns: 1fr;
    }
}

.boundary-col {
    padding: 20px;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--accent-primary);
}

.boundary-col-not {
    border-left-color: var(--accent-secondary);
}

.boundary-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.boundary-col ul,
.boundary-col-not ul {
    list-style: none;
    padding: 0;
}

.boundary-col li,
.boundary-col-not li {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    padding: 6px 0 6px 20px;
    position: relative;
    line-height: 1.5;
}

.boundary-col li::before {
    content: "+";
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: 700;
}

.boundary-col-not li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--accent-secondary);
    font-weight: 700;
}

.boundary-quote {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ── Capabilities ──────────────────────────────────────────────── */

.cap-domain {
    margin-bottom: 56px;
}

.cap-domain:last-child {
    margin-bottom: 0;
}

.cap-domain-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
    letter-spacing: 0.02em;
}

.cap-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.cap-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.cap-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 980px) {
    .cap-grid,
    .cap-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.cap-card {
    padding: 22px 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

.cap-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
    background: var(--bg-elevated);
}

.cap-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.cap-card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
}

.cap-card-detail {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* ── Status badge ──────────────────────────────────────────────── */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-subtle);
    white-space: nowrap;
    flex-shrink: 0;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-live {
    color: var(--status-success);
    border-color: rgba(16, 185, 129, 0.35);
}

.status-live .status-dot {
    background: var(--status-success);
    box-shadow: 0 0 6px var(--status-success);
}

.status-beta {
    color: var(--status-warning);
    border-color: rgba(212, 160, 74, 0.35);
}

.status-beta .status-dot {
    background: var(--status-warning);
}

.status-next {
    color: var(--status-info);
    border-color: rgba(80, 144, 208, 0.35);
}

.status-next .status-dot {
    background: var(--status-info);
}

/* ── Sovereignty ───────────────────────────────────────────────── */

.sovereignty {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.sovereignty-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 36px;
}

@media (max-width: 880px) {
    .sovereignty-grid {
        grid-template-columns: 1fr;
    }
}

.sov-card {
    padding: 28px 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.sov-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

.sov-card-featured {
    border-color: var(--border-accent);
    box-shadow: 0 0 24px rgba(80, 144, 208, 0.12);
}

.sov-card-head {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.sov-card-head > .vault-seal {
    flex-shrink: 0;
}

.sov-axis {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 3px 10px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    margin-bottom: 12px;
}

.sov-axis-active {
    color: var(--accent-primary);
    border-color: var(--border-accent);
    background: rgba(80, 144, 208, 0.08);
}

.sov-title {
    display: block;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sov-detail {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.sov-lives {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-body);
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
}

.gesture-callout {
    padding: 28px 32px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 32px rgba(80, 144, 208, 0.1);
}

.gesture-callout p {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ── Charter ───────────────────────────────────────────────────── */

.charter-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
}

.charter-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.charter-card-head-text {
    display: flex;
    align-items: center;
    gap: 16px;
}

.charter-card-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.charter-card-tag {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--accent-primary);
    padding: 4px 12px;
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-pill);
}

.aspects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

@media (max-width: 880px) {
    .aspects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.aspect {
    padding: 18px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    border-top: 2px solid var(--accent-primary);
}

.aspect-name {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.aspect-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.45;
}

/* ── Charter schematic (hub-and-spoke) ─────────────────────────── */

.charter-schematic-wrap {
    margin: 0 auto 48px;
    max-width: 460px;
    padding: 32px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    text-align: center;
}

.charter-schematic {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    aspect-ratio: 1;
}

.charter-schematic svg {
    width: 100%;
    height: 100%;
    display: block;
}

.charter-schematic-caption {
    margin-top: 18px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Spokes: track edges from the entity hub to each aspect node. */
.charter-spoke {
    stroke: var(--accent-primary);
    stroke-width: 1;
    stroke-linecap: round;
    opacity: 0.3;
}

/* Active spokes: two carry a gold route overlay (value flowing). */
.charter-spoke-active {
    stroke: var(--accent-secondary);
    opacity: 0.5;
    stroke-width: 1.5;
}

/* Aspect nodes: small hexagonal seals around the hub. */
.charter-node-body {
    fill: var(--bg-elevated);
    stroke: var(--accent-primary);
    stroke-width: 1.2;
    stroke-linejoin: round;
}

.charter-node-border {
    fill: none;
    stroke: var(--accent-primary);
    stroke-width: 0.8;
    stroke-linejoin: round;
    opacity: 0.5;
}

.charter-node-dot {
    fill: var(--accent-secondary);
}

/* The entity hub: the central sealed node (the programmatic interface). */
.charter-hub-body {
    fill: var(--bg-elevated);
    stroke: var(--accent-primary);
    stroke-width: 1.5;
    stroke-linejoin: round;
}

.charter-hub-border {
    fill: none;
    stroke: var(--accent-primary);
    stroke-width: 1;
    stroke-linejoin: round;
    opacity: 0.55;
}

.charter-hub-key {
    fill: none;
    stroke: var(--accent-secondary);
    stroke-width: 1.5;
}

.charter-hub-key-dot {
    fill: var(--accent-secondary);
}

/* ── Charter chain route (Operating → Holding → Personal) ──────── */

.charter-chain-wrap {
    margin-top: 32px;
    padding: 32px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--accent-secondary);
    border-radius: var(--radius-lg);
}

.charter-chain-head {
    margin-bottom: 20px;
}

.charter-chain-route {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

.charter-chain-route svg {
    width: 100%;
    height: auto;
    display: block;
}

.charter-chain-detail {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* Tracks: parallel rail lines between the nodes. */
.chain-track {
    stroke: var(--accent-primary);
    stroke-width: 1.5;
    stroke-linecap: round;
    opacity: 0.4;
}

/* Flow: the active gold route with directional arrows. */
.chain-flow {
    stroke: var(--accent-secondary);
    stroke-width: 2;
    stroke-linecap: round;
    opacity: 0.85;
}

.chain-flow-arrow {
    fill: var(--accent-secondary);
    opacity: 0.85;
}

/* Chain nodes: sealed hexagons (same visual language as the vault seal). */
.chain-node-body {
    fill: var(--bg-elevated);
    stroke: var(--accent-primary);
    stroke-width: 1.5;
    stroke-linejoin: round;
}

.chain-node-border {
    fill: none;
    stroke: var(--accent-primary);
    stroke-width: 1;
    stroke-linejoin: round;
    opacity: 0.55;
}

.chain-node-key {
    fill: none;
    stroke: var(--accent-secondary);
    stroke-width: 1.5;
}

.chain-node-dot {
    fill: var(--accent-secondary);
}

/* Labels below each chain node. */
.chain-label {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    fill: var(--text-primary);
    letter-spacing: 0.02em;
}

.chain-sublabel {
    font-family: var(--font-body);
    font-size: 10px;
    fill: var(--text-muted);
    letter-spacing: 0.02em;
}

@media (max-width: 560px) {
    .chain-label { font-size: 11px; }
    .chain-sublabel { font-size: 9px; }
}

/* ── AI ────────────────────────────────────────────────────────── */

.ai-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

@media (max-width: 880px) {
    .ai-grid {
        grid-template-columns: 1fr;
    }
}

.ai-card {
    padding: 32px 28px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.ai-card-featured {
    border-color: var(--border-accent);
    background: var(--bg-elevated);
    box-shadow: 0 0 24px rgba(80, 144, 208, 0.08);
}

.ai-card-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.ai-moat-intro {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-style: italic;
}

.ai-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ai-list li {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-left: 0;
}

.ai-bullet {
    color: var(--accent-primary);
    font-weight: 600;
}

.ai-moat-quote {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ── Segments ──────────────────────────────────────────────────── */

.segments-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 28px;
}

@media (max-width: 880px) {
    .segments-grid {
        grid-template-columns: 1fr;
    }
}

.segment-card {
    padding: 28px 26px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.segment-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

.segment-name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.segment-type {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin-bottom: 16px;
}

.segment-get {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 18px;
}

.segment-charter {
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.segment-charter-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.no-tier-note {
    padding: 24px 28px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--accent-primary);
    border-radius: var(--radius-md);
}

.no-tier-note p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ── Today & tomorrow ──────────────────────────────────────────── */

.today-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 28px;
}

@media (max-width: 880px) {
    .today-grid {
        grid-template-columns: 1fr;
    }
}

.today-card {
    padding: 28px 26px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.today-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.today-card-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.today-card-tag {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-subtle);
}

.today-card-tag-live {
    color: var(--status-success);
    border-color: rgba(16, 185, 129, 0.35);
}

.today-card-tag-flight {
    color: var(--status-warning);
    border-color: rgba(212, 160, 74, 0.35);
}

.today-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.today-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
    padding: 4px 0;
}

.today-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-top: 8px;
    flex-shrink: 0;
}

.today-dot-live {
    background: var(--status-success);
    box-shadow: 0 0 6px var(--status-success);
}

.today-dot-flight {
    background: var(--status-warning);
}

.frontier-callout {
    padding: 32px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 32px rgba(80, 144, 208, 0.1);
}

.frontier-title {
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 14px;
    letter-spacing: 0.02em;
}

.frontier-callout p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ── Closing ───────────────────────────────────────────────────── */

.closing {
    text-align: center;
    padding: 130px 0;
    position: relative;
    overflow: hidden;
}

.closing::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    max-width: 120vw;
    background: radial-gradient(
        circle at center,
        var(--accent-secondary-glow) 0%,
        transparent 60%
    );
    opacity: 0.18;
    pointer-events: none;
    z-index: 0;
    filter: blur(8px);
}

.closing-mark {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.closing-title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.closing-title .accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.closing-statement {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    max-width: 760px;
    margin: 0 auto 22px;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.closing-tagline {
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.closing-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* ── Footer ────────────────────────────────────────────────────── */

.footer {
    padding: 56px 0 48px;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    text-align: center;
}

.footer-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 14px;
}

.footer-name {
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.04em;
}

.footer-tagline {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--text-accent);
    font-weight: 500;
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

/* ── Legal pages (Terms / Privacy) ─────────────────────────────── */

.legal-page {
    position: relative;
    z-index: 1;
    padding: 48px 0 80px;
    min-height: 70vh;
}

.legal-container {
    max-width: 720px;
}

.legal-back {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-accent);
    margin-bottom: 28px;
}

.legal-header {
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-subtle);
}

.legal-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    margin-bottom: 12px;
}

.legal-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.legal-meta a {
    color: var(--text-accent);
}

.legal-body {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.legal-body .legal-lead {
    font-size: 1.0625rem;
    color: var(--text-primary);
    margin-bottom: 28px;
}

.legal-body h2 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 32px 0 12px;
    letter-spacing: 0.02em;
}

.legal-body h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 20px 0 8px;
}

.legal-body p {
    margin-bottom: 14px;
}

.legal-body ul {
    margin: 0 0 16px 1.25rem;
    padding: 0;
}

.legal-body li {
    margin-bottom: 8px;
}

.legal-body a {
    color: var(--text-accent);
}

.legal-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.legal-note {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ── Theme toggle (floating) ───────────────────────────────────── */

.theme-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 200;
    display: flex;
    gap: 8px;
    padding: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.theme-toggle-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.125rem;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    color: var(--text-primary);
    background: var(--bg-surface);
}

.theme-toggle-btn.active {
    color: var(--accent-primary);
    border-color: var(--border-accent);
    background: var(--bg-surface);
}

/* ── Motion preference ──────────────────────────────────────────── */

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