/* TrendGuide — editorial guide layout. Fonts: /static/fonts.css (linked separately). */

/* ---------- tokens ---------- */
:root {
  --bg: #f7f6f2; --surface: #ffffff; --surface-2: #f0eee8; --ink: #121417; --ink-2: #2c3139; --muted: #636b78;
  --line: rgba(18, 20, 23, .10); --line-2: rgba(18, 20, 23, .18);
  --accent: #f0441a; --accent-2: #e11d74; --accent-ink: #ffffff; --accent-soft: rgba(240, 68, 26, .09);
  --c-ai: #6d4ae8; --c-games: #e2560f; --c-tools: #0f8f7f; --c-quizzes: #d12a78; --c-viral: #2563eb;
  --shadow: 0 1px 2px rgba(18,20,23,.05), 0 10px 28px -14px rgba(18,20,23,.22);
  --radius: 14px; --radius-s: 9px; --wrap: 1240px; --header-h: 112px;
  --f-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "PingFang SC",
          "Microsoft YaHei", "Noto Sans CJK SC", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Yu Gothic", Meiryo, sans-serif;
  --f-display: "Space Grotesk", var(--f-ui);
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0c0e12; --surface: #151920; --surface-2: #1c222b; --ink: #eceef2; --ink-2: #cfd4dc; --muted: #98a1b0;
  --line: rgba(236, 238, 242, .09); --line-2: rgba(236, 238, 242, .18);
  --accent: #ff6a3d; --accent-2: #ff4f97; --accent-ink: #160700; --accent-soft: rgba(255, 106, 61, .13);
  --c-ai: #a08bff; --c-games: #ff8a4c; --c-tools: #3cc9b4; --c-quizzes: #ff6fae; --c-viral: #6ea0ff;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 30px -14px rgba(0,0,0,.75);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0e12; --surface: #151920; --surface-2: #1c222b; --ink: #eceef2; --ink-2: #cfd4dc; --muted: #98a1b0;
    --line: rgba(236, 238, 242, .09); --line-2: rgba(236, 238, 242, .18);
    --accent: #ff6a3d; --accent-2: #ff4f97; --accent-ink: #160700; --accent-soft: rgba(255, 106, 61, .13);
    --c-ai: #a08bff; --c-games: #ff8a4c; --c-tools: #3cc9b4; --c-quizzes: #ff6fae; --c-viral: #6ea0ff;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 30px -14px rgba(0,0,0,.75);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.65 var(--f-ui); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:lang(zh), :lang(ja), :lang(ko) { line-height: 1.8; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--f-display); letter-spacing: -.015em; line-height: 1.25; margin: 0; }
:lang(zh) :is(h1, h2, h3), :lang(ja) :is(h1, h2, h3), :lang(ko) :is(h1, h2, h3) { letter-spacing: 0; }
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--ink); color: var(--bg); border-radius: var(--radius-s); }
.skip:focus { top: 10px; }

