/* Flyte Knowledge Base. Layout: sticky top bar; home = hero + topic grid; docs = sidebar, article, on-this-page.
   Brand: navy #202944, slate #36415B / #5B6984, mist #9BA7BC (the logo's chevrons), action blue #3D4EE8. */
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('/assets/fonts/plus-jakarta-sans-var-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('/assets/fonts/plus-jakarta-sans-var-latin-ext.woff2') format('woff2'); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --navy: #202944; --slate: #36415B; --steel: #5B6984; --mist: #9BA7BC;
  --bg: #F6F7FA; --surface: #FFFFFF; --sunk: #EEF0F5; --ink: #1B2238; --ink-2: #434B63; --muted: #66708A;
  --line: #E1E4EC; --line-2: #CDD2DE; --accent: #3D4EE8; --accent-ink: #2F3EC4; --accent-soft: #ECEEFE;
  --tip: #0E7A5A; --tip-bg: #E8F6F0; --info: #2F5BCF; --info-bg: #EBF1FD; --warn: #A75A00; --warn-bg: #FFF4E2;
  --hero-from: #202944; --hero-to: #36415B; --hero-ink: #FFFFFF; --hero-sub: #C9D0DE;
  --radius: 14px; --shadow: 0 1px 2px rgba(20,26,48,.05), 0 6px 22px -10px rgba(20,26,48,.18);
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12172A; --surface: #1A2036; --sunk: #222A44; --ink: #EEF0F6; --ink-2: #C7CCDA; --muted: #9AA3BA;
    --line: #2A3352; --line-2: #36415B; --accent: #8A97FF; --accent-ink: #A8B2FF; --accent-soft: #262E52;
    --tip: #5CD3A6; --tip-bg: #16302A; --info: #8FB0FF; --info-bg: #1B2748; --warn: #FFB65C; --warn-bg: #33270F;
    --hero-from: #161B30; --hero-to: #202944; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 26px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12172A; --surface: #1A2036; --sunk: #222A44; --ink: #EEF0F6; --ink-2: #C7CCDA; --muted: #9AA3BA;
  --line: #2A3352; --line-2: #36415B; --accent: #8A97FF; --accent-ink: #A8B2FF; --accent-soft: #262E52;
  --tip: #5CD3A6; --tip-bg: #16302A; --info: #8FB0FF; --info-bg: #1B2748; --warn: #FFB65C; --warn-bg: #33270F;
  --hero-from: #161B30; --hero-to: #202944; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
.narrow { max-width: 820px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }
h1, h2, h3 { color: var(--ink); line-height: 1.25; letter-spacing: -.015em; text-wrap: balance; }
.eyebrow { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--steel); }
.lede { font-size: 18px; color: var(--ink-2); margin: 10px 0 0; max-width: 62ch; }
kbd { font: 600 11px var(--mono); padding: 2px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; color: var(--muted); background: var(--surface); }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 22px; height: 66px; }
.brand { display: flex; align-items: center; gap: 4px; color: var(--ink); }
.brand img { height: 40px; width: auto; margin: -4px 0; }
.logo-dark { display: none !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-light { display: none !important; } :root:not([data-theme="light"]) .logo-dark { display: block !important; } }
.brand-kb { font-weight: 700; font-size: 15px; color: var(--steel); padding-left: 12px; margin-left: 6px; border-left: 1px solid var(--line-2); white-space: nowrap; }
.mainnav { display: flex; gap: 4px; margin-left: 10px; }
.mainnav a { color: var(--ink-2); font-weight: 600; font-size: 14.5px; padding: 8px 12px; border-radius: 9px; }
.mainnav a:hover { background: var(--sunk); color: var(--ink); }
.mainnav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.search-open { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 240px; height: 40px; padding: 0 10px 0 12px; border: 1px solid var(--line-2); border-radius: 11px; background: var(--surface); color: var(--muted); font: 500 14px var(--font); cursor: pointer; }
.search-open:hover { border-color: var(--mist); }
.search-open svg { width: 17px; height: 17px; }
.search-open span { flex: 1; text-align: left; }
.menu-btn { display: none; margin-left: 4px; width: 42px; height: 42px; border: 1px solid var(--line-2); border-radius: 11px; background: var(--surface); color: var(--ink); cursor: pointer; place-items: center; }
.menu-btn svg { width: 20px; height: 20px; }

