/* The Pro card on the account page (pro-card.js): a physical card you can spin. */
.pc { display: grid; justify-items: center; gap: 14px; }
.pc[hidden] { display: none !important; }
.pc-scene { position: relative; width: min(100%, 440px); height: 660px; perspective: 1400px; touch-action: pan-y; }
.pc-float { width: 100%; height: 100%; animation: pc-float 7s ease-in-out infinite; }
.pc-card { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; cursor: grab; outline: none; will-change: transform;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.pc-card.is-dragging { cursor: grabbing; }
.pc-card:focus-visible { outline: 1.5px solid var(--line-2); outline-offset: 10px; border-radius: 4px; }

/* The edge: thin slices of card stacked in depth so the side shows when it turns. */
.pc-slice { position: absolute; inset: 0; border-radius: 2px; background: #0c0c0c; }
.pc-slice:nth-child(1) { transform: translateZ(-6px); }
.pc-slice:nth-child(2) { transform: translateZ(-3px); }
.pc-slice:nth-child(3) { transform: translateZ(3px); }
.pc-slice:nth-child(4) { transform: translateZ(6px); }

.pc-face { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 26px 28px; border-radius: 2px;
  transform-style: preserve-3d; backface-visibility: hidden; -webkit-backface-visibility: hidden; color: var(--text); user-select: none; }
.pc-face > * { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.pc-front { transform: translateZ(8px); }
.pc-back { transform: rotateY(180deg) translateZ(8px); }

.pc-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; border-radius: 2px; border: 1px solid rgba(220, 228, 255, 0.2);
  background: #000;
  }

.pc-rim { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* The travelling edge light is switched off for now; delete this line to bring it back. */
.pc-rim { display: none; }
/* Four lit patches of different length and weight travel round the edge; the gaps between them stay dark. */
.pc-rim rect { animation: pc-run linear infinite; }
.pc-rim .r1 { stroke-width: 18; stroke-dasharray: 260 740; animation-duration: 22s; }
.pc-rim .r2 { stroke-width: 30; stroke-dasharray: 110 890; animation-duration: 14s; animation-direction: reverse; }
.pc-rim .r3 { stroke-width: 12; stroke-dasharray: 190 810; animation-duration: 30s; animation-delay: -11s; }
.pc-rim .r4 { stroke-width: 22; stroke-dasharray: 70 930; animation-duration: 18s; animation-delay: -7s; animation-direction: reverse; }
@keyframes pc-run { to { stroke-dashoffset: -1000; } }
.pc-face > :not(.pc-bg) { position: relative; z-index: 1; }

/* Front: 60% art with PRO and the edge light, 40% facts on a second colour. */
.pc-front { padding: 0; border: 1px solid rgba(220, 228, 255, 0.2); background: #000; }
.pc-art { position: relative; z-index: 1; flex: 0 0 60%; display: flex; flex-direction: column; padding: 26px 28px 0; overflow: hidden; background: #000; }
.pc-art > .pc-bg { border: 0; }
.pc-art > :not(.pc-bg) { position: relative; z-index: 1; }
.pc-info { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 18px 28px 20px; background: #170b05; border-top: 1px solid rgba(232, 104, 31, 0.7); position: relative; z-index: 2; }
.pc-info-label { font: 11px ui-monospace, "Geist Mono", monospace; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 214, 180, 0.6); }
.pc-plan { margin: 8px 0 0; font: 400 36px/1 "Krayton Title", Georgia, "Times New Roman", serif; color: #f6e9dc; }
.pc-plan span { font: 500 13px Inter, system-ui, sans-serif; letter-spacing: 0; color: rgba(255, 214, 180, 0.6); margin-left: 6px; }
.pc-facts { margin: 12px 0 0; }
.pc-facts div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-top: 1px solid rgba(255, 190, 130, 0.14); font-size: 13.5px; }
.pc-facts dt { color: rgba(255, 214, 180, 0.6); }
.pc-facts dd { margin: 0; font-weight: 500; color: #f6e9dc; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.pc-brand { display: inline-flex; align-items: center; gap: 9px; font: 11px ui-monospace, "Geist Mono", monospace; letter-spacing: 0.14em; text-transform: uppercase; color: var(--body); }
.pc-state { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border: 1px solid rgba(220, 228, 255, 0.22); border-radius: 2px; font: 11px ui-monospace, "Geist Mono", monospace; letter-spacing: 0.08em; text-transform: uppercase; color: var(--body); background: rgba(0, 0, 0, 0.25); }
.pc-state::before { content: ""; width: 6px; height: 6px; border-radius: 0; background: var(--ok); box-shadow: 0 0 10px var(--ok); }

/* PRO is a halftone of dots drawn by pro-card-dither.js, in the same plane as the card. */
@font-face { font-family: "Krayton Title"; src: url("/pro-card-title.woff2") format("woff2"); font-display: swap; }

.pc-word { flex: 1; position: relative; margin: 0 -10px; }
.pc-dither { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pc-word svg { width: 100%; height: auto; overflow: visible; }
.pc-word text { font: 700 200px Inter, system-ui, sans-serif; letter-spacing: -11px; }

.pc-bottom { display: flex; justify-content: space-between; gap: 18px; align-items: end; }
.pc-bottom > div { min-width: 0; }
.pc-bottom small { display: block; font: 11px ui-monospace, "Geist Mono", monospace; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.pc-bottom strong { display: block; font-weight: 500; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-bottom > div:last-child { text-align: right; }

/* Back: the facts about the plan, on the same card. */
.pc-back .line { font-size: 14px; padding: 11px 0; }
.pc-devices { margin-bottom: 8px; }
.pc-devices .line { padding: 8px 0; align-items: center; }
.pc-devices .button { height: 32px; padding: 0 14px; font-size: 13px; }
.pc-back .fine { margin: auto 0 0; padding-top: 10px; }

.pc-shadow { position: absolute; left: 12%; right: 12%; bottom: -34px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, 0.7); filter: blur(22px);
  transform: scaleX(var(--shadow, 1)); opacity: 0.8; pointer-events: none; }
.pc-hint { margin: 0; text-align: center; }
.pc-flip { min-width: 160px; }

/* Arrival: it drops in and settles. */
.pc.is-entering .pc-scene { animation: pc-drop 0.9s cubic-bezier(0.2, 0.9, 0.25, 1) both; }
@keyframes pc-drop { from { opacity: 0; transform: translateY(26px) scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes pc-float { 50% { transform: translateY(-7px); } }

@media (max-width: 760px) { .pc-scene { height: 640px; } }
@media (prefers-reduced-motion: reduce) {
  .pc-float, .pc.is-entering .pc-scene, .pc-rim rect { animation: none; }
}
.grid:has(.pc:not([hidden])) { align-items: start; }
