/* =====================================================================
   Domain finder — client widget
   Every colour, size and font below resolves to a design token compiled
   by the theme engine, so the whole surface is configurable from the
   admin area without touching this file.
   ===================================================================== */

#nab-ai-root,
#nab-ai-root * { box-sizing: border-box; }

#nab-ai-root {
  --nab-z: 2147483000;
  position: relative;
  font-family: var(--nab-font);
  font-size: var(--nab-text-base);
  line-height: 1.55;
  color: var(--nab-text);
  -webkit-font-smoothing: antialiased;
}

/* Inherit typography only. An ID-scoped `color: inherit` here would outrank
   every class-level button rule below and repaint them all in body text. */
#nab-ai-root button,
#nab-ai-root input,
#nab-ai-root textarea,
#nab-ai-root select { font: inherit; }

/* ---------- Launcher --------------------------------------------------- */

.nab-launcher {
  z-index: var(--nab-z);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: var(--nab-launcher-padding);
  border: 1px solid var(--nab-launcher-border);
  border-radius: var(--nab-launcher-radius);
  background: var(--nab-launcher-bg);
  color: var(--nab-launcher-text);
  box-shadow: var(--nab-launcher-shadow);
  cursor: pointer;
  font-weight: 650;
  transition: transform var(--nab-transition) ease, box-shadow var(--nab-transition) ease, filter var(--nab-transition) ease;
}
.nab-launcher:hover { transform: translateY(-2px); filter: brightness(1.05); }
.nab-launcher:active { transform: translateY(0); }
.nab-launcher:focus-visible { outline: 3px solid var(--nab-focus-ring); outline-offset: 3px; }

/* The launcher while the finder is open.
   Opacity alone would leave a button that is invisible but still clickable and
   still in the tab order, so visibility is what actually removes it — the
   transition on opacity keeps the exit smooth, and the delayed visibility
   change lets that fade finish before the button stops existing to the
   pointer. The disabled and aria-hidden attributes set alongside this class
   are what keep it away from the keyboard and the screen reader. */
.nab-launcher.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(.92) translateY(6px);
  pointer-events: none;
  transition: opacity var(--nab-transition) ease,
              transform var(--nab-transition) ease,
              visibility 0s linear var(--nab-transition);
}
.nab-launcher.is-hidden:hover { transform: scale(.92) translateY(6px); filter: none; }

/* Coming back: visibility has to flip immediately so the fade-in is visible. */
.nab-launcher:not(.is-hidden) {
  visibility: visible;
  transition: opacity var(--nab-transition) ease,
              transform var(--nab-transition) ease,
              box-shadow var(--nab-transition) ease,
              filter var(--nab-transition) ease,
              visibility 0s;
}

@media (prefers-reduced-motion: reduce) {
  /* No movement, and no waiting for a transition that will not run. */
  .nab-launcher.is-hidden,
  .nab-launcher:not(.is-hidden) {
    transform: none;
    transition: none;
  }
  .nab-launcher.is-hidden:hover { transform: none; }
}

.nab-launcher-icon { padding: 0; width: 56px; height: 56px; justify-content: center; }
.nab-launcher-image { padding: 0; background: none; border: 0; box-shadow: none; }
.nab-launcher-image img { display: block; border-radius: var(--nab-launcher-radius); }

.nab-launcher-mark { display: inline-flex; width: var(--nab-launcher-icon); height: var(--nab-launcher-icon); }
.nab-launcher-mark svg { width: 100%; height: 100%; }
.nab-launcher-mark .nab-emoji { font-size: calc(var(--nab-launcher-icon) * .95); line-height: 1; }
/* The label carries no background of its own, so it can take the gradient. */
.nab-launcher-label {
  color: var(--nab-launcher-text-fg);
  background-image: var(--nab-launcher-text-img);
  -webkit-background-clip: text; background-clip: text;
}

/* ---------- Overlay & panel -------------------------------------------- */

.nab-overlay {
  position: fixed; inset: 0;
  z-index: calc(var(--nab-z) - 1);
  background: var(--nab-overlay-bg);
  backdrop-filter: blur(var(--nab-backdrop-blur));
  opacity: 0; pointer-events: none;
  transition: opacity var(--nab-transition) ease;
}
#nab-ai-root.is-open .nab-overlay { opacity: 1; pointer-events: auto; }

.nab-panel {
  position: fixed;
  z-index: var(--nab-z);
  width: var(--nab-panel-width);
  max-width: calc(100vw - 32px);
  max-height: var(--nab-panel-height);
  height: min(var(--nab-panel-height), calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  background: var(--nab-panel-bg);
  border: 1px solid var(--nab-panel-border);
  border-radius: var(--nab-radius);
  box-shadow: var(--nab-panel-shadow);
  overflow: hidden;
  /* The panel is its own responsive context: a 420px panel inside a 1400px
     window has to lay out like a narrow column, and a viewport media query
     cannot see that. Browsers without container queries fall back to the
     media queries further down. */
  container: nabpanel / inline-size;
  opacity: 0;
  transform: translateY(14px) scale(.985);
  pointer-events: none;
  transition: opacity var(--nab-transition) ease, transform var(--nab-transition) ease;
}
#nab-ai-root.is-open .nab-panel { opacity: 1; transform: none; pointer-events: auto; }

.nab-panel.nab-side-right { right: 24px; bottom: 96px; }
.nab-panel.nab-side-left  { left: 24px;  bottom: 96px; }

.nab-panel.nab-place-center {
  left: 50%; top: 50%; right: auto; bottom: auto;
  transform: translate(-50%, -46%) scale(.985);
}
#nab-ai-root.is-open .nab-panel.nab-place-center { transform: translate(-50%, -50%); }

.nab-panel.nab-place-fullscreen {
  inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; border-radius: 0;
}

.nab-panel.nab-inline {
  position: relative; inset: auto;
  opacity: 1; transform: none; pointer-events: auto;
  width: 100%; max-width: none; height: auto; max-height: none;
  box-shadow: none;
}

/* ---------- Header ------------------------------------------------------ */

.nab-header {
  display: flex; align-items: center; gap: 11px;
  padding: 15px 16px;
  background: var(--nab-header-bg);
  flex: none;
}
.nab-header-mark {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  color: var(--nab-header-icon);
}
.nab-header-mark svg { width: 20px; height: 20px; }
.nab-header-mark .nab-logo { width: 32px; height: 32px; object-fit: contain; border-radius: 8px; }
.nab-header-mark .nab-emoji { font-size: 20px; line-height: 1; }

.nab-header-text { flex: 1; min-width: 0; }
.nab-header-title {
  font-weight: 700; font-size: 15px; line-height: 1.25;
  color: var(--nab-header-title-fg);
  background-image: var(--nab-header-title-img);
  -webkit-background-clip: text; background-clip: text;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nab-header-subtitle {
  font-size: 12.5px; line-height: 1.35;
  color: var(--nab-header-subtitle-fg);
  background-image: var(--nab-header-subtitle-img);
  -webkit-background-clip: text; background-clip: text;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.nab-header-actions { display: flex; gap: 4px; flex: none; }
.nab-header-btn {
  position: relative;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 0; border-radius: 9px;
  background: var(--nab-header-control);
  color: var(--nab-header-icon);
  cursor: pointer;
  transition: filter var(--nab-transition) ease;
}
.nab-header-btn:hover { filter: brightness(1.25); }
.nab-header-btn svg { width: 17px; height: 17px; }
.nab-header-btn i {
  position: absolute; top: -4px; right: -4px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 99px;
  background: var(--nab-warning);
  color: var(--nab-warning-on);
  font-size: 10px; font-style: normal; font-weight: 700;
  display: grid; place-items: center;
}

/* ---------- Body -------------------------------------------------------- */

.nab-body {
  --nab-body-pad-x: 16px;
  --nab-body-pad-top: 18px;
  flex: 1; min-height: 0;
  overflow-y: auto;
  background: var(--nab-body-bg);
  padding: var(--nab-body-pad-top) var(--nab-body-pad-x);
}
.nab-body::-webkit-scrollbar { width: 2px; }
.nab-body::-webkit-scrollbar-thumb { background: var(--nab-scrollbar); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
.nab-body::-webkit-scrollbar-track { background: transparent; }

.nab-h1, .nab-h2, .nab-h3 {
  margin: 0 0 8px;
  font-family: var(--nab-font-heading);
  font-weight: var(--nab-heading-weight);
  letter-spacing: var(--nab-heading-tracking);
  color: var(--nab-heading-fg);
  background-image: var(--nab-heading-img);
  -webkit-background-clip: text; background-clip: text;
}
.nab-h1 { font-size: 22px; line-height: 1.2; }
.nab-h2 { font-size: 17px; line-height: 1.28; }
.nab-h3 { font-size: 15px; }

.nab-lead {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--nab-subheading-fg);
  background-image: var(--nab-subheading-img);
  -webkit-background-clip: text; background-clip: text;
}
.nab-hint {
  margin: 9px 0 0; font-size: 12px;
  color: var(--nab-text-muted-fg);
  background-image: var(--nab-text-muted-img);
  -webkit-background-clip: text; background-clip: text;
}
.nab-label {
  font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--nab-text-muted-fg);
  background-image: var(--nab-text-muted-img);
  -webkit-background-clip: text; background-clip: text;
  margin-bottom: 7px;
}

/* ---------- Search ------------------------------------------------------ */

.nab-form { margin-bottom: 18px; }
.nab-input-wrap { margin-bottom: 10px; }

.nab-search-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--nab-input-border);
  border-radius: var(--nab-input-radius);
  background: var(--nab-input-bg);
  color: var(--nab-input-text);
  font-size: 14px;
  resize: vertical;
  min-height: 84px;
  transition: border-color var(--nab-transition) ease, box-shadow var(--nab-transition) ease;
}
.nab-search-input::placeholder { color: var(--nab-input-placeholder); }
.nab-search-input:focus {
  outline: none;
  border-color: var(--nab-input-focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--nab-input-focus) 20%, transparent);
}