/* ---------- buttons & chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: 14.5px; white-space: nowrap;
  transition: transform .12s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease; }
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent; box-shadow: 0 8px 20px -10px var(--accent); }
.btn-primary:hover { border-color: transparent; box-shadow: 0 10px 24px -8px var(--accent); filter: saturate(1.08); }
.btn-secondary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-secondary:hover { border-color: var(--ink); opacity: .9; }
.btn-ghost { background: transparent; }
.btn-lg { min-height: 48px; padding: 0 22px; font-size: 16px; }
.cat { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .01em;
  color: var(--cc, var(--accent)); background: color-mix(in srgb, var(--cc, var(--accent)) 12%, transparent); white-space: nowrap; }
.cat-ai { --cc: var(--c-ai); } .cat-games { --cc: var(--c-games); } .cat-tools { --cc: var(--c-tools); }
.cat-quizzes { --cc: var(--c-quizzes); } .cat-viral { --cc: var(--c-viral); }
.heat { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 14px 0 0; padding: 0; }
.chips li { padding: 4px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
:lang(zh) .kicker, :lang(ja) .kicker, :lang(ko) .kicker { text-transform: none; letter-spacing: .02em; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 14px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.logo { width: 32px; height: 32px; flex: none; }
.brand-name { font-family: var(--f-display); font-weight: 700; font-size: 21px; letter-spacing: -.02em; white-space: nowrap; }
.brand-tag { padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; white-space: nowrap; }
.search { position: relative; flex: 1 1 260px; max-width: 420px; margin-left: auto; }
.search svg { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.search input { width: 100%; height: 40px; padding: 0 14px 0 38px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; }
.search input:focus { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary svg, .theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lang-list { position: absolute; right: 0; top: calc(100% + 8px); min-width: 170px; padding: 6px; border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; }
.lang-list a { padding: 8px 12px; border-radius: 7px; font-size: 14px; }
.lang-list a:hover { background: var(--surface-2); }
.lang-list a[aria-current] { color: var(--accent); font-weight: 700; }
.theme-toggle { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: transparent; flex: none; }
.cat-nav { border-top: 1px solid var(--line); }
.cat-nav .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 6px 0; }
.cat-nav .wrap::-webkit-scrollbar { display: none; }
.cat-nav a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.cat-nav a i { font-style: normal; font-size: 11px; color: var(--accent); }
.cat-nav a:hover { background: var(--surface-2); }
.cat-nav a[aria-current] { background: var(--ink); color: var(--bg); }
.cat-nav a[aria-current] i { color: inherit; }

/* ---------- home hero ---------- */
.hero { padding: 44px 0 26px; background: radial-gradient(1000px 340px at 85% -10%, var(--accent-soft), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); gap: 36px; align-items: start; }
.hero h1 { font-size: clamp(30px, 4.4vw, 50px); font-weight: 700; }
.hero-sub { margin: 14px 0 0; max-width: 60ch; font-size: 17.5px; color: var(--ink-2); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; margin: 18px 0 0; padding: 0; font-size: 14px; color: var(--muted); font-weight: 600; }
.hero-stats li::before { content: "•"; margin-right: 8px; color: var(--accent); }
.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 24px; }
.cat-tile { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: transform .15s ease, border-color .15s ease; }
.cat-tile:hover { transform: translateY(-2px); border-color: var(--cc); }
.cat-tile i { font-style: normal; color: var(--cc); font-size: 14px; }
.cat-tile strong { font-size: 15px; }
.cat-tile span { font-size: 13px; color: var(--muted); }
.hot-board { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 18px 8px; }
.hot-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.hot-head h2 { font-size: 18px; }
.hot-head span { font-size: 12.5px; color: var(--muted); }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li + li { border-top: 1px solid var(--line); }
.mini-list a { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; }
.mini-list a:hover .mini-title { color: var(--accent); }
.rank { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); font: 700 13px var(--f-mono); }
.mini-list li:nth-child(-n+3) .rank { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.mini-body { display: grid; gap: 4px; min-width: 0; }
.mini-title { font-weight: 650; font-size: 14.5px; line-height: 1.4; transition: color .15s ease; }
.mini-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }

/* ---------- category hero ---------- */
.cat-hero { padding: 30px 0 18px; background: radial-gradient(900px 260px at 90% -20%, color-mix(in srgb, var(--cc) 14%, transparent), transparent 70%); }
.cat-hero h1 { display: flex; align-items: center; gap: 12px; font-size: clamp(28px, 3.8vw, 42px); }
.cat-hero h1 i { font-style: normal; color: var(--cc); font-size: .7em; }

