/* command.css — WP-COMMAND (round 2): the action palette (verbs, syntax-coloured field, ghost completion, preview pane),
   the refreshed start menu (search-first, reorderable pinned grid, All apps page, Recent refs) and the keyboard-shortcut
   overlay. Shell namespace (.w2-*); tokens only; light + dark through the tokens; reduced motion honoured. Loaded after
   shell.css, so it may extend the palette and start-menu blocks shell.css defines. */

/* ── palette: frame ──────────────────────────────────────────────────────────────────────── */
.w2-palette.w2-cmd { width: min(660px, calc(100vw - 32px)); max-height: min(560px, 72vh); }
.w2-palette.w2-cmd.is-wide { width: min(960px, calc(100vw - 48px)); height: min(560px, 74vh); max-height: none; }
.w2-palette-scrim:has(.w2-cmd.is-wide) { padding-top: max(56px, 11vh); }
.w2-cmd .w2-palette__row { gap: 12px; height: 58px; padding: 0 14px 0 14px; }
.w2-cmd-glyph {
  display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: var(--r-3);
  color: var(--accent); background: transparent; transition: background-color var(--dur-fast), color var(--dur-fast), transform var(--dur-base) var(--ease-spring);
}
.w2-cmd-glyph.is-verb { background: var(--accent-weak); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent), transparent 72%); transform: rotate(-4deg); }
.w2-cmd-mode {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; flex: none; border-radius: var(--r-pill);
  font-size: var(--fs-2xs); font-weight: var(--fw-semibold); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase;
  color: var(--accent); background: var(--accent-weak); border: 1px solid color-mix(in srgb, var(--accent), transparent 70%);
  animation: w2-cmd-pop var(--dur-base) var(--ease-spring);
}
@keyframes w2-cmd-pop { from { opacity: 0; transform: scale(.85); } }
.w2-cmd .w2-palette__busy { display: grid; place-items: center; }
.w2-cmd .w2-palette__busy[hidden] { display: none; }

/* the field: a transparent input over a syntax-coloured mirror (same metrics: colour and backgrounds only) */
.w2-cmd-field { position: relative; flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; }
.w2-cmd-mirror, .w2-cmd-input {
  font-family: var(--font-ui); font-size: var(--fs-lg); font-weight: var(--fw-regular); letter-spacing: normal; font-kerning: none;
  font-variant-ligatures: none; text-transform: none; word-spacing: normal;
}
.w2-cmd-mirror {
  position: absolute; inset: 0; display: flex; align-items: center; white-space: pre; overflow: hidden; pointer-events: none;
  color: var(--text-1); padding: 0; margin: 0;
}
.w2-cmd-mirror__run { white-space: pre; }
.w2-cmd-input.w2-palette__input { position: relative; z-index: 1; padding: 0; margin: 0; color: transparent; caret-color: var(--accent); }
.w2-cmd-input::selection { color: transparent; background: var(--selection); }
.w2-cmd-field.is-overflow .w2-cmd-input { color: var(--text-1); }
.w2-cmd-field.is-overflow .w2-cmd-mirror { visibility: hidden; }
.w2-cmd-syn { border-radius: 4px; }
.w2-cmd-syn--verb { color: var(--accent-strong); background: var(--accent-weak); box-shadow: 0 0 0 2px var(--accent-weak); }
.w2-cmd-syn--scope { color: var(--chart-3); background: color-mix(in srgb, var(--chart-3), transparent 86%); box-shadow: 0 0 0 2px color-mix(in srgb, var(--chart-3), transparent 86%); }
.w2-cmd-syn--date { color: var(--chart-2); background: color-mix(in srgb, var(--chart-2), transparent 86%); box-shadow: 0 0 0 2px color-mix(in srgb, var(--chart-2), transparent 86%); }
.w2-cmd-syn--path { color: var(--chart-5); background: color-mix(in srgb, var(--chart-5), transparent 84%); box-shadow: 0 0 0 2px color-mix(in srgb, var(--chart-5), transparent 84%); }
.w2-cmd-syn--regex { color: var(--chart-4); }
.w2-cmd-syn--token { color: var(--accent-strong); text-decoration: underline dotted color-mix(in srgb, var(--accent), transparent 40%); text-underline-offset: 4px; }
.w2-cmd-ghost { color: var(--text-4); }

/* ── palette: body = results | preview ──────────────────────────────────────────────────── */
.w2-cmd-body { display: flex; flex: 1; min-height: 0; }
.w2-cmd-list { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; padding: 6px 8px 8px; scroll-padding: 28px 0 8px; }
.w2-cmd:not(.is-wide) .w2-cmd-list { max-height: calc(min(560px, 72vh) - 58px - 34px); }
.w2-cmd-preview {
  display: none; width: 348px; flex: none; min-height: 0; overflow-y: auto; padding: 16px 18px 14px;
  border-left: 1px solid var(--line-1); background: linear-gradient(180deg, var(--surface-sunken), transparent 70%);
}
.w2-cmd.is-wide .w2-cmd-preview { display: block; }
.w2-cmd .w2-palette__foot { gap: 14px; }
.w2-cmd .w2-palette__foot .ui-kbd__key { min-width: 18px; height: 18px; }