.nab-examples { margin-bottom: 16px; }

/* ---------- Chips ------------------------------------------------------- */

.nab-chips { display: flex; flex-wrap: wrap; gap: 7px; }

.nab-chip {
  padding: 7px 13px;
  border: 1px solid var(--nab-chip-border);
  border-radius: var(--nab-chip-radius);
  background: var(--nab-chip-bg);
  color: var(--nab-chip-text);
  font-size: 12.5px; font-weight: 550;
  cursor: pointer;
  text-align: left;
  transition: all var(--nab-transition) ease;
}
.nab-chip:hover { border-color: var(--nab-accent-solid); }
.nab-chip.is-active {
  background: var(--nab-chip-active-bg);
  color: var(--nab-chip-active-text);
  border-color: transparent;
}
.nab-chip.is-static { cursor: default; }
.nab-chip.is-static:hover { border-color: var(--nab-chip-border); }
.nab-chips-static { gap: 6px; }

/* ---------- Buttons ----------------------------------------------------- */

.nab-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px;
  border: 0; border-radius: var(--nab-btn-radius);
  font-weight: var(--nab-btn-weight); font-size: 13.5px;
  cursor: pointer;
  transition: transform var(--nab-transition) ease, filter var(--nab-transition) ease, opacity var(--nab-transition) ease;
}
.nab-btn:active { transform: translateY(1px); }
.nab-btn:disabled { opacity: .6; cursor: default; }
.nab-btn svg { width: 16px; height: 16px; }

.nab-btn-primary {
  background: var(--nab-btn-primary-bg);
  color: var(--nab-btn-primary-text);
}
.nab-btn-primary:hover:not(:disabled) { filter: brightness(1.06); }
.nab-btn-secondary {
  background: var(--nab-btn-secondary-bg);
  color: var(--nab-btn-secondary-text);
}
.nab-btn-sm { padding: 8px 14px; font-size: 12.5px; }
.nab-btn-block { width: 100%; }
.nab-btn.is-done { background: var(--nab-success); color: var(--nab-success-on); }

.nab-link {
  border: 0; background: none; padding: 0;
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  color: var(--nab-link-fg);
  background-image: var(--nab-link-img);
  -webkit-background-clip: text; background-clip: text;
}
.nab-link:hover { text-decoration: underline; }

/* ---------- Advanced drawer --------------------------------------------- */

.nab-drawer { border-top: 1px solid var(--nab-divider); padding-top: 14px; }
.nab-drawer-toggle {
  border: 0; background: none; padding: 0; cursor: pointer;
  font-size: 13px; font-weight: 600;
  color: var(--nab-link);
  display: flex; align-items: center; gap: 6px;
}
.nab-drawer-toggle::after { content: '▾'; transition: transform var(--nab-transition) ease; }
.nab-drawer-toggle.is-open::after { transform: rotate(180deg); }
.nab-drawer-body { margin-top: 14px; display: flex; flex-direction: column; gap: 16px; }
.nab-group { display: block; }

.nab-row { display: flex; align-items: center; gap: 10px; }
.nab-range {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 5px; border-radius: 99px;
  background: var(--nab-score-track);
}
.nab-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 17px; height: 17px; border-radius: 50%;
  background: #fff; border: 3px solid var(--nab-accent-solid); cursor: pointer;
}
.nab-range::-moz-range-thumb {
  width: 17px; height: 17px; border-radius: 50%;
  background: #fff; border: 3px solid var(--nab-accent-solid); cursor: pointer;
}
.nab-range-value { font-size: 12.5px; font-weight: 650; min-width: 28px; text-align: right; }

.nab-select {
  padding: 7px 11px;
  border: 1px solid var(--nab-input-border);
  border-radius: 9px;
  background: var(--nab-input-bg);
  color: var(--nab-input-text);
  font-size: 12.5px;
  cursor: pointer;
}

/* ---------- Brief ------------------------------------------------------- */

.nab-brief {
  background: var(--nab-accent-soft);
  border-radius: var(--nab-card-radius);
  padding: 9px 12px 10px;
  margin-bottom: 12px;
}
.nab-brief-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nab-brief-head .nab-label { margin-bottom: 0; }

.nab-brief-toggle {
  display: inline-flex; align-items: center; gap: 5px;
  border: 0; background: transparent; padding: 0; cursor: pointer;
  font: inherit;
  /* The flat companion, not the -fg pair: an icon cannot be painted by a
     background clipped to text, so it would come out invisible. */
  color: var(--nab-text-muted);
}
.nab-brief-eyebrow {
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}
.nab-brief-caret { display: inline-flex; width: 13px; height: 13px; transition: transform var(--nab-transition) ease; }
.nab-brief-caret svg { width: 100%; height: 100%; }
.nab-brief-edit { font-size: 12px; }
.nab-brief-chips { margin-top: 7px; gap: 5px; }
.nab-brief-chips .nab-chip { padding: 4px 9px; font-size: 11.5px; font-weight: 600; }

.nab-brief-tlds {
  width: 100%;
  margin-top: 1px;
  font-size: 11.5px; font-weight: 600;
  color: var(--nab-meta);
  letter-spacing: .01em;
}

.nab-brief.is-collapsed .nab-brief-chips { display: none; }
.nab-brief.is-collapsed { padding-bottom: 9px; }
.nab-brief.is-collapsed .nab-brief-caret { transform: rotate(-90deg); }

/* ---------- Results ----------------------------------------------------- */

/*
 * The count, sort and filters stay in view while the list scrolls under them.
 *
 * The background has to reach the panel edge even though the content does
 * not: an inset background leaves a gutter down each side of a sticky bar,
 * and cards slide up through it. So the bar is pulled out to the full width
 * with negative margins and given that width back as padding — the content
 * keeps the body's inset, the background covers everything.
 */
.nab-toolbar {
  position: sticky; top: calc(-1 * var(--nab-body-pad-top, 0px)); z-index: 4;
  background: var(--nab-panel-bg);
  margin-inline: calc(-1 * var(--nab-body-pad-x, 0px));
  padding-inline: var(--nab-body-pad-x, 0px);
  padding-block: var(--nab-body-pad-top, 2px) 8px;
  margin-bottom: 4px;
}
.nab-toolbar::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -10px; height: 10px;
  background: linear-gradient(var(--nab-panel-bg), transparent);
  pointer-events: none;
}
.nab-results-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 9px;
}
.nab-results-head .nab-h2 { margin: 0; }

.nab-notice {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; margin-bottom: 12px;
  border-radius: 10px;
  background: var(--nab-accent-soft);
  font-size: 12.5px;
  color: var(--nab-stage-text);
}
.nab-dot-pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--nab-accent-solid);
  animation: nab-pulse 1.2s ease-in-out infinite;
  flex: none;
}
@keyframes nab-pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* Filters scroll sideways rather than wrapping onto a third line. */
.nab-filters {
  display: flex; flex-wrap: nowrap; gap: 6px; align-items: center;
  margin-bottom: 0;
  overflow-x: auto; overscroll-behavior-x: contain;
  scrollbar-width: none;
  padding-bottom: 2px;
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 18px), transparent 100%);
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 18px), transparent 100%);
}
.nab-filters::-webkit-scrollbar { display: none; }
.nab-filters > * { flex: none; }
.nab-filters .nab-chip { padding: 5px 11px; font-size: 12px; }

.nab-list { display: flex; flex-direction: column; gap: 10px; }

.nab-card {
  padding: var(--nab-card-padding);
  border: 1px solid var(--nab-card-border);
  border-radius: var(--nab-card-radius);
  background: var(--nab-card-bg);
  box-shadow: var(--nab-card-shadow);
  transition: background var(--nab-transition) ease,
              border-color var(--nab-transition) ease,
              transform var(--nab-transition) ease,
              box-shadow var(--nab-transition) ease;
}
.nab-card:hover {
  background: var(--nab-card-hover-bg);
  border-color: color-mix(in srgb, var(--nab-accent-solid) 30%, var(--nab-card-border));
  transform: translateY(-1px);
}
.nab-card.is-taken { opacity: .6; }
.nab-card.is-taken:hover { transform: none; }

/* Name and price share a baseline; everything else gets the full width. */
.nab-card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 9px;
}

.nab-card-name {
  font-size: 21px; font-weight: 700;
  letter-spacing: -.028em; line-height: 1.15;
  word-break: break-word; min-width: 0;
  font-feature-settings: "tnum" 0;
}
.nab-domain-label {
  color: var(--nab-domain-fg);
  background-image: var(--nab-domain-img);
  -webkit-background-clip: text; background-clip: text;
}
.nab-domain-tld {
  color: var(--nab-domain-tld-fg);
  background-image: var(--nab-domain-tld-img);
  -webkit-background-clip: text; background-clip: text;
}

.nab-price { text-align: right; line-height: 1.2; flex: none; white-space: nowrap; }
.nab-price-value {
  font-size: 14px; font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--nab-price-fg);
  background-image: var(--nab-price-img);
  -webkit-background-clip: text; background-clip: text;
}
.nab-price-term { font-size: 11px; color: var(--nab-meta); margin-left: 1px; }
.nab-price-muted { font-size: 12px; color: var(--nab-meta); font-weight: 500; }

.nab-card-main { min-width: 0; }

.nab-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 9px; }
.nab-badge {
  padding: 3px 9px;
  border-radius: var(--nab-badge-radius);
  font-size: 11px; font-weight: 700;
  letter-spacing: .012em; line-height: 1.45;
}
.nab-badge.is-available { background: var(--nab-badge-available-bg); color: var(--nab-badge-available-text); }
.nab-badge.is-taken     { background: var(--nab-badge-taken-bg);     color: var(--nab-badge-taken-text); }
.nab-badge.is-premium   { background: var(--nab-badge-premium-bg);   color: var(--nab-badge-premium-text); }
.nab-badge.is-exact     { background: var(--nab-badge-exact-bg);     color: var(--nab-badge-exact-text); }

