/* Features, AI assist (features.dc.html): the instrument plates heading the
   "Learn from your desk" and "Choose where it runs" cards. js/features-ai-cards.js
   builds and runs them; the page mounts it on .ai-cards. The plate frame matches
   the core-twelve plates (css/features-core.css). Colours come from the page
   tokens, so both themes follow. */
.ai-plate { position: relative; box-sizing: border-box; height: 152px; margin-bottom: 20px; display: flex; flex-direction: column; gap: 10px; padding: 10px 12px 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--text) 8%, transparent) 1px, transparent 0) 0 0 / 12px 12px, linear-gradient(180deg, var(--surface), var(--bg)); }
.ai-plate__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 10px; font: 500 11px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.ai-plate__top > :first-child { display: inline-flex; align-items: center; gap: 8px; }
.ai-plate__top > :first-child::before { content: ''; width: 5px; height: 5px; border-radius: 1px; background: var(--accent); }
.ai-plate__status { color: var(--accent); font-variant-numeric: tabular-nums; transition: color .35s ease; }
.ai-plate__status[data-tone='off'] { color: var(--faint); }
.ai-plate__stage { position: relative; flex: 1; min-height: 0; }
.ai-plate__canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* Learn: labelled history streams into the model; five suggestions fill
   against the confidence bar; anything under it waits for an agent. */
.ai-learn__fields { position: absolute; top: 0; right: 0; bottom: 0; width: 61%; display: grid; grid-template-rows: repeat(5, minmax(0, 1fr)); align-items: center; }
.ai-learn__row { display: grid; grid-template-columns: 62px minmax(0, 1fr) 42px; align-items: center; gap: 10px; }
.ai-learn__k { font: 400 12px/1 var(--f-sans); color: var(--faint); transition: color .4s ease; }
.ai-learn__track { position: relative; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--text) 9%, transparent); }
.ai-learn__fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: color-mix(in srgb, var(--text) 34%, transparent); transition: background-color .4s ease, box-shadow .4s ease; }
.ai-learn__thr { position: absolute; top: -4px; bottom: -4px; left: 60%; width: 1px; background: color-mix(in srgb, var(--text) 38%, transparent); }
.ai-learn__v { justify-self: end; font: 500 11px/1 var(--f-mono); color: var(--faint); font-variant-numeric: tabular-nums; transition: color .4s ease; }
.ai-learn__row.is-ok .ai-learn__fill { background: var(--accent); }
.ai-learn__row.is-ok .ai-learn__v { color: var(--text); }
.ai-learn__row.is-low .ai-learn__v { letter-spacing: .06em; text-transform: uppercase; }
.ai-learn__row.is-applied .ai-learn__k { color: var(--text); }
.ai-learn__row.is-applied .ai-learn__fill { box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 55%, transparent); }
.ai-learn__fields.is-reset .ai-learn__row { opacity: .35; transition: opacity .5s ease; }

/* Run: your network as a dashed boundary. Xomea and a local model sit inside;
   a provider sits outside. Calls go where the mode allows. */
.ai-run__net { position: absolute; top: 0; bottom: 0; left: 0; width: 66%; box-sizing: border-box; border: 1px dashed color-mix(in srgb, var(--text) 22%, transparent); border-radius: 8px; transition: border-color .5s ease, background-color .5s ease; }
.ai-run__net.is-sealed { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 4%, transparent); }
.ai-run__label { position: absolute; top: 7px; left: 9px; font: 500 11px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.ai-node { position: absolute; z-index: 1; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--bg); font: 500 11px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); white-space: nowrap; opacity: .55; transition: color .45s ease, border-color .45s ease, box-shadow .45s ease, opacity .45s ease; }
.ai-node--end { right: 0; transform: translate(0, -50%); }
.ai-node i { width: 5px; height: 5px; border-radius: 1px; background: currentColor; }
.ai-node.is-on { opacity: 1; color: var(--text); border-color: color-mix(in srgb, var(--accent) 45%, var(--line-2)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 8%, transparent); }
.ai-node.is-on i { background: var(--accent); }
.ai-run__lock { position: absolute; z-index: 2; width: 18px; height: 18px; margin: -9px 0 0 -9px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 50%; background: var(--bg); color: var(--accent); opacity: 0; transform: scale(.6); transition: opacity .35s ease, transform .45s cubic-bezier(.2, .8, .2, 1); }
.ai-run__lock svg { width: 9px; height: 9px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.ai-run__lock.is-on { opacity: 1; transform: scale(1); }

html.xomea-motion-paused .ai-plate * { transition: none !important; }
@media (max-width: 420px) {
  .ai-learn__fields { width: 66%; }
  .ai-learn__row { grid-template-columns: 58px minmax(0, 1fr) 38px; gap: 8px; }
  .ai-node { gap: 5px; padding: 5px 6px; letter-spacing: .04em; }
}
