.agentDocs { --agent-tick: var(--brand-steel); }

/* /docs/agents/. Listed: a short overview (.agentOverview). Unlisted: one column with client setup tabs,
   code with copy buttons and short disclosures. */
.agentDocs .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.agentDocs .articleBody { max-width: 780px; }
.agentDocs .answers { margin-top: 16px; }
.agentDocs h3 { margin: 0; font-size: 1.05rem; letter-spacing: -.02em; }
.agentDocs .articleBody > section > ul { margin: 14px 0 0; padding-left: 1.2em; color: var(--subtle); line-height: 1.7; }
.agentDocs .articleBody > section > ul li + li { margin-top: 8px; }
.agentDocs :is(.articleBody, .agentPicker) strong { color: var(--text); font-weight: 620; }
.agentDocs :is(.articleBody, .agentPicker) code {
  font: 500 .88em/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}
.agentDocs :is(.articleBody, .agentPicker) :is(p, li, dd) > code { padding: 1px 5px; border-radius: 5px; background: var(--surface); color: var(--text); }

/* Commands and snippets. They wrap instead of scrolling so nothing hides on a phone. */
.agentCode { position: relative; margin: 10px 0 0; }
.agentDocs :is(.articleBody, .agentPicker) .agentCode pre {
  margin: 0;
  padding: 11px 76px 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--text);
}
.agentDocs :is(.articleBody, .agentPicker) .agentCode pre code { white-space: pre-wrap; font-size: .84rem; }
.agentCopy {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field, var(--canvas));
  color: var(--subtle);
  cursor: pointer;
}
.agentCopy[hidden] { display: none; }
.agentCopy svg + svg, .agentCopy[data-copied] svg:first-child { display: none; }
.agentCopy[data-copied] svg + svg { display: block; }
.agentCopy:hover { background: var(--hover); color: var(--text); }
.agentCopy:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.agentServer { display: grid; gap: 4px; margin-top: 16px; }
.agentServer > span { color: var(--muted); font-size: .84rem; font-weight: 550; }
.agentServer .agentCode { margin: 0; }
.agentDocs :is(.articleBody, .agentPicker) .agentServer pre code { font-size: .95rem; }

/* Client picker. Without the page script, every client shows in turn. */
.agentClients { display: grid; gap: 14px; margin-top: 22px; }
.agentTabs { display: flex; flex-wrap: wrap; gap: 6px; }
.agentTabs[hidden] { display: none; }
.agentTabs [role="tab"] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 5px 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: none;
  color: var(--subtle);
  font: 550 .875rem/1.2 var(--font-sans);
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease;
}
.agentTabs [role="tab"]:hover { border-color: var(--text); color: var(--text); }
.agentTabs [role="tab"][aria-selected="true"] { border-color: var(--text); color: var(--text); box-shadow: inset 0 -2px var(--agent-tick); }
.agentTabs [role="tab"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.agentLogo { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-left: -5px; }
.agentLogo:empty { display: none; }
.agentLogo img { width: 20px; height: 20px; object-fit: contain; }
/* OpenAI's file includes wide clear space, so it draws larger to match the other marks. */
.agentLogo img[src*="/openai"] { scale: 1.5; }

.agentDocs :is(.articleBody, .agentPicker) .agentClient {
  min-width: 0;
  margin: 0;
  padding: 20px 22px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--canvas);
}
.agentClient:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.agentClient > header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-bottom: 16px; }
.agentDocs :is(.articleBody, .agentPicker) .agentClient > header p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.4; }
.agentDocs :is(.articleBody, .agentPicker) .agentClient p { margin-top: 12px; line-height: 1.6; }
.agentDocs :is(.articleBody, .agentPicker) .agentClient > header + * { margin-top: 0; }

.agentDocs :is(.articleBody, .agentPicker) .agentSteps { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.agentSteps > li {
  position: relative;
  min-width: 0;
  padding-left: 34px;
  color: var(--subtle);
  line-height: 1.6;
  counter-increment: step;
}
.agentSteps > li::before {
  content: counter(step);
  position: absolute;
  top: 1px;
  left: 0;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: .76rem;
  font-weight: 650;
}
.agentDocs :is(.articleBody, .agentPicker) .agentNote { color: var(--muted); font-size: .9rem; }
.agentDocs :is(.articleBody, .agentPicker) .agentInstallRow { margin: 0; }
.agentDocs :is(.articleBody, .agentPicker) a.agentInstall { min-height: 40px; color: var(--on-public-primary, var(--on-primary)); text-decoration: none; }
.agentDocs :is(.articleBody, .agentPicker) a.agentInstall:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Secondary setup paths and the tool list. */
.agentMore { margin-top: 14px; }
.agentMore > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  color: var(--text);
  font-size: .9rem;
  font-weight: 550;
  cursor: pointer;
  list-style: none;
}
.agentMore > summary::-webkit-details-marker { display: none; }
.agentMore > summary::before {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.6px solid var(--muted);
  border-bottom: 1.6px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform .15s ease;
}
.agentMore[open] > summary::before { transform: rotate(45deg); }
.agentMore > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.agentDocs .articleBody .agentMore h3 { margin-top: 16px; font-size: .95rem; }

