/* Bramble Help: page layout, header, menus, home and search.
   Article typography lives in article.css (Console's preview uses it too). */
:root {
  --font: Inter, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Menlo, Consolas, monospace;
  --bg: #ffffff;
  --bg-soft: #f6f7f8;
  --surface: #ffffff;
  --surface-2: #f3f4f6;
  --hover: #eef0f2;
  --border: #e2e4e8;
  --border-strong: #cdd1d7;
  --text: #15171c;
  --text-2: #383d48;
  --muted: #5f6673;
  --accent: #1f9d57;
  --accent-strong: #157a43;
  --accent-soft: #e9f7ef;
  --accent-ring: rgba(31, 157, 87, .35);
  --link: #137a43;
  --hero-a: #f2fbf5;
  --hero-b: #e3f4ea;
  --shadow: 0 1px 2px rgba(16, 18, 27, .05), 0 2px 6px rgba(16, 18, 27, .04);
  --shadow-lg: 0 12px 40px rgba(16, 18, 27, .14);
  --header-h: 60px;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1114; --bg-soft: #14171b; --surface: #171a1f; --surface-2: #1c2026; --hover: #22262d;
    --border: #2a2f37; --border-strong: #39404a; --text: #e9ebef; --text-2: #c7cbd3; --muted: #9aa1ad;
    --accent: #2fb46a; --accent-strong: #5cc98c; --accent-soft: rgba(47, 180, 106, .13); --accent-ring: rgba(92, 201, 140, .4);
    --link: #63cf93; --hero-a: #11181a; --hero-b: #0f1d16;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35); --shadow-lg: 0 16px 48px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1114; --bg-soft: #14171b; --surface: #171a1f; --surface-2: #1c2026; --hover: #22262d;
  --border: #2a2f37; --border-strong: #39404a; --text: #e9ebef; --text-2: #c7cbd3; --muted: #9aa1ad;
  --accent: #2fb46a; --accent-strong: #5cc98c; --accent-soft: rgba(47, 180, 106, .13); --accent-ring: rgba(92, 201, 140, .4);
  --link: #63cf93; --hero-a: #11181a; --hero-b: #0f1d16;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35); --shadow-lg: 0 16px 48px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--text); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
svg { width: 16px; height: 16px; fill: currentColor; flex: none; }
img { max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; box-shadow: var(--shadow-lg); }
.skip:focus { left: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 8px; border: 1px solid transparent; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13.5px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); }
:root[data-theme="dark"] .btn-primary:hover { color: #0b1a12; }
.btn-outline { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { background: var(--hover); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn.small { width: 28px; height: 28px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.header-inner { height: 100%; max-width: 1480px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; font-size: 16px; text-decoration: none !important; flex: none; }
.brand img { border-radius: 7px; }
.brand-sep { width: 1px; height: 20px; background: var(--border-strong); }
.brand-product { font-weight: 600; color: var(--text-2); }
.top-nav { display: flex; align-items: center; gap: 2px; }
.top-link { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 8px; color: var(--text-2); font-weight: 500; font-size: 14.5px; border: 0; background: none; cursor: pointer; text-decoration: none !important; }
.top-link svg { width: 12px; height: 12px; transition: transform .15s; }
.top-link[aria-expanded="true"] svg { transform: rotate(180deg); }
.top-link:hover, .top-link[aria-expanded="true"] { background: var(--hover); color: var(--text); }
.top-link.active { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.mega { position: relative; }
.mega-panel { position: absolute; top: calc(100% + 10px); left: 0; width: min(880px, calc(100vw - 48px)); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 22px; }
.mega-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px 28px; }
.mega-head { margin: 0 0 8px; font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mega ul { list-style: none; margin: 0; padding: 0; }
.mega li a { display: flex; align-items: center; gap: 10px; padding: 6px 8px; margin: 0 -8px; border-radius: 8px; color: var(--text); font-weight: 500; text-decoration: none; }
.mega li a:hover { background: var(--hover); }
.mega-icon { width: 26px; height: 26px; border-radius: 7px; object-fit: contain; }
.header-search { position: relative; flex: 1; max-width: 420px; margin-left: auto; }
.header-search input { width: 100%; height: 38px; padding: 0 36px 0 36px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); outline: none; transition: border-color .15s, background .15s, box-shadow .15s; }
.header-search input:focus { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; pointer-events: none; }
.search-kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font: 600 11px var(--mono); color: var(--muted); border: 1px solid var(--border-strong); border-radius: 5px; padding: 1px 6px; background: var(--surface); }
.header-search input:focus ~ .search-kbd { display: none; }
.header-actions { display: flex; align-items: center; gap: 6px; flex: none; }
[data-theme-toggle] svg:last-child { display: none; }
:root[data-theme="dark"] [data-theme-toggle] svg:first-child { display: none; }
:root[data-theme="dark"] [data-theme-toggle] svg:last-child { display: block; }

/* Search suggestions */
.search-pop { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; max-height: 70vh; overflow: auto; text-align: left; }
.search-pop a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.search-pop a:hover, .search-pop a.sel { background: var(--accent-soft); }
.sp-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.sp-sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-all { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; }
.sp-all a { color: var(--link); font-weight: 600; font-size: 13.5px; }
.sp-empty { padding: 10px; color: var(--muted); font-size: 14px; }

/* Page grid */
.page { flex: 1; width: 100%; max-width: 1480px; margin: 0 auto; display: grid; grid-template-columns: 290px minmax(0, 1fr) 250px; gap: 0 48px; padding: 0 24px; }
.page.no-nav { grid-template-columns: minmax(0, 1fr); max-width: 980px; }
.page.no-nav .toc { display: none; }
.content { min-width: 0; padding: 28px 0 64px; }

/* Side menu */
.side-nav { position: sticky; top: var(--header-h); align-self: start; height: calc(100vh - var(--header-h)); overflow: auto; padding: 22px 6px 40px 0; border-right: 1px solid var(--border); scrollbar-width: thin; }
.side-nav-head { padding: 0 10px 10px 0; }
.nav-product { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15.5px; color: var(--text); text-decoration: none !important; }
.nav-icon { width: 30px; height: 30px; border-radius: 8px; object-fit: contain; }
.nav-filter { padding: 4px 12px 10px 0; }
.nav-filter input { width: 100%; height: 32px; padding: 0 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); font-size: 13.5px; outline: none; }
.nav-filter input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.tree { list-style: none; margin: 0; padding: 0; }
.tree .tree { padding-left: 14px; display: none; }
.tree-folder.open > .tree { display: block; }
.tree li a, .tree-label { display: flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 6px; color: var(--text-2); font-size: 14px; line-height: 1.4; text-decoration: none; }
.tree li a:hover { background: var(--hover); color: var(--text); }
.tree li a.active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); }
.tree-row { display: flex; align-items: center; }
.tree-row > a, .tree-row > .tree-label { flex: 1; min-width: 0; padding-left: 2px; }
.tree-toggle { flex: none; width: 22px; height: 26px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 5px; padding: 0; }
.tree-toggle svg { width: 12px; height: 12px; transition: transform .15s; }
.tree-folder.open > .tree-row .tree-toggle svg { transform: rotate(90deg); }
.tree-toggle:hover { background: var(--hover); color: var(--text); }
.tree-0 > li:not(.tree-folder) > a { padding-left: 24px; }
.tree .tree li:not(.tree-folder) > a { padding-left: 24px; }
.tree li.filtered-out { display: none; }
.nav-open { display: none; }

