  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  :root {
    --accent: #1877F2;
    --accent-lt: #E7F3FF;
    --tx: #1C1E21;
    --tx2: #3B3F45;
    --txm: #65676B;
    --bg: #F0F2F5;
    --card: #ffffff;
    --border: #CED0D4;
    --sidebar-w: 264px;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  }
  [data-theme="dark"] {
    --tx: #f1f5f9; --tx2: #cbd5e1; --txm: #94a3b8;
    --bg: #0f172a; --card: #1e293b; --border: #334155;
    --accent-lt: rgba(24,119,242,0.15);
    --arch-neutral-fill: rgba(255,255,255,0.03);
    --arch-neutral-stroke: rgba(255,255,255,0.12);
    --arch-db-fill: rgba(24,119,242,0.12);
    --arch-meta-fill: rgba(100,116,139,0.12);
    --arch-arrow: #64748b;
    --arch-label: #f1f5f9;
    --arch-sublabel: #94a3b8;
    --arch-accent-sub: rgba(255,255,255,0.8);
  }
  :root {
    --arch-neutral-fill: #f8fafc;
    --arch-neutral-stroke: #e2e8f0;
    --arch-db-fill: #E7F3FF;
    --arch-meta-fill: #f8fafc;
    --arch-arrow: #94a3b8;
    --arch-label: #0f172a;
    --arch-sublabel: #64748b;
    --arch-accent-sub: rgba(255,255,255,0.9);
  }
  html { scroll-behavior: smooth; }
  body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--tx); font-size: 15px; line-height: 1.6; display: flex; min-height: 100vh; }

  .sidebar { width: var(--sidebar-w); background: #111f33; position: fixed; top: 0; left: 0; bottom: 0; overflow-y: auto; display: flex; flex-direction: column; z-index: 100; }
  .sb-brand { padding: 22px 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .sb-brand .logo { font-size: 1.15rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; text-decoration: none; display: block; }
  .sb-brand .logo .logo-tld { color: #5ec7f7; }
  .sb-brand small { display: block; font-size: 0.67rem; color: rgba(255,255,255,0.4); margin-top: 3px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.07em; }
  .sb-section { padding: 16px 20px 4px; font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.25); margin-top: 4px; }
  .sb-link { display: flex; align-items: center; gap: 10px; padding: 9px 20px; color: rgba(255,255,255,0.6); text-decoration: none; font-size: 0.83rem; font-weight: 500; transition: background 0.1s, color 0.1s; border-left: 3px solid transparent; }
  .sb-link:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.9); }
  .sb-link.active { background: rgba(24,119,242,0.22); color: #fff; border-left-color: #1877F2; }
  .sb-link i { width: 16px; text-align: center; font-size: 0.8rem; flex-shrink: 0; }

  .main { margin-left: var(--sidebar-w); flex: 1; min-width: 0; }
  .topbar { background: var(--card); border-bottom: 1px solid var(--border); padding: 14px 48px; position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
  .topbar h1 { font-size: 1rem; font-weight: 700; color: var(--tx); }
  .topbar .badge { font-size: 0.68rem; font-weight: 600; background: var(--accent-lt); color: var(--accent); padding: 2px 8px; border-radius: 99px; border: 1px solid #C5DFFB; }
  .lang-switch { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); text-decoration: none; line-height: 1; flex-shrink: 0; transition: border-color 0.1s, background 0.1s, transform 0.1s; }
  .lang-switch:hover { border-color: #C5DFFB; background: var(--accent-lt); transform: translateY(-1px); }
  .flag-icon { display: inline-flex; align-items: center; justify-content: center; line-height: 0; flex-shrink: 0; }
  .flag-icon svg { display: block; width: 22px; height: auto; border-radius: 2px; border: 1px solid rgba(0,0,0,0.08); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
  .content { max-width: 860px; margin: 0 auto; padding: 48px 48px 100px; text-align: left; }

  .section { margin-bottom: 72px; scroll-margin-top: 64px; }
  .section-header { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 2px solid var(--border); }
  .section-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
  .section-icon.blue   { background:#E7F3FF;color:#1877F2 }
  .section-icon.green  { background:#E7F3FF;color:#1877F2 }
  .section-icon.navy   { background:#E8EEF5;color:#0A66C2 }
  .section-icon.purple { background:#E8EEF5;color:#0A66C2 }
  .section-icon.teal   { background:#EDF2F7;color:#3B4F63 }
  .section-icon.amber  { background:#EDF2F7;color:#3B4F63 }
  .section-icon.slate  { background:#F0F2F5;color:#4B5563 }
  .section-title { font-size: 1.5rem; font-weight: 800; color: var(--tx); letter-spacing: -0.02em; }
  .section-subtitle { font-size: 0.82rem; color: var(--txm); font-weight: 500; margin-top: 2px; }
  .intro { font-size: 0.97rem; color: var(--tx2); line-height: 1.8; margin-bottom: 24px; }

  .hero { background: linear-gradient(135deg, #1B2F45 0%, #0F1C2E 100%); border-radius: 14px; padding: 36px 40px; margin-bottom: 36px; color: #fff; }
  .hero h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 10px; }
  .hero p { font-size: 0.92rem; color: rgba(255,255,255,0.75); line-height: 1.7; max-width: 640px; }

  .intro-shot { margin: 0 0 24px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
  .intro-shot img {
    display: block;
    width: 100%;
    height: auto;
    filter: grayscale(100%);
  }
  .intro-shot figcaption { padding: 12px 16px; font-size: 0.8rem; color: var(--txm); line-height: 1.55; border-top: 1px solid var(--border); background: var(--bg); text-align: left; }
  .intro-shot figcaption strong { color: var(--tx2); }

  .callout { border-radius: 8px; padding: 13px 17px; font-size: 0.85rem; line-height: 1.6; display: flex; gap: 11px; align-items: flex-start; margin-bottom: 18px; text-align: left; }
  .callout span { text-align: left; flex: 1; min-width: 0; }
  .callout.info  { background: #E7F3FF; border: 1px solid #C5DFFB; color: #1B4F8C; }
  .callout.tip   { background: #E7F3FF; border: 1px solid #C5DFFB; color: #1B4F8C; }
  .callout.warn  { background: #F3F4F6; border: 1px solid #CED0D4; color: #4B5563; }
  .callout.highlight { background: linear-gradient(135deg, #E7F3FF, #F0F2F5); border: 1.5px solid #1877F2; color: var(--tx2); font-size: 0.9rem; }
  .callout i { margin-top: 2px; flex-shrink: 0; }

  .type-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 700; padding: 4px 12px; border-radius: 99px; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.04em; }
  .type-badge.green  { background:#E7F3FF;color:#1877F2;border:1px solid #C5DFFB }
  .type-badge.purple { background:#E8EEF5;color:#0A66C2;border:1px solid #B8C9DC }
  .type-badge.teal   { background:#EDF2F7;color:#3B4F63;border:1px solid #CED0D4 }

  .faq-list { display: flex; flex-direction: column; gap: 12px; }
  .faq-item { background: var(--card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
  .faq-q { padding: 14px 20px; font-size: 0.9rem; font-weight: 700; color: var(--tx); background: var(--bg); border-bottom: none; display: flex; gap: 10px; align-items: center; cursor: pointer; user-select: none; transition: background 0.12s; }
  .faq-q:hover { background: var(--accent-lt); }
  .faq-q::before { display: none; }
  .faq-num { background: var(--accent); color: #fff; font-size: 0.68rem; font-weight: 800; min-width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .faq-chevron { margin-left: auto; font-size: 0.65rem; color: var(--txm); flex-shrink: 0; transition: transform 0.2s ease; }
  .faq-item.is-open .faq-q { border-bottom: 1px solid var(--border); }
  .faq-item.is-open .faq-chevron { transform: rotate(180deg); }
  .faq-a { display: none; padding: 16px 20px; font-size: 0.875rem; color: var(--tx2); line-height: 1.7; }
  .faq-item.is-open .faq-a { display: block; }
  .faq-a p + p { margin-top: 10px; }
  .faq-a ul { margin: 10px 0 0 18px; display: flex; flex-direction: column; gap: 6px; }
  .faq-a li { line-height: 1.55; }
  .faq-a strong { color: var(--tx); }
  .faq-a code { background: var(--bg); border: 1px solid var(--border); padding: 1px 6px; border-radius: 4px; font-size: 0.8rem; }

  .plan-table, .summary-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin: 12px 0; }
  .plan-table th, .summary-table th { background: var(--bg); padding: 10px 14px; text-align: left; font-size: 0.78rem; font-weight: 700; color: var(--txm); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 2px solid var(--border); }
  .plan-table td, .summary-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--tx2); }
  .plan-table tr:last-child td, .summary-table tr:last-child td { border-bottom: none; }
  .plan-table td:first-child, .summary-table td:first-child { font-weight: 600; color: var(--tx); }
  .glossary-table td:first-child { width: 28%; vertical-align: top; }
  .glossary-cat { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin: 28px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
  .glossary-cat:first-child { margin-top: 0; }

  .detail-block { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 22px 26px; box-shadow: var(--shadow); margin-bottom: 18px; text-align: left; }
  .detail-block h3 { font-size: 0.92rem; font-weight: 700; color: var(--tx); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
  .detail-block h3 i { color: var(--accent); font-size: 0.85rem; }
  .detail-block p { text-align: left; }
  .detail-block ul { list-style: none; display: flex; flex-direction: column; gap: 10px; padding: 0; margin: 0; }
  .detail-block ul li { position: relative; padding-left: 18px; font-size: 0.875rem; color: var(--tx2); line-height: 1.65; text-align: left; }
  .detail-block ul li::before { content: ''; position: absolute; left: 0; top: 0.55em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
  .detail-block code, .intro code, .faq-a code { background: var(--bg); color: var(--tx); border: 1px solid var(--border); padding: 1px 6px; border-radius: 4px; font-size: 0.82em; white-space: nowrap; }

  .steps { counter-reset: step; list-style: none; display: flex; flex-direction: column; gap: 12px; margin: 12px 0; padding: 0; }
  .steps li { position: relative; padding-left: 36px; font-size: 0.875rem; color: var(--tx2); line-height: 1.65; counter-increment: step; text-align: left; }
  .steps li::before { content: counter(step); position: absolute; left: 0; top: 1px; background: var(--accent); color: #fff; font-size: 0.72rem; font-weight: 700; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

  .back-top { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--txm); text-decoration: none; margin-top: 8px; padding: 5px 10px; border-radius: 6px; border: 1px solid var(--border); transition: color 0.1s, border-color 0.1s; }
  .back-top:hover { color: var(--accent); border-color: #C5DFFB; }

  .arch-diagram { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px 16px; box-shadow: var(--shadow); margin-bottom: 18px; overflow-x: auto; }
  .arch-diagram svg { width: 100%; max-width: 800px; display: block; margin: 0 auto; height: auto; }
  .arch-diagram .arch-neutral { fill: var(--arch-neutral-fill); stroke: var(--arch-neutral-stroke); }
  .arch-diagram .arch-db { fill: var(--arch-db-fill); stroke: var(--accent); }
  .arch-diagram .arch-meta { fill: var(--arch-meta-fill); stroke: #64748b; }
  .arch-diagram .arch-label { fill: var(--arch-label); }
  .arch-diagram .arch-sublabel { fill: var(--arch-sublabel); }
  .arch-diagram .arch-accent-sub { fill: var(--arch-accent-sub); }
  .arch-diagram .arch-meta-label { fill: #475569; }
  [data-theme="dark"] .arch-diagram .arch-meta-label { fill: #94a3b8; }
  .arch-diagram .arch-db-accent { fill: #1877F2; }
  .arch-diagram .arch-arrow { stroke: var(--arch-arrow); }
  .arch-diagram .arch-arrow-head { fill: var(--arch-arrow); }

  .arch-idea { text-align: center; font-size: 1.05rem; font-weight: 700; color: var(--tx); line-height: 1.5; margin: 4px 0 22px; padding: 14px 20px; background: var(--accent-lt); border: 1px solid #C5DFFB; border-radius: 10px; }
  .arch-idea span { color: var(--accent); }
  [data-theme="dark"] .arch-idea { border-color: rgba(24,119,242,0.35); }

  .arch-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
  .arch-step { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; }
  .arch-step::after { content: '→'; position: absolute; right: -14px; top: 50%; transform: translateY(-50%); color: var(--txm); font-size: 1rem; font-weight: 700; z-index: 1; }
  .arch-step:last-child::after { display: none; }
  .arch-step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 0.78rem; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; flex-shrink: 0; }
  .arch-step-icon { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 0.95rem; margin-bottom: 10px; }
  .arch-step-icon.neutral { background: var(--bg); color: var(--txm); border: 1px solid var(--border); }
  .arch-step-icon.blue   { background: #E7F3FF; color: #1877F2; }
  .arch-step-icon.green  { background: #EDF2F7; color: #3B4F63; }
  .arch-step-icon.amber  { background: #EDF2F7; color: #3B4F63; }
  [data-theme="dark"] .arch-step-icon.blue  { background: rgba(24,119,242,0.2); }
  [data-theme="dark"] .arch-step-icon.green { background: rgba(100,116,139,0.2); }
  [data-theme="dark"] .arch-step-icon.amber { background: rgba(100,116,139,0.2); }
  .arch-step-title { font-size: 0.82rem; font-weight: 800; color: var(--tx); margin-bottom: 6px; line-height: 1.3; }
  .arch-step-hook { font-size: 0.78rem; font-weight: 600; color: var(--accent); margin-bottom: 6px; line-height: 1.35; }
  .arch-step-desc { font-size: 0.74rem; color: var(--txm); line-height: 1.5; }
  .arch-step-tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 8px; }
  .arch-step-tag { font-size: 0.62rem; font-weight: 600; padding: 2px 7px; border-radius: 99px; background: var(--bg); border: 1px solid var(--border); color: var(--txm); }

  @media (max-width: 900px) {
    .arch-flow { grid-template-columns: 1fr; gap: 8px; }
    .arch-step::after { content: '↓'; right: auto; left: 50%; top: auto; bottom: -14px; transform: translateX(-50%); }
    .arch-step:last-child::after { display: none; }
  }

  .module-flow-block { margin-bottom: 28px; }
  .module-flow-title { font-size: 0.92rem; font-weight: 700; color: var(--tx); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
  .module-flow-title i { color: var(--accent); font-size: 0.85rem; }
  .module-flow { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 24px 16px; box-shadow: var(--shadow); display: flex; justify-content: center; overflow-x: auto; }
  .module-flow svg { width: 100%; max-width: 840px; height: auto; font-family: 'Inter', sans-serif; }

  [data-theme="dark"] .module-flow svg text[fill="#334155"] { fill: var(--tx2); }
  [data-theme="dark"] .module-flow svg rect[fill="#eff6ff"] { fill: rgba(24,119,242,0.15); }
  [data-theme="dark"] .module-flow svg rect[fill="#fff7ed"] { fill: rgba(234,88,12,0.12); }
  [data-theme="dark"] .module-flow svg rect[fill="#f8fafc"] { fill: rgba(100,116,139,0.15); }
  [data-theme="dark"] .module-flow svg rect[fill="#fdf2f8"] { fill: rgba(219,39,119,0.12); }
  [data-theme="dark"] .module-flow svg rect[fill="#faf5ff"] { fill: rgba(10,102,194,0.15); }
  [data-theme="dark"] .module-flow svg rect[fill="#fffbeb"] { fill: rgba(217,119,6,0.12); }
  [data-theme="dark"] .module-flow svg rect[fill="#eef2ff"] { fill: rgba(99,102,241,0.12); }
  [data-theme="dark"] .module-flow svg path.arrow-blue { stroke: #3b82f6; }
  [data-theme="dark"] .module-flow svg path.arrow-orange { stroke: #fb923c; }
  [data-theme="dark"] .module-flow svg path.arrow-green { stroke: #94a3b8; }
  [data-theme="dark"] .module-flow svg path.arrow-pink { stroke: #f472b6; }
  [data-theme="dark"] .module-flow svg path.arrow-teal { stroke: #818cf8; }

  .code-sample { background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: 16px 18px; font-family: 'Courier New', Courier, monospace; font-size: 0.78rem; line-height: 1.55; overflow-x: auto; margin: 12px 0; border: 1px solid var(--border); }
  .code-sample .cm { color: #7dd3fc; }
  .code-sample .sel { color: #fbbf24; }
  .code-sample .prop { color: #93c5fd; }
  .code-sample .val { color: #fda4af; }
  [data-theme="dark"] .code-sample { background: #020617; }

  .brand-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 18px; }
  .brand-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 16px; box-shadow: var(--shadow); }
  .brand-card-tab { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin-bottom: 6px; }
  .brand-card-title { font-size: 0.92rem; font-weight: 800; color: var(--tx); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
  .brand-card-title i { color: var(--accent); font-size: 0.85rem; width: 16px; text-align: center; }
  .brand-card-desc { font-size: 0.8rem; color: var(--tx2); line-height: 1.55; }

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

  @media (max-width: 900px) {
    .content { padding: 32px 20px 80px; }
    .topbar { padding: 14px 20px; }
  }
