/* Animated illustrations for service-page prose (template-parts/art/, driven by art.js).
   Loaded only on pages where a Prose + artwork section has an animation chosen.

   HOW THE STATES WORK
   The markup is each piece's FINISHED frame. Start frames live under
   `.nwd-art-ready .nwd-art:not(.is-on)`, and .nwd-art-ready is only added by art.js, which
   only runs when .nwd-anim is set (motion allowed). So no JS, a JS error, or reduced motion
   all show the finished picture; nothing can strand half-drawn. `.is-on` plays each piece
   once, with fill-mode both so delayed parts hold their start frame until their turn.
   Only transform, opacity and clip-path animate (DESIGN.md: never layout properties). */

/* ────────── Shared frame ────────── */
.nwd-art {
  position: relative;
  background: var(--cream-deep);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(16px, 2.2vw, 24px);
  font-family: var(--font-body);
  font-size: 12px; line-height: 1.4;
  color: var(--brown-800);
  user-select: none;
}
.nwd-art p { margin: 0; }
.nwd-art ul, .nwd-art ol { list-style: none; margin: 0; padding: 0; }
.nwd-art .ph { font-size: 14px; line-height: 1; }
.nwd-art-kicker {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--brown-600); margin-bottom: 14px !important;
}
.nwd-art-note { margin-top: 12px !important; font-size: 11.5px; color: var(--brown-600); }