/* "In this article" */
.toc { position: sticky; top: var(--header-h); align-self: start; max-height: calc(100vh - var(--header-h)); overflow: auto; padding: 30px 0 40px; font-size: 13.5px; scrollbar-width: thin; }
.toc-head { margin: 0 0 10px; font-weight: 650; font-size: 13px; color: var(--text); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc li a { display: block; padding: 4px 0 4px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); line-height: 1.4; text-decoration: none; }
.toc li.toc-l3 a { padding-left: 26px; font-size: 13px; }
.toc li a:hover { color: var(--text); }
.toc li a.current { color: var(--accent-strong); border-left-color: var(--accent); font-weight: 600; }

/* Breadcrumbs */
.crumbs ol { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13.5px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 4px; color: var(--border-strong); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--link); }

/* Article frame */
.article { max-width: 820px; }
.article-head { margin-bottom: 26px; }
.article-head h1 { font-size: 2.15rem; line-height: 1.2; letter-spacing: -.02em; margin: 10px 0 10px; font-weight: 700; }
.lede { font-size: 1.12rem; color: var(--text-2); margin: 0 0 12px; line-height: 1.55; }
.article-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.article-meta { display: flex; flex-wrap: wrap; gap: 18px; margin: 0; font-size: 13.5px; color: var(--muted); }
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 6px; font-size: 12px; font-weight: 650; background: var(--accent-soft); color: var(--accent-strong); }
.badge-troubleshooting, .badge-faq { background: color-mix(in srgb, #d97706 14%, transparent); color: #a15c07; }
.badge-reference { background: color-mix(in srgb, #2563eb 12%, transparent); color: #1d4fbf; }
.badge-concept, .badge-overview { background: color-mix(in srgb, #7c3aed 12%, transparent); color: #6526c9; }
:root[data-theme="dark"] .badge-troubleshooting, :root[data-theme="dark"] .badge-faq { color: #f3b55a; }
:root[data-theme="dark"] .badge-reference { color: #8fb1ff; }
:root[data-theme="dark"] .badge-concept, :root[data-theme="dark"] .badge-overview { color: #c4a5ff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .badge-troubleshooting, :root:not([data-theme="light"]) .badge-faq { color: #f3b55a; }
  :root:not([data-theme="light"]) .badge-reference { color: #8fb1ff; }
  :root:not([data-theme="light"]) .badge-concept, :root:not([data-theme="light"]) .badge-overview { color: #c4a5ff; }
}
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 550; border: 1px solid var(--border); color: var(--text-2); background: var(--surface); }
.requires { border: 1px solid var(--border); background: var(--bg-soft); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 26px; }
.requires-head { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-weight: 650; }
.requires-head svg { color: var(--accent); }
.requires ul { margin: 0; padding-left: 22px; color: var(--text-2); }
.requires li { margin: 2px 0; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.card-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none !important; transition: border-color .15s, box-shadow .15s, transform .15s; }
.card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.card-top { display: flex; }
.card-title { font-weight: 650; font-size: 15px; }
.card-desc { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.in-section, .related { margin-top: 40px; }
.in-section h2, .related h2 { font-size: 1.3rem; margin: 0 0 14px; }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.link-list a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; margin: 0 -10px; border-radius: 8px; color: var(--link); }
.link-list a:hover { background: var(--hover); text-decoration: none; }
.link-list svg { color: var(--muted); }

/* Feedback */
.feedback { margin-top: 48px; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); }
.fb-ask { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.fb-q { margin: 0; font-weight: 650; }
.fb-buttons { display: flex; gap: 8px; }
.fb-buttons .btn { height: 36px; }
.fb-buttons .btn.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.fb-more { margin-top: 14px; }
.fb-more-q { margin: 0 0 8px; font-weight: 600; }
.fb-reasons { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.fb-reason { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: 13.5px; cursor: pointer; background: var(--surface); }
.fb-reason input { accent-color: var(--accent); margin: 0; }
.fb-reason:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.fb-more textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); resize: vertical; outline: none; }
.fb-more textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.fb-actions { margin-top: 10px; }
.fb-thanks { margin: 0; display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--accent-strong); }

/* Previous / next */
.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 28px; }
.pn { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); text-decoration: none !important; transition: border-color .15s; }
.pn:hover { border-color: var(--accent); }
.pn-next { text-align: right; align-items: flex-end; }
.pn-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.pn-title { font-weight: 650; color: var(--link); }

/* Product landing */
.product-hero { display: flex; align-items: center; gap: 20px; margin-bottom: 22px; }
.product-icon { width: 72px; height: 72px; border-radius: 18px; object-fit: contain; flex: none; }
.product-hero h1 { margin: 2px 0 6px; font-size: 2.2rem; letter-spacing: -.02em; line-height: 1.15; }
.product-hero .lede { margin: 0; }
.eyebrow { margin: 0; font-size: 12.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-strong); }
.product-intro { max-width: 820px; margin-bottom: 8px; }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; margin-top: 24px; }
.topic-card { border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px 16px; background: var(--surface); }
.topic-card h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 1.05rem; }
.topic-card h2 a { color: var(--text); }
.topic-card h2 svg { color: var(--accent); }
.topic-card > p { margin: 0 0 8px; font-size: 13.5px; }
.topic-card ul { list-style: none; margin: 0; padding: 0; }
.topic-card li { padding: 5px 0; border-top: 1px solid var(--border); font-size: 14px; }
.topic-card li:first-child { border-top: 0; }
.topic-card .more { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13.5px; font-weight: 600; }
.topic-api { background: var(--bg-soft); }
.app-icon-blank { display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); }
.product-icon.app-icon-blank svg { width: 32px; height: 32px; }

/* Home */
.home-page main { flex: 1; }
.hero { background: radial-gradient(1200px 400px at 50% -10%, var(--hero-b), transparent 70%), linear-gradient(180deg, var(--hero-a), var(--bg)); border-bottom: 1px solid var(--border); }
.hero-inner { max-width: 860px; margin: 0 auto; padding: 72px 24px 56px; text-align: center; }
.hero h1 { margin: 0 0 12px; font-size: clamp(2rem, 4.5vw, 3rem); letter-spacing: -.03em; line-height: 1.1; }
.hero-sub { margin: 0 auto 28px; max-width: 600px; font-size: 1.12rem; color: var(--text-2); }
.hero-search { position: relative; display: flex; gap: 8px; max-width: 680px; margin: 0 auto; padding: 6px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow-lg); }
.hero-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring), var(--shadow-lg); }
.hero-search .search-icon { left: 20px; }
.hero-search input { flex: 1; min-width: 0; height: 48px; border: 0; background: none; padding: 0 12px 0 42px; font-size: 16.5px; outline: none; }
.hero-search .btn { height: 48px; padding: 0 24px; border-radius: 10px; font-size: 15px; }
.hero-search .search-pop { top: calc(100% + 8px); }
.quick { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 20px; }
.quick-label { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.quick-chip { display: inline-flex; align-items: center; height: 32px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); font-size: 13.5px; font-weight: 500; text-decoration: none !important; }
.quick-chip:hover { border-color: var(--accent); color: var(--accent-strong); }
.home { max-width: 1240px; margin: 0 auto; padding: 16px 24px 72px; }
.home-section { margin-top: 48px; }
.section-headrow { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.section-headrow p { margin: 0; }
.section-title { font-size: 1.45rem; letter-spacing: -.01em; margin: 0 0 16px; }
.section-headrow .section-title { margin: 0; }
.start-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.start-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); text-decoration: none !important; transition: border-color .15s, box-shadow .15s, transform .15s; }
.start-card:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.start-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); }
.start-icon svg { width: 20px; height: 20px; }
.start-title { font-weight: 700; font-size: 1.08rem; margin-top: 4px; }
.start-desc { color: var(--muted); font-size: 14px; flex: 1; }
.start-go { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--link); font-size: 14px; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.app-grid.small { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.app-tile { display: flex; align-items: flex-start; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); text-decoration: none !important; transition: border-color .15s, box-shadow .15s; }
.app-tile:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.app-icon { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; flex: none; }
.app-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.app-name { font-weight: 650; }
.app-desc { color: var(--muted); font-size: 13.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.popular { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 4px 24px; }
.popular a { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; margin: 0 -12px; border-radius: 9px; text-decoration: none !important; }
.popular a:hover { background: var(--hover); }
.popular svg { margin-top: 3px; color: var(--muted); }
.pop-title { display: block; color: var(--link); font-weight: 600; }
.pop-product { display: block; color: var(--muted); font-size: 13px; }
.help-band { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding: 28px 32px; border-radius: 16px; background: linear-gradient(135deg, var(--accent-soft), transparent), var(--bg-soft); border: 1px solid var(--border); }
.help-band h2 { margin: 0 0 4px; font-size: 1.3rem; }
.help-band p { margin: 0; color: var(--text-2); }
.help-band-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Search page */
.search-page h1 { font-size: 2rem; margin: 6px 0 16px; }
.search-big { position: relative; display: flex; gap: 8px; max-width: 720px; margin-bottom: 18px; }
.search-big input { flex: 1; min-width: 0; height: 46px; padding: 0 14px 0 40px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); font-size: 16px; outline: none; }
.search-big input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.search-big .btn { height: 46px; }
.result-count { color: var(--muted); margin: 0 0 12px; }
.facets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 18px; }
.facet { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 550; text-decoration: none !important; }
.facet span { color: var(--muted); font-weight: 500; }
.facet.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.facet-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
.results { list-style: none; margin: 0; padding: 0; max-width: 820px; }
.result { padding: 16px 0; border-top: 1px solid var(--border); }
.result-title { display: inline-flex; align-items: center; gap: 8px; font-size: 1.08rem; font-weight: 650; }
.result-path { margin: 2px 0 4px; font-size: 13px; color: var(--muted); }
.result-path code { font-family: var(--mono); font-size: 12px; }
.result-snippet { margin: 0; color: var(--text-2); font-size: 14.5px; }
.result-snippet mark, .sp-sub mark { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }
.empty { margin-top: 18px; }
.not-found { max-width: 640px; margin: 40px 0; }
.nf-code { font-size: 64px; font-weight: 800; letter-spacing: -.04em; color: var(--accent); margin: 0; line-height: 1; }
.not-found h1 { margin: 12px 0 8px; }
.not-found p a { display: inline-flex; align-items: center; gap: 6px; }