/* result rows (shared with the start menu) */
.w2-results__item { transition: background-color var(--dur-fast); }
.w2-results__item.is-selected { background: var(--accent-weak); box-shadow: inset 2px 0 0 var(--accent); }
.w2-results__item.is-disabled .w2-results__title { color: var(--text-2); }
.w2-results__item.is-disabled .w2-results__icon { background: transparent; color: var(--text-3); }
.w2-results__badge {
  flex: none; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1px 7px; border-radius: var(--r-pill);
  font: var(--fw-semibold) var(--fs-2xs)/1.5 var(--font-mono); color: var(--text-2); background: var(--surface-sunken); border: 1px solid var(--line-2);
}
.w2-results__item.is-selected .w2-results__badge { color: var(--accent-strong); border-color: color-mix(in srgb, var(--accent), transparent 60%); }
.w2-results__item.is-fill .w2-results__enter .ui-kbd__key { height: 17px; min-width: 26px; font-size: 9.5px; }
.w2-results__note { padding: 6px 10px 10px 44px; font-size: var(--fs-sm); color: var(--text-3); }
.w2-results__groupspin { display: inline-grid; margin-left: 2px; }
.w2-results__skel { display: flex; flex-direction: column; gap: 7px; padding: 8px 10px 10px 44px; }
.w2-results__skel > span { display: block; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--surface-sunken) 0%, color-mix(in srgb, var(--surface-sunken), var(--text-1) 7%) 50%, var(--surface-sunken) 100%); background-size: 200% 100%; animation: ui-shimmer 1.6s linear infinite; }
.w2-results__skel > span:first-child { width: 58%; }
.w2-results__skel > span:last-child { width: 36%; opacity: .7; }
.w2-results .w2-match { background: transparent; color: var(--accent-strong); font-weight: var(--fw-semibold); }

.w2-cmd.is-nudge { animation: w2-cmd-nudge 280ms var(--ease-out); }
@keyframes w2-cmd-nudge { 20% { transform: translateX(-5px); } 45% { transform: translateX(4px); } 70% { transform: translateX(-2px); } }

/* ── preview pane ───────────────────────────────────────────────────────────────────────── */
.w2-cmd-pv__body { display: flex; flex-direction: column; gap: 12px; min-width: 0; animation: w2-cmd-fade var(--dur-base) var(--ease-out); }
@keyframes w2-cmd-fade { from { opacity: 0; transform: translateY(3px); } }
.w2-cmd-pv__stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.w2-cmd-pv__slot { min-width: 0; }
.w2-cmd-pv__head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.w2-cmd-pv__glyph { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: var(--r-4); color: var(--text-2); background: var(--surface-3); border: 1px solid var(--line-2); box-shadow: var(--shadow-1); }
.w2-cmd-pv__glyph.is-accent { color: var(--accent); background: var(--accent-weak); border-color: color-mix(in srgb, var(--accent), transparent 70%); }
.w2-cmd-pv__glyph.is-folder { color: var(--chart-1); }
.w2-cmd-pv__titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.w2-cmd-pv__title { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: var(--fw-semibold); color: var(--text-1); line-height: var(--lh-tight); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.w2-cmd-pv__title--big { font-size: var(--fs-2xl); }
.w2-cmd-pv__sub { font-size: var(--fs-xs); color: var(--text-3); overflow-wrap: anywhere; }
.w2-cmd-pv__hero { display: flex; align-items: center; gap: 14px; }
.w2-cmd-pv__desc { margin: 0; font-size: var(--fs-sm); line-height: var(--lh-ui); color: var(--text-2); }
.w2-cmd-pv__sec { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.w2-cmd-pv__eyebrow { display: flex; align-items: center; gap: 8px; }
.w2-cmd-pv__eyebrow::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }
.w2-cmd-pv__note { display: flex; align-items: flex-start; gap: 7px; font-size: var(--fs-xs); color: var(--text-3); line-height: var(--lh-ui); }
.w2-cmd-pv__note .ui-icon { flex: none; margin-top: 2px; }
.w2-cmd-pv__err { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r-3); font-size: var(--fs-sm); color: var(--text-2); background: var(--surface-sunken); border: 1px dashed var(--line-2); }
.w2-cmd-pv__loading { padding-top: 4px; }
.w2-cmd-pv__rows { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: var(--fs-sm); }
.w2-cmd-pv__row { display: contents; }
.w2-cmd-pv__row dt { color: var(--text-3); font-size: var(--fs-xs); padding-top: 1px; }
.w2-cmd-pv__row dd { margin: 0; color: var(--text-1); min-width: 0; overflow-wrap: anywhere; }
.w2-cmd-pv__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: var(--fs-2xs); color: var(--text-3); font-variant-numeric: tabular-nums; }
.w2-cmd-pv__meta--foot { padding-top: 2px; }
.w2-cmd-pv__src { font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--text-2); background: var(--surface-sunken); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
.w2-cmd-pv__flags { display: flex; flex-wrap: wrap; gap: 4px; }
.w2-cmd-pv__strip { align-self: flex-start; margin-top: 2px; }
.w2-cmd-pv .ui-banner, .w2-cmd-preview .ui-banner { margin: 0; }

