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

        :root {
            /* Dark theme (default) — Boundary Signal Palette */
            /* Background: Deep engineering navy */
            --bound-bg: #08111F;
            /* Surface: Cards and panels */
            --bound-surface: #101C2D;
            --bound-surface-2: #17263B;
            /* Text: Primary and secondary */
            --bound-text: #F8FAFC;
            --bound-text-muted: #94A3B8;
            --bound-text-slate: #64748b;
            --bound-heading: #F8FAFC;
            --bound-on-accent: #ffffff;
            /* Borders */
            --bound-border: rgba(255, 255, 255, 0.08);
            /* Primary Accent: Boundary Blue (#3B82F6) */
            --bound-accent: #3B82F6;
            /* Secondary Accent: Signal Cyan (#22D3EE) */
            --bound-cyan: #22D3EE;
            --bound-teal: #2DD4BF;
            /* Verification Accent: Amber (#F59E0B) */
            --brand-navy: #0B1F3A;
            --brand-orange: #F59E0B;
            /* UI Elements */
            --grid-color: rgba(59, 130, 246, 0.03);
            --card-bg: rgba(255, 255, 255, 0.03);
            --scrollbar-bg: #0a0e1a;
            --scrollbar-thumb: #1a2744;
            --scrollbar-thumb-hover: #3b82f6;
            --nav-shadow: rgba(0, 0, 0, 0.3);
            --hero-overlay: rgba(8, 17, 31, 0.85);
            /* Typography */
            --font-sans: 'InterLocal', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
            --font-mono: 'JetBrains Mono', 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
            /* Transitions */
            --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
            /* Compatibility aliases used by legacy component rules */
            --bound-dark: #08111F;
            --bound-navy: #101C2D;
            --bound-blue: #17263B;
            --bound-light: #F8FAFC;
            --bound-muted: #94A3B8;
            --bound-slate: #94A3B8;
        }

        [data-theme="light"] {
            /* Light theme — Boundary Signal Palette */
            /* Background */
            --bound-bg: #EDF2F7;
            /* Surface */
            --bound-surface: #F4F7FB;
            --bound-surface-2: #E5ECF4;
            /* Text */
            --bound-text: #0F172A;
            --bound-text-muted: #475569;
            --bound-text-slate: #64748b;
            --bound-heading: #0F172A;
            --bound-on-accent: #ffffff;
            /* Borders */
            --bound-border: rgba(15, 23, 42, 0.10);
            /* Primary Accent: Boundary Blue (#2563EB) */
            --bound-accent: #2563EB;
            /* Secondary Accent: Signal Cyan (#0891B2) */
            --bound-cyan: #0891B2;
            --bound-teal: #0F766E;
            /* Verification Accent: Amber (#D97706) */
            --brand-navy: #1E40AF;
            --brand-orange: #D97706;
            /* UI Elements */
            --grid-color: rgba(37, 99, 235, 0.035);
            --card-bg: rgba(255, 255, 255, 0.42);
            --scrollbar-bg: #E2E8F0;
            --scrollbar-thumb: #cbd5e1;
            --scrollbar-thumb-hover: #94a3b8;
            --nav-shadow: rgba(0, 0, 0, 0.1);
            --hero-overlay: rgba(237, 242, 247, 0.90);
            /* Compatibility aliases used by legacy component rules */
            --bound-dark: #ffffff;
            --bound-navy: #f8fafc;
            --bound-blue: #e2e8f0;
            --bound-light: #0f172a;
            --bound-muted: #475569;
            --bound-slate: #94A3B8;
        }

        html { scroll-behavior: smooth; }

        body {
            font-family: var(--font-sans);
            background: var(--bound-bg);
            color: var(--bound-text);
            line-height: 1.7;
            font-size: 16px;
            -webkit-font-smoothing: antialiased;
            overflow-x: hidden;
            transition: background-color var(--transition-base), color var(--transition-base);
        }

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

        ::-webkit-scrollbar { width: 8px; }
        ::-webkit-scrollbar-track { background: var(--scrollbar-bg); }
        ::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 4px; }
        ::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }

        .grid-bg {
            background-image:
                linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
                linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
            background-size: 60px 60px;
        }
        [data-theme="light"] .grid-bg {
            background-image:
                linear-gradient(rgba(37, 99, 235, 0.06) 1px, transparent 1px),
                linear-gradient(90deg, rgba(37, 99, 235, 0.06) 1px, transparent 1px);
        }

        /* ===== NAVIGATION ===== */
        .nav {
            position: fixed; top: 0; left: 0; right: 0; z-index: 100;
            backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
            background: var(--hero-overlay);
            border-bottom: 1px solid var(--bound-border);
            transition: var(--transition-base);
        }
        [data-theme="light"] .nav {
            background: rgba(237, 242, 247, 0.88);
            border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        }
        .nav.scrolled { box-shadow: 0 4px 30px var(--nav-shadow); background: var(--bound-surface); }
        .nav-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; justify-content: space-between; }
        .nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--bound-text); transition: color var(--transition-base); }
        .nav-brand:hover { color: var(--bound-cyan); }
        .nav-brand:hover .nav-mark svg path:first-child { filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.6)); }
        .nav-brand:hover .nav-mark svg path:last-child { filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6)); }
        .nav-mark { width: 30px; height: 30px; }
        .nav-title { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
        .nav-version { font-family: var(--font-mono); font-size: 11px; color: var(--bound-accent); margin-left: 4px; }
        .nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
        .nav-links a { color: var(--bound-muted); text-decoration: none; font-size: 14px; transition: color var(--transition-base); position: relative; }
        .nav-links a::after {
            content: '';
            position: absolute;
            bottom: -4px;
            left: 0;
            width: 0;
            height: 2px;
            background: linear-gradient(90deg, var(--bound-accent), var(--bound-cyan));
            transition: width var(--transition-base);
        }
        .nav-links a:hover::after, .nav-links a:focus::after { width: 100%; }
        .nav-links a:hover, .nav-links a:focus { color: var(--bound-accent); outline: none; }
        .nav-links a.active { color: var(--bound-accent); }
        .nav-links a.active::after { width: 100%; }
        .nav-links a:focus-visible { outline: 2px solid var(--bound-accent); outline-offset: 4px; border-radius: 2px; }
        .nav-cta { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.3); color: var(--bound-accent); font-size: 13px; text-decoration: none; transition: all var(--transition-base); }
        .nav-cta:hover { background: rgba(59, 130, 246, 0.15); box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2); }
        .nav-cta:focus-visible { outline: 2px solid var(--bound-accent); outline-offset: 2px; }
        .nav-lang { display: inline-flex; align-items: center; padding: 8px 12px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--bound-muted); text-decoration: none; transition: all var(--transition-base); border: 1px solid transparent; }
        .nav-lang:hover { color: var(--bound-accent); background: rgba(59, 130, 246, 0.08); border-color: rgba(59, 130, 246, 0.2); }
        .nav-lang:focus-visible { outline: 2px solid var(--bound-accent); outline-offset: 2px; }
        .nav-mobile-btn { display: none; background: none; border: none; color: var(--bound-text); cursor: pointer; padding: 8px; }
        .nav-mobile-btn:focus-visible { outline: 2px solid var(--bound-accent); outline-offset: 2px; }
        .nav-mobile-menu { display: none; position: fixed; top: 64px; left: 0; right: 0; background: rgba(10, 14, 26, 0.98); backdrop-filter: blur(20px); border-bottom: 1px solid rgba(255, 255, 255, 0.05); padding: 16px 24px; }
        [data-theme="light"] .nav-mobile-menu {
            background: rgba(237, 242, 247, 0.98);
            border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        }
        .nav-mobile-menu.open { display: block; }
        .nav-mobile-menu a { display: block; padding: 12px 0; color: var(--bound-muted); text-decoration: none; font-size: 15px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); position: relative; padding-left: 20px; transition: color var(--transition-base), padding-left var(--transition-base); }
        .nav-mobile-menu a::before {
            content: '';
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 3px;
            height: 0;
            background: linear-gradient(180deg, var(--bound-accent), var(--bound-cyan));
            transition: height var(--transition-base);
            border-radius: 2px;
        }
        .nav-mobile-menu a:hover::before { height: 20px; }
        .nav-mobile-menu a:hover { color: var(--bound-accent); padding-left: 24px; }
        [data-theme="light"] .nav-mobile-menu a { border-bottom: 1px solid rgba(0, 0, 0, 0.05); }
        @media (max-width: 900px) { .nav-links { display: none; } .nav-mobile-btn { display: block; } }

        /* ===== HERO ===== */
        .hero { min-height: 100vh; position: relative; overflow: hidden; padding: 96px 24px 80px; display: flex; align-items: center; justify-content: center; }
        #heroCanvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }
        
        /* Animated boundary grid background */
        .hero::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background-image: 
                linear-gradient(var(--grid-color) 1px, transparent 1px),
                linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
            background-size: 60px 60px;
            background-position: 0 0;
            opacity: 0.5;
            animation: gridMove 60s linear infinite;
            pointer-events: none;
            z-index: 0;
        }
        
        @keyframes gridMove {
            0% { background-position: 0 0; }
            100% { background-position: 60px 60px; }
        }
        
        /* Flowing signal lines */
        .hero::after {
            content: '';
            position: absolute;
            top: -50%; left: -50%; right: -50%; bottom: -50%;
            background: repeating-linear-gradient(
                45deg,
                transparent,
                transparent 100px,
                rgba(59, 130, 246, 0.03) 100px,
                rgba(59, 130, 246, 0.03) 101px
            );
            animation: signalFlow 30s linear infinite;
            pointer-events: none;
            z-index: 0;
        }
        
        @keyframes signalFlow {
            0% { transform: rotate(0deg) translateX(0); }
            100% { transform: rotate(0deg) translateX(100px); }
        }
        
        [data-theme="light"] .hero::after {
            background: repeating-linear-gradient(
                45deg,
                transparent,
                transparent 100px,
                rgba(37, 99, 235, 0.04) 100px,
                rgba(37, 99, 235, 0.04) 101px
            );
        }
        
        .hero-overlay {
            position: absolute; inset: 0; z-index: 1; pointer-events: none;
            background:
                radial-gradient(ellipse at 30% 20%, var(--hero-overlay) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 80%, var(--hero-overlay) 0%, transparent 60%),
                linear-gradient(180deg, var(--hero-overlay) 0%, var(--hero-overlay) 100%);
        }
        [data-theme="light"] .hero-overlay {
            background:
                radial-gradient(ellipse at 30% 20%, rgba(237, 242, 247, 0.30) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 80%, rgba(237, 242, 247, 0.38) 0%, transparent 60%),
                linear-gradient(180deg, rgba(237, 242, 247, 0.20) 0%, rgba(237, 242, 247, 0.62) 100%);
        }
        .hero-content { max-width: 940px; text-align: center; position: relative; z-index: 2; }

        /* ===== INTERACTIVE BOUND MARK ===== */
        .hero-mark { margin-bottom: 28px; }
        .mark-btn {
            background: none; border: none; cursor: pointer; padding: 14px 18px;
            border-radius: 18px; display: inline-block;
            transition: background var(--transition-base);
        }
        .mark-btn:hover { background: rgba(59, 130, 246, 0.05); }
        .mark-btn:focus-visible { outline: 2px solid var(--bound-cyan); outline-offset: 4px; }
        .mark-scene {
            position: relative; display: inline-flex; align-items: center;
            gap: 0; transform-style: preserve-3d; will-change: transform;
        }
        .mark-half { display: block; will-change: transform; transition: filter 0.4s ease; }
        .mark-half svg { display: block; width: clamp(64px, 9vw, 96px); height: clamp(64px, 9vw, 96px); }
        .mark-half-left { filter: drop-shadow(0 0 18px rgba(59, 130, 246, 0.35)); }
        .mark-half-right { filter: drop-shadow(0 0 18px rgba(245, 158, 11, 0.35)); }
        .mark-btn:hover .mark-half-left { filter: drop-shadow(0 0 26px rgba(59, 130, 246, 0.6)); }
        .mark-btn:hover .mark-half-right { filter: drop-shadow(0 0 26px rgba(245, 158, 11, 0.6)); }

        .mark-beam {
            position: relative; width: 16px; align-self: stretch; margin: 8px 3px;
            display: flex; align-items: center; justify-content: center;
        }
        .mark-beam::before {
            content: ''; position: absolute; top: 6%; bottom: 6%; left: 50%;
            width: 2px; transform: translateX(-50%);
            background: linear-gradient(180deg, transparent, rgba(34, 211, 238, 0.7), transparent);
            opacity: 0.45; transition: opacity 0.4s ease, box-shadow 0.4s ease;
        }
        .mark-btn:hover .mark-beam::before, .mark-beam.active::before { opacity: 1; box-shadow: 0 0 14px rgba(34, 211, 238, 0.55); }
        .mark-beam.verified::before { background: linear-gradient(180deg, transparent, rgba(34, 211, 238, 1), transparent); box-shadow: 0 0 22px rgba(34, 211, 238, 0.8); }

        .beam-particle {
            position: absolute; width: 4px; height: 4px; border-radius: 50%;
            background: var(--bound-cyan); left: -2px; opacity: 0;
            animation: beamFlow 1.8s linear infinite;
        }
        .beam-particle:nth-child(2) { animation-delay: 0.6s; }
        .beam-particle:nth-child(3) { animation-delay: 1.2s; }
        @keyframes beamFlow {
            0% { transform: translateX(0); opacity: 0; }
            15% { opacity: 0.9; }
            85% { opacity: 0.9; }
            100% { transform: translateX(20px); opacity: 0; }
        }

        .mark-packet {
            position: absolute; top: 50%; left: 8%; width: 10px; height: 10px;
            margin-top: -5px; border-radius: 3px; background: var(--bound-cyan);
            box-shadow: 0 0 12px rgba(34, 211, 238, 0.9); z-index: 3; opacity: 0;
        }
        .mark-packet.run { animation: packetCross 0.65s cubic-bezier(0.5, 0, 0.3, 1) forwards; }
        @keyframes packetCross {
            0% { left: 10%; opacity: 0; transform: scale(0.7); }
            12% { opacity: 1; transform: scale(1); }
            88% { opacity: 1; }
            100% { left: 88%; opacity: 0; transform: scale(0.7); }
        }

        .mark-ring {
            position: absolute; top: 50%; left: 50%; width: 12px; height: 12px;
            margin: -6px 0 0 -6px; border-radius: 50%;
            border: 2px solid rgba(20, 184, 166, 0.8); z-index: 2;
            animation: ringExpand 0.8s ease-out forwards; pointer-events: none;
        }
        @keyframes ringExpand {
            0% { transform: scale(1); opacity: 0.9; }
            100% { transform: scale(14); opacity: 0; }
        }

        .mark-caption {
            margin-top: 14px; font-family: var(--font-mono); font-size: 11px;
            letter-spacing: 0.14em; color: var(--bound-slate); text-transform: uppercase;
            display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap;
        }
        .mark-caption .cap-blue { color: var(--bound-accent); }
        .mark-caption .cap-orange { color: var(--brand-orange); }
        .mark-caption .cap-cyan { color: var(--bound-cyan); }

        /* ===== HERO TEXT ===== */
        .hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 999px; background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.2); font-family: var(--font-mono); font-size: 12px; color: var(--bound-accent); margin-bottom: 28px; animation: fadeInDown 0.8s ease-out; }
        .hero-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--bound-cyan); animation: pulse 2s infinite; }
        @keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.3); } }
        @keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
        
        .hero-title { font-size: clamp(40px, 7vw, 80px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 16px; text-shadow: 0 0 60px var(--bound-accent), 0 0 120px var(--bound-cyan); animation: fadeInUp 1s ease-out 0.2s both; position: relative; }
        .hero-title::after {
            content: '';
            position: absolute;
            bottom: -8px;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 3px;
            background: linear-gradient(90deg, transparent, var(--bound-accent), var(--bound-cyan), transparent);
            animation: titleUnderline 1.5s ease-out 0.8s forwards;
        }
        @keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
        @keyframes titleUnderline { to { width: 80%; } }
        
        .hero-subtitle { font-size: clamp(18px, 2.5vw, 28px); font-weight: 400; color: var(--bound-muted); margin-bottom: 24px; letter-spacing: 0.02em; animation: fadeInUp 1s ease-out 0.4s both; }
        .hero-description { font-size: 17px; color: var(--bound-slate); max-width: 680px; margin: 0 auto 36px; line-height: 1.8; animation: fadeInUp 1s ease-out 0.6s both; }
        .hero-principle { font-size: clamp(16px, 2vw, 20px); font-weight: 500; background: linear-gradient(135deg, var(--bound-accent), var(--bound-cyan), var(--bound-teal)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 36px; letter-spacing: 0.01em; animation: fadeInUp 1s ease-out 0.8s both; background-size: 200% 200%; animation: fadeInUp 1s ease-out 0.8s both, gradientShift 8s ease infinite; }
        @keyframes gradientShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
        .hero-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 44px; }
        .hero-tag { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 11px; font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.05em; }
        .tag-blue { background: rgba(59, 130, 246, 0.1); color: var(--bound-accent); border: 1px solid rgba(59, 130, 246, 0.2); }
        .tag-cyan { background: rgba(34, 211, 238, 0.1); color: var(--bound-cyan); border: 1px solid rgba(34, 211, 238, 0.2); }
        .tag-teal { background: rgba(20, 184, 166, 0.1); color: var(--bound-teal); border: 1px solid rgba(20, 184, 166, 0.2); }
        .tag-purple { background: rgba(245, 158, 11, 0.1); color: var(--brand-orange); border: 1px solid rgba(245, 158, 11, 0.2); }
        .hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; animation: fadeInUp 1s ease-out 1s both; }
        .btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; border-radius: 10px; font-size: 14px; font-weight: 500; text-decoration: none; transition: all var(--transition-base); cursor: pointer; border: none; position: relative; overflow: hidden; }
        .btn::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.2);
            transform: translate(-50%, -50%);
            transition: width 0.6s, height 0.6s;
        }
        .btn:hover::before { width: 300px; height: 300px; }
        .btn:focus-visible { outline: 2px solid var(--bound-accent); outline-offset: 2px; }
        .btn-primary { background: linear-gradient(135deg, var(--bound-accent), var(--bound-cyan)); color: var(--bound-on-accent); }
        .btn-primary:hover { box-shadow: 0 8px 30px rgba(59, 130, 246, 0.3); transform: translateY(-2px); }
        .btn-secondary { background: transparent; border: 1px solid var(--bound-border); color: var(--bound-text); }
        .btn-secondary:hover { background: var(--bound-border); border-color: var(--bound-accent); }
        .hero-interaction-hint { position: absolute; bottom: 78px; left: 50%; transform: translateX(-50%); font-family: var(--font-mono); font-size: 11px; color: var(--bound-slate); z-index: 3; pointer-events: none; opacity: 0.65; display: flex; align-items: center; gap: 8px; white-space: nowrap; animation: fadeIn 1s ease-out 1.2s both; }
        @keyframes fadeIn { from { opacity: 0; } to { opacity: 0.65; } }
        .scroll-indicator { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); animation: scrollBounce 2s infinite; z-index: 3; }
        @keyframes scrollBounce { 0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; } 50% { transform: translateX(-50%) translateY(8px); opacity: 0.4; } }

        /* ===== SECTIONS ===== */
        .section { padding: 96px 24px; position: relative; }
        .section-alt { background: linear-gradient(180deg, var(--bound-bg) 0%, var(--bound-surface) 100%); }
        .container { max-width: 1100px; margin: 0 auto; }
        .container-narrow { max-width: 800px; margin: 0 auto; }
        .section-label { font-family: var(--font-mono); font-size: 12px; color: var(--bound-accent); letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 12px; }
        .section-title { font-size: clamp(32px, 4vw, 48px); font-weight: 700; color: var(--bound-heading); margin-bottom: 16px; letter-spacing: -0.02em; line-height: 1.2; }
        .section-subtitle { font-size: 18px; color: var(--bound-muted); max-width: 600px; margin-bottom: 48px; }
        .section-divider { width: 60px; height: 3px; background: linear-gradient(90deg, var(--bound-accent), var(--bound-cyan)); border-radius: 2px; margin-bottom: 48px; }

        figure { margin: 48px 0; }
        figcaption { font-family: var(--font-mono); font-size: 13px; color: var(--bound-slate); margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--bound-border); }
        figcaption strong { color: var(--bound-muted); }

        .core-model { display: flex; align-items: stretch; gap: 0; padding: 40px 20px; background: var(--card-bg); border: 1px solid var(--bound-border); border-radius: 16px; overflow-x: auto; }
        .core-stage { flex: 1; min-width: 200px; padding: 24px; text-align: center; position: relative; }
        .core-stage:not(:last-child)::after { content: ''; position: absolute; right: -12px; top: 50%; transform: translateY(-50%); width: 24px; height: 2px; background: linear-gradient(90deg, var(--bound-accent), var(--bound-cyan)); }
        .core-stage-icon { width: 56px; height: 56px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 24px; }
        .stage-1 .core-stage-icon { background: rgba(59, 130, 246, 0.15); color: var(--bound-accent); }
        .stage-2 .core-stage-icon { background: rgba(34, 211, 238, 0.15); color: var(--bound-cyan); }
        .stage-3 .core-stage-icon { background: rgba(20, 184, 166, 0.15); color: var(--bound-teal); }
        .stage-4 .core-stage-icon { background: rgba(245, 158, 11, 0.15); color: var(--brand-orange); }
        .core-stage-title { font-size: 16px; font-weight: 600; color: var(--bound-heading); margin-bottom: 8px; }
        .core-stage-desc { font-size: 13px; color: var(--bound-slate); line-height: 1.5; }

        .parallel-diagram { padding: 40px; background: var(--card-bg); border: 1px solid var(--bound-border); border-radius: 16px; }
        .parallel-teams { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
        .parallel-team { padding: 20px; background: var(--card-bg); border: 1px solid var(--bound-border); border-radius: 12px; text-align: center; }
        .parallel-team-name { font-size: 14px; font-weight: 600; color: var(--bound-heading); margin-bottom: 4px; }
        .parallel-team-role { font-size: 12px; color: var(--bound-slate); }
        .parallel-contracts { display: flex; justify-content: center; gap: 16px; margin: 24px 0; flex-wrap: wrap; }
        .parallel-contract { padding: 12px 20px; background: rgba(34, 211, 238, 0.08); border: 1px solid rgba(34, 211, 238, 0.2); border-radius: 8px; font-size: 12px; color: var(--bound-cyan); font-family: var(--font-mono); }
        .parallel-verification { text-align: center; padding: 16px; background: rgba(20, 184, 166, 0.08); border: 1px solid rgba(20, 184, 166, 0.2); border-radius: 8px; font-size: 13px; color: var(--bound-teal); }

        .lifecycle { position: relative; padding: 20px 0; }
        .lifecycle-group { margin-bottom: 40px; }
        .lifecycle-group-label { font-family: var(--font-mono); font-size: 11px; color: var(--bound-accent); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 16px; padding-left: 20px; border-left: 3px solid var(--bound-accent); }
        .lifecycle-phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
        .lifecycle-phase { padding: 20px; background: var(--card-bg); border: 1px solid var(--bound-border); border-radius: 12px; cursor: pointer; transition: all var(--transition-base); position: relative; text-align: left; width: 100%; font-family: var(--font-sans); }
        .lifecycle-phase:hover, .lifecycle-phase:focus { background: rgba(59, 130, 246, 0.08); border-color: rgba(59, 130, 246, 0.3); transform: translateY(-2px); }
        .lifecycle-phase:focus-visible { outline: 2px solid var(--bound-accent); outline-offset: 2px; }
        .lifecycle-phase.active { background: rgba(59, 130, 246, 0.1); border-color: var(--bound-accent); }
        .lifecycle-phase-number { font-family: var(--font-mono); font-size: 11px; color: var(--bound-accent); margin-bottom: 8px; }
        .lifecycle-phase-title { font-size: 16px; font-weight: 600; color: var(--bound-heading); margin-bottom: 8px; }
        .lifecycle-phase-desc { font-size: 13px; color: var(--bound-slate); line-height: 1.6; }
        .lifecycle-phase-detail { max-height: 0; overflow: hidden; transition: max-height var(--transition-slow); }
        .lifecycle-phase.active .lifecycle-phase-detail { max-height: 500px; }
        .lifecycle-phase-detail-inner { padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--bound-border); font-size: 13px; color: var(--bound-muted); line-height: 1.7; }
        .lifecycle-annotation { text-align: center; padding: 16px; background: rgba(34, 211, 238, 0.05); border: 1px dashed rgba(34, 211, 238, 0.2); border-radius: 8px; font-size: 13px; color: var(--bound-cyan); margin-top: 24px; }

        .verification-loop { padding: 40px; background: var(--card-bg); border: 1px solid var(--bound-border); border-radius: 16px; }
        .verification-flow { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
        .verification-node { padding: 20px 24px; background: var(--card-bg); border: 1px solid var(--bound-border); border-radius: 12px; text-align: center; min-width: 140px; }
        .verification-node-title { font-size: 14px; font-weight: 600; color: var(--bound-heading); margin-bottom: 4px; }
        .verification-node-desc { font-size: 12px; color: var(--bound-slate); }
        .verification-arrow { color: var(--bound-accent); font-size: 20px; }
        .verification-outcomes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
        .verification-outcome { padding: 20px; border-radius: 12px; }
        .outcome-pass { background: rgba(20, 184, 166, 0.08); border: 1px solid rgba(20, 184, 166, 0.2); }
        .outcome-fail { background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.2); }
        .outcome-label { font-family: var(--font-mono); font-size: 12px; font-weight: 600; margin-bottom: 8px; }
        .outcome-pass .outcome-label { color: var(--bound-teal); }
        .outcome-fail .outcome-label { color: #ef4444; }
        .outcome-text { font-size: 13px; color: var(--bound-muted); line-height: 1.6; }

        .ifem-bound { padding: 40px; background: var(--card-bg); border: 1px solid var(--bound-border); border-radius: 16px; }
        .ifem-row, .bound-row { padding: 24px; border-radius: 12px; margin-bottom: 16px; }
        .ifem-row { background: rgba(148, 163, 184, 0.05); border: 1px solid rgba(148, 163, 184, 0.15); }
        .bound-row { background: rgba(59, 130, 246, 0.08); border: 1px solid rgba(59, 130, 246, 0.2); }
        .ifem-row-label, .bound-row-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 12px; }
        .ifem-row-label { color: var(--bound-slate); }
        .bound-row-label { color: var(--bound-accent); }
        .ifem-row-title, .bound-row-title { font-size: 18px; font-weight: 600; color: var(--bound-heading); margin-bottom: 12px; }
        .methodology-flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 13px; }
        .methodology-step { padding: 6px 12px; background: var(--bound-border); border-radius: 6px; color: var(--bound-text); }
        .methodology-arrow { color: var(--bound-slate); }
        .ifem-caption, .bound-caption { font-size: 13px; color: var(--bound-slate); margin-top: 12px; font-style: italic; }
        .refinement-arrow { text-align: center; padding: 16px; color: var(--bound-accent); font-size: 14px; }
        .refinement-label { font-family: var(--font-mono); font-size: 12px; color: var(--bound-muted); }

        .arch-layers { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-bottom: 24px; }
        .arch-layer { padding: 28px; border-radius: 16px; position: relative; overflow: hidden; }
        .arch-layer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; }
        .layer-1 { background: rgba(59, 130, 246, 0.05); border: 1px solid rgba(59, 130, 246, 0.15); }
        .layer-1::before { background: linear-gradient(90deg, transparent, var(--bound-accent), transparent); }
        .layer-2 { background: rgba(34, 211, 238, 0.05); border: 1px solid rgba(34, 211, 238, 0.15); }
        .layer-2::before { background: linear-gradient(90deg, transparent, var(--bound-cyan), transparent); }
        .layer-3 { background: rgba(20, 184, 166, 0.05); border: 1px solid rgba(20, 184, 166, 0.15); }
        .layer-3::before { background: linear-gradient(90deg, transparent, var(--bound-teal), transparent); }
        .arch-layer-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; margin-bottom: 12px; }
        .layer-1 .arch-layer-label { color: var(--bound-accent); }
        .layer-2 .arch-layer-label { color: var(--bound-cyan); }
        .layer-3 .arch-layer-label { color: var(--bound-teal); }
        .arch-layer-title { font-size: 22px; font-weight: 700; color: var(--bound-heading); margin-bottom: 16px; }
        .arch-layer-question { font-size: 15px; color: var(--bound-text); font-weight: 500; margin-bottom: 12px; font-style: italic; }
        .arch-layer-desc { font-size: 14px; color: var(--bound-slate); line-height: 1.7; margin-bottom: 16px; }
        .arch-layer-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
        .arch-layer-list li { font-size: 13px; color: var(--bound-muted); display: flex; align-items: center; gap: 8px; }
        .arch-layer-list li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
        .layer-1 .arch-layer-list li::before { background: var(--bound-accent); }
        .layer-2 .arch-layer-list li::before { background: var(--bound-cyan); }
        .layer-3 .arch-layer-list li::before { background: var(--bound-teal); }
        .arch-note { padding: 20px; background: rgba(59, 130, 246, 0.05); border-left: 3px solid var(--bound-accent); border-radius: 0 8px 8px 0; font-size: 14px; color: var(--bound-muted); line-height: 1.7; }

        .principles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
        .principle-card { padding: 28px; background: var(--card-bg); border: 1px solid var(--bound-border); border-radius: 16px; transition: all var(--transition-base); }
        .principle-card:hover { transform: translateY(-4px); box-shadow: 0 20px 60px rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.2); }
        .principle-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; font-size: 20px; }
        .principle-title { font-size: 17px; font-weight: 600; color: var(--bound-heading); margin-bottom: 12px; }
        .principle-desc { font-size: 14px; color: var(--bound-slate); line-height: 1.7; }

        .contract-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 24px; }
        .contract-type { padding: 16px; background: var(--card-bg); border: 1px solid var(--bound-border); border-radius: 10px; font-size: 13px; color: var(--bound-muted); }
        .contract-type strong { display: block; color: var(--bound-text); margin-bottom: 4px; font-size: 14px; }

        .practice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 32px; }
        .practice-card { padding: 28px; border-radius: 16px; }
        .practice-fit { background: rgba(20, 184, 166, 0.05); border: 1px solid rgba(20, 184, 166, 0.15); }
        .practice-explore { background: rgba(239, 68, 68, 0.05); border: 1px solid rgba(239, 68, 68, 0.15); }
        .practice-card-title { font-size: 16px; font-weight: 600; color: var(--bound-heading); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
        .practice-fit .practice-card-title { color: var(--bound-teal); }
        .practice-explore .practice-card-title { color: #ef4444; }
        .practice-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
        .practice-list li { font-size: 14px; color: var(--bound-muted); padding-left: 20px; position: relative; line-height: 1.6; }
        .practice-list li::before { content: ''; position: absolute; left: 0; top: 8px; width: 8px; height: 8px; border-radius: 50%; }
        .practice-fit .practice-list li::before { background: var(--bound-teal); }
        .practice-explore .practice-list li::before { background: #ef4444; }
        @media (max-width: 700px) { .practice-grid { grid-template-columns: 1fr; } }

        .accordion { display: flex; flex-direction: column; gap: 12px; }
        .accordion-item { background: var(--card-bg); border: 1px solid var(--bound-border); border-radius: 12px; overflow: hidden; }
        .accordion-trigger { width: 100%; padding: 20px 24px; background: none; border: none; color: var(--bound-heading); font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; transition: background var(--transition-base); font-family: var(--font-sans); }
        .accordion-trigger:hover { background: var(--card-bg); }
        .accordion-trigger:focus-visible { outline: 2px solid var(--bound-accent); outline-offset: -2px; }
        .accordion-icon { font-size: 20px; color: var(--bound-accent); transition: transform var(--transition-base); flex-shrink: 0; }
        .accordion-trigger[aria-expanded="true"] .accordion-icon { transform: rotate(45deg); }
        .accordion-panel { max-height: 0; overflow: hidden; transition: max-height var(--transition-slow); }
        .accordion-panel.open { max-height: 1000px; }
        .accordion-content { padding: 0 24px 24px; font-size: 14px; color: var(--bound-muted); line-height: 1.8; }
        .accordion-content p { margin-bottom: 12px; }
        .accordion-content strong { color: var(--bound-text); }

        .references-list { display: flex; flex-direction: column; gap: 12px; }
        .reference { padding: 16px 20px; background: var(--card-bg); border: 1px solid var(--bound-border); border-radius: 10px; transition: border-color var(--transition-base); }
        .reference:hover { border-color: rgba(59, 130, 246, 0.2); }
        .reference-cite { font-family: var(--font-mono); font-size: 12px; color: var(--bound-accent); margin-bottom: 4px; }
        .reference-title { font-size: 14px; color: var(--bound-text); margin-bottom: 4px; }
        .reference-source { font-size: 13px; color: var(--bound-slate); }
        .reference-type { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-family: var(--font-mono); margin-top: 8px; background: rgba(59, 130, 246, 0.1); color: var(--bound-accent); }

        .pub-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 32px; }
        .pub-action { display: flex; align-items: center; gap: 12px; padding: 16px 20px; background: var(--card-bg); border: 1px solid var(--bound-border); border-radius: 10px; text-decoration: none; color: var(--bound-text); transition: all var(--transition-base); }
        .pub-action:hover { background: rgba(59, 130, 246, 0.08); border-color: rgba(59, 130, 246, 0.3); transform: translateY(-2px); }
        .pub-action:focus-visible { outline: 2px solid var(--bound-accent); outline-offset: 2px; }
        .pub-action-icon { width: 36px; height: 36px; border-radius: 8px; background: rgba(59, 130, 246, 0.1); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
        .pub-action-text { font-size: 13px; font-weight: 500; }
        .pub-action-sub { font-size: 11px; color: var(--bound-slate); margin-top: 2px; }

        .conclusion-box { padding: 40px; background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(34, 211, 238, 0.05)); border: 1px solid rgba(59, 130, 246, 0.2); border-radius: 20px; text-align: center; }
        .conclusion-imperatives { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 32px; }
        .imperative { padding: 20px; }
        .imperative-number { font-size: 32px; font-weight: 700; background: linear-gradient(135deg, var(--bound-accent), var(--bound-cyan)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 8px; }
        .imperative-text { font-size: 14px; color: var(--bound-text); font-weight: 500; line-height: 1.4; }
        @media (max-width: 700px) { .conclusion-imperatives { grid-template-columns: repeat(2, 1fr); } }

        .quote-block { padding: 32px; border-left: 4px solid var(--bound-cyan); background: rgba(34, 211, 238, 0.03); border-radius: 0 12px 12px 0; margin: 32px 0; }
        .quote-text { font-size: 20px; color: var(--bound-heading); font-weight: 500; line-height: 1.6; margin-bottom: 12px; }
        .quote-attr { font-size: 13px; color: var(--bound-slate); font-family: var(--font-mono); }

        .footer { padding: 48px 24px; border-top: 1px solid var(--bound-border); background: var(--bound-bg); }
        .footer-inner { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
        .footer-brand { display: flex; align-items: center; gap: 12px; }
        .footer-author { font-size: 13px; color: var(--bound-muted); text-align: right; }
        .footer-author a { color: var(--bound-accent); text-decoration: none; }
        .footer-author a:hover { text-decoration: underline; }
        .footer-copy { max-width: 1100px; margin: 24px auto 0; padding-top: 24px; border-top: 1px solid var(--bound-border); font-size: 12px; color: var(--bound-slate); text-align: center; line-height: 1.6; }

        .reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
        .reveal.visible { opacity: 1; transform: translateY(0); }

        @media (max-width: 768px) {
            .section { padding: 64px 20px; }
            .core-model { flex-direction: column; }
            .core-stage:not(:last-child)::after { right: 50%; top: auto; bottom: -12px; transform: translateX(50%) rotate(90deg); width: 24px; }
            .parallel-teams { grid-template-columns: 1fr; }
            .verification-outcomes { grid-template-columns: 1fr; }
            .arch-layers { grid-template-columns: 1fr; }
            .principles-grid { grid-template-columns: 1fr; }
            .hero-interaction-hint { display: none; }
        }


/* BOUND v3.0 — Boundary Signal Design System Refinement */
/* Typography: Embedded fonts for English and Persian editions */

/* Inter (English) - Professional technical font */
@font-face { font-family: 'InterLocal'; src: url('./fonts/inter-400.ttf') format('truetype'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: 'InterLocal'; src: url('./fonts/inter-500.ttf') format('truetype'); font-style: normal; font-weight: 500; font-display: swap; }
@font-face { font-family: 'InterLocal'; src: url('./fonts/inter-600.ttf') format('truetype'); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: 'InterLocal'; src: url('./fonts/inter-700.ttf') format('truetype'); font-style: normal; font-weight: 700; font-display: swap; }

/* Vazirmatn (Persian) - Professional engineering publication font */
/* Used for both body text and headings with different weights */
@font-face { font-family: 'VazirmatnLocal'; src: url('./fonts/vazirmatn-400.ttf') format('truetype'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: 'VazirmatnLocal'; src: url('./fonts/vazirmatn-500.ttf') format('truetype'); font-style: normal; font-weight: 500; font-display: swap; }
@font-face { font-family: 'VazirmatnLocal'; src: url('./fonts/vazirmatn-600.ttf') format('truetype'); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: 'VazirmatnLocal'; src: url('./fonts/vazirmatn-700.ttf') format('truetype'); font-style: normal; font-weight: 700; font-display: swap; }

/* Design Tokens - Semantic Color Variables */
:root {
    /* Semantic color tokens */
    --bound-warning: #F59E0B;   /* Verification accent - Amber */
    --bound-danger: #DC2626;    /* Error states */
    --bound-focus: #22D3EE;     /* Focus state - Signal Cyan */
    
    /* Typography system - Language-aware font stacks */
    /* English: Inter for professional technical publication style */
    --font-en: 'InterLocal', 'Inter', system-ui, sans-serif;
    /* Persian: Vazirmatn for body and headings (modern, professional) */
    --font-fa-body: 'Yekan', 'VazirmatnLocal', 'Vazirmatn', Tahoma, sans-serif;
    --font-fa-heading: 'VazirmatnLocal', 'Vazirmatn', Tahoma, sans-serif;
}

/* Language-aware typography */
html[lang="en"] body { font-family: var(--font-en); }
html[lang="fa"] body { font-family: var(--font-fa-body); }
html[lang="fa"] h1, html[lang="fa"] h2, html[lang="fa"] h3, html[lang="fa"] h4, 
html[lang="fa"] .hero-title, html[lang="fa"] .section-title { 
    font-family: var(--font-fa-heading); 
    font-weight: 700; 
}

/* Accessibility: Focus states */
:focus-visible { outline: 3px solid var(--bound-focus); outline-offset: 3px; }

/* Selection styling */
::selection { background: var(--bound-accent); color: var(--bound-on-accent); }

/* Button styling using design tokens */
.btn-primary, .nav-cta { background-color: var(--bound-accent); border-color: var(--bound-accent); }
.btn-primary:hover, .nav-cta:hover { 
    background-color: var(--bound-accent); 
    box-shadow: 0 8px 24px rgba(59,130,246,.24); 
}

/* Hero styling */
.hero-title { text-shadow: 0 0 48px rgba(59,130,246,.18); }
.hero-principle { background: linear-gradient(135deg, var(--bound-accent), var(--bound-cyan)); }

/* Verification accent (Amber) for stage-4 and purple-tagged elements */
.tag-purple, .stage-4 .core-stage-icon { 
    background: rgba(245,158,11,.12); 
    color: var(--bound-warning); 
    border-color: rgba(245,158,11,.28); 
}

/* Error/fail states */
.outcome-fail, .practice-explore { 
    background: rgba(220,38,38,.06); 
    border-color: rgba(220,38,38,.22); 
}
.outcome-fail .outcome-label, .practice-explore .practice-card-title { 
    color: var(--bound-danger); 
}
.practice-explore .practice-list li::before { background: var(--bound-danger); }

/* Light mode refinements */
[data-theme="light"] { 
    --bound-text-muted: #334155; 
    --bound-text-slate: #475569; 
    --bound-muted: #475569; 
    --bound-slate: #475569; 
    --hero-overlay: rgba(248,250,252,.88); 
}
[data-theme="light"] .hero-title { color: var(--bound-heading); text-shadow: none; }
[data-theme="light"] .hero-subtitle, [data-theme="light"] .hero-description { color: var(--bound-text-muted); }
[data-theme="light"] .hero-overlay { background: linear-gradient(180deg, rgba(248,250,252,.62) 0%, rgba(248,250,252,.88) 100%); }


/* ========================================================================== */
/* BOUND visual refinement pass — softer technical dark + composed hero        */
/* ========================================================================== */
@font-face { font-family:'TitrLocal'; src:url('./fonts/titr.ttf') format('truetype'); font-style:normal; font-weight:700; font-display:swap; }
@font-face { font-family:'KoodakLocal'; src:url('./fonts/koodak.ttf') format('truetype'); font-style:normal; font-weight:400; font-display:swap; }

:root {
    --bound-bg: #101827;
    --bound-surface: #172238;
    --bound-surface-2: #21324C;
    --bound-text: #E8EDF3;
    --bound-heading: #F2F5F8;
    --bound-text-muted: #A7B3C4;
    --bound-text-slate: #7D8A9D;
    --bound-muted: #A7B3C4;
    --bound-slate: #7D8A9D;
    --bound-border: rgba(146, 166, 194, 0.16);
    --bound-accent: #4B8EF7;
    --bound-cyan: #4FB3C8;
    --bound-teal: #5AAE8A;
    --brand-orange: #D4A24C;
    --bound-warning: #D4A24C;
    --bound-focus: #65C4D6;
    --grid-color: rgba(79, 179, 200, 0.026);
    --card-bg: rgba(255,255,255,0.045);
    --scrollbar-bg: #101827;
    --scrollbar-thumb: #31445F;
    --scrollbar-thumb-hover: #4B8EF7;
    --nav-shadow: rgba(3, 8, 18, 0.26);
    --hero-overlay: rgba(16, 24, 39, 0.68);
    --bound-dark: #101827;
    --bound-navy: #172238;
    --bound-blue: #21324C;
    --bound-light: #E8EDF3;
    --font-fa-body: 'KoodakLocal', 'VazirmatnLocal', Tahoma, sans-serif;
    --font-fa-heading: 'TitrLocal', 'KoodakLocal', 'VazirmatnLocal', Tahoma, sans-serif;
}

body { background-color: var(--bound-bg); }
.grid-bg {
    background-image:
        linear-gradient(rgba(79,179,200,.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79,179,200,.022) 1px, transparent 1px);
    background-size: 68px 68px;
}
.nav { background: rgba(16,24,39,.84); }
.nav.scrolled { background: rgba(23,34,56,.96); }
.nav-cta { background: rgba(75,142,247,.11); border-color: rgba(75,142,247,.30); }

/* Persistent language control: deliberately separate from navigation chrome. */

/* ===== PERSISTENT SITE CONTROLS ===== */
.site-utility {
    position: fixed;
    z-index: 120;
    right: 18px;
    bottom: 18px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 48px;
    padding: 4px;
    border: 1px solid rgba(79,179,200,.38);
    border-radius: 16px;
    background: color-mix(in srgb, var(--bound-surface) 88%, transparent);
    box-shadow: 0 12px 34px rgba(3,8,18,.22);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.site-utility-lang,
.site-utility-theme {
    width: 38px;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--bound-muted);
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition-base), color var(--transition-base), transform var(--transition-base);
}
.site-utility-lang {
    flex-direction: column;
    gap: 1px;
    font-size: 8px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: .02em;
}
.site-utility-icon {
    color: var(--bound-cyan);
    font: 700 10px/1 var(--font-mono);
    letter-spacing: .05em;
}
.site-utility-theme svg { display:block; }
.site-utility-lang:hover,
.site-utility-theme:hover {
    background: rgba(59,130,246,.10);
    color: var(--bound-heading);
    transform: translateY(-1px);
}
.site-utility-lang:focus-visible,
.site-utility-theme:focus-visible {
    outline: 2px solid var(--bound-accent);
    outline-offset: 2px;
}
.back-to-top {
    position: fixed;
    z-index: 119;
    left: 18px;
    bottom: 22px;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(79,179,200,.38);
    border-radius: 14px;
    background: color-mix(in srgb, var(--bound-surface) 90%, transparent);
    color: var(--bound-cyan);
    box-shadow: 0 12px 34px rgba(3,8,18,.22);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity var(--transition-base), visibility var(--transition-base), transform var(--transition-base), background var(--transition-base);
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}
.back-to-top:hover { background: var(--bound-surface-2); transform: translateY(-2px); }
.back-to-top:focus-visible { outline: 2px solid var(--bound-accent); outline-offset: 3px; }
[data-theme="light"] .site-utility,
[data-theme="light"] .back-to-top {
    box-shadow: 0 12px 34px rgba(15,23,42,.12);
}



/* Hero: content and visual are peers, not a long centered stack. */
.hero {
    min-height: 100vh;
    padding: 112px 24px 74px;
    align-items: center;
}
.hero-overlay {
    background:
        radial-gradient(circle at 18% 30%, rgba(75,142,247,.10), transparent 34%),
        radial-gradient(circle at 82% 58%, rgba(79,179,200,.08), transparent 34%),
        linear-gradient(180deg, rgba(16,24,39,.60) 0%, rgba(16,24,39,.90) 100%);
}
.hero::after { opacity: .42; }
.hero-content {
    width: min(1240px, 100%);
    max-width: 1240px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
    gap: clamp(42px, 6vw, 86px);
    align-items: center;
    text-align: left;
}
.hero-copy { min-width: 0; }
.hero-visual {
    position: relative;
    min-height: 500px;
    display: flex; flex-direction: column; justify-content: center;
    padding: 30px;
    background: linear-gradient(145deg, rgba(33,50,76,.82), rgba(23,34,56,.72));
    border: 1px solid rgba(146,166,194,.18);
    border-radius: 24px;
    box-shadow: 0 28px 80px rgba(3,8,18,.24), inset 0 1px 0 rgba(255,255,255,.025);
    overflow: hidden;
}
.hero-visual::before {
    content:''; position:absolute; inset:0; pointer-events:none;
    background:
        linear-gradient(rgba(79,179,200,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79,179,200,.035) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(to bottom, #000, transparent 92%);
}
.hero-visual::after {
    content:''; position:absolute; width:220px; height:220px; border-radius:50%; right:-80px; bottom:-90px;
    background: radial-gradient(circle, rgba(75,142,247,.13), transparent 68%); pointer-events:none;
}
.hero-mark { margin: 0 0 24px; position:relative; z-index:2; text-align:center; }
.mark-caption { justify-content:center; }
.hero-system-label {
    position:relative; z-index:2; display:flex; align-items:center; justify-content:space-between; gap:16px;
    padding-bottom:14px; margin-bottom:24px; border-bottom:1px solid var(--bound-border);
    font-family:var(--font-mono); font-size:10px; letter-spacing:.11em; text-transform:uppercase; color:var(--bound-slate);
}
.hero-system-label strong { color:var(--bound-cyan); font-weight:600; }
.hero-flow { position:relative; z-index:2; display:grid; grid-template-columns:1fr; gap:10px; }
.hero-flow-step {
    display:grid; grid-template-columns: 34px 1fr auto; gap:12px; align-items:center;
    padding:13px 14px; border:1px solid var(--bound-border); border-radius:11px; background:rgba(16,24,39,.34);
}
.hero-flow-step .flow-index { font-family:var(--font-mono); font-size:11px; color:var(--bound-cyan); }
.hero-flow-step strong { display:block; font-size:13px; color:var(--bound-heading); font-weight:600; }
.hero-flow-step span:last-child { font-family:var(--font-mono); font-size:10px; color:var(--bound-slate); }
.hero-flow-step.is-verification { border-color:rgba(212,162,76,.28); }
.hero-flow-step.is-verification .flow-index { color:var(--brand-orange); }

.hero-badge { margin: 0 0 22px; }
.hero-title {
    font-size: clamp(46px, 6vw, 78px); line-height:1.02; margin-bottom:14px;
    text-shadow: 0 0 34px rgba(75,142,247,.12);
}
.hero-title::after { left:0; transform:none; max-width:300px; }
.hero-subtitle { max-width:720px; margin-bottom:24px; font-size:clamp(20px,2.4vw,30px); }
.hero-description { max-width:720px; margin:0 0 18px; font-size:16px; color:var(--bound-muted); }
.hero-description + .hero-description { margin-bottom:28px; }
.hero-principle {
    max-width:760px; margin:0 0 12px; font-size:clamp(19px,2.15vw,25px); line-height:1.55;
    font-weight:600; background:linear-gradient(135deg,#85AFFF,var(--bound-cyan)); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
}
.hero-invariant { font-size:14px; color:var(--bound-muted); font-style:italic; margin-bottom:26px; }
.hero-meta { justify-content:flex-start; gap:9px; margin-bottom:30px; }
.hero-actions { justify-content:flex-start; gap:12px; }
.hero-actions .btn { padding:12px 22px; }
.hero-lifecycle-link { display:inline-flex; margin-top:16px; color:var(--bound-cyan); font-size:13px; text-decoration:none; border-bottom:1px dotted rgba(79,179,200,.44); }
.hero-lifecycle-link:hover { color:var(--bound-heading); }
.hero-author-line { margin-top:26px; font-size:12px; color:var(--bound-slate); line-height:1.8; }
.hero-author-line a { color:var(--bound-cyan); text-decoration:none; }
.hero-author-line a:hover { text-decoration:underline; }
.hero-interaction-hint { opacity:.58; }

/* Softer section rhythm without changing source content. */
.section { padding-top: 92px; padding-bottom:92px; }
.section-alt { background: rgba(23,34,56,.44); }
.section-title { letter-spacing:-.025em; }
.principle-card, .contract-type, .reference, .pub-action, .lifecycle-phase, .verification-node, .ifem-bound, .verification-loop {
    background: rgba(33,50,76,.42);
    border-color: rgba(146,166,194,.15);
}
.principle-card:hover, .reference:hover, .pub-action:hover { border-color:rgba(79,179,200,.28); }
.quote-block { background:rgba(79,179,200,.045); }

/* Persian edition uses the user-selected locally embedded type pair. */
html[lang='fa'] body { font-family: var(--font-fa-body); line-height:1.95; }
html[lang='fa'] h1, html[lang='fa'] h2, html[lang='fa'] h3, html[lang='fa'] h4, html[lang='fa'] h5, html[lang='fa'] h6,
html[lang='fa'] .hero-title, html[lang='fa'] .section-title { font-family:var(--font-fa-heading); font-weight:700; letter-spacing:0 !important; }
html[lang='fa'] .hero-content { text-align:right; }
html[lang='fa'] .hero-title::after { left:auto; right:0; }
html[lang='fa'] .hero-meta, html[lang='fa'] .hero-actions { justify-content:flex-start; }
html[lang='fa'] .hero-system-label, html[lang='fa'] .hero-flow-step { direction:rtl; }
html[lang='fa'] .hero-flow-step { grid-template-columns: auto 1fr 34px; }
html[lang='fa'] .hero-flow-step .flow-index { grid-column:3; }
html[lang='fa'] .hero-flow-step strong { grid-column:2; grid-row:1; }
html[lang='fa'] .hero-flow-step span:last-child { grid-column:1; grid-row:1; }

@media (max-width: 1020px) {
    .nav-links { gap:18px; }
    .hero-content { grid-template-columns:1fr; gap:38px; max-width:820px; }
    .hero-copy { text-align:center; }
    .hero-title::after { left:50%; right:auto; transform:translateX(-50%); }
    .hero-description, .hero-principle { margin-left:auto; margin-right:auto; }
    .hero-meta, .hero-actions { justify-content:center; }
    .hero-author-line { text-align:center; }
    .hero-visual { min-height:0; max-width:680px; width:100%; margin:0 auto; }
    html[lang='fa'] .hero-content, html[lang='fa'] .hero-copy { text-align:center; }
    html[lang='fa'] .hero-title::after { left:50%; right:auto; transform:translateX(-50%); }
    html[lang='fa'] .hero-meta, html[lang='fa'] .hero-actions { justify-content:center; }
}
@media (max-width: 820px) {
    .language-float { top:76px; right:14px; }
    html[dir='rtl'] .language-float { left:14px; right:auto; }
    .hero { padding:104px 18px 62px; }
    .hero-visual { padding:22px 18px; border-radius:18px; }
    .hero-meta { display:none; }
    .hero-system-label { font-size:9px; }
    .section { padding-top:72px; padding-bottom:72px; }
}
@media (max-width: 520px) {
    .language-float { top:72px; min-height:34px; padding:6px 10px; }
    .language-float .lang-name { display:none; }
    .hero-title { font-size:clamp(39px,12vw,56px); }
    .hero-subtitle { font-size:20px; }
    .hero-description { font-size:15px; }
    .hero-principle { font-size:18px; }
    .hero-actions { flex-direction:column; align-items:stretch; }
    .hero-actions .btn { justify-content:center; width:100%; }
    .hero-visual { padding:20px 14px; }
    .hero-flow-step { grid-template-columns:28px 1fr; }
    .hero-flow-step span:last-child { display:none; }
    html[lang='fa'] .hero-flow-step { grid-template-columns:1fr 28px; }
    html[lang='fa'] .hero-flow-step .flow-index { grid-column:2; }
    html[lang='fa'] .hero-flow-step strong { grid-column:1; }
}

/* === Authoritative Persian typography: user-supplied Titr + Koodak === */
/* Local files only. No remote Persian-font dependency. */
@font-face {
    font-family: 'BoundTitr';
    src: url('./fonts/titr.ttf') format('truetype');
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: 'BoundKoodak';
    src: url('./fonts/koodak.ttf') format('truetype');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}
:root {
    --font-fa-body: 'BoundKoodak', 'KoodakLocal', 'VazirmatnLocal', Tahoma, Arial, sans-serif;
    --font-fa-heading: 'BoundTitr', 'TitrLocal', 'BoundKoodak', 'KoodakLocal', 'VazirmatnLocal', Tahoma, Arial, sans-serif;
}
html[lang='fa'] body,
html[lang='fa'] p,
html[lang='fa'] li,
html[lang='fa'] a,
html[lang='fa'] button,
html[lang='fa'] input,
html[lang='fa'] textarea,
html[lang='fa'] select,
html[lang='fa'] label,
html[lang='fa'] .nav-links,
html[lang='fa'] .nav-cta,
html[lang='fa'] .nav-lang,
html[lang='fa'] .language-float .lang-name,
html[lang='fa'] .hero-description,
html[lang='fa'] .hero-principle,
html[lang='fa'] .hero-invariant,
html[lang='fa'] .section-intro,
html[lang='fa'] .accordion-content,
html[lang='fa'] .citation,
html[lang='fa'] .article-copy {
    font-family: var(--font-fa-body) !important;
}
html[lang='fa'] h1,
html[lang='fa'] h2,
html[lang='fa'] h3,
html[lang='fa'] h4,
html[lang='fa'] h5,
html[lang='fa'] h6,
html[lang='fa'] .hero-title,
html[lang='fa'] .hero-subtitle,
html[lang='fa'] .section-title,
html[lang='fa'] .article-hero h1,
html[lang='fa'] .article-copy h2,
html[lang='fa'] .article-copy h3,
html[lang='fa'] .practice-card-title,
html[lang='fa'] .principle-title,
html[lang='fa'] .contract-title {
    font-family: var(--font-fa-heading) !important;
    font-weight: 700;
    letter-spacing: 0 !important;
}
/* Keep Latin/system identifiers in the technical face when they are explicitly marked as code/mono. */
html[lang='fa'] code,
html[lang='fa'] pre,
html[lang='fa'] .lang-code,
html[lang='fa'] .nav-version {
    font-family: var(--font-mono) !important;
}

/* ========================================================================== */
/* FINAL STABILIZATION — theme contrast, composition, and Persian RTL          */
/* This block is intentionally last so theme tokens cannot be overwritten.      */
/* ========================================================================== */

html { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }

/* Final light-theme tokens: placed after every dark :root refinement. */
html[data-theme="light"] {
    --bound-bg: #F5F7FB;
    --bound-surface: #FFFFFF;
    --bound-surface-2: #EAF0F7;
    --bound-text: #172033;
    --bound-heading: #0E1728;
    --bound-text-muted: #46566D;
    --bound-text-slate: #64748B;
    --bound-muted: #46566D;
    --bound-slate: #64748B;
    --bound-border: rgba(26, 43, 68, 0.14);
    --bound-accent: #2563EB;
    --bound-cyan: #0E7490;
    --bound-teal: #0F766E;
    --brand-orange: #B45309;
    --bound-warning: #B45309;
    --bound-danger: #B91C1C;
    --bound-focus: #0369A1;
    --grid-color: rgba(37, 99, 235, 0.045);
    --card-bg: rgba(255,255,255,.92);
    --scrollbar-bg: #F5F7FB;
    --scrollbar-thumb: #C7D2E1;
    --scrollbar-thumb-hover: #94A3B8;
    --nav-shadow: rgba(15, 23, 42, .10);
    --hero-overlay: rgba(245,247,251,.72);
    --bound-dark: #FFFFFF;
    --bound-navy: #F5F7FB;
    --bound-blue: #EAF0F7;
    --bound-light: #172033;
}

html[data-theme="light"] body { background:#F5F7FB; color:var(--bound-text); }
html[data-theme="light"] .grid-bg {
    background-image:
      linear-gradient(rgba(37,99,235,.040) 1px, transparent 1px),
      linear-gradient(90deg, rgba(37,99,235,.040) 1px, transparent 1px);
}
html[data-theme="light"] .nav { background:rgba(255,255,255,.90); border-bottom-color:rgba(26,43,68,.10); }
html[data-theme="light"] .nav.scrolled { background:rgba(255,255,255,.97); box-shadow:0 10px 32px rgba(15,23,42,.08); }
html[data-theme="light"] .nav-mobile-menu { background:rgba(255,255,255,.985); border-color:rgba(26,43,68,.10); }
html[data-theme="light"] .nav-mobile-menu a { border-color:rgba(26,43,68,.08); color:var(--bound-muted); }
html[data-theme="light"] .nav-mobile-btn { color:var(--bound-heading); }
html[data-theme="light"] .nav-cta,
html[data-theme="light"] #themeToggleBtn {
    background:rgba(37,99,235,.075) !important;
    border-color:rgba(37,99,235,.22) !important;
    color:#1D4ED8 !important;
}
html[data-theme="light"] .nav-cta:hover,
html[data-theme="light"] #themeToggleBtn:hover { background:rgba(37,99,235,.12) !important; }
html[data-theme="light"] .language-float {
    background:rgba(255,255,255,.94);
    color:var(--bound-heading);
    border-color:rgba(14,116,144,.30);
    box-shadow:0 10px 28px rgba(15,23,42,.10);
}
html[data-theme="light"] .language-float:hover { background:#fff; border-color:rgba(14,116,144,.58); }
html[data-theme="light"] .language-float .lang-name { color:var(--bound-heading); }
html[data-theme="light"] .hero-overlay {
    background:
      radial-gradient(circle at 18% 30%, rgba(37,99,235,.075), transparent 34%),
      radial-gradient(circle at 82% 58%, rgba(14,116,144,.055), transparent 34%),
      linear-gradient(180deg, rgba(245,247,251,.48) 0%, rgba(245,247,251,.92) 100%);
}
html[data-theme="light"] .hero::after { opacity:.14; }
html[data-theme="light"] .hero-title { color:var(--bound-heading); text-shadow:none; }
html[data-theme="light"] .hero-subtitle,
html[data-theme="light"] .hero-description,
html[data-theme="light"] .hero-invariant { color:var(--bound-muted); }
html[data-theme="light"] .hero-principle {
    background:linear-gradient(135deg,#1D4ED8,#0E7490);
    -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent;
}
html[data-theme="light"] .hero-visual {
    background:linear-gradient(145deg, rgba(255,255,255,.98), rgba(234,240,247,.94));
    border-color:rgba(26,43,68,.14);
    box-shadow:0 24px 64px rgba(15,23,42,.10), inset 0 1px 0 rgba(255,255,255,.9);
}
html[data-theme="light"] .hero-visual::before {
    background:
      linear-gradient(rgba(37,99,235,.042) 1px, transparent 1px),
      linear-gradient(90deg, rgba(37,99,235,.042) 1px, transparent 1px);
}
html[data-theme="light"] .hero-visual::after { background:radial-gradient(circle,rgba(37,99,235,.09),transparent 68%); }
html[data-theme="light"] .hero-flow-step { background:rgba(255,255,255,.82); border-color:rgba(26,43,68,.12); }
html[data-theme="light"] .hero-system-label { border-color:rgba(26,43,68,.12); }
html[data-theme="light"] .section-alt { background:#EEF3F8; }
html[data-theme="light"] .principle-card,
html[data-theme="light"] .contract-type,
html[data-theme="light"] .reference,
html[data-theme="light"] .pub-action,
html[data-theme="light"] .lifecycle-phase,
html[data-theme="light"] .verification-node,
html[data-theme="light"] .ifem-bound,
html[data-theme="light"] .verification-loop,
html[data-theme="light"] .question-card,
html[data-theme="light"] .contract-item,
html[data-theme="light"] .practice-card,
html[data-theme="light"] .concept-card,
html[data-theme="light"] .content-copy .citation {
    background:#FFFFFF;
    border-color:rgba(26,43,68,.13);
    color:var(--bound-text);
    box-shadow:0 12px 34px rgba(15,23,42,.035);
}
html[data-theme="light"] .accordion-item { background:#FFFFFF; border-color:rgba(26,43,68,.13); }
html[data-theme="light"] .accordion-trigger:hover { background:#F7F9FC; }
html[data-theme="light"] .quote-block { background:rgba(14,116,144,.055); }
html[data-theme="light"] .rtl-note,
html[data-theme="light"] .callout { background:#FFFFFF !important; color:var(--bound-muted) !important; border-color:var(--bound-accent) !important; }
html[data-theme="light"] .outcome-pass { background:rgba(15,118,110,.06); border-color:rgba(15,118,110,.18); }
html[data-theme="light"] .outcome-fail,
html[data-theme="light"] .practice-explore { background:rgba(185,28,28,.045); border-color:rgba(185,28,28,.16); }
html[data-theme="light"] .ifem-row { background:#F8FAFC; border-color:rgba(26,43,68,.11); }
html[data-theme="light"] .bound-row { background:rgba(37,99,235,.055); border-color:rgba(37,99,235,.18); }
html[data-theme="light"] .methodology-step { background:#E7EDF5; color:var(--bound-text); }
html[data-theme="light"] .footer { background:#EAF0F7; border-color:rgba(26,43,68,.12); }

/* Theme toggle itself should be a compact utility, not a second primary CTA. */
#themeToggleBtn {
    min-width:38px;
    min-height:38px;
    justify-content:center;
    padding:8px 10px !important;
    margin-inline-start:10px !important;
    margin-left:0 !important;
    margin-right:0 !important;
}
#themeToggleBtn svg { width:17px; height:17px; display:block; }

/* Shared composition primitives used by the Persian edition and authority pages. */
.section-inner { width:min(1100px,100%); margin-inline:auto; }
.section-intro { max-width:780px; color:var(--bound-muted); font-size:17px; line-height:1.9; margin:0 0 38px; }
.content-copy { max-width:820px; color:var(--bound-muted); font-size:16px; line-height:2; }
.content-copy p { margin:0 0 18px; }
.content-copy ul { margin:16px 0 22px; padding-inline-start:1.4rem; }
.concept-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:18px; margin-top:30px; }
.concept-card { padding:26px; border:1px solid var(--bound-border); border-radius:14px; background:var(--card-bg); }
.concept-card h3 { color:var(--bound-heading); margin-bottom:10px; }
.concept-card p { color:var(--bound-muted); line-height:1.8; }

/* Persian homepage cards: these were previously structurally present but uncomposed. */
.three-questions,
.contract-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; margin:30px 0 34px; }
.question-card,
.contract-item { padding:26px; border:1px solid var(--bound-border); border-radius:15px; background:rgba(33,50,76,.42); }
.question-label { color:var(--bound-slate); font-size:13px; margin-bottom:8px; }
.question-answer { color:var(--bound-heading); font-family:var(--font-fa-heading); font-size:22px; line-height:1.5; margin-bottom:10px; }
.question-card p,
.contract-item p { color:var(--bound-muted); font-size:14px; line-height:1.85; }
.contract-icon,
.principle-number,
.arch-layer-number { display:inline-flex; align-items:center; justify-content:center; min-width:34px; min-height:28px; padding:3px 9px; border-radius:8px; background:rgba(79,179,200,.09); color:var(--bound-cyan); font-size:12px; margin-bottom:14px; }
.contract-item h3,
.principle-card h3,
.arch-layer h3,
.practice-card h3 { color:var(--bound-heading); margin-bottom:10px; }
.contract-item h3 { font-size:19px; }
.principle-card p,
.arch-layer p,
.practice-card p { color:var(--bound-muted); line-height:1.85; }
.arch-layer ul,
.practice-card ul { margin-top:14px; padding-inline-start:1.25rem; color:var(--bound-muted); }
.arch-layer li,
.practice-card li { margin:7px 0; }
/* Persian architecture cards use the same three-role signal language even without legacy layer classes. */
html[dir="rtl"] .arch-layers > .arch-layer:nth-child(1) { background:rgba(75,142,247,.055); border:1px solid rgba(75,142,247,.17); }
html[dir="rtl"] .arch-layers > .arch-layer:nth-child(2) { background:rgba(79,179,200,.055); border:1px solid rgba(79,179,200,.17); }
html[dir="rtl"] .arch-layers > .arch-layer:nth-child(3) { background:rgba(90,174,138,.055); border:1px solid rgba(90,174,138,.17); }
.practice-card { background:rgba(33,50,76,.36); border:1px solid var(--bound-border); }
.reference-list { display:flex; flex-direction:column; gap:12px; }
.quote-source { color:var(--bound-slate); font-size:13px; margin-top:8px; }
.quote-mark { color:var(--bound-cyan); font-size:34px; line-height:1; margin-bottom:8px; }

/* Persian RTL: use logical alignment instead of manual flex reordering. */
html[dir="rtl"] body { direction:rtl; text-align:start; }
html[dir="rtl"] .nav-inner { direction:rtl !important; }
html[dir="rtl"] .nav-brand,
html[dir="rtl"] .nav-links,
html[dir="rtl"] .nav-lang,
html[dir="rtl"] .nav-cta,
html[dir="rtl"] .nav-mobile-btn,
html[dir="rtl"] #themeToggleBtn { order:initial !important; }
html[dir="rtl"] .nav-links { direction:rtl; }
html[dir="rtl"] .nav-links a { text-align:right; }
html[dir="rtl"] .nav-links a::after { left:auto; right:0; }
html[dir="rtl"] .nav-mobile-menu { direction:rtl; text-align:right; }
html[dir="rtl"] .nav-mobile-menu a { padding-left:0; padding-right:20px; text-align:right; }
html[dir="rtl"] .nav-mobile-menu a::before { left:auto; right:0; }
html[dir="rtl"] .hero-content,
html[dir="rtl"] .hero-copy,
html[dir="rtl"] .hero-visual,
html[dir="rtl"] .section,
html[dir="rtl"] .section-inner,
html[dir="rtl"] .content-copy,
html[dir="rtl"] .footer { direction:rtl; }
html[dir="rtl"] .hero-copy,
html[dir="rtl"] .section-inner,
html[dir="rtl"] .content-copy,
html[dir="rtl"] .page-hero-inner,
html[dir="rtl"] .article-hero-inner,
html[dir="rtl"] .article-copy,
html[dir="rtl"] .reference,
html[dir="rtl"] .accordion-content,
html[dir="rtl"] .footer-author,
html[dir="rtl"] .footer-copy { text-align:right !important; }
html[dir="rtl"] .section-label { display:block; text-align:right; letter-spacing:0; text-transform:none; }
html[dir="rtl"] .section-title,
html[dir="rtl"] .section-subtitle,
html[dir="rtl"] .section-intro { text-align:right !important; }
html[dir="rtl"] .section-intro,
html[dir="rtl"] .section-subtitle { margin-left:auto; margin-right:0; }
html[dir="rtl"] .section-divider { margin-left:auto; margin-right:0; background:linear-gradient(270deg,var(--bound-accent),var(--bound-cyan)); }
html[dir="rtl"] .hero-title::after { left:auto !important; right:0 !important; transform:none !important; }
html[dir="rtl"] .hero-meta,
html[dir="rtl"] .hero-actions { justify-content:flex-start !important; }
html[dir="rtl"] .hero-author-line { text-align:right; unicode-bidi:plaintext; }
html[dir="rtl"] .hero-system-label { direction:rtl; text-align:right; }
html[dir="rtl"] .hero-flow-step {
    direction:rtl;
    grid-template-columns:34px minmax(0,1fr) auto;
    text-align:right;
}
html[dir="rtl"] .hero-flow-step .flow-index,
html[dir="rtl"] .hero-flow-step strong,
html[dir="rtl"] .hero-flow-step span:last-child { grid-column:auto !important; grid-row:auto !important; }
html[dir="rtl"] .mark-caption { direction:rtl; }
html[dir="rtl"] .arch-layer,
html[dir="rtl"] .principle-card,
html[dir="rtl"] .question-card,
html[dir="rtl"] .contract-item,
html[dir="rtl"] .practice-card,
html[dir="rtl"] .reference,
html[dir="rtl"] .pub-action { text-align:right; }
html[dir="rtl"] .lifecycle-group-label {
    padding-left:0;
    padding-right:16px;
    border-left:0;
    border-right:3px solid var(--bound-accent);
    text-align:right;
    letter-spacing:0;
    text-transform:none;
}
html[dir="rtl"] .lifecycle-phase { text-align:right !important; font-family:var(--font-fa-body); }
html[dir="rtl"] .lifecycle-phase-number { unicode-bidi:plaintext; text-align:right; }
html[dir="rtl"] .lifecycle-phase-detail-inner { text-align:right !important; }
html[dir="rtl"] .accordion-trigger { direction:rtl; text-align:right !important; font-family:var(--font-fa-body); }
html[dir="rtl"] .practice-list li { padding-left:0; padding-right:20px; }
html[dir="rtl"] .practice-list li::before { left:auto; right:0; }
html[dir="rtl"] .quote-block {
    text-align:right !important;
    border-left:0;
    border-right:4px solid var(--bound-cyan);
    border-radius:12px 0 0 12px;
}
html[dir="rtl"] .pub-action { direction:rtl; }
html[dir="rtl"] .footer-inner { direction:rtl; }
html[dir="rtl"] .link-row,
html[dir="rtl"] .article-links { direction:rtl; justify-content:flex-start; }
html[dir="rtl"] .callout { border-left:0 !important; border-right:4px solid var(--bound-cyan) !important; text-align:right; }
html[dir="rtl"] .citation { direction:rtl; text-align:right; unicode-bidi:plaintext; }
html[dir="rtl"] .article-copy ul { padding-left:0; padding-right:26px; }
html[dir="rtl"] .reference-cite,
html[dir="rtl"] .reference-source,
html[dir="rtl"] .page-kicker,
html[dir="rtl"] .article-kicker { unicode-bidi:plaintext; }

@media (max-width:1020px) {
    html[dir="rtl"] .hero-copy { text-align:center !important; }
    html[dir="rtl"] .hero-title::after { left:50% !important; right:auto !important; transform:translateX(-50%) !important; }
    html[dir="rtl"] .hero-description,
    html[dir="rtl"] .hero-principle,
    html[dir="rtl"] .hero-invariant { margin-left:auto; margin-right:auto; text-align:center !important; }
    html[dir="rtl"] .hero-meta,
    html[dir="rtl"] .hero-actions { justify-content:center !important; }
    html[dir="rtl"] .hero-author-line { text-align:center !important; }
}
@media (max-width:760px) {
    .section-inner { width:100%; }
    .three-questions,
    .contract-grid { grid-template-columns:1fr; }
    .section-intro { font-size:16px; }
    html[dir="rtl"] .nav-inner { direction:rtl !important; }
}
@media (max-width:520px) {
    html[dir="rtl"] .hero-flow-step { grid-template-columns:28px minmax(0,1fr); }
    html[dir="rtl"] .hero-flow-step span:last-child { display:none; }
}



/* ===== AGENTIC AI — PROBLEM-FIRST MARKETING LEAD ===== */
.agentic-lead {
    position: relative;
    padding: 124px 24px 78px;
    border-bottom: 1px solid var(--bound-border);
    background:
      radial-gradient(circle at 10% 8%, rgba(75,142,247,.085), transparent 32%),
      radial-gradient(circle at 88% 80%, rgba(79,179,200,.06), transparent 34%),
      linear-gradient(180deg, rgba(23,34,56,.72), rgba(16,24,39,.90));
    overflow: hidden;
}
.agentic-lead::before {
    content:''; position:absolute; inset:0; pointer-events:none; opacity:.32;
    background-image:
      linear-gradient(rgba(79,179,200,.035) 1px, transparent 1px),
      linear-gradient(90deg, rgba(79,179,200,.035) 1px, transparent 1px);
    background-size:44px 44px;
    mask-image:linear-gradient(to bottom,#000,transparent 90%);
}
.agentic-inner { width:min(1180px,100%); margin-inline:auto; position:relative; z-index:1; }
.agentic-heading { max-width:880px; }
.agentic-kicker,
.agentic-bridge-label {
    display:inline-block; margin-bottom:14px;
    font-family:var(--font-mono); font-size:11px; font-weight:600;
    letter-spacing:.14em; text-transform:uppercase; color:var(--bound-cyan);
}
.agentic-heading h2 {
    max-width:900px; margin:0 0 20px;
    font-size:clamp(32px,4.4vw,58px); line-height:1.06; letter-spacing:-.035em;
    color:var(--bound-heading); font-weight:700;
}
.agentic-heading > p {
    max-width:830px; margin:0; color:var(--bound-muted);
    font-size:17px; line-height:1.85;
}
.agentic-problems {
    display:grid; grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px; margin-top:38px;
}
.agentic-problem {
    min-height:210px; padding:22px 20px;
    background:rgba(33,50,76,.46); border:1px solid rgba(146,166,194,.15);
    border-radius:14px; box-shadow:0 16px 38px rgba(3,8,18,.08);
}
.agentic-index {
    display:block; margin-bottom:22px; font-family:var(--font-mono);
    font-size:11px; letter-spacing:.12em; color:var(--brand-orange);
}
.agentic-problem h3 { margin:0 0 9px; color:var(--bound-heading); font-size:16px; line-height:1.35; }
.agentic-problem p { margin:0; color:var(--bound-slate); font-size:13px; line-height:1.78; }
.agentic-bridge {
    margin-top:20px; padding:28px;
    display:grid; grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr); gap:28px 36px; align-items:start;
    background:linear-gradient(145deg,rgba(33,50,76,.72),rgba(23,34,56,.84));
    border:1px solid rgba(79,179,200,.24); border-radius:18px;
    box-shadow:0 24px 60px rgba(3,8,18,.12);
}
.agentic-bridge-copy h3 { margin:0 0 12px; color:var(--bound-heading); font-size:clamp(21px,2.3vw,30px); line-height:1.25; }
.agentic-bridge-copy p { margin:0; color:var(--bound-muted); font-size:15px; line-height:1.82; }
.agentic-controls { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.agentic-control {
    min-height:92px; padding:15px 16px; border-radius:11px;
    background:rgba(16,24,39,.44); border:1px solid rgba(146,166,194,.13);
}
.agentic-control span {
    display:block; margin-bottom:8px; font-family:var(--font-mono); font-size:10px;
    letter-spacing:.1em; color:var(--bound-cyan); text-transform:uppercase;
}
.agentic-control strong { display:block; color:var(--bound-text); font-size:13px; line-height:1.5; font-weight:600; }
.agentic-control.is-verify { border-color:rgba(212,162,76,.25); }
.agentic-control.is-verify span { color:var(--brand-orange); }
.agentic-next {
    grid-column:1/-1; justify-self:start; display:inline-flex; margin-top:-2px;
    color:var(--bound-cyan); text-decoration:none; font-size:13px;
    border-bottom:1px dotted rgba(79,179,200,.48);
}
.agentic-next:hover { color:var(--bound-heading); }

html[data-theme="light"] .agentic-lead {
    background:
      radial-gradient(circle at 10% 8%, rgba(37,99,235,.065), transparent 32%),
      radial-gradient(circle at 88% 80%, rgba(14,116,144,.05), transparent 34%),
      linear-gradient(180deg,#F8FAFC,#EEF3F8);
}
html[data-theme="light"] .agentic-lead::before {
    opacity:.22;
    background-image:
      linear-gradient(rgba(37,99,235,.05) 1px, transparent 1px),
      linear-gradient(90deg, rgba(37,99,235,.05) 1px, transparent 1px);
}
html[data-theme="light"] .agentic-problem,
html[data-theme="light"] .agentic-bridge,
html[data-theme="light"] .agentic-control {
    background:#FFFFFF; border-color:rgba(26,43,68,.13); color:var(--bound-text);
    box-shadow:0 14px 34px rgba(15,23,42,.045);
}
html[data-theme="light"] .agentic-bridge { background:linear-gradient(145deg,#FFFFFF,#F7F9FC); border-color:rgba(14,116,144,.22); }
html[data-theme="light"] .agentic-control.is-verify { border-color:rgba(180,83,9,.22); }

html[dir="rtl"] .agentic-lead,
html[dir="rtl"] .agentic-heading,
html[dir="rtl"] .agentic-problem,
html[dir="rtl"] .agentic-bridge-copy,
html[dir="rtl"] .agentic-control { text-align:right; }
html[lang="fa"] .agentic-heading h2,
html[lang="fa"] .agentic-problem h3,
html[lang="fa"] .agentic-bridge-copy h3 { font-family:var(--font-fa-heading); letter-spacing:0; }
html[lang="fa"] .agentic-heading > p,
html[lang="fa"] .agentic-problem p,
html[lang="fa"] .agentic-bridge-copy p,
html[lang="fa"] .agentic-control strong,
html[lang="fa"] .agentic-next { font-family:var(--font-fa-body); }
html[dir="rtl"] .agentic-next { justify-self:start; }

@media (max-width:980px) {
    .agentic-problems { grid-template-columns:1fr 1fr; }
    .agentic-bridge { grid-template-columns:1fr; }
}
@media (max-width:640px) {
    .agentic-lead { padding:110px 18px 56px; }
    .agentic-heading h2 { font-size:clamp(31px,10.2vw,46px); }
    .agentic-heading > p { font-size:15px; }
    .agentic-problems { grid-template-columns:1fr; gap:10px; margin-top:28px; }
    .agentic-problem { min-height:0; padding:18px; }
    .agentic-index { margin-bottom:12px; }
    .agentic-bridge { padding:20px; gap:22px; }
    .agentic-controls { grid-template-columns:1fr; }
    .agentic-control { min-height:0; }
}


/* Agent compatibility marquee */
.agent-compat {
  position: relative;
  overflow: hidden;
  padding: 52px 0 34px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 76%, transparent), color-mix(in srgb, var(--bg) 96%, transparent));
  isolation: isolate;
}
.agent-compat::before,
.agent-compat::after {
  content: "";
  position: absolute;
  inset-block: 0;
  width: clamp(28px, 7vw, 120px);
  z-index: 3;
  pointer-events: none;
}
.agent-compat::before { inset-inline-start: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.agent-compat::after { inset-inline-end: 0; background: linear-gradient(270deg, var(--bg), transparent); }
.agent-compat-head {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
  text-align: center;
  position: relative;
  z-index: 4;
}
.agent-compat-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 700 11px/1.2 var(--font-mono);
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 12px;
}
.agent-compat-kicker::before {
  content: "";
  width: 20px;
  height: 1px;
  background: currentColor;
  opacity: .72;
}
.agent-compat-head h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(24px, 3.1vw, 42px);
  line-height: 1.08;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.agent-compat-head p {
  width: min(820px, 100%);
  margin: 14px auto 0;
  color: var(--text-secondary);
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.75;
  text-wrap: pretty;
}
.agent-marquee {
  margin-top: 28px;
  width: 100%;
  position: relative;
  z-index: 2;
  direction: ltr;
}
.agent-marquee-mask { overflow: hidden; width: 100%; }
.agent-marquee-track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: bound-agent-marquee 34s linear infinite;
}
.agent-marquee-group {
  display: flex;
  align-items: center;
  flex: none;
  gap: 14px;
  padding-inline: 7px;
}
.agent-logo-card {
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 56px;
  padding: 10px 16px 10px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-raised) 84%, transparent);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 12px 34px rgba(0,0,0,.12);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.agent-logo-card:hover,
.agent-logo-card:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--cyan) 60%, var(--border));
  background: color-mix(in srgb, var(--surface-raised) 94%, var(--cyan) 6%);
  outline: none;
}
.agent-logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--bg) 70%, var(--surface) 30%);
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  flex: none;
}
.agent-logo-mark img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: .92;
}
html[data-theme="light"] .agent-logo-mark img { filter: brightness(0); opacity: .82; }
.agent-logo-name {
  font: 650 13px/1.1 var(--font-body);
  letter-spacing: -.01em;
  white-space: nowrap;
}
.agent-compat-disclaimer {
  width: min(980px, calc(100% - 40px));
  margin: 18px auto 0;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  position: relative;
  z-index: 4;
}
.agent-marquee:hover .agent-marquee-track,
.agent-marquee:focus-within .agent-marquee-track { animation-play-state: paused; }
@keyframes bound-agent-marquee {
  from { transform: translate3d(0,0,0); }
  to { transform: translate3d(-50%,0,0); }
}
html[dir="rtl"] .agent-compat-head,
html[dir="rtl"] .agent-compat-disclaimer { direction: rtl; }
html[dir="rtl"] .agent-compat-head { text-align: center; }
html[dir="rtl"] .agent-compat-kicker { font-family: var(--font-fa-body); letter-spacing: 0; text-transform: none; }
html[dir="rtl"] .agent-compat-head h2 { font-family: var(--font-fa-title); letter-spacing: 0; }
html[dir="rtl"] .agent-compat-head p,
html[dir="rtl"] .agent-compat-disclaimer { font-family: var(--font-fa-body); }
html[dir="rtl"] .agent-logo-name { font-family: var(--font-body); direction: ltr; unicode-bidi: isolate; }

@media (max-width: 760px) {
  .agent-compat { padding: 42px 0 28px; }
  .agent-compat-head { width: min(100% - 28px, 680px); }
  .agent-compat-head h2 { font-size: clamp(23px, 7.4vw, 34px); }
  .agent-compat-head p { font-size: 15px; line-height: 1.68; }
  .agent-marquee { margin-top: 22px; }
  .agent-marquee-group { gap: 10px; padding-inline: 5px; }
  .agent-logo-card { min-height: 50px; padding: 8px 13px 8px 9px; gap: 9px; }
  .agent-logo-mark { width: 32px; height: 32px; border-radius: 9px; }
  .agent-logo-mark img { width: 21px; height: 21px; }
  .agent-logo-name { font-size: 12px; }
  .agent-compat-disclaimer { width: calc(100% - 28px); margin-top: 14px; font-size: 10.5px; }
}
@media (max-width: 380px) {
  .agent-compat { padding-top: 36px; }
  .agent-logo-card { min-height: 46px; }
  .agent-logo-mark { width: 29px; height: 29px; }
  .agent-logo-mark img { width: 19px; height: 19px; }
}
@media (min-width: 1800px) {
  .agent-compat-head { width: min(1320px, calc(100% - 80px)); }
  .agent-compat-head p { width: min(900px, 100%); }
}
@media (prefers-reduced-motion: reduce) {
  .agent-marquee-mask { overflow-x: auto; scrollbar-width: thin; }
  .agent-marquee-track { animation: none; width: max-content; }
  .agent-marquee-group[aria-hidden="true"] { display: none; }
}


/* =========================================================
   HERO V4 — rebuilt from zero
   No cards. No frame. No canvas. No execution-model panel.
   ========================================================= */
.hero-v4 {
    position: relative;
    min-height: calc(100vh - 58px);
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 48px 32px 28px;
    background:
        radial-gradient(circle at 76% 34%, rgba(37,99,235,.13), transparent 28%),
        radial-gradient(circle at 88% 76%, rgba(245,158,11,.09), transparent 24%),
        var(--bound-bg);
}
.hero-v4::before {
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    opacity:.42;
    background-image:
        linear-gradient(rgba(96,165,250,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(96,165,250,.035) 1px, transparent 1px);
    background-size:56px 56px;
    mask-image:linear-gradient(to bottom, #000 0%, rgba(0,0,0,.65) 55%, transparent 100%);
}
.hero-v4-inner {
    width:min(1440px, 100%);
    margin:0 auto;
    position:relative;
    z-index:1;
}
.hero-v4-main {
    min-height:0;
    display:grid;
    grid-template-columns:minmax(0, 1.08fr) minmax(420px, .92fr);
    gap:48px;
    align-items:center;
}
.hero-v4-copy {
    max-width:790px;
}
.hero-v4-kicker {
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:16px;
    color:var(--bound-cyan);
    font:600 11px/1.2 var(--font-mono);
    letter-spacing:.14em;
    text-transform:uppercase;
}
.hero-v4-dot {
    width:7px;
    height:7px;
    border-radius:50%;
    background:var(--bound-cyan);
    box-shadow:0 0 18px rgba(79,179,200,.65);
}
.hero-v4 h1 {
    margin:0;
    color:var(--bound-heading);
    font-size:clamp(54px, 6.1vw, 94px);
    line-height:.92;
    letter-spacing:-.055em;
    font-weight:760;
}
.hero-v4 h1 span {
    display:block;
    color:var(--bound-muted);
    font-size:.43em;
    line-height:1.15;
    letter-spacing:-.025em;
    font-weight:600;
    margin-top:13px;
}
.hero-v4 h2 {
    margin:20px 0 22px;
    max-width:720px;
    color:var(--bound-heading);
    font-size:clamp(21px, 2.1vw, 31px);
    line-height:1.18;
    letter-spacing:-.025em;
    font-weight:560;
}
.hero-v4-lead {
    margin:0 0 10px;
    color:var(--bound-text);
    font-size:17px;
    line-height:1.55;
}
.hero-v4-body {
    max-width:735px;
    margin:0 0 17px;
    color:var(--bound-muted);
    font-size:14.5px;
    line-height:1.72;
}
.hero-v4-principle {
    margin:0 0 7px;
    color:var(--bound-cyan);
    font:600 clamp(15px, 1.5vw, 19px)/1.45 var(--font-mono);
}
.hero-v4-invariant {
    margin:0;
    color:var(--bound-slate);
    font-size:12px;
    line-height:1.5;
}
.hero-v4-tags {
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    margin:20px 0 19px;
}
.hero-v4-tags span {
    padding:6px 9px;
    border:0;
    border-radius:999px;
    background:rgba(79,179,200,.07);
    color:var(--bound-muted);
    font:500 10px/1 var(--font-mono);
    letter-spacing:.045em;
    text-transform:uppercase;
}
.hero-v4-actions {
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}
.hero-v4-actions .btn { padding:10px 18px; }
.hero-v4-links {
    display:flex;
    flex-wrap:wrap;
    gap:10px 20px;
    align-items:center;
    margin-top:14px;
    color:var(--bound-slate);
    font-size:10.5px;
    line-height:1.5;
}
.hero-v4-links a {
    color:var(--bound-cyan);
    text-decoration:none;
}
.hero-v4-links a:hover { color:var(--bound-heading); }
.hero-v4-mark {
    min-height:0;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    padding:12px 0 0;
}
.hero-v4-mark svg {
    display:block;
    width:min(100%, 610px);
    height:auto;
    overflow:visible;
    filter:drop-shadow(0 26px 55px rgba(0,0,0,.18));
}
.hero-v4-mark-caption {
    width:min(100%, 610px);
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:8px;
    margin-top:24px;
    color:var(--bound-slate);
    font:600 9px/1.2 var(--font-mono);
    letter-spacing:.1em;
    text-align:center;
}
.hero-v4-mark-caption span:nth-child(2) { color:var(--bound-cyan); }
.hero-v4-mark-caption span:nth-child(4) { color:var(--brand-orange); }

.hero-v4-agents {
    margin-top:36px;
    padding-top:15px;
    border-top:1px solid color-mix(in srgb, var(--bound-border) 65%, transparent);
}
.hero-v4-agent-label {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:16px;
    margin-bottom:12px;
    color:var(--bound-slate);
    font:600 9px/1.2 var(--font-mono);
    letter-spacing:.12em;
    text-transform:uppercase;
}
.hero-v4-agent-label span { color:var(--bound-cyan); }
.hero-v4-agent-label strong { font-weight:500; color:var(--bound-muted); letter-spacing:.05em; }
.hero-v4-marquee {
    width:100%;
    overflow:hidden;
    direction:ltr;
    mask-image:linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
    -webkit-mask-image:linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.hero-v4-marquee-track {
    display:flex;
    width:max-content;
    will-change:transform;
    animation:hero-v4-agents 38s linear infinite;
}
.hero-v4-agent-group {
    display:flex;
    align-items:center;
    gap:34px;
    padding:0 17px;
    flex:none;
}
.hero-v4-agent-group a {
    display:inline-flex;
    align-items:center;
    gap:9px;
    color:var(--bound-muted);
    text-decoration:none;
    white-space:nowrap;
    font:600 11px/1 var(--font-body);
    opacity:.8;
    transition:opacity .2s ease, color .2s ease, transform .2s ease;
}
.hero-v4-agent-group a:hover { opacity:1; color:var(--bound-heading); transform:translateY(-1px); }
.hero-v4-agent-group img {
    display:block;
    width:34px;
    height:34px;
    object-fit:contain;
    filter:brightness(0) invert(1);
    opacity:.9;
}
html[data-theme="light"] .hero-v4-agent-group img { filter:brightness(0); opacity:.72; }
@keyframes hero-v4-agents {
    from { transform:translate3d(0,0,0); }
    to { transform:translate3d(-50%,0,0); }
}
.hero-v4:focus-within .hero-v4-marquee-track { animation-play-state:paused; }

@media (max-width:1100px) {
    .hero-v4 { padding:44px 24px 26px; }
    .hero-v4-main { grid-template-columns:minmax(0,1fr) minmax(330px,.72fr); gap:30px; }
    .hero-v4 h1 { font-size:clamp(50px,7vw,76px); }
    .hero-v4-mark svg { width:min(100%,480px); }
    .hero-v4-agent-group { gap:26px; }
}
@media (max-width:820px) {
    .hero-v4 {
        min-height:auto;
        padding:48px 18px 28px;
    }
    .hero-v4-main { grid-template-columns:1fr; gap:34px; }
    .hero-v4-copy { max-width:none; }
    .hero-v4-mark { padding:0; }
    .hero-v4-mark svg { width:min(100%,460px); }
    .hero-v4-mark-caption { margin-top:16px; }
    .hero-v4-agents { margin-top:28px; }
    .hero-v4-agent-label strong { display:none; }
    .hero-v4-agent-group { gap:22px; }
}
@media (max-width:560px) {
    .hero-v4 { padding:38px 16px 24px; }
    .hero-v4 h1 { font-size:clamp(44px,15vw,66px); }
    .hero-v4 h1 span { margin-top:10px; }
    .hero-v4 h2 { margin-top:15px; font-size:21px; }
    .hero-v4-lead { font-size:15px; }
    .hero-v4-body { font-size:13.5px; }
    .hero-v4-principle { font-size:13px; }
    .hero-v4-tags { margin-top:16px; }
    .hero-v4-actions .btn { width:100%; justify-content:center; }
    .hero-v4-links { flex-direction:column; align-items:flex-start; gap:7px; }
    .hero-v4-mark-caption { grid-template-columns:1fr 1fr; row-gap:10px; }
    .hero-v4-agent-group { gap:18px; }
    .hero-v4-agent-group a { font-size:10px; }
    .hero-v4-agent-group img { width:30px; height:30px; }
}
@media (prefers-reduced-motion:reduce) {
    .hero-v4-marquee-track { animation:none; transform:none; }
}

/* Persistent controls stay physically left in both LTR and RTL documents. */
html[dir="rtl"] .site-utility,
html[dir="rtl"] .back-to-top {
    left: 18px;
    right: auto;
}
@media (max-width: 768px) {
    .site-utility { left: 12px; top: 76px; }
    .back-to-top { left: 12px; bottom: 16px; }
    html[dir="rtl"] .site-utility,
    html[dir="rtl"] .back-to-top { left: 12px; right: auto; }
}


/* ===== QUICK LOAD TRANSITION ===== */
.site-intro {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    background: var(--bound-bg);
    color: var(--bound-heading);
    transition: opacity .42s ease, visibility .42s ease;
}
.site-intro.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.site-intro-mark { width: min(180px, 42vw); transform: scale(.88); opacity: 0; animation: siteIntroMark .48s cubic-bezier(.2,.75,.25,1) .06s forwards; }
.site-intro-mark svg { display:block; width:100%; height:auto; }
.site-intro-label {
    position:absolute;
    margin-top:150px;
    font: 600 11px/1 var(--font-mono);
    letter-spacing:.18em;
    color:var(--bound-muted);
    opacity:0;
    animation:siteIntroLabel .38s ease .16s forwards;
}
.site-intro-label span { color:var(--bound-accent); }
@keyframes siteIntroMark { to { opacity:1; transform:scale(1); } }
@keyframes siteIntroLabel { to { opacity:1; } }
@media (prefers-reduced-motion: reduce) {
    .site-intro { display:none !important; }
}

/* Persian page keeps the English page's physical composition: copy left, mark right. */
html[dir="rtl"] .hero-v4-main { direction:ltr; }
html[dir="rtl"] .hero-v4-copy { direction:rtl; text-align:right; }
html[dir="rtl"] .hero-v4-copy .hero-v4-actions,
html[dir="rtl"] .hero-v4-copy .hero-v4-tags { direction:rtl; }
html[dir="rtl"] .hero-v4-links { direction:rtl; }
html[dir="rtl"] .hero-v4-mark { direction:ltr; }
html[dir="rtl"] .hero-v4-agents { direction:ltr; }
html[dir="rtl"] .hero-v4-agent-label { direction:rtl; text-align:right; }
html[dir="rtl"] .hero-v4-marquee-track { direction:ltr; }
@media (max-width:820px) {
    html[dir="rtl"] .hero-v4-main { direction:ltr; }
    html[dir="rtl"] .hero-v4-copy { text-align:right; }
}

/* Keep light mode atmospheric, not white: preserve the BOUND blue/cyan/amber accents. */
[data-theme="light"] body,
[data-theme="light"] .grid-bg { background-color:var(--bound-bg); }
[data-theme="light"] .hero-v4::before {
    background: radial-gradient(circle at 18% 22%, rgba(37,99,235,.055), transparent 34%),
                radial-gradient(circle at 82% 68%, rgba(8,145,178,.045), transparent 36%);
}

/* ===== VISIBLE HERO MARK MOTION ===== */
.hero-v4-mark-animated{position:relative}.hero-v4-mark-animated::before{content:"";position:absolute;left:50%;top:50%;width:min(430px,72%);height:2px;transform:translate(-50%,-50%) scaleX(0);background:linear-gradient(90deg,transparent,var(--bound-accent),var(--bound-cyan),var(--brand-orange),transparent);box-shadow:0 0 18px rgba(34,211,238,.28);opacity:0;pointer-events:none;animation:boundHeroSignal 1.15s cubic-bezier(.2,.7,.2,1) .28s forwards}.hero-v4-mark-svg{transform-origin:center;animation:boundHeroMarkIn .9s cubic-bezier(.16,1,.3,1) .12s both}.hero-v4-mark-caption{animation:boundHeroCaption .6s ease .65s both}@keyframes boundHeroMarkIn{0%{opacity:0;transform:scale(.72);filter:blur(5px)}70%{opacity:1;transform:scale(1.035);filter:blur(0)}100%{opacity:1;transform:scale(1);filter:blur(0)}}@keyframes boundHeroSignal{0%{opacity:0;transform:translate(-50%,-50%) scaleX(0)}35%{opacity:.9}100%{opacity:0;transform:translate(-50%,-50%) scaleX(1)}}@keyframes boundHeroCaption{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@media (prefers-reduced-motion:reduce){.hero-v4-mark-svg,.hero-v4-mark-caption,.hero-v4-mark-animated::before{animation:none!important;opacity:1!important;transform:none!important;filter:none!important}}
