/* Key exchange page (/keys/). Tokens follow site.css: ink #0B0B0C, purple #7B68EE / #5B49D6, soft #F4F4F5.
   Selectors start with .nhh-keys so they beat the theme's default input/button styles. */
.nhh-keys-band { background: radial-gradient(900px 480px at 88% 0%, rgba(123, 104, 238, 0.13), transparent 70%), radial-gradient(600px 360px at 0% 100%, rgba(236, 72, 153, 0.06), transparent 70%), #FFFFFF; }

/* Steps: numbered rail */
.nhh-keys-steps { position: relative; display: grid; gap: 22px; margin: 0; padding: 0; list-style: none; }
.nhh-keys-steps::before { content: ""; position: absolute; top: 18px; bottom: 18px; inset-inline-start: 17px; width: 1px; background: linear-gradient(#D9D4FB, #ECECEE); }
.nhh-keys-steps li { position: relative; display: flex; gap: 16px; font-size: 15px; line-height: 1.6; color: #52525B; }
.nhh-keys-n { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #E4E4E7; border-radius: 50%; background: #FFFFFF; font-size: 12px; color: #5B49D6; }
.nhh-keys-t { display: block; margin: 6px 0 2px; font-size: 16px; font-weight: 700; color: #0B0B0C; }
.nhh-keys-steps b { color: #0B0B0C; font-weight: 700; }

/* Card */
.nhh-keys {
	position: relative;
	padding: clamp(22px, 3vw, 32px);
	border: 1px solid #ECECEE;
	border-radius: 28px;
	background: #FFFFFF;
	box-shadow: 0 1px 2px rgba(11, 11, 12, 0.04), 0 30px 70px -30px rgba(91, 73, 214, 0.35);
}
.nhh-keys::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; background: linear-gradient(135deg, rgba(123, 104, 238, 0.45), rgba(236, 72, 153, 0.25) 50%, transparent 80%); filter: blur(18px); opacity: 0.35; }
.nhh-keys-card-head { display: flex; align-items: center; gap: 14px; }
.nhh-keys-badge { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: linear-gradient(135deg, #7B68EE, #5B49D6); color: #FFFFFF; box-shadow: 0 10px 24px -10px rgba(91, 73, 214, 0.7); }
.nhh-keys-card-title { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; color: #0B0B0C; }
.nhh-keys-card-sub { margin: 0; font-size: 14px; color: #71717A; }

/* Code input */
.nhh-keys .nhh-keys-form { margin-top: 24px; }
.nhh-keys .nhh-keys-form label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: #0B0B0C; }
.nhh-keys .nhh-keys-row { display: flex; align-items: center; gap: 8px; padding-block: 6px; padding-inline: 16px 6px; border: 1.5px solid #E4E4E7; border-radius: 999px; background: #FFFFFF; transition: border-color 0.2s, box-shadow 0.2s; }
.nhh-keys .nhh-keys-row:focus-within { border-color: #7B68EE; box-shadow: 0 0 0 4px rgba(123, 104, 238, 0.16); }
.nhh-keys .nhh-keys-ic { display: flex; color: #5B49D6; }
.nhh-keys input[type="text"] { flex: 1; min-width: 0; height: auto; margin: 0; padding: 10px 4px; border: 0; border-radius: 0; outline: 0; box-shadow: none; background: none; font: 600 18px/1.3 'Geist Mono', ui-monospace, monospace; letter-spacing: 0.02em; color: #0B0B0C; }
.nhh-keys input[type="text"]::placeholder { color: #B4B4BB; font-weight: 500; }

.nhh-keys button { margin: 0; border: 0; box-shadow: none; text-transform: none; cursor: pointer; }
.nhh-keys button.nhh-keys-go,
.nhh-keys button.nhh-keys-next { position: relative; overflow: hidden; isolation: isolate; flex: none; padding: 13px 24px; border-radius: 999px; background: #0B0B0C; color: #FFFFFF; font: 700 15px/1.3 'Plus Jakarta Sans', sans-serif; }
.nhh-keys button.nhh-keys-go::before,
.nhh-keys button.nhh-keys-next::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #7B68EE; transform: translateX(-101%); transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }
.nhh-keys button.nhh-keys-go:hover,
.nhh-keys button.nhh-keys-next:hover { background: #0B0B0C; color: #FFFFFF; }
.nhh-keys button.nhh-keys-go:hover::before,
.nhh-keys button.nhh-keys-next:hover::before { transform: none; }
.nhh-keys button:focus-visible { outline: 2px solid #5B49D6; outline-offset: 3px; }
.nhh-keys button.is-busy { opacity: 0.6; cursor: progress; }
.nhh-keys .nhh-keys-hint { margin: 10px 0 0; margin-inline-start: 4px; font-size: 13px; color: #71717A; }
.nhh-keys .nhh-keys-hint.is-error { color: #B42318; }

/* Results */
.nhh-keys-out { margin-top: 24px; padding-top: 22px; border-top: 1px solid #F1F1F3; scroll-margin-top: 96px; }
.nhh-keys-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.nhh-keys-mine { margin: 0; font-size: 14px; color: #3F3F46; }
.nhh-keys-mine code { padding: 2px 8px; border-radius: 8px; background: rgba(123, 104, 238, 0.1); color: #5B49D6; font: 600 13px 'Geist Mono', ui-monospace, monospace; }
.nhh-keys-count { margin: 0; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #71717A; }
.nhh-keys-list { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.nhh-keys-list li { display: flex; align-items: center; gap: 8px; padding-block: 8px; padding-inline: 16px 8px; border: 1px solid #ECECEE; border-radius: 16px; background: #FFFFFF; transition: border-color 0.2s, background 0.2s; }
.nhh-keys-list li:hover { border-color: #D9D4FB; }
.nhh-keys-list code { flex: 1; min-width: 0; padding: 0; background: none; font: 600 17px/1.3 'Geist Mono', ui-monospace, monospace; letter-spacing: 0.02em; color: #0B0B0C; }
.nhh-keys button.nhh-keys-copy { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; background: #F4F4F5; color: #0B0B0C; font: 600 14px/1.2 'Plus Jakarta Sans', sans-serif; transition: background 0.2s, color 0.2s; }
.nhh-keys button.nhh-keys-copy:hover { background: #0B0B0C; color: #FFFFFF; }
.nhh-keys button.nhh-keys-copy.is-copied { background: rgba(123, 104, 238, 0.12); color: #5B49D6; }
.nhh-keys button.nhh-keys-bad { padding: 6px 4px; background: none; color: #A1A1AA; font: 500 12px/1.2 'Plus Jakarta Sans', sans-serif; }
.nhh-keys button.nhh-keys-bad:hover { background: none; color: #B42318; }
.nhh-keys-list li.is-used { background: #FAFAFB; }
.nhh-keys-list li.is-bad { opacity: 0.45; }
.nhh-keys-list li.is-bad code { text-decoration: line-through; }
.nhh-keys-more { margin-top: 16px; }
.nhh-keys-more p { margin: 0; font-size: 14px; color: #52525B; }
.nhh-keys button.nhh-keys-next { width: 100%; }
.nhh-keys-note { max-width: 720px; }

@media (max-width: 767px) {
	.nhh-keys .nhh-keys-row { flex-wrap: wrap; padding: 6px; border-radius: 20px; }
	.nhh-keys .nhh-keys-ic { padding-inline-start: 10px; }
	.nhh-keys button.nhh-keys-go { width: 100%; }
	.nhh-keys-list code { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.nhh-keys button.nhh-keys-go::before,
	.nhh-keys button.nhh-keys-next::before { transition: none; }
}

/* Heading: "Swap keys." and "Play more." on their own lines */
.nhh-keys-left h1 span { display: block; }
