/* ==========================================================================
   Reusable components
   ========================================================================== */

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink);
  --btn-bd: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border-radius: var(--r-sm);
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  font-weight: 600; font-size: .925rem;
  white-space: nowrap;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn svg { width: 18px; height: 18px; stroke-width: 2; flex: none; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-primary { --btn-bg: var(--scrub); --btn-fg: var(--scrub-ink); --btn-bd: var(--scrub); }
.btn-primary:hover { background: var(--scrub-strong); border-color: var(--scrub-strong); }
.btn-ghost { --btn-bg: transparent; --btn-bd: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-soft { --btn-bg: var(--scrub-soft); --btn-fg: var(--scrub); --btn-bd: transparent; }
.btn-soft:hover { background: color-mix(in srgb, var(--scrub-soft) 70%, var(--scrub) 12%); }
.btn-pro { --btn-bg: var(--pro-soft); --btn-fg: var(--pro); --btn-bd: transparent; }
.btn-sm { height: 32px; padding: 0 12px; font-size: var(--fs-sm); border-radius: 8px; }
.btn-sm svg { width: 16px; height: 16px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 1rem; border-radius: 12px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 40px; height: 40px; border-radius: var(--r-sm);
  display: inline-grid; place-items: center;
  color: var(--ink-2);
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.icon-btn svg { width: 19px; height: 19px; stroke-width: 1.9; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.on { color: var(--amber); }
.icon-btn.on svg { fill: currentColor; }
.icon-btn-sm { width: 32px; height: 32px; }
.icon-btn-sm svg { width: 16px; height: 16px; }

/* ---------- Panels: the main surface. Not every block is one. ---------- */
.panel {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  box-shadow: var(--shadow-1);
  min-width: 0;
}
.panel-tight { padding: var(--s-4); }
.panel-flush { padding: 0; overflow: hidden; }
.panel-head {
  display: flex; align-items: center; gap: var(--s-3);
  margin-bottom: var(--s-4);
}
.panel-head h2, .panel-head h3 { flex: 1; min-width: 0; }
.panel-head .link { font-size: var(--fs-sm); color: var(--scrub); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.panel-head .link:hover { text-decoration: underline; text-underline-offset: 3px; }
.well { background: var(--surface-2); border-radius: var(--r-md); padding: var(--s-4); }

/* Page header */
.page-head {
  display: flex; align-items: flex-end; flex-wrap: wrap; gap: var(--s-4);
  margin: var(--s-2) 0 var(--s-6);
}
.page-head .titles { flex: 1; min-width: 240px; }
.page-head p { color: var(--ink-2); margin-top: 6px; max-width: 62ch; }
.page-head .actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--ink-3); margin-bottom: var(--s-2); flex-wrap: wrap; }
.crumbs a:hover { color: var(--ink); }
.crumbs svg { width: 14px; height: 14px; }

/* ---------- Chips & badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: var(--fs-sm); font-weight: 500;
  border: 1px solid transparent;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
}
.chip svg { width: 15px; height: 15px; }
button.chip:hover { color: var(--ink); background: var(--surface-3); }
.chip[aria-pressed="true"], .chip.active {
  background: var(--scrub-soft); color: var(--scrub);
  border-color: color-mix(in srgb, var(--scrub) 35%, transparent);
}
/* A selected chip stays highlighted while the pointer is still over it. */
button.chip[aria-pressed="true"]:hover { background: color-mix(in srgb, var(--scrub) 18%, var(--surface)); color: var(--scrub); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--fs-xs); font-weight: 600;
  padding: 2px 8px; border-radius: var(--r-xs);
  background: var(--surface-2); color: var(--ink-2);
  white-space: nowrap;
}
.tag svg { width: 12px; height: 12px; }
.tag-good { background: var(--good-soft); color: var(--good); }
.tag-bad { background: var(--rose-soft); color: var(--rose); }
.tag-warn { background: var(--amber-soft); color: var(--amber); }
.tag-info { background: var(--sky-soft); color: var(--sky); }
.tag-scrub { background: var(--scrub-soft); color: var(--scrub); }

.pro-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-display);
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  padding: 2px 7px 2px 6px; border-radius: var(--r-pill);
  background: var(--pro-soft); color: var(--pro);
  line-height: 1.4;
}
.pro-badge svg { width: 11px; height: 11px; stroke-width: 2.4; }

