/* .btn sets display, which beats the hidden attribute: the wallet's hidden buttons showed (2026-10-26) */
[hidden] { display: none !important; }
/* Try Agent Payments (/try) and the connector's Allow page (/try/connect). Builds on site.css. */

.tp-test { display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 999px; font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: #ffcf5a; background: rgba(255, 207, 90, .12);
  border: 1px solid rgba(255, 207, 90, .4); vertical-align: middle; }
.tp-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  margin-bottom: 18px; min-width: 0; }
.tp-card h2 { font-size: 24px; }
.tp-card h3 { font-size: 19px; margin-bottom: 12px; }
.tp-center { max-width: 520px; margin: 0 auto; text-align: center; }
.tp-center p { color: var(--text-2); }
.tp-muted { color: var(--muted); }
.tp-small { display: block; font-size: 13.5px; }
.tp-err { color: #ff8a8a; min-height: 1.2em; margin: 10px 0 0; font-size: 14.5px; }
.tp-ok { color: #3ddc97; }
.tp-bad { color: #ff8a8a; font-weight: 700; }
.tp-link { background: none; border: 0; padding: 0; color: var(--accent-bright); cursor: pointer; font: inherit;
  text-decoration: underline; text-underline-offset: 3px; }
.tp-sub { margin-top: 22px; }

.tp-card label { display: block; font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 14px; }
.tp-card input, .tp-card textarea { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font: 400 15px/1.5 var(--font-body); }
.tp-card textarea { resize: vertical; }
.tp-card input:focus, .tp-card textarea:focus { border-color: var(--accent-bright); outline: none; }
.tp-row { display: grid; gap: 0 14px; grid-template-columns: 1fr 1fr; }
.tp-inline { display: flex; gap: 10px; margin-top: 12px; }
.tp-inline input { margin: 0; flex: 1; min-width: 0; }

.tp-top { display: flex; flex-wrap: wrap; gap: 18px 40px; justify-content: space-between; align-items: flex-end; margin-bottom: 22px; }
.tp-top h2 { font-size: clamp(26px, 3vw, 34px); margin-bottom: 6px; }
.tp-settle { display: flex; flex-direction: column; align-items: flex-end; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--radius); padding: 14px 20px; }
.tp-settle-label { font-size: 13px; color: var(--text-2); font-weight: 600; }
.tp-settle-num { font: 800 34px/1.15 var(--font-head); }

.tp-grid { display: grid; gap: 0 18px; }
@media (min-width: 960px) { .tp-grid { grid-template-columns: 1fr 1fr; align-items: start; } }

.tp-list { list-style: none; margin: 0; padding: 0; }
.tp-list li { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 10px 0;
  border-bottom: 1px solid var(--line); }
.tp-list li:last-child { border-bottom: 0; }
.tp-list li > div { min-width: 0; overflow-wrap: anywhere; }

.tp-copy { display: flex; gap: 10px; align-items: center; margin: 4px 0 14px; }
.tp-copy code { flex: 1; min-width: 0; overflow-wrap: anywhere; background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; }
.tp-steps { margin: 0 0 12px; padding-left: 20px; color: var(--text-2); }
.tp-steps li { margin-bottom: 8px; }
.tp-steps q { color: var(--text); font-weight: 600; }

.tp-head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 12px; }
.tp-head h3 { margin: 0; }
.tp-head .btn { margin-left: auto; }
.tp-badge { font-size: 13px; font-weight: 600; }
.tp-table-wrap { overflow-x: auto; }
.tp-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tp-table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 13px; padding: 8px 10px; border-bottom: 1px solid var(--line-2); }
.tp-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tp-table td span { display: block; font-size: 13px; }
.tp-table .num { text-align: right; white-space: nowrap; }
.tp-table a { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }
.tp-chat { max-height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 14px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); margin-bottom: 12px; }
.tp-chat-hint { margin: 0; }
.tp-msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere;
  font-size: 15px; line-height: 1.5; }