.nab-highlights { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 7px; }
.nab-highlight {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--nab-meta);
}
.nab-highlight-tick { width: 13px; height: 13px; flex: none; color: var(--nab-success-solid); }
.nab-highlight-tick svg { width: 100%; height: 100%; display: block; }

.nab-why {
  margin: 8px 0 0;
  font-size: 12.5px; line-height: 1.55;
  color: var(--nab-meta);
}
.nab-why-toggle { margin-top: 9px; display: inline-flex; align-items: center; gap: 4px; }
.nab-why-caret {
  display: inline-flex; width: 12px; height: 12px;
  color: var(--nab-link);   /* flat companion — see the note on .nab-brief-toggle */
  transition: transform var(--nab-transition) ease;
}
.nab-why-caret svg { width: 100%; height: 100%; }
.nab-why-toggle.is-open .nab-why-caret { transform: rotate(180deg); }

.nab-detail { margin-top: 10px; }
.nab-scores { display: flex; flex-direction: column; gap: 7px; margin-top: 8px; }
.nab-score { display: grid; grid-template-columns: 92px 1fr 32px; gap: 9px; align-items: center; font-size: 11.5px; }
.nab-score-label { color: var(--nab-meta); }
.nab-score-track { height: 5px; border-radius: 99px; background: var(--nab-score-track); overflow: hidden; }
.nab-score-track i { display: block; height: 100%; background: var(--nab-score-bar); transition: width .5s cubic-bezier(.4,0,.2,1); }
.nab-score-value { text-align: right; font-variant-numeric: tabular-nums; color: var(--nab-meta); }

/* Tools on the left, the one thing that matters on the right. */
.nab-card-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 11px;
  border-top: 1px solid var(--nab-divider);
}
.nab-card-tools { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; min-width: 0; }
.nab-card-cta { flex: none; }

.nab-action {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--nab-meta);
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  transition: background var(--nab-transition) ease, color var(--nab-transition) ease;
}
.nab-action:hover { background: var(--nab-accent-soft); color: var(--nab-accent-solid); }
.nab-action.is-active { color: var(--nab-fav-active-solid); background: var(--nab-accent-soft); }
.nab-action svg { width: 15px; height: 15px; }
.nab-action-labelled { padding-right: 10px; }

@media (max-width: 420px) {
  .nab-action-labelled span:last-child { display: none; }
  .nab-action-labelled { padding-right: 8px; }
}

/* Below roughly 470px of panel width the labelled tool loses its label so the
   tools and the call to action stay on one line. */
@container nabpanel (max-width: 470px) {
  .nab-action-labelled span:last-child { display: none; }
  .nab-action-labelled { padding-right: 8px; }
}
@container nabpanel (max-width: 380px) {
  .nab-card-head { flex-wrap: wrap; }
}

/* ---------- Refinements & actions --------------------------------------- */

.nab-refine { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--nab-divider); }
.nab-actions-row { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.nab-actions-row .nab-btn { flex: 1; min-width: 140px; }

/* ---------- Loading ----------------------------------------------------- */

.nab-loading { padding: 8px 0; }
.nab-progress {
  height: 5px; border-radius: 99px;
  background: var(--nab-loader-track);
  overflow: hidden; margin-bottom: 12px;
}
.nab-progress i {
  display: block; height: 100%; width: 12%;
  background: var(--nab-loader-fill);
  transition: width .7s cubic-bezier(.4,0,.2,1);
}
.nab-stage-label {
  font-size: 13px; font-weight: 600; margin-bottom: 16px;
  color: var(--nab-stage-text-fg);
  background-image: var(--nab-stage-text-img);
  -webkit-background-clip: text; background-clip: text;
}
.nab-skeletons { display: flex; flex-direction: column; gap: 10px; }
.nab-skeleton {
  height: 84px; border-radius: var(--nab-card-radius);
  background: linear-gradient(90deg, var(--nab-skeleton) 25%, var(--nab-skeleton-shine) 50%, var(--nab-skeleton) 75%);
  background-size: 200% 100%;
  animation: nab-shimmer 1.4s linear infinite;
}
@keyframes nab-shimmer { to { background-position: -200% 0; } }

/* ---------- Empty & compare --------------------------------------------- */

.nab-empty { text-align: center; padding: 34px 14px; }
.nab-empty p {
  margin: 0 0 16px; font-size: 13.5px;
  color: var(--nab-text-muted-fg);
  background-image: var(--nab-text-muted-img);
  -webkit-background-clip: text; background-clip: text;
}

.nab-compare-wrap { overflow-x: auto; margin-bottom: 16px; }
.nab-compare { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.nab-compare th, .nab-compare td {
  padding: 9px 11px; text-align: left;
  border-bottom: 1px solid var(--nab-divider);
  white-space: nowrap;
}
.nab-compare th { font-size: 13px; font-weight: 700; }
.nab-compare-label { color: var(--nab-meta); font-weight: 600; }

/* ---------- Footer ------------------------------------------------------ */

.nab-footer {
  flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 16px;
  background: var(--nab-footer-bg);
  border-top: 1px solid var(--nab-divider);
  font-size: 11.5px;
  color: var(--nab-footer-text);
}
.nab-footer:empty { display: none; }
.nab-powered a { color: inherit; }

/* ---------- Responsive --------------------------------------------------- */

@media (max-width: 560px) {
  .nab-panel:not(.nab-inline) {
    inset: 0; width: 100%; height: 100%;
    max-width: none; max-height: none;
    border-radius: 0; border: 0;
    transform: translateY(100%);
  }
  #nab-ai-root.is-open .nab-panel:not(.nab-inline) { transform: none; }
  .nab-card-actions { gap: 8px; }
  .nab-card-cta { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  #nab-ai-root *, #nab-ai-root *::before, #nab-ai-root *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- Live search ------------------------------------------------- */
/* What replaced the progress timer: an activity line that only ever shows a
   real event, seeds that are genuine candidates, and cards that arrive one at
   a time as availability resolves. */

.nab-live { margin-bottom: 16px; }

.nab-activity {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 600;
  color: var(--nab-stage-text);
  min-height: 20px;
}
.nab-activity-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--nab-loader-fill);
  animation: nab-breathe 1.1s ease-in-out infinite;
}
@keyframes nab-breathe { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.35;transform:scale(.72)} }
.nab-activity-text {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Live reasoning is transient: it exists only while a search is running.
   The old persistent post-results reasoning/report panel is intentionally absent. */
.nab-live-reasoning {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 11px;
  padding: 10px 12px;
  border: 1px solid var(--nab-divider);
  border-radius: 12px;
  background: var(--nab-surface-soft, rgba(255,255,255,.45));
  max-height: 132px;
  overflow: hidden;
}
.nab-live-reason {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 9px;
  align-items: baseline;
  font-size: 12px;
  line-height: 1.45;
  animation: nab-seed-in .2s ease;
}
.nab-live-reason-stage {
  color: var(--nab-meta);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .045em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nab-live-reason.is-model .nab-live-reason-stage { color: var(--nab-accent-solid); }
.nab-live-reason-msg {
  color: var(--nab-text);
  min-width: 0;
}
.nab-live-reason.is-model .nab-live-reason-msg { color: var(--nab-meta); font-style: italic; }
@media (max-width: 560px) {
  .nab-live-reason { grid-template-columns: 1fr; gap: 2px; }
}

.nab-card-enter { animation: nab-card-in .26s cubic-bezier(.2,.7,.3,1); }
@keyframes nab-card-in { from { opacity:0; transform:translateY(7px) } }

/* ---------- In-panel toasts --------------------------------------------- */
/* Confirmations never leave the panel and never open a window. */

.nab-toasts {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  display: flex; flex-direction: column; gap: 7px;
  pointer-events: none; z-index: 4;
}

.nab-toast {
  pointer-events: auto;
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--nab-panel-bg);
  border: 1px solid var(--nab-card-border);
  box-shadow: 0 2px 6px rgba(10,16,40,.08), 0 14px 32px -12px rgba(10,16,40,.4);
  animation: nab-toast-in .24s cubic-bezier(.2,.9,.3,1);
}
.nab-toast.is-leaving { animation: nab-toast-out .18s ease forwards; }
@keyframes nab-toast-in  { from { opacity:0; transform: translateY(8px) } }
@keyframes nab-toast-out { to   { opacity:0; transform: translateY(5px) } }

.nab-toast-icon { width: 17px; height: 17px; color: var(--nab-success-solid); }
.nab-toast-icon svg { width: 100%; height: 100%; display: block; }
.nab-toast.is-error .nab-toast-icon { color: var(--nab-danger-solid); }

.nab-toast-text { min-width: 0; }
.nab-toast-title {
  font-size: 12.5px; font-weight: 650; color: var(--nab-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nab-toast-body { font-size: 11.5px; color: var(--nab-meta); margin-top: 1px; line-height: 1.4; }

.nab-toast-action {
  border: 0; background: none; padding: 2px 4px; cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 650;
  color: var(--nab-accent-solid); white-space: nowrap;
}
.nab-toast-action:hover { text-decoration: underline; }

/* ---------- Cart tray ---------------------------------------------------- */
/* A standing reminder of what is waiting, so a visitor can add several names
   before they leave rather than being sent to the cart on the first one. */

.nab-cart-tray {
  flex: none;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: var(--nab-accent-soft);
  border-top: 1px solid var(--nab-divider);
  animation: nab-tray-in .26s cubic-bezier(.2,.9,.3,1);
}
@keyframes nab-tray-in { from { opacity: 0; transform: translateY(6px) } }
.nab-cart-icon { width: 17px; height: 17px; flex: none; color: var(--nab-accent-solid); }
.nab-cart-icon svg { width: 100%; height: 100%; display: block; }
.nab-cart-text {
  flex: 1; min-width: 0;
  font-size: 12.5px; font-weight: 600; color: var(--nab-text);
}
.nab-cart-tray .nab-btn { text-decoration: none; }

/* ---------- Facts, state and score -------------------------------------- */
/* One line instead of four: the status, then whatever is true about the name,
   separated by dots. Filled pills for every quality made each card shout, and
   nothing that shouts equally distinguishes anything. */

.nab-facts {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 4px 12px;
  font-size: 12.5px;
  color: var(--nab-meta);
  margin-bottom: 8px;
}

.nab-state { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; }
.nab-state-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  flex: none;
}
.nab-state.is-available { color: var(--nab-success-solid); }
.nab-state.is-taken { color: var(--nab-meta); }

/* Dots between facts, drawn rather than typed, so they never wrap alone. */
.nab-fact { position: relative; }
.nab-fact::before {
  content: '';
  position: absolute; left: -7px; top: 50%;
  width: 2.5px; height: 2.5px; border-radius: 50%;
  background: currentColor; opacity: .45;
  transform: translateY(-50%);
}

/* The score: one figure, with the breakdown behind it. */
.nab-meter {
  display: flex; align-items: center; gap: 9px;
  width: 100%; margin-top: 11px; padding: 0;
  border: 0; background: transparent;
  color: var(--nab-meta);
  font: inherit; font-size: 12px;
  cursor: pointer;
  text-align: left;
}
.nab-meter-track {
  flex: 1; min-width: 0; height: 4px;
  border-radius: 99px;
  background: var(--nab-score-track);
  overflow: hidden;
}
.nab-meter-track i {
  display: block; height: 100%;
  background: var(--nab-score-bar);
  transition: width .55s cubic-bezier(.4, 0, .2, 1);
}
.nab-meter-value {
  flex: none; font-weight: 700; font-size: 13px;
  color: var(--nab-text);
  font-variant-numeric: tabular-nums;
}
.nab-meter-label { flex: none; }
.nab-meter .nab-why-caret {
  flex: none; display: inline-flex; width: 12px; height: 12px;
  color: var(--nab-meta);
  transition: transform var(--nab-transition) ease;
}
.nab-meter .nab-why-caret svg { width: 100%; height: 100%; }
.nab-meter.is-open .nab-why-caret { transform: rotate(180deg); }
.nab-meter:hover .nab-meter-value { color: var(--nab-accent-solid); }

/* A taken name is a dead end until we offer an alternative — it recedes. */
.nab-card.is-taken { opacity: .74; }
.nab-card.is-taken .nab-card-name { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.nab-card.is-taken:hover { opacity: 1; }

/* ---------- Focus, and the host page's opinions -------------------------- */
/*
 * Two problems solved together.
 *
 * The widget sits inside somebody else's stylesheet, so a host theme that
 * styles `button:focus` — or the browser's own default — drew a heavy black
 * rectangle around every control the moment it was clicked. And a mouse click
 * should not leave a focus ring at all: only keyboard navigation should.
 *
 * :focus-visible draws the distinction the browser already knows how to make.
 */
#nab-ai-root button,
#nab-ai-root input,
#nab-ai-root select,
#nab-ai-root textarea,
#nab-ai-root [tabindex] {
  outline: none;
}
#nab-ai-root button:focus,
#nab-ai-root [tabindex]:focus {
  outline: none;
  box-shadow: none;
}

/* Keyboard users get a soft ring in the brand accent — never a black box. */
#nab-ai-root button:focus-visible,
#nab-ai-root a:focus-visible,
#nab-ai-root [tabindex]:focus-visible {
  outline: 2px solid var(--nab-accent-solid);
  outline-offset: 2px;
  border-radius: 9px;
}
#nab-ai-root input:focus-visible,
#nab-ai-root select:focus-visible,
#nab-ai-root textarea:focus-visible {
  outline: none;
  border-color: var(--nab-input-focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--nab-input-focus) 22%, transparent);
}