.course-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--scrub)); flex: none; display: inline-block; }
.course-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2);
}

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field-label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.field .hint { font-size: var(--fs-xs); color: var(--ink-3); }
.input, .select, .textarea {
  height: 42px; padding: 0 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  width: 100%;
  font-size: .95rem;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--scrub); box-shadow: 0 0 0 3px color-mix(in srgb, var(--scrub) 18%, transparent); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237B8C88' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

/* Segmented control */
.seg {
  display: inline-flex; padding: 3px; gap: 2px;
  max-width: 100%; overflow-x: auto; scrollbar-width: none; flex-shrink: 0;
  background: var(--surface-2); border-radius: 11px;
}
.seg button {
  flex: none;
  height: 32px; padding: 0 14px; border-radius: 8px;
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2);
  transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
  display: inline-flex; align-items: center; gap: 6px;
}
.seg button svg { width: 15px; height: 15px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

/* Range */
.range { width: 100%; accent-color: var(--scrub); }

/* Switch */
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--surface-3); border-radius: 99px; transition: background var(--t-fast); }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform var(--t-med) var(--ease-out); }
.switch input:checked + span { background: var(--scrub); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2.5px solid var(--scrub); outline-offset: 2px; }

/* Check rows (selectable options) */
.check {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
  font-size: var(--fs-sm); font-weight: 500;
}
.check:hover { border-color: var(--line-strong); }
.check input { accent-color: var(--scrub); width: 16px; height: 16px; margin: 0; }
.check:has(input:checked) { border-color: var(--scrub); background: color-mix(in srgb, var(--scrub-soft) 55%, transparent); }

/* ---------- Progress ---------- */
.bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--scrub); width: var(--v, 0%); transition: width 600ms var(--ease-out); }
.bar.thin { height: 5px; }
.bar.warn > i { background: var(--amber); }
.bar.bad > i { background: var(--rose); }
.bar.good > i { background: var(--good); }

.ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-track { stroke: var(--surface-2); }
.ring .ring-val { stroke: var(--scrub); stroke-linecap: round; transition: stroke-dashoffset 800ms var(--ease-out); }
.ring > span { position: absolute; font-family: var(--font-display); font-weight: 700; font-size: .85rem; }

/* ---------- Lists ---------- */
.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 12px var(--s-2);
  border-radius: var(--r-md);
  transition: background var(--t-fast);
  min-width: 0;
}
a.row:hover, button.row:hover { background: var(--surface-2); }
button.row { width: 100%; text-align: left; }
.row + .row { border-top: 1px solid var(--line); }
a.row:hover + .row, .row:hover { border-top-color: transparent; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .sub { font-size: var(--fs-sm); color: var(--ink-3); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; flex: none;
  background: var(--surface-2); color: var(--ink-2);
}
.row-icon svg { width: 19px; height: 19px; }

/* File-type tiles */
.ftype { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex: none; font-family: var(--font-display); font-weight: 800; font-size: 10px; letter-spacing: .03em; }
.ftype svg { width: 19px; height: 19px; }
.ftype-pdf { background: var(--rose-soft); color: var(--rose); }
.ftype-pptx { background: var(--amber-soft); color: var(--amber); }
.ftype-audio, .ftype-video { background: var(--sky-soft); color: var(--sky); }
.ftype-notes { background: var(--good-soft); color: var(--good); }
.ftype-doc { background: var(--sky-soft); color: var(--sky); }

/* ---------- Tabs (underline) ---------- */
.tabs { display: flex; gap: var(--s-1); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  position: relative;
  padding: 10px 12px 12px;
  font-weight: 600; font-size: var(--fs-sm); color: var(--ink-3);
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.tabs button svg { width: 16px; height: 16px; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); }
.tabs button[aria-selected="true"]::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2.5px;
  border-radius: 2px 2px 0 0; background: var(--scrub);
}

