/* Clear optical glass: an open center, a curved bevel and restrained reflections. */
:is(.academic-topbar, .profile nav, #header-desktop .header-wrapper, #header-mobile .header-container, .studio-switch) {
  background: linear-gradient(180deg,rgba(255,255,255,.22),rgba(255,255,255,.62) 24%,rgba(255,255,255,.62) 76%,rgba(224,237,253,.24)),
    linear-gradient(125deg,rgba(255,255,255,.20),transparent 30%,transparent 74%,rgba(200,220,246,.10));
  border-color: rgba(128,153,184,.23);
  backdrop-filter: blur(1.6px) saturate(112%);
  -webkit-backdrop-filter: blur(1.6px) saturate(112%);
  box-shadow: 0 1px 3px rgba(29,46,70,.04), 0 9px 25px rgba(29,46,70,.075),
    inset 0 1px 0 rgba(255,255,255,.98), inset 0 -1px 1px rgba(88,121,164,.19),
    inset 0 -4px 7px -6px rgba(58,91,133,.24);
}
:is(.academic-topbar, .profile nav, #header-desktop .header-wrapper, #header-mobile .header-container, .studio-switch)::before {
  content: ''; position: absolute; inset: 1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(112deg,rgba(255,255,255,.26),transparent 24%,transparent 76%,rgba(255,255,255,.12));
}
/* A single optical rim shares the physical edge instead of adding nested outlines. */
@supports (mask-composite: exclude) or (-webkit-mask-composite: xor) {
  :is(.academic-topbar,.profile nav,#header-desktop .header-wrapper,#header-mobile .header-container,.studio-switch)::before {
    inset: -1px; padding: 1px; z-index: 2;
    background: linear-gradient(116deg,#fffffff0,rgba(255,255,255,.28) 35%,rgba(94,132,180,.12) 67%,#ffffffa6);
    -webkit-mask: linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
  }
  :is(.academic-topbar,.profile nav,#header-desktop .header-wrapper,#header-mobile .header-container,.studio-switch).is-liquid-active::before { opacity: .18; }
}
.is-scrolled .academic-topbar, .is-scrolled #header-desktop .header-wrapper {
  box-shadow: 0 1px 3px rgba(29,46,70,.045), 0 11px 28px rgba(29,46,70,.085),
    inset 0 1px 0 white, inset 0 -1px 1px rgba(88,121,164,.20), inset 0 -4px 7px -6px rgba(58,91,133,.24);
}
.studio-switch { box-shadow: inset 0 1px 0 white, inset 0 -1px 1px #5879a01c, 0 3px 10px #1d2e460b; }
:is(.academic-topbar, .profile nav, #header-desktop .header-wrapper, #header-mobile .header-container, .studio-switch).lens-ready,
.academic-site :is(.paper-badge, .paper-actions a, .interests > span, .abstract-icon).lens-ready,
body [data-lens].lens-ready {
  backdrop-filter: var(--lens-filter);
  -webkit-backdrop-filter: var(--lens-filter);
}
/* Compact controls keep their existing opacity hierarchy and thin outline. */
.academic-site :is(.paper-badge, .paper-actions a, .interests > span, .abstract-icon) {
  backdrop-filter: blur(.8px) saturate(112%); -webkit-backdrop-filter: blur(.8px) saturate(112%);
  background-image: linear-gradient(160deg,rgba(255,255,255,.52),transparent 42%,rgba(174,199,229,.08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.94), inset 0 -1px 1px rgba(101,134,174,.10), 0 1px 3px rgba(29,46,70,.035);
}
.academic-site .paper-actions a { box-shadow: inset 0 1px 0 #fffffff5, inset 0 -1px 1px #6586ad24, 0 2px 4px #1d2e4609, 0 5px 12px #1d2e4608; }
.academic-site :is(.paper-badge,.paper-actions a,.interests > span,.abstract-icon) > .glass-sheen { background: radial-gradient(72px circle at var(--light-x,50%) var(--light-y,0),#fffffff5,rgba(255,255,255,.28) 44%,transparent 76%); }
/* Foreground chrome remains readable while real page content passes underneath. */
:is(.academic-topbar,.profile nav,#header-desktop .header-wrapper,#header-mobile .header-container) a {
  text-shadow: 0 1px 2px rgba(255,255,255,.96), 0 0 9px rgba(255,255,255,.85);
}
.glass-surface > .glass-sheen { transition: opacity 280ms ease; }
[theme=dark] :is(#header-desktop .header-wrapper,#header-mobile .header-container,.studio-switch) {
  background: linear-gradient(125deg,rgba(57,69,87,.42),rgba(22,30,42,.28) 42%,rgba(41,53,71,.32));
  border-color: rgba(181,200,225,.18);
  box-shadow: 0 3px 8px #0002, 0 12px 28px #0003, inset 0 1px 0 #ffffff42, inset 0 -1px 1px #647b992e;
}
[theme=dark] :is(#header-desktop .header-wrapper,#header-mobile .header-container) a { text-shadow: 0 1px 3px #171c23; }
[theme=dark] :is(#header-desktop .header-wrapper,#header-mobile .header-container,.studio-switch)::before { opacity: .28; }
/* Separate navigation labels from moving text, feathering the reading layer before the optical rim. */
#header-desktop .header-wrapper, #header-mobile .header-container { position: relative; }
@supports (mask-composite: intersect) or (-webkit-mask-composite: source-in) {
  :is(.academic-topbar,#header-desktop .header-wrapper,#header-mobile .header-container)::after,
  .profile nav::after {
    content: ''; position: absolute; inset: 2px; z-index: 0; border-radius: inherit; pointer-events: none;
    background-color: rgba(255,255,255,.65);
    -webkit-mask-image: linear-gradient(90deg,transparent,#000 30px,#000 calc(100% - 30px),transparent),linear-gradient(180deg,transparent,#000 18px,#000 calc(100% - 18px),transparent);
    mask-image: linear-gradient(90deg,transparent,#000 30px,#000 calc(100% - 30px),transparent),linear-gradient(180deg,transparent,#000 18px,#000 calc(100% - 18px),transparent);
    -webkit-mask-composite: source-in; mask-composite: intersect;
  }
  [theme=dark] :is(#header-desktop .header-wrapper,#header-mobile .header-container)::after { background-color: rgba(23,28,35,.74); }
  #header-mobile .header-container::after { bottom: auto; height: 52px; }
  .profile nav::after { display: none; }
  @media (max-width: 740px) { .profile nav::after { display: block; z-index: -1; } }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  :is(.academic-topbar,.profile nav,#header-desktop .header-wrapper,#header-mobile .header-container,.studio-switch),
  .academic-site :is(.paper-badge,.paper-actions a,.interests > span,.abstract-icon), body [data-lens] {
    background-image: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  }
  :is(.academic-topbar,.profile nav,#header-desktop .header-wrapper,#header-mobile .header-container,.studio-switch)::before,
  :is(.academic-topbar,.profile nav,#header-desktop .header-wrapper,#header-mobile .header-container)::after { display: none; }
  :is(.academic-topbar,.profile nav,#header-desktop .header-wrapper,#header-mobile .header-container) { background-color: #fff !important; }
  [theme=dark] :is(#header-desktop .header-wrapper,#header-mobile .header-container) { background-color: #202731 !important; }
}

/* Opt-in material for existing windows and controls, without wrapping content. */
body [data-lens] {
  --lens-center: .60;
  --lens-material: linear-gradient(180deg,rgba(255,255,255,.18),rgba(255,255,255,var(--lens-center)) 28%,rgba(255,255,255,var(--lens-center)) 72%,rgba(230,240,252,.18)),
    linear-gradient(125deg,rgba(255,255,255,.24),transparent 35%,transparent 70%,rgba(210,228,250,.10));
  background: var(--lens-material);
  border: 1px solid rgba(142,161,185,.20);
  backdrop-filter: blur(1.6px) saturate(112%); -webkit-backdrop-filter: blur(1.6px) saturate(112%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.98), inset 0 -1px 1px rgba(88,121,164,.17),
    0 1px 3px rgba(29,46,70,.035), 0 8px 23px rgba(29,46,70,.055);
}
body [data-lens="tile"] { --lens-center: .36; position: relative; }
body [data-lens="chip"] {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; padding: 8px 14px; margin: 5px 3px; line-height: 1.4;
  color: var(--studio-copy); text-decoration: none;
  box-shadow: inset 0 1px 0 #fffffff5, inset 0 -1px 1px #6586ad1a, 0 3px 9px #1d2e4608;
}
body [data-lens="chip"] sup { position: static; font-size: .68em; opacity: .6; }
body .home-salon > [data-lens="tile"] { border-radius: 24px; }
body .home-salon > [data-lens="tile"]::before { display: none; }
body [data-lens="control"] { --lens-center: .78; position: fixed; border-radius: 999px; color: var(--studio-copy); box-shadow: inset 0 1px 0 #fffffff5, inset 0 -1px 1px #5879a02b, 0 2px 4px #1d2e460c, 0 8px 20px #1d2e4614; }
body .petal-toggle[data-lens] { right: 24px; bottom: 24px; height: 44px; min-width: 76px; justify-content: center; }
body #back-to-top[data-lens] { right: 24px; bottom: 80px; width: 44px; height: 44px; padding: 0; display: grid; place-items: center; }
body #view-comments[data-lens] { right: 24px; bottom: 136px; width: 44px; height: 44px; padding: 0; display: grid; place-items: center; }
body [data-lens]:focus-visible { outline: 2px solid #557ba9; outline-offset: 4px; }

/* Article material stays transparent; code, quotes and table cells remain foreground text. */
body {
  --article-glass-fill: linear-gradient(180deg,#ffffff38,#ffffff24 28%,#ffffff24 72%,#e6f0fc24),linear-gradient(125deg,#ffffff32,transparent 35%,transparent 70%,#d2e4fa14);
  --article-glass-edge: rgba(142,161,185,.14);
  --article-glass-shadow: inset 0 1px 0 #fffffff5,inset 0 -1px 1px #6586ad1a,0 3px 8px #1d2e4605,0 10px 24px #1d2e4608;
}
body[theme=dark] {
  --article-glass-fill: linear-gradient(125deg,#39455732,#161e2a24 42%,#29354732);
  --article-glass-edge: rgba(181,200,225,.15);
  --article-glass-shadow: inset 0 1px 0 #ffffff24,inset 0 -1px 1px #647b9926,0 6px 20px #0002;
}
body #content > :is(.article-glass,blockquote,table), body #toc-auto.article-glass {
  --lens-material: var(--article-glass-fill);
  position: relative; z-index: 3;
  background: var(--lens-material); border: 1px solid var(--article-glass-edge); border-radius: 16px;
  box-shadow: var(--article-glass-shadow);
  backdrop-filter: blur(1.6px) saturate(112%); -webkit-backdrop-filter: blur(1.6px) saturate(112%);
}
body #content > .article-glass.lens-ready, body #toc-auto.article-glass.lens-ready {
  backdrop-filter: var(--lens-filter); -webkit-backdrop-filter: var(--lens-filter);
}
body #content > .article-glass > .code-disclosure { border-radius: inherit; }
body #content > .article-glass :is(.code-header,.highlight,.highlight pre,.highlight code,.hl) { background: transparent; }
/* Block code inherits the reading ink; syntax tokens keep their own palette. */
body #content .code-block .highlight pre > code { color: var(--studio-ink); }
body #content .code-header .ellipses .link-icon { display: block; width: 16px; height: 16px; }
body #content > .article-glass .code-header { border-bottom: 1px solid #8da6c026; color: var(--studio-copy); background: linear-gradient(180deg,#ffffff38,#91aac609); }
body #content .code-toggle-icon { display: inline-grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; background: #93abc610; }
body #content .code-toggle-icon .link-icon { width: 14px; height: 14px; opacity: .85; }
body #content .code-header:is(:active,.is-pressed) .code-toggle-icon { background: #93abc629; box-shadow: inset 0 1px 2px #2c496d17; }
body #content .code-block > .copy { box-shadow: inset 0 1px 0 #ffffffe0, inset 0 -1px 1px #6586ad18, 0 1px 3px #1d2e4608; }
body #content .code-block > .copy:focus-visible { outline-offset: 2px; }
body #content .code-block > .copy.is-copied { color: #42705c; border-color: #78a38b4d; background-color: #78a38b12; }
body #content .code-block > .copy.is-copy-error { color: #965457; border-color: #b980804d; background-color: #b9808012; }
body #content .code-block > .copy:is(:active,.is-pressed) { box-shadow: inset 0 1px 2px #2c496d17, inset 0 -1px 0 #ffffffe0; }
body #content > blockquote { padding: 14px 20px; }
body #content > :is(table,.article-table) { margin: 1rem 0; }
body #content > .article-table > table {
  width: 100%; margin: 0; border: 0; border-radius: inherit; box-shadow: none; background: transparent;
}
body #content :is(table,.article-table) :is(thead,tbody,tr,th,td) { background: transparent; }
body #content :is(table,.article-table) thead { background: #91aac60f; }
body #content :is(table,.article-table) th { color: var(--studio-ink); border-bottom-color: #8da6c038; }
/* Keep native scrolling and its hit area; a slim translucent thumb sits inside it. */
body { --reading-scroll-thumb: #7893b76b; --reading-scroll-active: #456b99b8; }
body[theme=dark] { --reading-scroll-thumb: #bed0e56b; --reading-scroll-active: #c7daf0ad; }
body #content :is(.code-block > .code-disclosure > .highlight,.article-table > table) {
  --reading-scroll-color: var(--reading-scroll-thumb);
}
body #content :is(.code-block > .code-disclosure > .highlight,.article-table > table):is(:hover,:focus-within) {
  --reading-scroll-color: var(--reading-scroll-active);
}
body #content :is(.code-block > .code-disclosure > .highlight,.article-table > table)::-webkit-scrollbar {
  width: 8px; height: 8px;
}
body #content :is(.code-block > .code-disclosure > .highlight,.article-table > table)::-webkit-scrollbar-track {
  background: transparent; margin: 0 8px;
}
body #content :is(.code-block > .code-disclosure > .highlight,.article-table > table)::-webkit-scrollbar-thumb {
  border: 2px solid transparent; border-radius: 999px; background-color: var(--reading-scroll-color); background-clip: padding-box;
}
body #content > .article-table > table:focus-visible { outline: 2px solid #557ba9; outline-offset: -2px; }
@supports not selector(::-webkit-scrollbar) {
  body #content :is(.code-block > .code-disclosure > .highlight,.article-table > table) {
    scrollbar-width: thin; scrollbar-color: var(--reading-scroll-color) transparent;
  }
}
@media (prefers-contrast: more), (prefers-reduced-transparency: reduce), (forced-colors: active) {
  body { --reading-scroll-thumb: #526b8a; --reading-scroll-active: #244d7e; }
  body[theme=dark] { --reading-scroll-thumb: #b9cbe1; --reading-scroll-active: #e0eaff; }
  body #content :is(.code-block > .code-disclosure > .highlight,.article-table > table)::-webkit-scrollbar-thumb { border-width: 1px; }
}
body #toc-auto.article-glass { padding: 0 14px; border-left-width: 1px; position: absolute; }
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  body #content > :is(.article-glass,blockquote,table), body #toc-auto.article-glass {
    background: #fff !important; border-color: #8394a9 !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  }
  body[theme=dark] #content > :is(.article-glass,blockquote,table), body[theme=dark] #toc-auto.article-glass { background: #202731 !important; }
  body #content > .article-glass .code-header { background: none; }
  body #content .code-toggle-icon { background: #e9eef5; box-shadow: none; }
  body[theme=dark] #content .code-toggle-icon { background: #394960; }
}
body[theme=dark] #content .code-block > .copy { box-shadow: inset 0 1px 0 #ffffff26, inset 0 -1px 1px #101b2c40, 0 1px 3px #0002; }
body[theme=dark] #content .code-block > .copy.is-copied { color: #9ccfb7; border-color: #9ccfb757; }
body[theme=dark] #content .code-block > .copy.is-copy-error { color: #e0a4a7; border-color: #e0a4a757; }
body[theme=dark] #content .code-block > .copy:is(:active,.is-pressed) { box-shadow: inset 0 1px 2px #0004, inset 0 -1px 0 #ffffff20; }

/* Search is a single lens over the page, with no opaque nested result panel. */
body.blur .page { filter: none; }
body.blur #mask { background-color: rgba(24,37,56,.10); }
.search-dropdown { box-shadow: none; top: 84px; pointer-events: none; }
.search-dropdown.desktop { right: max(24px,calc((100vw - 1240px) / 2)); width: min(480px,calc(100vw - 48px)); }
body [data-lens="window"] {
  --lens-center: .90;
  --lens-material: linear-gradient(180deg,rgba(255,255,255,.32),rgba(255,255,255,.90) 22px,rgba(255,255,255,.90) calc(100% - 12px),rgba(230,240,252,.32));
  border-color: rgba(128,153,184,.24);
  box-shadow: inset 0 1px 0 white, inset 0 -1px 1px #5879a030, 0 2px 4px #1d2e460a, 0 15px 38px #1d2e461b;
  position: relative; border-radius: 25px; padding: 7px; overflow: hidden;
  visibility: hidden; pointer-events: none; opacity: 0; translate: 0 -6px;
  transition: opacity 160ms ease, translate 320ms var(--motion-spring), visibility 160ms;
}
body [data-lens="window"][data-search-open] {
  visibility: visible; pointer-events: auto; opacity: 1; translate: 0 0;
}
:is(#search-dropdown-desktop,#search-dropdown-mobile) .dropdown-menu {
  position: relative !important; top: 0 !important; left: 0 !important; right: 0 !important;
  width: 100%; background: transparent; color: var(--studio-ink);
}
:is(#search-dropdown-desktop,#search-dropdown-mobile) .dataset-search { display: flow-root; }
:is(#search-dropdown-desktop,#search-dropdown-mobile) .suggestions {
  max-height: min(65dvh,650px); overscroll-behavior: contain; scrollbar-width: thin;
  scrollbar-color: #829ab655 transparent;
}
:is(#search-dropdown-desktop,#search-dropdown-mobile) .suggestion {
  border-radius: 16px; padding: 13px 15px; margin: 2px 0;
  transition: background-color 150ms, box-shadow 180ms;
}
:is(#search-dropdown-desktop,#search-dropdown-mobile) .suggestion-title {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  max-width: 100%; white-space: normal; overflow: hidden; line-height: 1.45; font-weight: 500;
}
:is(#search-dropdown-desktop,#search-dropdown-mobile) .suggestion-context { color: #5a6b7e; font-size: .92rem; line-height: 1.45; margin-top: 4px; }
:is(#search-dropdown-desktop,#search-dropdown-mobile) .suggestion.cursor {
  background: rgba(156,181,214,.21);
  box-shadow: inset 0 1px 0 #ffffffd9, inset 0 0 0 1px #8ca4c129;
}
:is(#search-dropdown-desktop,#search-dropdown-mobile) .suggestion:active { background: rgba(133,164,204,.25); box-shadow: inset 0 1px 2px #2c496d12; }
:is(#search-dropdown-desktop,#search-dropdown-mobile) :is(em,mark) { color: inherit; background: #bad1ef55; border-radius: 3px; }
:is(#search-dropdown-desktop,#search-dropdown-mobile) .search-footer { padding: 10px 14px 6px; font: 10px/1.5 -apple-system,BlinkMacSystemFont,sans-serif; opacity: .72; }
:is(#search-dropdown-desktop,#search-dropdown-mobile) .search-footer a { font-size: inherit; }

/* A clear search field is recessed into its parent lens, not a second filter. */
body #header-desktop .menu .search input, body #header-mobile .search input {
  background: rgba(255,255,255,.42); border: 1px solid #9aafc63b; border-radius: 999px;
  box-shadow: inset 0 1px 2px #28425e0d, 0 1px 0 #ffffffc7;
}
body #header-desktop .menu .search input:focus, body #header-mobile .search input:focus {
  background-color: rgba(255,255,255,.70); border-color: #648ab873; box-shadow: inset 0 1px 2px #28425e09, 0 0 0 3px #789fcc1c;
}
body #toc-static[data-lens] { --lens-center: .74; box-sizing: border-box; border-radius: 20px; overflow: hidden; }
body #toc-static[data-lens] :is(.toc-title,.toc-content) { background: transparent; }
body #toc-static[data-lens] .toc-title { min-height: 46px; align-items: center; padding: 3px 16px; }
body #toc-static[data-lens] .toc-content { border-top: 1px solid #8da6c01c; }
body #toc-static summary { list-style: none; cursor: pointer; }
body #toc-static summary::-webkit-details-marker { display: none; }
body #toc-static summary:focus-visible { outline-offset: -5px; border-radius: inherit; }
body #toc-static[open] > .toc-content { max-height: none; overflow: visible; transition: none; }
.toc-toggle-icon {
  display: inline-grid; place-items: center; flex: 0 0 auto; width: 28px; height: 28px;
  border-radius: 50%; background: #93abc610;
  transition: background-color 200ms;
}
.toc-toggle-icon .link-icon { width: 16px; height: 16px; opacity: .8; }
#toc-static[open]:not([data-expanded="false"]) .toc-toggle-icon > .link-icon { transform: rotate(90deg); }
/* The optical base holds its reflection while only the foreground glyph turns. */
:is(.code-toggle-icon,.toc-toggle-icon) > .link-icon, .abstract-icon > .abstract-glyph {
  transform-origin: center;
  transition: transform 320ms cubic-bezier(.22,1.2,.36,1);
}
#toc-static summary:hover .toc-toggle-icon { background: #93abc624; }
#toc-static summary:is(:active,.is-pressed) .toc-toggle-icon { background: #93abc629; box-shadow: inset 0 1px 2px #2c496d17; }
body :is(#toc-auto,#toc-static) .toc-content a.active { color: #315d8d; }
body :is(#toc-auto,#toc-static) .toc-content a.active::before { color: currentColor; }
body[theme=dark] :is(#toc-auto,#toc-static) .toc-content a.active { color: #bfd4ed; }

/* Fine pointer feedback stays small enough to keep labels and hit targets stable. */
body [data-lens]:is(a,button) { transition: transform 420ms var(--motion-spring), box-shadow 280ms, border-color 220ms, background-color 180ms; }
@media (hover: hover) and (pointer: fine) {
  body [data-lens]:is(a,button):hover { background: var(--lens-material); transform: none; border-color: #7b99bd4d; }
  body [data-lens="tile"]:is(a):hover {
    box-shadow: inset 0 1px 0 white, inset 0 -1px 1px #6586ad26, 0 3px 7px #1d2e4608, 0 13px 28px #1d2e4612;
  }
  body [data-lens="chip"]:hover { box-shadow: inset 0 1px 0 white, inset 0 -1px 1px #6586ad26, 0 6px 13px #1d2e4612; }
}
body [data-lens]:is(a,button):active { transform: none; }
body [data-lens]:is(a,button):is(:active,.is-pressed) {
  background-color: rgba(106,145,194,.08); border-color: #7194bf52;
  box-shadow: inset 0 1px 3px #28476a17, inset 0 -1px 0 #ffffffe0, 0 1px 3px #1d2e4605;
}
body :is(#header-desktop,#header-mobile) :is(.theme-switch,.language-toggle,.search-button,#menu-toggle-mobile) { border-radius: 999px; transition: background-color 180ms, box-shadow 180ms; }
@media (hover: hover) and (pointer: fine) {
  body :is(#header-desktop,#header-mobile) :is(.theme-switch,.language-toggle,.search-button,#menu-toggle-mobile):hover { background-color: #9db8dc14; }
}
body :is(#header-desktop,#header-mobile) :is(.theme-switch,.language-toggle,.search-button,#menu-toggle-mobile):is(:active,.is-pressed) { background-color: #8eadd126; box-shadow: inset 0 1px 2px #2c496d17, inset 0 -1px 0 #ffffffcc; }
body[theme=dark] [data-lens] {
  background: var(--lens-material);
  --lens-material: linear-gradient(125deg,rgba(57,69,87,.42),rgba(22,30,42,.32) 42%,rgba(41,53,71,.32));
  border-color: rgba(181,200,225,.18); color: var(--studio-copy);
  box-shadow: inset 0 1px 0 #ffffff38, inset 0 -1px 1px #647b992e, 0 3px 8px #0002, 0 10px 26px #0002;
}
body[theme=dark] [data-lens="window"] { --lens-material: linear-gradient(180deg,#202936c2,#1b2431f2 22px,#1b2431f2 calc(100% - 12px),#202d3be0); box-shadow: inset 0 1px 0 #ffffff38, inset 0 -1px 1px #647b992e, 0 2px 4px #0003, 0 15px 38px #0005; }
body[theme=dark] [data-lens]:is(a,button):is(:active,.is-pressed) { background-color: #9bbce01c; border-color: #9bbbe852; box-shadow: inset 0 1px 3px #0004, inset 0 -1px 0 #ffffff20, 0 1px 3px #0002; }
[theme=dark] :is(#search-dropdown-desktop,#search-dropdown-mobile) :is(.suggestion-title,.suggestion-context) { color: var(--studio-copy); }
[theme=dark] :is(#search-dropdown-desktop,#search-dropdown-mobile) .suggestion.cursor { background: #94b6e026; box-shadow: inset 0 0 0 1px #b1c8e01c; }
[theme=dark] :is(#search-dropdown-desktop,#search-dropdown-mobile) :is(em,mark) { background: #a8c8f036; }
body[theme=dark] #header-desktop .menu .search input, body[theme=dark] #header-mobile .search input { background: #18223059; border-color: #89a2c033; box-shadow: inset 0 1px 2px #0002, 0 1px 0 #ffffff12; }
body[theme=dark] #header-desktop .menu .search input:focus, body[theme=dark] #header-mobile .search input:focus { background-color: #182230b3; border-color: #94b7df80; box-shadow: inset 0 1px 2px #0002, 0 0 0 3px #89aee01f; }
body[theme=dark] :is(#header-desktop,#header-mobile) :is(.theme-switch,.language-toggle,.search-button,#menu-toggle-mobile):is(:active,.is-pressed) { background-color: #9bbce026; box-shadow: inset 0 1px 2px #0004, inset 0 -1px 0 #ffffff24; }
@media (max-width: 1080px) {
  #toc-auto { display: none; }
  #toc-static { display: block; }
  #header-mobile.open .header-wrapper { display: none; margin-top: 0; }
  #header-mobile.open .menu { padding: 0; }
  #header-mobile.open .header-container #menu-mobile > .menu-item { display: none; }
  #header-mobile .header-container .menu .search-wrapper { display: flex; align-items: center; gap: 10px; padding: 10px 14px; min-height: 60px; }
  #header-mobile .search-wrapper .search { flex: 1 1 auto; min-width: 0; }
  #header-mobile .search-wrapper .search input { width: 100%; box-sizing: border-box; }
  #header-mobile .header-container .menu .search-cancel { flex: 0 0 auto; white-space: nowrap; margin-left: 0; }
  .search-dropdown.mobile { width: calc(100% - 28px); right: 14px; top: 82px; }
  :is(#search-dropdown-desktop,#search-dropdown-mobile) .suggestions { max-height: calc(100dvh - 180px); }
}
@media (max-width: 680px) {
  body .petal-toggle[data-lens] { right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); }
  body #back-to-top[data-lens] { right: 18px; bottom: calc(74px + env(safe-area-inset-bottom)); }
  body #view-comments[data-lens] { right: 18px; bottom: calc(130px + env(safe-area-inset-bottom)); }
  body .home-salon > [data-lens="tile"] { border-radius: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  body [data-lens]:is(a,button):hover { transform: none; }
}
body[data-motion="off"] [data-lens]:is(a,button):hover { transform: none; }
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  body [data-lens] { background: #fff !important; border-color: #8394a9 !important; }
  body[theme=dark] [data-lens] { background: #202731 !important; }
}

/* A local meniscus stretches; content and pointer targets keep their geometry. */
body .liquid-surface > svg.liquid-rim { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; overflow: visible; pointer-events: none; opacity: 0; }
.liquid-surface.is-liquid-active > .glass-sheen { opacity: 0 !important; }
.academic-site :is(.paper-badge,.paper-actions a).liquid-surface,
body :is(a,button)[data-lens].liquid-surface { overflow: visible; }
[theme=dark] .liquid-rim { filter: brightness(.82); }
@media (prefers-reduced-motion: reduce), (prefers-reduced-transparency: reduce), (prefers-contrast: more) { .liquid-rim { display: none; } }
body[data-motion="off"] .liquid-rim { display: none; }