/* ---------- Controls ---------------------------------------------------- */
/* Sleeker buttons: a lift on hover, a real press, and a select that does not
   look like an unstyled form control from 2005. */

.nab-btn {
  transition: transform .14s cubic-bezier(.2,.9,.3,1),
              box-shadow .18s ease, filter .18s ease, background .18s ease;
}
.nab-btn-primary {
  box-shadow: 0 1px 2px rgba(16,24,64,.16), 0 6px 16px -6px color-mix(in srgb, var(--nab-accent-solid) 55%, transparent);
}
.nab-btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 2px 4px rgba(16,24,64,.18), 0 12px 24px -8px color-mix(in srgb, var(--nab-accent-solid) 62%, transparent);
}
.nab-btn:active { transform: translateY(0) scale(.985); }
.nab-btn-secondary:hover, .nab-btn-ghost:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--nab-accent-solid) 40%, var(--nab-card-border));
}

/* The sort control: a chevron we draw, not the platform's. */
.nab-select {
  appearance: none; -webkit-appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23808aa3' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.nab-select:hover { border-color: color-mix(in srgb, var(--nab-accent-solid) 40%, var(--nab-input-border)); }

/* Filter pills: quieter at rest, definite when on. */
.nab-filters .nab-chip {
  transition: transform .14s ease, border-color .16s ease, background .16s ease, color .16s ease;
}
.nab-filters .nab-chip:hover { transform: translateY(-1px); }
.nab-filters .nab-chip.is-active {
  box-shadow: 0 4px 12px -5px color-mix(in srgb, var(--nab-accent-solid) 70%, transparent);
}

/* Card tool icons: no boxes until you reach for them. */
.nab-action {
  border-radius: 9px;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.nab-action:hover { transform: translateY(-1px); }

/* Cards lift as a whole rather than each part having its own border. */
.nab-card {
  transition: transform .18s cubic-bezier(.2,.9,.3,1), box-shadow .2s ease,
              border-color .18s ease, background .18s ease;
}
.nab-card:hover {
  box-shadow: 0 10px 26px -12px rgba(16, 24, 64, .3);
}

/* =======================================================================
   Glass, density and motion
   ======================================================================= */

/*
 * Apple's glass is not a blur. A blur alone turns everything behind it into
 * grey mud; what reads as glass is blur *plus* a saturation boost, so the
 * colour of whatever is behind comes through brighter than life, plus a
 * hairline highlight along the top edge that gives the sheet thickness.
 * All three are tokens, so the effect can be dialled rather than toggled.
 */

#nab-ai-root[data-nab-glass] .nab-panel {
  background: color-mix(in srgb, var(--nab-panel-bg) calc(var(--nab-glass-alpha) * 1%), transparent);
  -webkit-backdrop-filter: blur(var(--nab-glass-blur)) saturate(calc(var(--nab-glass-saturate) * 1%));
          backdrop-filter: blur(var(--nab-glass-blur)) saturate(calc(var(--nab-glass-saturate) * 1%));
  border-color: color-mix(in srgb, var(--nab-glass-edge) 34%, var(--nab-panel-border));
}

/* The thickness of the sheet: a bright hairline on top, a soft one beneath. */
#nab-ai-root[data-nab-glass] .nab-panel::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--nab-glass-edge) 55%, transparent),
    inset 0 -1px 0 color-mix(in srgb, var(--nab-glass-edge) 12%, transparent);
  z-index: 1;
}

#nab-ai-root[data-nab-glass] .nab-header {
  background: color-mix(in srgb, var(--nab-header-bg) 88%, transparent);
}
#nab-ai-root[data-nab-glass] .nab-body,
#nab-ai-root[data-nab-glass] .nab-footer {
  background: transparent;
}

/* Level 2 frosts the cards and controls as well. */
#nab-ai-root[data-nab-glass="2"] .nab-card,
#nab-ai-root[data-nab-glass="2"] .nab-brief,
#nab-ai-root[data-nab-glass="2"] .nab-toolbar,
#nab-ai-root[data-nab-glass="2"] .nab-cart-tray {
  background: color-mix(in srgb, var(--nab-card-bg) calc(var(--nab-glass-alpha) * 0.82%), transparent);
  -webkit-backdrop-filter: blur(calc(var(--nab-glass-blur) * .55)) saturate(calc(var(--nab-glass-saturate) * 1%));
          backdrop-filter: blur(calc(var(--nab-glass-blur) * .55)) saturate(calc(var(--nab-glass-saturate) * 1%));
  border-color: color-mix(in srgb, var(--nab-glass-edge) 26%, var(--nab-card-border));
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--nab-glass-edge) 40%, transparent),
              var(--nab-card-shadow);
}
#nab-ai-root[data-nab-glass="2"] .nab-input,
#nab-ai-root[data-nab-glass="2"] .nab-select-button,
#nab-ai-root[data-nab-glass="2"] .nab-chip {
  background: color-mix(in srgb, var(--nab-input-bg) 62%, transparent);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
          backdrop-filter: blur(10px) saturate(150%);
}

/* A browser without backdrop-filter gets a solid surface rather than a
   see-through one with no blur, which would be unreadable. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  #nab-ai-root[data-nab-glass] .nab-panel,
  #nab-ai-root[data-nab-glass="2"] .nab-card,
  #nab-ai-root[data-nab-glass="2"] .nab-brief,
  #nab-ai-root[data-nab-glass="2"] .nab-toolbar {
    background: var(--nab-panel-bg);
  }
  #nab-ai-root[data-nab-glass="2"] .nab-card { background: var(--nab-card-bg); }
}

/* Density scales the padding, never the type — text stays legible at every
   setting and only the breathing room changes. */
