/* AI简课 / PlainAI — Design System v3 (Light) */
/* Soft frosted glass on light · purple primary, warm gold highlight */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Sora:wght@600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #f6f4fa;
  --bg-2: #efebf6;
  --surface: #ffffff;
  --glass: rgba(255,255,255,0.72);
  --glass-hi: rgba(255,255,255,0.88);
  --card: #ffffff;
  --border: #e7e2f0;
  --border-soft: #efecf6;
  --border-strong: #d6cfe6;
  --text: #2c2a33;
  --heading: #1c1b22;
  --text-muted: #5b5766;
  --text-dim: #8c8796;
  --accent: #6750a4;          /* purple — primary */
  --accent-ink: #ffffff;
  --accent-hi: #543f87;
  --accent-2: #8a6d12;        /* readable gold/amber on white */
  --accent-soft: #ece5fa;     /* light purple tint */
  --gold: #c9a74d;            /* warm highlight (decorative) */
  --success: #2e9e6b;
  --warning: #b07d0a;
  --danger: #c0392b;
  --info: #6750a4;
  --radius-sm: 0.5rem;
  --radius: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --shadow: 0 6px 22px rgba(60,40,100,0.09);
  --shadow-lg: 0 16px 44px rgba(60,40,100,0.14);
  --glow-p: 0 8px 26px rgba(103,80,164,0.22);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-display: 'Sora', 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-w: 1200px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 90% -10%, rgba(103,80,164,0.10) 0%, transparent 42%),
    radial-gradient(circle at -5% 105%, rgba(201,167,77,0.08) 0%, transparent 42%);
  background-attachment: fixed;
}
::selection { background: var(--accent-soft); color: var(--accent-hi); }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 780px; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hi); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.01em; color: var(--heading); }
code, kbd { font-family: var(--font-mono); }

/* ==================== HEADER ==================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246,244,250,0.80);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--heading); font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; }
.brand:hover { color: var(--heading); }
.brand-mark { width: 34px; height: 34px; flex-shrink: 0; overflow: hidden; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-name { white-space: nowrap; }

.site-nav { display: flex; align-items: center; gap: 4px; list-style: none; flex-wrap: wrap; }
.nav-text { padding: 7px 14px; border-radius: var(--radius-sm); color: var(--text-muted); font-size: 0.9rem; font-weight: 500; transition: all var(--transition); }
.nav-text:hover { color: var(--accent); background: var(--accent-soft); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 20px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink) !important; font-weight: 700; font-size: 0.9rem;
  transition: box-shadow var(--transition), transform var(--transition);
}
.nav-cta:hover { box-shadow: var(--glow-p); transform: translateY(-1px); }
.nav-cta .nav-text { color: var(--accent-ink); font-weight: 700; }
.nav-cta:hover .nav-text { color: var(--accent-ink); background: transparent; }

.lang-switch { position: relative; }
.lang-switch summary { cursor: pointer; padding: 7px 12px; border-radius: var(--radius-sm); font-size: 0.85rem; color: var(--text-muted); list-style: none; }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover { color: var(--accent); background: var(--accent-soft); }
.lang-dropdown {
  position: absolute; right: 0; top: 120%;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px 6px; min-width: 150px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; z-index: 200;
}
.lang-dropdown a { padding: 7px 14px; border-radius: 6px; color: var(--text-muted); font-size: 0.85rem; }
.lang-dropdown a:hover { background: var(--accent-soft); color: var(--accent); }

/* ==================== HERO / ARTICLE HEADER ==================== */
.hero { padding: 88px 0 56px; position: relative; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; color: var(--heading); line-height: 1.12; margin-bottom: 18px; letter-spacing: -0.02em; }
.hero .subtitle { font-size: 1.15rem; color: var(--text-muted); max-width: 620px; margin: 0 auto 32px; }
.article-header { padding: 64px 0 28px; border-bottom: 1px solid var(--border); }
.article-header h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 800; color: var(--heading); line-height: 1.18; letter-spacing: -0.02em; }
.article-header .subtitle { font-size: 1.1rem; color: var(--text-muted); margin-top: 12px; }
.article-meta { display: flex; gap: 16px; margin-top: 12px; color: var(--text-dim); font-size: 0.85rem; }

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 28px; border-radius: 999px;
  font-weight: 600; font-size: 1rem; cursor: pointer; border: 1px solid transparent; transition: all var(--transition);
}
.btn-primary { background: var(--accent); color: var(--accent-ink); border: none; }
.btn-primary:hover { box-shadow: var(--glow-p); transform: translateY(-2px); color: var(--accent-ink); }
.btn-outline, .btn-secondary { background: var(--surface); color: var(--accent); border-color: var(--border-strong); }
.btn-outline:hover, .btn-secondary:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-hi); }

