/* Hero graphic A: an illustrative AI answer that cites one firm and skips another,
   then the research on what that citation is worth. Preview only. */
.aia {
  --ok-tint: #f0faf3;
  --ok-line: #bfe3cb;
  --ok-ink: #116632;            /* 6.9:1 on the tint */
  --off-ink: #6b6b75;           /* 5.2:1 on white */
  position: relative; margin: 0; min-width: 0;
  font-size: 14px; line-height: 1.5; color: var(--ink-2);
}
.aia-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ----- the answer panel ----- */
.aia-panel {
  position: relative; z-index: 2;
  background: var(--bg); border: 1px solid var(--line); border-radius: 18px;
  padding: 14px 18px 14px;
  box-shadow: 0 1px 2px rgba(10, 10, 11, 0.04), 0 18px 40px -18px rgba(10, 10, 11, 0.22);
}
.aia-bar { display: flex; align-items: center; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.aia-logo {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px;
  background: var(--ink); color: #fff;
}
.aia-logo svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.aia-title { font-size: 13px; font-weight: 600; color: var(--ink); }
.aia-tag {
  margin-left: auto; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 999px; padding: 2px 9px;
}
html[lang^="zh"] .aia-tag { letter-spacing: .1em; }

.aia-q {
  display: flex; align-items: flex-start; gap: 9px; margin: 14px 0 0;
  background: var(--bg-soft); border-radius: 12px; padding: 10px 12px;
  font-size: 14.5px; font-weight: 500; color: var(--ink); line-height: 1.4;
}
.aia-q svg { flex: none; width: 16px; height: 16px; margin-top: 2px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }

.aia-a { margin: 14px 0 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.6; }
.aia-a mark {
  color: var(--ink); font-weight: 600; padding: 1px 3px; margin: 0 -1px; border-radius: 4px;
  background: linear-gradient(var(--ok-tint), var(--ok-tint)) no-repeat 0 0 / 100% 100%;
  box-shadow: inset 0 -2px 0 var(--ok);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.aia-ref {
  display: inline-grid; place-items: center; min-width: 17px; height: 17px; margin-left: 4px; padding: 0 4px;
  border-radius: 999px; background: var(--ok); color: #fff;
  font-size: 10.5px; font-weight: 700; line-height: 1; vertical-align: 0.35em;
}

.aia-src { list-style: none; margin: 14px 0 0; display: grid; gap: 8px; }
.aia-src li {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 12px; border: 1px solid var(--line);
}
.aia-fav {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  font-size: 13px; font-weight: 700;
}
.aia-name { min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.aia-name small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.aia-pill {
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 9px 3px 8px;
}
.aia-pill svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.aia-src .is-cited { background: var(--ok-tint); border-color: var(--ok-line); }
.aia-src .is-cited .aia-fav { background: var(--ok); color: #fff; }
.aia-src .is-cited .aia-pill { background: #fff; color: var(--ok-ink); box-shadow: inset 0 0 0 1px var(--ok-line); }

.aia-src .is-out { border-style: dashed; border-color: var(--line-strong); background: repeating-linear-gradient(135deg, #fafafa 0 6px, #fff 6px 12px); }
.aia-src .is-out .aia-fav { background: var(--bg-soft); color: #9a9aa3; box-shadow: inset 0 0 0 1px var(--line); }
.aia-src .is-out .aia-name { color: var(--off-ink); }
.aia-src .is-out .aia-pill { color: var(--muted); background: var(--bg-soft); }

.aia-note { margin: 10px 0 0; font-size: 11.5px; color: var(--muted); }

/* ----- the data card, tucked under the panel ----- */
.aia-data {
  position: relative; z-index: 1;
  margin: -12px 0 0 clamp(0px, 3vw, 22px);
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 0 0 18px 18px;
  padding: 24px 18px 14px;
}
.aia-k { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
html[lang^="zh"] .aia-k { letter-spacing: .12em; }
.aia-h { margin: 4px 0 12px; font-size: 16.5px; font-weight: 600; color: var(--ink); line-height: 1.35; letter-spacing: -0.01em; }
.aia-h strong { color: var(--ok); }

.aia-bars { display: grid; gap: 8px; }
.aia-row { display: grid; grid-template-columns: 5.6em minmax(0, 1fr) 3.6em; align-items: center; gap: 10px; font-size: 13px; }
.aia-row span { color: var(--ink-2); font-weight: 500; }
.aia-row b { display: block; height: 12px; border-radius: 999px; background: rgba(10, 10, 11, 0.05); overflow: hidden; }
.aia-row i { display: block; height: 100%; width: var(--w); border-radius: inherit; transform-origin: left center; }
.aia-row.is-cited i { background: var(--ok); }
.aia-row.is-out i { background: #b4b4bc; }
.aia-row em { font-style: normal; font-weight: 700; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.aia-row.is-out em { color: var(--off-ink); }
.aia-unit { margin: 8px 0 0; font-size: 11.5px; color: var(--muted); }
.aia a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
.aia a:hover { text-decoration-color: currentColor; }

.aia-facts { list-style: none; margin: 14px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.aia-facts li { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.aia-facts strong { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); line-height: 1.15; font-variant-numeric: tabular-nums; }
.aia-facts strong small { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.aia-facts span { font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.aia-facts a { margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.aia-foot { margin: 12px 0 0; font-size: 11.5px; color: var(--muted); }

/* ----- motion: plays once, ends on the static layout ----- */
@media (prefers-reduced-motion: no-preference) {
  .aia-q, .aia-a, .aia-src li, .aia-note { animation: aia-in .5s cubic-bezier(.2, .7, .2, 1) both; }
  .aia-q { animation-delay: .15s; }
  .aia-a { animation-delay: .55s; }
  .aia-a mark { animation: aia-mark .7s ease-out 1.1s both; }
  .aia-ref { animation: aia-pop .35s cubic-bezier(.3, 1.6, .5, 1) 1.5s both; }
  .aia-src li:nth-child(1) { animation-delay: 1.35s; }
  .aia-src li:nth-child(2) { animation-delay: 1.55s; }
  .aia-note { animation-delay: 1.7s; }
  .aia-src .is-cited .aia-pill { animation: aia-pop .35s cubic-bezier(.3, 1.6, .5, 1) 1.75s both; }
  .aia-row i { animation: aia-grow 1s cubic-bezier(.2, .7, .2, 1) both; }
  .aia-row.is-cited i { animation-delay: 1.9s; }
  .aia-row.is-out i { animation-delay: 2.05s; }
  .aia-src .is-cited .aia-fav { animation: aia-ring 2.6s ease-out 2.4s 2; }
}
@keyframes aia-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes aia-mark { from { background-size: 0 100%; box-shadow: inset 0 0 0 transparent; } }
@keyframes aia-pop { from { opacity: 0; transform: scale(.6); } }
@keyframes aia-grow { from { transform: scaleX(0); } }
@keyframes aia-ring {
  0% { box-shadow: 0 0 0 0 rgba(21, 128, 61, 0.4); }
  70%, 100% { box-shadow: 0 0 0 8px rgba(21, 128, 61, 0); }
}

@media (max-width: 480px) {
  .aia-panel { padding: 12px 14px; }
  .aia-data { margin-left: 10px; padding: 24px 14px 14px; }
  .aia-src li { grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; padding: 8px; }
  .aia-fav { width: 26px; height: 26px; font-size: 12px; }
  .aia-facts { gap: 12px; }
  .aia-facts strong { font-size: 18px; }
  .aia-row { grid-template-columns: 5em minmax(0, 1fr) 3.4em; gap: 8px; }
}

/* Avoid one-word / one-character orphans in the mock copy. */
.aia p, .aia-facts span { text-wrap: pretty; }
