/* FilterBox website — shared styles (home, help center, docs). */
:root {
  --yellow: #ffd600;
  --amber: #ffb300;
  --orange: #ff8f00;
  --orange-ink: #b45a00;
  --ink: #141413;
  --ink-2: #34332f;
  --muted: #6a665d;
  --paper: #faf7f0;
  --white: #fff;
  --line: rgba(64, 52, 24, .13);
  --bg: var(--yellow);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.42, .64, 1);
  --head: 64px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
:lang(zh-Hans) { --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif; }
:lang(zh-Hant) { --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans CJK TC", sans-serif; }
:lang(ja) { --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans JP", "Noto Sans CJK JP", sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--head) + 16px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.7 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; overflow-x: clip; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid var(--orange-ink); outline-offset: 3px; border-radius: 6px; }
::selection { background: #ffe066; }
.i { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i-sm { width: .85em; height: .85em; }
.wrap { width: min(1200px, calc(100% - 96px)); margin-inline: auto; }
.skip { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 10px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 600; }
.skip:focus { top: 12px; }

/* Masthead */
.masthead { position: fixed; inset: 0 0 auto; z-index: 50; background: var(--bg); transition: box-shadow .3s; padding-top: env(safe-area-inset-top); }
.masthead.is-scrolled { box-shadow: 0 1px 0 var(--line); }
body { padding-top: var(--head); }
.masthead-bar { height: var(--head); display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.01em; white-space: nowrap; }
.brand-icon { width: 30px; height: 30px; filter: drop-shadow(0 2px 3px rgba(150, 80, 0, .25)); transition: transform .5s var(--spring); }
.brand:hover .brand-icon { transform: rotate(-12deg) scale(1.06); }
.masthead-nav { display: flex; gap: 4px; margin-left: auto; font-size: 15px; font-weight: 550; }
.masthead-nav a { padding: 8px 14px; border-radius: 999px; transition: background .2s; }
.masthead-nav a:hover { background: rgba(20, 20, 19, .07); }
.masthead-actions { display: flex; align-items: center; gap: 10px; }
.masthead-download { padding: 9px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 650; white-space: nowrap; transition: opacity .3s, transform .3s var(--ease), background .2s; }
.masthead-download:hover { background: #2c2b28; }
.masthead-download.is-hidden { opacity: 0; transform: scale(.9); pointer-events: none; }
.lang-picker { position: relative; font-size: 14px; }
.lang-picker summary { display: flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 999px; cursor: pointer; list-style: none; font-weight: 550; transition: background .2s; user-select: none; }
.lang-picker summary::-webkit-details-marker { display: none; }
.lang-picker summary:hover, .lang-picker[open] summary { background: rgba(20, 20, 19, .07); }
.lang-picker summary .i { width: 18px; height: 18px; stroke-width: 1.7; }
.lang-picker summary .i-sm { width: 13px; height: 13px; transition: transform .25s var(--ease); }
.lang-picker[open] summary .i-sm { transform: rotate(180deg); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 168px; padding: 6px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .05), 0 12px 32px -8px rgba(60, 40, 0, .22); transform-origin: top right; animation: pop .22s var(--ease-out); }
.lang-menu a { display: block; padding: 10px 14px; border-radius: 12px; font-size: 15px; }
.lang-menu a:hover { background: #f6f2e8; }
.lang-menu a[aria-current] { background: #fff4c2; font-weight: 650; }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(-4px); } }

/* Type */
.display { font-size: clamp(44px, 5vw, 74px); line-height: 1.06; font-weight: 750; letter-spacing: -.035em; }
.display span, h2 span { display: block; }
h2 { font-size: clamp(36px, 4.2vw, 60px); line-height: 1.1; font-weight: 720; letter-spacing: -.03em; }
:lang(zh-Hans) .display, :lang(zh-Hant) .display, :lang(ja) .display { line-height: 1.2; letter-spacing: -.01em; }
:lang(zh-Hans) h2, :lang(zh-Hant) h2, :lang(ja) h2 { line-height: 1.25; letter-spacing: 0; }
:lang(ja) .display { font-size: clamp(36px, 3.9vw, 58px); }
:lang(ja) h2 { font-size: clamp(32px, 3.6vw, 52px); }
.lead { font-size: 19px; line-height: 1.72; color: var(--muted); max-width: 34em; }
:lang(zh-Hans) .lead, :lang(zh-Hant) .lead, :lang(ja) .lead { line-height: 1.9; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--orange-ink); }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(255, 143, 0, .18); }
:lang(zh-Hans) .eyebrow, :lang(zh-Hant) .eyebrow, :lang(ja) .eyebrow { letter-spacing: .08em; }

/* Buttons */
/* Two equal-width buttons: each column takes the width of the wider button. */
.store-buttons { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 12px; vertical-align: top; }
.store-btn { display: flex; align-items: center; justify-content: center; gap: 14px; height: 62px; padding: 0 24px 0 20px; border-radius: 16px; text-align: left; white-space: nowrap; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.store-btn > span { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.store-btn small { font-size: 11px; line-height: 1; font-weight: 600; letter-spacing: .07em; opacity: .7; }
.store-btn strong { font-size: 21px; line-height: 1; font-weight: 650; letter-spacing: -.012em; }
.store-btn-icon { flex: none; width: 25px; height: 27px; }
.store-btn--apk .store-btn-icon { width: 26px; height: 26px; stroke-width: 2.4; }
.store-btn--primary { background: #141413; color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .22), 0 12px 24px -12px rgba(60, 40, 0, .55); }
.store-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0, 0, 0, .22), 0 18px 30px -14px rgba(60, 40, 0, .6); }
.store-btn--primary.store-btn--apk .store-btn-icon { color: var(--yellow); }
.store-btn--secondary { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px rgba(40, 28, 0, .07), 0 1px 2px rgba(40, 28, 0, .07), 0 12px 24px -14px rgba(60, 40, 0, .38); }
.store-btn--secondary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(40, 28, 0, .07), 0 2px 4px rgba(40, 28, 0, .07), 0 18px 30px -16px rgba(60, 40, 0, .42); }
.store-btn--secondary.store-btn--apk .store-btn-icon { color: var(--orange); }
.store-btn:active { transform: translateY(0) scale(.98); }
:lang(zh-Hans) .store-btn small, :lang(zh-Hant) .store-btn small, :lang(ja) .store-btn small { font-size: 11.5px; letter-spacing: .08em; }
.store-note { margin-top: 14px; font-size: 14px; color: var(--muted); }
.more-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; color: var(--ink); border-bottom: 1.5px solid rgba(20, 20, 19, .25); padding-bottom: 2px; transition: border-color .2s, gap .25s var(--ease); }
.more-link:hover { border-color: currentColor; gap: 12px; }
.more-link .i { width: 18px; height: 18px; }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease-out), transform .9s var(--ease-out); transition-delay: calc(var(--d, 0) * 80ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* Footer */
.footer { background: #f6f2e9; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 30px; padding-block: 26px 30px; }
.footer-brand { font-size: 16px; color: var(--ink); }
.footer-brand .brand-icon { width: 26px; height: 26px; }
.footer-links, .footer-langs { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer-langs { margin-left: auto; }
.footer a { transition: color .2s; }
.footer-links a:hover, .footer-langs a:hover, .footer-langs a[aria-current] { color: var(--ink); }
.footer-copy { font-size: 13px; }

/* Language suggestion */
.lang-suggest { position: fixed; z-index: 60; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .45); animation: rise .5s var(--ease-out); max-width: calc(100% - 32px); }
.lang-suggest a { padding: 7px 14px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-weight: 650; white-space: nowrap; }
.lang-suggest button { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; opacity: .7; }
.lang-suggest button:hover { opacity: 1; background: rgba(255, 255, 255, .12); }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 16px); } }

/* Help center & docs */
.page-doc, .page-help { --bg: #fff; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumbs a:hover { color: var(--ink); }
.crumbs .i { width: 14px; height: 14px; opacity: .6; transform: rotate(-90deg); }
.doc-title { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.18; letter-spacing: -.025em; font-weight: 750; margin-bottom: 28px; }
:lang(zh-Hans) .doc-title, :lang(zh-Hant) .doc-title, :lang(ja) .doc-title { line-height: 1.32; letter-spacing: 0; }
.doc-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr) 200px; gap: 64px; align-items: start; padding-block: 56px 112px; }
.doc-layout--plain { grid-template-columns: minmax(0, 760px); justify-content: center; }
.doc-nav { position: sticky; top: calc(var(--head) + 32px); display: grid; gap: 2px; font-size: 15px; }
.doc-nav a { display: block; padding: 8px 12px; border-radius: 10px; line-height: 1.4; color: var(--ink-2); transition: background .2s, color .2s; }
.doc-nav a:hover { color: var(--ink); background: rgba(20, 20, 19, .045); }
.doc-nav a[aria-current] { background: #fff1b8; color: var(--ink); font-weight: 650; }
.doc-nav a small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.doc-nav .doc-nav-home { margin-bottom: 8px; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.doc-main { min-width: 0; max-width: 760px; }
.prose { font-size: 17px; line-height: 1.8; color: var(--ink-2); overflow-wrap: break-word; }
:lang(zh-Hans) .prose, :lang(zh-Hant) .prose, :lang(ja) .prose { line-height: 1.95; }
.prose > * + * { margin-top: 1em; }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5 { color: var(--ink); line-height: 1.35; letter-spacing: -.01em; scroll-margin-top: calc(var(--head) + 20px); }
.prose h1, .prose h2 { font-size: 26px; font-weight: 720; margin-top: 2em; }
.prose h3 { font-size: 21px; font-weight: 700; margin-top: 1.8em; }
.prose h4 { font-size: 18px; font-weight: 700; margin-top: 1.7em; }
.prose h5 { font-size: 15.5px; font-weight: 600; margin-top: 1.6em; color: var(--muted); }
.prose > :first-child { margin-top: 0; }
.prose a { color: var(--orange-ink); text-decoration: underline; text-decoration-color: rgba(180, 90, 0, .35); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--orange); }
.prose strong { color: var(--ink); font-weight: 680; }
.prose hr { border: 0; height: 1px; background: var(--line); margin-block: 2.2em; }
.prose blockquote { margin: 1.4em 0; padding: 2px 0 2px 20px; border-left: 3px solid var(--amber); color: var(--ink-2); }
.prose img { border-radius: 14px; box-shadow: 0 0 0 1px var(--line); margin-block: 1em; height: auto; }
.prose code { font: .88em/1.5 var(--mono); padding: .14em .42em; border-radius: 7px; background: #f5f1e6; color: #7a3d00; }
.prose pre { position: relative; margin: 1.4em 0; padding: 18px 20px; border-radius: 14px; background: #1d1c1a; color: #f1ede4; overflow: auto; font: 14px/1.65 var(--mono); tab-size: 2; }
.prose pre code { padding: 0; background: none; color: inherit; font: inherit; }
.prose div.highlighter-rouge { position: relative; }
.prose .copy-code { position: absolute; top: 10px; right: 10px; padding: 5px 10px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .1); color: #f1ede4; font-size: 12px; cursor: pointer; opacity: 0; transition: opacity .2s, background .2s; }
.prose div.highlighter-rouge:hover .copy-code, .prose pre:hover .copy-code, .prose .copy-code:focus-visible { opacity: 1; }
.prose .copy-code:hover { background: rgba(255, 255, 255, .2); }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { color: var(--ink); }
.highlight .s, .highlight .s2, .highlight .s1 { color: #ffd166; }
.highlight .k, .highlight .kc, .highlight .kd { color: #ff9d5c; }
.highlight .mi, .highlight .mf { color: #9ad1ff; }
.highlight .p, .highlight .o { color: #c9c2b4; }
.highlight .nt, .highlight .na { color: #8fe1b0; }
.highlight .c, .highlight .c1, .highlight .cm { color: #8b8578; font-style: italic; }
.doc-changelog .prose > p:has(+ ul) { margin-top: 1.9em; font-weight: 750; font-size: 19px; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.doc-changelog .prose > p:has(+ ul)::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--orange); }
.doc-changelog .prose > p:has(+ ul) + ul { margin-top: .5em; }
.doc-toc { position: sticky; top: calc(var(--head) + 32px); font-size: 14px; }
.doc-toc h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 10px; font-weight: 700; }
.doc-toc ol { border-left: 1.5px solid var(--line); }
.doc-toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1.5px; border-left: 1.5px solid transparent; color: var(--muted); line-height: 1.4; transition: color .2s, border-color .2s; }
.doc-toc a.sub { padding-left: 26px; font-size: 13px; }
.doc-toc a:hover { color: var(--ink); }
.doc-toc a.is-active { color: var(--ink); border-color: var(--orange); font-weight: 600; }

.help { padding-block: 64px 112px; max-width: 920px; }
.help .doc-title { font-size: clamp(36px, 4.4vw, 56px); margin-bottom: 36px; }
.help-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; border-top: 1px solid var(--line); }
.help-list a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 2px; border-bottom: 1px solid var(--line); font-size: 18px; font-weight: 600; line-height: 1.4; transition: color .2s; }
.help-list a small { display: inline-block; margin-left: 10px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.help-list a .i { width: 18px; height: 18px; color: var(--muted); transition: transform .25s var(--ease), color .2s; }
.help-list a:hover { color: var(--orange-ink); }
.help-list a:hover .i { transform: translateX(4px); color: var(--orange-ink); }
.help-contact { margin-top: 40px; color: var(--muted); font-size: 15px; }
.help-contact a { color: var(--ink); font-weight: 600; border-bottom: 1.5px solid rgba(20, 20, 19, .25); }
.help-contact a:hover { border-color: currentColor; }

@media (max-width: 1100px) {
  .wrap { width: calc(100% - 64px); }
  .doc-layout { grid-template-columns: 200px minmax(0, 1fr); gap: 48px; }
  .doc-toc { display: none; }
}
@media (max-width: 860px) {
  .masthead-nav { display: none; }
  .masthead-actions { margin-left: auto; }
  .doc-layout { grid-template-columns: minmax(0, 1fr); padding-block: 36px 88px; }
  .doc-nav { display: none; }
  .help-list { grid-template-columns: minmax(0, 1fr); }
  .footer-langs { margin-left: 0; }
}
@media (max-width: 600px) {
  :root { --head: 56px; }
  body { font-size: 16px; }
  .wrap { width: calc(100% - 40px); }
  .brand { font-size: 17px; }
  .brand-icon { width: 28px; height: 28px; }
  .masthead-bar { gap: 12px; }
  .masthead-actions { gap: 4px; }
  .masthead-download { padding: 8px 14px; font-size: 13px; }
  .lang-picker summary { padding: 8px; }
  .lang-picker summary span, .lang-picker summary .i-sm { display: none; }
  .lead { font-size: 17px; }
  .store-btn { height: 56px; padding: 0 18px 0 15px; gap: 12px; }
  .store-btn strong { font-size: 19px; }
  .footer-row { gap: 12px 22px; }
  .prose { font-size: 16px; }
  .prose pre { border-radius: 12px; font-size: 13px; padding: 14px 16px; }
  .help { padding-block: 40px 88px; }
  .help-list a { font-size: 17px; padding: 18px 2px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