/* ==================== CARDS ==================== */
.card-grid, .topic-grid, .grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 22px; margin-top: 32px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; transition: all var(--transition); position: relative; overflow: hidden; box-shadow: var(--shadow);
}
.card:hover { border-color: rgba(103,80,164,0.35); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-icon { font-size: 2rem; margin-bottom: 12px; display: inline-block; }
.card h3 { font-size: 1.18rem; font-weight: 700; color: var(--heading); margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.65; }
.card-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 16px; font-weight: 600; font-size: 0.9rem; color: var(--accent); }
.card-link::after { content: ' →'; transition: transform var(--transition); }
.card:hover .card-link::after { transform: translateX(4px); }
.card-accent { border-color: rgba(46,158,107,0.4); }
.card-link-success { color: var(--success); }

/* Path cards */
.path-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; margin-top: 32px; }
.path-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; transition: all var(--transition); box-shadow: var(--shadow); }
.path-card:hover { border-color: rgba(103,80,164,0.35); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
a.path-card { text-decoration: none; display: block; text-align: left; }
.path-step { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--accent), #8467c9); color: #fff; font-family: var(--font-display); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; font-size: 0.95rem; }
.path-card h3 { font-size: 1.08rem; color: var(--heading); margin-bottom: 8px; }
.path-card p { color: var(--text-muted); font-size: 0.92rem; }

/* ==================== ARTICLE BODY ==================== */
main.container { padding-top: 8px; padding-bottom: 64px; }
main h2 { font-size: clamp(1.4rem, 2.6vw, 1.7rem); font-weight: 700; color: var(--heading); margin: 44px 0 16px; }
main h3 { font-size: 1.18rem; font-weight: 600; color: var(--heading); margin: 28px 0 12px; }
main p { margin-bottom: 16px; }
main ul, main ol { margin: 0 0 20px 24px; }
main li { margin-bottom: 8px; }
main strong { color: var(--heading); }
.article-body { padding: 40px 0 60px; }
.article-body h2 { font-size: 1.5rem; font-weight: 700; color: var(--heading); margin: 40px 0 16px; }
.article-body h3 { font-size: 1.15rem; font-weight: 600; color: var(--heading); margin: 28px 0 12px; }

/* TOC */
.toc, details.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px 26px; margin: 28px 0; box-shadow: var(--shadow); }
.toc h2 { font-size: 1.05rem; margin: 0 0 12px; color: var(--heading); }
.toc h2::before { content: '◇ '; color: var(--accent); }
.toc ol { margin: 0 0 0 20px; }
.toc li { margin-bottom: 7px; }
.toc a { color: var(--accent); }
.toc a:hover { color: var(--accent-hi); }
details.toc summary { cursor: pointer; font-weight: 600; color: var(--heading); list-style: none; }
details.toc summary::-webkit-details-marker { display: none; }