.agentDocs :is(.articleBody, .agentPicker) .agentFacts { margin: 0; }
.agentDocs :is(.articleBody, .agentPicker) .agentFacts > div {
  display: grid;
  grid-template-columns: minmax(8rem, .34fr) minmax(0, 1fr);
  gap: 4px 20px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
.agentDocs :is(.articleBody, .agentPicker) .agentFacts > div:last-child { border-bottom: 1px solid var(--line); }
.agentDocs :is(.articleBody, .agentPicker) dt { color: var(--text); font-weight: 600; }
.agentDocs :is(.articleBody, .agentPicker) dd { margin: 0; color: var(--subtle); line-height: 1.6; }

/* What agents can do: four open columns, each with a small plate drawing (public-blueprint.mjs). */
.agentCaps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px clamp(20px, 3vw, 44px); margin: 22px 0 0; padding: 0; list-style: none; }
.agentDocs .articleBody .agentCaps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.agentDocs .articleBody .agentCaps + p { margin-top: 30px; }
.agentDocs .agentCaps p { margin: 6px 0 0; color: var(--muted); font-size: .94rem; line-height: 1.55; }
.glyphPlot { display: block; width: 104px; height: auto; margin: 0 0 12px -8px; overflow: visible; }
.glyphPlot .ink { fill: none; stroke: var(--text); stroke-width: 1; stroke-linejoin: round; }
.glyphPlot .ink--m { stroke: var(--brand-steel); }
.glyphPlot .plate { fill: #fbfaf8; }
.glyphPlot .plate.is-main { fill: var(--selected); }
.glyphPlot .side { fill: #e3e1da; }
.glyphPlot .cons { fill: none; stroke: var(--brand-steel); stroke-width: .9; stroke-dasharray: 2 3; }
.agentDocs .articleBody .agentTools { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 0; padding: 0; list-style: none; }
.agentDocs .articleBody .agentTools li > code { display: inline-block; padding: 1px 7px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--subtle); font-size: .76rem; }
.agentDocs .articleBody .agentTools li[data-act] > code { border-style: dashed; }
.agentActKey { padding: 0 7px; border: 1px dashed var(--line); border-radius: 999px; font-size: .8rem; color: var(--text); white-space: nowrap; }

/* Listed overview: the hero carries the server URL and the guide link. Below it, light mode uses the
   homepage's paper surface and its steel-tinted selection. */
.agentHero { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; max-width: 640px; margin-top: 30px; }
.agentHero .agentServer { flex: 1 1 300px; margin: 0; }
.publicInterior .interiorHero .agentServer > span { color: #c4ced2; }
.agentHero .agentCode pre { margin: 0; padding: 11px 52px 11px 14px; border: 0; border-radius: var(--radius-control); background: #fff; color: #1d2327; }
.agentHero .agentCode code { font: 500 .95rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.agentHero .agentCopy { top: 8px; right: 8px; border: 0; background: transparent; color: #56616b; }
.agentHero .agentCopy:hover { background: #eef1f4; color: #1d2327; }
.agentHero .primaryButton { --public-primary: var(--home-cta-bg); --public-primary-hover: var(--action-ice-hover); --on-public-primary: var(--on-action-ice); min-height: 46px; }
.agentOverview > section + section { margin-top: clamp(56px, 7vw, 96px); }
.agentOverview h2 { margin: 0 0 22px; font-size: clamp(1.55rem, 2.2vw, 2.12rem); }
.agentOverview > section > div > p { max-width: 62ch; margin: 0; color: var(--subtle); line-height: 1.65; }
.agentOverview > section > div > p a { color: var(--accent-ink); font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }

/* Overview picker: calm logo tiles beside the selected app's steps. On a phone the tiles scroll sideways above them. */
.agentClients { scroll-margin-top: 96px; }
.agentPicker { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(24px, 4vw, 56px); align-items: start; margin: 0; }
.agentPicker .agentTabs:not([hidden]) { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.agentPicker .agentTabs [role="tab"] {
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  min-height: 96px;
  padding: 14px 6px 12px;
  border-radius: var(--radius-control);
  color: var(--text);
  font-size: .8rem;
  line-height: 1.25;
  text-align: center;
}
.agentPicker .agentLogo { width: 28px; height: 28px; margin: 0; }
.agentPicker .agentLogo img { width: 28px; height: 28px; }
.agentPicker .agentTabs [role="tab"][aria-selected="true"] { border-color: var(--agent-tick); background: var(--selected); box-shadow: inset 0 0 0 1px var(--agent-tick); }
.agentDocs .agentPicker .agentClient { padding: 2px 0 0 clamp(20px, 3vw, 40px); border: 0; border-left: 1px solid var(--line); border-radius: 0; background: none; }
.agentDocs .agentPicker .agentGuide { margin-top: 22px; }
.agentGuide a { color: var(--accent-ink); font-weight: 550; text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 960px) {
  .agentDocs .agentCaps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agentPicker { grid-template-columns: minmax(0, 1fr); }
  .agentPicker .agentTabs:not([hidden]) { display: flex; flex-wrap: nowrap; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; }
  .agentPicker .agentTabs [role="tab"] { flex: 0 0 100px; scroll-snap-align: start; }
  .agentDocs .agentPicker .agentClient { padding: 0; border-left: 0; }
}
@media (max-width: 560px) {
  .agentDocs .articleBody .agentClient { padding: 16px; }
  .agentDocs :is(.articleBody, .agentPicker) .agentFacts > div { grid-template-columns: minmax(0, 1fr); }
  .agentTabs [role="tab"] { min-height: 36px; font-size: .84rem; }
  .agentDocs :is(.articleBody, .agentPicker) .agentCode pre code { font-size: .78rem; }
}
