.wkp{box-sizing:border-box;max-width:520px;margin:45px auto;padding:36px;border:1px solid #e2e8f0;border-radius:16px;background:#fff;box-shadow:0 16px 45px rgba(0,46,118,.08);font-family:Arial,sans-serif;color:#1e293b}.wkp *{box-sizing:border-box}.wkp h2{color:#002e76;font-size:27px;margin:4px 0 8px}.wkp h3{color:#002e76}.wkp .wkp-brand{font-size:25px;font-weight:800;color:#002e76;letter-spacing:.03em}.wkp .wkp-subtitle{font-size:13px;color:#64748b;margin:4px 0 24px}.wkp p{line-height:1.55}.wkp label{font-size:14px;font-weight:600;color:#334155}.wkp input{width:100%;padding:13px;border:1px solid #cbd5e1;border-radius:7px;margin-top:7px;background:#fff;color:#1e293b}.wkp button{width:100%;padding:14px;background:#002e76;color:#fff;border:0;border-radius:7px;cursor:pointer;font-weight:700}.wkp a{color:#002e76}.wkp .wkp-footer{font-size:12px;color:#64748b;text-align:center;border-top:1px solid #e2e8f0;margin-top:28px;padding-top:16px}.wkp .wkp-alert{padding:12px;background:#fff1f2;color:#9f1239;border-radius:7px}.wkp code{overflow-wrap:anywhere}.wkp .wkp-success{padding:12px;background:#ecfdf5;color:#065f46;border-radius:7px}

/* 2FA QR code: rendered locally, no third-party requests. */
.wkp-qr{display:flex;justify-content:center;align-items:center;min-height:238px;padding:12px;margin:16px 0;background:#fff;border:1px solid #e2e8f0;border-radius:10px}
.wkp-qr svg{width:220px;max-width:100%;height:auto;display:block}
.wkp-manual{margin:16px 0;padding:12px;background:#f6f8fb;border-radius:8px}
.wkp-manual summary{cursor:pointer;font-weight:600}
.wkp-manual code{overflow-wrap:anywhere;user-select:all}
.wkp-qr-error{color:#a00}

.wkp-version{font:12px Arial,sans-serif;color:#64748b;text-align:center;margin:0 auto 24px;padding:0 12px}

/* KeyPortal v0.2.8 customer overview */
.wkp:has(.wkp-dashboard){max-width:860px}.wkp-dashboard{margin-top:18px}.wkp-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0}.wkp-metrics>div{border:1px solid #e2e8f0;background:#f6f9fd;border-radius:10px;padding:15px;min-width:0}.wkp-metrics small{display:block;color:#64748b;font-size:12px;margin-bottom:8px}.wkp-metrics strong{display:block;color:#002e76;font-size:19px;overflow-wrap:anywhere}.wkp-muted{color:#64748b;font-size:13px}.wkp-refresh button{max-width:340px}.wkp-table-wrap{overflow-x:auto}.wkp-table{width:100%;border-collapse:collapse;font-size:13px;text-align:left}.wkp-table th,.wkp-table td{border-bottom:1px solid #e2e8f0;padding:11px 9px;vertical-align:top}.wkp-table th{color:#002e76;background:#f6f9fd}.wkp-table code{font-size:12px}.wkp-archive{margin:18px 0;padding:12px;border:1px solid #e2e8f0;border-radius:9px}.wkp-archive summary{cursor:pointer;font-weight:700;color:#002e76}@media(max-width:600px){.wkp-metrics{grid-template-columns:1fr}}

/* v0.2.9: controlled key management */
.wkp-manage{min-width:175px}.wkp-manage label{font-size:11px}.wkp-manage input{padding:7px;font-size:12px}.wkp-manage button{padding:9px;font-size:12px;margin-top:6px;background:#8b1d2c}.wkp-table td{vertical-align:middle}

/* v0.3.0 */
.wkp-create,.wkp-reveal{padding:16px;margin:20px 0;border:1px solid #dbe5f1;border-radius:9px;background:#f5f8fc}.wkp-create input,.wkp-reveal textarea{display:block;width:100%;box-sizing:border-box;margin:8px 0 12px}.wkp-reveal textarea{font-family:monospace;overflow-wrap:anywhere}.wkp-create button{background:#002e76;color:#fff;border:0;border-radius:5px;padding:12px 16px;cursor:pointer}

/* v0.3.4: one-time rotated key directly alongside the matching active key */
.wkp-just-renewed{background:#f1f7ff}.wkp-inline-reveal{margin-top:12px;padding:12px;border:1px solid #c4d8f5;border-radius:7px;background:#f2f7ff;min-width:240px}.wkp-inline-reveal p{font-size:12px;line-height:1.45}.wkp-inline-reveal textarea{width:100%;max-width:100%;font-family:monospace;font-size:12px;box-sizing:border-box;overflow-wrap:anywhere}.wkp-inline-reveal .wkp-copy-button{background:#002e76;color:white;border:0;border-radius:4px;padding:9px 14px;cursor:pointer}.wkp-manage button[name=wkp_renew_key]{background:#002e76!important}.wkp-table-wrap{overflow-x:auto}

/* v0.3.8: responsive API-key cards; existing POST actions and nonces unchanged. */
.wkp:has(.wkp-dashboard){max-width:1120px;width:calc(100% - 32px)}
.wkp-key-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:16px 0 24px}
.wkp-key-card{min-width:0;padding:20px;border:1px solid #d9e3ef;border-radius:13px;background:#fff;box-shadow:0 4px 16px rgba(0,46,118,.055)}
.wkp-key-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;padding-bottom:14px;border-bottom:1px solid #e7edf5}
.wkp-key-head h4{font-size:18px;color:#002e76;margin:0 0 8px;overflow-wrap:anywhere}
.wkp-key-head code{font-size:12px;color:#475569;overflow-wrap:anywhere}
.wkp-key-status{flex-shrink:0;border-radius:999px;background:#e8f6ed;color:#176a3a;padding:5px 11px;font-size:12px;font-weight:700}
.wkp-key-usage{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 0;font-size:13px;color:#64748b}
.wkp-key-usage strong{font-size:17px;color:#002e76}
.wkp-key-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:start}
.wkp-key-actions .wkp-manage{min-width:0;border:1px solid #e2e8f0;border-radius:9px;padding:12px;background:#f8fafc;margin:0}
.wkp-key-actions .wkp-manage label{display:block;line-height:1.5;margin-bottom:9px}
.wkp-key-actions .wkp-manage input{width:100%;min-width:0;margin-top:5px}
.wkp-key-actions .wkp-manage button{width:100%;margin-top:8px;white-space:normal}
.wkp-key-actions .wkp-danger-action{background:#fff8f8;border-color:#f4d8dd}
.wkp-key-card .wkp-inline-reveal{min-width:0;margin:14px 0 0}
.wkp-key-card .wkp-inline-reveal textarea{width:100%;max-width:100%}
@media(max-width:900px){.wkp-key-grid{grid-template-columns:1fr}}
@media(max-width:580px){.wkp:has(.wkp-dashboard){width:calc(100% - 16px);padding:18px}.wkp-key-actions{grid-template-columns:1fr}.wkp-key-card{padding:14px}}

/* v0.3.9: compact, accessible native expand/collapse action panels. */
.wkp-key-card{padding:18px}
.wkp-key-usage{padding:12px 0}
.wkp-key-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.wkp-key-action{min-width:0;border:1px solid #dbe5f1;border-radius:8px;background:#f8fafc;overflow:hidden}
.wkp-key-action summary{display:flex;align-items:center;justify-content:center;gap:7px;padding:11px 9px;cursor:pointer;font-size:13px;font-weight:700;color:#002e76;list-style:none;user-select:none;min-height:42px;box-sizing:border-box}
.wkp-key-action summary::-webkit-details-marker{display:none}
.wkp-key-action summary::after{content:'⌄';font-size:17px;line-height:1;transition:transform .15s ease}
.wkp-key-action[open] summary::after{transform:rotate(180deg)}
.wkp-action-danger{border-color:#edcdd3;background:#fff8f8}
.wkp-action-danger summary{color:#8b1d2c}
.wkp-key-action summary:focus-visible{outline:3px solid #ff8a00;outline-offset:-3px}
.wkp-key-action[open]{grid-column:1/-1}
.wkp-action-body{padding:12px;border-top:1px solid #e2e8f0}
.wkp-action-body p{margin:0 0 12px;font-size:12px;color:#475569;line-height:1.5}
.wkp-key-actions .wkp-action-body .wkp-manage{padding:0;border:0;background:transparent}
.wkp-key-actions .wkp-action-body .wkp-manage label{font-size:12px}
.wkp-key-actions .wkp-action-body .wkp-manage button{min-height:39px}
@media(max-width:580px){.wkp-key-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}
