body[data-search-shape="square"] .search,body[data-search-shape="square"] .search button{border-radius:0}
body[data-search-shape="rounded"] .search{border-radius:14px}
body[data-search-shape="rounded"] .search button{border-radius:0 12px 12px 0}
body[data-frame-shape="square"] .panel,body[data-frame-shape="square"] .nav-ad{border-radius:0}
body[data-frame-shape="rounded"] .panel,body[data-frame-shape="rounded"] .nav-ad{border-radius:14px}
.category.nav-selected,.category.nav-selected:nth-child(even){background:color-mix(in srgb,var(--green) 13%,var(--paper))!important;box-shadow:inset 4px 0 var(--green)}
.panel.nav-selected{box-shadow:0 0 0 var(--panel-highlight-width,2px) color-mix(in srgb,var(--green) 32%,transparent)}
.sidebar .side-link.active{box-shadow:inset 3px 0 var(--green)}
.color-palette{border:1px solid var(--line);border-radius:7px;display:flex;flex-wrap:wrap;gap:15px;padding:12px;margin:15px 0;color:var(--text)}
.color-palette legend{padding:0 6px;font-size:12px}.color-palette label{display:flex;flex-direction:column;gap:5px;font-size:12px;flex:1;min-width:65px}.color-palette input{width:100%;height:33px;background:var(--paper);border:1px solid var(--line);border-radius:4px;padding:2px}.color-palette small{display:block;width:100%;color:var(--muted);font-size:11px}
.footer.footer-managed{display:block;padding:18px 0 25px;line-height:1.9}
.footer-managed[data-align="left"] .footer-copy{text-align:left}
.footer-managed[data-align="center"] .footer-copy{text-align:center}
.footer-managed[data-align="right"] .footer-copy{text-align:right}
.filing-links{display:flex;justify-content:center;flex-wrap:wrap;gap:8px 20px;margin-top:9px;font-size:12px}.filing-links a:hover{text-decoration:underline}
body[data-palette="custom"][data-theme]{--bg:var(--custom-bg);--paper:var(--custom-paper);--text:var(--custom-text);--muted:var(--custom-text);--line:color-mix(in srgb,var(--custom-text) 18%,var(--custom-paper));--green:var(--custom-accent);--soft:color-mix(in srgb,var(--custom-accent) 12%,var(--custom-paper));--hover:color-mix(in srgb,var(--custom-accent) 7%,var(--custom-paper))}
body[data-palette="custom"] .hero,body[data-palette="custom"] .sidebar,body[data-palette="custom"] .footer{color:var(--custom-bg-text)}
body[data-palette="custom"] .search button{background:var(--custom-accent);color:var(--custom-on-accent)}
body[data-palette="custom"] .search{border-color:var(--custom-accent)}
body[data-palette="custom"] .side-link{color:var(--custom-bg-text)}
body[data-palette="custom"] .side-link.active,body[data-palette="custom"] .side-link:hover{background:var(--soft);color:var(--custom-text)}
body[data-palette="custom"] .engine,body[data-palette="custom"] .eyebrow,body[data-palette="custom"] .hint,body[data-palette="custom"] .side-title{color:var(--custom-bg-text)}
body[data-palette="custom"] .engine.active{color:var(--custom-accent)}
body[data-palette="custom"] .search button:hover{filter:brightness(.93)}

#settingsDialog{max-height:90vh;max-height:90dvh;overflow:auto}

/* Custom colors share the current preset layout; preserve their own colors. */
body[data-palette="custom"][data-theme] .brand-title,
body[data-palette="custom"][data-theme] .cat-name,
body[data-palette="custom"][data-theme] .engine.active{color:var(--custom-accent)}
body[data-palette="custom"][data-theme] .engine.active:after{background:var(--custom-accent)}
body[data-palette="custom"][data-theme] .category:nth-child(even){background:var(--hover)}
body[data-palette="custom"][data-theme] .side-link{color:var(--custom-bg-text)}
body[data-palette="custom"][data-theme] .side-link.active,
body[data-palette="custom"][data-theme] .side-link:hover{background:var(--soft);color:var(--custom-text)}
body[data-palette="custom"][data-theme] .search{border-color:var(--custom-accent)}
body[data-palette="custom"][data-theme] .search:focus-within{border-color:var(--custom-accent);box-shadow:0 0 0 3px var(--soft)}
body[data-palette="custom"][data-theme] .search button,
body[data-palette="custom"][data-theme] .search button:hover{background:var(--custom-accent);color:var(--custom-on-accent)}
