/* Agent Cartridge — cartridge-inspired, clean, professional theme. */

:root {
  --acx-teal: #0f766e;
  --acx-cyan: #06b6d4;
  --acx-gold: #ca8a04;
  --acx-ink: #083344;
  --md-typeset-a-color: #0e7490;
}
[data-md-color-scheme="slate"] { --md-typeset-a-color: #5eead4; }

/* Brand the primary/accent so links, buttons, and active nav pick it up */
[data-md-color-primary="teal"] { --md-primary-fg-color: #0f766e; }

/* ---- Hero ------------------------------------------------------------- */
.acx-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 2.2rem;
  align-items: center;
  margin: 0.5rem 0 2.75rem;
  padding: 2.4rem 2.4rem 2.6rem;
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(1100px 320px at 92% -20%, rgba(6, 182, 212, 0.20), transparent 60%),
    radial-gradient(700px 260px at 0% 120%, rgba(15, 118, 110, 0.14), transparent 60%),
    linear-gradient(135deg, rgba(15, 118, 110, 0.10), rgba(6, 182, 212, 0.045));
  border: 1px solid rgba(6, 182, 212, 0.28);
  box-shadow: 0 1px 2px rgba(8, 51, 68, 0.04);
}
.acx-hero::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 5px;
  background: linear-gradient(180deg, var(--acx-teal), var(--acx-cyan));
}
.acx-hero h1 { margin: 0 0 0.5rem; font-size: 2.35rem; line-height: 1.08; letter-spacing: -0.02em; font-weight: 800; }
.acx-hero h1 small { font-weight: 600; font-size: 1rem; opacity: 0.65; }
.acx-hero .acx-tagline { font-size: 1.08rem; line-height: 1.55; opacity: 0.9; margin: 0 0 1.2rem; max-width: 40ch; }
.acx-hero-questions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0.9rem 0 1rem;
}
.md-typeset .acx-hero-question {
  min-width: 0;
  padding: 0.72rem;
  border: 1px solid rgba(6, 182, 212, 0.28);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.62);
  color: inherit;
  text-decoration: none;
}
.md-typeset .acx-hero-question:hover,
.md-typeset .acx-hero-question:focus { border-color: var(--acx-cyan); text-decoration: none; }
.acx-hero-question span,
.acx-hero-question strong,
.acx-hero-question small { display: block; }
.acx-hero-question span { color: var(--acx-teal); font-size: 0.62rem; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; }
.acx-hero-question strong { margin: 0.22rem 0 0.3rem; font-size: 0.78rem; line-height: 1.28; }
.acx-hero-question small { color: var(--md-default-fg-color--light); font-size: 0.62rem; line-height: 1.4; }
[data-md-color-scheme="slate"] .md-typeset .acx-hero-question { background: rgba(15, 23, 42, 0.48); }
.acx-hero .acx-cart { display: flex; justify-content: center; }
.acx-hero img { width: 100%; max-width: 430px; height: auto; filter: drop-shadow(0 16px 34px rgba(8, 51, 68, 0.30)); animation: acx-float 6s ease-in-out infinite; }
@keyframes acx-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (max-width: 760px) {
  .acx-hero { grid-template-columns: 1fr; text-align: left; padding: 1.6rem; }
  .acx-hero h1 { font-size: 1.9rem; }
  .acx-hero-questions { grid-template-columns: 1fr; }
  .acx-hero .acx-cart { order: -1; }
}

/* ---- Pills / badges --------------------------------------------------- */
.acx-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.6rem 0 0.2rem; }
.acx-pill {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
  padding: 0.3rem 0.7rem; border-radius: 999px;
  background: rgba(6, 182, 212, 0.13); color: var(--acx-teal);
  border: 1px solid rgba(6, 182, 212, 0.32);
}
[data-md-color-scheme="slate"] .acx-pill { color: #5eead4; background: rgba(6, 182, 212, 0.14); }

/* ---- Action buttons --------------------------------------------------- */
.acx-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: center; margin-top: 1.25rem; }
.acx-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.62rem 1rem;
  border: 1px solid rgba(15, 118, 110, 0.35);
  border-radius: 10px;
  background: var(--md-default-bg-color);
  color: var(--acx-teal);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(8, 51, 68, 0.06);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.acx-button:hover { transform: translateY(-2px); border-color: var(--acx-cyan); box-shadow: 0 8px 22px rgba(8, 51, 68, 0.14); }
