/* The cabinet of an MCP customer and the OAuth consent page
   (modules/mcp/, modules/oauth/). The tokens are those of site.css. */

.acc-head { border-bottom: 1px solid var(--line); background: var(--surface); }
.acc-head-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding-top: var(--s5); padding-bottom: var(--s3); }
.acc-who { margin: 4px 0 0; font-weight: 600; }
.acc-tabs { display: flex; gap: var(--s5); overflow-x: auto; }
.acc-tabs a { padding: var(--s3) 0; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; font-size: 15px; }
.acc-tabs a:hover { color: var(--ink); }
.acc-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }

.acc-page { padding: var(--s7) 0 var(--s9); }
.acc-stack { display: grid; gap: var(--s5); }
.acc-grid { display: grid; gap: var(--s5); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.acc-wide { grid-column: 1 / -1; }
.acc-card { display: grid; gap: var(--s3); align-content: start; padding: var(--s5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); min-width: 0; }
.acc-card h2 { font-size: 24px; }
.acc-card p { margin: 0; }
.acc-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }

.acc-facts { display: grid; gap: var(--s2); margin: 0; }
.acc-facts div { display: flex; justify-content: space-between; gap: var(--s3); padding: var(--s2) 0; border-top: 1px solid var(--line); }
.acc-facts dt { color: var(--ink-3); }
.acc-facts dd { margin: 0; font-weight: 500; text-align: right; }
.acc-facts-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.acc-facts-row div { display: grid; border-top: 0; }
.acc-facts-row dd { text-align: left; font: 300 30px/1.1 var(--disp); letter-spacing: -.04em; }

.acc-big b { font: 300 48px/1 var(--disp); letter-spacing: -.045em; }
.acc-big span { color: var(--ink-3); }
.acc-meter { height: 10px; border-radius: var(--r-pill); background: var(--bg-alt); overflow: hidden; }
.acc-meter span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }

.acc-bars { list-style: none; margin: 0; padding: 0; display: flex; align-items: flex-end; gap: 4px; height: 160px; overflow-x: auto; }
.acc-bars li { flex: 1 0 18px; height: 100%; display: grid; grid-template-rows: 1fr auto; align-items: end; gap: 4px; }
.acc-bars span { display: block; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; }
.acc-bars small { font-size: 11px; color: var(--ink-3); text-align: center; }

.acc-steps { margin: 0; padding-left: 20px; display: grid; gap: var(--s2); color: var(--ink-2); }
.acc-card code, .acc-steps code { font: 400 14px/1.4 var(--mono); background: var(--bg-alt); padding: 1px 6px; border-radius: 4px; overflow-wrap: anywhere; }
.acc-code { margin: 0; padding: var(--s3) var(--s4); background: var(--dark); color: var(--dark-ink); border-radius: var(--r-md); overflow-x: auto; }
.acc-code code { background: none; color: inherit; padding: 0; white-space: pre; }
.acc-new-key { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.acc-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.acc-table th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 13px; padding: var(--s2) var(--s3) var(--s2) 0; border-bottom: 1px solid var(--line-strong); }
.acc-table td { padding: var(--s3) var(--s3) var(--s3) 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.acc-num { text-align: right !important; font-variant-numeric: tabular-nums; }

.acc-form { display: grid; gap: var(--s4); }
.acc-form-row { grid-template-columns: 1fr auto; align-items: end; }
/* The button of a field row has the height of the field beside it. */
.acc-form-row > .site-btn { min-height: 46px; }
.acc-field { display: grid; gap: 6px; }
.acc-field span { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.acc-field input, .acc-field textarea, .acc-field select { min-height: 46px; padding: 0 var(--s3); font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md); }
.acc-field textarea { min-height: 90px; padding: 10px var(--s3); resize: vertical; }
.acc-field input:focus, .acc-field textarea:focus, .acc-field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.acc-field input:disabled { background: var(--bg-alt); color: var(--ink-3); }
.acc-check { display: flex; gap: var(--s2); align-items: flex-start; font-size: 15px; line-height: 1.45; }
/* The box stands at the middle of the first line of its text, at any size of
   the text: 1.45em is that line, and the box is 16px high. */
.acc-check input { flex: none; width: 16px; height: 16px; margin: calc(0.725em - 8px) 0 0; font-size: inherit; accent-color: var(--accent); }
/* A group of radios in a form: a frame with its caption on the border. */
.acc-choice { display: grid; gap: var(--s2); margin: 0; border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s3) var(--s4); }
.acc-choice legend { font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 0 4px; }
/* The radios of a short choice side by side; they wrap on a narrow screen. */
.acc-choice-row { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); }
/* A field that public/site/kind.js hides: display: grid would show it. */
.acc-field[hidden], .acc-check[hidden] { display: none; }
.acc-row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.acc-inline { display: inline; }
/* A form of one line: a select or short inputs and a button, side by side. */
.acc-controls { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.acc-controls :is(select, input:not([type=hidden])) { min-height: 40px; padding: 0 var(--s2); font: inherit; font-size: 15px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md); }
.acc-link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.acc-danger { color: var(--danger); }
/* A card number in blocks of four; the digits keep one width. */
.acc-pan { font-variant-numeric: tabular-nums; letter-spacing: .02em; white-space: nowrap; }
.acc-small { font-size: 14px; }
/* The trap field of the sign-in form (lib/mail_guard.php). Off screen, not
   display:none, which some bots skip. */
.acc-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.acc-error, .acc-warn, .acc-ok { padding: var(--s3) var(--s4); border-radius: var(--r-md); font-size: 15px; margin: 0; }
/* Three notices, three colours: an error is red, a warning is amber, a done action is green. */
.acc-error { background: var(--danger-soft); color: var(--danger); }
.acc-warn { background: var(--warn-soft); color: var(--warn); }
.acc-ok { background: var(--ok-soft); color: var(--ok); }

