/* ==========================================================================
   Jieralt Field Notes — design system
   One sans family, one accent, readable sizes (nothing below 12px).
   ========================================================================== */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --brand-soft: #eff6ff;
  --brand-ring: rgba(37, 99, 235, .28);
  --navy: #0b1730;
  --success: #15803d;
  --success-soft: #f0fdf4;
  --warn: #b45309;
  --danger: #b91c1c;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px rgba(15, 23, 42, .07);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, .12);
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
  --topbar: 68px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 2px; border-radius: 6px; }
::selection { background: #bfdbfe; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.shell { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; }
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.topbar { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid rgba(226, 232, 240, .9); background: rgba(255, 255, 255, .88); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); }
.topbar-inner { height: var(--topbar); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--brand) 0%, #4f46e5 100%); color: #fff; font: 800 15px/1 var(--sans); box-shadow: 0 6px 16px rgba(37, 99, 235, .28); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.brand-sub { color: var(--muted); font-size: 12px; font-weight: 500; }
.nav { display: flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.nav a { padding: 8px 12px; border-radius: 8px; transition: background .15s, color .15s; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--brand-strong); background: var(--brand-soft); }
.nav .language { color: var(--muted); font-size: 14px; }
.nav .nav-ask { margin-left: 6px; padding: 8px 16px; background: var(--ink); color: #fff; }
.nav .nav-ask:hover { background: var(--brand-strong); color: #fff; }

/* ---------- Shared type & controls ---------- */
.eyebrow, .section-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--brand-strong); font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.eyebrow { padding: 5px 12px; border: 1px solid #dbeafe; border-radius: 999px; background: var(--brand-soft); }
h1 { margin-bottom: 20px; font-size: clamp(36px, 5vw, 60px); font-weight: 800; line-height: 1.08; letter-spacing: -.035em; text-wrap: balance; }
h1 em { font-style: normal; background: linear-gradient(90deg, var(--brand) 0%, #4f46e5 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 8px; padding: 0 20px; border: 1px solid var(--brand); border-radius: 10px; background: var(--brand); color: #fff; font-size: 15px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: background .15s, transform .15s, box-shadow .15s; box-shadow: 0 6px 16px rgba(37, 99, 235, .22); }
.button:hover { background: var(--brand-strong); border-color: var(--brand-strong); transform: translateY(-1px); }
.button.ghost { background: transparent; color: var(--ink-2); border-color: var(--line-strong); box-shadow: none; }
.button.ghost:hover { background: var(--surface-2); }
.button.light { background: #fff; border-color: #fff; color: var(--navy); box-shadow: none; }
.button.light:hover { background: #e0e7ff; }
.text-link { color: var(--brand-strong); font-size: 15px; font-weight: 700; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.section { padding: clamp(56px, 7vw, 88px) 0; }
.section-tint { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-head h2 { margin: 0; font-size: clamp(26px, 3vw, 34px); font-weight: 800; line-height: 1.2; letter-spacing: -.025em; }
.section-kicker { display: block; margin-bottom: 8px; }
.section-desc { max-width: 420px; margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Home hero ---------- */
.home-hero { position: relative; overflow: hidden; padding: clamp(48px, 7vw, 88px) 0 clamp(48px, 6vw, 72px); background:
  radial-gradient(900px 420px at 85% -10%, rgba(79, 70, 229, .10), transparent 60%),
  radial-gradient(700px 380px at -5% 10%, rgba(37, 99, 235, .10), transparent 60%),
  var(--bg); }
.home-hero-inner { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero-copy { max-width: 600px; margin-bottom: 28px; color: var(--ink-2); font-size: 18px; line-height: 1.7; }
.hero-search { display: flex; align-items: center; gap: 8px; max-width: 620px; padding: 6px 6px 6px 16px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.hero-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring), var(--shadow); }
.hero-search-icon { color: var(--muted); font-size: 22px; line-height: 1; }
.hero-search input { flex: 1; min-width: 0; height: 46px; border: 0; outline: 0; background: transparent; font-size: 16px; }
.hero-search input::placeholder { color: #94a3b8; }
.quick-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; font-size: 14px; }
.quick-chips span { color: var(--muted); }
.quick-chips a { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-weight: 500; transition: border-color .15s, color .15s; }
.quick-chips a:hover { border-color: var(--brand); color: var(--brand-strong); }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 28px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.hero-facts strong { margin-right: 4px; color: var(--ink); }
.hero-panel { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-lg); }
.hero-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.hero-panel-head h2 { margin: 0; font-size: 17px; font-weight: 800; }
.hero-panel-head a { color: var(--brand-strong); font-size: 14px; font-weight: 600; }
.popular-list { margin: 0; padding: 0; list-style: none; }
.popular-list li + li { border-top: 1px solid var(--line); }
.popular-list a { display: flex; gap: 14px; padding: 13px 4px; border-radius: 10px; transition: background .15s; }
.popular-list a:hover { background: var(--surface-2); }
.popular-num { flex: 0 0 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--brand-soft); color: var(--brand-strong); font-size: 14px; font-weight: 800; }
.popular-body { display: grid; gap: 2px; min-width: 0; }
.popular-title { color: var(--ink); font-size: 15px; font-weight: 650; line-height: 1.4; }
.popular-meta { color: var(--muted); font-size: 13px; }

/* ---------- Topics ---------- */
.topic-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.topic-card { display: flex; flex-direction: column; gap: 6px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s, box-shadow .15s; }
.topic-card:hover { border-color: #93c5fd; transform: translateY(-2px); box-shadow: var(--shadow); }
.topic-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 8px; border-radius: 11px; background: var(--brand-soft); color: var(--brand-strong); font: 700 17px/1 var(--mono); }
.topic-card strong { font-size: 17px; line-height: 1.35; }
.topic-card > span:not(.topic-icon) { color: var(--muted); font-size: 14px; line-height: 1.55; }
.topic-card em { margin-top: auto; padding-top: 10px; color: var(--brand-strong); font-size: 14px; font-style: normal; font-weight: 700; }

/* ---------- Post cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.post-card { position: relative; display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s, box-shadow .15s; }
.post-card:hover { border-color: #93c5fd; transform: translateY(-3px); box-shadow: var(--shadow); }
.post-card:focus-within { border-color: var(--brand); }
.post-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 13px; }
.post-category { padding: 3px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-strong); font-weight: 700; }
.post-time { color: var(--muted); }
.post-card h2 { margin: 0 0 10px; font-size: 19px; font-weight: 750; line-height: 1.4; letter-spacing: -.015em; }
.post-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.post-link:focus-visible { outline: none; }
.post-card p { margin-bottom: 20px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.post-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.post-foot .text-link { font-size: 14px; }
.empty { grid-column: 1 / -1; padding: 40px 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); text-align: center; }
.empty[hidden], .post-card[hidden] { display: none; }

/* ---------- Method ---------- */
.method-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.method-card { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.method-num { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 16px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 15px; font-weight: 800; }
.method-card h3 { margin-bottom: 6px; font-size: 18px; font-weight: 750; }
.method-card p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Engage (forum + subscribe) ---------- */
.engage { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; padding-bottom: clamp(56px, 7vw, 88px); }
.engage-card { padding: clamp(26px, 4vw, 40px); border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.engage-card h2 { margin-bottom: 10px; font-size: clamp(24px, 2.6vw, 30px); font-weight: 800; letter-spacing: -.02em; }
.engage-card p:not(.section-kicker) { max-width: 520px; margin-bottom: 22px; color: var(--muted); font-size: 16px; }
.engage-primary { border: 0; background: linear-gradient(135deg, #0b1730 0%, #1e3a8a 100%); color: #fff; }
.engage-primary .section-kicker { color: #93c5fd; }
.engage-primary p:not(.section-kicker) { color: #cbd5e1; }
.engage-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- About ---------- */
.about { padding-top: 0; }
.about-card { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start; padding: clamp(24px, 4vw, 36px); border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.avatar { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--brand) 0%, #4f46e5 100%); color: #fff; font-size: 26px; font-weight: 800; }
.about-card h2 { margin-bottom: 10px; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.about-card p:not(.section-kicker) { max-width: 760px; color: var(--ink-2); font-size: 16px; }
.topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.topics span { padding: 4px 12px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: 13px; font-weight: 500; }

/* ---------- Footer ---------- */
.footer { margin-top: 0; background: var(--navy); color: #cbd5e1; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); gap: 32px; padding: 52px 0 36px; }
.footer .brand-name { color: #fff; }
.footer .brand-sub { color: #94a3b8; }
.footer-brand p { max-width: 360px; margin: 14px 0 0; color: #94a3b8; line-height: 1.6; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h2 { margin: 0 0 4px; color: #fff; font-size: 14px; font-weight: 700; }
.footer-col a { color: #cbd5e1; }
.footer a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 0 26px; border-top: 1px solid rgba(255, 255, 255, .1); color: #94a3b8; font-size: 13px; }

/* ---------- Archive ---------- */
.archive { padding: 52px 0 88px; }
.archive-intro { max-width: 720px; margin-bottom: 28px; }
.archive h1 { font-size: clamp(34px, 4.4vw, 50px); }
.archive-intro p:not(.eyebrow) { color: var(--ink-2); font-size: 17px; }
.archive-tools { position: sticky; top: var(--topbar); z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 0 0 24px; padding: 12px 0; background: rgba(248, 250, 252, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: 14px; font-weight: 600; cursor: pointer; transition: .15s; }
.filter:hover { border-color: var(--line-strong); }
.filter[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.search { width: min(360px, 100%); height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); font-size: 15px; }
.search:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring); }

/* ---------- Article ---------- */
.article-shell { padding: 28px 0 80px; }
.reading-progress { position: fixed; z-index: 45; top: var(--topbar); left: 0; width: 100%; height: 3px; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg, var(--brand), #4f46e5); transition: transform .08s linear; }
.article-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: #94a3b8; font-size: 14px; }
.back-link { color: var(--muted); }
.back-link:hover { color: var(--brand-strong); }
.breadcrumb-current { color: var(--ink-2); font-weight: 600; }
.article { margin: 20px auto 0; }
.article-header { max-width: 860px; margin: 0 auto; padding: clamp(16px, 3vw, 32px) 0 28px; text-align: left; }
.article-topline { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.article-category { padding: 4px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-strong); font-size: 13px; font-weight: 700; }
.article-type { color: var(--muted); font-size: 13px; }
.article-header h1 { margin: 0 0 16px; font-size: clamp(30px, 4vw, 46px); line-height: 1.18; letter-spacing: -.03em; overflow-wrap: anywhere; }
.article-summary { margin-bottom: 22px; color: var(--ink-2); font-size: 19px; line-height: 1.7; }
.article-byline { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; color: var(--muted); font-size: 14px; }
.article-author { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 700; }
.author-mark { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #4f46e5); color: #fff; font-size: 13px; font-weight: 800; }
.byline-divider { width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); }
.status-pill { padding: 2px 10px; border-radius: 999px; background: var(--success-soft); color: var(--success); font-size: 13px; font-weight: 600; }
.article-layout { display: grid; grid-template-columns: 220px minmax(0, 760px) 260px; justify-content: center; align-items: start; gap: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.article-sidebar { position: sticky; top: calc(var(--topbar) + 24px); min-width: 0; }
.sidebar-panel { margin-bottom: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.toc-panel { padding: 4px 0; border: 0; background: transparent; }
.sidebar-heading { margin: 0 0 12px; color: var(--ink); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.toc-nav { display: grid; gap: 2px; border-left: 2px solid var(--line); }
.toc-link { display: block; margin-left: -2px; padding: 6px 0 6px 14px; border-left: 2px solid transparent; color: var(--muted); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; transition: color .15s, border-color .15s; }
.toc-link.level-3 { padding-left: 26px; font-size: 13px; }
.toc-link:hover { color: var(--ink); }
.toc-link.is-current { border-left-color: var(--brand); color: var(--brand-strong); font-weight: 600; }
.sidebar-muted { margin: 0; color: var(--muted); font-size: 14px; }
.article-reading { min-width: 0; }
.detail-search { display: flex; gap: 6px; }
.detail-search input { width: 100%; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); font-size: 14px; }
.detail-search input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.detail-search button { flex: 0 0 40px; border: 0; border-radius: 8px; background: var(--brand); color: #fff; font-size: 19px; cursor: pointer; }
.related-list { display: grid; margin: 0; padding: 0; list-style: none; }
.related-list li + li { border-top: 1px solid var(--line); }
.related-list a { display: grid; gap: 2px; padding: 11px 0; }
.related-list li:first-child a { padding-top: 0; }
.related-category { color: var(--brand-strong); font-size: 12px; font-weight: 700; }
.related-title { color: var(--ink-2); font-size: 14px; font-weight: 600; line-height: 1.45; }
.related-list a:hover .related-title { color: var(--brand-strong); }
.sidebar-all-link { display: flex; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--brand-strong); font-size: 14px; font-weight: 700; }
.sidebar-author { display: flex; align-items: center; gap: 10px; padding: 4px; color: var(--ink-2); }
.sidebar-author .author-mark { flex: 0 0 30px; }
.sidebar-author strong { font-size: 14px; }
.sidebar-author p { margin: 2px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }

.article-content { color: var(--ink-2); font-size: 17.5px; line-height: 1.85; overflow-wrap: anywhere; }
.article-content > :first-child { margin-top: 0; }
.article-content p { margin: 0 0 1.25em; }
.article-content h2 { margin: 2.2em 0 .7em; color: var(--ink); font-size: clamp(22px, 2.2vw, 27px); font-weight: 800; line-height: 1.35; letter-spacing: -.02em; }
.article-content h3 { margin: 1.8em 0 .6em; color: var(--ink); font-size: 20px; font-weight: 750; line-height: 1.45; }
.article-content h4 { margin: 1.5em 0 .5em; color: var(--ink); font-size: 17px; }
.article-content strong { color: var(--ink); }
.article-content a { color: var(--brand-strong); text-decoration: underline; text-decoration-color: #93c5fd; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.article-content a:hover { text-decoration-color: currentColor; }
.article-content ul, .article-content ol { margin: .4em 0 1.4em; padding-left: 1.4em; }
.article-content li { margin: .45em 0; padding-left: .2em; }
.article-content li::marker { color: var(--brand); }
.article-content blockquote { margin: 1.5em 0; padding: 16px 20px; border-left: 4px solid var(--brand); border-radius: 0 10px 10px 0; background: var(--brand-soft); color: var(--ink-2); font-size: .95em; }
.article-content blockquote > :last-child { margin-bottom: 0; }
.article-content hr { height: 1px; margin: 2.5em 0; border: 0; background: var(--line); }
.article-content table { display: block; width: 100%; margin: 1.5em 0; overflow-x: auto; border-collapse: collapse; font-size: .9em; }
.article-content th, .article-content td { padding: 10px 14px; border: 1px solid var(--line); text-align: left; }
.article-content th { background: var(--surface-2); color: var(--ink); font-weight: 700; }
.article-content code { padding: .15em .4em; border-radius: 5px; background: #eef2f7; color: #1e3a8a; font: .86em var(--mono); overflow-wrap: anywhere; }
.article-content pre { position: relative; margin: 1.5em 0; overflow: auto; padding: 44px 22px 20px; border-radius: 12px; background: #0b1220; color: #e2e8f0; font: 14px/1.75 var(--mono); tab-size: 2; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.article-content pre::before { content: ""; position: absolute; top: 15px; left: 18px; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; box-shadow: 16px 0 #f59e0b, 32px 0 #22c55e; opacity: .8; }
.article-content pre code { padding: 0; background: transparent; color: inherit; font-size: inherit; }
.article-content pre .copy-code { position: absolute; top: 9px; right: 10px; padding: 4px 10px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 6px; background: rgba(255, 255, 255, .06); color: #e2e8f0; font: 600 12px var(--sans); cursor: pointer; transition: background .15s; }
.article-content pre .copy-code:hover { background: rgba(255, 255, 255, .14); }
.article-notice { margin: 8px 0 22px; padding: 14px 18px; border: 1px solid #fde68a; border-radius: 10px; background: #fffbeb; color: #78350f; font-size: 14px; line-height: 1.7; }
.article-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; padding: 22px 24px; border-radius: 14px; background: linear-gradient(135deg, #0b1730 0%, #1e3a8a 100%); color: #fff; }
.article-cta strong { font-size: 17px; }
.article-cta p { margin: 4px 0 0; color: #cbd5e1; font-size: 15px; line-height: 1.6; }
.article-cta .button { flex: 0 0 auto; background: #fff; border-color: #fff; color: var(--navy); box-shadow: none; }
.article-cta .button:hover { background: #e0e7ff; }
.article-subscribe { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink-2); font-size: 15px; }
.article-subscribe a { color: var(--brand-strong); font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .article-layout { grid-template-columns: 200px minmax(0, 1fr); gap: 32px; }
  .discovery-sidebar { position: static; grid-column: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .discovery-sidebar .sidebar-panel { margin: 0; }
  .sidebar-author { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .home-hero-inner { grid-template-columns: 1fr; }
  .hero-panel { max-width: 620px; }
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 800px) {
  :root { --topbar: 60px; }
  .shell { width: calc(100% - 36px); }
  .nav-hide-sm, .brand-sub { display: none; }
  .nav { gap: 0; font-size: 14px; }
  .nav a { padding: 7px 9px; }
  .method-grid { grid-template-columns: 1fr; }
  .engage { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 0; border-top: 0; }
  .toc-sidebar { position: static; grid-row: 1; }
  .toc-panel { margin-bottom: 24px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
  .toc-nav { max-height: 240px; overflow: auto; }
  .article-reading { grid-row: 2; }
  .discovery-sidebar { grid-row: 3; grid-column: auto; margin-top: 32px; }
  .archive-tools { position: static; align-items: stretch; flex-direction: column; }
  .search { width: 100%; }
}
@media (max-width: 560px) {
  .shell { width: calc(100% - 32px); }
  body { font-size: 15px; }
  .brand-mark { width: 32px; height: 32px; }
  .nav .nav-ask { margin-left: 2px; padding: 7px 12px; }
  h1 { font-size: clamp(32px, 9vw, 40px); }
  .hero-copy { font-size: 16px; }
  .hero-search { flex-wrap: wrap; padding: 6px; }
  .hero-search-icon { display: none; }
  .hero-search input { flex-basis: 100%; padding: 0 10px; }
  .hero-search .button { width: 100%; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .post-grid { grid-template-columns: 1fr; }
  .topic-grid { grid-template-columns: 1fr; }
  .topic-card { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 14px; padding: 18px; }
  .topic-icon { margin: 0; }
  .topic-card > span:not(.topic-icon) { flex-basis: 100%; }
  .topic-card em { padding-top: 4px; }
  .about-card { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .discovery-sidebar { grid-template-columns: 1fr; }
  .article-header h1 { font-size: clamp(28px, 8vw, 36px); }
  .article-summary { font-size: 17px; }
  .article-content { font-size: 16.5px; line-height: 1.8; }
  .article-content pre { margin-inline: -16px; border-radius: 0; padding: 42px 16px 18px; font-size: 13px; }
  .article-cta { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* ==========================================================================
   Community forum — same tokens as the rest of the site
   ========================================================================== */
.forum-layout [hidden] { display: none !important; }
.forum-hero { padding: clamp(48px, 6vw, 80px) 0 clamp(40px, 5vw, 56px); border-bottom: 1px solid var(--line); background:
  radial-gradient(800px 360px at 90% -20%, rgba(79, 70, 229, .10), transparent 60%), var(--bg); }
.forum-hero-inner { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr); gap: clamp(28px, 5vw, 64px); align-items: end; }
.forum-hero h1 { margin: 6px 0 16px; font-size: clamp(34px, 4.6vw, 54px); }
.forum-lede { max-width: 600px; margin: 0; color: var(--ink-2); font-size: 18px; line-height: 1.7; }
.forum-guidelines { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); color: var(--ink-2); }
.forum-kicker { margin: 0 0 8px; color: var(--brand-strong); font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.forum-guidelines ol { margin: 8px 0 0; padding-left: 20px; font-size: 15px; line-height: 1.9; }
.forum-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr) 260px; gap: 32px; align-items: start; padding-top: 40px; padding-bottom: 88px; }
.forum-rail, .forum-side { position: sticky; top: calc(var(--topbar) + 24px); }
.forum-categories { display: grid; gap: 2px; }
.forum-category { display: flex; justify-content: space-between; gap: 8px; padding: 9px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font-size: 15px; font-weight: 500; line-height: 1.4; text-align: left; cursor: pointer; transition: background .15s; }
.forum-category:hover { background: var(--surface-2); }
.forum-category[aria-pressed=true] { background: var(--brand-soft); color: var(--brand-strong); font-weight: 700; }
.forum-category span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.forum-write-link { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding: 11px 14px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 15px; font-weight: 700; box-shadow: 0 6px 16px rgba(37, 99, 235, .22); }
.forum-write-link:hover { background: var(--brand-strong); }
.forum-note { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; line-height: 1.6; }
.forum-note strong { color: var(--ink); }
.forum-note p { margin: 6px 0; }
.forum-main { min-width: 0; }
.forum-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.forum-toolbar h2, .forum-composer h2 { margin: 0; color: var(--ink); font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.forum-search { display: flex; align-items: center; gap: 8px; min-width: min(280px, 45%); height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--muted); }
.forum-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.forum-search input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--ink); }
.forum-feed { min-height: 130px; }
.forum-loading, .forum-empty { padding: 36px 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.thread-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; margin-top: 12px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .15s; }
.thread-card:hover { border-color: #93c5fd; }
.thread-card h3 { margin: 0; color: var(--ink); font-size: 18px; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.thread-card p { margin: 6px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.thread-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--muted); font-size: 13px; }
.thread-tag { padding: 2px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-strong); font-weight: 700; }
.thread-open { align-self: center; border: 0; background: transparent; color: var(--brand-strong); font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.thread-detail { grid-column: 1 / -1; margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 15px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.thread-replies { grid-column: 1 / -1; display: grid; gap: 12px; margin-top: 4px; padding-left: 16px; border-left: 3px solid var(--brand-soft); }
.thread-reply { color: var(--ink-2); font-size: 15px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.thread-reply small { display: block; margin-bottom: 2px; color: var(--muted); font-size: 13px; }
.thread-reply-form { grid-column: 1 / -1; display: grid; gap: 10px; margin-top: 12px; }
.thread-reply-form textarea, .forum-fields textarea, .forum-fields input, .forum-fields select, .forum-auth-fields input { width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); color: var(--ink); font-size: 15px; line-height: 1.5; }
.thread-reply-form textarea:focus, .forum-fields textarea:focus, .forum-fields input:focus, .forum-fields select:focus, .forum-auth-fields input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.thread-reply-form textarea, .forum-fields textarea { min-height: 110px; resize: vertical; }
.thread-reply-form button { justify-self: end; }
.forum-composer { margin-top: 32px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); scroll-margin-top: calc(var(--topbar) + 16px); }
.forum-composer-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.forum-fields { display: grid; gap: 16px; }
.forum-fields label, .forum-auth-fields label { display: grid; gap: 6px; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.forum-submit-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.forum-submit-row p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.forum-submit, .forum-quiet { border: 0; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer; }
.forum-submit { padding: 11px 18px; background: var(--brand); color: #fff; }
.forum-submit:hover { background: var(--brand-strong); }
.forum-quiet { padding: 8px 10px; background: transparent; color: var(--brand-strong); }
.forum-quiet:hover { background: var(--brand-soft); }
.forum-auth-box { padding-top: 16px; border-top: 1px solid var(--line); }
.forum-auth-box p { margin: 2px 0 14px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.forum-auth-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.forum-auth-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; }
.forum-status { min-height: 1.4rem; margin: 10px 0 0; color: var(--success); font-size: 14px; line-height: 1.5; }
.forum-status[data-error=true] { color: var(--danger); }
.forum-side { display: grid; gap: 16px; }
.forum-side-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.forum-side-card h3 { margin: 4px 0 8px; color: var(--ink); font-size: 17px; font-weight: 750; line-height: 1.4; }
.forum-side-card p { margin: 6px 0 12px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.forum-side-card a { color: var(--brand-strong); font-size: 14px; font-weight: 700; }
.forum-side-muted { border-color: #fde68a; background: #fffbeb; }
.forum-side-muted .forum-kicker { color: var(--warn); }
.forum-side-muted p { color: #78350f; }
@media (max-width: 1100px) {
  .forum-layout { grid-template-columns: 190px minmax(0, 1fr); }
  .forum-side { position: static; grid-column: 2; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .forum-hero-inner { grid-template-columns: 1fr; }
  .forum-layout { grid-template-columns: 1fr; gap: 24px; padding-top: 24px; }
  .forum-rail, .forum-side { position: static; grid-column: auto; }
  .forum-categories { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .forum-category { flex: none; border: 1px solid var(--line); background: var(--surface); white-space: nowrap; }
  .forum-note { display: none; }
  .forum-write-link { max-width: 260px; }
  .forum-toolbar { flex-direction: column; align-items: stretch; }
  .forum-search { min-width: 0; width: 100%; }
  .forum-auth-fields { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .forum-side { grid-template-columns: 1fr; }
  .forum-composer { padding: 18px; }
  .forum-submit-row { flex-direction: column; align-items: flex-start; }
  .thread-card { grid-template-columns: 1fr; padding: 18px; }
  .thread-open { justify-self: start; }
}

/* ==========================================================================
   Help page (free first diagnosis + request form)
   ========================================================================== */
.help-hero { padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 6vw, 64px); background:
  radial-gradient(900px 420px at 85% -10%, rgba(79, 70, 229, .10), transparent 60%),
  radial-gradient(700px 380px at -5% 10%, rgba(37, 99, 235, .10), transparent 60%), var(--bg); }
.help-hero-inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.help-steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.help-steps li { display: flex; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.help-steps li > span { flex: 0 0 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font-size: 14px; font-weight: 800; }
.help-steps strong { display: block; font-size: 16px; }
.help-steps p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.scope-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.scope-card { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.scope-card h3 { margin-bottom: 12px; font-size: 18px; font-weight: 800; }
.scope-card ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.scope-card li { position: relative; padding-left: 28px; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.scope-card li::before { position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; font-size: 12px; font-weight: 800; }
.scope-yes li::before { content: "✓"; background: var(--success-soft); color: var(--success); }
.scope-no li::before { content: "✕"; background: #fef2f2; color: var(--danger); }
.help-form-wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 56px); align-items: start; }
.help-form-intro h2 { margin-bottom: 12px; font-size: clamp(26px, 3vw, 34px); font-weight: 800; letter-spacing: -.025em; }
.help-form-intro > p:not(.section-kicker) { color: var(--ink-2); font-size: 16px; }
.help-safety { margin-top: 20px; padding: 14px 16px; border: 1px solid #fde68a; border-radius: 12px; background: #fffbeb; color: #78350f; font-size: 14px; line-height: 1.6; }
.help-safety strong { display: block; margin-bottom: 2px; }
.help-form { display: grid; gap: 16px; padding: clamp(20px, 3vw, 28px); border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.help-form label { display: grid; gap: 6px; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.help-form input:not([type="checkbox"]), .help-form select, .help-form textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 400; line-height: 1.5; }
.help-form textarea { resize: vertical; }
.help-form input:focus, .help-form select:focus, .help-form textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.help-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.help-consent { display: flex !important; align-items: flex-start; gap: 10px !important; font-weight: 500 !important; }
.help-consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); }
.help-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.help-form .button { justify-self: start; }
.help-status { min-height: 1.4em; margin: 0; color: var(--success); font-size: 15px; font-weight: 600; }
.help-status[data-error="true"] { color: var(--danger); }
.form-note { margin: 0; color: var(--muted); font-size: 13px; }
.faq-list { display: grid; gap: 10px; max-width: 860px; }
.faq-item { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.faq-item summary { padding: 16px 20px; font-size: 16px; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--brand); font-size: 20px; line-height: 1; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: 0; padding: 0 20px 18px; color: var(--ink-2); font-size: 15px; }
.help-forum-note { margin-top: 24px; color: var(--muted); }
.engage-alt, .article-cta-alt { color: #cbd5e1; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; align-self: center; }
.engage-alt:hover, .article-cta-alt:hover { color: #fff; }
.article-cta-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: 0 0 auto; }
.forum-inbox-summary { margin: 4px 0 8px; color: var(--muted); font-size: 14px; }
.help-request-card { border-color: #bfdbfe; }
.help-request-fields { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 12px 0 0; font-size: 14px; }
.help-request-fields dt { color: var(--muted); font-weight: 600; }
.help-request-fields dd { margin: 0; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .help-hero-inner, .help-form-wrap, .scope-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .help-field-row { grid-template-columns: 1fr; }
  .help-form .button { width: 100%; }
  .article-cta-actions { align-items: flex-start; }
  .help-request-fields { grid-template-columns: 1fr; }
}
