/*
 * PFG header search (#591): the approved search from the #554 hand-off.
 * search.css (preview-page rules removed), request-form.css and
 * overlay-chrome.css, in that order, as the prototype loads them.
 */
/* Isolated search preview. PFG colors, compact mixed results, query-led narrowing. */
.sr-vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; padding: 0; border: 0; }
.sr-ic, .sr-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.sr { --acc: #e6ff00; --acc-rgb: 230,255,0; --acc-ink: #141414; --sr-acc: var(--world, #e6ff00); --sr-ink: #141414; --sr-muted: #a7aec0; --sr-line: #2c323f; --sr-surface: #181c26; --sr-hover: #222834;
  box-sizing: border-box; width: min(790px, calc(100vw - 48px)); max-width: none; max-height: calc(100dvh - 96px); margin: min(10vh, 82px) auto auto; padding: 0; border: 1px solid #353c4a; border-radius: 20px; background: var(--sr-surface); color: #f2f3f8; overflow: hidden; box-shadow: 0 24px 100px rgba(0,0,0,.3); font: 14px/1.5 var(--wp--preset--font-family--body, Manrope), sans-serif; }
.sr[open] { display: flex; flex-direction: column; }
.sr::backdrop { background: rgba(5,8,13,.72); }
.sr *, .sr *::before, .sr *::after { box-sizing: border-box; }
.sr [hidden] { display: none !important; }
.sr button, .sr input, .sr a, .sr textarea { font: inherit; }
.sr button { margin: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.sr a { color: inherit; text-decoration: none; }
.sr a:hover { color: inherit; }
.sr :is(button, a, input, textarea, [tabindex]):focus-visible { outline: 2px solid var(--sr-acc); outline-offset: 2px; border-radius: 6px; }

/* The field has one focus boundary; close and clear remain separate targets. */
.sr-head { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--sr-line); background: var(--sr-surface); }
.sr-bar { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 48px; margin: 0; padding: 0 5px 0 13px; border: 1px solid #363d4b; border-radius: 12px; background: #11151d; }
.sr-bar:focus-within { border-color: var(--sr-acc); box-shadow: 0 0 0 1px rgba(230,255,0,.12); }
.sr-bar .sr-ic { flex: 0 0 20px; color: var(--sr-acc); }
.sr .sr-bar input { flex: 1; min-width: 0; height: 46px; padding: 0; border: 0 !important; border-radius: 0; outline: 0 !important; box-shadow: none !important; background: transparent !important; color: #f2f3f8; font-size: 16px; }
.sr-bar input::placeholder { color: #939cad; opacity: 1; }
.sr-bar input::-webkit-search-cancel-button { display: none; }
.sr .sr-clear { min-height: 40px; padding: 0 9px; border-radius: 8px; color: var(--sr-muted); font-size: 12px; }
.sr .sr-clear:hover { color: #f2f3f8; background: var(--sr-hover); }
.sr .sr-close { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border: 1px solid #363d4b; border-radius: 50%; color: var(--sr-muted); }
.sr .sr-close:hover { background: var(--sr-hover); color: #f2f3f8; }

/* Result types appear only for a typed query with several matching types. */
.sr-types { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 10px 18px 0; }
.sr .sr-type-chip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 11px; border: 1px solid #363d4b; border-radius: 999px; background: transparent; color: #b7becb; font-size: 12px; font-weight: 600; white-space: nowrap; }
.sr-type-chip:hover { background: var(--sr-hover); }
.sr .sr-type-chip.is-selected, .sr .sr-type-chip[aria-pressed="true"] { border-color: rgba(230,255,0,.65); background: rgba(230,255,0,.075); color: #e6ff00; }
.sr-type-chip small { color: #969fae; font-size: 11px; font-weight: 500; }
.sr-type-chip .sr-chip-x { font-size: 17px; line-height: 1; font-weight: 400; }
.sr-type-chip svg { flex: 0 0 14px; width: 14px; height: 14px; fill: none; stroke: currentColor; }

/* One scroll region, keeping search and contextual chips visible. */
.sr-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #495161 transparent; padding: 12px 18px 16px; }
.sr-h, .sr-result-note { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 9px; color: var(--sr-muted); font-size: 11px; line-height: 1.5; font-weight: 600; letter-spacing: .035em; text-transform: uppercase; }
.sr-result-note { margin-top: 2px; margin-bottom: 6px; padding: 0 8px; }
.sr-result-note strong, .sr-result-note b { color: #c6ccd6; font-weight: 600; }
.sr-result-note small { font-size: 11px; color: #8d97a9; font-weight: 500; text-transform: none; letter-spacing: 0; }
.sr .sr-h button { min-height: 28px; padding: 0 3px; color: #9da6b6; font-size: 11px; letter-spacing: 0; text-transform: none; }
.sr .sr-h button:hover { color: #f2f3f8; }

.sr-recent { margin-bottom: 18px; }
.sr-recent__items { display: flex; flex-wrap: wrap; gap: 7px; }
.sr-recent__item { display: inline-flex; align-items: center; min-width: 0; max-width: 100%; border: 1px solid #323947; border-radius: 9px; background: #151922; }
.sr-recent__link { display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: calc(100% - 31px); min-height: 36px; padding: 0 8px 0 10px; font-size: 12px; }
.sr-recent__link:hover { background: var(--sr-hover); border-radius: 8px 0 0 8px; }
.sr-recent__link img { width: 18px; height: 18px; object-fit: contain; border-radius: 4px; }
.sr-recent__link svg { flex: 0 0 14px; width: 14px; height: 14px; fill: none; stroke: currentColor; }
.sr-recent__link span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr .sr-recent__remove { display: grid; place-items: center; flex: 0 0 31px; width: 31px; height: 36px; color: #8d97a9; font-size: 18px; }
.sr-recent__remove:hover { color: #f2f3f8; background: var(--sr-hover); border-radius: 0 8px 8px 0; }
.sr-recent__remove svg { width: 14px; height: 14px; fill: none; stroke: currentColor; }
.sr-quickviews { margin-bottom: 20px; }
.sr-quickviews__links { display: flex; flex-wrap: wrap; gap: 7px; }
.sr .sr-quick { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 0 12px; border: 1px solid #343b49; border-radius: 9px; background: #1b202b; color: #d5dae3; font-size: 12px; line-height: 1.3; font-weight: 500; white-space: nowrap; }
.sr-quick:hover { border-color: #697487; background: var(--sr-hover); }
.sr-quick svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }

/* Mixed search results are rows, not comparison cards. */
.sr-results { display: grid; gap: 0; list-style: none; padding: 0; margin: 0; }
.sr-result { position: relative; display: flex; align-items: center; gap: 10px; min-height: 70px; padding: 0 8px; border: 1px solid transparent; border-radius: 10px; background: transparent; }
.sr-result + .sr-result { border-top-color: rgba(72,81,98,.25); border-top-left-radius: 0; border-top-right-radius: 0; }
.sr-result:hover, .sr-result:focus-within, .sr-result.is-active { border-color: transparent; border-radius: 10px; background: var(--sr-hover); }
.sr-result.is-active { box-shadow: inset 3px 0 0 var(--sr-acc); }
.sr-result__main { display: flex; align-items: center; gap: 12px; align-self: stretch; flex: 1; min-width: 0; min-height: 68px; padding: 10px 0; border-radius: 7px; }
.sr-result__icon { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 8px; background: #0c1018; color: #bcc4d3; overflow: hidden; font-size: 13px; font-weight: 700; }
.sr-result__icon img { display: block; width: 100%; height: 100%; padding: 2px; object-fit: contain; }
.sr-result__icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sr-result__copy { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.sr-result__title { display: block; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #f2f3f8; font-size: 14px; line-height: 1.35; font-weight: 650; letter-spacing: 0; }
.sr-result__meta { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #959faf; font-size: 12px; line-height: 1.4; font-weight: 400; }
.sr-result__type { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 4px; margin-right: 6px; padding: 1px 5px; border-radius: 4px; background: rgba(174,185,205,.075); color: #aeb8c9; font-size: 9px; font-weight: 650; line-height: 1.4; letter-spacing: .045em; text-transform: uppercase; vertical-align: 1px; }
.sr-result__grade { display: inline-grid; place-items: center; flex: 0 0 44px; width: 44px; min-height: 30px; margin-left: 6px; padding: 1px 7px; border-radius: 7px; color: var(--sr-acc); background: rgba(230,255,0,.065); font-size: 18px; line-height: 1.3; font-weight: 700; font-family: var(--wp--preset--font-family--display, Outfit), sans-serif; }
.sr-result__actions { display: flex; align-items: center; justify-content: flex-end; flex: 0 0 auto; gap: 6px; }
.sr .sr-result__visit, .sr .sr-result__actions .f-visit { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 88px; width: 88px; min-width: 88px; max-width: 88px; height: 44px; min-height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid transparent; background: #e6ff00; color: #141414 !important; font-size: 12px; font-weight: 650; line-height: 1; text-decoration: none; }
.sr .sr-result__visit:hover { background: #f0ff63; }
.sr .sr-result__actions button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; max-width: 126px; padding: 0 10px; border: 1px solid #485265; border-radius: 9px; color: #e5e9f0; background: #171d28; font-size: 11px; line-height: 1.2; font-weight: 650; }
.sr-result__actions button svg { flex: 0 0 13px; width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.sr-result--child { min-height: 56px; margin-left: 28px; padding-left: 14px; }
.sr-result--child::before { content: ''; position: absolute; top: 7px; bottom: 7px; left: 0; width: 1px; background: #394252; }
.sr-result--child .sr-result__main { min-height: 54px; }
.sr-result--child .sr-result__icon { width: 24px; height: 24px; flex-basis: 24px; background: transparent; }
.sr-result--child .sr-result__title { font-size: 13px; font-weight: 550; }
.sr-result--child .sr-result__meta { font-size: 12px; }
.sr-result--child .sr-result__type { background: transparent; margin-right: 3px; padding-left: 0; }

.sr .sr-more { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; min-height: 44px; margin-top: 10px; padding: 0 12px; border: 1px solid #3c4658; border-radius: 10px; background: #202631; color: #e0e5ed; font-size: 13px; font-weight: 600; }
.sr-more:hover { border-color: #718095; background: #293240; }
.sr-more svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.sr-empty, .sr-error { margin: 2px 0 18px; padding: 12px 8px 16px; border-bottom: 1px solid var(--sr-line); }
.sr-empty__title, .sr-error h3 { margin: 0 0 5px; font-size: 15px; line-height: 1.4; font-weight: 650; color: #e9edf3; }
.sr-empty p, .sr-error p { margin: 0; color: var(--sr-muted); font-size: 12px; line-height: 1.5; }
.sr-error button, .sr-empty button, .sr-empty a { display: inline-flex; align-items: center; min-height: 36px; margin-top: 10px; padding: 0 10px; border: 1px solid #485265; border-radius: 8px; color: #d8deea; font-size: 12px; font-weight: 600; }
.sr-source-note { margin: 13px 8px 0; color: #7f899b; font-size: 10px; line-height: 1.4; }
.sr-suggest { margin: 14px 0 18px; padding: 14px; border: 1px solid #374152; border-radius: 12px; background: #151b25; }
.sr-suggest h3 { margin: 0 0 10px; color: #e8edf5; font-size: 14px; font-weight: 650; }
.sr-suggest__fields { display: grid; gap: 10px; }
.sr-suggest label { display: grid; gap: 4px; color: #bac3d3; font-size: 12px; }
.sr .sr-suggest input, .sr .sr-suggest textarea { width: 100%; min-height: 40px; margin: 0; padding: 8px 10px; border: 1px solid #465166; border-radius: 8px; outline-offset: 2px; background: #10151e; color: #edf0f5; font-size: 14px; }
.sr .sr-suggest button { min-height: 40px; margin-top: 12px; padding: 0 13px; border: 1px solid #5c697e; border-radius: 8px; background: #252f3e; color: #edf0f5; font-size: 12px; font-weight: 600; }
.sr-suggest p { margin: 9px 0 0; color: #96a1b4; font-size: 11px; }

@media (max-width: 700px) {
  .sr { width: 100vw; height: var(--vvh, 100dvh); max-height: var(--vvh, 100dvh); margin: 0; border: 0; border-radius: 0; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); box-shadow: none; }
  .sr-head { gap: 7px; padding: 10px 12px; }
  .sr-bar { padding-left: 10px; min-height: 46px; }
  .sr .sr-bar input { height: 44px; font-size: 16px; }
  .sr .sr-close { flex-basis: 42px; width: 42px; height: 44px; border-color: transparent; }
  .sr-types { gap: 6px; padding: 8px 12px 0; }
  .sr .sr-type-chip { min-height: 34px; padding: 0 10px; font-size: 11px; }
  .sr-body { padding: 13px 12px 16px; }
  .sr-quickviews { margin-bottom: 18px; }
  .sr .sr-quick { min-height: 38px; padding: 0 11px; font-size: 12px; }
  .sr-result { gap: 7px; min-height: 76px; padding: 0 5px; }
  .sr-result__main { gap: 9px; min-height: 74px; }
  .sr-result__icon { flex-basis: 28px; width: 28px; height: 28px; border-radius: 7px; }
  .sr-result__icon svg { width: 17px; height: 17px; }
  .sr-result__title { font-size: 14px; line-height: 1.4; }
  .sr-result__meta { font-size: 12px; }
  .sr-result__type { font-size: 9px; letter-spacing: .03em; padding: 1px 4px; margin-right: 4px; }
  .sr-result__grade { width: 37px; flex-basis: 37px; min-height: 29px; margin-left: 2px; padding: 2px 5px; font-size: 17px; }
  .sr-result__actions { gap: 4px; }
  .sr .sr-result__visit, .sr .sr-result__actions .f-visit { flex-basis: 88px; width: 88px; min-width: 88px; height: 44px; min-height: 44px; padding: 0 9px; font-size: 11px; }
  .sr .sr-result__actions button { max-width: 104px; min-height: 44px; padding: 0 7px; font-size: 10px; }
  .sr-result--child { min-height: 60px; margin-left: 16px; padding-left: 11px; }
  .sr-result--child .sr-result__main { min-height: 58px; gap: 7px; }
  .sr-result--child .sr-result__title { font-size: 13px; }
  .sr-result--child .sr-result__icon { width: 20px; height: 20px; flex-basis: 20px; }
  .sr-result--child .sr-result__meta { font-size: 11px; }
  .sr-source-note { margin-top: 12px; font-size: 10px; }
  .sr-recent__link { min-height: 40px; }
  .sr .sr-recent__remove { height: 40px; }
}
@media (prefers-reduced-motion: no-preference) {
  .sr-result, .sr-quick, .sr-type-chip { transition: background-color .12s ease, border-color .12s ease; }
}

/* Match PFG controls and keep mixed rows within the panel. */
.sr-results { grid-template-columns: minmax(0, 1fr); min-width: 0; width: 100%; }
.sr-result { min-width: 0; width: 100%; max-width: 100%; }
.sr-result__main { flex: 1 1 0; overflow: hidden; }
.sr-result__copy { flex: 1 1 0; overflow: hidden; }
.sr-result__title, .sr-result__meta { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-result__meta .sr-result__type { display: inline; margin-right: 6px; vertical-align: 1px; }
.sr .sr-type-chip { min-height: 36px; border-radius: 999px; border-color: var(--border-strong, #343b49); background: #1b202b; color: #d5dae3; font-weight: 600; }
.sr .sr-type-chip.is-selected, .sr .sr-type-chip[aria-pressed="true"] { background: rgba(230,255,0,.075); border-color: var(--world, #e6ff00); color: #e8eaf2; }
.sr .sr-type-chip.is-selected small, .sr .sr-type-chip[aria-pressed="true"] small { color: inherit; }
.sr .sr-quick { border-radius: 999px; border-color: var(--border-strong, #343b49); font-weight: 600; }
.sr .sr-more { border-radius: 999px; background: #202631; border-color: rgba(255,255,255,.18); color: #e0e5ed; font-weight: 600; }
.sr .sr-more:hover { background: #293240; border-color: #718095; }

/* PFG's actual GradeMark seal and selected-grade glow, scoped to search rows.
   Geometry/arc values remain the authoritative renderer's SVG data. */
.sr .sr-result__grade {
  --pfg-gring: 40px;
  --acc-bright: var(--world, #e6ff00);
  display: inline-grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-height: 44px;
  margin-left: 6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  line-height: 0;
  overflow: visible;
}
.sr .sr-result__grade > .pfg-gring {
  display: block;
  width: var(--pfg-gring, 40px);
  height: var(--pfg-gring, 40px);
  overflow: visible;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 58%, color-mix(in srgb, var(--acc, #e6ff00) 8%, transparent), transparent 74%);
  filter: drop-shadow(0 0 3px color-mix(in srgb, var(--acc, #e6ff00) 14%, transparent));
}
.sr .sr-result__grade .pfg-gring text {
  text-shadow: 0 0 9px color-mix(in srgb, var(--acc, #e6ff00) 25%, transparent);
}
/* Match toplist table marks: fully drawn during every query refresh. */
.sr .sr-result__grade .pfg-gcirc { stroke-dashoffset: 0 !important; animation: none !important; }
.sr .sr-quick.is-selected,
.sr .sr-quick.is-active,
.sr .sr-quick[aria-pressed="true"] {
  background: rgba(230,255,0,.075);
  border-color: var(--world, #e6ff00);
  color: #e8eaf2;
}
.sr .sr-quick.is-selected:hover,
.sr .sr-quick.is-active:hover,
.sr .sr-quick[aria-pressed="true"]:hover {
  background: rgba(230,255,0,.11);
  border-color: var(--world, #e6ff00);
  color: #e8eaf2;
}

/* Actual toplist fx-chip geometry, shared across quick views and result filters. */
.sr .sr-quick, .sr .sr-type-chip { display:inline-flex; align-items:center; gap:8px; min-height:42px; padding:0 16px; border-radius:999px; border:1px solid rgba(255,255,255,.14); background:transparent; color:#e8eaf2; font:600 14px/1 var(--wp--preset--font-family--body,Manrope),system-ui,sans-serif; }
.sr .sr-quick.is-selected, .sr .sr-quick.is-active, .sr .sr-quick[aria-pressed="true"], .sr .sr-type-chip.is-selected, .sr .sr-type-chip[aria-pressed="true"] { border-color:var(--world,#e6ff00); background:rgba(230,255,0,.075); color:#e8eaf2; box-shadow:0 0 0 3px rgba(230,255,0,.12); }

/* Keep the inset child rail inside the available row width. */
.sr .sr-result--child { width:calc(100% - 28px); max-width:calc(100% - 28px); margin-right:0; }
.sr .sr-recent__item { min-height:42px; border:1px solid rgba(255,255,255,.14); border-radius:999px; background:transparent; overflow:hidden; }
.sr .sr-recent__link { min-height:42px; padding:0 8px 0 16px; font:600 14px/1 var(--wp--preset--font-family--body,Manrope),system-ui,sans-serif; }
.sr .sr-recent__remove { width:36px; height:42px; flex-basis:36px; border-radius:0 999px 999px 0; }
.sr .sr-recent__link:hover { border-radius:999px 0 0 999px; }
/* Firm identity cards use the same visual hierarchy as the toplist. */
.sr .sr-result--firm { margin:5px 0; padding:8px 12px; border:1px solid var(--border-strong,rgba(255,255,255,.14)); border-radius:14px; background:#141820; }
.sr .sr-result--firm .sr-result__main { display:grid; grid-template-columns:42px minmax(0,1fr) 56px; gap:12px; min-height:72px; }
.sr .sr-result--firm .sr-result__icon { width:42px;height:42px;flex-basis:42px;background:#080a0f; }
.sr .sr-result--firm .sr-result__title { font-size:16px;font-weight:650; }
.sr .sr-result--firm .sr-result__type { display:none; }
.sr .sr-result__grade { --pfg-gring:48px; width:56px;height:auto;min-height:65px;display:flex;flex-direction:column;justify-content:center;gap:1px;margin-left:0; }
.sr-grade-label { display:block;color:var(--sr-muted);font:500 9px/1.3 var(--wp--preset--font-family--body,Manrope),sans-serif;white-space:nowrap;text-shadow:none; }
@media(max-width:700px) {
 .sr .sr-result--child { width:calc(100% - 16px);max-width:calc(100% - 16px); }
 .sr .sr-result--firm { display:flex;gap:8px; }
 .sr .sr-result--firm .sr-result__main { grid-template-columns:36px minmax(0,1fr) 50px;gap:8px;min-height:65px; }
 .sr .sr-result--firm .sr-result__icon { width:36px;height:36px; }
 .sr .sr-result--firm .sr-result__title { font-size:14px; }
 .sr .sr-result--firm .sr-result__actions { margin-top:0; }
 .sr .sr-result__grade { --pfg-gring:44px;width:50px; }
}


/* Preserve the approved identity, grade, Visit alignment at narrow widths. */
@media(max-width:700px) {
 .sr .sr-result--firm .sr-result__title { white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2; }
 .sr .sr-result--firm .sr-result__meta { white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2; }
}

/* Equal copy controls share the Visit action's right edge. */
.sr .sr-result--code { padding-right:12px; }
.sr .sr-result__actions .sr-copy { width:112px;min-width:112px;max-width:112px;flex:0 0 112px;min-height:44px;height:44px;padding:0 7px;font-size:11px; }
@media(max-width:700px) {
 .sr .sr-result--code .sr-result__title { white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2; }
 .sr .sr-result--code .sr-result__meta { white-space:normal;overflow:visible; }
}
.sr-related-label { padding:12px 4px 5px;margin:0;list-style:none;color:var(--sr-muted);font-size:11px;line-height:1.45;font-weight:600;letter-spacing:.035em;text-transform:uppercase; }


/* Shared compact quick cards, expressive utility icons, and readable page titles. */
.sr-heading-label { display:inline-flex; align-items:center; gap:7px; min-width:0; }
.sr-heading-label > svg { width:15px;height:15px;flex:0 0 15px;color:#a8b1c1; }
.sr .sr-quick > svg { width:16px;height:16px;flex:0 0 16px;color:#aab4c5; }
.sr .sr-quick[aria-pressed="true"] > svg { color:var(--sr-acc); }
.sr .sr-recent__link { text-align:left; }
.sr .sr-recent__link img { width:21px;height:21px;padding:1px;background:#090d14; }
.sr .sr-recent__link .sr-result__fallback { display:grid;place-items:center;width:21px;height:21px;font-size:10px; }
.sr .sr-result[data-firm="tradeify"] .sr-result__icon { background:#e7eddc; }
.sr .sr-result--firm .sr-result__meta { white-space:normal;display:block;overflow:visible;-webkit-line-clamp:unset; }
.sr .sr-result__main:focus .sr-result__title { white-space:normal;display:block;-webkit-line-clamp:unset; }
@media(max-width:700px) {
 .sr .sr-quick { padding:0 11px;gap:6px;font-size:12px; }
 .sr .sr-result:not(.sr-result--firm) .sr-result__title { white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2; }
 .sr .sr-result:not(.sr-result--firm) .sr-result__main:focus .sr-result__title { display:block;-webkit-line-clamp:unset; }
}

/* A full-width pill field sits beneath a quiet modal title and Close action. */
.sr-topline { flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px 0; }
.sr-topline h2 { margin:0;color:#f2f3f8;font-size:17px;line-height:1.4;font-weight:650;letter-spacing:-.02em; }
.sr .sr-topline .sr-close { width:32px;height:32px;flex-basis:32px;border:0;background:transparent; }
.sr .sr-topline .sr-close svg { width:19px;height:19px; }
.sr .sr-head { display:block;padding-top:10px; }
.sr .sr-bar, .sr .sr-bar:focus-within { border-radius:999px; }
@media(max-width:700px) {
 .sr-topline { padding:12px 12px 0; }
 .sr-topline h2 { font-size:16px; }
 .sr .sr-head { padding-top:8px; }
 .sr .sr-bar { padding-left:14px; }
}

/* Preserve the live toplist's canonical mark backgrounds and framed tiles. */
.sr .sr-result--firm .sr-result__icon { border:1.5px solid rgba(255,255,255,.18);border-radius:10px;background:#262c3b; }
.sr .sr-result--firm .sr-result__icon img { width:100%;height:100%;padding:0;object-fit:contain; }

.sr .sr-h .sr-quick-reset { display:inline-flex;align-items:center;gap:5px;min-height:32px;color:#b9c2d1; }
.sr .sr-quick-reset svg { width:13px;height:13px; }

/* Isolated preview: request form. Load after search.css. */
.sr .sr-suggest {
  margin: 20px 0 6px;
  padding: 24px;
  border: 1px solid #394252;
  border-radius: 16px;
  background: #151a24;
  color: #f2f3f8;
  text-align: left;
}
.sr .sr-suggest h3,
.sr .sr-suggest .sr-suggest__title {
  margin: 0 0 8px;
  color: #f2f3f8;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 650;
  letter-spacing: -.02em;
}
.sr .sr-suggest .sr-suggest__intro {
  margin: 0 0 24px;
  color: #a8b1c1;
  font-size: 13px;
  line-height: 1.6;
}
.sr .sr-suggest__fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin-top: 24px;
}
.sr .sr-suggest__intro + .sr-suggest__fields { margin-top: 0; }
.sr .sr-suggest label {
  display: grid;
  min-width: 0;
  gap: 9px;
  margin: 0;
  color: #e1e6ef;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
}
.sr .sr-suggest .sr-field-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.sr .sr-suggest .sr-field-label small {
  flex: 0 0 auto;
  margin: 0;
  color: #8f9aac;
  font-size: 11px;
  line-height: inherit;
  font-weight: 500;
}
.sr .sr-suggest input {
  display: block;
  width: 100%;
  height: 48px;
  min-height: 48px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #3d4759;
  border-radius: 12px;
  background: #10151d;
  color: #f2f3f8;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  appearance: none;
  box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.sr .sr-suggest input::placeholder { color: #737f92; opacity: 1; }
.sr .sr-suggest input:hover { border-color: #657187; }
.sr .sr-suggest input:focus-visible {
  border-color: #e6ff00;
  border-radius: 12px;
  outline: 0;
  box-shadow: 0 0 0 1px rgba(230, 255, 0, .16);
}
.sr .sr-suggest .sr-source-note,
.sr .sr-suggest .sr-suggest__note {
  margin: 18px 0 0;
  color: #929eb1;
  font-size: 12px;
  line-height: 1.6;
}
.sr .sr-suggest .sr-suggest__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
}
.sr .sr-suggest .sr-suggest__actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  min-height: 46px;
  margin: 0;
  padding: 0 22px;
  border: 1px solid #e6ff00;
  border-radius: 999px;
  background: #e6ff00;
  color: #11150b;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 650;
  white-space: nowrap;
}
.sr .sr-suggest .sr-suggest__actions button[data-act="suggest-close"],
.sr .sr-suggest .sr-suggest__actions .sr-suggest__cancel {
  border-color: #465267;
  background: transparent;
  color: #d4dbe7;
}
.sr .sr-suggest .sr-suggest__actions button[data-act="suggest-close"]:hover,
.sr .sr-suggest .sr-suggest__actions .sr-suggest__cancel:hover {
  border-color: #7a889e;
  background: #202735;
  color: #f2f3f8;
}
.sr .sr-suggest .sr-suggest__actions button:disabled {
  border-color: #555e2c;
  background: #353d1d;
  color: #a6b276;
  opacity: 1;
  cursor: not-allowed;
  box-shadow: none;
}
@media (max-width: 700px) {
  .sr .sr-suggest { margin-top: 18px; padding: 20px 16px; }
  .sr .sr-suggest__fields { gap: 18px; }
  .sr .sr-suggest .sr-suggest__actions { gap: 12px; }
  .sr .sr-suggest .sr-suggest__actions button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 48px;
    padding: 0 14px;
  }
}

/* Shared mobile overlay chrome. Load after search.css and nav-preview.css. */
@media (max-width: 700px) {
  .sr,
  .pfg-nav-preview .pfg-nprev-root .pfg-nav-a__drawer {
    box-sizing: border-box;
    width: calc(100vw - 24px);
    min-width: 0;
    max-width: none;
    height: calc(var(--vvh, 100dvh) - 24px);
    max-height: calc(var(--vvh, 100dvh) - 24px);
    padding: 0;
    border: 1px solid #353c4a;
    border-radius: 20px;
    background: #181c26;
  }
  .sr { position: fixed; inset: 0; margin: 12px auto; }
  .pfg-nav-preview .pfg-nprev-root .pfg-nav-a__drawer {
    --nprev-bg: #181c26;
    position: fixed;
    inset: 12px auto auto 12px;
    margin: 0;
    scrollbar-color: #414957 #181c26;
  }
  .pfg-nav-preview .pfg-nprev-root .pfg-nav-a__drawer::-webkit-scrollbar-track { background: #181c26; }

  .sr .sr-topline,
  .pfg-nav-preview .pfg-nprev-root .pfg-nav-a__drawer-top {
    box-sizing: border-box;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 64px;
    margin: 0;
    padding: 10px 18px;
    border: 0;
    background: #181c26;
    color: #f2f3f8;
    font: 650 18px/1.35 Manrope, sans-serif;
  }
  .sr .sr-topline > :is(h2, span),
  .pfg-nav-preview .pfg-nprev-root .pfg-nav-a__drawer-top > :is(h2, span) {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    color: #f2f3f8;
    font: 650 18px/1.35 Manrope, sans-serif;
    letter-spacing: -.02em;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .sr .sr-topline .sr-close,
  .pfg-nav-preview .pfg-nprev-root .pfg-nav-a__drawer-top > [data-pfg-nav-close] {
    box-sizing: border-box;
    display: inline-flex;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #a7aec0;
    box-shadow: none;
  }
  .sr .sr-topline .sr-close:hover,
  .pfg-nav-preview .pfg-nprev-root .pfg-nav-a__drawer-top > [data-pfg-nav-close]:hover { border: 0; background: transparent; color: #f2f3f8; box-shadow: none; }
  .sr .sr-topline .sr-close:focus-visible,
  .pfg-nav-preview .pfg-nprev-root .pfg-nav-a__drawer-top > [data-pfg-nav-close]:focus-visible { border: 0; border-radius: 50%; outline: 2px solid #e6ff00; outline-offset: 2px; background: transparent; box-shadow: none; }
  .sr .sr-topline .sr-close > svg,
  .pfg-nav-preview .pfg-nprev-root .pfg-nav-a__drawer-top > [data-pfg-nav-close] > svg { flex: 0 0 19px; width: 19px; height: 19px; }

  .sr .sr-head { margin: 0; padding: 0 18px 8px; }
}

/* The open drawer keeps its header outside the scrolling menu content. */
@media (max-width: 960px) {
  .pfg-nav-preview .pfg-nprev-root .pfg-nav-a__drawer[open] {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .pfg-nav-preview .pfg-nprev-root .pfg-nav-a__drawer[open] > .pfg-nav-a__drawer-top {
    position: relative;
    top: auto;
    z-index: 1;
    box-sizing: border-box;
    flex: 0 0 64px;
    height: 64px;
    min-height: 64px;
    border-bottom: 1px solid #2c323f;
  }
  .pfg-nav-preview .pfg-nprev-root .pfg-nav-a__drawer[open] > .pfg-nav-a__drawer-content {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    color-scheme: dark;
    scrollbar-width: thin;
    scrollbar-color: #414957 var(--nprev-bg, #181c26);
  }
  .pfg-nav-preview .pfg-nprev-root .pfg-nav-a__drawer-content::-webkit-scrollbar { width: 5px; }
  .pfg-nav-preview .pfg-nprev-root .pfg-nav-a__drawer-content::-webkit-scrollbar-track { background: var(--nprev-bg, #181c26); }
  .pfg-nav-preview .pfg-nprev-root .pfg-nav-a__drawer-content::-webkit-scrollbar-thumb { background: #414957; border-radius: 999px; }
  .pfg-nav-preview .pfg-nprev-root .pfg-nav-a__drawer-content::-webkit-scrollbar-corner { background: var(--nprev-bg, #181c26); }
}


/* PFG: the commission disclosure under the results (affiliate rules). */
.sr .sr-disclosure { margin: 0; padding: 10px 20px 14px; border-top: 1px solid #2a3040; color: #8f98aa; font-size: 12px; line-height: 1.5; }