/* ---------- Overlay: modal + sheet ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  grid-template-columns: minmax(0, 1fr);
  padding: var(--s-4);
  background: rgba(10, 26, 24, .42);
  backdrop-filter: blur(3px);
  animation: fade-in 180ms ease-out;
}
.overlay.closing { animation: fade-out 160ms ease-in forwards; }
.modal {
  width: min(680px, 100%);
  min-width: 0;
  max-height: min(860px, calc(100dvh - 32px));
  display: flex; flex-direction: column;
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
  animation: pop-in 260ms var(--ease-out);
}
.overlay.closing .modal { animation: pop-out 160ms ease-in forwards; }
.modal-head { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-5) var(--s-6) var(--s-3); }
.modal-head h2 { flex: 1; }
.modal-body { padding: var(--s-2) var(--s-6) var(--s-6); overflow-y: auto; }
.modal-foot { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-4) var(--s-6); border-top: 1px solid var(--line); background: var(--surface); }
.modal-foot .spacer { flex: 1; }

@media (max-width: 720px) {
  .overlay { place-items: end center; padding: 0; }
  .modal { width: 100%; border-radius: var(--r-xl) var(--r-xl) 0 0; max-height: 92dvh; animation: sheet-in 300ms var(--ease-out); }
  .overlay.closing .modal { animation: sheet-out 200ms ease-in forwards; }
  .modal-foot { padding-bottom: calc(var(--s-4) + env(safe-area-inset-bottom)); }
}

@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes pop-out { to { opacity: 0; transform: scale(.98); } }
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes sheet-out { to { transform: translateY(100%); } }

/* ---------- Toast ---------- */
#toast-root { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px 10px 12px;
  border-radius: var(--r-md);
  background: var(--ink); color: var(--paper);
  font-size: var(--fs-sm); font-weight: 500;
  box-shadow: var(--shadow-pop);
  animation: toast-in 300ms var(--ease-out);
  pointer-events: auto;
}
.toast svg { width: 18px; height: 18px; color: var(--trace); }
.toast.leaving { animation: fade-out 200ms forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.96); } }
@media (max-width: 720px) { #toast-root { bottom: calc(92px + env(safe-area-inset-bottom)); width: calc(100% - 32px); } }

/* ---------- Empty state ---------- */
.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: var(--s-3);
  padding: var(--s-12) var(--s-6);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r-lg);
}
.empty .empty-icon { width: 56px; height: 56px; border-radius: 18px; background: var(--scrub-soft); color: var(--scrub); display: grid; place-items: center; }
.empty .empty-icon svg { width: 26px; height: 26px; }
.empty p { color: var(--ink-2); max-width: 44ch; }

/* ---------- Skeleton / loading ---------- */
.skel { background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 40%, var(--surface-2) 80%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Recall generation state */
.gen-state { display: flex; flex-direction: column; align-items: center; gap: var(--s-5); padding: var(--s-8) 0 var(--s-4); text-align: center; }
.gen-trace { width: 220px; height: 56px; color: var(--scrub); }
.gen-trace path { stroke-dasharray: 340; stroke-dashoffset: 340; animation: trace-draw 1.6s var(--ease-in-out) infinite; }
@keyframes trace-draw { 60% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -340; } }
.gen-steps { display: flex; flex-direction: column; gap: 10px; text-align: left; width: min(320px, 100%); }
.gen-steps li { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--ink-3); transition: color var(--t-med); }
.gen-steps li .dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; flex: none; transition: all var(--t-med); }
.gen-steps li .dot svg { width: 12px; height: 12px; stroke-width: 3; opacity: 0; }
.gen-steps li.active { color: var(--ink); }
.gen-steps li.active .dot { border-color: var(--scrub); border-top-color: transparent; animation: spin .8s linear infinite; }
.gen-steps li.done { color: var(--ink-2); }
.gen-steps li.done .dot { background: var(--scrub); border-color: var(--scrub); color: var(--scrub-ink); }
.gen-steps li.done .dot svg { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

.ai-mark { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--scrub); }
.ai-mark svg { width: 14px; height: 14px; }