/* token */
.w2-cmd-pv__head--token { align-items: center; }
.w2-cmd-pv__tok {
  flex: none; padding: 6px 10px; border-radius: var(--r-3); font: var(--fw-semibold) var(--fs-lg)/1 var(--font-mono);
  color: var(--accent-strong); background: var(--accent-weak); border: 1px solid color-mix(in srgb, var(--accent), transparent 64%);
  box-shadow: inset 0 1px 0 var(--w2-highlight);
}
.w2-cmd-pv__tok.is-i { color: var(--chart-3); background: color-mix(in srgb, var(--chart-3), transparent 86%); border-color: color-mix(in srgb, var(--chart-3), transparent 64%); }
.w2-cmd-pv__tok.is-a { color: var(--chart-2); background: color-mix(in srgb, var(--chart-2), transparent 86%); border-color: color-mix(in srgb, var(--chart-2), transparent 64%); }
.w2-cmd-pv__tok.is-b, .w2-cmd-pv__tok.is-tr { color: var(--chart-6); background: color-mix(in srgb, var(--chart-6), transparent 86%); border-color: color-mix(in srgb, var(--chart-6), transparent 64%); }
.w2-cmd-pv__tok.is-u { color: var(--chart-5); background: color-mix(in srgb, var(--chart-5), transparent 86%); border-color: color-mix(in srgb, var(--chart-5), transparent 64%); }
.w2-cmd-pv__tok.is-rule { color: var(--chart-4); background: color-mix(in srgb, var(--chart-4), transparent 86%); border-color: color-mix(in srgb, var(--chart-4), transparent 64%); font-size: var(--fs-md); }
.w2-cmd-pv__pin { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: var(--r-3); background: var(--surface-content); border: 1px solid var(--line-1); }
.w2-cmd-pv__summary { margin: 0; font-family: var(--font-serif); font-size: var(--fs-md); line-height: 1.5; color: var(--text-1); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.w2-cmd-pv__derived { display: flex; align-items: center; gap: 5px; font-size: var(--fs-2xs); color: var(--text-4); }
.w2-cmd-pv__holders { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; counter-reset: h; }
.w2-cmd-pv__holder { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 8px 10px 8px 12px; border-radius: var(--r-2); border-left: 2px solid var(--line-2); }
.w2-cmd-pv__holder:first-child { border-left-color: var(--accent); background: color-mix(in srgb, var(--accent-weak), transparent 55%); }
.w2-cmd-pv__hreg { display: flex; align-items: center; gap: 6px; font-size: var(--fs-2xs); font-weight: var(--fw-semibold); letter-spacing: .02em; color: var(--text-2); }
.w2-cmd-pv__hreg > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w2-cmd-pv__htitle { font-size: var(--fs-sm); color: var(--text-1); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }

/* file */
.w2-cmd-pv__code {
  font: var(--fs-2xs)/1.62 var(--font-mono); color: var(--text-2); background: var(--surface-content); border: 1px solid var(--line-1);
  border-radius: var(--r-3); padding: 8px 0; overflow: hidden; position: relative;
  -webkit-mask-image: linear-gradient(180deg, var(--text-1) 78%, transparent); mask-image: linear-gradient(180deg, var(--text-1) 78%, transparent);
}
.w2-cmd-pv__line { display: flex; gap: 10px; padding: 0 10px 0 0; min-width: 0; }
.w2-cmd-pv__line.is-empty { padding-left: 12px; color: var(--text-3); font-family: var(--font-ui); }
.w2-cmd-pv__ln { flex: none; width: 30px; text-align: right; color: var(--text-4); user-select: none; font-variant-numeric: tabular-nums; }
.w2-cmd-pv__lt { flex: 1; min-width: 0; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.w2-cmd-pv__entries { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.w2-cmd-pv__entry { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 6px; border-radius: var(--r-2); font-size: var(--fs-sm); color: var(--text-1); }
.w2-cmd-pv__entry:nth-child(odd) { background: color-mix(in srgb, var(--surface-sunken), transparent 30%); }
.w2-cmd-pv__entry > span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w2-cmd-pv__entry .ui-icon { color: var(--text-3); flex: none; }
.w2-cmd-pv__entry.is-locked { color: var(--text-3); }
.w2-cmd-pv__esize { flex: none; font-size: var(--fs-2xs); color: var(--text-3); font-variant-numeric: tabular-nums; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w2-cmd-pv__excerpt { margin: 0; font-family: var(--font-serif); font-size: var(--fs-md); line-height: 1.55; color: var(--text-1); display: -webkit-box; -webkit-line-clamp: 9; -webkit-box-orient: vertical; overflow: hidden; }

/* app · command · window · verbs */
.w2-cmd-pv__cmds { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.w2-cmd-pv__cmds li { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--text-2); }
.w2-cmd-pv__cmds li > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w2-cmd-pv__cmds li .ui-icon { color: var(--text-3); flex: none; }
.w2-cmd-pv__kbd { display: flex; }
.w2-cmd-pv__kbd .ui-kbd__key { min-width: 26px; height: 26px; font-size: var(--fs-sm); }
.w2-cmd-pv__thumb { width: 296px; height: 184px; max-width: 100%; border-radius: var(--r-3); overflow: hidden; position: relative; border: 1px solid var(--line-2); box-shadow: var(--shadow-2); }
.w2-cmd-pv__thumb--plate { display: grid; place-items: center; background: var(--surface-content); }
.w2-cmd-pv__usage code { display: block; padding: 10px 12px; border-radius: var(--r-3); font: var(--fs-sm)/1.5 var(--font-mono); color: var(--accent-strong); background: var(--surface-content); border: 1px solid var(--line-1); overflow-wrap: anywhere; }
.w2-cmd-pv__examples { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.w2-cmd-pv__examples code { font: var(--fs-xs)/1.4 var(--font-mono); color: var(--text-2); padding: 3px 8px; border-radius: var(--r-2); background: var(--surface-sunken); display: inline-block; overflow-wrap: anywhere; }
.w2-cmd-pv__quote { margin: 0; padding: 10px 14px; border-left: 3px solid var(--accent); border-radius: 0 var(--r-3) var(--r-3) 0; font-family: var(--font-serif); font-size: var(--fs-lg); line-height: 1.45; color: var(--text-1); background: var(--surface-content); overflow-wrap: anywhere; }

/* diff pair */
.w2-cmd-pv__pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.w2-cmd-pv__side { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "ver name" "ver date"; column-gap: 12px; row-gap: 2px; align-items: center; min-width: 0; padding: 10px 12px; border-radius: var(--r-3); background: var(--surface-content); border: 1px solid var(--line-1); }
.w2-cmd-pv__side .w2-cmd-pv__ver { grid-area: ver; min-width: 40px; }
.w2-cmd-pv__side .w2-cmd-pv__vname { grid-area: name; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w2-cmd-pv__side .w2-cmd-pv__vdate { grid-area: date; }
.w2-cmd-pv__side.is-old { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--danger), transparent 45%); }
.w2-cmd-pv__side.is-new { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--ok), transparent 35%); }
.w2-cmd-pv__ver { font: var(--fw-semibold) var(--fs-lg)/1 var(--font-display); color: var(--text-1); }
.w2-cmd-pv__vname { font: var(--fs-2xs)/1.35 var(--font-mono); color: var(--text-2); overflow-wrap: anywhere; }
.w2-cmd-pv__vdate { font-size: var(--fs-2xs); color: var(--text-3); font-variant-numeric: tabular-nums; }
.w2-cmd-pv__arrow { display: grid; place-items: center; color: var(--text-3); transform: rotate(90deg); height: 16px; }

/* task · note · theme */
.w2-cmd-pv__card { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: var(--r-4); background: var(--surface-content); border: 1px solid var(--line-2); box-shadow: var(--shadow-1); }
.w2-cmd-pv__cardtitle { display: flex; align-items: flex-start; gap: 10px; font-size: var(--fs-md); font-weight: var(--fw-medium); color: var(--text-1); line-height: 1.4; overflow-wrap: anywhere; }
.w2-cmd-pv__check { flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 5px; border: 1.5px solid var(--line-3); }
.w2-cmd-pv__chips { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 26px; }
.w2-cmd-pv__chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--r-pill); font-size: var(--fs-2xs); font-weight: var(--fw-medium); color: var(--chart-2); background: color-mix(in srgb, var(--chart-2), transparent 88%); font-variant-numeric: tabular-nums; }
.w2-cmd-pv__chip.is-soon { color: var(--warn); background: var(--warn-bg); }
.w2-cmd-pv__chip.is-muted { color: var(--text-3); background: var(--surface-sunken); }
.w2-cmd-pv__chip.is-token { color: var(--accent-strong); background: var(--accent-weak); font-family: var(--font-mono); }
.w2-cmd-pv__sticky {
  position: relative; padding: 16px 16px 20px; min-height: 120px; border-radius: 4px 4px 14px 4px; transform: rotate(-1.2deg);
  background: color-mix(in srgb, var(--chart-1), var(--surface-content) 72%); border: 1px solid color-mix(in srgb, var(--chart-1), transparent 60%);
  box-shadow: var(--shadow-2);
}
.w2-cmd-pv__stickytext { font-family: var(--font-serif); font-size: var(--fs-md); line-height: 1.5; color: var(--text-1); white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.w2-cmd-pv__swatch { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--text-2); }
.w2-cmd-pv__swatchdot { width: 34px; height: 34px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 3px var(--surface-content), 0 0 0 1px var(--line-2); }

