:root {
  color-scheme: light;
  --brand: #16836a;
  --brand-hover: #106851;
  --brand-soft: #eaf7f0;
  --bg: #fff;
  --soft: color-mix(in oklab, var(--brand) 4%, #f8f9fa);
  --muted-bg: color-mix(in oklab, var(--brand) 7%, #f1f3f5);
  --text: color-mix(in oklab, var(--brand) 14%, #1f2933);
  --muted: color-mix(in oklab, var(--brand) 12%, #65707c);
  --border: color-mix(in oklab, var(--brand) 9%, #e8ebee);
  --brand-glow: color-mix(in srgb, var(--brand) 14%, transparent);
  --shadow: 0 12px 40px color-mix(in srgb, var(--brand) 9%, #0000000a);
  --read-size: 14px;
  --sidebar-width: 248px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand: #70d8ad;
  --brand-hover: #93e5c2;
  --brand-soft: #1c382b;
  --bg: color-mix(in oklab, var(--brand) 5%, #101316);
  --soft: color-mix(in oklab, var(--brand) 7%, #161a1e);
  --muted-bg: color-mix(in oklab, var(--brand) 10%, #1e2328);
  --text: color-mix(in oklab, var(--brand) 8%, #e4e9ee);
  --muted: color-mix(in oklab, var(--brand) 10%, #9aa4ae);
  --border: color-mix(in oklab, var(--brand) 13%, #272d33);
  --shadow: 0 12px 40px #0004;
}
:root[data-accent="blue"] { --brand: #2563eb; --brand-hover: #1d4ed8; --brand-soft: #eaf1ff; }
:root[data-accent="violet"] { --brand: #7c3aed; --brand-hover: #6d28d9; --brand-soft: #f2ecff; }
:root[data-accent="amber"] { --brand: #b45309; --brand-hover: #92400e; --brand-soft: #fdf3e4; }
:root[data-accent="rose"] { --brand: #e11d48; --brand-hover: #be123c; --brand-soft: #fdecef; }
:root[data-accent="slate"] { --brand: #3f4a5a; --brand-hover: #2b3441; --brand-soft: #eef1f5; }
:root[data-theme="dark"][data-accent="blue"] { --brand: #7cacff; --brand-hover: #a3c4ff; --brand-soft: #1b2a47; }
:root[data-theme="dark"][data-accent="violet"] { --brand: #b69cff; --brand-hover: #cdbaff; --brand-soft: #2c2346; }
:root[data-theme="dark"][data-accent="amber"] { --brand: #f5b759; --brand-hover: #f8cb84; --brand-soft: #3a2d17; }
:root[data-theme="dark"][data-accent="rose"] { --brand: #fb7f9b; --brand-hover: #fda4b8; --brand-soft: #3f1e27; }
:root[data-theme="dark"][data-accent="slate"] { --brand: #c3ccd8; --brand-hover: #dde3ea; --brand-soft: #262c35; }
:root[data-font="sm"] { --read-size: 13px; }
:root[data-font="lg"] { --read-size: 16px; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
button, input { color: var(--text); }
button { border: 0; }
input { min-width: 0; }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; }
::selection { background: color-mix(in srgb, var(--brand) 28%, transparent); }
svg { display: block; }
.muted { color: var(--muted); }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 8px 16px; background: var(--brand); color: var(--bg); border-radius: 8px; }
.skip-link:focus { top: 10px; }
.header { position: sticky; top: 0; z-index: 30; height: 72px; padding: 0 30px; display: flex; align-items: center; gap: 22px; border-bottom: 1px solid var(--border); background: var(--bg); }
.brand { display: flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 750; letter-spacing: -.6px; white-space: nowrap; }
.brand-mark { width: 35px; height: 35px; display: grid; grid-template-columns: 18px 8px; align-content: center; justify-content: center; border-radius: 10px; background: color-mix(in oklab, var(--brand) 32%, #161b20); color: #fff; font-size: 23px; letter-spacing: -2px; }
.brand-mark span { color: color-mix(in oklab, var(--brand) 50%, #fff); }
.brand-light { font-weight: 450; }
.header-nav { display: flex; gap: 28px; margin-left: 34px; font-size: 13px; font-weight: 600; }
.header-nav a:hover, .github-link:hover { color: var(--brand); }
.home-nav { color: var(--brand); }
.search-trigger { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 250px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--soft); color: var(--muted); text-align: left; font-size: 12px; }
.search-trigger > span:first-child { font-size: 23px; line-height: 1; }
kbd { font-family: inherit; border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; font-size: 10px; }
.search-trigger kbd { margin-left: auto; background: var(--bg); }
.icon-button { background: transparent; width: 32px; height: 32px; display: inline-flex; justify-content: center; align-items: center; font-size: 22px; border-radius: 7px; flex-shrink: 0; }
.icon-button:hover { background: var(--muted-bg); }
.github-link { padding-left: 17px; border-left: 1px solid var(--border); }
.menu-button { display: none; }
.sidebar { position: fixed; top: 72px; bottom: 0; width: var(--sidebar-width); border-right: 1px solid var(--border); background: var(--soft); z-index: 25; display: flex; flex-direction: column; padding: 24px 15px 0; }
.overview-link { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 8px; color: var(--brand); background: var(--brand-soft); font-size: 13px; font-weight: 650; }
.overview-link > span:last-child { margin-left: auto; }
.sidebar-filter { display: flex; align-items: center; gap: 7px; margin: 19px 4px 14px; padding: 6px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 7px; color: var(--muted); }
.sidebar-filter input { width: 100%; background: none; border: 0; font-size: 12px; padding: 2px 0; }
.sidebar-filter input:focus { outline: none; }
.sidebar-filter:focus-within { outline: 2px solid var(--brand); }
.sidebar-filter > span { font-size: 20px; line-height: 1; }
#sidebar-content { overflow-y: auto; min-height: 0; scrollbar-width: thin; scrollbar-color: var(--border) transparent; padding: 0 2px 24px; }
.nav-group-label { margin: 16px 10px 9px; font-size: 10px; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; font-weight: 650; display: flex; justify-content: space-between; }
.nav-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 6px; color: var(--muted); font-size: 12px; line-height: 1.55; margin-bottom: 2px; }
.nav-icon { width: 19px; flex-shrink: 0; font-size: 13px; }
.nav-item small { margin-left: auto; font-size: 10px; opacity: .75; }
.nav-item:hover { color: var(--text); background: var(--muted-bg); }
.nav-item.active { color: var(--brand); background: var(--brand-soft); font-weight: 650; }
.sidebar-bottom { margin-top: auto; padding: 15px 9px; font-size: 10px; border-top: 1px solid var(--border); color: var(--muted); }
.status-dot { display: inline-block; height: 6px; width: 6px; border-radius: 50%; background: var(--brand); margin-right: 7px; vertical-align: middle; }
.empty-nav { font-size: 12px; padding: 10px; }
#main { margin-left: var(--sidebar-width); min-height: calc(100vh - 72px); outline: none; }
.home-page { max-width: 1420px; margin: auto; padding: 0 48px; }
.hero { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: center; padding: 64px 0 49px; }
.eyebrow { font-size: 10px; font-weight: 650; letter-spacing: 1.8px; color: var(--brand); }
.hero h1 { font-size: clamp(30px, 3.2vw, 49px); line-height: 1.35; letter-spacing: -1.8px; font-weight: 750; margin: 19px 0; }
.hero h1 span { color: var(--brand); }
.hero-copy > p { color: var(--muted); font-size: 14px; line-height: 1.95; margin: 0 0 27px; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 19px; padding: 11px 18px; font-size: 12px; font-weight: 600; border-radius: 7px; transition: background .18s, transform .18s; white-space: nowrap; }
.primary-button { background: var(--brand); color: var(--bg); box-shadow: 0 4px 12px var(--brand-glow); }
.primary-button:hover { background: var(--brand-hover); transform: translateY(-1px); }
.secondary-button { border: 1px solid var(--border); background: var(--bg); }
.secondary-button:hover { background: var(--soft); }
.hero-art { position: relative; min-width: 0; height: 290px; display: flex; align-items: center; justify-content: center; background-image: radial-gradient(var(--border) 1px, transparent 1px); background-size: 17px 17px; }
.hero-art::before { content: ""; position: absolute; inset: 15% 10%; background: #99e6b936; filter: blur(42px); border-radius: 50%; }
.tool-window { position: relative; width: min(100%, 330px); transform: rotate(-3deg); background: var(--bg); border: 1px solid var(--border); border-radius: 12px; box-shadow: 7px 20px 45px var(--brand-glow); overflow: hidden; }
.window-bar { height: 37px; display: flex; gap: 5px; align-items: center; border-bottom: 1px solid var(--border); padding: 0 13px; background: var(--soft); }
.window-bar > span { width: 6px; height: 6px; background: #e9a39a; border-radius: 50%; }
.window-bar > span:nth-child(2) { background: #e1c381; }
.window-bar > span:nth-child(3) { background: #8acfb1; }
.window-bar small { font: 9px ui-monospace, monospace; color: var(--muted); margin-left: auto; }
.window-content { padding: 20px; font-size: 11px; }
.window-prompt { font: 10px ui-monospace, monospace; color: var(--muted); margin-bottom: 22px; }
.window-prompt > span { color: var(--brand); margin-right: 7px; }
.window-line { display: flex; gap: 10px; margin: 12px 0; }
.window-line b { color: var(--brand); }
.window-line > span { margin-left: auto; color: var(--brand); font: 9px ui-monospace, monospace; background: var(--brand-soft); padding: 3px 6px; border-radius: 4px; }
.window-bottom { border-top: 1px dashed var(--border); margin-top: 19px; padding-top: 13px; display: flex; justify-content: space-between; font: 8px ui-monospace, monospace; color: var(--muted); letter-spacing: 1px; }
.window-bottom b { color: var(--brand); }
.floating-badge { position: absolute; z-index: 1; background: var(--bg); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: 12px; height: 42px; width: 42px; display: grid; place-items: center; font: 19px ui-monospace, monospace; }
.badge-code { top: 8px; right: 21px; transform: rotate(12deg); color: var(--brand); }
.badge-command { bottom: 27px; left: 0; transform: rotate(-10deg); color: #ac8ae6; }
.art-label { position: absolute; bottom: -4px; right: 20px; color: var(--muted); font-size: 10px; }
.art-label > span { color: var(--brand); margin-right: 6px; }
.orbit { position: absolute; border: 1px solid var(--brand-soft); border-radius: 50%; width: 230px; height: 230px; }
.orbit-two { width: 290px; height: 290px; }
.stats { display: grid; grid-template-columns: 1fr 1fr 1fr 1.2fr; padding: 22px 0; border: 1px solid var(--border); border-radius: 11px; background: var(--soft); }
.stats > div { display: flex; flex-direction: column; padding: 0 27px; border-right: 1px solid var(--border); }
.stats > div:last-child { border: 0; }
.stats strong { font-size: 24px; line-height: 1.35; font-weight: 700; letter-spacing: -.8px; }
.stats strong > span { color: var(--brand); font-size: 17px; margin-left: 3px; }
.stats div > span:last-child, .sync-stat > div > span { font-size: 10px; color: var(--muted); margin-top: 3px; }
.stats > .sync-stat { flex-direction: row; align-items: center; gap: 12px; }
.sync-stat > div { display: flex; flex-direction: column; }
.sync-stat strong { font-size: 14px; letter-spacing: 0; }
.sync-icon { width: 37px; height: 37px; display: grid; place-items: center; font-size: 26px; color: var(--brand); background: var(--brand-soft); border-radius: 50%; }
.category-section { padding-top: 44px; scroll-margin-top: 80px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-heading .eyebrow { font-size: 9px; }
.section-heading h2 { font-size: 23px; font-weight: 650; letter-spacing: -.6px; margin: 9px 0 5px; }
.section-heading p { color: var(--muted); margin: 0; font-size: 12px; }
.count-label { align-self: end; font-size: 10px; color: var(--muted); padding-bottom: 5px; }
.category-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 25px 0 20px; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-tabs button { background: none; color: var(--muted); font-size: 11px; padding: 7px 12px; border-radius: 6px; }
.filter-tabs button:hover { background: var(--soft); }
.filter-tabs button.selected { background: var(--brand-soft); color: var(--brand); font-weight: 650; }
.inline-search { background: none; color: var(--muted); font-size: 11px; white-space: nowrap; padding: 7px 0; }
.inline-search > span { margin-left: 12px; }
.category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.category-card { min-width: 0; padding: 20px 20px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); transition: border-color .18s, transform .18s, box-shadow .18s; }
.category-card:hover { border-color: var(--brand); transform: translateY(-3px); box-shadow: var(--shadow); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.category-icon { width: 37px; height: 37px; display: grid; place-items: center; font-size: 20px; background: var(--brand-soft); border-radius: 10px; }
.tone-1 { background: #a695f21c; }.tone-2 { background: #edbb5b22; }.tone-3 { background: #5ba6ed1a; }.tone-4 { background: #ee93b11a; }
.card-count { font-size: 9px; color: var(--muted); background: var(--soft); border: 1px solid var(--border); border-radius: 20px; padding: 2px 7px; white-space: nowrap; }
.category-card h3 { font-size: 14px; font-weight: 650; margin: 17px 0 8px; }
.category-card > p { color: var(--muted); font-size: 10px; line-height: 1.8; margin: 0; min-height: 36px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 17px; padding-top: 11px; border-top: 1px solid var(--border); color: var(--muted); font-size: 9px; }
.card-bottom > span:last-child { font-size: 15px; color: var(--brand); }
.category-card:hover .card-bottom { color: var(--brand); }
.source-banner { display: flex; gap: 18px; align-items: center; padding: 25px; border: 1px solid var(--border); border-radius: 10px; margin: 35px 0 0; background: linear-gradient(115deg, var(--brand-soft), var(--soft)); }
.source-symbol { color: var(--brand); font-size: 34px; }
.source-banner h2 { font-size: 15px; font-weight: 650; margin: 0 0 5px; }
.source-banner p { font-size: 11px; color: var(--muted); margin: 0; }
.source-banner .secondary-button { margin-left: auto; font-size: 10px; }
.footer { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; padding: 25px 0; margin-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 9px; }
.reader-layout { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 36px; max-width: 1450px; margin: auto; padding: 30px 38px; }
.reader-column { min-width: 0; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--muted); margin-bottom: 22px; }
.breadcrumbs a:hover { color: var(--brand); }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; font-size: 10px; color: var(--muted); padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.article-meta a { color: var(--brand); }
.doc-hero { margin: 26px 0 0; padding: 30px 32px; border: 1px solid var(--border); border-radius: 14px; background: radial-gradient(circle at 92% 0%, var(--brand-soft), transparent 55%), var(--soft); }
.doc-hero h1 { font-size: 32px; line-height: 1.3; letter-spacing: -1px; margin: 12px 0 10px; }
.doc-summary { color: var(--muted); font-size: 13px; line-height: 1.9; margin: 0; max-width: 760px; }
.doc-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 22px; }
.doc-stats > span { font-size: 11px; color: var(--muted); background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 3px 11px; }
.doc-stats b { color: var(--brand); font-size: 13px; margin-right: 2px; }
.search-panel { max-width: 560px; }
.search-box { width: 100%; display: flex; align-items: center; gap: 11px; padding: 13px 15px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--muted); font-size: 13px; text-align: left; box-shadow: 0 6px 22px color-mix(in srgb, var(--brand) 6%, #0000000a); transition: border-color .18s, box-shadow .18s; }
.search-box:hover { border-color: var(--brand); box-shadow: 0 8px 26px var(--brand-glow); }
.search-box-icon { font-size: 22px; line-height: 1; color: var(--brand); }
.search-box kbd { margin-left: auto; background: var(--soft); }
.hot-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 13px; font-size: 11px; color: var(--muted); }
.hot-tags > span { margin-right: 3px; }
.hot-tags button { background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 3px 11px; font-size: 11px; color: var(--muted); transition: color .15s, border-color .15s, background .15s; }
.hot-tags button:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.hot-tags.centered { justify-content: center; margin-top: 16px; }
.quick-nav { margin: 26px 0 0; }
.quick-title { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 650; margin: 0 0 12px; }
.quick-title > span, .chip small { color: var(--muted); font-size: 10px; font-weight: 500; }
.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 1px solid var(--border); border-radius: 8px; font-size: 12px; background: var(--bg); transition: border-color .15s, color .15s, transform .15s; }
.chip:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.content-divider { display: flex; align-items: center; gap: 14px; margin: 34px 0 6px; color: var(--muted); font-size: 11px; letter-spacing: 1px; }
.content-divider::before, .content-divider::after { content: ""; height: 1px; flex: 1; background: var(--border); }
.tool-filter { position: sticky; top: 84px; z-index: 5; display: flex; align-items: center; gap: 9px; margin: -6px 0 18px; padding: 9px 13px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg); box-shadow: 0 6px 20px color-mix(in srgb, var(--brand) 6%, #0000000a); color: var(--muted); }
.tool-filter:focus-within { border-color: var(--brand); }
.tool-filter > span:first-child { font-size: 20px; line-height: 1; color: var(--brand); }
.tool-filter input { flex: 1; border: 0; background: none; font-size: 13px; padding: 2px 0; }
.tool-filter input:focus { outline: none; }
.tool-filter-count { font-size: 11px; white-space: nowrap; }
.filter-empty-row { text-align: center; color: var(--muted); font-size: 12px; padding: 20px; border: 1px dashed var(--border); border-radius: 9px; }
.filter-empty-row button { background: none; color: var(--brand); font-size: 12px; margin-left: 6px; }
.image-fallback { display: inline-flex; padding: 10px 14px; border: 1px dashed var(--border); border-radius: 8px; background: var(--soft); color: var(--muted) !important; font-size: 12px; text-decoration: none !important; }
mark { background: #ffe58f; color: inherit; border-radius: 2px; padding: 0 1px; }
:root[data-theme="dark"] mark { background: #6b5a14; }
.markdown-body { font-size: var(--read-size); line-height: 1.9; overflow-wrap: anywhere; }
.markdown-body h1, .markdown-body h2, .markdown-body h3 { line-height: 1.4; scroll-margin-top: 90px; }
.markdown-body h2 { font-size: 26px; letter-spacing: -.5px; font-weight: 650; margin: 30px 0 22px; }
.markdown-body h3 { margin-top: 26px; }
.markdown-body p { margin: 16px 0; }
.markdown-body a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.markdown-body a:hover { color: var(--brand-hover); }
.markdown-body img { max-width: 100%; height: auto; border-radius: 8px; }
.markdown-body blockquote { margin: 20px 0; border-left: 3px solid var(--brand); padding: 1px 18px; background: var(--soft); color: var(--muted); }
.markdown-body code { background: var(--muted-bg); padding: 2px 5px; border-radius: 4px; font: .88em ui-monospace, SFMono-Regular, Consolas, monospace; }
.markdown-body pre { overflow-x: auto; background: var(--soft); padding: 20px; border: 1px solid var(--border); border-radius: 8px; }
.markdown-body pre code { background: transparent; padding: 0; }
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 9px; margin: 20px 0; scrollbar-width: thin; }
.markdown-body table { width: 100%; border-collapse: collapse; margin: 0; text-align: left; font-size: .86em; }
.markdown-body th { background: var(--soft); font-weight: 650; font-size: 11px; color: var(--muted); padding: 13px 16px; text-align: left; white-space: nowrap; }
.markdown-body td { padding: 17px 16px; border-top: 1px solid var(--border); vertical-align: top; text-align: left; }
.markdown-body td:first-child { font-weight: 650; min-width: 110px; width: 18%; }
.markdown-body td:last-child:not(:first-child) { min-width: 120px; width: 24%; }
.markdown-body tr:hover { background: var(--soft); }
.markdown-body tr { scroll-margin-top: 95px; transition: background .4s; }
.anchor-highlight { background: var(--brand-soft) !important; }
.tool-cards { transition: none; }
:root[data-view="cards"] .table-scroll.tool-cards { border: 0; overflow: visible; }
:root[data-view="cards"] .tool-cards table, :root[data-view="cards"] .tool-cards tbody { display: block; }
:root[data-view="cards"] .tool-cards thead { display: none; }
:root[data-view="cards"] .tool-cards tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
:root[data-view="cards"] .tool-cards tr { display: flex; flex-direction: column; gap: 8px; padding: 17px 18px 15px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); transition: border-color .18s, transform .18s, box-shadow .18s, background .4s; }
:root[data-view="cards"] .tool-cards tr:hover { background: var(--bg); border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); }
:root[data-view="cards"] .tool-cards td { display: block; padding: 0; border: 0; width: auto; min-width: 0; }
:root[data-view="cards"] .tool-cards td:first-child { font-size: 1.08em; color: var(--text); }
:root[data-view="cards"] .tool-cards td:nth-child(2) { flex: 1; color: var(--muted); line-height: 1.75; }
:root[data-view="cards"] .tool-cards td:last-child:not(:first-child) { width: auto; min-width: 0; margin-top: 4px; padding-top: 11px; border-top: 1px dashed var(--border); font-size: .92em; }
.view-switch { display: inline-flex; padding: 2px; border-radius: 7px; background: var(--muted-bg); flex-shrink: 0; }
.view-switch button { background: none; padding: 3px 9px; border-radius: 5px; font-size: 11px; color: var(--muted); }
.view-switch button[aria-pressed="true"] { background: var(--bg); color: var(--brand); font-weight: 650; box-shadow: 0 1px 3px #0001; }
.read-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: 2px; background: var(--brand); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }
.theme-panel { position: fixed; inset: 66px 24px auto auto; margin: 0; width: 272px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); color: var(--text); box-shadow: 0 20px 60px #0002; }
.theme-panel p { margin: 14px 0 8px; font-size: 11px; font-weight: 650; color: var(--muted); }
.theme-panel p:first-child { margin-top: 0; }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; gap: 2px; border-radius: 9px; background: var(--muted-bg); }
.segmented button { background: none; padding: 6px 4px; border-radius: 7px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.segmented button[aria-pressed="true"] { background: var(--bg); color: var(--brand); font-weight: 650; box-shadow: 0 1px 4px #0001; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches button { width: 28px; height: 28px; border-radius: 50%; background: var(--swatch); box-shadow: inset 0 0 0 2px #fff3; transition: transform .15s; }
.swatches button:hover { transform: scale(1.1); }
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--swatch); }
.outline { position: sticky; top: 102px; align-self: start; border-left: 1px solid var(--border); padding-left: 18px; font-size: 11px; max-height: calc(100vh - 125px); display: flex; flex-direction: column; }
.outline > p { display: flex; gap: 8px; margin: 0 0 13px; font-size: 11px; font-weight: 650; }
.outline > p > span { color: var(--muted); font-size: 10px; }
.outline nav { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.outline nav a { display: block; color: var(--muted); padding: 5px 0; overflow-wrap: anywhere; }
.outline nav a:hover { color: var(--brand); }
.back-top { color: var(--brand); display: block; margin-top: 15px; border-top: 1px solid var(--border); padding-top: 13px; }
.article-pagination { margin-top: 35px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.article-pagination a { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 8px; padding: 15px; }
.article-pagination a:hover { border-color: var(--brand); }
.article-pagination a:last-child { text-align: right; }
.article-pagination small { font-size: 10px; color: var(--muted); margin-bottom: 4px; }
.article-pagination strong { font-size: 12px; color: var(--brand); }
.loading-state, .error-state { padding: 80px 30px; text-align: center; color: var(--muted); }
.error-state h1, .error-state h2 { color: var(--text); }
dialog { padding: 0; margin: 12vh auto auto; width: min(640px, calc(100vw - 32px)); max-height: 78vh; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 25px 90px #0003; background: var(--bg); color: var(--text); }
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: #142b2466; backdrop-filter: blur(5px); }
.search-dialog-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px 8px; font-size: 12px; color: var(--muted); flex-shrink: 0; }
#search-input { margin: 0 20px; border: 1px solid var(--brand); border-radius: 7px; background: var(--soft); padding: 13px; font-size: 14px; flex-shrink: 0; }
#search-input:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.search-status { font-size: 11px; color: var(--muted); margin: 12px 20px; flex-shrink: 0; }
#search-results { overflow-y: auto; padding: 0 12px 12px; min-height: 70px; }
.search-result { display: block; padding: 12px; border: 1px solid transparent; border-bottom-color: var(--border); border-radius: 6px; }
.search-result:hover, .search-result.selected, .search-result:focus-visible { background: var(--brand-soft); border-color: var(--brand); outline: none; }
.result-category { display: flex; justify-content: space-between; font-size: 10px; color: var(--brand); }
.search-result strong { display: block; margin-top: 4px; font-size: 14px; }
.search-result p { margin: 5px 0 0; font-size: 11px; color: var(--muted); line-height: 1.7; }
.search-empty { padding: 30px 10px; text-align: center; color: var(--muted); }
.search-empty > span { font-size: 38px; color: var(--brand); }
.search-empty h3 { font-size: 14px; color: var(--text); }
.search-empty p { font-size: 11px; }
.search-footer { border-top: 1px solid var(--border); padding: 10px 20px; display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); flex-shrink: 0; }
.sidebar-backdrop { display: none; }
noscript { display: block; padding: 30px; margin-left: var(--sidebar-width); }
@media (min-width: 1700px) {
  .category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1200px) {
  :root { --sidebar-width: 225px; }
  .header { padding: 0 22px; gap: 16px; }
  .header-nav { margin-left: 20px; gap: 18px; }
  .home-page { padding: 0 30px; }
  .hero { gap: 12px; padding-top: 45px; }
  .hero-art { height: 260px; }
  .window-content { padding: 14px; }
  .window-prompt { font-size: 9px; }
  .stats > div { padding: 0 20px; }
  .reader-layout { grid-template-columns: minmax(0, 1fr); padding: 26px 30px; }
  .outline { display: none; }
  .category-card { padding: 16px 15px 12px; }
}
@media (max-width: 1000px) {
  .header-nav { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .hero h1 { font-size: 40px; }
  .hero-copy > p br { display: none; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats > div { padding: 0 16px; }
  .sync-icon { display: none; }
  .source-banner { flex-wrap: wrap; gap: 12px; }
  .source-banner .secondary-button { margin-left: 0; }
  .count-label { display: none; }
}
@media (max-width: 760px) {
  .header { height: 60px; padding: 0 16px; gap: 10px; }
  .brand { font-size: 16px; gap: 8px; }
  .brand-mark { width: 30px; height: 30px; font-size: 20px; border-radius: 8px; }
  .menu-button { display: inline-flex; width: 25px; font-size: 18px; }
  .search-trigger { min-width: 0; padding: 3px 7px; background: transparent; border: none; }
  .search-trigger > span:nth-child(2), .search-trigger kbd { display: none; }
  .github-link { padding-left: 10px; }
  .icon-button { width: 28px; }
  .sidebar { top: 60px; width: 275px; transform: translateX(-100%); transition: transform .2s; visibility: hidden; }
  .menu-open .sidebar { transform: translateX(0); visibility: visible; }
  .menu-open { overflow: hidden; }
  .sidebar-backdrop { display: block; position: fixed; inset: 60px 0 0; background: #152d2466; z-index: 24; }
  #main { margin-left: 0; min-height: calc(100vh - 60px); }
  .home-page { padding: 0 22px; }
  .hero { padding: 36px 0 30px; }
  .hero h1 { font-size: 37px; letter-spacing: -1.2px; }
  .hero-copy > p { font-size: 13px; }
  .hero-copy > p br { display: inline; }
  .stats { padding: 18px 0; }
  .stats > div { padding: 0 12px; }
  .stats strong { font-size: 22px; }
  .stats div > span:last-child, .sync-stat > div > span { font-size: 9px; }
  .sync-stat strong { font-size: 12px; }
  .category-section { padding-top: 32px; }
  .section-heading h2 { font-size: 21px; }
  .category-toolbar { margin: 19px 0 16px; }
  .inline-search { display: none; }
  .filter-tabs { gap: 3px; }
  .filter-tabs button { padding: 7px 10px; }
  .category-grid { gap: 12px; }
  .category-card h3 { font-size: 13px; }
  .card-count { font-size: 8px; padding: 1px 5px; }
  .category-icon { width: 32px; height: 32px; font-size: 18px; }
  .source-banner { padding: 20px; }
  .source-symbol { display: none; }
  .footer { font-size: 9px; padding: 18px 0; }
  .reader-layout { padding: 24px 20px; }
  .markdown-body table { min-width: 570px; }
  .markdown-body h2 { font-size: 23px; }
  .markdown-body { font-size: 13px; }
  .doc-hero { padding: 22px 18px; }
  .doc-hero h1 { font-size: 26px; }
  .search-box kbd { display: none; }
  .tool-filter { top: 70px; }
  .article-pagination { gap: 10px; }
  .article-pagination a { padding: 12px; }
  dialog { margin-top: 7vh; max-height: 86vh; }
  noscript { margin-left: 0; }
}
@media (max-width: 380px) {
  .header { padding: 0 10px; gap: 6px; }
  .brand { font-size: 14px; }
  .home-page { padding: 0 16px; }
  .hero h1 { font-size: 32px; }
  .primary-button, .secondary-button { padding: 10px 13px; gap: 11px; }
  .stats { grid-template-columns: 1fr 1fr; row-gap: 16px; }
  .stats > div:nth-child(2) { border: 0; }
  .stats > div { padding: 0 20px; }
  .category-card { padding: 12px 11px; }
  .card-top { gap: 4px; }
  .card-count { font-size: 7px; padding: 1px 4px; }
}
@media (max-width: 760px) {
  .theme-panel { inset: 64px 12px auto auto; width: min(272px, calc(100vw - 24px)); }
  :root[data-view="cards"] .tool-cards tbody { grid-template-columns: 1fr; }
  :root[data-view="cards"] .tool-cards table { min-width: 0; }
  .view-switch button { padding: 3px 7px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
