/* Source: home-discovery.css */
/* Scoped homepage discovery. Stable tracks avoid layout jumps between titles. */
.editorial-home .discovery-carousel { min-width:0; display:block; align-self:start; }
.editorial-home .discovery-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:16px; font-size:12px; color:var(--dafa-text-soft); }
.editorial-home .discovery-heading strong { font-size:13px; font-weight:650; color:var(--dafa-accent); }
.editorial-home .discovery-controls { display:flex; align-items:center; gap:4px; flex-shrink:0; }
.editorial-home .discovery-controls[hidden], .editorial-home .discovery-interests[hidden] { display:none; }
.editorial-home .discovery-controls button { display:inline-flex; justify-content:center; align-items:center; width:auto; min-width:28px; min-height:30px; padding:3px 6px; border:0; background:transparent; color:var(--dafa-text-soft); font:inherit; font-size:12px; border-radius:4px; cursor:pointer; }
.editorial-home .discovery-controls button:hover { background:var(--dafa-surface-muted); color:var(--dafa-accent); }
.editorial-home .discovery-count { font-size:11px; font-variant-numeric:tabular-nums; min-width:32px; text-align:center; }
.editorial-home .discovery-track { display:grid; min-width:0; touch-action:pan-y; }
.editorial-home .discovery-track > [data-discovery-slide] { grid-area:1/1; min-width:0; }
.editorial-home [data-discovery-ready] .discovery-track > [hidden] { display:block!important; visibility:hidden; pointer-events:none; }
.editorial-home .discovery-slide h3 { margin:0 0 14px; font-size:19px; line-height:1.6; font-weight:650; }
.editorial-home .discovery-slide h3 a { color:var(--dafa-text); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.editorial-home .discovery-slide h3 a:hover { color:var(--dafa-accent); }
.editorial-home .discovery-carousel--files h3 { min-height:3.2em; }
.editorial-home .discovery-reason { margin:0 0 10px; font-size:11px; color:var(--dafa-accent); }
.editorial-home .discovery-card__image { display:block; }
.editorial-home .discovery-news-grid { display:grid; grid-template-columns:1.05fr 1fr; gap:48px; padding-top:24px; }
.editorial-home .discovery-carousel--news { padding:24px; background:var(--dafa-surface); border-radius:8px; }
.editorial-home .editorial-section--news .editorial-items { display:block; }
.editorial-home .editorial-section--news .editorial-item:first-child { padding:18px 0 22px; background:transparent; border-radius:0; border-bottom:1px solid var(--dafa-border); }
.editorial-home .discovery-latest { min-width:0; }
.editorial-home .discovery-latest__title { margin:0; font-size:13px; font-weight:650; color:var(--dafa-text-soft); }
.editorial-home .discovery-suggestions { align-items:center; flex-wrap:nowrap; gap:10px; }
.editorial-home .discovery-suggestions > span { flex-shrink:0; }
.editorial-home .discovery-suggestions .discovery-track { flex:1; }
.editorial-home .discovery-suggestions .discovery-track a { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.editorial-home .discovery-suggestions .discovery-count { display:none; }
.editorial-home .discovery-questions { margin:20px 0 16px; }
.editorial-home .discovery-questions .discovery-heading { gap:4px; margin-bottom:6px; font-size:11px; }
.editorial-home .discovery-questions button.editorial-ai__example { display:block; margin:0; min-height:92px; }
.editorial-home .editorial-ai__example > span:first-child { display:inline; margin:0; font-size:inherit; color:inherit; }
.editorial-home .discovery-interests { margin-top:10px; color:var(--dafa-text-soft); font-size:12px; }
.editorial-home .discovery-interests summary { cursor:pointer; width:fit-content; }
.editorial-home .discovery-interests p { margin:12px 0; line-height:1.7; }
.editorial-home .discovery-topics { display:flex; flex-wrap:wrap; gap:8px; }
.editorial-home .discovery-topics button { border:1px solid var(--dafa-border); background:transparent; color:var(--dafa-text-soft); padding:6px 10px; border-radius:4px; font:inherit; cursor:pointer; }
.editorial-home .discovery-topics button[aria-pressed=true] { border-color:var(--dafa-accent); color:var(--dafa-accent); background:color-mix(in srgb,var(--dafa-accent) 6%,var(--dafa-surface)); }
@media (prefers-reduced-motion:no-preference) {
 .editorial-home .discovery-track > .is-active { animation:dafa-discovery-enter .35s ease-out; }
 @keyframes dafa-discovery-enter { from { opacity:.35; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }
}
@media(max-width:1023px) {
 .editorial-home .discovery-news-grid { gap:24px; }
 .editorial-home .discovery-carousel--news { padding:20px; }
}
@media(max-width:767px) {
 .editorial-home .discovery-carousel--files { display:block; margin-top:8px; padding:20px; }
 .editorial-home .discovery-carousel--files .editorial-feature__image { height:150px; margin-bottom:16px; }
 .editorial-home .discovery-slide h3 { font-size:17px; }
 .editorial-home .discovery-news-grid { grid-template-columns:minmax(0,1fr); gap:24px; }
 .editorial-home .discovery-carousel--news { padding:20px 16px; }
 .editorial-home .discovery-controls button { min-height:36px; min-width:30px; }
 .editorial-home .discovery-suggestions { gap:6px; }
 .editorial-home .discovery-suggestions .discovery-controls { gap:0; }
 .editorial-home .discovery-topics button { min-height:36px; }
}

/* Source: recommendations.css */
.recommend-profile { max-width:900px; color:var(--dafa-text); }
.recommend-profile h2 { margin:0 0 12px; font-size:24px; line-height:1.5; }
.recommend-profile .recommend-intro { margin:0 0 28px; color:var(--dafa-text-soft); line-height:1.8; }
.recommend-form fieldset { margin:0 0 24px; padding:0; border:0; }
.recommend-form legend { padding:0; margin-bottom:14px; font-weight:650; font-size:15px; }
.recommend-choices { display:flex; flex-wrap:wrap; gap:10px; }
.recommend-choice { position:relative; cursor:pointer; }
.recommend-choice input { position:absolute; opacity:0; width:1px; height:1px; }
.recommend-choice span { display:block; padding:10px 16px; border:1px solid var(--dafa-border); border-radius:6px; font-size:14px; background:var(--dafa-surface); }
.recommend-choice input:checked + span { border-color:var(--dafa-accent); color:var(--dafa-accent); background:color-mix(in srgb,var(--dafa-accent) 7%,var(--dafa-surface)); }
.recommend-choice input:checked + span::after { content:' ✓'; }
.recommend-choice input:focus-visible + span { outline:2px solid var(--dafa-accent); outline-offset:3px; }
.recommend-choice input:disabled + span { opacity:.5; cursor:default; }
.recommend-learning { margin-top:30px; padding:20px; background:var(--dafa-surface-muted); border-radius:6px; }
.recommend-learning label { display:flex; gap:12px; align-items:flex-start; cursor:pointer; }
.recommend-learning input { flex-shrink:0; margin-top:5px; accent-color:var(--dafa-accent); width:16px; height:16px; }
.recommend-learning strong { display:block; font-size:15px; }
.recommend-learning small { display:block; margin-top:6px; color:var(--dafa-text-soft); line-height:1.8; font-size:13px; }
.recommend-privacy { color:var(--dafa-text-soft); font-size:12px; line-height:1.9; margin:14px 0 24px; }
.recommend-actions { display:flex; align-items:center; flex-wrap:wrap; gap:20px; }
.recommend-actions a { font-size:13px; }
.recommend-insights p { color:var(--dafa-text-soft); font-size:13px; line-height:1.8; margin:7px 0 0; }
.recommend-insights { margin-top:30px; }
.recommend-insights h3 { font-size:15px; margin:0 0 12px; }
.recommend-learned { display:flex; flex-wrap:wrap; gap:8px; }
.recommend-learned span { padding:5px 10px; background:var(--dafa-surface-muted); border-radius:4px; font-size:12px; }
.recommend-explain { margin-top:28px; padding-top:20px; border-top:1px solid var(--dafa-border); font-size:13px; color:var(--dafa-text-soft); }
.recommend-explain summary { cursor:pointer; }
.recommend-explain p { line-height:1.9; }
.recommend-notice { padding:12px 16px; border-left:3px solid var(--dafa-accent); background:var(--dafa-surface-muted); font-size:13px; }
.editorial-home .recommend-home-link { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:12px; font-size:12px; color:var(--dafa-text-soft); }
.editorial-home .recommend-home-link a { color:var(--dafa-accent); }
.editorial-home .recommend-card-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:12px; }
.editorial-home .recommend-card-footer button { padding:3px 0; font:inherit; font-size:11px; border:0; background:none; color:var(--dafa-text-soft); cursor:pointer; }
.editorial-home .recommend-card-footer button:hover { color:var(--dafa-accent); }
.editorial-home .recommend-empty { padding:24px 0; color:var(--dafa-text-soft); font-size:13px; }
@media(max-width:767px) {
 .recommend-profile h2 { font-size:21px; }
 .recommend-choice span { padding:9px 12px; font-size:13px; }
 .recommend-choices { gap:8px; }
 .recommend-learning { padding:16px; }
 .recommend-actions .button { min-height:44px; }
}

/* 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))); }

