/* Source: desktop-navigation-0.5.516.css */
/* The same WordPress menu serves the desktop rail and existing mobile drawer. */
/* Hover stays quieter than the selected destination. */
.dafa-navigation-rail { display: contents; }
.dafa-navigation-collapse,
.dafa-desktop-search-label { display: none; }

@media (min-width: 1024px) {
  html[data-dafa-layout="sidebar"] { --dafa-rail-width: 220px; }
  html[data-dafa-layout="sidebar"].dafa-nav-collapsed { --dafa-rail-width: 76px; }
  html[data-dafa-layout="sidebar"] body { padding-left: var(--dafa-rail-width); }

  /* A filtered sticky ancestor would make the fixed rail scroll with it. */
  html[data-dafa-layout="sidebar"] .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--dafa-surface);
  }
  html[data-dafa-layout="sidebar"] .header-row {
    display: flex;
    min-height: 72px;
    gap: 0;
  }
  .site-header .dafa-navigation-rail {
    position: fixed;
    z-index: 25;
    inset: 0 auto 0 0;
    display: flex;
    width: var(--dafa-rail-width);
    flex-direction: column;
    border-right: 1px solid var(--dafa-border);
    background: var(--dafa-surface);
  }
  .dafa-navigation-rail .site-branding {
    flex: 0 0 auto;
    min-width: 0;
    min-height: 94px;
    padding: 20px 16px;
  }
  .dafa-navigation-rail .dafa-brand-link { justify-content: flex-start; min-width: 0; }
  .dafa-navigation-rail .dafa-brand-svg { gap: 8px; }
  .dafa-navigation-rail .dafa-brand-svg__svg { flex-basis: 34px; width: 34px; height: 34px; }
  .dafa-navigation-rail .dafa-brand-svg__name { font-size: 21px; }
  .dafa-navigation-rail .dafa-brand-svg__tagline { font-size: 10px; letter-spacing: 0; }

  #site-navigation.primary-navigation {
    position: static;
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--dafa-border) transparent;
    padding: 0 12px 18px;
    max-height: none;
    visibility: visible;
    opacity: 1;
    transform: none;
  }
  #site-navigation > ul { display: grid; gap: 6px; width: 100%; }
  #site-navigation > ul > li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px;
    align-items: center;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
  }
  #site-navigation > ul > li > a {
    display: flex;
    grid-column: 1;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    min-height: 46px;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    line-height: 1.6;
    font-size: 14px;
    font-weight: 500;
  }
  #site-navigation > ul > li:not(.menu-item-has-children) > a { grid-column: 1 / -1; }
  #site-navigation > ul > li > a::after { display: none; }
  #site-navigation > ul > li > a .dafa-nav-icon {
    display: inline-flex;
    width: 20px;
    flex: 0 0 20px;
    align-items: center;
    justify-content: center;
  }
  #site-navigation > ul > li > a .dafa-nav-icon svg { width: 20px; height: 20px; }
  #site-navigation > ul > li > a .dafa-nav-label { min-width: 0; }
  #site-navigation > ul > li:is(.current-menu-item, .current-menu-ancestor, .current-blog-ancestor) > a,
  #site-navigation > ul > li:is(.current-menu-item, .current-menu-ancestor, .current-blog-ancestor) > a:hover {
    color: var(--dafa-accent-strong);
    background: color-mix(in srgb, var(--dafa-accent) 6%, var(--dafa-surface));
  }
  #site-navigation > ul > li > a:hover { background: color-mix(in srgb, var(--dafa-text) 3%, var(--dafa-surface)); }
  .dafa-navigation-rail .dafa-rail-appearance .footer-appearance__trigger:hover { background: color-mix(in srgb, var(--dafa-text) 3%, var(--dafa-surface)); }
  #site-navigation > ul > li > a .dafa-nav-badge {
    position: static;
    display: inline-flex;
    margin-left: 5px;
    vertical-align: middle;
  }
  #site-navigation .submenu-toggle {
    position: static;
    display: grid;
    grid-column: 2;
    grid-row: 1;
    place-items: center;
    width: 32px;
    min-width: 0;
    height: 42px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--dafa-text-soft);
    font-size: 0;
  }
  #site-navigation .submenu-toggle::after {
    content: "";
    display: block;
    width: 7px;
    height: 7px;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg) translate(-2px, -2px);
  }
  #site-navigation .submenu-toggle[aria-expanded="true"]::after { transform: rotate(225deg); }
  #site-navigation .submenu-toggle:hover { color: var(--dafa-accent); background: var(--dafa-surface-muted); }

  /* Explicit disclosure wins over legacy hover/focus and mega-menu grids. */
  #site-navigation.primary-navigation .sub-menu {
    position: static;
    inset: auto;
    display: none;
    grid-column: 1 / -1;
    width: auto;
    max-height: none;
    overflow: visible;
    margin: 0;
    padding: 4px 0 8px 30px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
    white-space: normal;
  }
  #site-navigation.primary-navigation .is-submenu-open > .sub-menu { display: block; }
  #site-navigation .sub-menu li { display: grid; grid-template-columns: minmax(0, 1fr) 28px; align-items: start; }
  #site-navigation .sub-menu a { grid-column: 1; padding: 9px 4px; border: 0; font-size: 12px; line-height: 1.6; }
  #site-navigation .sub-menu li:not(.menu-item-has-children) > a { grid-column: 1 / -1; }
  #site-navigation .sub-menu .submenu-toggle { width: 28px; height: 36px; }
  #site-navigation .sub-menu .sub-menu { padding-left: 12px; }
  #site-navigation .dafa-mega-card__title { font-size: 12px; font-weight: 500; }
  #site-navigation .dafa-mega-card__desc { display: none; }
  .dafa-navigation-collapse {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    min-height: 56px;
    margin: 0 12px;
    padding: 14px 12px;
    border: 0;
    border-top: 1px solid var(--dafa-border);
    background: transparent;
    color: var(--dafa-text-soft);
    font-size: 12px;
  }
  .dafa-navigation-collapse svg { flex: 0 0 20px; }

  html.dafa-nav-collapsed .dafa-navigation-rail .site-branding { justify-content: center; padding-inline: 12px; }
  html.dafa-nav-collapsed .dafa-navigation-rail .dafa-brand-svg__copy { display: none; }
  html.dafa-nav-collapsed #site-navigation > ul > li { grid-template-columns: minmax(0, 1fr); }
  html.dafa-nav-collapsed #site-navigation > ul > li > a { grid-column: 1 / -1; justify-content: center; padding-inline: 0; }
  html.dafa-nav-collapsed #site-navigation > ul > li > .submenu-toggle,
  html.dafa-nav-collapsed #site-navigation .sub-menu { display: none; }
  html.dafa-nav-collapsed #site-navigation > ul > li > a .dafa-nav-label,
  html.dafa-nav-collapsed .dafa-navigation-collapse span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    white-space: nowrap;
    clip-path: inset(50%);
  }
  html.dafa-nav-collapsed .dafa-navigation-collapse { justify-content: center; padding-inline: 0; }

  html[data-dafa-layout="sidebar"] .header-actions { display: flex; width: 100%; gap: 16px; }
  html[data-dafa-layout="sidebar"] .header-search { order: -1; flex: 1 1 auto; margin-right: auto; }
  html[data-dafa-layout="sidebar"] .header-search__toggle {
    display: flex;
    width: min(420px, 100%);
    min-height: 40px;
    height: auto;
    gap: 10px;
    justify-content: flex-start;
    padding: 8px 14px;
    border: 1px solid var(--dafa-border);
    border-radius: 8px;
    background: var(--dafa-bg);
    color: var(--dafa-text-soft);
  }
  .header-search__toggle .dafa-desktop-search-label { display: inline; font-size: 13px; }
}