.acx-button:focus-visible, .acx-choice:focus-visible, .acx-hero-question:focus-visible { outline: 3px solid var(--acx-cyan); outline-offset: 3px; }
.md-typeset .acx-button--primary,
.md-typeset .acx-button--primary:hover,
.md-typeset .acx-button--primary:focus { background: linear-gradient(135deg, var(--acx-teal), #0891b2); color: #fff; border-color: transparent; }
.acx-button--quiet { background: transparent; box-shadow: none; }
[data-md-color-scheme="slate"] .acx-button:not(.acx-button--primary) { color: #5eead4; background: rgba(15, 23, 42, 0.45); }

/* ---- Animated share loop --------------------------------------------- */
.acx-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 0.5rem;
  margin: 1.5rem 0 0.65rem;
}
.acx-flow__node {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 12px;
  background: var(--md-default-bg-color);
  box-shadow: 0 5px 16px rgba(8, 51, 68, 0.06);
  animation: acx-node-in 7s ease-in-out infinite;
}
.acx-flow__node:nth-of-type(3) { animation-delay: 0.35s; }
.acx-flow__node:nth-of-type(5) { animation-delay: 0.7s; }
.acx-flow__node:nth-of-type(7) { animation-delay: 1.05s; }
.acx-flow__node:nth-of-type(9) { animation-delay: 1.4s; }
.acx-flow__node span { color: var(--acx-teal); font-size: 0.64rem; font-weight: 800; letter-spacing: 0.1em; }
.acx-flow__node strong { margin: 0.2rem 0; font-size: 0.82rem; }
.acx-flow__node small { color: var(--md-default-fg-color--light); font-size: 0.65rem; line-height: 1.35; }
.acx-flow__arrow { align-self: center; color: var(--acx-cyan); font-weight: 900; animation: acx-arrow 1.8s ease-in-out infinite; }
.acx-flow-caption { margin: 0 0 2.2rem; text-align: center; color: var(--md-default-fg-color--light); font-size: 0.78rem; }
@keyframes acx-node-in {
  0%, 12%, 100% { border-color: var(--md-default-fg-color--lightest); transform: translateY(0); }
  5% { border-color: var(--acx-cyan); transform: translateY(-4px); box-shadow: 0 12px 24px rgba(6, 182, 212, 0.16); }
}
@keyframes acx-arrow { 0%, 100% { opacity: 0.35; transform: translateX(-2px); } 50% { opacity: 1; transform: translateX(2px); } }

/* ---- Feature cards ("cartridge slots") -------------------------------- */
.acx-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.acx-card {
  position: relative;
  padding: 1.15rem 1.2rem; border-radius: 14px;
  border: 1px solid var(--md-default-fg-color--lightest);
  background: var(--md-default-bg-color);
  overflow: hidden;
  transition: transform 0.13s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.acx-card::before {
  content: ""; position: absolute; top: 0; left: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--acx-teal), var(--acx-cyan));
}
.acx-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(8, 51, 68, 0.14); border-color: rgba(6, 182, 212, 0.4); }
.acx-card h3 { margin: 0 0 0.35rem; font-size: 1rem; padding-left: 0.35rem; }
.acx-card p { margin: 0; font-size: 0.86rem; line-height: 1.5; opacity: 0.82; padding-left: 0.35rem; }
.acx-card a { text-decoration: none; }

