/* The approval screen (approval.js; CODING_AGENT_SPEC.md 2.2), on the design's tokens (design.css, .d1): the design's
   card and buttons, with the parts the design leaves to the component. Every decision button is drawn alike. */
.d1 .ap { overflow-wrap: anywhere; }
.d1 .ap:focus { outline: 2px solid var(--amber); outline-offset: 2px; }
.d1 .ap .pill { white-space: normal; }
.d1 .ap p { margin: 6px 0; }
.d1 .ap.decided > :not(.ap-status):not(.pill) { opacity: .55; }

/* The exact words, quoted as the design draws them. */
.d1 .ap-words { margin: 10px 0 6px; padding: 0; border: 0; font-style: normal; max-width: none; }
.d1 .ap-words p { margin: 0 0 8px; white-space: pre-line; }
.d1 .ap-words p:first-child::before { content: "\201C"; }
.d1 .ap-words p:last-child::after { content: "\201D"; }
.d1 .ap-words.ap-long { max-height: 22rem; overflow: auto; border: 1px solid var(--rule-strong); border-radius: 10px; padding: 12px 14px; }
.d1 .ap-words.ap-long:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* The diff: removed words struck through, new words underlined, both in words as well as colour. */
.d1 .ap-diff { border-left: 3px solid var(--rule-strong); padding: 4px 12px; margin: 8px 0; }
.d1 .ap-diff del { text-decoration: line-through; color: var(--muted); }
.d1 .ap-diff ins { text-decoration: underline; text-decoration-color: var(--amber); text-underline-offset: .2em; }

.d1 .ap-hash code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
.d1 .ap-hash-note { color: var(--muted); }
.d1 .ap-why summary { cursor: pointer; font-family: var(--display); font-size: 15px; min-height: 44px; padding: 11px 0; box-sizing: border-box; }
.d1 .ap-why summary:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.d1 .ap-gate { color: var(--text); }

/* The decisions: approve side and reject side in two columns, each button the same size, border and colour. */
.d1 .ap-decide { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0 4px; }
.d1 .ap-side { display: flex; flex-direction: column; gap: 8px; }
.d1 .ap-choice { min-height: 44px; width: 100%; padding: 10px 14px; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .35em;
  text-align: center; line-height: 1.3; background: transparent; color: var(--text); border: 1px solid var(--rule-strong); border-radius: 22px; }
.d1 .ap-choice .ap-verb { font-weight: 700; }
.d1 .ap-choice .ap-verb::after { content: ":"; }
.d1 .ap-choice:hover { border-color: var(--amber); }
.d1 .ap-choice:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.d1 .ap-choice:disabled { opacity: .5; cursor: not-allowed; }
.d1 .ap-other { margin: 8px 0; display: flex; flex-direction: column; gap: 8px; max-width: 32rem; }
.d1 .ap-other label { font-family: var(--display); font-weight: 600; }
.d1 .ap-other input, .d1 .ap-other textarea { box-sizing: border-box; width: 100%; min-height: 44px; font: inherit; color: var(--text); background: transparent;
  border: 1px solid var(--rule-strong); border-radius: 10px; padding: 10px 12px; }
.d1 .ap-other textarea { min-height: 8rem; }
.d1 .ap-undo { margin-left: .25em; }

/* The toast: fixed at the foot of the screen, inside the page's width; announced by role="status". */
.d1 .ap-toast { position: fixed; z-index: 50; left: 16px; right: 16px; bottom: 16px; max-width: 32rem; margin: 0 auto; padding: 12px 16px;
  background: var(--ink); color: var(--text); border: 1px solid var(--rule-strong); border-top: 2px solid var(--amber); border-radius: 10px; }
@media (prefers-reduced-motion: no-preference) { .d1 .ap-toast { transition: opacity .2s; } }
@media (max-width: 420px) { .d1 .ap-decide { gap: 8px; } .d1 .ap-choice { padding: 8px 10px; font-size: 15px; } }