#nab-ai-root { --nab-pad: calc(1px * var(--nab-density, 1)); }
.nab-body {
  --nab-body-pad-x: calc(16 * var(--nab-pad));
  --nab-body-pad-top: calc(16 * var(--nab-pad));
  padding: var(--nab-body-pad-top) var(--nab-body-pad-x) calc(18 * var(--nab-pad));
}
.nab-card    { padding: calc(15 * var(--nab-pad)) calc(16 * var(--nab-pad)); }
.nab-brief   { padding: calc(9 * var(--nab-pad)) calc(12 * var(--nab-pad)) calc(10 * var(--nab-pad)); }
.nab-list    { gap: calc(10 * var(--nab-pad)); }

/* Hover off means nothing moves — for a page that wants the widget still. */
#nab-ai-root[data-nab-hover="off"] .nab-card:hover,
#nab-ai-root[data-nab-hover="off"] .nab-btn:hover,
#nab-ai-root[data-nab-hover="off"] .nab-chip:hover,
#nab-ai-root[data-nab-hover="off"] .nab-action:hover,
#nab-ai-root[data-nab-hover="off"] .nab-launcher:hover {
  transform: none;
}
#nab-ai-root[data-nab-hover="off"] .nab-card:hover {
  box-shadow: var(--nab-card-shadow);
}

/* =======================================================================
   Inputs
   ======================================================================= */

.nab-input, .nab-textarea {
  border-radius: calc(var(--nab-radius) * .62);
  transition: border-color .16s ease, box-shadow .18s ease, background .16s ease;
}
.nab-input:hover:not(:focus), .nab-textarea:hover:not(:focus) {
  border-color: color-mix(in srgb, var(--nab-accent-solid) 34%, var(--nab-input-border));
}
.nab-input::placeholder, .nab-textarea::placeholder {
  color: var(--nab-input-placeholder);
  opacity: 1;
}

/* The main search field earns more presence than a form input. */
.nab-search-field {
  position: relative;
  border-radius: calc(var(--nab-radius) * .78);
  transition: box-shadow .2s ease, border-color .18s ease, transform .18s ease;
}
.nab-search-field:focus-within {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--nab-input-focus) 18%, transparent),
              0 10px 30px -14px color-mix(in srgb, var(--nab-accent-solid) 80%, transparent);
}

/* =======================================================================
   The select
   ======================================================================= */
/* A native <select> cannot be styled inside its own popup, so the sort control
   is a listbox we draw: a button, a floating panel, and real keyboard support.
   The native element stays in the DOM for forms and assistive tech that
   prefers it. */

.nab-select-wrap { position: relative; display: inline-flex; }
.nab-select-wrap select.nab-select-native {
  position: absolute; inset: 0;
  opacity: 0; pointer-events: none;
  width: 100%; height: 100%;
}

.nab-select-button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 11px 8px 13px;
  border: 1px solid var(--nab-input-border);
  border-radius: calc(var(--nab-radius) * .62);
  background: var(--nab-input-bg);
  color: var(--nab-input-text);
  font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .16s ease, box-shadow .18s ease, transform .14s ease;
}
.nab-select-button:hover { border-color: color-mix(in srgb, var(--nab-accent-solid) 40%, var(--nab-input-border)); }
.nab-select-wrap.is-open .nab-select-button {
  border-color: var(--nab-input-focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--nab-input-focus) 20%, transparent);
}
.nab-select-caret { display: inline-flex; width: 13px; height: 13px; opacity: .6; transition: transform .18s ease; }
.nab-select-caret svg { width: 100%; height: 100%; }
.nab-select-wrap.is-open .nab-select-caret { transform: rotate(180deg); opacity: 1; }

.nab-select-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  z-index: 30;
  min-width: 100%;
  max-height: 264px; overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--nab-card-border);
  border-radius: calc(var(--nab-radius) * .72);
  background: var(--nab-card-bg);
  box-shadow: 0 20px 48px -16px rgba(16,24,64,.34), 0 2px 6px rgba(16,24,64,.08);
  animation: nab-select-in .14s cubic-bezier(.2,.9,.3,1);
}
@keyframes nab-select-in {
  from { opacity: 0; transform: translateY(-6px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
#nab-ai-root[data-nab-glass] .nab-select-menu {
  background: color-mix(in srgb, var(--nab-card-bg) 82%, transparent);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
          backdrop-filter: blur(22px) saturate(180%);
}

.nab-option {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 8px 10px;
  border: 0; border-radius: calc(var(--nab-radius) * .45);
  background: transparent;
  color: var(--nab-text);
  font: inherit; font-size: 13px;
  text-align: left; cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.nab-option:hover, .nab-option.is-cursor { background: var(--nab-accent-soft); }
.nab-option.is-selected { color: var(--nab-accent-solid); font-weight: 650; }
.nab-option-tick { width: 14px; height: 14px; flex: none; opacity: 0; }
.nab-option-tick svg { width: 100%; height: 100%; }
.nab-option.is-selected .nab-option-tick { opacity: 1; }

/* =======================================================================
   Buttons
   ======================================================================= */

.nab-btn {
  border-radius: calc(var(--nab-radius) * .62);
  font-weight: 650;
  letter-spacing: -.005em;
  position: relative;
  overflow: hidden;
}
/* A light sweep across the top edge is what separates a premium button from a
   coloured rectangle. It is drawn, not animated, so it costs nothing. */
.nab-btn-primary::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0) 52%);
}
.nab-btn-primary:disabled, .nab-btn:disabled { opacity: .55; cursor: default; transform: none; }
.nab-btn-primary.is-done { filter: saturate(.7); }

#nab-ai-root[data-nab-glass] .nab-btn-secondary,
#nab-ai-root[data-nab-glass] .nab-btn-ghost {
  background: color-mix(in srgb, var(--nab-btn-secondary-bg) 55%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
          backdrop-filter: blur(12px) saturate(160%);
  border-color: color-mix(in srgb, var(--nab-glass-edge) 30%, var(--nab-card-border));
}

/* =======================================================================
   Scale
   =======================================================================
   The single biggest reason this read as a consumer chat widget rather than
   a professional tool: everything sat within a few pixels of everything else
   — chips, buttons, the select and the body text all around 15px, all around
   46px tall, all on the same radius. A tool has range. One thing is large and
   carries the decision; everything around it is small, quiet and consistent.
   ======================================================================= */

/* ---- Header: a bar, not a banner --------------------------------------- */

.nab-header {
  padding: 0 10px 0 14px;
  height: 54px;
  gap: 10px;
  border-bottom: 1px solid var(--nab-header-border);
}
.nab-header-mark {
  width: 24px; height: 24px;
  color: var(--nab-header-mark-solid, var(--nab-accent-solid));
}
.nab-header-mark svg { width: 19px; height: 19px; }
.nab-header-mark .nab-logo { width: 24px; height: 24px; border-radius: 6px; }
.nab-header-mark .nab-emoji { font-size: 17px; }
.nab-header-title {
  font-size: 13.5px; font-weight: 650;
  letter-spacing: -.01em;
}
.nab-header-btn {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: transparent;
  color: var(--nab-header-icon-solid, var(--nab-meta));
  transition: background .14s ease, color .14s ease;
}
.nab-header-btn:hover {
  background: var(--nab-header-control);
  color: var(--nab-text);
  filter: none;
}
.nab-header-btn svg { width: 16px; height: 16px; }
.nab-header-actions { gap: 2px; }

/* ---- The brief: a caption, not a card ---------------------------------- */

.nab-brief {
  background: transparent;
  border-bottom: 1px solid var(--nab-divider);
  border-radius: 0;
  padding: 2px 0 11px;
  margin: 0 0 12px;
}
.nab-brief-eyebrow { font-size: 9.5px; letter-spacing: .1em; }
.nab-brief-edit { font-size: 11.5px; }
.nab-brief-chips { margin-top: 8px; gap: 4px; }
.nab-brief-chips .nab-chip {
  padding: 3px 8px;
  font-size: 11px; font-weight: 600;
  border-radius: 6px;
}
.nab-brief-tlds { font-size: 11px; margin-top: 5px; }

/* ---- Toolbar: dense --------------------------------------------------- */

/* Dense: tighten the vertical rhythm only. The horizontal padding is what
   keeps the bar's content off the panel edge while its background reaches it,
   so the shorthand must not reset it. */
.nab-toolbar { padding-block: 0 9px; }
.nab-results-head { margin-bottom: 8px; }
.nab-h2, .nab-live-count {
  font-size: 15px; font-weight: 700;
  letter-spacing: -.02em;
}

.nab-select-button {
  padding: 6px 8px 6px 11px;
  font-size: 12.5px;
  border-radius: 8px;
}
.nab-select-caret { width: 12px; height: 12px; }

.nab-filters { gap: 5px; }
.nab-filters .nab-chip {
  padding: 4px 10px;
  font-size: 11.5px; font-weight: 600;
  border-radius: 7px;
  line-height: 1.5;
}

/* ---- Card: one big thing, everything else quiet ------------------------ */

.nab-card { border-radius: calc(var(--nab-radius) * .72); }
.nab-card-head { margin-bottom: 7px; }
.nab-card-name { font-size: 22px; letter-spacing: -.032em; }
.nab-price-value { font-size: 13px; }
.nab-price-term { font-size: 10.5px; }

.nab-facts { font-size: 11.5px; gap: 3px 11px; margin-bottom: 7px; }
.nab-state { font-weight: 700; letter-spacing: .002em; }
.nab-state-dot { width: 5px; height: 5px; }

.nab-why { font-size: 12.5px; margin-top: 7px; }
.nab-why-toggle, .nab-meter { font-size: 11.5px; margin-top: 9px; }
.nab-meter-value { font-size: 12px; }

.nab-card-actions { margin-top: 10px; padding-top: 9px; }
.nab-action { padding: 5px 6px; }
.nab-action svg { width: 14px; height: 14px; }
.nab-action-labelled { font-size: 11.5px; }

