/* The Buan AI agent page (src/ai-agent.html). Page-only rules, tokens only. */

/* ---------------------------------------------------------------- you stay in charge */
.agent-rules {
  list-style: none;
  margin: 0 0 var(--s-5);
  padding: 0;
  display: grid;
  gap: var(--s-3);
}
.agent-rule {
  position: relative;
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--live-line);
  border-radius: var(--radius-sm);
  color: var(--ink-2);
}
.agent-rule strong { color: var(--ink); }
@media (min-width: 720px) {
  .agent-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1080px) {
  .agent-rules { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------- lists */
.agent-list { margin: var(--s-3) 0; padding-left: 1.25em; display: grid; gap: 8px; color: var(--ink-2); }
.agent-list strong { color: var(--ink); }
.agent-list--wide { max-width: 68ch; margin-top: 0; }

/* ---------------------------------------------------------------- how far it may go
   REAL TEXT. This was an SVG with the words set inside it; the founder saw it live and said that such
   plain text cannot be put in a picture, because it is plain text. Only the track and the three marks
   are drawn here. The words are ordinary HTML, so they reflow, follow the reader's own font size, and
   cannot be cut off by a viewBox - which is what used to happen to "Ask me every time". */
.dial { margin: var(--s-5) 0 0; }
.dial__stops {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-4);
}
/* The track. Narrow screens read top to bottom, so it runs down through the marks. */
.dial__stops::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0.55em;
  bottom: 0.55em;
  width: 2px;
  background: var(--line);
}
.dial__stop {
  position: relative;
  padding-left: calc(var(--s-4) + 1.25rem);
}
.dial__mark {
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid var(--line);
  background: var(--surface);
}
.dial__stop--on .dial__mark {
  border-color: var(--live-line);
  background: var(--live-line);
}
.dial__name {
  margin: 0 0 4px;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--ink);
}
.dial__stop--on .dial__name { color: var(--ink); }
.dial__note {
  margin: 0;
  color: var(--ink-2);
}
.dial__hold {
  margin: var(--s-5) 0 0;
  padding: var(--s-4);
  background: var(--surface-2, var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-2);
}
.dial__hold strong { color: var(--ink); }

@media (min-width: 720px) {
  .dial__stops { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Across, now: from the first mark's centre to the last one's. The right inset is one column less
     the half-mark, because the last mark sits at the start of the third column. */
  .dial__stops::before {
    left: 9px;
    right: calc((100% - 2 * var(--s-4)) / 3 - 9px);
    top: 8px;
    bottom: auto;
    width: auto;
    height: 2px;
  }
  .dial__stop { padding-left: 0; padding-top: calc(var(--s-4) + 0.75rem); }
  .dial__mark { top: 0; }
}

/* ---------------------------------------------------------------- a flagged change
   The card IS the picture, and its words are real words - see the dial above for why. */
.chg {
  margin: 0;
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--warn-line, var(--live-line));
  border-radius: var(--radius-sm);
  display: grid;
  gap: var(--s-3);
}
.chg__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
  justify-content: space-between;
}
.chg__flag {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--warn-soft, var(--surface-2));
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
}
.chg__when { color: var(--ink-2); font-size: 0.875rem; }
.chg__what { margin: 0; display: grid; gap: 2px; }
.chg__what strong { color: var(--ink); }
.chg__where { color: var(--ink-2); font-size: 0.9375rem; }
.chg__diff { margin: 0; display: grid; gap: 6px; }
.chg__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.chg__row dt { color: var(--ink-2); font-size: 0.875rem; margin: 0; }
.chg__row dd { margin: 0; font-variant-numeric: tabular-nums; color: var(--ink); }
.chg__row--now dd { font-weight: 700; }
.chg__who { margin: 0; color: var(--ink-2); font-size: 0.9375rem; }
.chg__act { margin: 0; display: grid; gap: 6px; }
.chg__btn {
  justify-self: start;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 600;
}
.chg__note { color: var(--ink-2); font-size: 0.875rem; }
.chg__cap {
  margin: 0;
  padding-top: var(--s-2);
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.8125rem;
}

/* Two paragraphs beside a picture. Its own class rather than the .stack utility, which lives in
   company.css and this page does not load - the paragraphs then ran together with no gap at all. */
.agent-copy { display: grid; gap: var(--s-4); align-content: start; }