/* Source: desktop-layout-0.5.519.css */
/* Responsive content layout for the desktop navigation rail. */
/* Outer page regions are separated by their surfaces, without framing rules. */
html[data-dafa-layout="sidebar"] body .site-footer { border-top: 0; }
html[data-dafa-layout="sidebar"] body .archive-hero { border-bottom: 0; }
/* Local search is part of the browsing task, not the optional sidebar. */
html[data-dafa-layout="sidebar"] .archive-page .content-column > .archive-search {
  width: min(460px, 100%);
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
html[data-dafa-layout="sidebar"] .archive-page .content-column > .archive-search .archive-hero__search {
  width: 100%;
  max-width: none;
  margin: 0;
}

.dafa-rail-appearance { display: none; }

@media (min-width: 1024px) {
  html[data-dafa-layout="sidebar"] .site-footer [data-dafa-color-mode-control] { display: none; }
  html[data-dafa-layout="sidebar"]:not(.dafa-nav-collapsed) { --dafa-rail-width: 208px; }
  html[data-dafa-layout="sidebar"]:not(.dafa-nav-collapsed) .dafa-rail-appearance .mobile-color-mode__options { width: 100%; }
  /* Keep menu geometry stable when expanding children creates a scrollbar. */
  html[data-dafa-layout="sidebar"]:not(.dafa-nav-collapsed) #site-navigation { scrollbar-gutter: stable; }
  /* Hidden button text must not create a second grid row for the chevron. */
  #site-navigation .submenu-toggle { position: relative; }
  #site-navigation .submenu-toggle:hover { background: transparent; }
  #site-navigation .submenu-toggle::after {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% - 2px)) rotate(45deg);
  }
  #site-navigation .submenu-toggle[aria-expanded="true"]::after {
    transform: translate(-50%, calc(-50% + 2px)) rotate(225deg);
  }
  html[data-dafa-layout="sidebar"] .site-header .dafa-navigation-rail { border-right: 0; }
  /* Give right-hand widgets useful measure while preserving the main column. */
  html[data-dafa-layout="sidebar"] body:has(.content-shell.sidebar-right > .sidebar) { --dafa-container: 1360px; }
  /* The content canvas now has two navigation widths; protect its primary column. */
  html[data-dafa-layout="sidebar"] .content-shell.has-sidebar { gap: 28px; }
  html[data-dafa-layout="sidebar"] .content-shell.has-sidebar > .content-column { flex-basis: 42rem; }
  html[data-dafa-layout="sidebar"] .content-shell.has-sidebar > .sidebar { flex-basis: 16rem; min-width: min(100%, 16rem); }
  html[data-dafa-layout="sidebar"] .archive-page .content-shell.has-sidebar > .sidebar { flex-basis: 15rem; min-width: min(100%, 15rem); }
  html[data-dafa-layout="sidebar"] .content-shell.has-sidebar.sidebar-right { gap: clamp(24px, calc(2.5vw - 12px), 32px); }
  html[data-dafa-layout="sidebar"] .content-shell.has-sidebar.sidebar-right > .sidebar {
    flex-basis: clamp(288px, calc(25vw - 24px), 336px);
    min-width: min(100%, clamp(288px, calc(25vw - 24px), 336px));
  }

  /* A compact introduction leaves the first useful task within the initial viewport. */
  html[data-dafa-layout="sidebar"] .editorial-home .editorial-hero {
    grid-template-columns: minmax(0, 1.65fr) minmax(260px, 1fr);
    gap: 32px;
    padding-block: 32px;
  }
  html[data-dafa-layout="sidebar"] .editorial-home .editorial-eyebrow { margin-bottom: 12px; }
  html[data-dafa-layout="sidebar"] .editorial-home .editorial-hero h1 {
    font-size: clamp(36px, 3.2vw, 48px);
    line-height: 1.3;
    letter-spacing: -.03em;
    margin-bottom: 20px;
  }
  html[data-dafa-layout="sidebar"] .editorial-home .editorial-hero__intro { font-size: 15px; line-height: 1.85; margin-bottom: 20px; }
  html[data-dafa-layout="sidebar"] .editorial-home .editorial-hero .scope-search { min-height: 52px; }
  html[data-dafa-layout="sidebar"] .editorial-home .editorial-hero .scope-search__submit { min-height: 40px; }
  html[data-dafa-layout="sidebar"] .editorial-home .discovery-carousel--files { padding: 20px; }
  html[data-dafa-layout="sidebar"] .editorial-home .discovery-carousel--files .discovery-heading { margin-bottom: 12px; }
  html[data-dafa-layout="sidebar"] .editorial-home .discovery-carousel--files .editorial-feature__image { height: 140px; margin-bottom: 12px; }
  html[data-dafa-layout="sidebar"] .editorial-home .discovery-carousel--files h3 { font-size: 17px; line-height: 1.55; margin-bottom: 8px; }
  html[data-dafa-layout="sidebar"] .editorial-home .discovery-carousel--files .discovery-reason { margin-bottom: 6px; }
  html[data-dafa-layout="sidebar"] .editorial-home .resource-tasks { margin-block: 8px 32px; }
  html[data-dafa-layout="sidebar"] .editorial-home .resource-tasks__heading { margin-bottom: 16px; }
  html[data-dafa-layout="sidebar"] .editorial-home .resource-tasks__heading h2 { font-size: 24px; }
  html[data-dafa-layout="sidebar"] .editorial-home .resource-tasks__heading p { margin-top: 6px; font-size: 13px; }
  html[data-dafa-layout="sidebar"] .editorial-home .resource-tasks__choices > a { min-height: 44px; padding-bottom: 10px; }
  html[data-dafa-layout="sidebar"] .editorial-home .resource-tasks__panel { gap: 20px 32px; padding-top: 20px; }
  html[data-dafa-layout="sidebar"] .editorial-home .resource-tasks__intro > p { font-size: 15px; }
  html[data-dafa-layout="sidebar"] .editorial-home .resource-tasks__resources li { min-height: 64px; padding-block: 10px; }
  html[data-dafa-layout="sidebar"] .editorial-home .resource-tasks__tools { padding-left: 24px; }
  html[data-dafa-layout="sidebar"] .editorial-home .editorial-section { padding-top: 32px; }
  html[data-dafa-layout="sidebar"] .editorial-home .editorial-heading { padding-bottom: 16px; }
  html[data-dafa-layout="sidebar"] .editorial-home .editorial-heading h2 { font-size: 23px; }

  /* Browsing rows use their available column, rather than scaling type with the viewport. */
  html[data-dafa-layout="sidebar"] .archive-page .archive-hero { padding-block: 20px; }
  html[data-dafa-layout="sidebar"] .archive-page .archive-title { font-size: 34px; }
  html[data-dafa-layout="sidebar"] .archive-page .archive-description { margin-top: 10px; font-size: 14px; }
  html[data-dafa-layout="sidebar"] .archive-page .content-shell { padding-top: 24px; }
  html[data-dafa-layout="sidebar"] .archive-results[data-dafa-archive-view="list"] .entry-grid { padding-inline: 20px; }
  html[data-dafa-layout="sidebar"] body .archive-results[data-dafa-archive-view="list"] .entry-card {
    grid-template-columns: minmax(144px, min(30%, 280px)) minmax(0, 1fr);
    gap: 20px;
    padding-block: 18px;
  }
  html[data-dafa-layout="sidebar"] body .archive-results[data-dafa-archive-view="list"] .entry-card__title { font-size: 20px; line-height: 1.45; }
  html[data-dafa-layout="sidebar"] body.tax-blogs .archive-results[data-dafa-archive-view="list"] .entry-card--news .entry-card__title { font-size: 20px; line-height: 1.45; }
  html[data-dafa-layout="sidebar"] body.tax-blogs .archive-results[data-dafa-archive-view="list"] .entry-card--news { padding-block: 16px; }
  html[data-dafa-layout="sidebar"] body.tax-blogs .archive-results[data-dafa-archive-view="list"] .entry-card--news .entry-card__body { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: start; column-gap: 12px; }
  html[data-dafa-layout="sidebar"] body.tax-blogs .archive-results[data-dafa-archive-view="list"] .entry-card--news .entry-card__kicker { grid-column: 1; grid-row: 1; align-self: center; margin-bottom: 8px; }
  html[data-dafa-layout="sidebar"] body.tax-blogs .archive-results[data-dafa-archive-view="list"] .entry-card--news .news-flags { grid-column: 2; grid-row: 1; justify-self: end; margin-bottom: 8px; }
  html[data-dafa-layout="sidebar"] body.tax-blogs .archive-results[data-dafa-archive-view="list"] .entry-card--news .entry-card__title { grid-column: 1 / -1; grid-row: 2; }
  html[data-dafa-layout="sidebar"] body.tax-blogs .archive-results[data-dafa-archive-view="list"] .entry-card--news .entry-card__excerpt { grid-column: 1 / -1; grid-row: 3; }
  html[data-dafa-layout="sidebar"] body.tax-blogs .archive-results[data-dafa-archive-view="list"] .entry-card--news .entry-meta { grid-column: 1 / -1; grid-row: 4; padding-top: 8px; }
  html[data-dafa-layout="sidebar"] body .archive-results[data-dafa-archive-view="list"] .entry-card__excerpt { margin-top: 8px; font-size: 14px; line-height: 1.7; }
  html[data-dafa-layout="sidebar"] body .archive-results[data-dafa-archive-view="list"] .entry-card__footer { padding-top: 10px; }

  /* Detail text and media use the content column, including wrapped sidebars. */
  html[data-dafa-layout="sidebar"] .single-page { --dafa-reading: 100%; }
  html[data-dafa-layout="sidebar"] .single-page .entry { padding: 28px; }
  html[data-dafa-layout="sidebar"] .single-page .entry-content { max-width: none; margin-inline: auto; }
  html[data-dafa-layout="sidebar"] body .single-page .entry-content > * { max-width: 100%; }
  html[data-dafa-layout="sidebar"] body .single-page .entry-header--center .entry-title {
    max-width: 100%;
    margin-inline: auto;
    font-size: clamp(26px, 2.4vw, 32px);
  }
  html[data-dafa-layout="sidebar"] .single-page .entry-header { padding-bottom: 20px; margin-bottom: 20px; }
  html[data-dafa-layout="sidebar"] body .single-page .entry-header--center .entry-deck { max-width: 100%; margin-inline: auto; font-size: 16px; }
  html[data-dafa-layout="sidebar"] .search-hero { padding-block: 24px; }
  html[data-dafa-layout="sidebar"] .search-hero h1 { font-size: 34px; line-height: 1.4; }
}


