/* Cards module: card visuals and card pages. */
.cd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.cd-item { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; display: grid; gap: 10px; min-width: 0; color: var(--text); }
a.cd-item:hover { border-color: #8fb6dd; color: var(--text); }
.cd-item .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.cd-item .meta b { display: block; font-size: 13px; }
.cd-item .meta .r { text-align: right; }

.cd-card { position: relative; width: 100%; max-width: 380px; aspect-ratio: 1.586; border-radius: 14px; padding: 18px 20px; color: #fff; overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 10px 24px rgba(6, 26, 54, .22), inset 0 1px 0 rgba(255, 255, 255, .18);
    background: linear-gradient(135deg, #0b2d5a 0%, #061a36 60%, #0a2347 100%); font-family: var(--fb); isolation: isolate; container-type: inline-size; }
.cd-card::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 75%; height: 140%; background: radial-gradient(closest-side, rgba(255, 255, 255, .16), transparent); transform: rotate(18deg); z-index: -1; }
.cd-card::after { content: ""; position: absolute; left: -10%; bottom: -55%; width: 90%; height: 100%; border-radius: 50%; border: 28px solid rgba(255, 255, 255, .05); z-index: -1; }
.cd-card.sm { max-width: 300px; padding: 14px 16px; border-radius: 12px; }
.cd-card.xs { max-width: 120px; padding: 6px 8px; border-radius: 6px; box-shadow: 0 2px 6px rgba(6, 26, 54, .25); }
.cd-card.xs .cd-num, .cd-card.xs .cd-tag, .cd-card.xs .cd-mid, .cd-card.xs .cd-bank small, .cd-card.xs .cd-foot > div:not(:last-child) { display: none; }
.cd-card.xs .cd-foot { justify-content: flex-end; }
.cd-card.xs .cd-net.mc small { display: none; }
.cd-card.xs .cd-bank { font-size: 7px; }
.cd-card.xs .cd-net { font-size: 11px; }
.cd-card.xs .cd-net.mc i { width: 12px; height: 12px; }

.cd-card.d-navy { background: linear-gradient(135deg, #12407a 0%, #0a2347 55%, #061a36 100%); }
.cd-card.d-blue { background: linear-gradient(135deg, #2f8ff0 0%, #0a6fd2 45%, #0549a3 100%); }
.cd-card.d-teal { background: linear-gradient(135deg, #1fb5a6 0%, #0b8a8a 50%, #075e6e 100%); }
.cd-card.d-silver { background: linear-gradient(135deg, #e9eef3 0%, #b7c3cf 45%, #8796a6 100%); color: #10243c; }
.cd-card.d-graphite { background: linear-gradient(135deg, #5b6673 0%, #39424d 50%, #22282f 100%); }
.cd-card.d-black { background: linear-gradient(135deg, #3a3a3e 0%, #151517 55%, #000 100%); }
.cd-card.d-gold { background: linear-gradient(135deg, #f3d98b 0%, #c99b3b 50%, #8d6719 100%); color: #2b1e05; }
.cd-card.d-purple { background: linear-gradient(135deg, #8a5cf0 0%, #5a33c4 50%, #34197f 100%); }

.cd-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.cd-bank { font-weight: 700; font-size: 13px; letter-spacing: .02em; line-height: 1.15; }
.cd-bank small { display: block; font-weight: 400; font-size: 10.5px; opacity: .8; letter-spacing: .06em; text-transform: uppercase; }
.cd-tag { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; border: 1px solid currentColor; border-radius: 3px; padding: 1px 6px; opacity: .85; }
.cd-chip { width: 42px; height: 31px; border-radius: 6px; background: linear-gradient(135deg, #f6e3a1, #c9a548 55%, #e9d27d); position: relative; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.cd-chip::before { content: ""; position: absolute; inset: 7px 0; border-top: 1px solid rgba(0, 0, 0, .25); border-bottom: 1px solid rgba(0, 0, 0, .25); }
.cd-chip::after { content: ""; position: absolute; inset: 0 14px; border-left: 1px solid rgba(0, 0, 0, .25); border-right: 1px solid rgba(0, 0, 0, .25); }
.cd-mid { display: flex; align-items: center; gap: 12px; }
.cd-mid .bi-wifi { transform: rotate(90deg); font-size: 20px; opacity: .85; }
.cd-num { font-family: 'Courier New', ui-monospace, monospace; font-size: clamp(15px, 6.4cqi, 22px); letter-spacing: .08em; white-space: nowrap; text-shadow: 0 1px 1px rgba(0, 0, 0, .25); font-weight: 700; }
.cd-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.cd-foot small { display: block; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
.cd-foot span { font-size: 12.5px; letter-spacing: .05em; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.cd-foot .who { min-width: 0; }
.cd-net { font-weight: 900; font-style: italic; font-size: 24px; letter-spacing: -.01em; line-height: 1; font-family: Arial Black, Arial, sans-serif; white-space: nowrap; }
.cd-net.mc { display: inline-flex; align-items: center; font-style: normal; flex-direction: column; gap: 1px; }
.cd-net.mc .rings { display: inline-flex; }
.cd-net.mc i { width: 28px; height: 28px; border-radius: 50%; display: inline-block; background: #eb001b; }
.cd-net.mc i + i { background: #f79e1b; margin-left: -11px; mix-blend-mode: normal; opacity: .92; }
.cd-net.mc small { font-size: 8px; font-weight: 700; letter-spacing: .02em; font-family: var(--fb); }
.cd-net.local { font-size: 13px; font-style: normal; letter-spacing: .06em; border: 2px solid currentColor; border-radius: 4px; padding: 2px 6px; }
.cd-veil { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 14px; letter-spacing: .04em;
    background: rgba(220, 235, 250, .45); backdrop-filter: blur(2px); color: #08305e; text-transform: uppercase; }
.cd-veil.bad { background: rgba(60, 10, 20, .55); color: #fff; }
.cd-veil.warn { background: rgba(255, 241, 204, .55); color: #5c4106; }
.cd-veil i { font-size: 18px; }

.cd-reveal { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cd-count { font-size: 12px; color: var(--muted); }
.cd-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.cd-actions form { margin: 0; }
.cd-actions .ct-btn { width: 100%; justify-content: center; }
.cd-swatch { display: flex; gap: 12px; align-items: flex-start; }
.cd-swatch .cd-card { flex: 0 0 96px; }
.cd-cats { display: grid; gap: 9px; }
.cd-cat { display: grid; grid-template-columns: 24px 1fr auto; gap: 4px 8px; align-items: center; font-size: 12.5px; }
.cd-cat i { color: var(--blue); }
.cd-cat .ct-meter { grid-column: 2 / 4; }
.cd-toggles { display: grid; gap: 8px; }
.cd-usage { display: grid; gap: 4px; font-size: 12px; }
.cd-usage .row { display: flex; justify-content: space-between; gap: 8px; }
.cd-big { font-size: 22px; font-weight: 700; }
.cd-secret { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cd-secret .ct-code { overflow-wrap: anywhere; word-break: break-all; }
.cd-pre { background: #0b1f3a; color: #d7e7fb; border-radius: 4px; padding: 10px 12px; font: 11.5px/1.5 ui-monospace, 'Courier New', monospace; overflow-x: auto; white-space: pre; margin: 0; }
@media (max-width: 600px) {
    .cd-grid { grid-template-columns: 1fr; }
    .cd-card { padding: 14px 16px; }
}
.cd-api > * { min-width: 0; max-width: 100%; }
.cd-api .ct-code { overflow-wrap: anywhere; }
.cd-card.xs .cd-net.mc i + i { margin-left: -5px; }

/* Bank logo on every card face. */
.cd-logo { display: block; height: 32px; width: auto; max-width: 100%; margin-bottom: 4px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.cd-card.sm .cd-logo { height: 26px; }
.cd-card.xs .cd-logo { height: 12px; margin-bottom: 0; filter: none; }
.cd-card.d-silver .cd-logo, .cd-card.d-gold .cd-logo { filter: none; }