/* The one thing on the card that should look pressable. */
.nab-card-cta {
  padding: 8px 15px;
  font-size: 12.5px; font-weight: 700;
  border-radius: 9px;
}

/* ---- Buttons and inputs at the new scale ------------------------------- */

.nab-btn { padding: 9px 15px; font-size: 13px; }
.nab-btn-sm { padding: 6px 11px; font-size: 12px; }
.nab-btn-block { padding: 11px 18px; font-size: 13.5px; }

.nab-input, .nab-textarea { font-size: 13.5px; padding: 10px 12px; }
.nab-chip { font-size: 12px; }
.nab-label { font-size: 10px; letter-spacing: .09em; }

/* ---- The scores behind the disclosure ---------------------------------- */

.nab-score { font-size: 11.5px; }
.nab-score-track { height: 4px; }

/* ---- Footer ------------------------------------------------------------ */

.nab-footer { padding: 9px 16px; font-size: 11px; }

/* The advanced drawer: a label beside its control rather than above it, so a
   row of pickers reads as a form and not as a stack of headings. */
.nab-group-inline {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.nab-group-inline .nab-label { margin-bottom: 0; flex: none; }
.nab-group-inline .nab-select-wrap { flex: 1; min-width: 0; justify-content: flex-end; }
.nab-group-inline .nab-select-button { max-width: 100%; }
.nab-group-inline .nab-select-caption {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- Voice input -------------------------------------------------- */

.nab-input-wrap { position: relative; }
.nab-input-wrap.has-mic .nab-search-input { padding-right: 40px; }

/* Just the icon. A boxed button inside the text field reads as a second
   field; the microphone is a mark on the one that is already there. */
.nab-mic {
  position: absolute; right: 10px; bottom: 10px;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--nab-meta);
  cursor: pointer;
  transition: color .16s ease, background .16s ease, transform .14s ease;
}
.nab-mic:hover { color: var(--nab-accent-solid); background: transparent; transform: none; }
.nab-mic-icon { display: grid; place-items: center; width: 19px; height: 19px; position: relative; z-index: 1; }
.nab-mic-icon svg { width: 100%; height: 100%; }

/* Listening is the one state that earns a fill — it is reporting that a
   microphone is live, which the visitor must not be able to miss. */
.nab-mic.is-listening {
  color: var(--nab-danger-solid);
  background: transparent;
}
/* A ring that keeps expanding for as long as it is listening — the one place
   in the widget where continuous motion is the correct answer, because it is
   reporting that a microphone is live. */
.nab-mic-pulse { position: absolute; inset: 0; border-radius: inherit; }
.nab-mic.is-listening .nab-mic-pulse::after {
  content: '';
  position: absolute; inset: -1px;
  border-radius: inherit;
  border: 2px solid var(--nab-danger-solid);
  animation: nab-mic-ring 1.5s ease-out infinite;
}
@keyframes nab-mic-ring {
  0%   { transform: scale(1); opacity: .75; }
  100% { transform: scale(1.7); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .nab-mic.is-listening .nab-mic-pulse::after { animation: none; opacity: .5; }
}

/* ---------- The greeting ------------------------------------------------- */

.nab-greeting {
  position: fixed;
  z-index: calc(var(--nab-z) - 1);
  width: 290px; max-width: calc(100vw - 40px);
  padding: 14px 16px 15px;
  border: 1px solid var(--nab-card-border);
  border-radius: calc(var(--nab-radius) * .82);
  background: var(--nab-card-bg);
  box-shadow: 0 18px 44px -14px rgba(16,24,64,.34), 0 2px 6px rgba(16,24,64,.08);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px) scale(.97);
  transition: opacity .24s ease, transform .28s cubic-bezier(.2,.9,.3,1);
}
.nab-greeting.is-in { opacity: 1; transform: none; }
.nab-greeting.nab-side-right { right: 24px; bottom: 96px; }
.nab-greeting.nab-side-left  { left: 24px;  bottom: 96px; }

#nab-ai-root[data-nab-glass] .nab-greeting {
  background: color-mix(in srgb, var(--nab-card-bg) calc(var(--nab-glass-alpha) * 1%), transparent);
  -webkit-backdrop-filter: blur(var(--nab-glass-blur)) saturate(calc(var(--nab-glass-saturate) * 1%));
          backdrop-filter: blur(var(--nab-glass-blur)) saturate(calc(var(--nab-glass-saturate) * 1%));
}

/* The little tail that ties the bubble to the launcher. */
.nab-greeting::after {
  content: '';
  position: absolute; bottom: -6px;
  width: 12px; height: 12px;
  background: inherit;
  border-right: 1px solid var(--nab-card-border);
  border-bottom: 1px solid var(--nab-card-border);
  transform: rotate(45deg);
}
.nab-greeting.nab-side-right::after { right: 26px; }
.nab-greeting.nab-side-left::after  { left: 26px; }

.nab-greeting-text {
  margin: 0; padding-right: 18px;
  font-size: 13.5px; line-height: 1.5;
  color: var(--nab-text);
}
.nab-greeting-close {
  position: absolute; top: 8px; right: 8px;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border: 0; border-radius: 6px;
  background: transparent;
  color: var(--nab-meta);
  cursor: pointer;
  opacity: .55;
  transition: opacity .14s ease, background .14s ease;
}
.nab-greeting-close:hover { opacity: 1; background: var(--nab-accent-soft); }
.nab-greeting-close svg { width: 13px; height: 13px; }

.nab-greeting-examples { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 11px; }
.nab-greeting-example {
  padding: 5px 10px;
  border: 1px solid var(--nab-chip-border);
  border-radius: 7px;
  background: var(--nab-chip-bg);
  color: var(--nab-chip-text);
  font: inherit; font-size: 11.5px; font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color .14s ease, color .14s ease, transform .14s ease;
}
.nab-greeting-example:hover {
  border-color: var(--nab-accent-solid);
  color: var(--nab-accent-solid);
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .nab-greeting { transition: opacity .01ms; transform: none; }
}

/* ---------- Scrollbars --------------------------------------------------- */
/* Every scrolling surface in the widget, in the brand accent, 2px wide — the
   host page's scrollbar is not ours to touch, but nothing inside the widget
   should show a platform default. */

#nab-ai-root,
#nab-ai-root * {
  scrollbar-width: thin;
  scrollbar-color: var(--nab-scrollbar-solid, var(--nab-accent-solid)) transparent;
}
#nab-ai-root::-webkit-scrollbar,
#nab-ai-root *::-webkit-scrollbar { width: 2px; height: 2px; }
#nab-ai-root::-webkit-scrollbar-track,
#nab-ai-root *::-webkit-scrollbar-track { background: transparent; }
#nab-ai-root::-webkit-scrollbar-thumb,
#nab-ai-root *::-webkit-scrollbar-thumb {
  background: var(--nab-scrollbar);
  border: 0;
  background-clip: border-box;
  border-radius: 99px;
}
#nab-ai-root *::-webkit-scrollbar-thumb:hover {
  background: var(--nab-scrollbar-hover, var(--nab-scrollbar));
}
#nab-ai-root *::-webkit-scrollbar-corner { background: transparent; }

/* ---------- The brief, at rest ------------------------------------------ */
/* One line by default. The eyebrow and the chips are the expanded view, and a
   brief the visitor typed thirty seconds ago does not earn three rows above
   the results they asked for. */

.nab-brief-line {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 10px;
  margin-top: 5px;
  font-size: 12px; line-height: 1.5;
}
.nab-brief-summary { color: var(--nab-text); font-weight: 600; }
.nab-brief-line .nab-brief-tlds { width: auto; margin: 0; }

/* Expanded shows the chips instead of the line — never both. */
.nab-brief:not(.is-collapsed) .nab-brief-line { display: none; }
.nab-brief.is-collapsed .nab-brief-line { display: flex; }

/* ---------- Full screen on mobile, when asked for ----------------------- */
/* The stylesheet used to go full screen on any narrow window regardless of
   the setting, which is why the toggle appeared to do nothing. */

@media (max-width: 560px) {
  #nab-ai-root[data-nab-mobile="panel"] .nab-panel:not(.nab-inline) {
    inset: auto;
    right: 12px; left: 12px; bottom: 84px;
    width: auto; height: auto;
    max-height: calc(100vh - 120px);
    border-radius: var(--nab-radius);
    border: 1px solid var(--nab-panel-border);
    transform: translateY(14px) scale(.985);
  }
  #nab-ai-root[data-nab-mobile="panel"].is-open .nab-panel:not(.nab-inline) {
    transform: none;
  }
}

/* A domain nobody could check reads as its own state — neither the green of
   available nor the grey of taken, because it is neither. */
.nab-state.is-unknown { color: var(--nab-warning-solid); cursor: help; }
.nab-card.is-unknown { opacity: 1; }
.nab-card.is-unknown .nab-card-name { text-decoration: none; }

/* Text over glass keeps its full weight and colour. A translucent surface
   already costs contrast; letting the type fade as well is what turned a
   frosted panel into an unreadable one. */
#nab-ai-root[data-nab-glass] .nab-card-name,
#nab-ai-root[data-nab-glass] .nab-h1,
#nab-ai-root[data-nab-glass] .nab-h2,
#nab-ai-root[data-nab-glass] .nab-why,
#nab-ai-root[data-nab-glass] .nab-brief-summary,
#nab-ai-root[data-nab-glass] .nab-facts {
  text-shadow: 0 1px 0 color-mix(in srgb, var(--nab-glass-edge) 45%, transparent);
}
#nab-ai-root[data-nab-glass] .nab-brief-summary,
#nab-ai-root[data-nab-glass] .nab-facts,
#nab-ai-root[data-nab-glass] .nab-brief-tlds {
  color: var(--nab-text);
}

