/* The AI assistants page (AccessTokensController): how it works in three
   boxes, a card of steps (the address to copy in them) per assistant, and the token
   folded away. Plain app styling, like the other account pages, but for
   the assistants' cards. */

.ai-intro { margin: -0.25rem 0 1.25rem; color: var(--muted); }
.ai-label { display: block; margin: 0 0 0.35rem; font-size: 0.85rem; color: var(--muted); }
.ai h2 { font-size: 1.05rem; }

/* How it works */
.ai-flow { list-style: none; margin: 0 0 1.75rem; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) 3.5rem minmax(0, 1fr) 3.5rem minmax(0, 1fr); }
.ai-flow__part { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.75rem 0.9rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.ai-flow__who { font-weight: 600; }
.ai-flow__what { color: var(--muted); font-size: 0.88rem; line-height: 1.35; }
.ai-flow__link { display: grid; place-items: center; color: var(--muted); font-size: 0.75rem; }
.ai-flow__link span::after { content: " →"; }

/* The address, in a step or the token's hint: one click selects it all */
.ai-copy { display: inline-block; max-width: 100%; margin: 0.3rem 0 0.1rem; padding: 0.15rem 0.5rem; border: 1px solid rgba(43, 38, 32, 0.35); border-radius: 4px; background: var(--surface); font: 0.82rem var(--mono); color: var(--ink); overflow-wrap: anywhere; user-select: all; }

.ai-address { margin: 0 0 1.75rem; }
.ai-address__row { display: flex; gap: 0.5rem; }
.ai-address__row input, .ai-address__row textarea { flex: 1; min-width: 0; padding: 0.5rem 0.65rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font: 0.9rem var(--mono); resize: none; }
.ai-address__row .button { flex: none; align-self: flex-start; }

/* Claude and ChatGPT as parts on a sheet, lettered as the cut list does,
   anything else as the dashed offcut. Fonts come from home.css. */
.ai-sheet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px; margin: 0 0 2rem; border: 1px solid #6f6455; background: #fbf9f5; }
.ai-part { position: relative; padding: 2.1rem 1.25rem 1.25rem; border: 1.25px solid var(--ink); background: #e8d3a6; }
.ai-part h2 { margin: 0 0 0.75rem; font-family: "Archivo", var(--font); font-stretch: 80%; font-weight: 800; font-size: 1.6rem; line-height: 1; text-transform: uppercase; }
.ai-part__size { position: absolute; top: 0.6rem; left: 0; right: 0; text-align: center; font: 500 0.72rem "IBM Plex Mono", var(--mono); color: #5b5146; }
.ai-part__mark { position: absolute; right: 1rem; bottom: 0.25rem; font-family: "Archivo", var(--font); font-weight: 900; font-size: 4.5rem; line-height: 1; color: #8a4418; opacity: 0.25; pointer-events: none; }
.ai-part__note { margin: 0.9rem 0 0; padding-right: 3rem; font-size: 0.85rem; color: #5b5146; }
.ai-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.ai-steps li { counter-increment: step; display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 0.25rem; padding: 0.4rem 0; border-top: 1px solid rgba(43, 38, 32, 0.15); color: #3d352d; font-size: 0.92rem; }
.ai-steps li::before { content: counter(step, decimal-leading-zero); font: 500 0.8rem/1.6 "IBM Plex Mono", var(--mono); color: #8a4418; }
.ai-offcut { grid-column: 1 / -1; padding: 0.9rem 1.25rem; border: 1px dashed #a89b88; background: #f7f3ec; color: #8a7f70; font-style: italic; text-align: center; }

/* Connected apps and tokens, one row each in a card */
.ai-section { margin: 0 0 1.25rem; }
.ai-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.ai-list__item { display: flex; align-items: center; gap: 0.85rem; padding: 0.75rem 1rem; }
.ai-list__item + .ai-list__item { border-top: 1px solid var(--line); }
.ai-list__icon { display: grid; place-items: center; flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--bg); color: var(--accent); }
.ai-list__name { flex: 1; min-width: 0; }
.ai-list__name strong { display: block; font-weight: 600; overflow-wrap: anywhere; }
.ai-list__meta { display: block; color: var(--muted); font-size: 0.85rem; }
.ai-list__item form { flex: none; margin: 0; }

/* The token, folded away in a card */
.ai-token { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.ai-token summary { display: flex; align-items: center; gap: 0.85rem; padding: 0.85rem 1rem; cursor: pointer; list-style: none; }
.ai-token summary::-webkit-details-marker { display: none; }
.ai-token__key { display: grid; place-items: center; flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--bg); color: var(--accent); }
.ai-token__title { flex: 1; min-width: 0; }
.ai-token__title strong { display: block; font-weight: 600; }
.ai-token__title span { display: block; color: var(--muted); font-size: 0.88rem; }
.ai-token__toggle { flex: none; width: 0.55rem; height: 0.55rem; margin-right: 0.25rem; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); transition: transform 0.15s; }
.ai-token[open] .ai-token__toggle { transform: rotate(-135deg); }
.ai-token__body { padding: 0 1rem 1rem; border-top: 1px solid var(--line); }
.ai-token__body > p { max-width: 36rem; color: var(--muted); }
.ai-token__hint { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.85rem; }
.ai-token__form { max-width: 24rem; }

@media (max-width: 640px) {
  .ai-flow { grid-template-columns: minmax(0, 1fr); }
  .ai-flow__link { padding: 0.3rem 0; }
  .ai-flow__link span::after { content: " ↓"; }
  .ai-sheet { grid-template-columns: minmax(0, 1fr); }
}