/* ---- Sharing page ----------------------------------------------------- */
.acx-share-hero {
  position: relative;
  overflow: hidden;
  margin: 0.5rem 0 2rem;
  padding: clamp(1.5rem, 5vw, 3.4rem);
  border: 1px solid rgba(6, 182, 212, 0.28);
  border-radius: 24px;
  background:
    radial-gradient(circle at 85% 10%, rgba(6, 182, 212, 0.24), transparent 28%),
    radial-gradient(circle at 8% 95%, rgba(15, 118, 110, 0.18), transparent 32%),
    linear-gradient(135deg, rgba(15, 118, 110, 0.09), rgba(6, 182, 212, 0.03));
}
.acx-share-hero::after {
  content: "";
  position: absolute;
  width: 9rem;
  height: 9rem;
  right: 8%;
  bottom: -5.5rem;
  border: 1.2rem solid rgba(6, 182, 212, 0.09);
  border-radius: 50%;
  animation: acx-orbit 12s linear infinite;
  pointer-events: none;
}
.acx-share-hero h1 { max-width: 16ch; margin: 0.3rem 0 0.65rem; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.03; letter-spacing: -0.045em; }
.acx-share-hero > p:not(.acx-share-status) { max-width: 62ch; font-size: 1rem; line-height: 1.6; }
.acx-eyebrow { color: var(--acx-teal); font-size: 0.68rem; font-weight: 850; letter-spacing: 0.16em; }
.acx-share-status { min-height: 1.2rem; margin: 0.7rem 0 0; color: var(--acx-teal); font-size: 0.74rem; font-weight: 700; }
@keyframes acx-orbit { to { transform: rotate(360deg); } }

.acx-choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; margin: 1.3rem 0 2.5rem; }
.md-typeset .acx-choice {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 13rem;
  padding: 1.25rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 16px;
  background: var(--md-default-bg-color);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 5px 18px rgba(8, 51, 68, 0.06);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.md-typeset .acx-choice:hover,
.md-typeset .acx-choice:focus { text-decoration: none; }
.md-typeset .acx-choice * { text-decoration: none; }
.acx-choice:hover { transform: translateY(-5px); border-color: var(--acx-cyan); box-shadow: 0 16px 32px rgba(8, 51, 68, 0.14); }
.acx-choice__icon { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 10px; background: rgba(6, 182, 212, 0.12); color: var(--acx-teal); font-size: 1.35rem; }
.acx-choice strong { font-size: 1rem; }
.acx-choice small { flex: 1; color: var(--md-default-fg-color--light); font-size: 0.74rem; line-height: 1.55; }
.acx-choice > span:last-child { color: var(--acx-teal); font-size: 0.76rem; font-weight: 750; }

.acx-pr-flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.75rem; margin: 1.4rem 0; }
.acx-pr-flow > div { position: relative; padding: 0.85rem; border-top: 3px solid var(--acx-cyan); background: rgba(6, 182, 212, 0.055); border-radius: 0 0 10px 10px; }
.acx-pr-flow span { display: block; color: var(--acx-teal); font-size: 0.65rem; font-weight: 850; }
.acx-pr-flow strong, .acx-pr-flow small { display: block; }
.acx-pr-flow strong { margin: 0.2rem 0; font-size: 0.78rem; }
.acx-pr-flow small { color: var(--md-default-fg-color--light); font-size: 0.65rem; line-height: 1.4; }
.acx-copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; margin: 1rem 0 2rem; }
.acx-copy-row [role="status"] { color: var(--acx-teal); font-size: 0.74rem; font-weight: 700; }
.acx-share-footer { margin-top: 2.5rem; padding: 1.3rem; border: 1px solid rgba(6, 182, 212, 0.32); border-radius: 14px; background: rgba(6, 182, 212, 0.08); text-align: center; }
.acx-figure { text-align: center; }