/* ========================================================================
   Premium modal composition — v2.9.2
   The finder is a product surface, not a chat bubble. These rules keep the
   launcher lightweight while giving the opened experience a deliberate modal
   hierarchy, stronger spacing and room for results.
   ======================================================================== */

.nab-overlay {
  background: color-mix(in srgb, var(--nab-overlay-bg) 92%, rgba(4,8,18,.72));
  backdrop-filter: blur(max(8px, var(--nab-backdrop-blur))) saturate(112%);
}

.nab-panel.nab-place-center {
  width: min(var(--nab-panel-width), calc(100vw - 48px));
  height: min(var(--nab-panel-height), calc(100vh - 64px));
  max-height: calc(100vh - 64px);
  border-radius: max(18px, var(--nab-radius));
  border-color: color-mix(in srgb, var(--nab-panel-border) 86%, transparent);
  box-shadow:
    0 42px 110px -38px rgba(7, 12, 28, .62),
    0 18px 42px -26px rgba(7, 12, 28, .34),
    var(--nab-panel-shadow);
}

.nab-panel.nab-place-center .nab-header {
  min-height: 72px;
  padding: 16px 22px;
  gap: 13px;
  border-bottom: 1px solid var(--nab-header-border);
}

.nab-panel.nab-place-center .nab-header-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--nab-accent-soft);
  color: var(--nab-accent-solid);
}

.nab-panel.nab-place-center .nab-header-title {
  font-size: 15.5px;
  letter-spacing: -.012em;
}

.nab-panel.nab-place-center .nab-header-subtitle {
  margin-top: 2px;
  font-size: 12px;
}

.nab-panel.nab-place-center .nab-header-actions { gap: 7px; }
.nab-panel.nab-place-center .nab-header-btn {
  width: 34px;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--nab-header-border) 80%, transparent);
  border-radius: 10px;
}

.nab-panel.nab-place-center .nab-body {
  /*
   * --nab-pad is a length (1px scaled by density), so it is the multiplier
   * that must be unitless. `24px * 1px` is px², which CSS cannot represent:
   * the declaration becomes invalid at computed-value time, and — unlike an
   * ordinary parse error — that does not fall back to the earlier rule, it
   * falls back to the initial value. The modal body's padding computed to 0
   * and every heading, chip and dropdown in the sticky toolbar sat flush
   * against the panel edge.
   */
  --nab-body-pad-x: calc(24 * var(--nab-pad));
  --nab-body-pad-top: calc(24 * var(--nab-pad));
  padding: var(--nab-body-pad-top) var(--nab-body-pad-x) calc(28 * var(--nab-pad));
}

.nab-panel.nab-place-center .nab-h1 {
  font-size: clamp(24px, 3.5cqi, 32px);
  line-height: 1.08;
  letter-spacing: -.042em;
  max-width: 17em;
}

.nab-panel.nab-place-center .nab-lead {
  max-width: 54em;
  font-size: 13.5px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.nab-panel.nab-place-center .nab-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 10px;
  margin-bottom: 13px;
  border: 1px solid color-mix(in srgb, var(--nab-input-border) 90%, transparent);
  border-radius: calc(var(--nab-input-radius) + 6px);
  background: color-mix(in srgb, var(--nab-card-bg) 94%, transparent);
  box-shadow: 0 8px 26px -22px rgba(12, 20, 48, .42);
}

.nab-panel.nab-place-center .nab-input-wrap { margin: 0; }
.nab-panel.nab-place-center .nab-search-input {
  min-height: 68px;
  padding: 11px 12px;
  border-color: transparent;
  background: transparent;
  resize: none;
  box-shadow: none;
}
.nab-panel.nab-place-center .nab-search-input:focus {
  border-color: transparent;
  box-shadow: none;
}
.nab-panel.nab-place-center .nab-form > .nab-btn {
  min-height: 44px;
  padding-inline: 20px;
  margin: 0;
}

.nab-panel.nab-place-center .nab-filters {
  padding: 2px 0 14px;
  margin-bottom: 4px;
}

.nab-panel.nab-place-center .nab-results-head {
  padding-top: 6px;
  margin-bottom: 11px;
}

.nab-panel.nab-place-center .nab-card {
  border-color: color-mix(in srgb, var(--nab-card-border) 92%, transparent);
  box-shadow: 0 8px 28px -25px rgba(12, 20, 48, .48), var(--nab-card-shadow);
}

.nab-panel.nab-place-center .nab-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px -28px rgba(12, 20, 48, .56), var(--nab-card-shadow);
}

@container nabpanel (min-width: 650px) {
  /*
   * One name per row.
   *
   * Two columns fits more cards on screen and makes them harder to use: the
   * eye has to scan in two directions to compare prices, each card is half as
   * wide so the name and its price stop sharing a line, and the ranking that
   * decides the order stops being readable — second-best ends up beside best
   * rather than under it. A domain list is a ranked table of options; a table
   * has one row per option.
   */
  .nab-panel.nab-place-center .nab-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  /* Two abreast, when the store has chosen it and there is room for it. */
  #nab-ai-root[data-nab-columns="2"] .nab-panel.nab-place-center .nab-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .nab-panel.nab-place-center .nab-card { min-width: 0; }
  .nab-panel.nab-place-center .nab-card-name { font-size: 20px; }
  .nab-panel.nab-place-center .nab-card-actions { align-items: flex-end; }
  .nab-panel.nab-place-center .nab-card-tools { flex-wrap: wrap; }
}

@container nabpanel (max-width: 649px) {
  .nab-panel.nab-place-center .nab-form { grid-template-columns: 1fr; }
  .nab-panel.nab-place-center .nab-form > .nab-btn { width: 100%; }
}

@media (max-width: 640px) {
  .nab-panel.nab-place-center {
    width: calc(100vw - 20px);
    height: calc(100dvh - 20px);
    max-width: none;
    max-height: none;
    border-radius: 18px;
  }
  .nab-panel.nab-place-center .nab-header { min-height: 64px; padding: 13px 15px; }
  .nab-panel.nab-place-center .nab-body {
    --nab-body-pad-x: 15px;
    --nab-body-pad-top: 18px;
    padding: 18px 15px 22px;
  }
  .nab-panel.nab-place-center .nab-h1 { font-size: 25px; }
}

/* ========================================================================
   Advanced search workspace + compact dropdowns — v2.9.2
   ======================================================================== */

.nab-advanced {
  margin-top: 14px;
  border: 1px solid var(--nab-card-border);
  border-radius: calc(var(--nab-radius) * .82);
  background: color-mix(in srgb, var(--nab-card-bg) 92%, var(--nab-body-bg));
  overflow: visible;
}

.nab-advanced-toggle {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px 12px 16px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--nab-text);
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: background var(--nab-transition) ease;
}
.nab-advanced-toggle:hover,
.nab-advanced-toggle.is-open {
  background: color-mix(in srgb, var(--nab-accent-soft) 58%, transparent);
}
.nab-advanced-toggle-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nab-advanced-toggle-copy strong {
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: -.01em;
  color: var(--nab-heading);
}
.nab-advanced-toggle-copy small {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--nab-meta);
  font-weight: 500;
}
.nab-advanced-chevron {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  flex: none;
  border: 1px solid var(--nab-card-border);
  border-radius: 9px;
  background: var(--nab-card-bg);
  color: var(--nab-meta);
  transition: transform .18s ease, color .18s ease, border-color .18s ease;
}
.nab-advanced-chevron svg { width: 15px; height: 15px; }
.nab-advanced-toggle.is-open .nab-advanced-chevron {
  transform: rotate(180deg);
  color: var(--nab-accent-solid);
  border-color: color-mix(in srgb, var(--nab-accent-solid) 38%, var(--nab-card-border));
}

.nab-advanced-panel {
  padding: 0 14px 14px;
  border-top: 1px solid var(--nab-divider);
  animation: nab-advanced-in .18s cubic-bezier(.2,.8,.2,1);
}
.nab-advanced-panel[hidden] { display: none; }
@keyframes nab-advanced-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.nab-advanced-section {
  padding: 14px 2px;
  border-bottom: 1px solid var(--nab-divider);
}
.nab-advanced-section:last-child { border-bottom: 0; padding-bottom: 2px; }
.nab-advanced-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.nab-advanced-section-head strong {
  font-size: 11px;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: .085em;
  color: var(--nab-heading);
}
.nab-advanced-section-head span {
  max-width: 58%;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--nab-meta);
  text-align: right;
}
.nab-advanced-section-body { min-width: 0; }

.nab-advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}
.nab-advanced-field {
  min-width: 0;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--nab-card-border) 84%, transparent);
  border-radius: calc(var(--nab-radius) * .58);
  background: color-mix(in srgb, var(--nab-input-bg) 72%, transparent);
}
.nab-advanced-field.is-stack { display: block; }
.nab-advanced-field-label {
  flex: none;
  font-size: 11.5px;
  line-height: 1.35;
  font-weight: 650;
  color: var(--nab-text);
}
.nab-advanced-field.is-stack .nab-advanced-field-label { margin-bottom: 8px; }

/* Compact by design: the previous flex rule stretched every select across the
   drawer and made the option popup look like another panel. */