/* Method badges (menu, search, API pages) */
.m { display: inline-grid; place-items: center; min-width: 46px; height: 20px; padding: 0 5px; border-radius: 5px; font: 700 10.5px/1 var(--mono); letter-spacing: .02em; color: #fff; background: #6b7280; flex: none; }
.m-get { background: #2563eb; } .m-post { background: #15803d; } .m-put, .m-patch { background: #b45309; } .m-delete { background: #b91c1c; } .m-all { background: #6d28d9; }

/* API reference index */
.api-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 8px; }
.api-card { display: flex; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); text-decoration: none !important; background: var(--surface); }
.api-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.api-card-icon { width: 36px; height: 36px; border-radius: 9px; object-fit: contain; flex: none; }
.api-card-title { display: block; font-weight: 650; }
.api-card-desc { display: block; color: var(--muted); font-size: 13.5px; margin: 2px 0 6px; }
.api-card-count { display: block; font-size: 12.5px; color: var(--accent-strong); font-weight: 600; }
.res-block { margin-bottom: 26px; }
.res-block h3 { margin-bottom: 4px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); margin-top: auto; }
.footer-inner { max-width: 1240px; margin: 0 auto; padding: 40px 24px 24px; display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-brand { display: flex; gap: 12px; max-width: 320px; }
.footer-brand img { border-radius: 7px; }
.footer-brand p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-head { margin: 0 0 8px; font-weight: 650; font-size: 13.5px; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { margin: 5px 0; font-size: 13.5px; }
.footer-cols a { color: var(--muted); }
.footer-cols a:hover { color: var(--link); }
.footer-base { max-width: 1240px; margin: 0 auto; padding: 14px 24px 28px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--border); }

/* Responsive */
@media (max-width: 1240px) {
  .page { grid-template-columns: 270px minmax(0, 1fr); gap: 0 40px; }
  .toc { display: none; }
}
@media (max-width: 1080px) {
  .top-nav .top-link:not([data-mega-toggle]) { display: none; }
}
@media (max-width: 900px) {
  :root { --header-h: 56px; }
  .header-inner { padding: 0 16px; gap: 10px; }
  .brand-sep, .brand-product { display: none; }
  .top-nav { display: none; }
  .header-search { max-width: none; }
  .search-kbd { display: none; }
  .signin { display: none; }
  .page { grid-template-columns: minmax(0, 1fr); padding: 0 16px; }
  .side-nav { position: fixed; z-index: 70; top: 0; left: 0; bottom: 0; width: min(320px, 86vw); height: 100vh; padding: 16px 8px 40px 16px; background: var(--surface); box-shadow: var(--shadow-lg); transform: translateX(-105%); transition: transform .2s; border-right: 0; }
  body.nav-shown .side-nav { transform: none; }
  body.nav-shown::after { content: ""; position: fixed; inset: 0; z-index: 65; background: rgba(0, 0, 0, .35); }
  .nav-open { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; margin-bottom: 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-weight: 600; font-size: 13.5px; cursor: pointer; max-width: 100%; }
  .nav-open span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .content { padding-top: 16px; }
  .article-head h1 { font-size: 1.7rem; }
  .product-hero { align-items: flex-start; }
  .product-icon { width: 56px; height: 56px; border-radius: 14px; }
  .product-hero h1 { font-size: 1.7rem; }
  .hero-inner { padding: 44px 16px 36px; }
  .hero-search { flex-wrap: nowrap; }
  .hero-search .btn { display: none; }
  .home { padding: 8px 16px 56px; }
  .home-section { margin-top: 36px; }
  .prev-next { grid-template-columns: 1fr; }
  .footer-inner { padding: 32px 16px 20px; }
  .footer-base { padding: 14px 16px 24px; }
  .help-band { padding: 22px; }
  .popular { grid-template-columns: 1fr; }
  .search-big .btn { display: none; }
}
@media print {
  .site-header, .site-footer, .side-nav, .toc, .feedback, .prev-next, .nav-open, .crumbs { display: none !important; }
  .page { display: block; }
}
