/* Orbtic agents (src/js/orbtic/app.js): Discover, the agent page, the builder and My agents. The desk's grammar:
   a starfield head on ink, panels on the stone surface, ivory binary paper for anything you sign or confirm,
   brass for the record and the glow for gains. Every class starts with ag-. */

.ag {
  --up: var(--copper-300);
  --down: #c98a6e;
  --line: var(--surface-2);
  --ink: #0c0b0e;
  min-height: 100vh;
  background: var(--page) var(--glyph-dust);
  color: var(--text);
}
.ag-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.ag-up { color: var(--up); }
.ag-down { color: var(--down); }
.ag-dim { color: var(--text-3); }
.ag-dim2 { color: var(--text-2); }
.ag b { font-weight: 400; color: #fefaee; }
.ag-n { text-align: right; }

/* ---------- head: nav strip, the view's title, the three promises */
.ag-head {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-top: 100px;
  padding-bottom: 24px;
  background: #0c0b0e;
}
.ag-stars {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #0c0b0e url(../assets/306197242faaf099017cb611d26796a4.png) center -190px / max(100%, 1100px) auto no-repeat;
  image-rendering: pixelated;
  pointer-events: none;
}
.ag-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.ag-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}
.ag-navlink {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  color: var(--text-2);
  clip-path: var(--px-notch);
  transition: color 150ms cubic-bezier(.4, 0, .2, 1);
}
.ag-navlink.is-on { background: var(--surface-2); color: #fefaee; }
.ag-navlink.is-on::before { content: ""; width: 6px; height: 6px; margin-right: 8px; background: var(--accent); }
@media (hover: hover) { .ag-navlink:hover { color: var(--accent); } }
.ag-dot { color: var(--stone-500); }
.ag-live { width: 8px; height: 8px; background: var(--copper-300); box-shadow: 0 0 8px rgba(255, 223, 163, .6); }
.ag-addr { text-transform: none; } /* 0x1a2b…, not 0X1A2B… inside an all-caps button */
.ag-titles {
  display: grid;
  gap: 16px;
  padding-top: 40px;
}
.ag-titles:empty { display: none; }
.ag-title { margin: 0; text-wrap: balance; }
.ag-lede { max-width: 720px; margin: 0; color: var(--text-2); }
.ag-titlemeta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.ag-promises {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 0;
}
.ag-promises li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--surface);
  color: var(--text-2);
  box-shadow: inset 3px 0 0 var(--copper-500);
}
.ag-promise-n { color: var(--accent); font-family: var(--font-mono); }
.ag-walletmsg { margin: 10px 0 0; color: var(--copper-400); }
.ag-walletmsg:empty { display: none; }

.ag-main { padding-bottom: 96px; }
.ag-page { display: grid; gap: 24px; padding-top: 32px; }
.ag-page > *, .ag-step > * { min-width: 0; }
.ag-empty { padding-block: 32px; color: var(--text-2); }
.ag-back { justify-self: start; color: var(--text-2); }
@media (hover: hover) { .ag-back:hover, .ag-more:hover, .ag-inlink:hover { color: var(--accent); } }
.ag-inlink { color: var(--copper-400); text-decoration: underline; text-underline-offset: 3px; }
.ag-more { color: var(--copper-400); }
.ag :is(a, button, select, input, textarea, summary):focus-visible:not(.pbtn) { outline: 2px solid var(--copper-300); outline-offset: 2px; }
.ag .pbtn:disabled { cursor: not-allowed; }
.ag .pbtn:disabled .pbtn-face { opacity: .45; }
.ag .pbtn:disabled .pbtn-bracket { opacity: 0 !important; }

/* loading text: a pixel ellipsis that steps */
.ag-skel { color: var(--text-3); }
.ag-skel::after { content: "…"; display: inline-block; width: 1.4em; text-align: left; animation: ag-dots 1.2s steps(4, end) infinite; overflow: hidden; vertical-align: bottom; }
@keyframes ag-dots { from { width: 0; } to { width: 1.4em; } }