/* Source: sidebar-tools-0.5.516.css */
.dafa-search-modal-host { display: contents; }

/* Mobile keeps the original header; rail-only labels are progressive enhancement. */
.dafa-rail-tool-label,
.dafa-rail-login-icon { display: none; }

/* Rail tools share the navigation's subtle hover feedback. */
@media (min-width: 1024px) {
  html[data-dafa-sidebar-tools] body { --dafa-header-height: 0px; }
  html[data-dafa-sidebar-tools] body .site-header {
    position: static;
    height: 0;
    min-height: 0;
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
  }
  html[data-dafa-sidebar-tools] .site-topbar { display: none; }
  html[data-dafa-sidebar-tools] .site-header .header-row { height: 0; min-height: 0; padding-block: 0; }
  html[data-dafa-sidebar-tools] .site-header .dafa-navigation-rail {
    top: var(--wp-admin--admin-bar--height, 0px);
    bottom: 0;
  }
  html[data-dafa-sidebar-tools] .dafa-navigation-rail .header-actions > .header-search {
    order: -1;
    flex: 0 0 auto;
    width: 100%;
    margin: 0;
  }
  html[data-dafa-sidebar-tools] .header-search__toggle {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    gap: 12px;
    border: 0;
    background: transparent;
    color: var(--dafa-text);
  }
  html[data-dafa-sidebar-tools] .header-search__toggle .dafa-desktop-search-label { font-size: 14px; font-weight: 500; line-height: 1.6; }
  html[data-dafa-sidebar-tools] .header-search__toggle:hover { background: color-mix(in srgb, var(--dafa-text) 3%, var(--dafa-surface)); }
  html[data-dafa-sidebar-tools] .header-search__toggle svg { flex: 0 0 20px; }
  html[data-dafa-sidebar-tools] #site-navigation { padding-bottom: 12px; }
  html[data-dafa-sidebar-tools] .dafa-navigation-rail > .header-actions {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
    width: auto;
    gap: 4px;
    margin: 0 12px;
    padding: 8px 0;
  }
  html[data-dafa-sidebar-tools] .header-auth-controls { flex-direction: column; align-items: stretch; gap: 4px; }
  html[data-dafa-sidebar-tools] .header-auth-controls > :is(.header-user, .header-notice) { display: block; }
  html[data-dafa-sidebar-tools] body .dafa-navigation-rail .header-actions > .header-ai,
  html[data-dafa-sidebar-tools] .header-auth-controls > .header-login-link,
  html[data-dafa-sidebar-tools] .header-auth-controls > .header-user > .header-user__toggle,
  html[data-dafa-sidebar-tools] .header-auth-controls > .header-notice > .header-notice__toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex: 0 0 auto;
    width: 100%;
    height: 44px;
    min-height: 44px;
    padding: 10px 12px;
    gap: 12px;
    border: 0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dafa-text);
    background: transparent;
  }
  html[data-dafa-sidebar-tools] .header-actions > .header-ai svg,
  html[data-dafa-sidebar-tools] .dafa-rail-login-icon,
  html[data-dafa-sidebar-tools] .header-notice__toggle > svg { display: block; flex: 0 0 20px; width: 20px; height: 20px; }
  html[data-dafa-sidebar-tools] .header-user__toggle .header-user__avatar { width: 20px; height: 20px; }
  html[data-dafa-sidebar-tools] .dafa-rail-tool-label { display: inline; }
  html[data-dafa-sidebar-tools] .header-user__crown { left: 25px; right: auto; top: 5px; }
  html[data-dafa-sidebar-tools] body .dafa-navigation-rail :is(.header-ai, .header-login-link, .header-user__toggle, .header-notice__toggle):hover {
    background: color-mix(in srgb, var(--dafa-text) 3%, var(--dafa-surface));
    color: var(--dafa-accent-strong);
  }
  html[data-dafa-sidebar-tools] .dafa-navigation-rail :is(button, a):focus-visible { outline: 2px solid var(--dafa-accent); outline-offset: -2px; }
  html[data-dafa-sidebar-tools] body .dafa-navigation-rail :is(.header-user__panel, .header-notice__panel) {
    position: fixed;
    top: auto !important;
    bottom: 12px;
    left: calc(var(--dafa-rail-width) + 8px) !important;
    right: auto !important;
    width: min(360px, calc(100vw - var(--dafa-rail-width) - 32px));
    max-height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px) - 24px) !important;
  }
  html[data-dafa-sidebar-tools].dafa-nav-collapsed .header-search__toggle { justify-content: center; padding-inline: 0; }
  html[data-dafa-sidebar-tools].dafa-nav-collapsed .dafa-desktop-search-label,
  html[data-dafa-sidebar-tools].dafa-nav-collapsed .dafa-rail-tool-label { display: none; }
  html[data-dafa-sidebar-tools].dafa-nav-collapsed body .dafa-navigation-rail .header-actions > .header-ai,
  html[data-dafa-sidebar-tools].dafa-nav-collapsed .header-auth-controls > .header-login-link,
  html[data-dafa-sidebar-tools].dafa-nav-collapsed .header-auth-controls > .header-user > .header-user__toggle,
  html[data-dafa-sidebar-tools].dafa-nav-collapsed .header-auth-controls > .header-notice > .header-notice__toggle {
    justify-content: center;
    gap: 0;
    padding-inline: 0;
    font-size: 0;
  }
}