/* idle */
.w2-cmd-pv__idle { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; color: var(--text-3); }
.w2-cmd-pv__idleart { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; color: var(--accent); background: radial-gradient(circle at 30% 25%, var(--accent-weak), transparent 70%), var(--surface-sunken); border: 1px solid var(--line-2); }
.w2-cmd-pv__idletitle { font-family: var(--font-display); font-size: var(--fs-lg); color: var(--text-2); }
.w2-cmd-pv__idlelist { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.w2-cmd-pv__idlelist code { font: var(--fs-xs)/1.4 var(--font-mono); color: var(--text-2); padding: 3px 8px; border-radius: var(--r-2); background: var(--surface-sunken); }

/* ── start menu refresh ─────────────────────────────────────────────────────────────────── */
.w2-start__search { height: 46px; margin: 18px 18px 4px; }
.w2-start__try { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 18px 6px; min-height: 26px; }
.w2-start__trylabel { font-size: var(--fs-2xs); color: var(--text-3); margin-right: 2px; }
.w2-start__trychip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: var(--r-pill); font: var(--fs-2xs)/1 var(--font-mono); color: var(--text-2); background: var(--surface-sunken); border: 1px solid var(--line-1); transition: border-color var(--dur-fast), color var(--dur-fast), background-color var(--dur-fast); }
.w2-start__trychip:hover, .w2-start__trychip:focus-visible { color: var(--accent-strong); border-color: color-mix(in srgb, var(--accent), transparent 55%); background: var(--accent-weak); }
.w2-start__trychip .ui-icon { color: var(--text-3); }
.w2-start__trychip:hover .ui-icon { color: inherit; }
.w2-start__try[hidden] { display: none; }
.w2-start__left { position: relative; overflow-x: hidden; }
.w2-start__page { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.w2-start__page.is-entering { animation: w2-start-page var(--dur-base) var(--ease-out); }
.w2-start__page.is-entering.is-back { animation-name: w2-start-page-back; }
@keyframes w2-start-page { from { opacity: 0; transform: translateX(18px); } }
@keyframes w2-start-page-back { from { opacity: 0; transform: translateX(-18px); } }
.w2-start__sechead .w2-start__seclink--quiet { color: var(--text-2); background: transparent; border-color: var(--line-2); }
.w2-start__sechead .w2-start__seclink--quiet:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent), transparent 55%); background: var(--accent-weak); }
.w2-start__tiles { position: relative; }
.w2-start__tile { position: relative; touch-action: none; user-select: none; }
.w2-start__tile.is-dragging { z-index: 3; background: var(--surface-3); box-shadow: var(--shadow-3), 0 0 0 1px color-mix(in srgb, var(--accent), transparent 55%); cursor: grabbing; transition: none; }
.w2-start__tile.is-dragging .ui-plate { transform: scale(1.08); }
.w2-start__tiles.is-sorting .w2-start__tile:not(.is-dragging) { pointer-events: none; }
.w2-start__tile.is-moved { animation: w2-start-moved 600ms var(--ease-out); }
@keyframes w2-start-moved { 0% { box-shadow: 0 0 0 2px var(--accent-ring); } 100% { box-shadow: 0 0 0 2px transparent; } }
.w2-start__tilehint { font-size: var(--fs-2xs); color: var(--text-4); padding-left: 6px; }
.w2-start__recentgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 6px; }
.w2-start__recenticon--token { color: var(--accent); background: var(--accent-weak); font: var(--fw-semibold) 9px/1 var(--font-mono); letter-spacing: -.02em; }
.w2-start__recenticon--report { color: var(--chart-3); }
.w2-start__recenticon--question { color: var(--chart-2); }
.w2-start__recenticon--mail { color: var(--chart-6); }   /* round-3 integration: a conversation (Correspondence) */
.w2-start__allhead { display: flex; align-items: center; gap: 8px; }
.w2-start__back { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px 0 5px; border-radius: var(--r-pill); font-size: var(--fs-2xs); font-weight: var(--fw-semibold); color: var(--text-2); border: 1px solid var(--line-2); transition: color var(--dur-fast), border-color var(--dur-fast), background-color var(--dur-fast); }
.w2-start__back:hover, .w2-start__back:focus-visible { color: var(--accent); border-color: color-mix(in srgb, var(--accent), transparent 55%); background: var(--accent-weak); }
.w2-start__count { margin-left: auto; font-size: var(--fs-2xs); color: var(--text-4); font-variant-numeric: tabular-nums; }
.w2-start__windows { display: flex; flex-direction: column; gap: 2px; }
.w2-start__win { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: var(--r-3); text-align: left; min-width: 0; transition: background-color var(--dur-fast); }
.w2-start__win:hover, .w2-start__win:focus-visible { background: var(--w2-hover); }
.w2-start__wintext { display: flex; flex-direction: column; min-width: 0; }
.w2-start__wintitle { font-size: var(--fs-sm); color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w2-start__winmeta { font-size: var(--fs-2xs); color: var(--text-3); }
.w2-start__live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.w2-start .w2-results__item.is-selected { box-shadow: inset 2px 0 0 var(--accent); }

/* ── keyboard-shortcut overlay ──────────────────────────────────────────────────────────── */
.w2-keys-scrim {
  position: fixed; inset: 0; z-index: var(--z-palette); display: flex; justify-content: center; align-items: flex-start;
  padding: max(40px, 8vh) 24px 24px; background: transparent; transition: background-color var(--dur-base);
}
.w2-keys-scrim.is-open { background: color-mix(in srgb, var(--scrim), transparent 30%); }
.w2-keys {
  display: flex; flex-direction: column; width: min(1040px, calc(100vw - 32px)); max-height: calc(100vh - max(40px, 8vh) - 24px);
  border-radius: var(--r-6); overflow: hidden; opacity: 0; transform: translateY(-10px) scale(.985);
  background: var(--surface-2); border: 1px solid var(--line-2);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat)); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  box-shadow: var(--shadow-3), 0 30px 80px color-mix(in srgb, var(--bg-0), transparent 60%), inset 0 1px 0 var(--w2-highlight);
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .w2-keys { background: var(--surface-solid); } }
.w2-keys-scrim.is-open .w2-keys { opacity: 1; transform: none; }
.w2-keys__head { display: flex; align-items: center; gap: 14px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line-1); flex: none; background: linear-gradient(180deg, var(--w2-highlight), transparent); }
.w2-keys__seal { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 13px; color: var(--accent); background: var(--accent-weak); border: 1px solid color-mix(in srgb, var(--accent), transparent 68%); }
.w2-keys__titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.w2-keys__title { margin: 0; font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: var(--fw-semibold); color: var(--text-1); line-height: var(--lh-tight); }
.w2-keys__sub { font-size: var(--fs-xs); color: var(--text-3); }
.w2-keys__search { margin-left: auto; display: flex; align-items: center; gap: 8px; width: min(340px, 42%); height: 38px; padding: 0 12px; border-radius: var(--r-4); background: var(--surface-sunken); border: 1px solid var(--line-2); transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.w2-keys__search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.w2-keys__search .ui-icon { color: var(--text-3); flex: none; }
.w2-keys__input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--text-1); font-size: var(--fs-md); }
.w2-keys__input::placeholder { color: var(--text-3); }
.w2-keys__input::-webkit-search-cancel-button { display: none; }
.w2-keys__status { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 8px 20px; border-bottom: 1px solid var(--line-1); font-size: var(--fs-sm); color: var(--text-2); flex: none; background: var(--surface-sunken); }
.w2-keys__status .ui-icon { color: var(--accent); flex: none; }
.w2-keys__status.is-hit { color: var(--text-1); }
.w2-keys__status.is-miss { color: var(--text-3); }
.w2-keys__body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 20px 20px; columns: 3 290px; column-gap: 16px; }
.w2-keys__sec { break-inside: avoid; display: flex; flex-direction: column; gap: 2px; margin: 0 0 16px; padding: 12px 12px 10px; border-radius: var(--r-4); background: var(--surface-content); border: 1px solid var(--line-1); box-shadow: var(--shadow-1); }
.w2-keys__sechead { display: flex; align-items: center; gap: 7px; padding: 0 4px 6px; }
.w2-keys__sechead .ui-icon { color: var(--accent); }
.w2-keys__sechead .w2-eyebrow { color: var(--text-2); }
.w2-keys__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; padding: 4px 6px; border-radius: var(--r-2); transition: background-color var(--dur-fast); }
.w2-keys__row:hover { background: var(--w2-hover); }
.w2-keys__desc { font-size: var(--fs-sm); color: var(--text-1); line-height: 1.35; min-width: 0; }
.w2-keys__desc .w2-match { background: transparent; color: var(--accent-strong); font-weight: var(--fw-semibold); }
.w2-keys__row .ui-kbd { flex: none; flex-wrap: wrap; justify-content: flex-end; max-width: 58%; row-gap: 3px; }
.w2-keys__row.is-hit { background: var(--accent-weak); box-shadow: inset 2px 0 0 var(--accent); animation: w2-keys-hit 900ms var(--ease-out); }
.w2-keys__row.is-hit .ui-kbd__key { color: var(--accent-strong); border-color: color-mix(in srgb, var(--accent), transparent 50%); }
@keyframes w2-keys-hit { 0% { box-shadow: inset 2px 0 0 var(--accent), 0 0 0 3px var(--accent-ring); } }
.w2-keys__verb { font: var(--fs-xs)/1.4 var(--font-mono); color: var(--accent-strong); }
.w2-keys__empty { column-span: all; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 48px 16px; color: var(--text-3); text-align: center; }
.w2-keys__foot { display: flex; align-items: center; gap: 16px; padding: 10px 20px; border-top: 1px solid var(--line-1); font-size: var(--fs-2xs); color: var(--text-3); flex: none; background: var(--surface-sunken); }
.w2-keys__foot > span { display: inline-flex; align-items: center; gap: 5px; }
.w2-keys__foot .ui-btn { margin-left: auto; }