/* Hero */
.hero { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--hero-from), var(--hero-to)); color: var(--hero-ink); }
.hero-in { position: relative; z-index: 1; padding-top: 72px; padding-bottom: 76px; }
.hero .eyebrow { color: var(--mist); }
.hero h1 { color: #fff; font-size: clamp(36px, 6vw, 58px); margin: 0; font-weight: 800; }
.hero .lede { color: var(--hero-sub); font-size: clamp(16px, 2.2vw, 19px); }
.hero-search { margin-top: 30px; display: flex; align-items: center; gap: 12px; width: 100%; max-width: 640px; height: 60px; padding: 0 16px 0 20px; border: 0; border-radius: 16px; background: #fff; color: #66708A; font: 500 17px var(--font); cursor: pointer; box-shadow: 0 18px 40px -18px rgba(0,0,0,.55); }
.hero-search svg { width: 22px; height: 22px; color: #36415B; }
.hero-search span { flex: 1; text-align: left; }
.hero-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: #E6EAF3; padding: 7px 13px; border-radius: 999px; font: 600 13px var(--font); cursor: pointer; }
.chip:hover { background: rgba(255,255,255,.16); }
.hero-mark { position: absolute; right: -60px; top: 50%; transform: translateY(-50%); width: 520px; opacity: .14; filter: brightness(1.6); pointer-events: none; }
.pagehead .wrap, .pagehead { position: relative; }
.pagehead { background: var(--surface); border-bottom: 1px solid var(--line); padding: 44px 0 36px; }
.pagehead h1 { margin: 0; font-size: clamp(30px, 4.5vw, 42px); font-weight: 800; }
.pagehead-row { display: flex; gap: 18px; align-items: center; }
.sharenote { display: flex; gap: 10px; align-items: center; margin: 18px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--info-bg); color: var(--info); font-size: 14px; font-weight: 600; width: fit-content; }
.sharenote svg { width: 18px; height: 18px; flex: none; }

/* Blocks and cards */
.block { padding-top: 44px; padding-bottom: 20px; }
.block-h { font-size: 22px; margin: 34px 0 16px; font-weight: 800; }
.block-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.more { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; font-size: 14px; }
.more svg { width: 16px; height: 16px; }
.feature { display: flex; gap: 20px; align-items: center; padding: 26px 28px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); }
.feature:hover { border-color: var(--mist); color: var(--ink); }
.feature h2 { margin: 0 0 6px; font-size: 22px; }
.feature p { margin: 0; color: var(--ink-2); }
.feature .eyebrow { margin-bottom: 6px; color: var(--accent); }
.feature-ic { flex: none; width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: var(--navy); color: #fff; }
.feature-ic svg { width: 28px; height: 28px; }
.feature-go { margin-left: auto; flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.feature-go svg { width: 18px; height: 18px; }
.secgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.seccard { display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); transition: border-color .15s, transform .15s, box-shadow .15s; }
.seccard:hover { color: var(--ink); border-color: var(--mist); transform: translateY(-2px); box-shadow: var(--shadow); }
.seccard b { font-size: 16.5px; margin-top: 8px; }
.seccard > span:not(.seccard-ic) { color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.seccard em { margin-top: auto; padding-top: 10px; font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--steel); }
.seccard-ic { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--sunk); color: var(--slate); }
.seccard-ic svg { width: 22px; height: 22px; }
.seccard-ic.big { width: 58px; height: 58px; border-radius: 16px; background: var(--navy); color: #fff; }
.seccard-ic.big svg { width: 28px; height: 28px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seccard-ic { color: var(--mist); } }
.share { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; padding-top: 18px; }
.sharecard { display: flex; gap: 16px; align-items: center; padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.sharecard:hover { color: var(--ink); border-color: var(--mist); }
.sharecard b { display: block; font-size: 16.5px; }
.sharecard div span { color: var(--ink-2); font-size: 14.5px; }
.upgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.upcard, .tlcard { display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.upcard:hover, .tlcard:hover { color: var(--ink); border-color: var(--mist); box-shadow: var(--shadow); }
.upcard b, .tlcard b { font-size: 17px; line-height: 1.35; }
.upcard > span:last-child, .tlcard > span { color: var(--ink-2); font-size: 14.5px; }
.upmeta { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); margin: 0; }
.kind { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; width: fit-content; }
.tlcard em { font-style: normal; font-weight: 700; font-size: 13.5px; color: var(--accent); display: inline-flex; gap: 6px; align-items: center; }
.tlcard em svg { width: 15px; height: 15px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 26px; }
.timeline li { position: relative; }
.timeline li::before { content: ''; position: absolute; left: -29px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg); }
.timeline time { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.rsslink { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; font-size: 15px; }
.rsslink svg { width: 16px; height: 16px; }

/* Guide lists */
.secblock { padding: 8px 0 26px; }
.secblock-h { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.secblock-h h2 { margin: 2px 0 4px; font-size: 21px; }
.secblock-h h2 a { color: var(--ink); }
.secblock-h p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.alist { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.acard { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.acard:hover { color: var(--ink); border-color: var(--mist); }
.acard b { font-size: 15px; }
.acard span { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-width: 900px; }
.steps a { display: flex; gap: 16px; align-items: center; padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.steps a:hover { color: var(--ink); border-color: var(--mist); box-shadow: var(--shadow); }
.steps a > svg { margin-left: auto; width: 18px; height: 18px; flex: none; color: var(--muted); }
.steps .num { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--sunk); color: var(--slate); font-weight: 800; font-size: 14px; }
.steps a span span { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.steps b { font-size: 16px; }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); font-weight: 600; }
.crumbs a:hover { color: var(--accent); }

/* Docs layout */
.docs { display: grid; grid-template-columns: 260px minmax(0, 1fr) 220px; gap: 48px; align-items: start; padding-top: 34px; padding-bottom: 60px; }
.sidenav { position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow-y: auto; padding-right: 6px; }
.sidenav-back { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 18px; }
.sidenav-back svg { width: 15px; height: 15px; }
.sidenav-h { display: flex; gap: 8px; align-items: center; font-weight: 800; font-size: 14.5px; margin: 0 0 10px; }
.sidenav-h svg { width: 18px; height: 18px; color: var(--steel); }
.sidenav ul { list-style: none; margin: 0; padding: 0 0 0 12px; border-left: 1px solid var(--line); }
.sidenav li a { display: block; padding: 6px 10px; margin-left: -13px; border-left: 2px solid transparent; font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.sidenav li a:hover { color: var(--ink); }
.sidenav li a[aria-current="page"] { color: var(--accent); border-left-color: var(--accent); font-weight: 700; }
.toc { position: sticky; top: 90px; font-size: 13.5px; }
.toc-h { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.toc a { display: block; padding: 4px 0 4px 10px; border-left: 2px solid var(--line); color: var(--muted); line-height: 1.4; }
.toc a:hover, .toc a.on { color: var(--accent); border-left-color: var(--accent); }
.doc { min-width: 0; max-width: 760px; }
.doc-h h1 { font-size: clamp(30px, 4.4vw, 40px); margin: 8px 0 0; font-weight: 800; }
.doc-meta { margin: 14px 0 0; font-size: 13px; color: var(--muted); font-weight: 600; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge.cust { background: var(--tip-bg); color: var(--tip); }
.badge.fact { background: var(--warn-bg); color: var(--warn); }

/* Article body */
.prose { margin-top: 30px; font-size: 16.5px; color: var(--ink-2); }
.prose > * + * { margin-top: 1.05em; }
.prose p, .prose li { max-width: 70ch; }
.prose h2 { font-size: 24px; margin: 2.1em 0 .2em; padding-top: 18px; border-top: 1px solid var(--line); font-weight: 800; position: relative; }
.prose h3 { font-size: 19px; margin: 1.7em 0 .2em; font-weight: 700; position: relative; }
.prose h2 .anchor, .prose h3 .anchor { position: absolute; left: -24px; color: var(--mist); opacity: 0; font-weight: 600; }
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 1; }
.prose h2 .anchor { top: 18px; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--steel); font-weight: 700; }
.prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 3px; }
.prose code { font: 600 .88em var(--mono); background: var(--sunk); padding: 2px 6px; border-radius: 6px; color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.prose table { border-collapse: collapse; width: 100%; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.prose th, .prose td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--sunk); color: var(--ink); font-weight: 700; font-size: 13px; letter-spacing: .02em; }
.prose tr:last-child td { border-bottom: 0; }
.prose blockquote { margin-left: 0; margin-right: 0; padding: 14px 18px; border-radius: 12px; background: var(--sunk); }
.callout { border: 1px solid transparent; }
.callout p { margin: 0; }
.callout p + p { margin-top: .5em; }
.callout-title { display: flex; gap: 8px; align-items: center; font-weight: 800; font-size: 14px; letter-spacing: .01em; margin-bottom: 4px !important; }
.callout-title svg { width: 18px; height: 18px; }
.callout.tip { background: var(--tip-bg); } .callout.tip .callout-title { color: var(--tip); }
.callout.info { background: var(--info-bg); } .callout.info .callout-title { color: var(--info); }
.callout.warn { background: var(--warn-bg); } .callout.warn .callout-title { color: var(--warn); }
.related { margin-top: 48px; }
.related h2 { font-size: 18px; margin: 0 0 12px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 40px; }
.pager a { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); }
.pager a:hover { border-color: var(--mist); color: var(--ink); }
.pager a span { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.pager a span svg { width: 14px; height: 14px; }
.pager .next { text-align: right; align-items: flex-end; }
.post .prose { font-size: 17px; }

/* Footer */
.footer { margin-top: 70px; border-top: 1px solid var(--line); background: var(--surface); }
.footer-in { display: grid; grid-template-columns: auto 1fr; gap: 18px 40px; padding-top: 34px; padding-bottom: 40px; align-items: center; }
.footer-brand { display: flex; gap: 12px; align-items: center; }
.footer-brand b { display: block; }
.footer-brand span { font-size: 13px; color: var(--muted); }
.footer-nav { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.footer-nav a { color: var(--ink-2); font-weight: 600; font-size: 14px; }
.footer-note { grid-column: 1 / -1; margin: 0; font-size: 13.5px; color: var(--muted); }

/* Search dialog */
.search-dialog { position: fixed; inset: 0; z-index: 90; background: rgba(12,16,32,.55); backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: flex-start; padding: max(10vh, 20px) 16px 20px; }
.search-panel { width: 100%; max-width: 680px; background: var(--surface); border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.6); overflow: hidden; border: 1px solid var(--line); }
.search-field { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.search-field svg { width: 22px; height: 22px; color: var(--steel); flex: none; }
.search-field input { flex: 1; min-width: 0; height: 62px; border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 18px var(--font); }
.search-results { list-style: none; margin: 0; padding: 8px; max-height: min(60vh, 520px); overflow-y: auto; }
.search-results li a { display: block; padding: 12px 14px; border-radius: 12px; color: var(--ink); }
.search-results li a b { display: block; font-size: 15.5px; }
.search-results li a small { display: block; font-size: 12px; font-weight: 700; color: var(--steel); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.search-results li a span { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.search-results li a mark { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.search-results li.on a, .search-results li a:hover { background: var(--accent-soft); }
.search-empty { padding: 26px 18px; color: var(--muted); text-align: center; }
.search-foot { margin: 0; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }

/* Responsive */
@media (max-width: 1180px) { .docs { grid-template-columns: 240px minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 900px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .sidenav { position: static; max-height: none; order: 2; border-top: 1px solid var(--line); padding-top: 22px; }
  .mainnav { display: none; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 16px 16px; margin: 0; }
  body.nav-open .mainnav { display: flex; }
  .menu-btn { display: grid; }
  .search-open { min-width: 0; width: 42px; padding: 0; justify-content: center; }
  .search-open span, .search-open kbd { display: none; }
  .brand-kb { display: none; }
  .hero-mark { display: none; }
  .footer-in { grid-template-columns: 1fr; } .footer-nav { justify-content: flex-start; }
  .prose h2 .anchor, .prose h3 .anchor { display: none; }
}
@media (max-width: 560px) {
  .feature { flex-direction: column; align-items: flex-start; } .feature-go { display: none; }
  .pager { grid-template-columns: 1fr; } .pager .next { text-align: left; align-items: flex-start; }
  .hero-in { padding-top: 48px; padding-bottom: 52px; } .hero-search { height: 54px; font-size: 15.5px; }
  .pagehead-row { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ── Chinese pages and the 中文 / EN switch ─────────────────────────────── */
html:lang(zh) .prose { line-height: 1.85; letter-spacing: .01em; }
.lang-switch { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; margin-left: 8px; border: 1px solid var(--line-2); border-radius: 11px; background: var(--surface); color: var(--ink-2); font: 700 14px var(--font); white-space: nowrap; }
.lang-switch svg { width: 17px; height: 17px; }
.lang-switch:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
@media (max-width: 900px) { .lang-switch { padding: 0 10px; } }

/* ── What's new: the announcement bar and the home "New updates" block ──── */
.newsbar { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 9px 16px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 600; text-align: center; }
.newsbar:hover { filter: brightness(1.08); }
.newsbar .kind { background: rgba(255,255,255,.2); color: #fff; }
.newsbar-go { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.newsbar-go svg { width: 15px; height: 15px; }
@media (max-width: 640px) { .newsbar-t { display: none; } }
.whatsnew { padding-top: 8px; }
.whatsnew .block-h { display: flex; align-items: center; gap: 8px; }
.whatsnew .block-h svg { width: 22px; height: 22px; color: var(--accent); }
.whatsnew-lede { color: var(--ink-2); margin: -4px 0 18px; font-size: 16px; }
.newsgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.newscard { display: flex; flex-direction: column; gap: 8px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); }
.newscard:hover { border-color: var(--accent); }
.newscard b { font-size: 16.5px; line-height: 1.35; }
.newscard > span:not(.upmeta) { color: var(--ink-2); font-size: 14.5px; }
.newscard em { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-style: normal; font-weight: 600; color: var(--accent); font-size: 14px; }
.newscard em svg { width: 15px; height: 15px; }
.newscard.lead { grid-column: 1 / -1; background: var(--accent-soft); border-color: var(--accent); }
.newscard.lead b { font-size: 20px; }
