/* Shared refinement layer for homepage (body.home-layout-d) and secondary pages (body.theme-d). Loaded last. */
:root { --p-ease: cubic-bezier(.22,.8,.24,1); --p-r: 14px; --p-hdr: 58px;
  --p-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 1px 2px rgba(64,40,24,.05), 0 4px 10px -4px rgba(64,40,24,.07), 0 16px 32px -20px rgba(64,40,24,.16);
  --p-shadow-h: 0 1px 0 rgba(255,255,255,.9) inset, 0 2px 4px rgba(64,40,24,.05), 0 10px 20px -8px rgba(64,40,24,.10), 0 28px 48px -24px rgba(196,83,47,.30); }
:is(body.theme-d, body.home-layout-d) {
  font-family: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  font-feature-settings: "cv11", "ss01"; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  background-color: #f7f4ee;
  background-image:
    radial-gradient(60rem 30rem at 85% -10%, rgba(244,170,130,.22), transparent 60%),
    radial-gradient(50rem 28rem at -10% 10%, rgba(250,214,170,.25), transparent 60%),
    radial-gradient(40rem 30rem at 50% 110%, rgba(236,200,180,.18), transparent 60%);
  background-attachment: fixed;
}
html:has(body.theme-d), html:has(body.home-layout-d) { scroll-padding-top: calc(var(--p-hdr) + 12px); scrollbar-color: #d9cbbd transparent; }
:is(body.theme-d, body.home-layout-d)::selection, :is(body.theme-d, body.home-layout-d) ::selection { background: rgba(240,138,93,.26); color: #1b1815; }
:is(body.theme-d, body.home-layout-d) ::-webkit-scrollbar { width: 10px; height: 10px; }
:is(body.theme-d, body.home-layout-d) ::-webkit-scrollbar-thumb { background: #ddd0c3; border-radius: 99px; border: 3px solid #f7f4ee; }
:is(body.theme-d, body.home-layout-d) ::-webkit-scrollbar-thumb:hover { background: #c9b6a4; }
:is(body.theme-d, body.home-layout-d) ::-webkit-scrollbar-track { background: transparent; }
/* Noise texture (replaces the hard grid on the homepage) */
body.home-layout-d::before, body.theme-d::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; animation: none; mask-image: none; -webkit-mask-image: none; opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .18 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); background-size: 160px 160px; }
body.home-layout-d::after { background: radial-gradient(closest-side, rgba(240,138,93,.16), transparent); }
/* Typography */
:is(body.theme-d, body.home-layout-d) h1 { font-weight: 750; letter-spacing: -.025em; line-height: 1.2; font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.3rem); }
:is(body.theme-d, body.home-layout-d) h2 { font-weight: 700; letter-spacing: -.015em; margin-top: 2.4rem; }
:is(body.theme-d, body.home-layout-d) h3 { font-weight: 650; letter-spacing: -.01em; }
body.theme-d h1::after { width: 2.4rem; height: 4px; margin-top: .6rem; background: linear-gradient(90deg, #e9774a, #f5c3a2); }
body.theme-d h2:not([class]) { padding-bottom: .45rem; border-bottom: 1px solid transparent; border-image: linear-gradient(90deg, #e8ddd0, rgba(232,221,208,0) 80%) 1; }
:is(body.theme-d, body.home-layout-d) :is(.dx-mod-stat b, .rank-badge, time, .dx-tick, td) { font-variant-numeric: tabular-nums; }
:is(body.theme-d, body.home-layout-d) .kicker { font-size: .8rem; letter-spacing: .02em; }
:is(body.theme-d, body.home-layout-d) .kicker a { text-decoration: none; }
:is(body.theme-d, body.home-layout-d) .kicker a:hover { color: #c4532f; }
/* Frosted sticky header (desktop) */
:is(body.theme-d, body.home-layout-d) .site-header { position: relative; z-index: 30; }
:is(body.theme-d, body.home-layout-d) .brand { font-weight: 750; letter-spacing: -.01em; }
:is(body.theme-d, body.home-layout-d) .site-header nav a { font-weight: 550; font-size: .9rem; padding: .3rem .55rem; border-radius: 8px; transition: color .2s var(--p-ease), background .2s var(--p-ease); box-shadow: none; }
:is(body.theme-d, body.home-layout-d) .site-header nav a:hover { background: rgba(196,83,47,.08); color: #b84c2a; }
:is(body.theme-d, body.home-layout-d) .site-header nav a[aria-current="page"] { color: #b84c2a; background: #fff; box-shadow: 0 1px 2px rgba(64,40,24,.08), inset 0 0 0 1px #efdccf; border-radius: 8px; }
@media (min-width: 761px) {
  :is(body.theme-d, body.home-layout-d) .site-header { position: sticky; top: 0; border-bottom-color: transparent; background: rgba(247,244,238,.72); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
    box-shadow: 0 0 0 100vmax rgba(247,244,238,.72), 0 1px 0 100vmax rgba(227,220,209,.0); clip-path: inset(0 -100vmax); }
  :is(body.theme-d, body.home-layout-d) .site-header::after { content: ""; position: absolute; left: -100vmax; right: -100vmax; bottom: 0; height: 1px; background: rgba(214,200,186,.6); }
  body.theme-d .wf-tabs { top: var(--p-hdr); }
  body.theme-d .rs-toc { top: calc(var(--p-hdr) + .8rem); max-height: calc(100vh - var(--p-hdr) - 1.6rem); }
}
@media (max-width: 760px) { :is(body.theme-d, body.home-layout-d) .site-header nav a { padding: .2rem .2rem; font-size: .86rem; } }
@media (max-width: 420px) { :is(body.theme-d, body.home-layout-d) .site-header nav a { padding: .2rem .05rem; } }
/* Focus */
:is(body.theme-d, body.home-layout-d) :is(a, button, summary, input, textarea, select, [tabindex]):focus-visible { outline: 2px solid #e9774a; outline-offset: 2px; border-radius: 6px; box-shadow: 0 0 0 5px rgba(233,119,74,.18); }
/* Card surfaces */
body.theme-d :is(.rank-card, .guide-card, .intel-item, .intel-card, .model-card, .scenario-card, .rs-insight-card, .rs-rowcard, .doc-notes, details) { border-radius: var(--p-r); }
body.theme-d .t-glow, body.home-layout-d .dx-card { box-shadow: var(--p-shadow); transition: box-shadow .35s var(--p-ease), transform .35s var(--p-ease), border-color .35s var(--p-ease), opacity .55s var(--p-ease) var(--d, 0ms); }
body.theme-d .t-glow { background-image: linear-gradient(180deg, #fffefb, #fffaf4); }
body.theme-d .t-glow:hover { box-shadow: var(--p-shadow-h); transform: translateY(-2px); border-color: #f0c9b2; }
body.home-layout-d .dx-card { border-radius: 16px; background: linear-gradient(180deg, #fffefb, #fff9f3); }
body.home-layout-d .dx-card::before { background: linear-gradient(140deg, #ecdfd2, #f1e8de 50%, #ecdfd2); transition: opacity .35s; }
body.home-layout-d a.dx-card:hover::before { background: linear-gradient(140deg, #f0a07a, #f3e2d4 45%, #f4b896); }
body.home-layout-d a.dx-card:hover { transform: translateY(-4px); box-shadow: var(--p-shadow-h); }
body.home-layout-d .dx-mod { padding: 1.3rem 1.35rem 1.1rem; gap: .7rem; }
body.home-layout-d .dx-mod-head b { font-weight: 700; letter-spacing: -.01em; font-size: 1.02rem; }
body.home-layout-d .dx-mod-head em { font-family: inherit; font-weight: 600; letter-spacing: .02em; background: rgba(255,255,255,.7); }
body.home-layout-d .dx-mod-desc { line-height: 1.7; font-size: .875rem; }
body.home-layout-d .dx-mod-stat b { font-family: "Inter", "SF Pro Display", -apple-system, system-ui, sans-serif; font-weight: 750; letter-spacing: -.03em; }
body.home-layout-d .dx-mod-foot { border-top: 1px dashed #ece1d5; padding-top: .7rem; }
body.home-layout-d .dx-mod-go { display: inline-flex; gap: .2rem; transition: transform .3s var(--p-ease); }
body.home-layout-d a.dx-mod:hover .dx-mod-go { transform: translateX(4px); }
/* Pastel icon tiles per module */
body.home-layout-d .dx-mod-ico { width: 2.3rem; height: 2.3rem; border-radius: 11px; font-size: 1.1rem; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04), inset 0 1px 0 rgba(255,255,255,.8); transition: transform .35s var(--p-ease); }
body.home-layout-d a.dx-mod:hover .dx-mod-ico { transform: rotate(-6deg) scale(1.06); }
body.home-layout-d .dx-mods > :nth-child(1) .dx-mod-ico { background: linear-gradient(135deg, #ffe4d6, #fcd0bb); }
body.home-layout-d .dx-mods > :nth-child(2) .dx-mod-ico { background: linear-gradient(135deg, #e3ecfd, #cfdcf8); }
body.home-layout-d .dx-mods > :nth-child(3) .dx-mod-ico { background: linear-gradient(135deg, #e2f4ea, #c9e9d6); }
body.home-layout-d .dx-mods > :nth-child(4) .dx-mod-ico { background: linear-gradient(135deg, #efe6fb, #dfd0f5); }
body.home-layout-d .dx-mods > :nth-child(5) .dx-mod-ico { background: linear-gradient(135deg, #fdf2d4, #f8e2a8); }
body.home-layout-d .dx-mods > :nth-child(6) .dx-mod-ico { background: linear-gradient(135deg, #dff3f4, #c6e6e8); }
body.home-layout-d .dx-mods > :nth-child(7) .dx-mod-ico { background: linear-gradient(135deg, #fde3ea, #f7cdd8); }
/* Hero + ticker */
body.home-layout-d .home-ask { border-radius: 22px; border-color: #f0dccd; box-shadow: inset 0 1px 0 #fff, 0 2px 6px rgba(64,40,24,.04), 0 40px 80px -48px rgba(196,83,47,.45); }
body.home-layout-d .ask2-field { border-radius: 16px; box-shadow: 0 1px 2px rgba(64,40,24,.05), 0 12px 30px -18px rgba(196,83,47,.4); transition: box-shadow .3s var(--p-ease); }
body.home-layout-d .ask2-field:focus-within { box-shadow: 0 0 0 4px rgba(233,119,74,.14), 0 16px 34px -18px rgba(196,83,47,.5); }
body.home-layout-d .ask2-chip { border-radius: 999px; box-shadow: 0 1px 2px rgba(64,40,24,.05); transition: transform .25s var(--p-ease), border-color .25s, color .25s, box-shadow .25s; }
body.home-layout-d .ask2-chip:hover { transform: translateY(-1px); box-shadow: 0 6px 14px -8px rgba(196,83,47,.45); }
body.home-layout-d .dx-ticker { box-shadow: var(--p-shadow); }
body.home-layout-d .home-stamp span { box-shadow: 0 1px 2px rgba(64,40,24,.05); }
/* Pills, buttons */
body.theme-d :is(.cat-tab, .subcat-tab, .guide-vendor-chip, .guide-model-chip, .wf-chip, .intel-cat, .intel-chip, .rs-vendor-tab, .rs-filter) { border-radius: 999px; transition: background .2s var(--p-ease), border-color .2s, color .2s, transform .2s var(--p-ease), box-shadow .2s; }
body.theme-d :is(.cat-tab, .subcat-tab, .guide-vendor-chip, .guide-model-chip, .wf-chip, .intel-cat, .intel-chip, .rs-vendor-tab, .rs-filter):hover { transform: translateY(-1px); }
body.theme-d :is(.cat-tab.is-active, .guide-vendor-chip.is-active, .wf-chip.is-active, .intel-cat.is-active, .rs-vendor-tab[aria-selected="true"], .rs-filter[aria-pressed="true"]) { background: linear-gradient(180deg, #d9693d, #c4532f) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 6px 14px -6px rgba(196,83,47,.6); }
/* Reading elements */
body.theme-d p, body.theme-d li { line-height: 1.8; }
body.theme-d blockquote { margin: 1.2rem 0; padding: .9rem 1.1rem; border-left: 3px solid #e9774a; border-radius: 0 12px 12px 0; background: linear-gradient(90deg, #fdf0e6, #fffaf5); color: #3a322c; }
body.theme-d :not(pre) > code { padding: .1em .38em; border-radius: 6px; background: #f3ece3; border: 1px solid #ebe1d5; font-size: .88em; color: #8f3a1e; }
body.theme-d pre { border-radius: 12px; border: 1px solid #ebe1d5; background: #fbf8f3; padding: 1rem 1.1rem; box-shadow: inset 0 1px 0 #fff; }
body.theme-d table { border-collapse: separate; border-spacing: 0; border: 1px solid #e6ddd2; border-radius: 12px; overflow: hidden; background: #fffefb; }
body.theme-d th { background: #f6efe6; font-weight: 650; color: #2c2622; font-size: .85rem; letter-spacing: .01em; }
body.theme-d th, body.theme-d td { border-bottom: 1px solid #efe7dd; }
body.theme-d tr:last-child td { border-bottom: 0; }
body.theme-d tbody tr:nth-child(even) td { background: #fcf9f4; }
body.theme-d tbody tr:hover td { background: #fdf1e8; }
body.theme-d hr { border: 0; height: 1px; background: linear-gradient(90deg, transparent, #e2d5c7 20%, #e2d5c7 80%, transparent); margin: 2rem 0; }
body.theme-d summary { cursor: pointer; transition: color .2s; } body.theme-d summary:hover { color: #b84c2a; }
/* Loading skeleton */
body.theme-d .status { display: block; color: transparent !important; min-height: 9rem; border-radius: var(--p-r); position: relative; overflow: hidden;
  background: linear-gradient(#efe7dc, #efe7dc) 0 0/60% .9rem no-repeat, linear-gradient(#f2ebe1, #f2ebe1) 0 1.8rem/100% .7rem no-repeat, linear-gradient(#f2ebe1, #f2ebe1) 0 3.1rem/92% .7rem no-repeat, linear-gradient(#f2ebe1, #f2ebe1) 0 4.4rem/80% .7rem no-repeat, linear-gradient(#f2ebe1, #f2ebe1) 0 5.7rem/88% .7rem no-repeat; }
body.theme-d .status::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.75) 50%, transparent 70%); transform: translateX(-100%); animation: p-shimmer 1.3s infinite; }
@keyframes p-shimmer { to { transform: translateX(100%); } }
body.theme-d .error { color: #8f2d22 !important; }
/* Entrance */
body.theme-d .t-rev { opacity: 0; transform: translateY(14px) scale(.995); }
body.theme-d .t-rev.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  body.theme-d .status::after { animation: none; }
  :is(body.theme-d, body.home-layout-d) * { transition-duration: .01ms !important; }
  body.theme-d .t-glow:hover, body.home-layout-d a.dx-card:hover, body.home-layout-d a.dx-mod:hover .dx-mod-ico { transform: none; }
}
/* Line icons */
.lti { display: inline-flex; align-items: center; justify-content: center; width: 1em; height: 1em; vertical-align: -.14em; flex: none; line-height: 1; }
.lti svg { width: 100%; height: 100%; display: block; }
body.home-layout-d .dx-mod-ico .lti { width: 1.2rem; height: 1.2rem; }
body.home-layout-d .dx-mods > :nth-child(1) .dx-mod-ico { color: #c4532f; } body.home-layout-d .dx-mods > :nth-child(2) .dx-mod-ico { color: #3b63b8; }
body.home-layout-d .dx-mods > :nth-child(3) .dx-mod-ico { color: #2f8457; } body.home-layout-d .dx-mods > :nth-child(4) .dx-mod-ico { color: #7046b3; }
body.home-layout-d .dx-mods > :nth-child(5) .dx-mod-ico { color: #a87410; } body.home-layout-d .dx-mods > :nth-child(6) .dx-mod-ico { color: #23807f; }
body.home-layout-d .dx-mods > :nth-child(7) .dx-mod-ico { color: #b2416a; }
.ask2-chip .lti { color: #c4532f; margin-right: .1rem; }
.ask2-spark .lti, .ask2-avatar .lti { width: 1em; height: 1em; }
.ask2-gate-icon .lti { width: 1.4rem; height: 1.4rem; color: #c4532f; }
body.theme-d .intel-cat .lti { color: #c4532f; width: 1.05em; height: 1.05em; }
body.theme-d .intel-cat.is-active .lti { color: #fff; }
body.theme-d .intel-card-cat .lti { color: #c4532f; }
body.theme-d .intel-head .doc-title .lti { width: .9em; height: .9em; padding: .18em; box-sizing: content-box; border-radius: 12px; background: linear-gradient(135deg, #ffe4d6, #fcd0bb); color: #c4532f; margin-right: .2em; vertical-align: -.12em; }
body.theme-d .intel-empty-ico .lti { width: 2rem; height: 2rem; color: #c4532f; }
body.theme-d .notes-icon .lti, body.theme-d .cat-tab-icon .lti { color: #c4532f; }
body.theme-d .cat-tab.is-active .cat-tab-icon .lti { color: #fff; }
body.theme-d .guide-icon .lti { width: .78em; height: .78em; }
body.theme-d .group-col-icon { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 8px; vertical-align: middle; }
body.theme-d .group-col-icon .lti { width: 1rem; height: 1rem; }
body.theme-d .gi-ok { background: #dff1e3; color: #2f7a46; } body.theme-d .gi-mid { background: #fbefd2; color: #9a6a0c; } body.theme-d .gi-wait { background: #ece7e1; color: #6a5f55; }
@media (max-width: 480px) {
  :is(body.theme-d, body.home-layout-d) .site-header { gap: .5rem; }
  :is(body.theme-d, body.home-layout-d) .brand { font-size: .92rem; white-space: nowrap; }
  :is(body.theme-d, body.home-layout-d) .brand::before { width: .45rem; height: .45rem; margin-right: .3rem; }
  :is(body.theme-d, body.home-layout-d) .site-header nav { display: flex; gap: .45rem; white-space: nowrap; }
  :is(body.theme-d, body.home-layout-d) .site-header nav a { font-size: .8rem; padding: .15rem 0; font-weight: 500; }
  :is(body.theme-d, body.home-layout-d) .site-header nav a[aria-current="page"] { padding: .15rem .25rem; }
}
/* /ask/: keep conversation clear of the sticky header */
html:has(body.ask-page), body.ask-page { scroll-padding-top: calc(var(--p-hdr) + 16px); }
body.ask-page :is(.ask2-turn, .ask2-q, .ask2-a, .ask2-sources, .ask2-answer > *) { scroll-margin-top: calc(var(--p-hdr) + 16px); }
@media (max-width: 760px) { html:has(body.ask-page), body.ask-page { scroll-padding-top: 12px; } body.ask-page :is(.ask2-turn, .ask2-q, .ask2-a, .ask2-sources, .ask2-answer > *) { scroll-margin-top: 12px; } }
@media (min-width: 761px) { body.ask-page .site-header { background: rgba(247,244,238,.9); box-shadow: 0 0 0 100vmax rgba(247,244,238,.9); } }
/* AI-intel: open-source repo card + list badge, fun-tools tint */
body.theme-d .intel-repo { display: flex; align-items: center; gap: .85rem; margin: 1rem 0 1.2rem; padding: .85rem 1rem; border-radius: 14px; text-decoration: none; color: #1b1815;
  background: linear-gradient(135deg, #fffefb, #f6f1ea); border: 1px solid #e6dccf; box-shadow: var(--p-shadow); transition: transform .3s var(--p-ease), box-shadow .3s var(--p-ease), border-color .3s; }
body.theme-d .intel-repo:hover { transform: translateY(-2px); box-shadow: var(--p-shadow-h); border-color: #f0c9b2; }
body.theme-d .intel-repo-ico { flex: none; width: 2.6rem; height: 2.6rem; border-radius: 12px; display: grid; place-items: center; background: #1f1b18; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.15); }
body.theme-d .intel-repo-ico .lti { width: 1.35rem; height: 1.35rem; }
body.theme-d .intel-repo-txt { display: grid; min-width: 0; line-height: 1.35; }
body.theme-d .intel-repo-k { font-size: .74rem; color: #7a7067; letter-spacing: .02em; }
body.theme-d .intel-repo-txt b { font: 650 1rem/1.35 ui-monospace, SFMono-Regular, Menlo, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.theme-d .intel-repo-go { margin-left: auto; flex: none; font-size: .84rem; font-weight: 650; color: #fff; background: linear-gradient(180deg, #d9693d, #c4532f); padding: .42rem .85rem; border-radius: 999px; box-shadow: 0 6px 14px -8px rgba(196,83,47,.7); }
@media (max-width: 480px) { body.theme-d .intel-repo { flex-wrap: wrap; } body.theme-d .intel-repo-go { margin-left: 0; width: 100%; text-align: center; } }
body.theme-d .intel-gh-badge { display: inline-flex; align-items: center; gap: .25rem; vertical-align: .12em; margin-left: .35rem; font-size: .7rem; font-weight: 650; color: #fff; background: #1f1b18; padding: .08rem .5rem .08rem .4rem; border-radius: 999px; letter-spacing: .02em; }
body.theme-d .intel-gh-badge .lti { width: .85rem; height: .85rem; }
body.theme-d .intel-cat[href="/ai-intel/fun-tools/"] .lti { color: #b2416a; }
body.theme-d .intel-cat.is-active[href="/ai-intel/fun-tools/"] .lti { color: #fff; }
body.theme-d .intel-wrap:has(.intel-cat.is-active[href="/ai-intel/fun-tools/"]) .intel-head .doc-title .lti { background: linear-gradient(135deg, #fde3ea, #f7cdd8); color: #b2416a; }

/* GEO 2026-11-02: brand eyebrow inside evergreen H1, quiet + small */
.h1-brand { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .08em; color: #c8643c; margin-bottom: .35rem; }
.h1-sep { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* broadcast sources + key points + leaderboard stamp */
.bc-src { margin: .35rem 0 0; font-size: .82rem; color: #8a7a6e; }
.bc-src a { color: inherit; text-decoration: underline; text-decoration-color: #e9b79a; text-underline-offset: 2px; }
.bc-keypoints { margin: 1rem 0 1.4rem; padding: .9rem 1.1rem; border-radius: 14px; background: #fff6ee; border: 1px solid #f3dccb; }
.bc-keypoints h2 { margin: 0 0 .4rem; font-size: .95rem; }
.bc-keypoints ul { margin: 0; padding-left: 1.1rem; font-size: .9rem; line-height: 1.6; }
.lb-stamp { margin: .2rem 0 .8rem; font-size: .85rem; color: #8a7a6e; }