@media (max-width: 1100px) { .w2-keys__body { columns: 2 280px; } }
@media (max-width: 899px) {
  .w2-palette.w2-cmd.is-wide { height: auto; max-height: 72vh; }
  .w2-keys__head { flex-wrap: wrap; }
  .w2-keys__search { width: 100%; margin-left: 0; }
  .w2-start__recentgrid { grid-template-columns: 1fr; }
}
@media (max-height: 760px) {
  .w2-palette.w2-cmd.is-wide { height: min(520px, calc(100vh - 96px)); }
  .w2-palette-scrim:has(.w2-cmd.is-wide) { padding-top: 40px; }
}

/* reduced motion: nothing moves */
:root[data-motion="reduced"] .w2-cmd-mode, :root[data-motion="reduced"] .w2-cmd-pv__body, :root[data-motion="reduced"] .w2-cmd.is-nudge,
:root[data-motion="reduced"] .w2-start__page.is-entering, :root[data-motion="reduced"] .w2-start__tile.is-moved,
:root[data-motion="reduced"] .w2-keys__row.is-hit, :root[data-motion="reduced"] .w2-results__skel > span { animation: none; }
:root[data-motion="reduced"] .w2-cmd-glyph.is-verb { transform: none; }
:root[data-motion="reduced"] .w2-cmd-pv__sticky { transform: none; }
.w2-cmd-ghost.is-replace { color: var(--text-4); font-style: italic; }
.w2-keys__row.is-verb { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding-top: 6px; padding-bottom: 6px; }
.w2-keys__row.is-verb .w2-keys__desc { color: var(--text-2); font-size: var(--fs-xs); }