/* A small browser window, matching the hero's frames. */
.nwd-art-win { background: var(--cream); border: 1px solid var(--line-mid); border-radius: 4px; overflow: hidden; }
.nwd-art-bar { display: flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-bottom: 1px solid var(--line); background: var(--brown-50); }
.nwd-art-bar > i { width: 7px; height: 7px; border-radius: 50%; background: var(--brown-200); }
.nwd-art-url { margin-left: 8px; font-size: 10px; color: var(--brown-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nwd-art-chip {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px; padding: 6px 12px 6px 9px;
  background: var(--cream); border: 1px solid var(--line-mid); border-radius: 9999px;
  font-size: 12px; font-weight: 600; color: var(--brown-800);
}
.nwd-art-chip .ph { color: var(--success); font-size: 13px; }

@keyframes nwdArtIn   { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes nwdArtPop  { 0% { opacity: 0; transform: scale(0.6); } 70% { opacity: 1; transform: scale(1.08); } 100% { opacity: 1; transform: scale(1); } }
@keyframes nwdArtFade { from { opacity: 0; } to { opacity: 1; } }

/* ────────── Rescue: broken site repaired ────────── */
.rf-view { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.rf-error, .rf-site { position: absolute; inset: 0; }
.rf-error {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px;
  padding: 0 9%; background: #fff; opacity: 0;
}
.rf-error .ph { font-size: 22px; color: var(--orange-500); margin-bottom: 4px; }
.rf-err-title { font-size: 13px; font-weight: 600; color: #1d2327; max-width: 26ch; }
.rf-err-sub { font-size: 11px; color: #2271b1; text-decoration: underline; }
.rf-site { padding: 7% 8%; display: flex; flex-direction: column; gap: 9%; }
.rf-nav { display: flex; align-items: center; gap: 6%; }
.rf-nav b { width: 18%; height: 8px; border-radius: 2px; background: var(--brown-800); margin-right: auto; }
.rf-nav span { width: 10%; height: 5px; border-radius: 2px; background: var(--brown-300); }
.rf-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 8%; align-items: center; }
.rf-copy { display: flex; flex-direction: column; gap: 6px; }
.rf-copy span { display: block; border-radius: 2px; }
.rf-h { height: 9px; width: 100%; background: var(--brown-800); }
.rf-h2 { width: 70%; }
.rf-t { height: 5px; width: 92%; background: var(--brown-200); margin-top: 3px; }
.rf-t2 { width: 64%; margin-top: 0; }
.rf-btn { width: 44%; height: 12px; border-radius: 9999px !important; background: var(--brown-800); margin-top: 6px; }
.rf-img { position: relative; aspect-ratio: 1; border-radius: 3px; background: var(--brown-100); border: 1px solid var(--line); }
.rf-img em { position: absolute; right: 14%; top: 14%; width: 14%; aspect-ratio: 1; border-radius: 50%; background: var(--orange-500); }
.rf-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6%; }
.rf-cards span { height: 26px; border-radius: 3px; background: var(--cream-deep); border: 1px solid var(--line); }
/* The sweep is a full-height layer whose bottom 3px is the orange line, so translating it by
   its own height tracks the clip-path reveal exactly, at any frame size. */
.rf-sweep {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent calc(100% - 3px), var(--orange-500) 0);
  filter: drop-shadow(0 2px 6px rgb(201 75 31 / 0.45));
  opacity: 0; pointer-events: none;
}

.nwd-art-ready .nwd-art--rescue-fix:not(.is-on) .rf-error { opacity: 1; }
.nwd-art-ready .nwd-art--rescue-fix:not(.is-on) .rf-site { clip-path: inset(0 0 100% 0); }
.nwd-art-ready .nwd-art--rescue-fix:not(.is-on) .rf-chip { opacity: 0; }

@keyframes rfErrorOut { 0%, 55% { opacity: 1; } 100% { opacity: 0; } }
@keyframes rfReveal   { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes rfSweep    { 0% { opacity: 1; transform: translateY(-100%); } 90% { opacity: 1; } 100% { opacity: 0; transform: translateY(0); } }
.nwd-art-ready .nwd-art--rescue-fix.is-on .rf-error { animation: rfErrorOut 2.1s var(--ease-out) both; }
.nwd-art-ready .nwd-art--rescue-fix.is-on .rf-site  { animation: rfReveal 1.1s 1.0s var(--ease-out) both; }
.nwd-art-ready .nwd-art--rescue-fix.is-on .rf-sweep { animation: rfSweep 1.1s 1.0s var(--ease-out) both; }
.nwd-art-ready .nwd-art--rescue-fix.is-on .rf-chip  { animation: nwdArtPop 0.5s 2.2s var(--ease-out) both; }

/* ────────── Rescue: five steps ────────── */
.rs-list { display: flex; flex-direction: column; gap: 12px; }
.rs-list li { display: flex; align-items: flex-start; gap: 12px; }
.rs-dot {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brown-800); color: var(--cream);
}
.rs-dot .ph { font-size: 12px; }
.rs-txt { display: flex; flex-direction: column; gap: 1px; padding-top: 2px; }
.rs-txt b { font-size: 13px; font-weight: 600; }
.rs-txt em { font-style: normal; font-size: 11.5px; color: var(--brown-600); }
.rs-bar { margin-top: 16px; height: 4px; border-radius: 9999px; background: var(--brown-100); overflow: hidden; }
.rs-bar span { display: block; height: 100%; background: var(--success); transform-origin: left center; }

.nwd-art-ready .nwd-art--rescue-steps:not(.is-on) li { opacity: 0; }
.nwd-art-ready .nwd-art--rescue-steps:not(.is-on) .rs-bar span { transform: scaleX(0); }
@keyframes rsBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.nwd-art-ready .nwd-art--rescue-steps.is-on li { animation: nwdArtIn 0.5s calc(var(--i) * 0.45s) var(--ease-out) both; }
.nwd-art-ready .nwd-art--rescue-steps.is-on .rs-dot { animation: nwdArtPop 0.45s calc(var(--i) * 0.45s + 0.15s) var(--ease-out) both; }
.nwd-art-ready .nwd-art--rescue-steps.is-on .rs-bar span { animation: rsBar 2.3s 0.1s linear both; }

/* ────────── Care: status card ────────── */
.cs-card { background: var(--cream); border: 1px solid var(--line-mid); border-radius: 4px; padding: 16px; }
.cs-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cs-site { font-weight: 600; font-size: 12.5px; }
.cs-live { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--success); }
.cs-live i { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.cs-live i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--success); opacity: 0; }
.cs-big {
  margin: 14px 0 12px; display: flex; align-items: baseline; gap: 2px; flex-wrap: wrap;
  font-family: var(--font-display); font-variation-settings: 'opsz' 144, 'wght' 700, 'SOFT' 30;
  font-size: 44px; line-height: 1; letter-spacing: -0.02em;
}
.cs-big small { flex-basis: 100%; margin-top: 6px; font-family: var(--font-body); font-variation-settings: normal; font-size: 11.5px; letter-spacing: 0; color: var(--brown-600); }
.cs-rows li { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.cs-rows .ph { color: var(--brown-500); }
.cs-rows span { color: var(--brown-600); }
.cs-rows b { font-weight: 600; }

@keyframes csPing { 0% { opacity: 0.7; transform: scale(0.6); } 100% { opacity: 0; transform: scale(1.6); } }
.nwd-anim .nwd-art--care-status.is-on .cs-live i::after { animation: csPing 1.8s 0.4s var(--ease-out) 3; }
.nwd-art-ready .nwd-art--care-status:not(.is-on) .cs-rows li { opacity: 0; }
.nwd-art-ready .nwd-art--care-status.is-on .cs-rows li { animation: nwdArtIn 0.5s calc(0.6s + var(--i) * 0.18s) var(--ease-out) both; }

/* ────────── Care: a week of checks ────────── */
.cw-grid { display: grid; grid-template-columns: auto repeat(7, minmax(0, 1fr)); gap: 6px; align-items: center; }
.cw-day { text-align: center; font-size: 10.5px; font-weight: 600; color: var(--brown-600); }
.cw-label { font-size: 11.5px; font-weight: 600; padding-right: 4px; white-space: nowrap; }
.cw-cell {
  aspect-ratio: 1; border-radius: 4px; display: grid; place-items: center;
  background: var(--cream); border: 1px solid var(--line);
}
.cw-cell .ph { font-size: 12px; color: var(--success); }
.cw-cell--key { background: var(--brown-800); border-color: var(--brown-800); }
.cw-cell--key .ph { color: var(--cream); }

.nwd-art-ready .nwd-art--care-week:not(.is-on) .cw-cell .ph { opacity: 0; }
.nwd-art-ready .nwd-art--care-week:not(.is-on) .cw-cell--key { background: var(--cream); border-color: var(--line); }
@keyframes cwKey { from { background: var(--cream); border-color: var(--line); } to { background: var(--brown-800); border-color: var(--brown-800); } }
.nwd-art-ready .nwd-art--care-week.is-on .cw-cell .ph { animation: nwdArtPop 0.4s calc(var(--i) * 0.22s) var(--ease-out) both; }
.nwd-art-ready .nwd-art--care-week.is-on .cw-cell--key { animation: cwKey 0.3s var(--ease-out) both; }

/* ────────── Page builder: sections snapping into place ────────── */
.bc-body { display: grid; grid-template-columns: 30% 1fr; min-height: 210px; }
.bc-panel { display: flex; flex-direction: column; gap: 6px; padding: 10px 8px; border-right: 1px solid var(--line); background: var(--brown-50); }
.bc-pt { font-size: 9.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brown-500); margin-bottom: 2px; }
.bc-w { display: flex; align-items: center; gap: 5px; padding: 5px 6px; border-radius: 3px; border: 1px solid var(--line); background: var(--cream); font-size: 10.5px; }
.bc-w .ph { font-size: 12px; color: var(--brown-500); }
.bc-w--on { border-color: var(--orange-500); }
.bc-w--on .ph { color: var(--orange-500); }
.bc-canvas { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.bc-sec { border: 1px dashed var(--line-mid); border-radius: 3px; padding: 7px; background: var(--cream); }
.bc-sec--nav { display: flex; align-items: center; gap: 8px; }
.bc-sec--nav b { width: 22%; height: 6px; border-radius: 2px; background: var(--brown-800); margin-right: auto; }
.bc-sec--nav span { width: 12%; height: 4px; border-radius: 2px; background: var(--brown-300); }
.bc-sec--hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; align-items: center; }
.bc-sec--hero div { display: flex; flex-direction: column; gap: 5px; }
.bc-h { height: 8px; width: 90%; border-radius: 2px; background: var(--brown-800); }
.bc-t { height: 4px; width: 75%; border-radius: 2px; background: var(--brown-200); }
.bc-btn { height: 10px; width: 40%; border-radius: 9999px; background: var(--brown-800); }
.bc-sec--hero em { aspect-ratio: 4 / 3; border-radius: 3px; background: var(--brown-100); border: 1px solid var(--line); position: relative; }
.bc-sec--hero em::after { content: ""; position: absolute; right: 12%; top: 14%; width: 16%; aspect-ratio: 1; border-radius: 50%; background: var(--orange-500); }
.bc-sec--cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bc-sec--cols span { height: 22px; border-radius: 2px; background: var(--cream-deep); }
.bc-sec--cta { background: var(--brown-800); border-style: solid; border-color: var(--brown-800); }
.bc-sec--cta span { display: block; width: 46%; height: 6px; margin: 2px auto; border-radius: 2px; background: rgb(245 239 227 / 0.5); }

.nwd-art-ready .nwd-art--builder-canvas:not(.is-on) .bc-sec { opacity: 0; }
@keyframes bcDrop { 0% { opacity: 0; transform: translateX(-18px) scale(0.97); } 100% { opacity: 1; transform: none; } }
@keyframes bcSettle { 0%, 60% { border-color: var(--orange-500); } 100% { border-color: var(--line-mid); } }
.nwd-art-ready .nwd-art--builder-canvas.is-on .bc-sec { animation: bcDrop 0.55s calc(0.2s + var(--i) * 0.45s) var(--ease-out) both; }
.nwd-art-ready .nwd-art--builder-canvas.is-on .bc-sec:not(.bc-sec--cta) { animation: bcDrop 0.55s calc(0.2s + var(--i) * 0.45s) var(--ease-out) both, bcSettle 1s calc(0.2s + var(--i) * 0.45s) both; }

/* ────────── Page builder: speed score ────────── */
.bs-phone {
  width: min(100%, 240px); margin: 0 auto; padding: 18px 16px 16px;
  background: var(--cream); border: 1px solid var(--line-mid); border-radius: 18px;
  display: flex; flex-direction: column; align-items: center;
}
.bs-label { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brown-600); }
.bs-ring { position: relative; width: 120px; aspect-ratio: 1; margin: 12px 0 14px; }
.bs-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.bs-ring circle { fill: none; stroke-width: 8; }
.bs-track { stroke: var(--brown-100); }
.bs-val { stroke: var(--success); stroke-linecap: round; stroke-dasharray: 100 100; stroke-dashoffset: 4; }
.bs-num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-display); font-variation-settings: 'opsz' 144, 'wght' 700, 'SOFT' 30;
  font-size: 34px; letter-spacing: -0.02em; color: var(--success);
}
.bs-fixes { align-self: stretch; display: flex; flex-direction: column; gap: 6px; }
.bs-fixes li { display: flex; align-items: center; gap: 7px; padding-top: 6px; border-top: 1px solid var(--line); }
.bs-fixes .ph { color: var(--success); }
.nwd-art--builder-speed .nwd-art-note { text-align: center; }