/* Pro gate — gentle, content stays visible beneath */
.pro-gate {
  display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap;
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-lg);
  background: var(--pro-soft);
  color: var(--ink);
}
.pro-gate .pg-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--surface); color: var(--pro); display: grid; place-items: center; flex: none; }
.pro-gate .pg-icon svg { width: 20px; height: 20px; }
.pro-gate .grow { flex: 1; min-width: 220px; }
.pro-gate p { color: var(--ink-2); font-size: var(--fs-sm); }

/* Menu / popover */
.menu {
  position: absolute; z-index: 60; min-width: 220px;
  background: var(--surface); border-radius: var(--r-md);
  box-shadow: var(--shadow-pop); padding: 6px;
  border: 1px solid var(--line);
  animation: pop-in 160ms var(--ease-out);
}
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px; font-size: var(--fs-sm); font-weight: 500; text-align: left; }
.menu button:hover { background: var(--surface-2); }
.menu button svg { width: 16px; height: 16px; color: var(--ink-3); }

/* Utility layout */
.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.stack-sm { display: flex; flex-direction: column; gap: var(--s-2); }
.hstack { display: flex; align-items: center; gap: var(--s-2); }
.hstack.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.mt-2 { margin-top: var(--s-2); } .mt-4 { margin-top: var(--s-4); } .mt-6 { margin-top: var(--s-6); } .mt-8 { margin-top: var(--s-8); }
.divider { height: 1px; background: var(--line); margin: var(--s-4) 0; border: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }
.toast-action { margin-left: 6px; padding: 4px 10px; border-radius: 8px; font-weight: 700; color: var(--trace); }
.toast-action:hover { background: rgba(255,255,255,.1); }

/* Confirmation dialog */
.confirm { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); padding: var(--s-6) var(--s-6) var(--s-5); }
.confirm h2 { margin-top: var(--s-2); }
.confirm p { color: var(--ink-2); line-height: 1.6; max-width: 52ch; }
.confirm-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--scrub-soft); color: var(--scrub); }
.confirm-icon.danger { background: var(--rose-soft); color: var(--rose); }
.confirm-icon svg { width: 21px; height: 21px; }
.btn-danger { --btn-bg: var(--rose); --btn-fg: #fff; --btn-bd: var(--rose); }
.btn-danger:hover { background: color-mix(in srgb, var(--rose) 85%, black); border-color: color-mix(in srgb, var(--rose) 85%, black); }
.overlay:has(.confirm) .modal { width: min(460px, 100%); }

/* ---------- Action menu (⋮) ---------- */
.menu-pop { position: fixed; z-index: 120; min-width: 200px; padding: 4px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-pop); border: 1px solid var(--line);
  animation: menu-in 140ms var(--ease-out); }
@keyframes menu-in { from { opacity: 0; transform: scale(.97); } }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px; font-size: var(--fs-sm); font-weight: 500; color: var(--ink); text-align: left; }
.menu-item svg { width: 16px; height: 16px; color: var(--ink-3); }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-2); outline: none; }
.menu-item.danger, .menu-item.danger svg { color: var(--rose); }
@media (prefers-reduced-motion: reduce) { .menu-pop { animation: none; } }

/* ---------- Header search results ---------- */
.gsearch-pop { position: fixed; z-index: 110; max-height: min(460px, calc(100vh - 90px)); overflow-y: auto; padding: 4px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-pop);
  animation: menu-in 140ms var(--ease-out); transform-origin: top left; }
.gsearch-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px; text-align: left; font-size: var(--fs-sm); color: var(--ink); }
.gsearch-item.on { background: var(--surface-2); }
.gsearch-icon { width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center; background: var(--scrub-soft); color: var(--scrub); }
.gsearch-icon svg { width: 15px; height: 15px; }
/* Items from a course take that course's color. */
.gsearch-icon.tinted { background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: var(--c); }
.gsearch-item .grow { min-width: 0; }
.gsearch-title { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gsearch-title mark { background: color-mix(in srgb, var(--amber) 30%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.gsearch-sub { display: block; font-size: var(--fs-xs); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gsearch-kind { flex: none; font-size: var(--fs-xs); color: var(--ink-3); }
.gsearch-none { padding: 10px 12px; }
@media (prefers-reduced-motion: reduce) { .gsearch-pop { animation: none; } }
