/* Notbroken — search by meaning (assets/nb-search.js). Screen only; hidden in print. */

/* the quiet status line while the model loads the first time */
.smart-status { font-size: 12.5px; color: var(--muted); margin: 0; padding: 10px 32px 0; line-height: 1.5; }
.smart-status[hidden] { display: none; }
.smart, .smart-status { max-width: var(--maxw, 880px); margin-left: auto; margin-right: auto; box-sizing: border-box; }   /* the same column as the listings */

/* a listing the visitor jumped to from the strip */
.listing.is-ask-hit { animation: askHit 2.6s ease-out; }
@keyframes askHit {
  0% { box-shadow: 0 0 0 0 rgba(91,138,114,0); border-color: var(--sage); background: var(--sage-tint); }
  25% { box-shadow: 0 0 0 4px rgba(91,138,114,.28); border-color: var(--sage); background: var(--sage-tint); }
  100% { box-shadow: 0 0 0 0 rgba(91,138,114,0); }
}

/* ---- "Best matches": one panel in the directory's own listing style (white card, hairline borders, sage
   eyebrow, Playfair title and rank numerals), a ranked list rather than separate tiles ---- */
.smart { padding: 16px 32px 6px; }
.smart[hidden] { display: none; }
/* the words are still changing: the last best matches stay, dimmed, until the new ones arrive (nothing jumps) */
.smart.is-stale { opacity: .45; transition: opacity .15s ease-out; }
.smart.is-stale .smart-panel { animation: none; }
.smart-panel { background: var(--card-bg); border: 1px solid var(--border); border-top: 3px solid var(--sage); animation: smartIn .3s ease-out both; }
@keyframes smartIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.smart-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px 24px; flex-wrap: wrap; padding: 16px 24px 14px 30px; border-bottom: 1px solid var(--border); }
.smart-eyebrow { color: var(--sage); font-size: 10.5px; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase; margin: 0 0 4px; }
.smart-title { font-family: 'Playfair Display', Georgia, serif; font-size: 22px; font-weight: 700; line-height: 1.15; color: var(--ink); margin: 0; }
.smart-sub { font-size: 12.5px; line-height: 1.5; color: var(--muted); max-width: 380px; }
.smart-list { list-style: none; margin: 0; padding: 0; }
.smart-hit { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: start; gap: 0 16px; padding: 14px 24px 14px 30px; border-top: 1px solid var(--border); background: var(--card-bg); cursor: pointer; transition: background .16s; position: relative; }
.smart-hit:first-child { border-top: 0; }
.smart-hit::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--sage); opacity: 0; transition: opacity .16s; }
.smart-hit:hover, .smart-hit:focus-within { background: var(--card-hover, var(--card-bg)); }
.smart-hit:hover::before, .smart-hit:focus-within::before { opacity: 1; }
.smart-hit__rank { font-family: 'Playfair Display', Georgia, serif; font-size: 24px; font-weight: 700; line-height: 1; color: var(--sage); opacity: .5; padding-top: 2px; font-variant-numeric: lining-nums; }
.smart-hit__body { min-width: 0; }
.smart-hit__name { display: block; width: 100%; text-align: left; font: inherit; font-size: 15.5px; font-weight: 600; line-height: 1.3; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; }
.smart-hit__name > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.smart-hit__name:hover { color: var(--sage-dark); text-decoration: underline; text-underline-offset: 3px; }
.smart-hit__name:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }
.smart-hit__crumb { font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin: 5px 0 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smart-hit__what { font-size: 13px; line-height: 1.5; color: var(--text); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.smart-hit__match { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 5px; font-size: 11px; font-weight: 600; letter-spacing: .3px; color: var(--sage-dark); white-space: nowrap; padding-top: 3px; }
.smart-hit__match.is-loose { color: var(--muted); }
.smart-dots { display: inline-flex; gap: 3px; }
.smart-dots i { width: 7px; height: 7px; border-radius: 1px; background: var(--border-2, var(--border)); }
.smart-dots i.on { background: var(--sage); }
.smart-hit__match.is-loose .smart-dots i.on { background: var(--muted); }
.smart-crisis { border: 1px solid var(--terra); border-radius: 3px; padding: 10px 14px; margin: 0 0 12px; font-size: 13px; line-height: 1.6; background: var(--surface-2); color: var(--text); }
.smart-crisis strong { color: var(--ink); }
.smart-crisis a { color: var(--sage-dark); }

@media (max-width: 1023px) {
  .smart, .smart-status { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 560px) {
  .smart-head { padding: 14px 16px 12px 18px; }
  .smart-title { font-size: 19px; }
  .smart-hit { grid-template-columns: 30px minmax(0, 1fr); padding: 12px 16px 12px 18px; gap: 0 10px; }
  .smart-hit__rank { font-size: 19px; }
  .smart-hit__what { display: none; }
  .smart-hit__match { grid-column: 2; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 6px; padding-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .listing.is-ask-hit { animation: none; border-color: var(--sage); background: var(--sage-tint); }
  .smart-panel { animation: none; }
}
@media print {
  .smart, .smart-status { display: none !important; }
}
