/* theredwizard.net — the professional site.
 *
 * Design system: "operations console on paper." Daylight inversion of the
 * wizard tower at /games — cool paper ground, slate ink, hairline rules,
 * one oxide-red thread (the domain's quiet nod). Working UI stands in for
 * claims: the hero worklog and every concept card are real markup, not
 * screenshots. Type: Archivo (display) / Inter (body) / IBM Plex Mono (data).
 */

/* ---------- fonts (self-hosted, latin subsets) ---------- */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/archivo-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/plexmono-latin-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/plexmono-latin-500.woff2') format('woff2');
}

/* ---------- tokens ---------- */
:root {
  --paper: #f4f6f8;
  --card: #ffffff;
  --ink: #141d27;
  --ink-2: #45525f;
  --ink-3: #6b7885;
  --line: #d7dde3;
  --line-soft: #e5eaef;
  --signal: #b42b23;      /* the red thread */
  --signal-soft: #f6e7e5;
  --ok: #1e7f4f;
  --ok-soft: #e2f2e9;
  --warn: #9a6b0f;
  --warn-soft: #f7eed8;

  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: 'Archivo', 'Inter', -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --wrap: 1104px;
  --r: 10px;
  --r-sm: 6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--signal); color: #fff; }

a { color: inherit; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 8px 16px; z-index: 100;
  font-family: var(--mono); font-size: 13px; text-decoration: none;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 246, 248, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.mark {
  font-family: var(--display); font-weight: 700; font-size: 17px;
  letter-spacing: -0.01em; text-decoration: none; white-space: nowrap;
}
.mark .spark { color: var(--signal); }
.nav ul { display: flex; align-items: center; gap: 26px; list-style: none; }
.nav ul a {
  font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none;
}
.nav ul a:hover { color: var(--ink); }
.nav .btn { padding: 7px 14px; font-size: 13px; }
@media (max-width: 720px) {
  .nav ul { gap: 16px; }
  .nav ul li.hide-m { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 11px 20px; border-radius: var(--r-sm);
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  text-decoration: none; border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #24303c; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink-3); background: var(--card); }

/* ---------- section scaffolding ---------- */
section { padding: 88px 0; }
.eyebrow {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3);
}
.eyebrow::before { content: '— '; color: var(--signal); }
.section-head { margin-bottom: 44px; max-width: 720px; }
.section-head h2 {
  font-family: var(--display); font-weight: 650; font-size: clamp(26px, 3.4vw, 34px);
  letter-spacing: -0.015em; line-height: 1.15; margin: 10px 0 12px;
}
.section-head p { color: var(--ink-2); font-size: 16.5px; }

/* ---------- hero ---------- */
.hero { padding: 84px 0 72px; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 56px; align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 44px; } }

.hero h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(34px, 5.2vw, 56px); line-height: 1.06;
  letter-spacing: -0.022em; margin: 16px 0 20px;
}
.hero h1 em { font-style: normal; color: var(--signal); }
.hero .lede { font-size: 17.5px; color: var(--ink-2); max-width: 54ch; }
.hero .lede strong { color: var(--ink); font-weight: 600; }
.hero-ctas { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }

/* the signature: a live agent worklog */
.worklog {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: 0 1px 2px rgba(20, 29, 39, 0.05), 0 12px 32px -18px rgba(20, 29, 39, 0.18);
  overflow: hidden;
}
.worklog-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--line-soft);
}
.worklog-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.worklog-bar .title { font-family: var(--mono); font-size: 12px; color: var(--ink-3); margin-left: 4px; }
.worklog-bar .live {
  margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--ok);
  display: flex; align-items: center; gap: 6px;
}
.worklog-bar .live::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.worklog-body { padding: 14px 16px; min-height: 236px; }
.worklog-body .row {
  display: flex; gap: 10px; align-items: baseline;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.5;
  padding: 4px 0; color: var(--ink-2);
  opacity: 0; transform: translateY(3px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.worklog-body .row.on { opacity: 1; transform: none; }
.worklog-body .t { color: var(--ink-3); flex-shrink: 0; }
.worklog-body .ok { color: var(--ok); flex-shrink: 0; }
.worklog-body .msg em { font-style: normal; color: var(--ink); }
.worklog-foot {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 16px; border-top: 1px solid var(--line-soft);
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-3);
}
.worklog-foot .cost em { font-style: normal; color: var(--ink); }

/* ---------- proof strip ---------- */
.proof { padding: 0 0 8px; }
.proof-strip {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap;
}
.proof-strip .p {
  flex: 1 1 auto; padding: 18px 20px; text-align: center;
  border-right: 1px solid var(--line-soft);
}
.proof-strip .p:last-child { border-right: none; }
.proof-strip .n {
  display: block; font-family: var(--display); font-weight: 650;
  font-size: 21px; letter-spacing: -0.01em;
}
.proof-strip .l {
  display: block; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-top: 2px;
}
@media (max-width: 720px) {
  .proof-strip .p { flex-basis: 33%; border-bottom: 1px solid var(--line-soft); }
}

/* ---------- concept cards (the portfolio) ---------- */
.work { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.work-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px;
}
@media (max-width: 860px) { .work-grid { grid-template-columns: 1fr; } }

.concept {
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  background: var(--paper);
  display: flex; flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
a.concept { text-decoration: none; color: inherit; }
.concept .try { margin-top: 10px; font-family: var(--mono); font-size: 12px; color: var(--signal); }
a.concept:hover .try { text-decoration: underline; }
.concept:hover {
  border-color: var(--ink-3);
  box-shadow: 0 16px 40px -24px rgba(20, 29, 39, 0.28);
  transform: translateY(-2px);
}
.concept-meta { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.concept-meta .cat {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3);
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.chip {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em;
  padding: 3px 8px; border-radius: 99px; text-transform: none;
}
.chip.concept-chip { background: var(--signal-soft); color: var(--signal); }
.chip.shipped-chip { background: var(--ok-soft); color: var(--ok); }
.concept-meta h3 {
  font-family: var(--display); font-weight: 650; font-size: 19px; letter-spacing: -0.01em;
}
.concept-meta p { font-size: 14.5px; color: var(--ink-2); }

/* mini product screens */
.shot {
  background: var(--card); border-bottom: 1px solid var(--line);
  aspect-ratio: 16 / 9.6; position: relative; overflow: hidden;
  container-type: inline-size;
}
.shot-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-bottom: 1px solid var(--line-soft);
}
.shot-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.shot-bar span {
  font-family: var(--mono); font-size: 10px; color: var(--ink-3); margin-left: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.shot-body { position: absolute; inset: 32px 0 0; display: flex; font-size: 10px; }

/* shared mockup atoms */
.mk-side {
  width: 26%; border-right: 1px solid var(--line-soft); padding: 8px;
  display: flex; flex-direction: column; gap: 6px; background: var(--paper);
}
.mk-side .it {
  height: 8px; border-radius: 3px; background: var(--line-soft); width: 85%;
}
.mk-side .it.on { background: var(--ink-2); width: 92%; }
.mk-main { flex: 1; padding: 10px; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.mk-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border: 1px solid var(--line-soft); border-radius: 4px;
  background: var(--card);
}
.mk-row .ln { height: 7px; border-radius: 3px; background: var(--line-soft); flex: 1; }
.mk-row .ln.w2 { flex: 0.5; }
.mk-badge {
  font-family: var(--mono); font-size: 8.5px; padding: 2px 6px; border-radius: 99px;
  flex-shrink: 0; letter-spacing: 0.04em;
}
.mk-badge.g { background: var(--ok-soft); color: var(--ok); }
.mk-badge.y { background: var(--warn-soft); color: var(--warn); }
.mk-badge.r { background: var(--signal-soft); color: var(--signal); }
.mk-badge.b { background: #e3ecfb; color: #2458b3; }
.mk-kpis { display: flex; gap: 7px; }
.mk-kpi {
  flex: 1; border: 1px solid var(--line-soft); border-radius: 4px; padding: 6px 8px;
  background: var(--card);
}
.mk-kpi b { display: block; font-family: var(--mono); font-size: 11px; color: var(--ink); }
.mk-kpi s { display: block; text-decoration: none; font-family: var(--mono); font-size: 7.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; }
.mk-bars { display: flex; align-items: flex-end; gap: 4px; flex: 1; padding: 4px 2px 0; }
.mk-bars i { flex: 1; border-radius: 2px 2px 0 0; background: #b9c8ee; }
.mk-bars i.hi { background: #2458b3; }
.mk-wave { display: flex; align-items: center; gap: 3px; height: 26px; padding: 0 2px; }
.mk-wave i { flex: 1; max-width: 9px; border-radius: 2px; background: #7fb3a2; }
.mk-transcript { display: flex; flex-direction: column; gap: 5px; }
.mk-msg {
  max-width: 78%; padding: 5px 8px; border-radius: 6px;
  background: var(--paper); border: 1px solid var(--line-soft);
  font-size: 8.5px; line-height: 1.45; color: var(--ink-2);
}
.mk-msg.me { align-self: flex-end; background: #eef2f9; }
.mk-cite {
  display: inline-block; font-family: var(--mono); font-size: 7.5px;
  background: #e3ecfb; color: #2458b3; border-radius: 3px; padding: 0 4px; margin-left: 3px;
}
.mk-doc {
  width: 42%; border-right: 1px solid var(--line-soft); background: var(--paper);
  padding: 10px; display: flex; flex-direction: column; gap: 5px;
}
.mk-doc .dl { height: 6px; border-radius: 3px; background: var(--line); }
.mk-doc .dl.hl { background: #f3d9a4; }
.mk-doc .dl.hl2 { background: #f0bdb9; }
.mk-fields { flex: 1; padding: 10px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mk-field { display: flex; align-items: center; gap: 6px; }
.mk-field s {
  text-decoration: none; font-family: var(--mono); font-size: 8px; color: var(--ink-3);
  width: 34%; flex-shrink: 0; text-transform: uppercase; letter-spacing: 0.06em;
  overflow: hidden; white-space: nowrap;
}
.mk-field .val {
  flex: 1; border: 1px solid var(--line-soft); border-radius: 3px; padding: 3px 6px;
  font-family: var(--mono); font-size: 8.5px; color: var(--ink);
  white-space: nowrap; overflow: hidden;
}
.mk-conf { font-family: var(--mono); font-size: 8px; flex-shrink: 0; }
.mk-conf.g { color: var(--ok); }
.mk-conf.y { color: var(--warn); }
.mk-trace { display: flex; flex-direction: column; gap: 0; padding: 2px 0; }
.mk-step { display: flex; gap: 8px; align-items: stretch; }
.mk-step .rail { display: flex; flex-direction: column; align-items: center; width: 12px; flex-shrink: 0; }
.mk-step .nd { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--ink-3); background: var(--card); margin-top: 4px; flex-shrink: 0; }
.mk-step .nd.ok { border-color: var(--ok); background: var(--ok); }
.mk-step .vln { width: 1.5px; flex: 1; background: var(--line-soft); }
.mk-step .bd { flex: 1; padding: 1px 0 8px; min-width: 0; }
.mk-step .fn { display: block; font-family: var(--mono); font-size: 8.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-step .out { display: block; font-family: var(--mono); font-size: 7.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* approval-queue actions */
.mk-acts { display: flex; gap: 4px; flex-shrink: 0; }
.mk-acts i {
  width: 16px; height: 16px; border-radius: 3px; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 9px; line-height: 1;
}
.mk-acts .y { color: var(--ok); border-color: #bcdcc9; background: var(--ok-soft); }
.mk-acts .n { color: var(--signal); border-color: #ecc7c3; background: var(--signal-soft); }

/* pipeline kanban */
.mk-cols { display: flex; gap: 8px; flex: 1; min-height: 0; }
.mk-col {
  flex: 1; background: var(--paper); border: 1px solid var(--line-soft); border-radius: 4px;
  padding: 6px; display: flex; flex-direction: column; gap: 5px; min-width: 0;
}
.mk-col s {
  text-decoration: none; font-family: var(--mono); font-size: 7.5px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; overflow: hidden;
}
.mk-card {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: 3px;
  padding: 5px 6px; display: flex; flex-direction: column; gap: 3px;
}
.mk-card i { display: block; height: 5px; border-radius: 2px; background: var(--line-soft); }
.mk-card i.w2 { width: 60%; }

/* ---------- experience ---------- */
.xp-list { border-top: 1px solid var(--line); }
.xp {
  display: grid; grid-template-columns: 190px minmax(0, 1fr) 150px;
  gap: 20px; padding: 20px 4px; border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.xp .co { font-family: var(--display); font-weight: 650; font-size: 16.5px; letter-spacing: -0.01em; }
.xp .co small { display: block; font-family: var(--sans); font-weight: 500; font-size: 13px; color: var(--ink-2); margin-top: 1px; }
.xp .what { font-size: 14.5px; color: var(--ink-2); }
.xp .when { font-family: var(--mono); font-size: 12px; color: var(--ink-3); text-align: right; white-space: nowrap; }
.xp .yc { color: var(--signal); font-weight: 600; }
@media (max-width: 720px) {
  .xp { grid-template-columns: 1fr; gap: 4px; }
  .xp .when { text-align: left; }
}
.xp-more { margin-top: 24px; font-size: 14.5px; color: var(--ink-2); }
.xp-more a { color: var(--ink); font-weight: 600; }

/* ---------- stack ---------- */
.stack { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stack-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 48px; }
@media (max-width: 720px) { .stack-grid { grid-template-columns: 1fr; } }
.stack-group h3 {
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px;
}
.stack-group h3::before { content: '— '; color: var(--signal); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span {
  font-family: var(--mono); font-size: 12.5px; padding: 5px 10px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper);
  color: var(--ink-2);
}

/* ---------- after hours (the dark band) ---------- */
.afterhours { background: #0b0709; color: #e8dcd2; }
.afterhours .eyebrow { color: #8f7f74; }
.afterhours .section-head h2 { color: #f5ede4; }
.afterhours .section-head p { color: #b3a396; }
.ah-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 860px) { .ah-grid { grid-template-columns: 1fr; } }
.ah-card {
  border: 1px solid #33231d; border-radius: var(--r); padding: 22px;
  text-decoration: none; color: inherit; background: rgba(255, 90, 54, 0.03);
  transition: border-color 0.2s, background 0.2s;
}
.ah-card:hover { border-color: #ff5a36; background: rgba(255, 90, 54, 0.07); }
.ah-card .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: #8f7f74; }
.ah-card h3 { font-family: var(--display); font-weight: 650; font-size: 18px; margin: 8px 0 6px; color: #f5ede4; }
.ah-card p { font-size: 14px; color: #b3a396; }
.ah-card .go { display: inline-block; margin-top: 14px; font-family: var(--mono); font-size: 12px; color: #ff5a36; }

/* ---------- contact / footer ---------- */
.contact { padding-bottom: 40px; }
.contact-band {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--card);
  padding: 44px; display: flex; justify-content: space-between; align-items: center;
  gap: 28px; flex-wrap: wrap;
}
.contact-band h2 {
  font-family: var(--display); font-weight: 650; font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.015em; margin: 8px 0 6px;
}
.contact-band p { color: var(--ink-2); max-width: 46ch; }
.contact-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; }
.foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--ink-3);
}
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }
.foot-links a { color: var(--ink-2); text-decoration: none; }
.foot-links a:hover { color: var(--ink); }
.foot .tower { font-family: var(--mono); font-size: 12px; }
.foot .tower a { color: var(--signal); text-decoration: none; }

/* ---------- availability ---------- */
.avail {
  margin-top: 20px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2);
  display: flex; align-items: center; gap: 9px;
}
.avail .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-soft); animation: pulse 2.2s ease-in-out infinite;
}

/* ---------- footer build note ---------- */
.build-note {
  width: 100%; margin-top: 6px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-3);
}

/* ---------- mockup choreography ----------
 * Each concept card runs its product in miniature: slow loops (7–12s),
 * one motion idea per card, all silenced by the global reduced-motion rule.
 */

/* voice desk: the call is live — the waveform plays */
.c-voice .mk-wave i { transform-origin: 50% 50%; animation: eq 1.3s ease-in-out infinite alternate; }
.c-voice .mk-wave i:nth-child(2n) { animation-delay: 0.35s; }
.c-voice .mk-wave i:nth-child(3n) { animation-duration: 1.05s; }
.c-voice .mk-wave i:nth-child(5n) { animation-delay: 0.6s; animation-duration: 1.55s; }
@keyframes eq { from { transform: scaleY(0.4); } to { transform: scaleY(1); } }

/* approval queue: rows get worked, top to bottom; the risky one gets denied */
.c-queue .mk-row { animation: q-ok 11s ease-in-out infinite; }
.c-queue .mk-row:nth-of-type(2) { animation-delay: 1.8s; }
.c-queue .mk-row:nth-of-type(3) { animation-delay: 3.6s; }
.c-queue .mk-row:nth-of-type(4) { animation-delay: 5.4s; }
.c-queue .mk-row:nth-of-type(5) { animation-name: q-no; animation-delay: 7.2s; }
.c-queue .mk-row .mk-acts .y { animation: q-pop 11s ease-in-out infinite; }
.c-queue .mk-row:nth-of-type(2) .mk-acts .y { animation-delay: 1.8s; }
.c-queue .mk-row:nth-of-type(3) .mk-acts .y { animation-delay: 3.6s; }
.c-queue .mk-row:nth-of-type(4) .mk-acts .y { animation-delay: 5.4s; }
.c-queue .mk-row:nth-of-type(5) .mk-acts .y { animation: none; }
.c-queue .mk-row:nth-of-type(5) .mk-acts .n { animation: q-pop 11s 7.2s ease-in-out infinite; }
@keyframes q-ok {
  0%, 100% { background: var(--card); border-color: var(--line-soft); }
  4% { background: var(--ok-soft); border-color: #bcdcc9; }
  11% { background: var(--card); border-color: var(--line-soft); }
}
@keyframes q-no {
  0%, 100% { background: var(--card); border-color: var(--line-soft); }
  4% { background: var(--signal-soft); border-color: #ecc7c3; }
  11% { background: var(--card); border-color: var(--line-soft); }
}
@keyframes q-pop { 0%, 100% { transform: none; } 4% { transform: scale(1.25); } 9% { transform: none; } }

/* trace inspector: the run executes, step by step */
.c-trace .nd {
  animation: trace-fill 9s ease-in-out infinite; animation-fill-mode: backwards;
}
.c-trace .mk-step:nth-child(2) .nd { animation-delay: 1.1s; }
.c-trace .mk-step:nth-child(3) .nd { animation-delay: 2.2s; }
.c-trace .mk-step:nth-child(4) .nd { animation-delay: 3.3s; }
@keyframes trace-fill {
  0% { background: var(--card); border-color: var(--ink-3); }
  5%, 85% { background: var(--ok); border-color: var(--ok); }
  93%, 100% { background: var(--card); border-color: var(--ink-3); }
}

/* extraction review: the uncertain value asks for eyes */
.c-doc .dl.hl { animation: hl-pulse 3.2s ease-in-out infinite; }
.c-doc .mk-field:nth-child(4) .val { animation: field-warn 3.2s ease-in-out infinite; }
@keyframes hl-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@keyframes field-warn { 0%, 100% { border-color: var(--line-soft); } 50% { border-color: #e2b13c; } }

/* evals + spend: bars grow when the card arrives; the highlight breathes */
.js .c-eval .mk-bars i, .js .c-cost .mk-bars i { transform-origin: bottom; transform: scaleY(0); }
.c-eval.in .mk-bars i, .c-cost.in .mk-bars i {
  animation: bar-grow 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
.c-eval.in .mk-bars i:nth-child(2n) { animation-delay: 0.08s; }
.c-eval.in .mk-bars i:nth-child(3n) { animation-delay: 0.16s; }
.c-eval.in .mk-bars i:nth-child(n+7) { animation-delay: 0.24s; }
.c-eval.in .mk-bars i:nth-child(n+10) { animation-delay: 0.32s; }
.c-cost.in .mk-bars i:nth-child(2n) { animation-delay: 0.08s; }
.c-cost.in .mk-bars i:nth-child(3n) { animation-delay: 0.16s; }
.c-cost.in .mk-bars i:nth-child(n+7) { animation-delay: 0.24s; }
.c-cost.in .mk-bars i:nth-child(n+10) { animation-delay: 0.32s; }
@keyframes bar-grow { to { transform: scaleY(1); } }
.c-eval.in .mk-bars i.hi, .c-cost.in .mk-bars i.hi {
  animation: bar-grow 0.7s 0.4s cubic-bezier(0.2, 0.7, 0.3, 1) forwards, hl-pulse 3s 1.4s ease-in-out infinite;
}
.c-cost .mk-badge.y { animation: hl-pulse 4s ease-in-out infinite; }

/* outbound: a prospect advances from researched to engaged */
.c-sdr .mv-a { animation: mv-out 8s ease-in-out infinite; }
.c-sdr .mv-b { animation: mv-in 8s ease-in-out infinite; }
@keyframes mv-out {
  0%, 38% { opacity: 1; transform: none; }
  46%, 88% { opacity: 0.15; transform: translateY(2px); }
  96%, 100% { opacity: 1; transform: none; }
}
@keyframes mv-in {
  0%, 40% { opacity: 0; transform: translateY(-4px); }
  48%, 88% { opacity: 1; transform: none; }
  96%, 100% { opacity: 0; transform: translateY(-4px); }
}

/* knowledge desk: ask, answer, cite — on repeat */
.c-rag .mk-msg.me { animation: rag-q 12s ease-in-out infinite; }
.c-rag .mk-msg:not(.me) { animation: rag-a 12s ease-in-out infinite; }
.c-rag .mk-msg:not(.me) .mk-cite { animation: rag-cite 12s ease-in-out infinite; }
.c-rag .mk-row { animation: rag-src 12s ease-in-out infinite; }
@keyframes rag-q { 0% { opacity: 0; transform: translateY(4px); } 5%, 93% { opacity: 1; transform: none; } 99%, 100% { opacity: 0; } }
@keyframes rag-a { 0%, 13% { opacity: 0; transform: translateY(4px); } 20%, 93% { opacity: 1; transform: none; } 99%, 100% { opacity: 0; } }
@keyframes rag-cite { 0%, 22% { opacity: 0; } 28%, 100% { opacity: 1; } }
@keyframes rag-src { 0%, 26% { opacity: 0; transform: translateY(3px); } 33%, 93% { opacity: 1; transform: none; } 99%, 100% { opacity: 0; } }

/* ---------- reveal on scroll (gentle, once) ----------
 * Hidden state is gated on the .js class: if the script never runs, nothing
 * on the page is ever invisible. */
.reveal { transition: opacity 0.55s ease, transform 0.55s ease; }
.js .reveal { opacity: 0; transform: translateY(14px); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }
