/* Scoped presentation improvements for the published demo builds. */
html[data-project-site="bt"] { --locale-bg:var(--color-card,#fff); --locale-border:var(--color-border,#e8e9ec); --locale-ink:var(--color-foreground,#18181b); --locale-ring:var(--color-ring,#059669) }
html[data-project-site="etf"] { --locale-bg:var(--color-soft,#f1f3f7); --locale-border:var(--color-line,#e6e8ee); --locale-ink:var(--color-ink,#21242c); --locale-ring:var(--color-accent,#7a7f9d) }
html[data-project-site="py"] { --locale-bg:var(--card,#fff); --locale-border:var(--line,#e7e5e4); --locale-ink:var(--ink,#1c1917); --locale-ring:var(--primary,#ea580c) }
#project-language-control { position:relative;z-index:2;display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;color:var(--locale-ink,inherit);font:12px/1.4 system-ui,"Microsoft YaHei",sans-serif }
#project-language-control label { display:flex;align-items:center;opacity:.7 }
#project-language-control select { box-sizing:border-box;appearance:auto;min-height:32px;width:68px;padding:0 6px;border:1px solid var(--locale-border,#d8dee8);border-radius:8px;background:var(--locale-bg,#fff);color:inherit;font:inherit;font-weight:600;cursor:pointer }
#project-language-control select:focus-visible { outline:2px solid var(--locale-ring,#059669);outline-offset:3px }
.dark #project-language-control,.dark-mode #project-language-control { color-scheme:dark }
#project-language-control.project-locale-etf select { border-radius:999px }
html[data-project-site="bt"][data-project-locale="en"] :is(.min-w-\[320px\],.min-w-\[360px\]):has(> div > :is(.min-w-\[56px\],.min-w-\[64px\])) { min-width:560px }
html[data-project-site="bt"][data-project-locale="en"] :is(.min-w-\[320px\],.min-w-\[360px\]) > div > :is(.min-w-\[56px\],.min-w-\[64px\]) { width:96px;min-width:96px;text-align:center }
html[data-project-site="bt"][data-project-locale="en"] :is(.min-w-\[320px\],.min-w-\[360px\]) > div > :is(.min-w-\[56px\],.min-w-\[64px\]) > span:not(:first-child) { white-space:normal }
@media(max-width:720px) {
  #project-language-control label { display:none }
  #project-language-control select { min-height:36px;width:68px }
  html[data-project-site="bt"] [data-project-header] { display:grid;grid-template-columns:40px minmax(0,1fr);height:auto;gap:4px 8px;padding-top:8px;padding-bottom:8px }
  html[data-project-site="bt"] [data-project-header] > div:last-child { grid-column:1/-1;justify-content:flex-end;gap:8px }
  html[data-project-site="bt"] [data-project-header] > div:last-child > span.shrink-0 { margin-right:auto }
  html[data-project-site="bt"] [data-project-header] > div:last-child > span:last-child > div { width:112px }
  html[data-project-site="bt"] [data-project-header] > div:last-child > span:last-child button { min-height:36px }
  html[data-project-site="py"] [data-project-header] .header-actions { gap:4px }
}
@media(max-width:480px) {
  html[data-project-site="py"] #app-container > [data-project-header] { flex-wrap:wrap;gap:8px;padding:10px 12px;height:auto;min-height:0 }
  html[data-project-site="py"] [data-project-header] .brand-group { flex:1 0 100%;min-width:0 }
  html[data-project-site="py"] [data-project-header] .brand-name { white-space:nowrap }
  html[data-project-site="py"] [data-project-header] .header-actions { width:100%;justify-content:flex-end;gap:6px }
  html[data-project-site="py"] [data-project-header] .icon-button { width:36px;height:36px }
}
@media(max-width:639px) {
  html[data-project-site="etf"] #root > div { display:block;padding:0 12px }
  html[data-project-site="etf"] #root > div > aside { position:relative;top:auto;width:auto;height:auto;margin:0 0 12px;padding:6px;border-radius:12px }
  html[data-project-site="etf"] #root > div > aside > div { display:none }
  html[data-project-site="etf"] aside > nav { flex-direction:row;gap:4px;margin:0;overflow-x:auto;scrollbar-width:thin;overscroll-behavior-x:contain }
  html[data-project-site="etf"] aside > nav > div { display:none }
  html[data-project-site="etf"] aside > nav > button { flex-shrink:0;min-height:40px;gap:7px;white-space:nowrap }
  html[data-project-site="etf"] aside > nav > button > .max-lg\:hidden { display:inline }
  html[data-project-site="etf"] [data-project-header] { display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 8px;padding:12px;background:var(--color-card);backdrop-filter:none;top:8px }
  html[data-project-site="etf"] [data-project-header] > div:first-child { min-width:0;white-space:normal;overflow-wrap:anywhere }
  html[data-project-site="etf"] [data-project-header] > div:nth-child(2) { grid-column:1/-1;grid-row:2;justify-content:flex-start }
  html[data-project-site="etf"] [data-project-header] > div:last-child { grid-column:2;grid-row:1;gap:6px }
  html[data-project-site="etf"] [data-project-header] > div:last-child > .w-px,
  html[data-project-site="etf"] [data-project-header] > div:last-child > span:last-child { display:none }
  html[data-project-site="etf"] [data-project-header] > div:last-child > button { width:36px;height:36px }
  html[data-project-site="etf"] #root > div > main > div { padding:16px 0 24px }
  html[data-project-site="etf"] main > div > .table-scroll-wrapper { margin:0;padding:0 }
  html[data-project-site="etf"] .grid:has(> .card-hover) { gap:10px }
  html[data-project-site="etf"] .card-hover { min-width:0;padding:12px }
  html[data-project-site="etf"] .card-hover > div:nth-child(2),
  html[data-project-site="etf"] .card-hover > div:nth-child(2) > span { font-size:18px;min-width:0;gap:5px }
  html[data-project-site="etf"] .card-hover > div:last-child.truncate { white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:1.5;overflow-wrap:anywhere }
}