/* ── round-2 integration: Up next — today at a glance (tasks · what changed · the draft in progress) ────────────── */
.w2-start__pulse { display: flex; flex-direction: column; gap: 4px; }
.w2-start__pulse[hidden], .w2-start__ptslot[hidden] { display: none; }
.w2-start__ptslot { display: flex; min-width: 0; }
.w2-start__pt { flex: 1; min-width: 0; display: grid; grid-template-columns: 42px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 11px; row-gap: 1px; align-items: center; padding: 6px 8px; border-radius: var(--r-3); text-align: left; background: var(--surface-sunken); border: 1px solid var(--line-1); transition: border-color var(--dur-fast), background-color var(--dur-fast); }
.w2-start__pt:hover { border-color: var(--line-3); }
.w2-start__pt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.w2-start__pthead { grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 42px; height: 34px; border-radius: 9px; color: var(--accent); background: color-mix(in srgb, currentColor, transparent 87%); line-height: 1; }
.w2-start__ptnum { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; }
.w2-start__ptunit { font-size: 8px; font-weight: var(--fw-semibold); letter-spacing: .06em; text-transform: uppercase; margin-top: 2px; }
.w2-start__ptcap { grid-column: 2; font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--text-1); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w2-start__ptmeta { grid-column: 2; font-size: var(--fs-2xs); color: var(--text-3); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.w2-start__pt.is-ok .w2-start__pthead { color: var(--ok); }
.w2-start__pt.is-soon .w2-start__pthead { color: var(--warn); }
.w2-start__pt.is-urgent .w2-start__pthead { color: var(--flag-urgent); }
.w2-start__pt.is-urgent { border-color: color-mix(in srgb, var(--flag-urgent), transparent 60%); }
.w2-start__pt.is-info .w2-start__pthead { color: var(--info); }
.w2-start__pt.is-accent .w2-start__pthead { color: var(--accent); }

/* round-4 integration (Appendix R, WP-DAILY Core request 3): the reminder rows, the what-if box and the Following block
   as classes (they were inline styles) */
.w2-start__reminders { margin-top: 4px; }
/* round-5 integration (ROADMAP round 5, item 12): in high contrast and forced colours the focus ring follows the start
   menu's rounded search field — not the square, borderless input inside it */
:root[data-contrast="high"] .w2-start__input:focus-visible { outline: none; }
:root[data-contrast="high"] .w2-start__search:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; box-shadow: none; }
@media (forced-colors: active) {
  .w2-start__input:focus-visible { outline: none !important; }
  .w2-start__search:focus-within { outline: 3px solid Highlight !important; outline-offset: 2px; }
}
/* round-5 integration: the desk's own records in Up next — the backup notice and the packets waiting to be filed */
.w2-start__records { margin-top: 4px; }
.w2-start__due--record .w2-start__dueunit { letter-spacing: .04em; white-space: nowrap; }
.w2-start__duechunk { white-space: nowrap; }
.w2-start__duerem { color: var(--accent); }
.w2-start__duerem.is-snoozed { color: var(--text-3); }
.w2-start__due--whatif .w2-start__duedays { border-radius: 10px; outline: 1px dashed currentColor; outline-offset: -3px; }
.w2-start__dueeyebrow { color: var(--text-3); font-weight: var(--fw-semibold); font-size: var(--fs-2xs); letter-spacing: .06em; text-transform: uppercase; }
.w2-start__remindme { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding-right: 0; }
.w2-start__turnon { white-space: nowrap; flex: none; }
.w2-start__follow { display: none; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.w2-start__follow.is-shown { display: flex; }
.w2-start__follow[data-full="1"] { margin-bottom: 14px; }
.w2-start__followhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 4px; }
.w2-start__new { color: var(--accent); font-weight: var(--fw-semibold); }
@media (forced-colors: active) {
  .w2-start__due--whatif .w2-start__duedays { outline-color: CanvasText; }
  .w2-start__duerem, .w2-start__new { color: LinkText; }
}