/* Concept box */
.concept-box { background: var(--accent-soft); border: 1px solid #ddd0f5; border-left: 3px solid var(--accent); border-radius: var(--radius-lg); padding: 22px 26px; margin: 24px 0; }
.concept-box strong { color: var(--heading); }
.concept-box > strong:first-child { color: var(--accent); }
.concept-box h3 { margin: 0 0 8px; font-size: 1.1rem; }

/* Analogy box */
.analogy-box { background: #f3eefb; border-left: 4px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; padding: 16px 22px; margin: 22px 0; }

/* Callout */
.callout { border-radius: var(--radius); padding: 18px 22px; margin: 22px 0; font-size: 0.96rem; }
.callout h3 { margin: 0 0 8px; font-size: 1.05rem; }
.callout-info { background: #f1ecfb; border: 1px solid #ddd0f5; }
.callout-warning { background: #fdf6e3; border: 1px solid #f0e0b0; }
.callout-danger { background: #fdecea; border: 1px solid #f5c9c2; }
.callout-success { background: #e9f7f0; border: 1px solid #c2e8d5; }

/* FAQ */
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); margin: 14px 0; padding: 18px 22px; transition: all var(--transition); box-shadow: var(--shadow); }
.faq-item:hover { border-color: rgba(103,80,164,0.30); }
.faq-item h3 { font-size: 1.04rem; color: var(--heading); margin: 0 0 8px; }
.faq-item h3::before { content: 'Q '; color: var(--accent); font-family: var(--font-mono); }
.faq-item p { color: var(--text-muted); margin: 0; font-size: 0.95rem; }
.faq-item summary { cursor: pointer; font-weight: 600; color: var(--heading); list-style: none; font-size: 1rem; display: flex; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-answer { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--border); }

/* Tables */
.table-wrap { overflow-x: auto; margin: 22px 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.compare-table th { background: var(--accent-soft); color: var(--heading); padding: 13px 16px; text-align: left; font-weight: 700; border-bottom: 2px solid var(--accent); white-space: nowrap; }
.compare-table td { padding: 11px 16px; border-bottom: 1px solid var(--border-soft); color: var(--text); }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tbody tr:hover { background: #faf8fd; }

/* Chain flow */
.chain-flow { display: flex; align-items: center; gap: 10px; overflow-x: auto; padding: 16px 0; flex-wrap: wrap; justify-content: center; }
.chain-block, .chain-step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; min-width: 140px; text-align: center; box-shadow: var(--shadow); }
.chain-block h4 { color: var(--heading); font-size: 0.95rem; margin-bottom: 4px; }
.chain-block p { color: var(--text-muted); font-size: 0.85rem; margin: 0; }
.chain-arrow { color: var(--accent); font-size: 1.5rem; font-weight: 700; }

/* Related articles */
.related-articles { margin: 36px 0 16px; }
.related-articles ul { list-style: none; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.related-articles li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin: 0; transition: all var(--transition); box-shadow: var(--shadow); }
.related-articles li:hover { border-color: rgba(103,80,164,0.30); transform: translateX(3px); }
.related-articles li a { display: block; padding: 14px 18px; color: var(--text); font-weight: 500; font-size: 0.93rem; }
.related-articles li a:hover { color: var(--accent); }
.related-link { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: all var(--transition); box-shadow: var(--shadow); }
.related-link:hover { border-color: rgba(103,80,164,0.30); transform: translateX(4px); }
.rl-icon { font-size: 1.4rem; flex-shrink: 0; }
.rl-title { font-weight: 600; font-size: 0.9rem; color: var(--heading); }

/* Checklist */
.checklist { list-style: none; padding-left: 0; margin: 16px 0; }
.checklist li { padding: 8px 0 8px 2px; line-height: 1.7; border-bottom: 1px dashed var(--border); }
.checklist li:last-child { border-bottom: none; }
.checklist strong { color: var(--heading); }

/* Step list */
.step-list { margin: 18px 0; padding-left: 0; list-style: none; counter-reset: step; }
.step-list li { position: relative; padding: 4px 0 16px 44px; margin: 0 0 0 15px; border-left: 2px solid var(--border); }
.step-list li:last-child { border-left-color: transparent; padding-bottom: 0; }
.step-list li::before { counter-increment: step; content: counter(step); position: absolute; left: -16px; top: 0; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), #8467c9); color: #fff; font-family: var(--font-display); font-size: 0.85rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }

/* Trust note */
.trust-note { margin: 40px 0 0; padding: 16px 20px; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--text-dim); }

/* Safety note */
.site-safety-note { background: #fdecea; border: 1px solid #f5c9c2; border-radius: var(--radius); padding: 14px 18px; font-size: 0.85rem; color: var(--text-muted); margin: 22px 0; }

/* ==================== HOMEPAGE ==================== */
.hero-center { text-align: center; }
.hero-badge { display: inline-block; margin-bottom: 22px; padding: 7px 16px; border-radius: 999px; background: var(--accent-soft); border: 1px solid #ddd0f5; color: var(--accent); font-size: 0.82rem; font-weight: 600; }
.hero-center h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; color: var(--heading); line-height: 1.12; margin-bottom: 18px; letter-spacing: -0.02em; }
.hero-lead { font-size: 1.12rem; color: var(--text-muted); line-height: 1.75; margin: 0 auto 28px; max-width: 620px; }
.hero-lead strong { color: var(--accent); }
.hero-cta-row, .hero-cta-group { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.hero-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-top: 30px; }
.hero-chips a { padding: 6px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); font-size: 0.85rem; font-weight: 500; transition: all var(--transition); box-shadow: var(--shadow); }
.hero-chips a:hover { border-color: rgba(103,80,164,0.4); color: var(--accent); }
.hero-meta { margin-top: 24px; font-size: 0.85rem; color: var(--text-dim); }

.section { padding: 60px 0; }
.section-alt { padding: 60px 0; background: var(--bg-2); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.section-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; color: var(--heading); text-align: center; letter-spacing: -0.01em; }
.section-sub { text-align: center; color: var(--text-muted); margin: 10px auto 0; max-width: 620px; font-size: 1rem; }

.tag { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; }
.tag-indigo { background: var(--accent-soft); color: var(--accent); border: 1px solid #ddd0f5; }
.tag-cyan { background: var(--accent-soft); color: var(--accent); border: 1px solid #ddd0f5; }
.tag-purple { background: #e7defa; color: #543f87; border: 1px solid #d4c6f3; }
.tag-new { background: #fbf0d2; color: #8a6d12; border: 1px solid #efdca0; }
.tag-success { background: #e9f7f0; color: var(--success); border: 1px solid #c2e8d5; }
.mt-2 { margin-top: 10px; }

/* Guard module */
.guard { text-align: center; }
.guard-tag { display: inline-block; padding: 5px 14px; border-radius: 999px; background: var(--accent-soft); border: 1px solid #ddd0f5; color: var(--accent); font-size: 0.76rem; font-weight: 600; letter-spacing: 0.03em; }
.guard-title { margin: 16px 0 12px; font-size: clamp(1.3rem, 2.8vw, 1.9rem); font-weight: 800; color: var(--heading); line-height: 1.32; }
.guard-intro { color: var(--text-muted); max-width: 640px; margin: 0 auto 28px; line-height: 1.7; }
.guard-intro strong { color: var(--danger); }
.guard-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; text-align: left; }
.guard-panel { background: var(--surface); border-radius: var(--radius-lg); padding: 22px 24px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.guard-panel h3 { font-size: 1.02rem; font-weight: 700; color: var(--heading); margin-bottom: 12px; }
.guard-panel ul { margin: 0; padding-left: 18px; }
.guard-panel li { margin-bottom: 11px; font-size: 0.9rem; line-height: 1.6; color: var(--text-muted); }
.guard-panel li strong { color: var(--heading); }
.guard-panel code { font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent); background: var(--accent-soft); padding: 1px 6px; border-radius: 5px; }
.guard-ok { border-color: #c2e8d5; background: #f3fbf7; }
.guard-ok h3::before { content: '✓ '; color: var(--success); }
.guard-warn { border-color: #f5c9c2; background: #fdf5f4; }
.guard-warn h3::before { content: '⚠ '; color: var(--danger); }
.guard-note { font-size: 0.78rem; color: var(--text-dim); line-height: 1.6; max-width: 640px; margin: 24px auto 20px; }
.guard-cta { margin: 0 auto; }

/* Article byline */
.article-byline { font-size: 0.85rem; color: var(--text-muted); margin-top: 10px; font-family: var(--font-mono); }
.article-byline a { color: var(--text-muted); text-decoration: none; border-bottom: 1px dotted var(--text-dim); }
.article-byline a:hover { color: var(--accent); }

/* ==================== HERO GLASS CARD ==================== */
.hero-wrap { padding: 40px 0 8px; }
.hero-card {
  position: relative; overflow: hidden; background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border); border-radius: var(--radius-xl); padding: clamp(28px, 5vw, 56px);
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; box-shadow: var(--shadow-lg);
}
.hero-card .glow-a { position: absolute; top: -130px; right: -110px; width: 400px; height: 400px; background: rgba(103,80,164,0.16); filter: blur(110px); border-radius: 50%; pointer-events: none; }
.hero-card .glow-b { position: absolute; bottom: -130px; left: -90px; width: 320px; height: 320px; background: rgba(201,167,77,0.14); filter: blur(110px); border-radius: 50%; pointer-events: none; }
.hero-card .hero-main { position: relative; z-index: 1; text-align: left; }
.hero-card h1 { text-align: left; font-size: clamp(2.1rem, 4.4vw, 3.2rem); }
.hero-card .hero-lead { margin: 0 0 28px; text-align: left; max-width: 540px; }
.hero-card .hero-cta-row { justify-content: flex-start; }
.hero-card .hero-chips { justify-content: flex-start; margin-top: 26px; }
.hero-card .hero-meta { text-align: left; }
.hero-visual {
  position: relative; z-index: 1; aspect-ratio: 4/5; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid #e0d6f2; box-shadow: inset 0 0 40px rgba(103,80,164,0.06);
  background: radial-gradient(circle at 50% 40%, #efe7fb, #f6f4fa 72%);
  display: flex; align-items: center; justify-content: center;
}
.hero-visual svg { width: 90%; height: 90%; }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Article figure (featured / in-body images) */
figure.post-figure { margin: 26px 0; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--surface); }
figure.post-figure img { width: 100%; display: block; }
figure.post-figure figcaption { font-size: 0.82rem; color: var(--text-dim); padding: 10px 16px; text-align: center; }
.post-hero { margin: 0 0 8px; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16/9; border: 1px solid var(--border); box-shadow: var(--shadow); }
.post-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Article hero (2-col text + portrait image) */
.article-hero { padding: 32px 0 20px; }
.article-hero .ah-card {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 40px; align-items: center;
  background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: clamp(24px, 4vw, 44px); box-shadow: var(--shadow-lg);
}
.ah-glow { position: absolute; top: -120px; right: -100px; width: 340px; height: 340px; background: rgba(103,80,164,0.13); filter: blur(100px); border-radius: 50%; pointer-events: none; }
.ah-text { position: relative; z-index: 1; }
.ah-text h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; color: var(--heading); line-height: 1.18; letter-spacing: -0.02em; }
.ah-text .subtitle { font-size: 1.08rem; color: var(--text-muted); margin-top: 12px; }
.ah-text .article-byline { margin-top: 12px; }
.ah-visual { position: relative; z-index: 1; aspect-ratio: 4/5; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid #e0d6f2; box-shadow: var(--shadow); }
.ah-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 768px) {
  .article-hero .ah-card { grid-template-columns: 1fr; gap: 22px; }
  .ah-visual { aspect-ratio: 16/10; max-height: 260px; }
  .ah-text h1 { font-size: 1.55rem; }
}

/* ==================== BENTO ==================== */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 34px; grid-auto-rows: minmax(210px, auto); }
.bento .card { display: flex; flex-direction: column; justify-content: flex-end; }
.bento .card .tag { align-self: flex-start; }
.bento .feature { grid-column: span 2; grid-row: span 2; justify-content: flex-end;
  background: linear-gradient(150deg, #efe7fb 0%, #ffffff 55%, #fbf3df 100%); }
.bento .feature h3 { font-size: 1.6rem; }
.bento .feature p { font-size: 1rem; max-width: 460px; }
.bento .span2 { grid-column: span 2; }
.bento .bento-cta { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; border: 2px dashed var(--border-strong); background: transparent; box-shadow: none; }
.bento .bento-cta:hover { border-color: rgba(103,80,164,0.5); background: var(--surface); box-shadow: var(--shadow); }
.bento .bento-cta .big { font-size: 1.6rem; width: 48px; height: 48px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.bento .bento-cta h3 { font-size: 1.15rem; }
.bento .bento-cta p { max-width: 420px; }

/* ==================== HOMEPAGE FAQ ACCORDION ==================== */
.faq-home { max-width: 820px; margin: 36px auto 0; }
details.faq-item { padding: 0; }
details.faq-item summary { padding: 18px 22px; align-items: center; }
details.faq-item summary::after { content: '⌄'; color: var(--accent); font-size: 1.4rem; line-height: 1; transition: transform var(--transition); }
details.faq-item[open] summary::after { transform: rotate(180deg); }
details.faq-item .faq-a { padding: 0 22px 20px; color: var(--text-muted); font-size: 0.96rem; line-height: 1.7; }

/* ==================== FOOTER ==================== */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 40px 0; margin-top: 56px; }
.footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 28px; }
.footer-brand .brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--heading); }
.footer-brand p { color: var(--text-dim); font-size: 0.88rem; margin-top: 10px; max-width: 320px; }
.footer-col h4 { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--text-dim); font-size: 0.9rem; margin-bottom: 10px; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { color: var(--text-dim); font-size: 0.85rem; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; align-items: center; border-top: 1px solid var(--border-soft); padding-top: 20px; }
.footer-links a { color: var(--text-dim); margin-left: 18px; font-size: 0.85rem; }
.footer-links a:first-child { margin-left: 0; }
.footer-links a:hover { color: var(--accent); }
.site-footer p { color: var(--text-dim); font-size: 0.85rem; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 860px) { .guard-cols { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
  .site-header .container { height: auto; flex-wrap: wrap; padding: 12px 16px; gap: 8px; }
  .container { padding: 0 16px; }
  .site-nav { gap: 2px; }
  .nav-text { padding: 5px 10px; font-size: 0.82rem; }
  .hero { padding: 56px 0 40px; }
  .hero h1, .hero-center h1 { font-size: 2rem; }
  .card-grid, .topic-grid, .grid-3, .path-grid { grid-template-columns: 1fr; }
  .chain-flow { flex-direction: column; }
  .chain-arrow { transform: rotate(90deg); }
  .article-header { padding: 44px 0 22px; }
  .article-body h2, main h2 { font-size: 1.32rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .hero-card { grid-template-columns: 1fr; gap: 32px; }
  .hero-card h1 { font-size: 2rem; }
  .hero-visual { aspect-ratio: 16/11; max-height: 280px; order: -1; }
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .bento .feature, .bento .span2, .bento-cta { grid-column: span 1; grid-row: auto; }
  .bento .card { min-height: 170px; }
  .footer-cols { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 480px) {
  body { font-size: 15px; }
  .hero h1, .hero-center h1 { font-size: 1.6rem; }
  .btn { padding: 12px 22px; font-size: 0.95rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* Consent banner (GA4 Consent Mode v2) */
.consent-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: center;
  padding: 12px 20px; background: rgba(255,255,255,0.94);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border); box-shadow: 0 -6px 28px rgba(60,40,100,0.12);
  font-size: 0.86rem; color: var(--text); line-height: 1.5;
}
.consent-banner > span:first-child { max-width: 720px; }
.consent-banner .cb-btns { display: flex; gap: 8px; flex-shrink: 0; }
.consent-banner button {
  padding: 7px 18px; border-radius: 999px; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; border: 1px solid var(--border-strong); background: transparent; color: var(--text-muted);
  transition: all var(--transition);
}
.consent-banner .cb-yes { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.consent-banner .cb-yes:hover { box-shadow: var(--glow-p); }
.consent-banner .cb-no:hover { border-color: var(--accent); color: var(--accent); }

/* RTL support (Arabic) */
[dir="rtl"] .analogy-box { border-left: none; border-right: 4px solid var(--accent); border-radius: var(--radius) 0 0 var(--radius); }
[dir="rtl"] .concept-box { border-left: 1px solid #ddd0f5; border-right: 3px solid var(--accent); }
[dir="rtl"] .compare-table th { text-align: right; }
[dir="rtl"] .lang-dropdown { right: auto; left: 0; }
[dir="rtl"] .step-list li { border-left: none; border-right: 2px solid var(--border); padding: 4px 44px 16px 0; margin: 0 15px 0 0; }
[dir="rtl"] .step-list li::before { left: auto; right: -16px; }
[dir="rtl"] .related-articles li:hover { transform: translateX(-3px); }
[dir="rtl"] .footer-links a { margin-left: 0; margin-right: 18px; }

/* mobile tap-target safety (20260613b) */
@media (max-width: 480px){
  .site-footer a{ display: inline-block; padding: 4px 0; }
  .consent-banner button{ padding: 11px 20px; min-height: 44px; }
}
