/* Global Search — the header typeahead: the field, the icon trigger, the scrim
   and the panel. Rows and states are styled in search-results.css.

   THE SHELL OWNS THE SLOT. layout.css sets #headerSearch's width in tiers and
   makes it a size container; this file never sets the slot's width. The field
   is 34px tall and the panel is absolutely positioned, so the header stays at
   its measured 62-63px. Every colour is a theme-aware token. */

/* ===== the field ===== */
.gs-bar { position: relative; display: flex; align-items: center; width: 100%; height: 34px; margin: 0; }
.gs-bar-ico {
    position: absolute; left: .7rem; top: 50%; transform: translateY(-50%);
    font-size: var(--fs-md); color: var(--text-dim); pointer-events: none;
}
.gs-bar-spin { width: .85rem; height: .85rem; border-width: 2px; margin-top: -.425rem; transform: none; color: var(--accent); }
.gs-input {
    width: 100%; height: 34px; padding: 0 2.2rem 0 2.1rem; margin: 0;
    border: 1px solid var(--border); border-radius: var(--r-pill);
    background: var(--surface-2); color: var(--text);
    font: inherit; font-size: var(--fs-md); line-height: 1;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
    appearance: none; -webkit-appearance: none;
}
.gs-input::-webkit-search-cancel-button, .gs-input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.gs-input::placeholder { color: var(--text-dim); }
.gs-input:hover { border-color: var(--accent-line); }
.gs-input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-weak); }
.gs-bar:focus-within .gs-bar-ico { color: var(--accent); }
.gs-clear {
    position: absolute; right: .3rem; top: 50%; transform: translateY(-50%);
    width: 26px; height: 26px; border: 0; border-radius: var(--r-circle);
    background: transparent; color: var(--text-dim); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-xs);
}
.gs-clear:hover { background: var(--inset); color: var(--text); }
.gs-clear:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.gs-clear[hidden] { display: none; }

/* ===== the icon trigger (narrow tier) ===== */
.gs-trigger {
    display: none; width: 34px; height: 34px; flex: 0 0 34px;
    align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: 9px;
    background: var(--surface-2); color: var(--text-soft); cursor: pointer; font-size: var(--fs-lg);
}
.gs-trigger:hover, .gs-trigger[aria-expanded="true"] { color: var(--accent-ink); border-color: var(--accent-line); background: var(--accent-weak); }
.gs-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ===== the scrim ===== */
/* Absolute against the sticky header, from its bottom edge down: the header
   and the fixed rail above it stay clickable and untinted. */
.gs-scrim {
    position: absolute; top: 100%; left: 0; right: 0; height: 100vh;
    background: rgba(17, 17, 19, .22); z-index: 1;
    animation: gsScrim .18s ease backwards;
}
.gs-scrim[hidden] { display: none; }
@keyframes gsScrim { from { opacity: 0; } }

/* ===== the panel ===== */
/* A typeahead, not a page: 640px at most. --gs-panel-left is written by JS
   from the field's left edge, clamped inside the header. */
.gs-panel {
    position: absolute; top: calc(100% + 4px); left: var(--gs-panel-left, 1.5rem);
    width: min(640px, calc(100vw - var(--sidebar-w) - 3rem));
    max-height: min(620px, calc(100vh - 62px - 1.5rem));
    display: flex; flex-direction: column; min-height: 0;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--r-lg);
    box-shadow: var(--lift-3, var(--shadow-lg)); z-index: 2; overflow: hidden;
    animation: gsDrop .18s var(--ease-out) backwards;
}
.gs-panel[hidden] { display: none; }
@keyframes gsDrop { from { opacity: 0; transform: translateY(-4px); } }