/* Source: sidebar-appearance-0.5.517.css */
/* The same picker returns to its original footer on mobile. */
@media (min-width: 1024px) {
  .dafa-navigation-rail > .dafa-rail-appearance {
    display: block;
    flex: 0 0 auto;
    margin: 0 12px 8px;
    padding: 0;
    border: 0;
  }
  .dafa-rail-appearance > .mobile-color-mode__label { display: none; }
  .dafa-rail-appearance .footer-appearance { position: relative; }
  .dafa-rail-appearance .footer-appearance__trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--dafa-text);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
    list-style: none;
    cursor: pointer;
  }
  .dafa-rail-appearance summary::-webkit-details-marker { display: none; }
  .dafa-rail-appearance .footer-appearance__trigger:hover,
  .dafa-rail-appearance details[open] > summary { background: var(--dafa-surface-muted); }
  .dafa-rail-appearance .footer-appearance__icon { display: flex; flex: 0 0 20px; }
  .dafa-rail-appearance svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .dafa-rail-appearance .footer-appearance__text { display: flex; align-items: center; justify-content: space-between; flex: 1; gap: 6px; white-space: nowrap; }
  .dafa-rail-appearance .footer-appearance__state { font-size: 0; color: color-mix(in srgb, var(--dafa-text-soft) 60%, var(--dafa-surface)); }
  .dafa-rail-appearance [data-dafa-appearance-label] { color: inherit; font-size: 12px; font-weight: 400; }
  .dafa-rail-appearance .footer-appearance__chevron { display: none; }
  .dafa-rail-appearance .mobile-color-mode__options {
    position: absolute;
    z-index: 30;
    inset: auto 0 calc(100% + 8px);
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 196px;
    max-height: calc(100dvh - 100px);
    overflow-y: auto;
    padding: 5px;
    border: 0;
    border-radius: 9px;
    background: var(--dafa-surface);
    box-shadow: 0 8px 28px rgb(0 0 0 / 14%);
  }
  .dafa-rail-appearance details:not([open]) > .mobile-color-mode__options { display: none; }
  .dafa-rail-appearance .mobile-color-mode__option {
    display: flex; align-items: center; justify-content: flex-start; gap: 9px;
    width: 100%; min-height: 40px; padding: 0 10px; border: 0; border-radius: 5px;
    background: transparent; color: var(--dafa-text); font-size: 13px; font-weight: 400;
  }
  .dafa-rail-appearance .mobile-color-mode__option svg { width: 16px; height: 16px; }
  .dafa-rail-appearance .mobile-color-mode__option:hover,
  .dafa-rail-appearance .mobile-color-mode__option[aria-checked="true"] { background: var(--dafa-surface-muted); }
  .dafa-rail-appearance .mobile-color-mode__option[aria-checked="true"]::after { content: ""; width: 8px; height: 4px; margin-left: auto; border: solid currentColor; border-width: 0 0 1.5px 1.5px; transform: rotate(-45deg); }
  .dafa-rail-appearance :is(summary, button):focus-visible { outline: 2px solid var(--dafa-accent); outline-offset: -2px; }
  html.dafa-nav-collapsed .dafa-rail-appearance .footer-appearance__trigger { justify-content: center; padding-inline: 0; }
  html.dafa-nav-collapsed .dafa-rail-appearance .footer-appearance__text { display: none; }
  html.dafa-nav-collapsed .dafa-rail-appearance .mobile-color-mode__options { inset: auto auto 0 calc(100% + 8px); }
}


