/* Shared styles in their original enqueue order. Sources remain independently maintained. */

/* Source: resource-workflow.css */
/* Task-oriented browsing uses the existing theme surfaces and accent. */
.entry-card__footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 14px; order: 1; }
body .entry-card .entry-card__footer .entry-meta { order: 0; margin: 0; padding: 0; }
.archive-results[data-dafa-archive-view="list"] .entry-card__footer { order: 4; margin-top: auto; padding-top: 14px; }
body .resource-quick-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--dafa-text-soft); font-size: 12px; line-height: 1.5; text-decoration: none; white-space: nowrap; }
body .resource-quick-link:hover { color: var(--dafa-accent-strong); }
.resource-quick-link svg { flex: 0 0 16px; }
.resource-preview:not([open]) { display: none; }
.resource-preview[open] { display: flex; flex-direction: column; }
.resource-preview { position: fixed; inset: 0 0 0 auto; box-sizing: border-box; margin: 0; padding: 0; width: min(720px, 100%); max-width: 100%; height: 100vh; height: 100dvh; max-height: none; border: 0; border-left: 1px solid var(--dafa-border); background: var(--dafa-surface); color: var(--dafa-text); box-shadow: -12px 0 48px #0002; }
.resource-preview::backdrop { background: #17231f66; }
.resource-preview__header { display: flex; justify-content: space-between; align-items: center; flex: 0 0 auto; padding: 12px 24px; border-bottom: 1px solid var(--dafa-border); font-size: 13px; color: var(--dafa-text-soft); }
body .resource-preview__header button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; background: transparent; border: 0; color: var(--dafa-text); }
.resource-preview__scroll { overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 1 1 auto; padding: 24px 32px 36px; }
.resource-preview h2 { margin: 0 0 14px; font-size: clamp(22px, 2vw, 28px); line-height: 1.5; overflow-wrap: anywhere; }
.resource-preview__meta, .resource-preview__status { font-size: 12px; line-height: 1.8; color: var(--dafa-text-soft); }
.resource-preview__content { font-size: 14px; line-height: 1.9; overflow-wrap: anywhere; }
.resource-preview__content h3 { margin: 24px 0 8px; font-size: 16px; }
.resource-preview__content p { margin: 10px 0; }
.resource-preview[aria-busy="true"] .resource-preview__content { min-height: 360px; border-radius: 6px; background: linear-gradient(var(--dafa-surface-muted), var(--dafa-surface-muted)) 0 16px / 70% 24px no-repeat, repeating-linear-gradient(to bottom, var(--dafa-surface-muted) 0 12px, transparent 12px 34px) 0 64px / 100% 260px no-repeat; }
.resource-preview__footer { flex: 0 0 auto; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 20px; padding: 16px 24px max(16px, env(safe-area-inset-bottom)); border-top: 1px solid var(--dafa-border); background: var(--dafa-surface); font-size: 13px; }
.resource-preview__footer a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--dafa-text); }
body .resource-preview__footer button, body .resource-tasks__ai button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 14px; border: 0; border-radius: 6px; background: var(--dafa-accent-soft); color: var(--dafa-accent-strong); font: inherit; cursor: pointer; }
.resource-preview__footer svg, .resource-tasks__ai svg { width: 18px; height: 18px; flex: 0 0 18px; }
.resource-preview__footer small { flex-basis: 100%; color: var(--dafa-text-soft); font-size: 12px; line-height: 1.6; }
.resource-preview [hidden], .resource-tasks [hidden] { display: none !important; }
/* Editorial task entry: retain the homepage canvas and reserve accent for actions. */
.resource-tasks { margin:12px 0 64px; }
.resource-tasks__heading { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; margin-bottom:26px; }
.resource-tasks__heading h2 { margin:0; font-size:28px; line-height:1.4; letter-spacing:-.035em; }
.resource-tasks__heading p { margin:8px 0 0; color:var(--dafa-text-soft); font-size:14px; line-height:1.7; }
.resource-tasks__heading > a { min-height:44px; display:inline-flex; align-items:center; font-size:13px; color:var(--dafa-text-soft); text-decoration:none; }
.resource-tasks__heading > a:hover { color:var(--dafa-accent); }
.resource-tasks__choices { display:flex; gap:36px; border-bottom:1px solid var(--dafa-border); }
.resource-tasks__choices > a { position:relative; display:inline-flex; align-items:center; min-height:52px; padding:4px 0 14px; border:0; border-radius:0; background:transparent; color:var(--dafa-text-soft); text-decoration:none; }
.resource-tasks__choices > a::after { content:""; position:absolute; left:0; right:0; bottom:-1px; height:2px; background:var(--dafa-accent); transform:scaleX(0); transform-origin:left; }
.resource-tasks__choices strong { font-size:17px; font-weight:500; }
.resource-tasks__choices > a[aria-selected="true"],html.dafa-js .resource-tasks:not([data-tasks-ready]) [data-resource-task="launch"] { color:var(--dafa-text); background:transparent; }
.resource-tasks__choices > a[aria-selected="true"] strong { font-weight:650; }
.resource-tasks__choices > a[aria-selected="true"]::after,html.dafa-js .resource-tasks:not([data-tasks-ready]) [data-resource-task="launch"]::after { transform:scaleX(1); }
.resource-tasks__choices > a:hover { color:var(--dafa-accent); }
html.dafa-js:not(.dafa-loading-fallback) .resource-tasks:not([data-tasks-ready]) [data-resource-task-panel]:not([data-resource-task-panel="launch"]) { display:none; }
.resource-tasks__panel { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(0,1fr); gap:32px 64px; padding:28px 0 0; margin:0; border:0; border-radius:0; background:transparent; }
.resource-tasks__intro { grid-column:1/-1; display:flex; align-items:flex-start; justify-content:space-between; gap:24px; }
.resource-tasks__intro > p { margin:6px 0 0; font-size:17px; line-height:1.8; color:var(--dafa-text); }
.resource-tasks__ai { display:flex; flex-direction:column; align-items:flex-end; gap:8px; flex:0 1 370px; }
body .resource-tasks__ai button { min-height:44px; padding:10px 16px; border-radius:5px; background:var(--dafa-accent); color:var(--dafa-on-accent); font-size:13px; white-space:nowrap; }
body .resource-tasks__ai button:hover { background:var(--dafa-accent-strong); }
.resource-tasks__ai small { max-width:100%; font-size:11px; color:var(--dafa-text-soft); line-height:1.7; text-align:right; }
.resource-tasks__panel h3 { margin:0 0 14px; color:var(--dafa-text-soft); font-size:13px; font-weight:500; }
.resource-tasks__resources,.resource-tasks__tools { min-width:0; }
.resource-tasks__resources ul { padding:0; margin:0; list-style:none; counter-reset:task-document; }
.resource-tasks__resources li { display:grid; grid-template-columns:24px minmax(0,1fr) auto; align-items:center; gap:12px; min-height:82px; padding:14px 0; border-bottom:1px solid var(--dafa-border); counter-increment:task-document; }
.resource-tasks__resources li::before { content:counter(task-document,decimal-leading-zero); align-self:start; padding-top:3px; color:var(--dafa-text-soft); font-size:12px; line-height:1.8; font-variant-numeric:tabular-nums; }
.resource-tasks__document { min-width:0; display:grid; gap:6px; color:var(--dafa-text); text-decoration:none; }
.resource-tasks__document > span { font-size:15px; line-height:1.65; overflow-wrap:anywhere; }
.resource-tasks__document small { color:var(--dafa-text-soft); font-size:12px; line-height:1.5; }
.resource-tasks__document:hover > span { color:var(--dafa-accent); }
.resource-tasks__tools { border-left:1px solid var(--dafa-border); padding-left:32px; }
.resource-tasks__tool { display:grid; gap:8px; padding:14px 0; margin:0; font-size:13px; line-height:1.8; text-decoration:none; color:var(--dafa-text); }
.resource-tasks__tool strong { font-size:15px; font-weight:600; }
.resource-tasks__tool span { color:var(--dafa-text-soft); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.resource-tasks__tool:hover strong { color:var(--dafa-accent); }
.resource-tasks__more { display:inline-flex; align-items:center; min-height:44px; margin-top:8px; font-size:13px; text-decoration:none; color:var(--dafa-accent-strong); }
.resource-tasks__more:hover { text-decoration:underline; text-underline-offset:4px; }
@media(max-width:767px) {
 .resource-tasks { margin:0 0 44px; }
 .resource-tasks__heading { gap:6px; margin-bottom:16px; }
 .resource-tasks__heading h2 { font-size:24px; }
 .resource-tasks__heading p { font-size:13px; }
 .resource-tasks__choices { justify-content:space-between; gap:16px; }
 .resource-tasks__choices strong { font-size:15px; }
 .resource-tasks__choices > a { min-height:48px; padding-bottom:12px; }
 .resource-tasks__panel { grid-template-columns:minmax(0,1fr); padding-top:20px; gap:28px; }
 .resource-tasks__intro { flex-direction:column; gap:14px; }
 .resource-tasks__intro > p { font-size:15px; margin:0; }
 .resource-tasks__ai { align-items:flex-start; flex-basis:auto; }
 .resource-tasks__ai small { text-align:left; }
 .resource-tasks__resources li { grid-template-columns:22px minmax(0,1fr); gap:4px 8px; padding:14px 0; }
 .resource-tasks__resources .resource-quick-link { grid-column:2; justify-self:start; min-height:44px; }
 .resource-tasks__tools { border-left:0; padding-left:0; }
}
@media(prefers-reduced-motion:no-preference) {
 .resource-tasks__choices > a,.resource-tasks__document,.resource-tasks__tool,body .resource-tasks__ai button { transition:color 160ms,background-color 160ms; }
 .resource-tasks__choices > a::after { transition:transform 180ms ease; }
 .resource-tasks[data-tasks-ready] .resource-tasks__panel:not([hidden]) { animation:task-panel-enter 180ms ease-out; }
 @keyframes task-panel-enter { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:translateY(0); } }
}
.resource-preview :is(a,button):focus-visible, .resource-tasks :is(a,button):focus-visible, .resource-quick-link:focus-visible { outline: 2px solid var(--dafa-accent); outline-offset: 3px; }
@media (max-width: 767px) {
  .resource-preview { width: 100%; border: 0; }
  .resource-preview__scroll { padding: 20px; }
  .resource-preview__header, .resource-preview__footer { padding-inline: 20px; }
}
@media (prefers-reduced-motion: no-preference) {
  .resource-preview[open] { animation: resource-preview-enter 160ms ease-out; }
  @keyframes resource-preview-enter { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
}

/* Card view keeps its footer compact; preview remains available in list view. */
html[data-dafa-archive-view="grid"] .archive-results .resource-quick-link,
.archive-results[data-dafa-archive-view="grid"] .resource-quick-link { display: none; }


/* Source: workbench.css */
/* Follow the site's existing warm surfaces, typography and restrained accent. */
.header-search__panel:has(.quick-search){width:min(660px,calc(100vw - 24px));max-height:calc(100dvh - 100px);overflow:auto;overscroll-behavior:contain}
.quick-search__actions{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0 10px}
.quick-search__actions a,.quick-search__actions button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:8px 12px;border:1px solid var(--dafa-border,#deded7);border-radius:8px;background:transparent;color:inherit;font:inherit;font-size:13px;text-decoration:none;cursor:pointer}
.quick-search__actions svg{width:16px;height:16px}
.quick-search__shortcut{display:block;color:var(--dafa-text-soft,#737770);font-size:11px}
.quick-search__results{min-height:260px;margin-top:12px;border-top:1px solid var(--dafa-border,#deded7)}
.quick-search__results[hidden]{display:none}
.quick-search__results [role=status]{font-size:12px;color:var(--dafa-text-soft,#737770);margin:14px 0}
.quick-search__results h3{font-size:12px;letter-spacing:.04em;color:var(--dafa-text-soft,#737770);margin:16px 0 6px}
.quick-search__results a{display:grid;gap:3px;padding:10px 8px;min-height:44px;border-radius:6px;text-decoration:none;color:inherit}
.quick-search__results strong{font-size:14px;font-weight:550;line-height:1.6}
.quick-search__results small{font-size:11px;color:var(--dafa-text-soft,#737770);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.quick-search a:hover,.quick-search button:hover,.quick-search a:focus-visible{background:var(--dafa-surface-muted,#f2f1eb)}
.quick-search :focus-visible,.workbench a:focus-visible{outline:2px solid var(--dafa-accent,#d65d35);outline-offset:2px}
.workbench{min-width:0}
.workbench-shortcuts{display:flex;flex-wrap:wrap;gap:8px;padding-bottom:24px}
.workbench-shortcuts a{display:flex;align-items:center;gap:22px;min-height:44px;padding:9px 14px;background:var(--dafa-surface-muted,#f2f1eb);border-radius:7px;text-decoration:none;color:inherit;font-size:13px}
.workbench-shortcuts span{color:var(--dafa-text-soft,#737770)}
.workbench-columns{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:32px}
.workbench-section{min-width:0;margin-bottom:32px}
.workbench-section>header{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--dafa-border,#deded7);padding-bottom:12px}
.workbench-section h2{font-size:17px;margin:0;line-height:1.5}
.workbench-section>header>a,.workbench-section>header>span{font-size:12px;color:var(--dafa-text-soft,#737770);white-space:nowrap}
.workbench-list{list-style:none!important;padding:0!important;margin:0!important}
.workbench-list li{margin:0!important;border-bottom:1px solid var(--dafa-border,#deded7)}
.workbench-list a{display:grid;gap:6px;padding:16px 0;text-decoration:none;color:inherit;min-height:64px}
.workbench-list strong{font-weight:550;font-size:14px;line-height:1.7;overflow-wrap:anywhere}
.workbench-list small{font-size:11px;color:var(--dafa-text-soft,#737770)}
.workbench-note,.workbench-empty{font-size:13px;color:var(--dafa-text-soft,#737770);line-height:1.85;margin:18px 0}
.workbench-interests{display:inline-block;font-size:12px;line-height:1.8;margin-bottom:8px;color:var(--dafa-accent,#b84d2c)}
@media(max-width:700px){.workbench-columns{grid-template-columns:minmax(0,1fr);gap:0}.workbench-shortcuts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.workbench-shortcuts a{justify-content:space-between}.header-search__panel:has(.quick-search){max-height:calc(100dvh - 90px)}.quick-search__actions{gap:6px}.quick-search__actions a,.quick-search__actions button{padding:8px;font-size:12px}}

.archive-personal-link{display:inline-flex;align-items:center;min-height:44px;font-size:13px;color:var(--dafa-accent);text-underline-offset:4px}
.quick-search__results a,.quick-search__results strong,.quick-search__results small{min-width:0;white-space:normal;overflow-wrap:anywhere}.quick-search__results strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

.account-page .account-nav__menu a[data-account-action="workbench"]{--dafa-ac-icon:var(--dafa-icon-home)}

/* Brand search: one elevated dialog, soft controls and calm interaction feedback. */
html.dafa-search-open { overflow:hidden; }
body dialog.header-search__panel[data-search-modal] {
 --search-soft:color-mix(in srgb,var(--dafa-surface-muted) 48%,var(--dafa-surface));
 --search-line:color-mix(in srgb,var(--dafa-border) 72%,var(--dafa-surface));
 position:fixed; inset:0; margin:auto; width:min(736px,calc(100vw - 48px));
 max-width:none; min-width:0; max-height:min(800px,calc(100dvh - 64px)); height:fit-content;
 padding:24px 28px 16px; border:1px solid var(--search-line); border-radius:20px;
 background:var(--dafa-surface); color:var(--dafa-text);
 box-shadow:0 24px 80px rgb(30 43 37 / 20%),0 2px 8px rgb(30 43 37 / 5%);
 overflow:hidden; overscroll-behavior:contain;
}
body dialog.header-search__panel[open] { display:flex; flex-direction:column; animation:dafa-search-enter 220ms cubic-bezier(.2,.7,.2,1) both; }
body dialog.header-search__panel[hidden] { display:none; }
dialog.header-search__panel::backdrop { background:rgb(25 35 32 / 38%); backdrop-filter:blur(6px); animation:dafa-search-backdrop 180ms ease-out both; }
body dialog.header-search__panel .header-search__heading { flex:none; align-items:center; margin:0 0 16px; gap:16px; }
body dialog.header-search__panel .header-search__title { font-size:22px; line-height:1.45; font-weight:700; letter-spacing:-.025em; }
body dialog.header-search__panel .header-search__close { display:inline-flex; flex:none; align-items:center; justify-content:center; width:44px; height:44px; min-width:44px; padding:0; border:0; background:transparent; color:var(--dafa-text-soft); border-radius:50%; cursor:pointer; transition:background-color 160ms,color 160ms,transform 160ms; }
body dialog.header-search__panel .header-search__close:hover { background:var(--search-soft); color:var(--dafa-text); }
body dialog.header-search__panel .scope-search--modal { display:grid; flex:none; position:relative; grid-template-columns:auto minmax(0,1fr) 56px; gap:0; padding:0; border:0; background:transparent; box-shadow:none; border-radius:0; }
body dialog.header-search__panel .scope-search--modal::before { content:""; grid-column:1/-1; grid-row:1; border:1px solid var(--search-line); border-radius:12px; background:var(--search-soft); pointer-events:none; transition:border-color 180ms,box-shadow 180ms,background-color 180ms; }
body dialog.header-search__panel .scope-search--modal:has(.scope-search__field:focus-visible)::before { border-color:var(--dafa-accent); background:var(--dafa-surface); box-shadow:0 0 0 3px color-mix(in srgb,var(--dafa-accent) 12%,transparent); }
body dialog.header-search__panel .scope-search__field { position:relative; grid-column:2; grid-row:1; min-width:0; width:100%; min-height:56px; padding:12px 16px; font-size:17px; border:0; border-radius:12px 0 0 12px; background:transparent; color:var(--dafa-text); box-shadow:none; }
body dialog.header-search__panel .scope-search__field::placeholder { color:var(--dafa-text-soft); opacity:1; }
body dialog.header-search__panel .scope-search__field:focus-visible { outline:0; box-shadow:none; }
body dialog.header-search__panel .scope-search__submit { position:relative; grid-column:3; grid-row:1; display:inline-flex; align-items:center; justify-content:center; align-self:center; width:44px; min-height:44px; margin:6px; padding:0; border:0; border-radius:9px; color:var(--dafa-on-accent); background:var(--dafa-accent); box-shadow:none; transition:background-color 160ms,transform 160ms; }
body dialog.header-search__panel .scope-search__submit:hover { background:var(--dafa-accent-strong); color:var(--dafa-on-accent); }
body dialog.header-search__panel .quick-search { min-height:0; overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable; margin-top:22px; padding:0 6px 2px 0; }
body dialog .quick-search__topics { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:0 0 24px; color:var(--dafa-text-soft); font-size:13px; }
body dialog .quick-search__topics > span { flex-basis:100%; margin:0 0 3px; font-size:12px; font-weight:600; }
body dialog .quick-search__topics button { min-height:40px; max-width:100%; padding:8px 14px; border:1px solid var(--search-line); border-radius:999px; color:var(--dafa-text); background:var(--dafa-surface); font:inherit; line-height:1.5; overflow-wrap:anywhere; cursor:pointer; transition:background-color 160ms,border-color 160ms,color 160ms,transform 160ms; }
body dialog .quick-search__topics button:hover,body dialog .quick-search__topics button.is-selected { background:color-mix(in srgb,var(--dafa-accent) 7%,var(--dafa-surface)); border-color:color-mix(in srgb,var(--dafa-accent) 32%,var(--dafa-surface)); color:var(--dafa-accent); }
.quick-search__browse[hidden] { display:none; }
body dialog .quick-search__section-label { color:var(--dafa-text-soft); font-size:12px; font-weight:600; margin:0 0 8px; }
body dialog .quick-search__results { min-height:140px; margin:0; border:0; }
body dialog .quick-search__results [role=status] { margin:0 0 16px; font-size:12px; line-height:1.6; }
body dialog .quick-search__results h3 { margin:20px 0 8px; font-size:12px; font-weight:600; letter-spacing:0; }
body dialog .quick-search .search-result { position:relative; display:grid; align-content:center; gap:5px; min-height:76px; margin:2px 0; padding:12px 44px 12px 12px; border:0; border-radius:10px; color:var(--dafa-text); text-decoration:none; white-space:normal; transition:background-color 160ms,color 160ms; }
body dialog .quick-search .search-result strong { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; font-size:15px; line-height:1.6; font-weight:500; min-width:0; overflow-wrap:anywhere; }
body dialog .quick-search .search-result small { font-size:11px; font-weight:400; line-height:1.5; color:var(--dafa-text-soft); display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; }
body dialog .search-result__arrow { position:absolute; right:14px; top:50%; transform:translateY(-50%); color:var(--dafa-text-soft); font-size:20px; font-weight:400; line-height:1; transition:transform 180ms,color 180ms; }
body dialog .quick-search .search-result:hover,body dialog .quick-search .search-result:focus-visible { background:var(--search-soft); color:var(--dafa-accent); }
body dialog .quick-search .search-result:is(:hover,:focus-visible) .search-result__arrow { color:var(--dafa-accent); transform:translate(2px,calc(-50% - 2px)); }
body dialog .quick-search__actions { gap:4px 14px; margin:18px 0 6px; }
body dialog .quick-search__actions a,body dialog .quick-search__actions button { min-height:40px; padding:4px 0; border:0; border-radius:6px; font-size:12px; color:var(--dafa-text-soft); background:transparent; }
body dialog .quick-search__actions a:hover,body dialog .quick-search__actions button:hover { color:var(--dafa-accent); }
body dialog .quick-search__shortcut { margin-bottom:4px; }
body dialog .header-search__hint { display:flex; flex-wrap:wrap; align-items:center; gap:8px 18px; flex:none; margin:16px 0 0; padding-top:12px; border-top:1px solid var(--search-line); color:var(--dafa-text-soft); font-size:11px; }
body dialog .header-search__hint span { display:inline-flex; align-items:center; gap:6px; }
body dialog .header-search__hint kbd { padding:2px 5px; border:1px solid var(--search-line); border-radius:4px; background:var(--search-soft); color:inherit; font:inherit; line-height:1.3; }
body dialog.header-search__panel :is(button,a):focus-visible { outline:2px solid var(--dafa-accent); outline-offset:2px; }
body dialog.header-search__panel button:active { transform:scale(.97); }
body dialog .quick-search__results[aria-busy="true"]::after { content:""; display:block; height:92px; border-radius:10px; background:linear-gradient(90deg,var(--search-soft) 25%,var(--dafa-surface) 50%,var(--search-soft) 75%); background-size:200% 100%; animation:dafa-search-loading 1.5s ease-in-out infinite; }
@keyframes dafa-search-enter { from { opacity:0; transform:translateY(10px) scale(.985); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes dafa-search-backdrop { from { opacity:0; } to { opacity:1; } }
@keyframes dafa-search-loading { to { background-position:-200% 0; } }
@media(max-width:640px) {
 body dialog.header-search__panel[data-search-modal] { width:calc(100vw - 24px); max-height:calc(100dvh - 24px); padding:18px 18px 14px; border-radius:16px; }
 body dialog.header-search__panel .header-search__heading { margin-bottom:12px; gap:8px; }
 body dialog.header-search__panel .header-search__title { font-size:19px; }
 body dialog.header-search__panel .scope-search__field { font-size:16px; padding-inline:12px; }
 body dialog.header-search__panel .quick-search { margin-top:20px; }
 body dialog .quick-search__topics { margin-bottom:20px; gap:7px; }
 body dialog .quick-search__topics button { min-height:44px; padding:8px 12px; }
 body dialog .quick-search .search-result { min-height:76px; padding-left:8px; padding-right:32px; }
 body dialog .search-result__arrow { right:8px; }
 body dialog .quick-search__actions a,body dialog .quick-search__actions button { min-height:44px; }
 body dialog .header-search__hint { gap:8px 14px; }
 body dialog .header-search__hint .header-search__keys { display:none; }
}
@media(prefers-reduced-motion:reduce) {
 body dialog.header-search__panel[open],dialog.header-search__panel::backdrop,body dialog .quick-search__results[aria-busy="true"]::after { animation:none; }
 body dialog.header-search__panel :is(button,a),body dialog .search-result__arrow,body dialog.header-search__panel .scope-search--modal::before { transition:none; }
 body dialog.header-search__panel button:active { transform:none; }
 body dialog .quick-search .search-result:is(:hover,:focus-visible) .search-result__arrow { transform:translateY(-50%); }
}

/* A completed search with no matches needs one message, not empty result cards. */
body dialog .quick-search.is-empty :is(.quick-search__topics,.quick-search__actions,.quick-search__shortcut) { display:none; }
body dialog .quick-search.is-empty .quick-search__results { min-height:0; }
body dialog .quick-search.is-empty [role=status] { margin:8px 0 16px; padding:12px 0; font-size:14px; }
body dialog .quick-search.is-empty .quick-search__retry { display:inline-flex; min-height:44px; align-items:center; padding:0; color:var(--dafa-accent); font-size:13px; text-decoration:underline; text-underline-offset:3px; }
body dialog:has(.quick-search.is-empty) .header-search__keys { display:none; }

/* Shared scope picker; keep the surrounding search surfaces unchanged. */
body .scope-search:not(.scope-search--modal) { position:relative; overflow:visible; grid-template-columns:auto minmax(0,1fr) auto; }
body .scope-search:has(.search-scope-picker__trigger[aria-expanded="true"]) { z-index:6; }
body .scope-search .search-scope-picker { flex:0 0 auto; }
body .sidebar .scope-search:not(.scope-search--modal) { grid-template-columns:minmax(0,1fr) auto; }
body .sidebar .scope-search .search-scope-picker { grid-column:1/-1; justify-self:start; margin-block:4px; }
body dialog.header-search__panel .scope-search--modal { overflow:visible; z-index:5; }
body .scope-search .search-scope-picker { position:relative; grid-column:1; grid-row:1; align-self:center; margin-left:6px; z-index:4; }
body .scope-search .search-scope-picker::after { content:""; position:absolute; right:0; top:50%; width:1px; height:22px; transform:translateY(-50%); background:var(--search-line, color-mix(in srgb,var(--dafa-border) 72%,var(--dafa-surface))); pointer-events:none; }
body .scope-search .search-scope-picker__trigger { display:inline-flex; align-items:center; justify-content:center; gap:9px; min-width:80px; min-height:44px; padding:8px 12px; border:0; border-radius:8px; background:transparent; color:var(--dafa-text); font:inherit; font-size:14px; font-weight:500; cursor:pointer; transition:background-color 160ms,color 160ms; }
body .scope-search .search-scope-picker__trigger:hover,body .scope-search .search-scope-picker__trigger[aria-expanded="true"] { background:var(--search-soft, color-mix(in srgb,var(--dafa-surface-muted) 48%,var(--dafa-surface))); color:var(--dafa-text); }
body .scope-search .search-scope-picker__chevron { flex:none; width:14px; height:14px; color:var(--dafa-text-soft); transition:transform 160ms; }
body .scope-search .search-scope-picker__trigger[aria-expanded="true"] .search-scope-picker__chevron { transform:rotate(180deg); }
body .scope-search .search-scope-picker__menu { position:absolute; top:calc(100% + 10px); left:0; width:160px; max-height:240px; overflow:auto; padding:8px; border:1px solid color-mix(in srgb,var(--dafa-border) 55%,var(--dafa-surface)); border-radius:12px; background:var(--dafa-surface); box-shadow:0 12px 28px rgb(30 43 37 / 9%),0 2px 5px rgb(30 43 37 / 3%); }
body .scope-search .search-scope-picker__menu[hidden] { display:none; }
body .scope-search .search-scope-picker__menu button { display:flex; align-items:center; justify-content:space-between; gap:16px; width:100%; min-height:44px; padding:9px 12px; border:0; border-radius:7px; background:transparent; color:var(--dafa-text); font:inherit; font-size:14px; text-align:left; cursor:pointer; transition:background-color 160ms,color 160ms; }
body .scope-search .search-scope-picker__menu button:hover,body .scope-search .search-scope-picker__menu button:focus-visible { background:var(--search-soft, color-mix(in srgb,var(--dafa-surface-muted) 48%,var(--dafa-surface))); }
body .scope-search .search-scope-picker__menu button[aria-selected="true"] { color:var(--dafa-text); background:transparent; font-weight:500; }
body .scope-search .search-scope-picker__check { visibility:hidden; color:var(--dafa-accent); font-size:15px; }
body .scope-search [aria-selected="true"] > .search-scope-picker__check { visibility:visible; }
body .scope-search .search-scope-picker__menu button:focus-visible { outline-offset:-2px; }
@media(max-width:640px) {
 body .scope-search .search-scope-picker__trigger { min-width:70px; padding-inline:8px; gap:5px; }
 body dialog.header-search__panel .scope-search__field { padding-inline:10px; }
}
@media(prefers-reduced-motion:no-preference) {
 body .scope-search .search-scope-picker__menu:not([hidden]) { animation:dafa-scope-open 140ms ease-out; }
 @keyframes dafa-scope-open { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }
}
@media(prefers-reduced-motion:reduce) { body .scope-search .search-scope-picker__chevron { transition:none; } }

body .scope-search .search-scope-picker__trigger [data-search-scope-label] { white-space:nowrap; }
body .scope-search .search-scope-picker__menu button[aria-selected="true"]:is(:hover,:focus-visible) { background:var(--search-soft, color-mix(in srgb,var(--dafa-surface-muted) 48%,var(--dafa-surface))); }


/* Source: search-brand.css */
/* Search belongs to the same brand as account entry, with a compact masthead. */
body dialog.header-search__panel[data-search-style="brand-v2"] {
  --search-brand-start: color-mix(in srgb, var(--dafa-accent) 78%, #592517);
  --search-brand-end: var(--dafa-accent);
  --search-brand-ink: #fffaf6;
  --search-logo-fill: #fffaf6;
  --search-logo-stroke: var(--dafa-accent);
  padding: 0 26px 14px;
  border: 0;
  border-radius: 16px;
}
html.dafa-color-dark body dialog.header-search__panel[data-search-style="brand-v2"] {
  --search-brand-start: color-mix(in srgb, var(--dafa-accent) 8%, var(--dafa-surface));
  --search-brand-end: var(--dafa-surface-muted);
  --search-brand-ink: var(--dafa-text);
  --search-logo-fill: var(--dafa-accent);
  --search-logo-stroke: var(--dafa-on-accent);
}
body dialog.header-search__panel[data-search-style="brand-v2"] .header-search__masthead {
  position: relative;
  flex: none;
  isolation: isolate;
  overflow: hidden;
  margin: 0 -26px 20px;
  padding: 22px 64px 20px 26px;
  background: linear-gradient(115deg, var(--search-brand-start), var(--search-brand-end));
  color: var(--search-brand-ink);
}
body dialog.header-search__panel[data-search-style="brand-v2"] .header-search__masthead::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 32px 0 auto;
  width: 260px;
  background-color: currentColor;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20260%20136%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%2238%22%20y%3D%2226%22%20width%3D%22122%22%20height%3D%2286%22%20rx%3D%2210%22%20opacity%3D%22.45%22%2F%3E%3Cpath%20d%3D%22M57%2048h46M57%2061h67M57%2074h34M57%2087h49%22%20opacity%3D%22.55%22%2F%3E%3Crect%20x%3D%2217%22%20y%3D%2213%22%20width%3D%22122%22%20height%3D%2286%22%20rx%3D%2210%22%20opacity%3D%22.2%22%2F%3E%3Ccircle%20cx%3D%22175%22%20cy%3D%2262%22%20r%3D%2235%22%2F%3E%3Ccircle%20cx%3D%22175%22%20cy%3D%2262%22%20r%3D%2225%22%20opacity%3D%22.25%22%2F%3E%3Cpath%20d%3D%22m201%2088%2028%2028%22%20stroke-width%3D%229%22%2F%3E%3Ccircle%20cx%3D%22234%22%20cy%3D%2233%22%20r%3D%223%22%20fill%3D%22white%22%20stroke%3D%22none%22%20opacity%3D%22.35%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat;
  opacity: .18;
  pointer-events: none;
}
body dialog.header-search__panel[data-search-style="brand-v2"] .header-search__brand { display: flex; align-items: center; margin-bottom: 12px; }
body dialog.header-search__panel[data-search-style="brand-v2"] .header-search__brand .dafa-brand-svg { color: inherit; gap: 8px; }
body dialog.header-search__panel[data-search-style="brand-v2"] .header-search__brand .dafa-brand-svg__svg { flex-basis: 30px; width: 30px; height: 30px; }
body dialog.header-search__panel[data-search-style="brand-v2"] .header-search__brand .dafa-brand-svg__coin-fill { fill: var(--search-logo-fill); }
body dialog.header-search__panel[data-search-style="brand-v2"] .header-search__brand .dafa-brand-svg__dollar { stroke: var(--search-logo-stroke); animation: none; }
body dialog.header-search__panel[data-search-style="brand-v2"] .header-search__brand .dafa-brand-svg__copy { display: flex; transform: none; animation: none; }
body dialog.header-search__panel[data-search-style="brand-v2"] .header-search__brand .dafa-brand-svg__name { font-size: 20px; line-height: 1.25; color: inherit; }
body dialog.header-search__panel[data-search-style="brand-v2"] .header-search__brand .dafa-brand-svg__tagline { display: none; }
body dialog.header-search__panel[data-search-style="brand-v2"] .header-search__brand img { display: block; width: auto; max-width: 170px; max-height: 34px; }
body dialog.header-search__panel[data-search-style="brand-v2"] .header-search__heading { margin: 0; }
body dialog.header-search__panel[data-search-style="brand-v2"] .header-search__title { display: block; color: inherit; font-size: 20px; font-weight: 600; line-height: 1.5; letter-spacing: 0; }
body dialog.header-search__panel[data-search-style="brand-v2"] .header-search__close { position: absolute; top: 12px; right: 12px; color: inherit; border-radius: 10px; background: transparent; }
body dialog.header-search__panel[data-search-style="brand-v2"] .header-search__close:is(:hover,:focus-visible) { color: inherit; background: color-mix(in srgb, var(--search-brand-ink) 13%, transparent); }
body dialog.header-search__panel[data-search-style="brand-v2"] .header-search__close:focus-visible { outline-color: var(--search-brand-ink); }
body dialog.header-search__panel[data-search-style="brand-v2"] .scope-search--modal::before { background: var(--dafa-surface); border-color: color-mix(in srgb, var(--dafa-accent) 26%, var(--dafa-border)); border-radius: 10px; }
body dialog.header-search__panel[data-search-style="brand-v2"] .scope-search--modal:has(.scope-search__field:focus-visible)::before { border-color: var(--dafa-accent); box-shadow: none; }
body dialog.header-search__panel[data-search-style="brand-v2"] .scope-search__field { min-height: 54px; padding-inline: 14px; font-size: 16px; caret-color: var(--dafa-accent); }
body dialog.header-search__panel[data-search-style="brand-v2"] .scope-search__submit { border-radius: 8px; }
body dialog.header-search__panel[data-search-style="brand-v2"] .quick-search { margin-top: 20px; padding-right: 6px; scrollbar-width: thin; scrollbar-color: var(--dafa-border) transparent; }
body dialog.header-search__panel[data-search-style="brand-v2"] .quick-search__topics { gap: 6px; margin-bottom: 20px; }
body dialog.header-search__panel[data-search-style="brand-v2"] .quick-search__topics > span,
body dialog.header-search__panel[data-search-style="brand-v2"] .quick-search__section-label,
body dialog.header-search__panel[data-search-style="brand-v2"] .quick-search__results h3 { font-weight: 600; letter-spacing: 0; }
body dialog.header-search__panel[data-search-style="brand-v2"] .quick-search__topics button { min-height: 34px; padding: 6px 11px; border-radius: 7px; border-color: transparent; background: var(--search-soft); font-size: 12px; }
body dialog.header-search__panel[data-search-style="brand-v2"] .quick-search__topics button:is(:hover,.is-selected) { border-color: color-mix(in srgb, var(--dafa-accent) 24%, var(--dafa-surface)); background: color-mix(in srgb, var(--dafa-accent) 8%, var(--dafa-surface)); color: var(--dafa-accent); }
body dialog.header-search__panel[data-search-style="brand-v2"] .quick-search .search-result { min-height: 66px; margin: 0; padding: 12px 48px 12px 10px; border-radius: 8px; }
body dialog.header-search__panel[data-search-style="brand-v2"] .quick-search .search-result + .search-result { border-top: 1px solid var(--search-line); }
body dialog.header-search__panel[data-search-style="brand-v2"] .quick-search .search-result strong { font-size: 14px; line-height: 1.6; font-weight: 500; }
body dialog.header-search__panel[data-search-style="brand-v2"] .search-result__arrow { display: grid; place-items: center; right: 10px; width: 28px; height: 28px; border-radius: 50%; font-size: 0; color: var(--dafa-text-soft); background: var(--search-soft); transition: color 180ms ease, background-color 180ms ease, transform 180ms ease; }
body dialog.header-search__panel[data-search-style="brand-v2"] .search-result__arrow::before { content: ""; position: absolute; top: 50%; left: 50%; width: 6px; height: 6px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: translate(-65%,-50%) rotate(45deg); }
body dialog.header-search__panel[data-search-style="brand-v2"] .quick-search .search-result:is(:hover,:focus-visible) .search-result__arrow { transform: translate(2px,-50%); color: var(--dafa-accent); background: color-mix(in srgb, var(--dafa-accent) 9%, var(--dafa-surface)); }
body dialog.header-search__panel[data-search-style="brand-v2"] .quick-search__actions { gap: 6px 16px; margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--search-line); }
body dialog.header-search__panel[data-search-style="brand-v2"] .quick-search__actions a,
body dialog.header-search__panel[data-search-style="brand-v2"] .quick-search__actions button { color: var(--dafa-text); }
body dialog.header-search__panel[data-search-style="brand-v2"] .header-search__hint { margin-top: 12px; padding-top: 10px; gap: 8px 16px; }
body dialog.header-search__panel[data-search-style="brand-v2"] .header-search__hint > span { white-space: nowrap; }
body dialog.header-search__panel[data-search-style="brand-v2"] ::selection { background: color-mix(in srgb, var(--dafa-accent) 20%, var(--dafa-surface)); color: var(--dafa-text); }
@media (max-width: 640px) {
  body dialog.header-search__panel[data-search-style="brand-v2"] .header-search__hint .header-search__open { display: none; }
  body dialog.header-search__panel[data-search-style="brand-v2"] { padding: 0 18px 12px; width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
  body dialog.header-search__panel[data-search-style="brand-v2"] .header-search__masthead { margin: 0 -18px 16px; padding: 20px 58px 18px 18px; }
  body dialog.header-search__panel[data-search-style="brand-v2"] .header-search__masthead::before { right: 0; width: 160px; opacity: .10; }
  body dialog.header-search__panel[data-search-style="brand-v2"] .header-search__brand { margin-bottom: 10px; }
  body dialog.header-search__panel[data-search-style="brand-v2"] .header-search__title { font-size: 17px; }
  body dialog.header-search__panel[data-search-style="brand-v2"] .header-search__brand .dafa-brand-svg__name { font-size: 19px; }
  body dialog.header-search__panel[data-search-style="brand-v2"] .quick-search { margin-top: 18px; }
  body dialog.header-search__panel[data-search-style="brand-v2"] .quick-search__topics button { min-height: 44px; padding-inline: 10px; }
  body dialog.header-search__panel[data-search-style="brand-v2"] .scope-search__field { padding-inline: 10px; }
  body dialog.header-search__panel[data-search-style="brand-v2"] .quick-search .search-result { padding-left: 4px; padding-right: 36px; }
  body dialog.header-search__panel[data-search-style="brand-v2"] .search-result__arrow { right: 2px; width: 26px; height: 26px; }
  body dialog.header-search__panel[data-search-style="brand-v2"] .quick-search__actions { gap: 4px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  body dialog.header-search__panel[data-search-style="brand-v2"] .search-result__arrow { transition: none; }
}