.gs-panel-inwrap { display: none; position: relative; align-items: center; padding: var(--sp-4) var(--sp-5) var(--sp-2); }
.gs-panel-inwrap .gs-bar-ico { left: calc(var(--sp-5) + .9rem); top: calc(50% + var(--sp-1)); font-size: var(--fs-lg); }
.gs-panel-input {
    width: 100%; height: 42px; padding: 0 var(--sp-6) 0 2.6rem; margin: 0;
    border: 1px solid var(--border); border-radius: var(--r-sm);
    background: var(--surface-2); color: var(--text); font: inherit; font-size: var(--fs-lg); line-height: 1;
    appearance: none; -webkit-appearance: none;
}
.gs-panel-input::-webkit-search-cancel-button, .gs-panel-input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.gs-panel-input::placeholder { color: var(--text-dim); }
.gs-panel-input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-weak); }

/* The one tier threshold, AFTER every default display it overrides. */
@container (max-width: 60px) {
    .gs-bar { display: none; }
    .gs-trigger { display: inline-flex; }
    .gs-panel-inwrap { display: flex; }
}

.gs-panel-list {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
    padding: var(--sp-2) 0 var(--sp-3); transition: opacity .15s ease;
}
.gs-panel-list.is-stale { opacity: .5; }
.gs-sec-h {
    font-size: var(--fs-2xs); font-weight: var(--fw-bold); color: var(--text-dim);
    text-transform: uppercase; letter-spacing: var(--ls-caps); padding: var(--sp-4) var(--sp-5) var(--sp-1);
}
.gs-sec-h:first-child { padding-top: var(--sp-2); }
.gs-idle { display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-6) var(--sp-5); }
.gs-idle b { font-size: var(--fs-md); color: var(--text); }
.gs-idle span { font-size: var(--fs-sm); color: var(--text-soft); line-height: var(--lh-normal); }

.gs-panel-foot { flex: 0 0 auto; border-top: 1px solid var(--border); background: var(--surface-2); }
.gs-panel-foot:empty { display: none; }
.gs-foot-link {
    display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-5); color: var(--accent-ink); text-decoration: none;
    font-size: var(--fs-sm); font-weight: var(--fw-medium); border-left: 3px solid transparent;
}
.gs-foot-link b { color: var(--text); }
.gs-foot-link:hover, .gs-foot-link.is-active { background: var(--accent-weak); color: var(--accent-ink); }
.gs-foot-link.is-active { border-left-color: var(--accent); }

.gs-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 991.98px) {
    .gs-panel { width: calc(100vw - 2rem); max-height: calc(100vh - 56px - 1rem); }
}
@media (prefers-reduced-motion: reduce) {
    .gs-panel, .gs-scrim { animation: none; }
    .gs-panel-list { transition: none; }
}

/* ==================== THE HOME VOICE (2026-09-17) ==========================
   The typeahead panel set the way Home sets its own cards: a softer radius,
   rows that sit as rounded tiles inset from the edge and lift to --inset on
   hover, Home's rounded icon tile for the lead, bold names, and uppercase
   tracked section heads. Scoped to .gs-panel, so the result cards on the
   search page (which share .gs-row's pieces) are not reached. The field is
   untouched: the shell owns its slot and its height budget. */
.gs-panel { border-radius: 16px; }
.gs-panel .gs-panel-list { padding: .35rem .45rem .6rem; }
.gs-panel .gs-row {
    border-left: 0; border-radius: var(--r-sm); padding: .55rem .75rem;
    transition: background .15s var(--ease);
}
.gs-panel .gs-row:hover { background: var(--inset); }
.gs-panel .gs-row.is-active { background: var(--accent-weak); box-shadow: inset 3px 0 0 var(--accent); }
.gs-panel .gs-lead { width: 36px; height: 36px; border-radius: 10px; }
.gs-panel .gs-lead.is-person { border-radius: 50%; }
.gs-panel .gs-row-t { font-weight: var(--fw-bold); }
.gs-panel .gs-sec-h { letter-spacing: .14em; color: var(--text-soft); padding-left: .75rem; }
.gs-panel .gs-foot-link { font-weight: var(--fw-bold); }