.nwd-art-ready .nwd-art--builder-speed:not(.is-on) .bs-val { stroke-dashoffset: 66; stroke: var(--orange-500); }
.nwd-art-ready .nwd-art--builder-speed:not(.is-on) .bs-num { color: var(--orange-500); }
.nwd-art-ready .nwd-art--builder-speed:not(.is-on) .bs-fixes li { opacity: 0; }
@keyframes bsRing { from { stroke-dashoffset: 66; stroke: var(--orange-500); } 60% { stroke: #C28F1E; } to { stroke-dashoffset: 4; stroke: var(--success); } }
@keyframes bsNum  { from { color: var(--orange-500); } 60% { color: #C28F1E; } to { color: var(--success); } }
.nwd-art-ready .nwd-art--builder-speed.is-on .bs-val { animation: bsRing 1.8s 0.5s cubic-bezier(0.33, 1, 0.68, 1) both; }
.nwd-art-ready .nwd-art--builder-speed.is-on .bs-num { animation: bsNum 1.8s 0.5s cubic-bezier(0.33, 1, 0.68, 1) both; }
.nwd-art-ready .nwd-art--builder-speed.is-on .bs-fixes li { animation: nwdArtIn 0.45s calc(0.6s + var(--i) * 0.45s) var(--ease-out) both; }

/* ────────── Plugins: added to the dashboard ────────── */
.pd-body { display: grid; grid-template-columns: 30% 1fr; min-height: 200px; }
.pd-side { display: flex; flex-direction: column; gap: 9px; padding: 12px 9px; background: var(--brown-900); }
.pd-m { height: 5px; width: 78%; border-radius: 2px; background: rgb(245 239 227 / 0.28); }
.pd-m2 { width: 62%; } .pd-m3 { width: 70%; }
.pd-new {
  display: flex; align-items: center; gap: 5px; margin: 0 -9px; padding: 5px 9px;
  background: var(--orange-500); color: var(--cream); font-size: 10.5px; font-weight: 600;
}
.pd-new .ph { font-size: 12px; }
.pd-main { padding: 12px; }
.pd-card { background: #fff; border: 1px solid var(--line-mid); border-radius: 4px; padding: 12px; }
.pd-card-head { display: flex; align-items: center; gap: 7px; }
.pd-card-head b { font-size: 13px; font-weight: 600; margin-right: auto; }
.pd-card-head .ph { color: var(--orange-500); }
.pd-toggle { position: relative; width: 28px; height: 16px; border-radius: 9999px; background: var(--success); }
.pd-toggle i { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transform: translateX(12px); }
.pd-status { margin-top: 4px !important; font-size: 11px; color: var(--success); font-weight: 600; }
.pd-rows { margin-top: 10px; display: flex; flex-direction: column; }
.pd-rows span { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--line); }
.pd-rows em { font-style: normal; color: var(--brown-600); }
.pd-rows b { font-weight: 600; }

.nwd-art-ready .nwd-art--plugin-dash:not(.is-on) .pd-new { opacity: 0; }
.nwd-art-ready .nwd-art--plugin-dash:not(.is-on) .pd-card { opacity: 0; }
.nwd-art-ready .nwd-art--plugin-dash:not(.is-on) .pd-toggle { background: var(--brown-200); }
.nwd-art-ready .nwd-art--plugin-dash:not(.is-on) .pd-toggle i { transform: none; }
.nwd-art-ready .nwd-art--plugin-dash:not(.is-on) .pd-status,
.nwd-art-ready .nwd-art--plugin-dash:not(.is-on) .pd-rows span { opacity: 0; }
@keyframes pdSlide  { from { opacity: 0; transform: translateX(-100%); } to { opacity: 1; transform: none; } }
@keyframes pdToggle { from { background: var(--brown-200); } to { background: var(--success); } }
@keyframes pdKnob   { from { transform: none; } to { transform: translateX(12px); } }
.nwd-art-ready .nwd-art--plugin-dash.is-on .pd-new        { animation: pdSlide 0.6s 0.3s var(--ease-out) both; }
.nwd-art-ready .nwd-art--plugin-dash.is-on .pd-card       { animation: nwdArtIn 0.5s 0.8s var(--ease-out) both; }
.nwd-art-ready .nwd-art--plugin-dash.is-on .pd-toggle     { animation: pdToggle 0.3s 1.5s var(--ease-out) both; }
.nwd-art-ready .nwd-art--plugin-dash.is-on .pd-toggle i   { animation: pdKnob 0.3s 1.5s var(--ease-out) both; }
.nwd-art-ready .nwd-art--plugin-dash.is-on .pd-status     { animation: nwdArtFade 0.4s 1.8s both; }
.nwd-art-ready .nwd-art--plugin-dash.is-on .pd-rows span  { animation: nwdArtIn 0.4s calc(2s + var(--i) * 0.15s) var(--ease-out) both; }

/* ────────── AI: enquiries sorted ────────── */
.nwd-art--ai-sort .nwd-art-kicker .ph { font-size: 13px; }
.as-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.as-col { display: flex; flex-direction: column; gap: 8px; }
.as-tag {
  align-self: flex-start; padding: 3px 8px; border-radius: 9999px;
  border: 1px solid var(--line-mid); font-size: 10.5px; font-weight: 600; color: var(--brown-700);
}
.as-tag--urgent { background: var(--orange-500); border-color: var(--orange-500); color: var(--cream); }
.as-card {
  display: flex; flex-direction: column; gap: 3px; min-height: 74px;
  padding: 9px; border-radius: 4px; background: var(--cream); border: 1px solid var(--line-mid);
  box-shadow: var(--shadow-sm);
}
.as-card b { font-size: 11.5px; font-weight: 600; line-height: 1.3; }
.as-card em { font-style: normal; font-size: 10.5px; color: var(--brown-600); }

/* Start: all three stacked over the middle column, slightly fanned, as an unsorted pile. */
.nwd-art-ready .nwd-art--ai-sort:not(.is-on) .as-tag { opacity: 0.35; }
.nwd-art-ready .nwd-art--ai-sort:not(.is-on) .as-card[style*="--i:0"] { transform: translateX(calc(100% + 8px)) rotate(-4deg); }
.nwd-art-ready .nwd-art--ai-sort:not(.is-on) .as-card[style*="--i:1"] { transform: translateY(4px) rotate(2deg); }
.nwd-art-ready .nwd-art--ai-sort:not(.is-on) .as-card[style*="--i:2"] { transform: translateX(calc(-100% - 8px)) translateY(8px) rotate(-1deg); }
@keyframes asTag { from { opacity: 0.35; } to { opacity: 1; } }
@keyframes asSort0 { from { transform: translateX(calc(100% + 8px)) rotate(-4deg); } to { transform: none; } }
@keyframes asSort1 { from { transform: translateY(4px) rotate(2deg); } to { transform: none; } }
@keyframes asSort2 { from { transform: translateX(calc(-100% - 8px)) translateY(8px) rotate(-1deg); } to { transform: none; } }
.nwd-art-ready .nwd-art--ai-sort.is-on .as-card[style*="--i:0"] { animation: asSort0 0.7s 0.6s var(--ease-out) both; }
.nwd-art-ready .nwd-art--ai-sort.is-on .as-card[style*="--i:1"] { animation: asSort1 0.7s 1.0s var(--ease-out) both; }
.nwd-art-ready .nwd-art--ai-sort.is-on .as-card[style*="--i:2"] { animation: asSort2 0.7s 1.4s var(--ease-out) both; }
.nwd-art-ready .nwd-art--ai-sort.is-on .as-tag { animation: asTag 0.4s 1.9s both; }

/* ────────── AI: plain-English search ────────── */
.sr-box {
  display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 9px 12px;
  background: var(--cream); border: 1px solid var(--brown-300); border-radius: 9999px;
  font-size: 12.5px;
}
.sr-box .ph { color: var(--brown-500); flex: 0 0 auto; }
.sr-q { min-height: 1.4em; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-caret { width: 1.5px; height: 15px; background: var(--orange-500); margin-left: -6px; opacity: 0; }
.sr-results { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.sr-results li { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border-radius: 4px; background: var(--cream); border: 1px solid var(--line); }
.sr-results b { font-size: 12.5px; font-weight: 600; }
.sr-results em { font-style: normal; font-size: 11px; color: var(--brown-600); }
.sr-best { border-color: var(--orange-500) !important; }
.sr-tag { align-self: flex-start; margin-bottom: 3px; padding: 1px 7px; border-radius: 9999px; background: var(--orange-500); color: var(--cream); font-size: 9.5px; font-weight: 600; letter-spacing: 0.04em; }

@keyframes srBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.nwd-art-ready .nwd-art--ai-search:not(.is-on) .sr-results li { opacity: 0; }
.nwd-art-ready .nwd-art--ai-search.is-on .sr-caret { animation: srBlink 0.9s 0.2s steps(1) 4; }
.nwd-art-ready .nwd-art--ai-search.is-on .sr-results li { animation: nwdArtIn 0.5s calc(2.3s + var(--i) * 0.15s) var(--ease-out) both; }