/* ---- Static Exchange ------------------------------------------------- */
.acx-exchange-hero {
  position: relative;
  overflow: hidden;
  margin: 0.5rem 0 2rem;
  padding: clamp(1.5rem, 5vw, 3.3rem);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 24px;
  background:
    radial-gradient(circle at 86% 10%, rgba(6, 182, 212, 0.22), transparent 29%),
    radial-gradient(circle at 12% 100%, rgba(202, 138, 4, 0.12), transparent 31%),
    linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(6, 182, 212, 0.025));
}
.acx-exchange-hero::after {
  content: "";
  position: absolute;
  width: 12rem;
  height: 12rem;
  right: -5rem;
  bottom: -7rem;
  border: 1.1rem solid rgba(6, 182, 212, 0.08);
  border-radius: 50%;
  animation: acx-orbit 16s linear infinite;
  pointer-events: none;
}
.acx-exchange-hero > * { position: relative; z-index: 1; }
.acx-exchange-hero h1 {
  max-width: 16ch;
  margin: 0.3rem 0 0.75rem;
  font-size: clamp(2rem, 5vw, 3.35rem);
  line-height: 1.03;
  letter-spacing: -0.045em;
}
.acx-exchange-hero > p { max-width: 66ch; font-size: 1rem; line-height: 1.62; }
.acx-exchange-flow {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 1.4rem 0 2rem;
}
.acx-exchange-flow > div {
  position: relative;
  min-width: 0;
  padding: 0.9rem 0.75rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 12px;
  background: var(--md-default-bg-color);
  box-shadow: 0 6px 18px rgba(8, 51, 68, 0.06);
  animation: acx-exchange-pulse 8s ease-in-out infinite;
}
.acx-exchange-flow > div:nth-child(2) { animation-delay: 0.35s; }
.acx-exchange-flow > div:nth-child(3) { animation-delay: 0.7s; }
.acx-exchange-flow > div:nth-child(4) { animation-delay: 1.05s; }
.acx-exchange-flow > div:nth-child(5) { animation-delay: 1.4s; }
.acx-exchange-flow > div:nth-child(6) { animation-delay: 1.75s; }
.acx-exchange-flow > div:nth-child(7) { animation-delay: 2.1s; }
.acx-exchange-flow span,
.acx-exchange-flow strong,
.acx-exchange-flow small { display: block; }
.acx-exchange-flow span {
  color: var(--acx-teal);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.1em;
}
.acx-exchange-flow strong { margin: 0.22rem 0; font-size: 0.76rem; }
.acx-exchange-flow small {
  color: var(--md-default-fg-color--light);
  font-size: 0.63rem;
  line-height: 1.35;
}
@keyframes acx-exchange-pulse {
  0%, 10%, 100% { border-color: var(--md-default-fg-color--lightest); transform: translateY(0); }
  5% { border-color: var(--acx-cyan); transform: translateY(-4px); box-shadow: 0 12px 24px rgba(6, 182, 212, 0.14); }
}

/* ---- Agent Graph ------------------------------------------------------ */
.acx-graph-hero {
  position: relative;
  overflow: hidden;
  margin: 0.5rem 0 2.2rem;
  padding: clamp(1.5rem, 5vw, 3.2rem);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 12%, rgba(202, 138, 4, 0.13), transparent 28%),
    radial-gradient(circle at 10% 100%, rgba(15, 118, 110, 0.17), transparent 34%),
    linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(6, 182, 212, 0.025));
}
.acx-graph-hero::after {
  content: "";
  position: absolute;
  width: 11rem;
  height: 11rem;
  right: -4.5rem;
  top: -5rem;
  border: 1px dashed rgba(202, 138, 4, 0.34);
  border-radius: 50%;
  animation: acx-orbit 18s linear infinite;
  pointer-events: none;
}
.acx-graph-hero h1 {
  max-width: 17ch;
  margin: 0.3rem 0 0.8rem;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
}
.acx-graph-hero > p,
.acx-graph-hero > .acx-actions {
  position: relative;
  z-index: 1;
}
.acx-graph-lede {
  max-width: 67ch;
  margin-bottom: 1rem;
  font-size: 1.02rem;
  line-height: 1.62;
}