/* ---------- shared: cards, paper, badges, tables, kv */
.ag-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 24px;
  background: var(--surface);
  clip-path: var(--px-notch);
}
.ag-card-h { margin: 0; color: var(--accent); }
.ag-card p, .ag-paper p { margin: 0; }
.ag-fine { color: var(--text-3); text-wrap: pretty; }
.ag-sub { margin: 8px 0 0; color: var(--text-3); }
.ag-paper {
  --heading-color: var(--surface);
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 24px;
  background: #fefaee var(--binary-ivory);
  color: var(--surface);
  clip-path: var(--px-notch);
}
.ag-paper .ag-card-h { color: #8a6a35; }
.ag-paper b { color: var(--ink); }
.ag-paper .pbtn { --pbtn-bracket: rgba(23, 22, 20, .4); }
.ag-paper .ag-kv dt { color: var(--stone-500); }
.ag-paper .ag-kv dd { color: var(--ink); }
.ag-paper .ag-kv div { border-color: var(--stone-300); }
.ag-ink2 { color: var(--stone-600); }
.ag-why { padding: 8px 10px; background: var(--stone-200); color: var(--stone-600); box-shadow: inset 3px 0 0 #8a6a35; }
.ag-warn { color: var(--copper-400); }
.ag-warn:empty { display: none; }
.ag-paper .ag-warn { color: #8a4a2e; }
.ag-rule { width: 100%; height: 0; margin: 4px 0; border: 0; border-top: 2px dashed var(--stone-300); }

.ag-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ag-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  background: var(--surface-2);
  color: var(--text-2);
  font: 500 var(--fs-cap-sm)/1 var(--font-caption);
  text-transform: uppercase;
  white-space: nowrap;
}
.ag-badge--dim { background: transparent; box-shadow: inset 0 0 0 1px var(--stone-600); color: var(--text-3); }
.ag-badge--now { min-height: 18px; padding: 2px 6px; background: var(--accent); color: var(--ink); }
.ag-stage { box-shadow: inset 3px 0 0 var(--stone-500); }
.ag-stage--tested { color: var(--copper-400); box-shadow: inset 3px 0 0 var(--copper-400); }
.ag-stage--practicing { color: var(--copper-300); box-shadow: inset 3px 0 0 var(--copper-300); }
.ag-stage--live { background: var(--accent); color: var(--ink); box-shadow: none; }
.ag-stage--proven { background: var(--copper-300); color: var(--ink); box-shadow: 0 0 10px rgba(255, 223, 163, .35); }

.ag-kv { display: grid; gap: 0; margin: 0; }
.ag-kv div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ag-kv div:last-child { border-bottom: 0; }
.ag-kv dt { color: var(--text-3); font-size: var(--fs-alt-sm); }
.ag-kv dd { margin: 0; color: #fefaee; font-size: var(--fs-alt-sm); text-align: right; }
.ag-kv dd.ag-mono, .ag-kv dd .ag-mono { font-size: var(--fs-alt-xs); }

.ag-table { width: 100%; border-collapse: collapse; font-size: var(--fs-alt-sm); }
.ag-table th, .ag-table td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; font-weight: 400; }
.ag-table th:last-child, .ag-table td:last-child { padding-right: 0; }
.ag-table thead th { padding-top: 0; color: var(--text-3); white-space: nowrap; }
.ag-table .ag-n { text-align: right; }
.ag-table tbody th { color: #fefaee; }
.ag-select {
  min-height: 40px;
  padding: 8px 32px 8px 12px;
  background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' shape-rendering='crispEdges' fill='%23d6b47c'%3E%3Crect width='10' height='2'/%3E%3Crect x='2' y='2' width='6' height='2'/%3E%3Crect x='4' y='4' width='2' height='2'/%3E%3C/svg%3E") right 12px center / 10px 6px no-repeat;
  color: #fefaee;
  font: var(--fs-alt-sm)/1.2 var(--font-body-alt);
  clip-path: var(--px-notch);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.ag-select option { background: var(--surface); color: #fefaee; }
.ag-input, .ag-textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  background: #0c0b0e;
  color: #fefaee;
  box-shadow: inset 0 0 0 2px var(--surface-2);
  font-size: var(--fs-alt-sm);
}
.ag-input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--down); }
.ag-input--paper { background: #fffdf6; color: var(--ink); box-shadow: inset 0 0 0 2px var(--stone-300); }
.ag-textarea { display: block; min-height: 112px; padding: 14px 16px; resize: vertical; line-height: 1.35; }
.ag-textarea--sm { min-height: 64px; padding: 10px 12px; font-size: var(--fs-alt-sm); }
.ag-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.ag-textbtn { min-height: 40px; padding: 0 8px; color: var(--text-3); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (hover: hover) { .ag-textbtn:hover { color: var(--down); } }

/* faces: the crew portraits as logos */
.ag-logo, .ag-face {
  flex: none;
  display: block;
  width: 40px;
  height: 40px;
  background: #08080a center / cover no-repeat;
  image-rendering: pixelated;
  clip-path: var(--px-notch);
}
.ag-logo--xl { width: 88px; height: 88px; }
.ag-face { width: 48px; height: 48px; }
.ag-logo--radar, .ag-face--radar { background-image: url(../assets/84e0648db5faaf7542f89a837faef253.png); }
.ag-logo--rugshield, .ag-face--rugshield { background-image: url(../assets/e1bb7e8bd6027cc2153c32a35fa08bdd.png); }
.ag-logo--pilot, .ag-face--pilot { background-image: url(../assets/98316552a88b403641fd4b6fdcb4c333.png); }
.ag-logo--autoland, .ag-face--autoland { background-image: url(../assets/9e4accdc44108fdc06474788f1b24ba8.png); }
.ag-logo--redline, .ag-face--redline { background-image: url(../assets/4557bced99aee66c7bf0003361269283.png); }
.ag-face--logbook { display: grid; place-items: center; background: var(--surface-2); }
.ag-face--logbook::after {
  content: "";
  width: 20px;
  height: 20px;
  background: url(../assets/e3491ba56ae39ff717248cb6851a4943.png) 53.3333% 0 / 1600% 100% no-repeat;
  image-rendering: pixelated;
}

/* ---------- Discover */
.ag-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.ag-count { margin: 0 auto 0 0; color: var(--text-3); }
.ag-sortlabel { color: var(--text-3); }
.ag-tablebox { padding: 8px 24px; background: var(--surface); clip-path: var(--px-notch); }
.ag-disc thead th { padding-top: 16px; }
.ag-disc tbody tr { position: relative; }
.ag-disc tbody tr:last-child td { border-bottom: 0; }
@media (hover: hover) { .ag-disc tbody tr:hover { background: linear-gradient(90deg, transparent, rgba(214, 180, 124, .06) 30%, transparent); } }
.ag-rowlink { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ag-rowlink::after { content: ""; position: absolute; inset: 0; }
.ag-rowlink:focus-visible { outline: none !important; }
.ag-rowlink:focus-visible::after { outline: 2px solid var(--copper-300); outline-offset: -2px; }
.ag-who { display: grid; gap: 6px; min-width: 0; }
.ag-who b { color: #fefaee; }
.ag-who small { color: var(--text-3); }
@media (hover: hover) { .ag-disc tbody tr:hover .ag-who b { color: var(--accent); } }
.ag-foot { display: grid; gap: 10px; max-width: 900px; color: var(--text-3); }
.ag-foot p { margin: 0; text-wrap: pretty; }
.ag-foot b { color: var(--text-2); }
.ag-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; color: var(--text-2); }

/* ---------- the agent page */
.ag-agenthead { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 24px; }
.ag-agenthead-t { display: grid; gap: 12px; min-width: 0; flex: 1 1 320px; }
.ag-agenthead-t p { margin: 0; }
.ag-flag { margin: 0; padding: 10px 14px; background: var(--surface); color: var(--copper-400); box-shadow: inset 3px 0 0 var(--copper-400); }
.ag-agent { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 24px; align-items: start; }
.ag-col { display: grid; gap: 16px; min-width: 0; }
.ag-side { position: sticky; top: 96px; display: grid; gap: 16px; min-width: 0; }
.ag-record { display: grid; gap: 12px; min-width: 0; padding: 24px; background: var(--surface); clip-path: var(--px-notch); }
.ag-record p { margin: 0; }
.ag-big { font: 400 var(--fs-h-xl)/1 var(--font-heading); letter-spacing: -0.75px; font-variant-numeric: tabular-nums; }
.ag-big.ag-skel { font: var(--fs-alt-lg)/1.2 var(--font-body-alt); letter-spacing: 0; padding-block: 12px; }
.ag-sumline { margin: 12px 0; color: #fefaee; max-width: 72ch; }
.ag-sharelink { display: block; width: 100%; margin-top: 6px; }
.ag-minemsg { margin: 0 0 12px; }
.ag-minemsg:empty { display: none; }
.ag-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; margin: 0; }
.ag-stats div { display: grid; gap: 8px; padding: 12px 14px; background: var(--surface-2); }
.ag-stats dt { color: var(--text-3); }
.ag-stats dd { margin: 0; color: #fefaee; font-size: var(--fs-alt-lg); }
.ag-now { display: grid; gap: 6px; padding: 14px 16px; box-shadow: inset 0 0 0 1px var(--stone-600); }
.ag-now-v { color: #fefaee; font: 400 var(--fs-h-xs)/1 var(--font-heading); font-variant-numeric: tabular-nums; }
.ag-quote { color: #fefaee; quotes: "“" "”"; }
.ag-voice { color: #fefaee; padding-left: 14px; box-shadow: inset 3px 0 0 var(--accent); text-wrap: pretty; }
.ag-log { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; font-size: var(--fs-alt-xs); }
.ag-log li > span:first-child { white-space: nowrap; }
.ag-log li { display: grid; grid-template-columns: 116px 100px minmax(0, 1fr); gap: 4px 12px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--text-2); }
.ag-log li:last-child { border-bottom: 0; }
.ag-kind { color: var(--text-3); font: 500 var(--fs-cap-sm)/1 var(--font-caption); text-transform: uppercase; }
.ag-kind--take { color: var(--copper-300); }
.ag-kind--exit { color: var(--accent); }
.ag-kind--pause, .ag-kind--stop, .ag-kind--bench { color: var(--down); }
.ag-kind--gate { color: var(--text-2); }
.ag-kind--decide { color: var(--copper-400); }
/* who made the call: the crew member's orb and name over the kind of line */
.ag-logwho { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 4px 6px; align-items: center; min-width: 0; }
.ag-logwho b { color: #fefaee; font: 500 var(--fs-cap-sm)/1 var(--font-caption); text-transform: uppercase; }
.ag-logwho .ag-kind { grid-column: 1 / -1; }
.ag-logo--xs { width: 18px; height: 18px; }
.ag-log-ai { display: block; margin-top: 4px; color: var(--copper-400); }
.ag-rules { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; color: var(--text-2); }
.ag-rules li { position: relative; padding-left: 16px; }
.ag-rules li::before { content: ""; position: absolute; left: 0; top: .5em; width: 6px; height: 6px; background: var(--accent); }
.ag-crew { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.ag-crew li { display: flex; gap: 14px; align-items: center; padding: 10px 12px; background: var(--surface-2); }
.ag-crew li div { display: grid; gap: 4px; min-width: 0; }
.ag-crew p { margin: 0; }
.ag-crew .t-cap-sm { color: var(--text-3); }
.ag-lines { display: grid; gap: 4px; }
.ag-lines span { display: block; }
.ag-mini th, .ag-mini td { padding-block: 10px; }
.ag-steps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: ags; }
.ag-steps li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 14px; padding: 12px 14px; background: var(--surface-2); counter-increment: ags; font-size: var(--fs-alt-sm); line-height: 1.3; }
.ag-steps li::before { content: counter(ags, decimal-leading-zero); grid-row: span 2; display: grid; place-items: center; width: 40px; height: 32px; background: var(--surface); color: var(--accent); font-family: var(--font-caption); clip-path: var(--px-notch); }
.ag-steps b { color: #fefaee; }
.ag-steps span { color: var(--text-2); }
.ag-versions { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ag-versions li { display: flex; gap: 14px; align-items: center; }
.ag-versions li div { display: grid; gap: 8px; }
.ag-versions li div p:first-child { display: flex; align-items: center; gap: 8px; }
.ag-versions p { margin: 0; }
.ag-vn { display: grid; place-items: center; width: 36px; height: 36px; background: var(--surface-2); color: var(--accent); clip-path: var(--px-notch); }

/* where your money goes */
.ag-flow { display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1.2fr) 56px minmax(0, 1fr); align-items: center; gap: 0; }
.ag-node { display: grid; gap: 6px; justify-items: center; padding: 16px 8px; background: var(--surface-2); text-align: center; clip-path: var(--px-notch); }
.ag-node b { color: #fefaee; }
.ag-node span { color: var(--text-3); }
.ag-node--vault { background: var(--accent); }
.ag-node--vault b, .ag-node--vault span { color: var(--ink); }
.ag-arrow { position: relative; height: 12px; }
.ag-arrow i { position: absolute; left: 8px; right: 8px; top: 5px; height: 2px; background: repeating-linear-gradient(90deg, var(--accent) 0 4px, transparent 4px 8px); }
.ag-arrow::after { content: ""; position: absolute; right: 2px; top: 0; width: 6px; height: 12px; background: var(--accent); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.ag-arrow--both::before { content: ""; position: absolute; left: 2px; top: 0; width: 6px; height: 12px; background: var(--accent); clip-path: polygon(100% 0, 0 50%, 100% 100%); }
.ag-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ag-chips li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; background: var(--surface-2); color: var(--text-2); }
.ag-x { color: var(--down); }

/* deposit: the paper card */
.ag-label { color: var(--stone-500); }
.ag-amount { display: flex; align-items: center; gap: 8px; padding: 0 14px; background: #fffdf6; box-shadow: inset 0 0 0 2px var(--stone-300); }
.ag-amount:focus-within { box-shadow: inset 0 0 0 2px #8a6a35; }
.ag-amount input { flex: 1; min-width: 0; min-height: 48px; color: var(--ink); font-size: var(--fs-alt-lg); }
.ag-amount input:focus-visible { outline: none !important; }
.ag-amount input::placeholder { color: var(--stone-400); }
.ag-amount span { color: var(--stone-500); }
.ag-paper-btn { display: grid; }
/* deploying: which sub-account the agent trades from */
.ag-live { display: inline-block; flex: none; vertical-align: middle; }
.ag-fieldset { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.ag-fieldset legend { padding: 0; margin-bottom: 8px; color: var(--stone-500); }
.ag-radio { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; background: #fffdf6; box-shadow: inset 0 0 0 2px var(--stone-300); color: var(--ink); cursor: pointer; }
.ag-radio:has(input:checked) { box-shadow: inset 0 0 0 2px #8a6a35; }
.ag-radio input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: #8a6a35; }
.ag-radio input:focus-visible { outline: 2px solid #8a6a35; outline-offset: 2px; }
.ag-walletnote { margin: 8px 0 0; }
.ag-qa { padding: 12px 16px; background: var(--surface); color: var(--text-2); }
.ag-qa summary { display: flex; align-items: center; gap: 10px; min-height: 32px; cursor: pointer; list-style: none; color: #fefaee; }
.ag-qa summary::-webkit-details-marker { display: none; }
.ag-qa p { margin: 8px 0 0; }
.ag-q { display: grid; place-items: center; width: 24px; height: 24px; flex: none; background: var(--surface-2); color: var(--accent); font-family: var(--font-caption); clip-path: var(--px-notch); }

/* charts */
.ag-chartbox { display: grid; gap: 8px; margin: 0; min-width: 0; }
.ag-chart { display: block; width: 100%; height: 200px; image-rendering: pixelated; touch-action: pan-y; }
.ag-chart--tall { height: 260px; }
.ag-chart-cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; color: var(--text-3); }
.ag-chart-read { color: var(--text-2); font-size: var(--fs-alt-xs); }

/* ---------- the builder */
.ag-build { gap: 56px; }
.ag-ladder { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.ag-ladder li { position: relative; min-width: 0; }
.ag-ladder li + li::before { content: ""; position: absolute; left: -2px; right: calc(100% - 22px); top: 27px; height: 2px; background: repeating-linear-gradient(90deg, var(--stone-600) 0 4px, transparent 4px 8px); }
.ag-ladder li.is-done + li::before, .ag-ladder li.is-done + li.is-now::before { background: var(--accent); }
.ag-rung { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 8px 8px 8px 0; text-align: left; cursor: pointer; }
.ag-rung-n { display: grid; place-items: center; flex: none; width: 40px; height: 40px; margin-left: 22px; background: var(--surface-2); color: var(--text-3); clip-path: var(--px-notch); }
.ag-ladder li:first-child .ag-rung-n { margin-left: 0; }
.ag-rung-t { display: grid; gap: 4px; min-width: 0; padding-top: 4px; }
.ag-rung-t b { color: var(--text-2); }
.ag-rung-t small { color: var(--text-3); }
.is-done .ag-rung-n { background: var(--accent); color: var(--ink); }
.is-done .ag-rung-t b { color: #fefaee; }
.is-now .ag-rung-n { background: var(--copper-300); color: var(--ink); box-shadow: 0 0 16px rgba(255, 223, 163, .45); }
.is-now .ag-rung-t b { color: var(--copper-300); }
@media (hover: hover) { .ag-rung:hover .ag-rung-t b { color: var(--accent); } }

.ag-step { display: grid; gap: 16px; scroll-margin-top: 100px; }
.ag-step-h { display: flex; gap: 16px; align-items: flex-start; }
.ag-step-h > div { display: grid; gap: 10px; }
.ag-step-h h2 { margin: 0; }
.ag-step-h h2:focus { outline: none; }
.ag-step-h p { margin: 0; }
.ag-stepn { display: grid; place-items: center; flex: none; width: 48px; height: 40px; background: var(--surface-2); color: var(--accent); font-family: var(--font-caption); font-size: var(--fs-cap-lg); clip-path: var(--px-notch); }
.ag-describe { display: grid; }
.ag-examples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ag-chip { min-height: 32px; padding: 6px 10px; background: var(--surface-2); color: var(--text-2); box-shadow: inset 3px 0 0 var(--copper-500); cursor: pointer; }
@media (hover: hover) { .ag-chip:hover { background: var(--surface-hover); color: #fefaee; } }
.ag-estimate { display: grid; gap: 12px; padding: 16px; box-shadow: inset 0 0 0 1px var(--stone-600); }
.ag-estimate p { margin: 0; }
.ag-estimate > .t-cap-sm { color: var(--accent); }

/* the review dock: changes wait here until applied or discarded */
.ag-diffdock { position: sticky; bottom: 12px; z-index: 5; }
.ag-diffdock:empty { display: none; }
.ag-diff { gap: 12px; box-shadow: 0 -8px 32px rgba(0, 0, 0, .5); }
.ag-diff-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.ag-difflist { display: grid; gap: 0; max-height: min(40vh, 320px); margin: 0; padding: 0; overflow-y: auto; list-style: none; overscroll-behavior: contain; }
.ag-difflist li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 8px 0; border-bottom: 1px dashed var(--stone-300); }
.ag-difflist li:last-child { border-bottom: 0; }
.ag-diff-k { color: var(--stone-600); }
.ag-diff-v { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: var(--fs-alt-xs); }
.ag-diff-v s { color: var(--stone-500); }
.ag-diff-v b { color: var(--ink); background: rgba(214, 180, 124, .35); padding: 0 4px; }
.ag-notes { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; color: var(--text-3); }
.ag-paper .ag-notes { color: var(--stone-600); }
.ag-notes li::before { content: "· "; color: var(--accent); }
.ag-notes .t-cap-sm { color: var(--accent); }
.ag-paper .ag-notes .t-cap-sm { color: #8a6a35; }

.ag-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
[data-region="btbody"], [data-region="prbody"] { display: grid; gap: 16px; min-width: 0; }
.ag-editor-h { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-top: 8px; }
.ag-editor-h h3, .ag-editor-h p { margin: 0; }
.ag-group { display: grid; align-content: start; gap: 16px; min-width: 0; padding: 20px; background: var(--surface); clip-path: var(--px-notch); }
.ag-group--wide { grid-column: 1 / -1; }
.ag-group > header { display: flex; align-items: center; gap: 12px; }
.ag-group h3 { margin: 0; color: var(--text-3); }
.ag-group h3 b { color: var(--accent); }
.ag-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 12px; }
.ag-fields--row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.ag-field { display: grid; align-content: start; gap: 8px; min-width: 0; }
.ag-field > label { color: var(--text-3); }
.ag-paper .ag-field > label { color: var(--stone-500); }
.ag-field small { color: var(--text-3); text-wrap: pretty; }
.ag-field--wide, .ag-field--rail { grid-column: 1 / -1; }
.ag-field .ag-select { width: 100%; }
.ag-numwrap { display: flex; align-items: center; gap: 8px; }
.ag-numwrap .ag-input { min-width: 0; flex: 1 1 auto; }
.ag-numwrap span { flex: none; color: var(--text-3); }
.ag-filter { display: grid; gap: 10px; align-content: start; }
.ag-field--tog { grid-column: span 1; }

/* rails: a stepped track that stops at the platform ceiling */
.ag-railrow { display: flex; align-items: center; gap: 16px; }
.ag-railrow output { flex: none; min-width: 56px; color: #fefaee; font-size: var(--fs-alt-md); text-align: right; }
.ag-paper .ag-railrow output { color: var(--ink); }
.ag-rail { position: relative; flex: 1 1 auto; min-width: 0; height: 32px; }
.ag-rail::before { content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 8px; background: repeating-linear-gradient(90deg, var(--surface-2) 0 6px, #0c0b0e 6px 8px); }
.ag-rail::after { content: ""; position: absolute; left: 0; top: 12px; width: var(--w, 0%); height: 8px; background: repeating-linear-gradient(90deg, var(--accent) 0 6px, #8a6a35 6px 8px); pointer-events: none; }
.ag-rail input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.ag-rail input::-webkit-slider-runnable-track { height: 32px; background: transparent; }
.ag-rail input::-moz-range-track { height: 32px; background: transparent; }
.ag-rail input::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 24px; margin-top: 4px; background: #fefaee; box-shadow: inset -4px -4px 0 var(--stone-300), 0 0 0 2px #0c0b0e; }
.ag-rail input::-moz-range-thumb { width: 16px; height: 24px; border: 0; border-radius: 0; background: #fefaee; box-shadow: inset -4px -4px 0 var(--stone-300), 0 0 0 2px #0c0b0e; }
.ag-rail input:focus-visible { outline: none !important; }
.ag-rail input:focus-visible::-webkit-slider-thumb { background: var(--copper-300); }
.ag-rail input:focus-visible::-moz-range-thumb { background: var(--copper-300); }
.ag-rail:focus-within::before { box-shadow: 0 0 0 2px var(--copper-300); }
.ag-rail-ceil { position: absolute; right: 0; top: -6px; color: var(--copper-400); font-size: 10px; pointer-events: none; }
.ag-rail-ceil::after { content: ""; position: absolute; right: 0; top: 14px; width: 2px; height: 24px; background: var(--copper-400); }
.ag-paper .ag-rail::before { background: repeating-linear-gradient(90deg, var(--stone-300) 0 6px, var(--stone-200) 6px 8px); }
.ag-paper .ag-rail-ceil { color: #8a6a35; }
.ag-paper .ag-rail-ceil::after { background: #8a6a35; }

/* switches */
.ag-switch { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 10px 4px 4px; background: var(--surface-2); color: var(--text-2); clip-path: var(--px-notch); cursor: pointer; text-align: left; }
.ag-switch-k { position: relative; flex: none; width: 36px; height: 20px; background: #0c0b0e; }
.ag-switch-k::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; background: var(--stone-500); }
.ag-switch[aria-checked="true"] .ag-switch-k { background: #8a6a35; }
.ag-switch[aria-checked="true"] .ag-switch-k::after { left: 18px; background: var(--copper-300); }
.ag-switch-v { margin-left: auto; padding-left: 8px; color: var(--text-3); }
.ag-switch[aria-checked="true"] .ag-switch-v { color: var(--copper-300); }
@media (hover: hover) { .ag-switch:hover { color: #fefaee; } }

/* test and practice */
.ag-testbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.ag-seg { display: inline-flex; gap: 2px; }
.ag-segb { min-height: 40px; padding: 8px 12px; background: var(--surface-2); color: var(--text-2); cursor: pointer; }
.ag-segb:first-child { clip-path: polygon(0 4px, 4px 4px, 4px 0, 100% 0, 100% 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px)); }
.ag-segb:last-child { clip-path: polygon(0 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 0 100%); }
.ag-segb.is-on { background: var(--accent); color: var(--ink); }
@media (hover: hover) { .ag-segb:not(.is-on):hover { background: var(--surface-hover); color: #fefaee; } }
.ag-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; margin: 0; }
.ag-metrics div { display: grid; gap: 8px; padding: 12px 14px; background: var(--surface-2); min-width: 0; }
.ag-metrics dt { color: var(--text-3); }
.ag-metrics dd { margin: 0; color: #fefaee; font-size: var(--fs-alt-md); overflow-wrap: anywhere; }
.ag-metrics dd.ag-up { color: var(--up); }
.ag-metrics dd.ag-down { color: var(--down); }
.ag-two { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; }
.ag-two > div { display: grid; gap: 10px; align-content: start; min-width: 0; }
.ag-scroll { max-height: 360px; overflow: auto; overscroll-behavior: contain; scrollbar-color: var(--stone-600) transparent; scrollbar-width: thin; }
.ag-scroll:focus-visible { outline: 2px solid var(--copper-300); outline-offset: 2px; }
.ag-trades { font-size: var(--fs-alt-xs); }
.ag-trades th, .ag-trades td { padding-block: 8px; }
.ag-trades thead th { position: sticky; top: 0; background: var(--surface); padding-top: 4px; }
.ag-trades small { color: var(--text-3); }
.ag-trades td { white-space: nowrap; }
.ag-trades td:last-child { white-space: normal; min-width: 120px; }
.ag-log--scroll li { grid-template-columns: 112px 96px minmax(0, 1fr); }
.ag-livegrid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }

/* ---------- My agents */
.ag-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.ag-acard { display: grid; gap: 16px; align-content: start; padding: 20px; background: var(--surface); clip-path: var(--px-notch); }
.ag-acard p { margin: 0; }
.ag-acard-top { display: flex; align-items: flex-start; gap: 14px; }
.ag-acard-top > div { display: grid; gap: 8px; min-width: 0; flex: 1; }
.ag-acard-top h2 { margin: 0; overflow-wrap: anywhere; }
.ag-acard .ag-logo { width: 56px; height: 56px; }
.ag-confirm { display: grid; gap: 12px; padding: 14px; background: #fefaee var(--binary-ivory); color: var(--surface); clip-path: var(--px-notch); }
.ag-confirm .pbtn { --pbtn-bracket: rgba(23, 22, 20, .4); }
.ag-emptycard { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 24px; padding: 32px; background: var(--surface); clip-path: var(--px-notch); }
.ag-emptycard > div { display: grid; gap: 12px; flex: 1 1 280px; }
.ag-emptycard p { margin: 0; }
/* My agents: the key card (sign in to see a wallet's agents) and the drawer of agents on this browser only */
.ag-keycard { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 24px; padding: 28px 32px; background: var(--surface); clip-path: var(--px-notch); box-shadow: inset 0 0 0 1px #5a3f16; }
.ag-keycard > div:not(.ag-actions) { display: grid; gap: 8px; flex: 1 1 300px; }
.ag-keycard p { margin: 0; }
/* the key's bow is an orb: the wallet is the key to its agents */
.ag-key { flex: none; width: 108px; height: 60px; background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 10' shape-rendering='crispEdges'><path fill='%23d6b47c' d='M2 1h4v1h1v1h1v4h-1v1h-1v1h-4v-1h-1v-1h-1v-4h1v-1h1zM8 4h9v2h-1v2h-2v-2h-1v1h-2v-1h-3z'/><path fill='%23fefaee' d='M2 2h4v1h1v4h-1v1h-4v-1h-1v-4h1z'/><path fill='%230c0b0e' d='M2 4h4v2h-4z'/><path fill='%23ffdfa3' d='M3 4h1v1h-1zM5 4h1v1h-1z'/></svg>") center / contain no-repeat; image-rendering: pixelated; }
.ag-drawer { display: grid; gap: 16px; margin-top: 40px; padding-top: 24px; border-top: 2px dashed #373128; }
.ag-drawer-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; }
.ag-drawer-head > div { display: grid; gap: 6px; flex: 1 1 360px; }
.ag-drawer-head h2, .ag-drawer-head p { margin: 0; }
.ag-cards--drawer .ag-acard { background: transparent; box-shadow: inset 0 0 0 1px #373128; }
.ag-mine-alt { margin: 24px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

/* ---------- responsive */
@media (max-width: 1100px) {
  .ag-agent { grid-template-columns: minmax(0, 1fr); }
  .ag-side { position: static; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
  .ag-two, .ag-livegrid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .ag-editor { grid-template-columns: minmax(0, 1fr); }
  .ag-ladder { grid-template-columns: repeat(5, minmax(120px, 1fr)); overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
}
@media (max-width: 767px) {
  .ag-head { padding-top: 96px; }
  .ag-titles { padding-top: 28px; }
  .ag-card, .ag-paper, .ag-record { padding: 16px; }
  .ag-group { padding: 16px; }
  .ag-stats, .ag-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ag-big { font-size: var(--fs-h-lg); }
  .ag-logo--xl { width: 64px; height: 64px; }
  .ag-chart--tall { height: 220px; }
  .ag-build { gap: 40px; }
  .ag-flow { grid-template-columns: minmax(0, 1fr); justify-items: stretch; }
  .ag-arrow { justify-self: center; width: 12px; height: 36px; }
  .ag-arrow i { left: 5px; right: auto; top: 6px; bottom: 6px; width: 2px; height: auto; background: repeating-linear-gradient(180deg, var(--accent) 0 4px, transparent 4px 8px); }
  .ag-arrow::after { right: 0; top: auto; bottom: 0; width: 12px; height: 6px; clip-path: polygon(0 0, 100% 0, 50% 100%); }
  .ag-arrow--both::before { left: 0; top: 0; width: 12px; height: 6px; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
  .ag-log li, .ag-log--scroll li { grid-template-columns: auto minmax(0, 1fr); }
  .ag-logwho { grid-template-columns: 18px auto auto; justify-content: start; }
  .ag-logwho .ag-kind { grid-column: auto; }
  .ag-log li > span:last-child { grid-column: 1 / -1; }
  /* Discover becomes a list of cards */
  .ag-tablebox { padding: 4px 16px; }
  .ag-disc thead { display: none; }
  .ag-disc, .ag-disc tbody { display: block; }
  .ag-disc tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .ag-disc tbody tr:last-child { border-bottom: 0; }
  .ag-disc td { display: grid; gap: 4px; padding: 0; border: 0; text-align: left !important; }
  .ag-disc td::before { content: attr(data-label); color: var(--text-3); font: 500 var(--fs-cap-sm)/1 var(--font-caption); text-transform: uppercase; }
  .ag-disc td:first-child { grid-column: 1 / -1; }
  .ag-disc td:first-child::before, .ag-disc td:nth-child(2) { display: none; }
}
@media (max-width: 639px) {
  .ag-ladder { grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; }
  .ag-rung-t b { font-size: 10px; letter-spacing: 0; }
  .ag-ladder li + li::before { left: -50%; right: calc(50% + 22px); top: 19px; }
  .ag-rung { flex-direction: column; align-items: center; gap: 8px; padding: 0 4px 4px; text-align: center; }
  .ag-rung-n, .ag-ladder li:first-child .ag-rung-n { margin-left: 0; }
  .ag-rung-t { justify-items: center; padding-top: 0; }
  .ag-rung-t small { display: none; }
  .ag-filter { grid-column: 1 / -1; }
}
@media (max-width: 479px) {
  .ag-stepn { width: 40px; }
  .ag-step-h { gap: 12px; }
  .ag-railrow { gap: 10px; }
  .ag-railrow output { min-width: 44px; }
  .ag-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ag-field--tog { grid-column: 1 / -1; }
  .ag-diff-top .ag-actions { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .ag-skel::after { animation: none; width: 1.4em; }
}

/* the engine's own notes on a record (cut-short history, snapshot date): always shown */
.ag-rec-notes {
  margin: 8px 0 0;
  padding: 0 0 0 12px;
  border-left: 2px solid var(--surface-2);
  list-style: none;
  color: var(--text-3);
}

/* the rules, by crew: two columns that pack independently (left Radar + Autoland, right Pilot + Redline), so a tall
   card never leaves a gap beside a short one; RugShield's ceilings run full width underneath */
.ag-ecol { display: grid; align-content: start; gap: 16px; min-width: 0; }
.ag-group--wide .ag-kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 24px; }
.ag-group--wide .ag-kv > div { display: grid; gap: 4px; padding: 10px 0; border-top: 1px solid var(--surface-2); }
.ag-group--wide .ag-kv dd { text-align: left; }
.ag-gate-p { margin: 0; }
@media (max-width: 899px) {
  .ag-group--wide .ag-kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Talk to it: a short thread with the agent, then the composer */
.ag-chat { display: grid; gap: 14px; }
.ag-thread {
  display: grid;
  gap: 12px;
  max-height: 340px;
  margin: 0;
  padding: 4px 4px 4px 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-width: thin;
}
.ag-msg { display: flex; gap: 12px; align-items: flex-end; max-width: 78%; }
.ag-msg p { margin: 0; }
.ag-msg--agent img {
  flex: none;
  width: 36px;
  height: 36px;
  clip-path: var(--px-notch);
  image-rendering: pixelated;
}
.ag-msg--agent > div {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  background: var(--surface-2);
  clip-path: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 0 100%);
}
.ag-msg--agent ul { margin: 0; padding: 0; list-style: none; color: var(--text-3); }
.ag-msg--you {
  justify-self: end;
  padding: 12px 14px;
  background: var(--accent);
  color: var(--page);
  clip-path: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px));
}
.ag-compose { display: flex; gap: 10px; align-items: stretch; }
.ag-compose .ag-textarea { flex: 1; min-height: 52px; resize: vertical; }
.ag-compose .pbtn { flex: none; }
.ag-compose-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.ag-compose-foot .ag-examples { margin: 0; }
.ag-aitoggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  text-transform: uppercase;
  cursor: pointer;
}
.ag-aitoggle input { width: 14px; height: 14px; accent-color: #d6b47c; }
@media (max-width: 639px) {
  .ag-msg { max-width: 92%; }
  .ag-compose { flex-direction: column; }
}
/* addresses keep their case inside caption type ("0x47…072b", never "0X47…072B") */
.ag-count .ag-mono, .ag-titlemeta .t-cap-sm { text-transform: none; }
.ag-srcs { margin: 12px 0 0; }

/* the crew on this run: five orbs and what each did, counted from the log */
.ag-crewbox { display: grid; gap: 12px; padding: 16px; box-shadow: inset 0 0 0 1px var(--stone-600); }
.ag-crewbox p { margin: 0; }
.ag-crewrep { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.ag-crewrep li { display: flex; gap: 14px; align-items: flex-start; padding: 10px 12px; background: var(--surface-2); }
.ag-crewrep li > div { display: grid; gap: 6px; min-width: 0; }
.ag-crewrep p { margin: 0; }
.ag-crewrep .t-cap-sm { color: var(--text-3); }
.ag-crewrep .ag-face { width: 40px; height: 40px; }
.ag-cstats { display: flex; flex-wrap: wrap; gap: 6px; }
.ag-cstat { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 8px; background: var(--surface); color: var(--text-2); font-size: var(--fs-alt-xs); }
.ag-cstat b { color: #fefaee; font-size: var(--fs-alt-sm); }

/* the crew's debrief: ideas grouped by orb, each with its verdict and both stretches side by side */
.ag-debrief { display: grid; gap: 14px; padding-top: 16px; border-top: 2px dashed #373128; }
.ag-debrief p, .ag-card [data-region="debrief"] p { margin: 0; }
[data-region="debrief"] { display: grid; gap: 14px; min-width: 0; }
.ag-db-h { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.ag-db-h > div:first-child { display: grid; gap: 8px; flex: 1 1 360px; max-width: 72ch; }
.ag-db-honest { padding: 10px 14px; background: var(--surface-2); color: var(--text-2); box-shadow: inset 3px 0 0 var(--accent); }
.ag-dbgroup { display: grid; gap: 10px; min-width: 0; }
.ag-dbgroup > header { display: flex; align-items: center; gap: 12px; }
.ag-dbgroup > header .ag-face { width: 36px; height: 36px; }
.ag-dbgroup > header p { color: var(--text-3); }
.ag-dbgroup > header b { color: var(--accent); }
.ag-ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.ag-idea { display: grid; align-content: start; gap: 10px; min-width: 0; padding: 14px; background: var(--surface-2); }
.ag-idea p { margin: 0; }
.ag-idea-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.ag-idea-ch { color: #fefaee; padding-left: 10px; box-shadow: inset 2px 0 0 var(--copper-500); }
.ag-idea-t { width: 100%; }
.ag-idea-t th, .ag-idea-t td { padding-block: 6px; font-size: var(--fs-alt-xs); white-space: nowrap; }
.ag-idea-t small { display: block; margin-top: 2px; font-size: 11px; text-transform: none; }
.ag-idea .ag-scroll { max-height: none; }
.ag-verdict { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; background: var(--surface); color: var(--text-2); white-space: nowrap; }
.ag-verdict--keeps { background: var(--copper-300); color: var(--ink); }
.ag-verdict--mixed { box-shadow: inset 0 0 0 1px var(--stone-500); background: transparent; }
.ag-verdict--drops { color: var(--down); box-shadow: inset 0 0 0 1px var(--down); background: transparent; }

/* Pilot in practice: the consent switch, what it is doing to each fresh setup, its record against the twin */
.ag-pilot { display: grid; gap: 10px; padding: 16px; box-shadow: inset 0 0 0 1px #5a3f16; }
.ag-pilot p { margin: 0; }
.ag-pilot .ag-switch { justify-self: start; }
.ag-pilotstatus { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; color: var(--text-2); }
.ag-pilotstatus li::before { content: "· "; color: var(--accent); }
.ag-pilotrec { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.ag-pilotrec-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; color: var(--text-3); }
.ag-card [data-region="pilot"] { display: grid; gap: 12px; min-width: 0; }

/* versions: each one's record, so the agent's development shows */
.ag-vprog { max-height: none; }
.ag-vprog th, .ag-vprog td { white-space: nowrap; }
.ag-vprog + .ag-fine { margin: 8px 0 16px; }