/* Source: scoped-search-0.5.506.css */
/* Scope stays visible; the existing count/controls share their original toolbar row. */
.dafa-scoped-search-summary { display:flex; flex:1 1 160px; min-width:0; align-items:center; gap:8px; }
body .has-scoped-search .dafa-scoped-search-summary > .classification-status { flex:1 1 auto; min-width:0; min-height:0; line-height:1.4; white-space:normal; }
.dafa-scoped-search-controls { display:inline-flex; flex:0 0 auto; align-items:center; max-width:160px; }
body .dafa-scoped-search-trigger, body .dafa-scoped-search-clear {
  display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:var(--toolbar-control, 40px);
  padding:6px 8px; border:0; border-radius:6px; background:transparent; color:var(--dafa-text); font:inherit; font-size:13px; cursor:pointer;
}
body .dafa-scoped-search-trigger { min-width:0; }
.dafa-scoped-search-label { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dafa-scoped-search-label--short { display:none; }
.dafa-scoped-search-icon { flex:0 0 16px; width:16px; height:16px; }
body .dafa-scoped-search-clear { flex:0 0 28px; width:28px; padding-inline:4px; }
.dafa-scoped-search-clear svg { width:16px; height:16px; }
.dafa-scoped-search-clear[hidden] { display:none; }
.dafa-scoped-search-controls.has-keyword { border-radius:6px; background:var(--dafa-accent-soft); }
body .dafa-scoped-search-controls.has-keyword button { color:var(--dafa-accent-strong); }
body :is(.dafa-scoped-search-trigger, .dafa-scoped-search-clear):hover { background:var(--dafa-bg); }
body :is(.dafa-scoped-search-trigger, .dafa-scoped-search-clear):focus-visible { outline:2px solid var(--dafa-accent); outline-offset:2px; }
body .archive-search.dafa-scoped-search-panel {
  display:none; position:fixed; inset:auto; z-index:90; box-sizing:border-box; width:min(380px, calc(100vw - 24px));
  max-width:none; margin:0; padding:18px; border:0; border-radius:10px; overflow:auto; overscroll-behavior:contain;
  background:var(--dafa-surface); color:var(--dafa-text); box-shadow:0 8px 32px color-mix(in srgb, var(--dafa-text) 18%, transparent);
}
body .archive-search.dafa-scoped-search-panel:popover-open { display:block; }
body .archive-search.dafa-scoped-search-panel.is-open { display:block; }
.dafa-scoped-search-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.dafa-scoped-search-heading strong { font-size:16px; line-height:1.5; }
body .dafa-scoped-search-dismiss { min-height:36px; padding:4px 6px; border:0; background:transparent; color:var(--dafa-text-soft); font:inherit; font-size:12px; cursor:pointer; }
.dafa-scoped-search-hint { margin:4px 0 14px; color:var(--dafa-text-soft); font-size:12px; line-height:1.6; }
body .dafa-scoped-search-panel .archive-hero__search { display:grid; grid-template-columns:minmax(0,1fr) auto; width:100%; max-width:none; margin:0; gap:8px; border:0; padding:0; background:transparent; }
body .dafa-scoped-search-panel .archive-hero__search label { min-width:0; }
body .dafa-scoped-search-panel input[type=search] { width:100%; min-height:44px; padding:10px 12px; border:1px solid var(--dafa-border); border-radius:6px; background:var(--dafa-bg); color:var(--dafa-text); font:inherit; font-size:14px; }
body .dafa-scoped-search-panel .archive-hero__search-submit { position:static; width:auto; min-width:64px; min-height:44px; padding:8px 12px; border:0; border-radius:6px; background:var(--dafa-accent); color:var(--dafa-on-accent); font:inherit; font-size:14px; cursor:pointer; }
body .dafa-scoped-search-panel .archive-hero__search-submit:is(:hover,:focus-visible) { background:var(--dafa-accent-strong); color:var(--dafa-on-accent); }
.dafa-scoped-search-panel :is(input,button):focus-visible { outline:2px solid var(--dafa-accent); outline-offset:2px; }
body .classification-selected.dafa-search-only, body [data-scoped-keyword-chip] { display:none !important; }
@container (max-width:699px) {
  body .has-scoped-search .dafa-scoped-search-summary { grid-area:status; min-width:0; min-height:44px; gap:4px; }
  body .has-scoped-search .dafa-scoped-search-summary > .classification-status { font-size:12px; line-height:14px; }
  .has-scoped-search .dafa-scoped-search-controls { width:68px; max-width:68px; }
  body .has-scoped-search .dafa-scoped-search-trigger { flex:1 1 auto; gap:3px; min-height:44px; padding-inline:3px; font-size:12px; }
  .has-scoped-search .dafa-scoped-search-label { display:none; }
  .has-scoped-search .dafa-scoped-search-label--short { display:inline; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .has-scoped-search .has-keyword .dafa-scoped-search-icon { display:none; }
  body .has-scoped-search .dafa-scoped-search-clear { min-height:44px; }
}
@media (max-width:640px) {
  body .news-filter-form:not([data-news-unified]) > .news-filter-controls.has-scoped-search { display:grid; grid-template-columns:68px minmax(0,1fr) minmax(0,.7fr) 36px; align-items:center; gap:4px; }
  .news-filter-form:not([data-news-unified]) .dafa-scoped-search-controls { width:68px; max-width:68px; }
  body .news-filter-form:not([data-news-unified]) .dafa-scoped-search-trigger { flex:1 1 auto; min-height:44px; padding-inline:3px; gap:3px; font-size:12px; }
  .news-filter-form:not([data-news-unified]) .dafa-scoped-search-label { display:none; }
  .news-filter-form:not([data-news-unified]) .dafa-scoped-search-label--short { display:inline; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .news-filter-form:not([data-news-unified]) .has-keyword .dafa-scoped-search-icon { display:none; }
  body .news-filter-form:not([data-news-unified]) .has-scoped-search .news-filter-select__toggle { width:100%; min-height:44px; padding-inline:6px; gap:4px; font-size:12px; }
  .news-filter-form:not([data-news-unified]) .has-scoped-search .news-filter-select__label { display:none; }
  body .news-filter-form:not([data-news-unified]) .has-scoped-search > .archive-view-toolbar { width:36px; min-width:0; padding:0; margin:0; }
}


