        :root {
            --primary: #10b981;
            --primary-dark: #059669;
            --primary-soft: #d1fae5;
            --primary-light: #ecfdf5;
            --slate-900: #0f172a;
            --slate-800: #1e293b;
            --slate-700: #334155;
            --slate-500: #64748b;
            --slate-300: #cbd5e1;
            --slate-100: #f1f5f9;
            --white: #ffffff;
            --radius-lg: 16px;
            --radius-md: 12px;
            --radius-sm: 8px;
            --shadow-card: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.05);
            --shadow-hover: 0 10px 15px -3px rgba(5,150,105,0.08), 0 4px 6px -4px rgba(5,150,105,0.04);
            --transition: 0.2s ease;
        }
        * { box-sizing: border-box; margin: 0; padding: 0; }
        body {
            font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            color: var(--slate-800); line-height: 1.6; background: var(--white);
            -webkit-font-smoothing: antialiased;
        }
        header {
            position: sticky; top: 0; background: rgba(255,255,255,0.92);
            backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
            border-bottom: 1px solid var(--slate-300); z-index: 1000;
        }
        .header-box {
            max-width: 1200px; margin: 0 auto;
            display: flex; align-items: center; justify-content: space-between;
            padding: 14px 24px; gap: 20px;
        }
        .brand-logo {
            display: flex; align-items: center; gap: 10px;
            text-decoration: none; color: var(--slate-900);
            font-weight: 700; font-size: 1.35rem; letter-spacing: -0.3px; white-space: nowrap;
        }
        .brand-logo img { width: 36px; height: 36px; }
        nav { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
        nav a {
            text-decoration: none; color: var(--slate-700);
            font-size: 0.95rem; font-weight: 500; transition: color var(--transition); white-space: nowrap;
        }
        nav a:hover { color: var(--primary-dark); }
        nav a.current-tab {
            color: var(--primary); font-weight: 600;
            border-bottom: 2px solid var(--primary); padding-bottom: 4px;
        }
        .nav-accent {
            background-color: var(--primary); color: white !important;
            padding: 8px 18px; border-radius: 20px; font-size: 0.9rem;
            transition: background-color var(--transition);
        }
        .nav-accent:hover { background-color: var(--primary-dark); color: white !important; }

        .container {
            max-width: 1100px; margin: 0 auto; padding: 0 24px;
        }

        /* Hero */
        .rules-hero {
            text-align: center; padding: 70px 24px 50px;
            background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
        }
        .rules-hero .badge {
            display: inline-block; background: var(--primary-soft); color: var(--primary-dark);
            font-weight: 600; padding: 6px 18px; border-radius: 20px; font-size: 0.85rem;
            margin-bottom: 20px;
        }
        .rules-hero h1 {
            font-size: clamp(2.2rem, 5vw, 2.8rem); color: var(--slate-900);
            letter-spacing: -0.6px; margin-bottom: 16px;
        }
        .rules-hero .lead {
            font-size: 1.15rem; color: var(--slate-500); max-width: 800px; margin: 0 auto 30px;
        }
        .hero-nav-links {
            display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
        }
        .hero-nav-links a {
            background: var(--white); border: 1px solid var(--slate-300);
            padding: 8px 24px; border-radius: 30px; text-decoration: none;
            color: var(--slate-700); font-weight: 500; transition: all var(--transition);
        }
        .hero-nav-links a:hover { border-color: var(--primary); color: var(--primary); }

        section { padding: 70px 0; }
        h2 {
            font-size: 2rem; color: var(--slate-900); text-align: center;
            margin-bottom: 16px; letter-spacing: -0.4px;
        }
        h2::after {
            content: ''; display: block; width: 50px; height: 4px;
            background: var(--primary); margin: 16px auto 30px; border-radius: 2px;
        }
        .section-desc {
            text-align: center; color: var(--slate-500); font-size: 1.05rem;
            max-width: 700px; margin: 0 auto 40px;
        }

        /* 原理流程图 */
        .principle-flow {
            display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 24px; margin-top: 30px;
        }
        .flow-card {
            background: var(--white); border: 1px solid var(--slate-300);
            border-radius: var(--radius-lg); padding: 28px 20px; text-align: center;
            transition: box-shadow var(--transition);
        }
        .flow-card:hover { box-shadow: var(--shadow-hover); }
        .flow-icon { font-size: 2.2rem; margin-bottom: 12px; }
        .flow-card h4 { font-size: 1.2rem; color: var(--slate-800); margin-bottom: 8px; }
        .flow-card p { font-size: 0.9rem; color: var(--slate-500); }

        /* 规则类型表格 */
        .rules-table {
            width: 100%; border-collapse: collapse; background: var(--white);
            border-radius: var(--radius-md); overflow: hidden;
            box-shadow: var(--shadow-card); margin-top: 30px;
        }
        .rules-table th, .rules-table td {
            padding: 14px 16px; border-bottom: 1px solid var(--slate-300);
            font-size: 0.95rem; text-align: left;
        }
        .rules-table th { background: var(--slate-100); font-weight: 700; color: var(--slate-800); }
        .rules-table td:first-child { font-family: monospace; font-weight: 600; color: var(--slate-800); }
        .rules-table tr:last-child td { border-bottom: none; }

        /* 策略组卡片 */
        .strategy-grid {
            display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 24px; margin-top: 30px;
        }
        .strategy-card {
            background: var(--white); border: 1px solid var(--slate-300);
            border-radius: var(--radius-lg); padding: 28px 20px;
            transition: box-shadow var(--transition);
        }
        .strategy-card:hover { box-shadow: var(--shadow-hover); }
        .strategy-card h4 { font-size: 1.25rem; color: var(--slate-800); margin-bottom: 10px; }
        .strategy-card p { font-size: 0.95rem; color: var(--slate-500); }

        /* 代码演示 */
        .code-sample {
            background: var(--slate-900); color: #e2e8f0; font-family: 'Fira Code', monospace;
            padding: 24px; border-radius: var(--radius-md); overflow-x: auto;
            margin: 30px 0; position: relative; border-left: 4px solid var(--primary);
        }
        .code-sample pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: 0.9rem; line-height: 1.6; }
        .copy-btn {
            position: absolute; top: 10px; right: 10px;
            background: var(--slate-700); color: white; border: none;
            padding: 5px 14px; border-radius: 4px; cursor: pointer; font-size: 0.8rem;
            transition: background var(--transition);
        }
        .copy-btn:hover { background: var(--primary); }

        /* 场景模板 */
        .template-grid {
            display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            gap: 24px; margin-top: 30px;
        }
        .template-card {
            background: var(--white); border: 1px solid var(--slate-300);
            border-radius: var(--radius-lg); padding: 24px;
            text-align: center; transition: box-shadow var(--transition);
        }
        .template-card:hover { box-shadow: var(--shadow-hover); }
        .template-card h5 { font-size: 1.15rem; color: var(--slate-800); margin-bottom: 10px; }
        .template-card p { font-size: 0.9rem; color: var(--slate-500); margin-bottom: 16px; }
        .btn-template {
            display: inline-block; background: var(--primary); color: white;
            padding: 10px 24px; border-radius: 30px; text-decoration: none;
            font-weight: 600; transition: background var(--transition);
        }
        .btn-template:hover { background: var(--primary-dark); }

        /* 调试建议 */
        .debug-tips {
            display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            gap: 20px; margin-top: 30px;
        }
        .tip-item {
            background: var(--primary-light); border: 1px solid var(--primary-soft);
            border-radius: var(--radius-md); padding: 20px;
        }
        .tip-item strong { color: var(--primary-dark); display: block; margin-bottom: 6px; }

        /* 底部 */
        footer {
            background: var(--slate-900); color: #94a3b8;
            padding: 60px 24px 30px; border-top: 4px solid var(--primary);
        }
        .footer-wrapper { max-width: 1100px; margin: 0 auto; }
        .footer-grid {
            display: grid; grid-template-columns: repeat(4, 1fr);
            gap: 36px; border-bottom: 1px solid var(--slate-700);
            padding-bottom: 36px; margin-bottom: 28px;
        }
        .footer-section h5 { color: white; font-size: 1rem; margin-bottom: 20px; font-weight: 600; }
        .footer-section ul { list-style: none; }
        .footer-section ul li { margin-bottom: 12px; }
        .footer-section ul li a { color: #94a3b8; text-decoration: none; font-size: 0.9rem; transition: color var(--transition); }
        .footer-section ul li a:hover { color: var(--primary); }
        .footer-legal {
            display: flex; justify-content: space-between; align-items: center;
            flex-wrap: wrap; gap: 16px; font-size: 0.85rem; color: #64748b;
        }

        @media (max-width: 768px) {
            .header-box { flex-direction: column; gap: 16px; }
            nav { justify-content: center; gap: 20px; }
            .footer-grid { grid-template-columns: repeat(2, 1fr); }
        }
        @media (max-width: 500px) {
            .footer-grid { grid-template-columns: 1fr; }
        }