.nab-advanced-field .nab-select-wrap {
  flex: 0 1 226px;
  width: min(226px, 62%);
  min-width: 0;
  justify-content: flex-end;
}
.nab-advanced-field .nab-select-button {
  width: 100%;
  min-width: 0;
  justify-content: space-between;
  padding: 7px 9px 7px 11px;
}
.nab-advanced-field .nab-select-caption {
  display: block;
  min-width: 0;
  max-width: 178px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nab-advanced-field .nab-select-menu {
  right: 0;
  left: auto;
  min-width: 210px;
  width: max-content;
  max-width: min(252px, calc(100vw - 34px));
}

/* Keep every custom popup compact, including the results sort control. */
.nab-select-menu {
  min-width: 176px;
  width: max-content;
  max-width: min(260px, calc(100vw - 34px));
}
.nab-option { min-width: 0; }
.nab-option > span:not(.nab-option-tick) { min-width: 0; }
.nab-results-head .nab-select-button { min-width: 132px; justify-content: space-between; }

.nab-choice-chips { gap: 6px; }
.nab-choice-chips .nab-chip {
  padding: 6px 10px;
  border-radius: calc(var(--nab-chip-radius) * .72);
}
.nab-tld-choices { max-height: 124px; overflow: auto; padding-right: 2px; scrollbar-width: thin; }
.nab-range-row { display: flex; align-items: center; gap: 10px; }
.nab-range-row .nab-range { flex: 1; min-width: 0; }
.nab-range-row .nab-range-value {
  min-width: 30px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  padding: 0 7px;
  border: 1px solid var(--nab-card-border);
  border-radius: 8px;
  background: var(--nab-card-bg);
  color: var(--nab-heading);
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 620px) {
  .nab-advanced-section-head { display: block; }
  .nab-advanced-section-head span { display: block; max-width: none; margin-top: 3px; text-align: left; }
  .nab-advanced-grid { grid-template-columns: minmax(0, 1fr); }
  .nab-advanced-field .nab-select-wrap { width: min(220px, 64%); }
}

/* ---------- Expanded panel --------------------------------------------- *
 *
 * One control, one extra width. Comparing eight names side by side wants a
 * wider table than the default, and the visitor is the one who knows when
 * they are doing that — so it is their switch, not a setting.
 */
.nab-panel.is-expanded {
  width: min(var(--nab-panel-expanded-width, 1180px), calc(100vw - 48px));
  max-width: none;
}
.nab-panel.is-expanded.nab-place-center {
  width: min(var(--nab-panel-expanded-width, 1180px), calc(100vw - 48px));
}
.nab-expand-btn { transition: transform var(--nab-transition) ease; }
.nab-expand-btn:hover { transform: scale(1.06); }

/*
 * Wider means a roomier row, not more columns.
 *
 * Expanding is for reading one name against the next more comfortably — more
 * space for the name, the evidence and the price on a single line — not for
 * packing three abreast, which is the same comparison problem three times
 * over.
 */
@container nabpanel (min-width: 1000px) {
  .nab-list { display: flex; flex-direction: column; }
  #nab-ai-root[data-nab-columns="2"] .nab-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nab-card { padding-inline: 24px; }
  .nab-card-name { font-size: 22px; }

  /* Expanded mode uses the extra room instead of merely widening blank
     margins. The primary action moves beside the brief and examples gain a
     third lane; the configured one/two-column result preference is preserved. */
  .nab-panel.is-expanded .nab-search .nab-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
  }
  .nab-panel.is-expanded .nab-search .nab-form > .nab-btn { width: auto; min-width: 190px; }
  .nab-panel.is-expanded .nab-search .nab-form > .nab-hint { grid-column: 1 / -1; }
  .nab-panel.is-expanded .nab-examples .nab-chips { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 640px) {
  /* On a phone the sheet is already the full width; the control would do
     nothing, so it is not offered. */
  .nab-expand-btn { display: none; }
  .nab-panel.is-expanded { width: 100%; }
}

/* ---------- Inline embed ------------------------------------------------ *
 *
 * The root moves into the host element, so it stops being a fixed-position
 * overlay host and becomes an ordinary block in the page's flow. The backdrop
 * goes with it: there is nothing to dim behind an embedded panel. Inline also
 * overrides the placement classes — a centred dialog's translate(-50%, -50%)
 * on a relatively-positioned block moves it half its own size off the corner
 * of the page it was embedded in.
 */
#nab-ai-root.nab-root-inline {
  position: static;
  display: block;
  width: 100%;
}
#nab-ai-root.nab-root-inline .nab-overlay { display: none; }
#nab-ai-root.nab-root-inline .nab-launcher,
#nab-ai-root.nab-root-inline .nab-greeting { display: none; }

.nab-panel.nab-inline,
.nab-panel.nab-inline.nab-place-center,
.nab-panel.nab-inline.nab-place-fullscreen,
#nab-ai-root.is-open .nab-panel.nab-inline,
#nab-ai-root.is-open .nab-panel.nab-inline.nab-place-center {
  position: relative;
  inset: auto;
  left: auto; top: auto; right: auto; bottom: auto;
  opacity: 1;
  transform: none;
  pointer-events: auto;
  width: 100%; max-width: none;
  height: auto; max-height: none;
  box-shadow: none;
}

/* 3.1: clearer first-use hierarchy; all surfaces inherit the selected theme. */
#nab-ai-root .nab-search { width: 100%; max-width: 100%; margin-inline: auto; padding-block: 12px 20px; }
#nab-ai-root .nab-search-eyebrow { color: var(--nab-text-muted); font-size: 11px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 18px; }
#nab-ai-root .nab-search .nab-h1 { font-size: var(--nab-welcome-size, 36px); line-height: 1.2; letter-spacing: var(--nab-heading-tracking); max-width: 100%; text-align: var(--nab-welcome-align, center); margin-bottom: 16px; text-wrap: balance; }
#nab-ai-root .nab-search .nab-lead { max-width: 100%; line-height: 1.65; margin-bottom: 24px; text-align: var(--nab-welcome-align, center); }
#nab-ai-root .nab-search-input { min-height: 128px; padding: 20px; font-size: 16px; line-height: 1.65; border-radius: var(--nab-input-radius); resize: vertical; }
#nab-ai-root .nab-search-input:focus { box-shadow: 0 0 0 3px var(--nab-focus-ring); outline: none; }
#nab-ai-root .nab-quick-modes { display: flex; gap: 7px; flex-wrap: wrap; margin: 14px 0 18px; }
#nab-ai-root .nab-quick-modes .nab-chip { min-height: 38px; padding: 8px 13px; }
#nab-ai-root .nab-search .nab-btn-block { min-height: 50px; border-radius: var(--nab-btn-radius); font-weight: var(--nab-btn-weight); }
#nab-ai-root .nab-examples { margin-top: 28px; }
#nab-ai-root .nab-examples .nab-chips { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
#nab-ai-root .nab-examples .nab-chip { text-align: left; white-space: normal; border-radius: var(--nab-input-radius); padding: 13px 15px; line-height: 1.5; min-height: 64px; }
#nab-ai-root .nab-card { border-radius: var(--nab-card-radius); padding: var(--nab-card-padding); transition: box-shadow var(--nab-transition) ease, border-color var(--nab-transition) ease; }
#nab-ai-root .nab-card-name { letter-spacing: -.025em; overflow-wrap: anywhere; }
#nab-ai-root .nab-card-actions { gap: 12px; }
#nab-ai-root [aria-pressed="true"] { font-weight: 750; }
#nab-ai-root button:focus-visible { outline: 3px solid var(--nab-focus-ring); outline-offset: 3px; }
@media (max-width: 480px) {
  #nab-ai-root .nab-search { padding-block: 4px 12px; }
  #nab-ai-root .nab-search .nab-h1 { font-size: min(var(--nab-welcome-size, 36px), 30px); }
  #nab-ai-root .nab-examples .nab-chips { grid-template-columns: 1fr; }
  #nab-ai-root .nab-examples .nab-chip { min-height: 44px; }
  #nab-ai-root .nab-chip { min-height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  #nab-ai-root *, #nab-ai-root *::before, #nab-ai-root *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
#nab-ai-root .nab-search .nab-form { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: calc(16 * var(--nab-pad, 1px)); }
#nab-ai-root .nab-search .nab-input-wrap { width: 100%; min-width: 0; }
#nab-ai-root .nab-search .nab-search-input { width: 100%; }
#nab-ai-root .nab-search .nab-form > .nab-btn { width: 100%; min-width: 0; }
#nab-ai-root .nab-search .nab-form > .nab-hint { margin: 12px 0 0; text-align: center; }

@container nabpanel (min-width: 1000px) {
  #nab-ai-root .nab-panel.is-expanded .nab-search .nab-form {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:end;
    gap:12px;
  }
  #nab-ai-root .nab-panel.is-expanded .nab-search .nab-form > .nab-btn { width:auto; min-width:190px; }
  #nab-ai-root .nab-panel.is-expanded .nab-search .nab-form > .nab-hint { grid-column:1/-1; }
  #nab-ai-root .nab-panel.is-expanded .nab-examples .nab-chips { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  #nab-ai-root:not([data-nab-mobile="panel"]) .nab-panel:not(.nab-inline) { width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; inset: 0; border-radius: 0; }
}
#nab-ai-root .nab-live-simple { padding: 24px 0; }
#nab-ai-root .nab-activity { font-size: 18px; line-height: 1.6; font-weight: 650; }
#nab-ai-root .nab-naming-tip { border-left: 3px solid var(--nab-accent-solid); padding: 12px 16px; margin: 24px 0; color: var(--nab-text-muted); font-size: 13px; line-height: 1.7; background: var(--nab-chip-bg); border-radius: 0 12px 12px 0; }
#nab-ai-root .nab-live-reason-stage { min-width: 95px; }
#nab-ai-root button { font-family: var(--nab-font, system-ui, sans-serif); }

/* Chromium now implements scrollbar-width too: reset it there so the 2px
   pseudo-element width wins. Firefox retains its smallest native width. */
@supports selector(::-webkit-scrollbar) {
  #nab-ai-root, #nab-ai-root * { scrollbar-width: auto; scrollbar-color: auto; }
}
#nab-ai-root *::-webkit-scrollbar-button { display: none; width: 0; height: 0; }

#nab-ai-root .nab-btn-ghost { background: transparent; color: var(--nab-btn-ghost-text); }