.tp-msg-user { align-self: flex-end; background: var(--accent); color: #04121f; border-bottom-right-radius: 4px; }
.tp-msg-ai { align-self: flex-start; background: var(--surface); border: 1px solid var(--line-2); border-bottom-left-radius: 4px; }
.tp-msg-steps { display: block; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.tp-msg-wait { color: var(--muted); font-style: italic; }
.tp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-chip { background: none; border: 1px solid var(--line-2); color: var(--text-2); border-radius: 999px; padding: 6px 12px;
  font: 500 13.5px var(--font-body); cursor: pointer; }
.tp-chip:hover { border-color: var(--accent-bright); color: var(--text); }
.tp-modes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.tp-mode { background: none; border: 1px solid var(--line-2); color: var(--text-2); border-radius: 999px; padding: 7px 14px;
  font: 600 14px var(--font-body); cursor: pointer; }
.tp-mode:hover { border-color: var(--accent-bright); color: var(--text); }
.tp-mode[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #04121f; }
.tp-mode:disabled { opacity: .5; cursor: default; }
/* The /try demo chat: a full chat window (Nathan 2026-10-25: "larger, like a real chat"). */
.tp-chatbox { display: flex; flex-direction: column; height: min(75vh, 720px); min-height: 480px; margin: 16px 0 8px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 16px; overflow: hidden; }
.tp-chatbox-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 12px 18px;
  border-bottom: 1px solid var(--line); font-weight: 600; }
.tp-chatbox .tp-chat { flex: 1; max-height: none; margin: 0; padding: 20px 18px; gap: 14px; background: none; border: 0;
  border-radius: 0; }
.tp-chatbox .tp-chat-hint { margin: auto; text-align: center; }
.tp-chatbox .tp-msg { max-width: 78%; font-size: 16px; }
.tp-chatbox .tp-chips { padding: 0 18px 12px; }
.tp-chatbox .tp-inline { margin: 0; padding: 14px 18px; border-top: 1px solid var(--line); background: var(--surface); }
.tp-chatbox .tp-inline input { padding: 12px 16px; border-radius: 999px; font-size: 16px; }
.tp-chatbox .tp-inline .btn { border-radius: 999px; }
.tp-art-head, .tp-art-offer { white-space: normal; }
.tp-arts { margin: 8px 0 12px; padding-left: 22px; white-space: normal; }
.tp-arts li { margin-bottom: 14px; }
.tp-arts li:last-child { margin-bottom: 0; }
.tp-art-title { font-weight: 600; }
.tp-art-price { color: var(--text-2); }
.tp-art-sum { display: block; margin-top: 3px; font-size: 13.5px; color: var(--muted); }
.tp-art-offer { margin-bottom: 6px; }
.tp-wcard { margin-top: 10px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--bg-2); white-space: normal; display: flex; flex-direction: column; gap: 8px; }
.tp-wcard-title { font-weight: 700; font-size: 16px; }
.tp-wcard-amount { font-weight: 700; font-size: 20px; }
.tp-wcard-muted { color: var(--muted); font-size: 14px; }
.tp-wcard-sub { font-weight: 600; margin-top: 12px; }
.tp-wcard-list { margin: 4px 0 4px 18px; padding: 0; font-size: 14px; }
.tp-wcard-list li { margin: 2px 0; }
.tp-wcard-test { color: var(--text-2); font-size: 13px; border-top: 1px dashed var(--line-2); padding-top: 8px; }
.tp-wcard-brand { color: var(--muted); font-size: 12px; }
.tp-card-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-card-btn.btn { padding: 9px 16px; border-radius: 999px; font-size: 14px; }
@media (max-width: 600px) { .tp-chatbox { height: 80vh; min-height: 420px; } .tp-chatbox .tp-msg { max-width: 90%; } }
.tp-chip:disabled, #chat-form button:disabled { opacity: .5; cursor: default; }
.tp-code-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-weight: 600; color: var(--text-2); }
.tp-code { font: 700 20px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .06em; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 6px 12px; }
.tp-danger { border-color: #8a3a3a; color: #ff9a9a; }
.tp-danger:hover { background: rgba(255, 90, 90, .1); color: #ffb3b3; }

@media (max-width: 640px) {
  .tp-row { grid-template-columns: 1fr; }
  .tp-msg { max-width: 95%; }
  .tp-settle { align-items: flex-start; width: 100%; }
  .tp-table thead { display: none; }
  .tp-table tr { display: block; border-bottom: 1px solid var(--line-2); padding: 8px 0; }
  .tp-table td { display: block; border: 0; padding: 3px 0; }
  .tp-table .num { text-align: left; font-weight: 700; }
}
.tp-reader { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.tp-reader-body { white-space: pre-wrap; line-height: 1.65; margin-bottom: 16px; }

/* Stripe's checkout, embedded over the /try chat */
.tp-pay-modal { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .55); display: flex;
  align-items: flex-start; justify-content: center; padding: 24px 16px; overflow-y: auto; }
.tp-pay-panel { background: #fff; color: #1a1a1a; border-radius: 14px; width: 100%; max-width: 560px; padding: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35); }
.tp-pay-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600;
  margin-bottom: 8px; }
.tp-pay-frame { min-height: 420px; margin-top: 10px; }
.tp-pay-note { font-size: 13px; color: #555; margin-top: 8px; }
.tp-pay-note:empty { display: none; }
.tp-audio { width: 100%; margin-top: 10px; }
/* Products on /publish: subscription plans and an article's own price (task_39178ea46b) */
.tp-card select { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font: 400 15px/1.5 var(--font-body); }
.tp-card input[type=checkbox] { display: inline-block; width: auto; margin: 0 8px 0 0; vertical-align: middle; }
.tp-plan { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px 4px; margin: 0 0 12px; }
.tp-plan legend { padding: 0 6px; font-weight: 600; }
.tp-plan .tp-link { margin-bottom: 10px; }
.tp-list li { flex-wrap: wrap; }
.tp-price-form { flex-basis: 100%; padding-top: 8px; }
.tp-wcard-list { margin: 8px 0 0 18px; padding: 0; font-size: 14px; }
.tp-wcard-list li { margin: 4px 0; }

/* How it works on your site: a 1-2-3 */
.tp-123 { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 900px) { .tp-123 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tp-123 li { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 18px; }
.tp-123 h3 { font-size: 18px; margin: 12px 0 6px; }
.tp-123 p { color: var(--text-2); margin: 0; font-size: 15px; line-height: 1.55; }
.tp-n { display: inline-flex; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-btn); color: #fff;
  font-weight: 700; align-items: center; justify-content: center; }