.acx-agent-graph {
  margin: 1.5rem 0 2rem;
}
.acx-agent-graph__canvas {
  overflow: hidden;
  border: 1px solid rgba(6, 182, 212, 0.28);
  border-radius: 22px;
  background:
    linear-gradient(rgba(6, 182, 212, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 50% 46%, rgba(202, 138, 4, 0.1), transparent 24%),
    var(--md-default-bg-color);
  background-size: 34px 34px, 34px 34px, auto, auto;
  box-shadow: 0 18px 42px rgba(8, 51, 68, 0.09);
}
.acx-agent-graph__desktop {
  display: block;
  width: 100%;
  height: auto;
}
.acx-agent-graph__actor {
  fill: var(--md-default-bg-color);
  stroke: rgba(6, 182, 212, 0.52);
  stroke-width: 2;
  filter: drop-shadow(0 8px 14px rgba(8, 51, 68, 0.09));
}
.acx-agent-graph__loop {
  fill: rgba(6, 182, 212, 0.055);
  stroke: rgba(15, 118, 110, 0.28);
  stroke-width: 1.5;
  stroke-dasharray: 6 7;
}
.acx-agent-graph__decision {
  fill: rgba(202, 138, 4, 0.09);
  fill: color-mix(in srgb, var(--acx-gold) 9%, var(--md-default-bg-color));
  stroke: rgba(202, 138, 4, 0.68);
  stroke-width: 2;
  filter: drop-shadow(0 9px 17px rgba(202, 138, 4, 0.13));
}
.acx-agent-graph__kicker {
  fill: var(--acx-teal);
  font-family: var(--md-text-font-family);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 1.5px;
}
.acx-agent-graph__title {
  fill: var(--md-default-fg-color);
  font-family: var(--md-text-font-family);
  font-size: 21px;
  font-weight: 800;
}
.acx-agent-graph__sub,
.acx-agent-graph__route-copy {
  fill: var(--md-default-fg-color--light);
  font-family: var(--md-text-font-family);
  font-size: 13px;
}
.acx-agent-graph__label {
  fill: var(--acx-teal);
  font-family: var(--md-text-font-family);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 1.2px;
}
.acx-agent-graph__route {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 9 10;
  animation: acx-graph-route 3.6s linear infinite;
}
.acx-agent-graph__route--request,
.acx-agent-graph__route--direct {
  stroke: var(--acx-cyan);
}
.acx-agent-graph__route--return,
.acx-agent-graph__route--report {
  stroke: var(--acx-teal);
  animation-direction: reverse;
}
.acx-agent-graph__route--return { animation-delay: -0.9s; }
.acx-agent-graph__route--report { animation-delay: -1.8s; }
.acx-agent-graph__route--converge,
.acx-agent-graph__route--decision {
  stroke: var(--acx-gold);
  animation-duration: 2.8s;
}
.acx-agent-graph__route--delayed { animation-delay: -1.4s; }
.acx-agent-graph__marker--cyan { fill: var(--acx-cyan); }
.acx-agent-graph__marker--teal { fill: var(--acx-teal); }
.acx-agent-graph__marker--gold { fill: var(--acx-gold); }
@keyframes acx-graph-route { to { stroke-dashoffset: -38; } }
.acx-agent-graph figcaption {
  max-width: 76ch;
  margin: 0.8rem auto 0;
  color: var(--md-default-fg-color--light);
  font-size: 0.74rem;
  line-height: 1.55;
  text-align: center;
}
.md-typeset .acx-agent-graph__mobile {
  display: none !important;
  list-style: none;
  margin: 0;
  padding: 1rem;
}
.acx-agent-graph__mobile li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.45rem;
  align-items: center;
  margin: 0;
  padding: 0.9rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 12px;
  background: var(--md-default-bg-color);
}
.acx-agent-graph__mobile li + li { margin-top: 0.7rem; }
.acx-agent-graph__mobile span { font-size: 0.78rem; font-weight: 750; }
.acx-agent-graph__mobile strong { color: var(--acx-teal); font-size: 0.7rem; }
.acx-agent-graph__mobile small {
  grid-column: 1 / -1;
  color: var(--md-default-fg-color--light);
  font-size: 0.68rem;
  line-height: 1.45;
}
.acx-agent-graph__mobile .acx-agent-graph__mobile-convergence {
  border-color: rgba(202, 138, 4, 0.5);
  background: rgba(202, 138, 4, 0.07);
  background: color-mix(in srgb, var(--acx-gold) 7%, var(--md-default-bg-color));
}
.acx-graph-components .acx-card:nth-child(5)::before,
.acx-graph-components .acx-card:nth-child(6)::before {
  background: linear-gradient(180deg, var(--acx-gold), var(--acx-cyan));
}
.acx-graph-share-card {
  position: relative;
  overflow: hidden;
  margin: 2.5rem 0;
  padding: clamp(1.2rem, 4vw, 2rem);
  border: 1px solid rgba(202, 138, 4, 0.38);
  border-radius: 18px;
  background:
    radial-gradient(circle at 95% 15%, rgba(202, 138, 4, 0.13), transparent 30%),
    rgba(6, 182, 212, 0.055);
}
.acx-graph-share-card h3 { margin-top: 0.4rem; }
.acx-graph-share-card p { max-width: 70ch; }
.acx-graph-one-liner {
  margin: 1.3rem 0;
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--acx-gold);
  border-radius: 0 12px 12px 0;
  background: rgba(202, 138, 4, 0.07);
  background: color-mix(in srgb, var(--acx-gold) 7%, var(--md-default-bg-color));
  line-height: 1.6;
}
.acx-graph-hero a:focus-visible,
.acx-graph-share-card a:focus-visible {
  outline: 3px solid var(--acx-cyan);
  outline-offset: 3px;
}