/* round-6 integration (WP-TODAY6 Core request 1, ROADMAP round 6 item 5): Up next compacted — each record row on one
   line (the chip, the name, the short date, a bell when a reminder is set; the full words are the row's tooltip and
   accessible name); what does not fit the menu's height waits behind one quiet "n more" line */
.w2-start__due--line { gap: 10px; padding: 5px 8px 5px 6px; min-height: calc(36px * var(--font-scale, 1)); }
.w2-start__due--line .w2-start__duedays { flex-direction: row; align-items: baseline; justify-content: center; gap: 3px; width: auto; min-width: 50px; height: 24px; padding: 0 7px; border-radius: 7px; }
.w2-start__due--line .w2-start__duenum { font-size: var(--fs-md); line-height: 24px; }
.w2-start__due--line .w2-start__dueunit { font-size: 8px; margin-top: 0; }
.w2-start__due--line .w2-start__duetext { flex: 1 1 auto; flex-direction: row; align-items: baseline; gap: 8px; min-width: 0; }
.w2-start__due--line .w2-start__duename { flex: 1 1 auto; min-width: 0; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: unset; font-size: var(--fs-xs); }
.w2-start__due--line .w2-start__duedate { flex: none; white-space: nowrap; }
.w2-start__due--line.w2-start__due--whatif .w2-start__duedays { border-radius: 7px; }
.w2-start__clocks, .w2-start__reminders, .w2-start__records { gap: 3px; }
.w2-start__upmore[hidden] { display: none; }
.w2-start__upmore { padding: 2px 0 0 8px; font-size: var(--fs-xs); }
/* round-6 integration (WP-TODAY6 Core request 7): at 130 % text the Up next header wraps as a row — the eyebrow and each
   link keep their words on one line; the links stay together at the right */
.w2-start__sechead { flex-wrap: wrap; row-gap: 4px; }
.w2-start__sechead > .w2-eyebrow { white-space: nowrap; }
.w2-start__sechead .w2-start__seclink { white-space: nowrap; flex: none; }
.w2-start__sechead .w2-start__seclink:first-of-type { margin-left: auto; }
/* round-6 integration: the round-6 rows in Up next (Readiness, Awaiting, Decisions, the listening plan — only what is
   urgent today, from Today's contract): a small section eyebrow before the name */
.w2-start__due--contract .w2-start__dueunit { white-space: nowrap; }
.w2-start__due--contract .w2-start__dueeyebrow { margin-right: 4px; }