/* The plans: the cards of the landing (public/site/mcp.css), with the form
   of the cabinet in the foot of each card. */
.acc-plans-block { display: grid; gap: var(--s4); padding-top: var(--s4); }
.acc-plans-block > .acc-card-head h2 { font-size: 24px; }
/* The plans: the period switch stands under the heading, next to the cards it changes. */
.acc-card-head.is-stacked { flex-direction: column; align-items: flex-start; }
/* A pack: the saved-card button, and the link to the card form beside it. */
.acc-pack-form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); }
.acc-mcp-plans { margin-top: var(--s4); }
.mcp-plan-foot form { display: grid; gap: var(--s2); }
.mcp-plan.is-current { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.mcp-plan-foot .acc-plan-note { margin-top: var(--s3); text-align: center; padding: 12px 0; }
/* The terms of auto-renewal, once under the cards: small print. */
.acc-terms { margin: 0; font-size: 12.5px; line-height: 1.45; max-width: 760px; }
.acc-plan-note { font-weight: 600; color: var(--accent); }
/* The payment method under the plan tabs: card first, an invoice on request. */
.acc-method { margin: 0; font-size: 15px; color: var(--ink-2); }
.acc-method.is-bank { display: grid; gap: var(--s2); padding: var(--s3) var(--s4); border: 1px solid var(--line-strong); border-radius: var(--r-md); }
.acc-method.is-bank p { margin: 0; }
/* The pay button of a plan: the text on the left, the marks of the wallets
   that the bank page accepts on the right, in the text colour of the button. */
/* The label at the left, the wallet marks at the right edge. */
.acc-pay-btn { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding-left: 20px; padding-right: 20px; }
.acc-wallets { display: inline-flex; align-items: center; gap: 10px; opacity: .8; }
.acc-wallet { display: block; flex: none; fill: currentColor; height: 14px; }
.acc-wallet-apple { width: 33px; }
.acc-wallet-google { width: 35.2px; }

.acc-auth { min-height: 60vh; }
.acc-auth-box { max-width: 520px; display: grid; gap: var(--s4); }
.acc-auth-box h1 { font-size: 40px; }
/* The steps to a trial (sign-in, billing?trial=1): the current step is dark. */
.acc-trial-steps { margin: 0; padding-left: 1.4em; display: grid; gap: var(--s2); color: var(--ink-3); }
.acc-trial-steps [aria-current] { color: var(--ink); font-weight: 600; }
/* The second step of a trial (/mcp/billing?trial=1): one column, one card. */
.acc-trial { max-width: 520px; gap: var(--s4); }
.acc-trial h1 { font-size: 40px; }
.acc-trial .acc-mcp-plans { grid-template-columns: 1fr; margin-top: 0; }
@media (max-width: 720px) { .acc-trial h1 { font-size: 32px; } }
.acc-replace { border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s3) var(--s4); display: grid; gap: var(--s2); }
.acc-replace legend { font-weight: 600; padding: 0 4px; }
.acc-pay { max-width: 560px; }
/* Columns, not a grid row: a group of 15 sources beside a group of 3 left a
   gap as tall as 12 sources. Each group goes up under the one above it. */
.acc-tools { columns: 2; column-gap: var(--s4); }
.acc-tools-group { display: grid; gap: var(--s3); align-content: start; margin: 0 0 var(--s4); break-inside: avoid; border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s3) var(--s4) var(--s4); }
.acc-tools-group legend { font-weight: 600; padding: 0 4px; }
.acc-tools-std { font-size: 12px; font-weight: 600; color: var(--accent); }

@media (max-width: 1000px) {
	.acc-card-head { flex-wrap: wrap; }
}
@media (max-width: 760px) {
	.acc-grid, .acc-facts-row { grid-template-columns: 1fr; }
	.acc-tools { columns: 1; }
	.acc-form-row { grid-template-columns: 1fr; }
	.acc-table { font-size: 14px; }
	.acc-auth-box h1 { font-size: 32px; }
}
.acc-bank-op { margin: 12px 0; padding: 12px 16px; }
.acc-bank-op form { margin-right: 8px; }

/* How to connect, on /mcp/connections: the address and one card per client. */
.acc-connect-label { margin: var(--s2) 0 -6px; color: var(--ink-2); font-weight: 600; }
.acc-connect .mcp-code { margin: 0; }
.acc-clients { list-style: none; margin: var(--s2) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s3); }
.acc-client { display: grid; gap: var(--s2); align-content: start; padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); }
.acc-client h3 { display: flex; align-items: center; gap: var(--s2); margin: 0; font-size: 17px; }
.acc-client h3 .mcp-ai-logo { width: 20px; height: 20px; }
.acc-client p { margin: 0; font-size: 14px; color: var(--ink-2); }
.acc-client .site-btn { justify-self: start; align-self: end; margin-top: var(--s1); }
.acc-connect .mcp-code code { background: none; padding: 0; color: inherit; font: inherit; }
.acc-client { grid-template-rows: auto 1fr auto; }

/* Connect, on /mcp/account: the state and one button to /mcp/connections. */
.acc-go { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s3) var(--s5); }
.acc-go-text { display: grid; gap: var(--s2); }
.acc-go-logos { display: flex; gap: var(--s2); }
.acc-go-logo { width: 20px; height: 20px; }
@media (max-width: 640px) { .acc-go { grid-template-columns: 1fr; } .acc-go .site-btn { justify-self: start; } }