/* ---- ROM / SAVE chips inline ----------------------------------------- */
.acx-rom, .acx-save {
  font-weight: 700; font-size: 0.78rem; padding: 0.12rem 0.5rem; border-radius: 6px; white-space: nowrap;
}
.acx-rom { background: #ecfeff; color: #0e7490; border: 1px solid #a5f3fc; }
.acx-save { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
[data-md-color-scheme="slate"] .acx-rom { background: rgba(6,182,212,0.15); color: #67e8f9; border-color: rgba(6,182,212,0.4); }
[data-md-color-scheme="slate"] .acx-save { background: rgba(148,163,184,0.15); color: #cbd5e1; border-color: rgba(148,163,184,0.35); }

/* ---- Small polish ----------------------------------------------------- */
.md-typeset table:not([class]) { box-shadow: 0 1px 2px rgba(8,51,68,0.05); border-radius: 8px; overflow: hidden; }
.md-typeset h2 { margin-top: 2.2rem; }
.md-typeset .admonition, .md-typeset details { border-radius: 10px; }

@media (max-width: 900px) {
  .acx-flow { grid-template-columns: 1fr; }
  .acx-flow__arrow { animation: none; transform: rotate(90deg); }
  .acx-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md-typeset .acx-choice { min-height: 0; }
  .acx-pr-flow { grid-template-columns: 1fr 1fr; }
  .acx-exchange-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .acx-agent-graph__desktop { display: none; }
  .md-typeset .acx-agent-graph__mobile { display: block !important; }
}

@media (max-width: 520px) {
  .acx-choice-grid { grid-template-columns: 1fr; }
  .acx-pr-flow { grid-template-columns: 1fr; }
  .acx-exchange-flow { grid-template-columns: 1fr; }
  .acx-button { width: 100%; }
  .acx-agent-graph__mobile li { grid-template-columns: 1fr; }
  .acx-agent-graph__mobile small { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .acx-hero img,
  .acx-flow__node,
  .acx-flow__arrow,
  .acx-share-hero::after,
  .acx-exchange-hero::after,
  .acx-exchange-flow > div,
  .acx-graph-hero::after,
  .acx-agent-graph__route { animation: none !important; }
  .acx-card,
  .acx-button,
  .acx-choice { transition: none; }
}