/* ---------- listing ---------- */
.listing { padding: 18px 0 56px; }
.listing-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 14px; }
.listing-head h2 { font-size: 24px; }
.count { color: var(--muted); font-size: 14px; font-weight: 600; }
.seg { display: inline-flex; margin-left: auto; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.reset { border: 0; background: none; color: var(--accent); font-weight: 600; font-size: 14px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filter-row button { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 600; color: var(--ink-2); }
.filter-row button b { margin-left: 4px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.filter-row button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filter-row button[aria-pressed="true"] b { color: inherit; opacity: .7; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.card-link { display: flex; flex-direction: column; height: 100%; }
.thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card:hover .thumb img { transform: scale(1.03); }
.thumb-empty, .thumb.img-missing { display: grid; place-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--cc, var(--accent)) 22%, var(--surface-2)), var(--surface-2)); }
.thumb.img-missing img { display: none; }
.thumb-empty b { font-size: 34px; color: var(--cc, var(--accent)); }
.thumb-ai { --cc: var(--c-ai); } .thumb-games { --cc: var(--c-games); } .thumb-tools { --cc: var(--c-tools); }
.thumb-quizzes { --cc: var(--c-quizzes); } .thumb-viral { --cc: var(--c-viral); }
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.card-title { font-size: 17px; font-weight: 700; line-height: 1.38; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-sum { font-size: 14px; color: var(--muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px; font-size: 13px; color: var(--muted); }
.card-cta { color: var(--accent); font-weight: 700; }
.empty { padding: 40px 0; text-align: center; color: var(--muted); }
.more-row { display: flex; justify-content: center; margin-top: 26px; }

/* ---------- topic header & action bar ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a:hover { color: var(--accent); }
.topic-head { padding: 28px 0 22px; max-width: 900px; }
.topic-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 14px; font-size: 13.5px; color: var(--muted); }
.topic-head h1 { font-size: clamp(27px, 3.6vw, 42px); font-weight: 700; line-height: 1.22; }
:lang(zh) .topic-head h1, :lang(ja) .topic-head h1, :lang(ko) .topic-head h1 { line-height: 1.38; }
.lead { margin: 16px 0 0; font-size: 18px; line-height: 1.75; color: var(--ink-2); max-width: 70ch; }
.action-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; }
.pending { display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 1px dashed var(--line-2); color: var(--muted); font-weight: 600; }

/* ---------- topic layout ---------- */
.topic-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; padding-bottom: 40px; }
.article { min-width: 0; max-width: 780px; }
.cover { margin: 0 0 26px; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.cover img { width: 100%; height: auto; max-height: 520px; object-fit: cover; }
.cover.img-missing { display: none; }
.cover figcaption { padding: 9px 14px; font-size: 13px; color: var(--muted); }

/* article typography */
.article-body { font-size: 17px; line-height: 1.85; color: var(--ink-2); }
:lang(zh) .article-body, :lang(ja) .article-body, :lang(ko) .article-body { font-size: 16.5px; line-height: 1.95; }
.article-body > section, .article-body > nav, .article-body > aside { margin: 0 0 34px; }
.article-body h2 { font-size: clamp(21px, 2.3vw, 26px); color: var(--ink); margin: 0 0 16px; padding-left: 14px; border-left: 4px solid var(--accent); line-height: 1.35; }
.article-body h3 { font-size: 17.5px; color: var(--ink); }
.article-body p { margin: 0 0 1.1em; }
.prose { scroll-margin-top: calc(var(--header-h) + 16px); }
.prose p:first-of-type::first-line { color: var(--ink); }

/* key takeaways callout */
.callout { padding: 22px 24px 18px; border-radius: var(--radius); background: linear-gradient(180deg, var(--accent-soft), transparent 140%), var(--surface);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); }
.callout h2 { border: 0; padding: 0; font-size: 19px; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.callout h2::before { content: ""; width: 10px; height: 22px; border-radius: 4px; background: linear-gradient(180deg, var(--accent), var(--accent-2)); flex: none; }
.callout ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.callout li { position: relative; padding-left: 30px; font-size: 16px; line-height: 1.75; color: var(--ink); }
.callout li::before { content: "✓"; position: absolute; left: 0; top: .15em; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; line-height: 1; }

/* quick facts */
.facts h2 { margin-bottom: 12px; }
.facts-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 15px; line-height: 1.6; }
.facts-table th, .facts-table td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.facts-table tr:last-child th, .facts-table tr:last-child td { border-bottom: 0; }
.facts-table th { width: 32%; background: var(--surface-2); color: var(--muted); font-weight: 650; font-size: 14px; }
.facts-table td { color: var(--ink); }
.facts-table a { color: var(--accent); font-weight: 600; }
.facts-table a:hover { text-decoration: underline; }

/* table of contents */
.toc { padding: 20px 22px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.toc h2 { border: 0; padding: 0; font-size: 17px; margin-bottom: 10px; }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; display: grid; gap: 4px; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 10px; padding: 6px 8px; border-radius: 8px; font-size: 15.5px; line-height: 1.5; color: var(--ink); }
.toc a::before { content: counter(toc, decimal-leading-zero); flex: none; font: 600 13px/1.9 var(--f-mono); color: var(--accent); }
.toc a:hover { background: var(--surface); }

/* bullet cards inside sections */
.bullet-cards { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.bullet-cards li { padding: 16px 18px; border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); }
.bullet-cards strong { display: block; color: var(--ink); font-size: 15.5px; line-height: 1.45; margin-bottom: 6px; }
.bullet-cards p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--ink-2); }

/* inline "read next" */
.read-next { padding: 16px 20px; border-radius: var(--radius); border: 1px dashed var(--line-2); }
.read-next h2 { border: 0; padding: 0; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
:lang(zh) .read-next h2, :lang(ja) .read-next h2, :lang(ko) .read-next h2 { text-transform: none; letter-spacing: .02em; }
.read-next ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.read-next a { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 0; font-size: 15.5px; font-weight: 600; color: var(--ink); line-height: 1.5; }
.read-next a:hover span:last-child { color: var(--accent); }

/* step-by-step guide */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 16px; padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 16px); }
.step-n { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font: 700 16px var(--f-display); }
.steps h3 { margin: 4px 0 6px; line-height: 1.4; }
.steps p { margin: 0; font-size: 15.5px; line-height: 1.75; }

/* FAQ */
.faq-list { display: grid; gap: 10px; }
.faq details { border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.faq details[open] { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.faq summary { list-style: none; position: relative; padding: 15px 48px 15px 18px; cursor: pointer; font-weight: 650; color: var(--ink); line-height: 1.5; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q"; margin-right: 10px; font: 700 14px var(--f-mono); color: var(--accent); }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 400; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 18px 16px 42px; font-size: 15.5px; line-height: 1.8; }

/* official CTA + share */
.cta-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin: 8px 0 18px; padding: 20px 22px; border-radius: var(--radius);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), color-mix(in srgb, var(--accent-2) 10%, var(--surface))); border: 1px solid var(--line); }
.cta-card div { display: grid; gap: 2px; min-width: 0; }
.cta-card strong { font-size: 18px; font-family: var(--f-display); }
.cta-card span { font-size: 14px; color: var(--muted); }
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

/* sidebar */
.sidebar { min-width: 0; }
.side-sticky { position: sticky; top: calc(var(--header-h) + 14px); display: grid; gap: 16px; max-height: calc(100vh - var(--header-h) - 28px); overflow-y: auto; scrollbar-width: thin; padding-bottom: 4px; }
.side-card { padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.side-card h2 { font-size: 15px; margin-bottom: 8px; }
.side-cta { display: grid; gap: 10px; justify-items: start; border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.side-cta strong { font-size: 17px; line-height: 1.4; font-family: var(--f-display); }
.side-cta .btn { width: 100%; }
.side-toc ol { margin: 0; padding: 0 0 0 20px; display: grid; gap: 6px; font-size: 14px; line-height: 1.45; }
.side-toc li::marker { color: var(--accent); font-weight: 700; }
.side-toc a:hover { color: var(--accent); }

/* related */
.related { padding: 10px 0 56px; }
.related > h2 { font-size: 24px; margin-bottom: 16px; }

/* about */
.about .article-body { max-width: 780px; }
.about .cat-tiles { max-width: 980px; margin-bottom: 56px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 40px 0 18px; font-size: 14px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) 1fr 1fr; gap: 30px; }
.footer-grid p { margin: 12px 0 0; max-width: 52ch; line-height: 1.7; }
.footer-grid nav { display: grid; align-content: start; gap: 7px; }
.footer-grid h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); margin-bottom: 4px; }
.footer-grid nav a:hover, .footer-base a:hover { color: var(--accent); }
.footer-base { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .topic-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; }
}
@media (max-width: 960px) {
  .hero-grid, .topic-layout { grid-template-columns: minmax(0, 1fr); }
  .article { max-width: none; }
  .side-sticky { position: static; max-height: none; overflow: visible; }
  .side-toc { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  :root { --header-h: 150px; }
  .wrap { width: min(100% - 28px, var(--wrap)); }
  .header-row { flex-wrap: wrap; gap: 10px; padding: 10px 0 8px; }
  .brand-tag { display: none; }
  .search { order: 5; flex-basis: 100%; max-width: none; margin-left: 0; }
  .lang-menu { margin-left: auto; }
  .hero { padding-top: 26px; }
  .hero-sub, .lead { font-size: 16.5px; }
  .grid { grid-template-columns: 1fr; }
  .seg { margin-left: 0; }
  .article-body { font-size: 16.5px; }
  .callout, .toc { padding: 18px; }
  .facts-table th { width: 38%; }
  .steps li { padding: 16px; gap: 12px; }
  .action-bar .btn { flex: 1 1 auto; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .sidebar, .related, .site-footer, .share-row, .share-card, .ad-slot-wrap, .action-bar { display: none !important; }
  .topic-layout { display: block; }
}

/* ---------- share card & ad slot ---------- */
.share-card { margin: 24px 0 32px; padding: 22px 24px; background: linear-gradient(135deg, var(--accent-soft) 0%, var(--surface-2) 100%); border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); border-radius: var(--radius); box-shadow: var(--shadow); }
.share-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.share-badge { display: inline-block; padding: 3px 9px; border-radius: 6px; background: var(--accent); color: #fff; font: 800 10.5px/1.2 var(--f-mono); letter-spacing: .06em; }
.share-card-head strong { font-size: 15px; font-weight: 800; color: var(--ink); }
.share-preview { padding: 13px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; }
.share-preview strong { display: block; font-size: 14.5px; line-height: 1.5; margin-bottom: 4px; color: var(--ink); }
.share-preview span { display: block; font-size: 13px; line-height: 1.65; color: var(--muted); }
.share-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px; border-radius: 9px; font-size: 13px; font-weight: 700; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color .15s ease, color .15s ease, transform .12s ease; }
.share-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.share-btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.share-btn-primary:hover { opacity: .9; color: var(--bg); border-color: var(--ink); }

.ad-slot-wrap { margin: 18px auto 24px; max-width: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; }
.ad-label { font: 600 10.5px/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); opacity: .7; margin-bottom: 6px; }
.ad-slot { width: 100%; max-width: 760px; min-height: 0; overflow: hidden; }
