/* NewForTech accounts: header control, sign-in dialog and the shared form kit (also used on the account page).
   Loaded on every page when accounts are enabled. */
.nft-acct { --nft-ink: #14171c; --nft-lime: #c8ff00; }
.nft-acct--desktop { display: none; }
.nft-acct--mobile { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(15, 23, 32, .1); }
@media (min-width: 64rem) {
	.nft-acct--desktop { display: flex; align-items: center; gap: .5rem; }
	details.nft-acct--desktop { display: block; position: relative; }
	.nft-acct--mobile, .nft-acct--compact { display: none !important; }
}

/* Compact control in the header bar (below 64rem): icon button for visitors, avatar for members. */
.nft-acct__icon {
	display: inline-flex; align-items: center; justify-content: center; gap: .45rem; flex: none; height: 2.5rem; min-width: 2.5rem; padding: 0; border-radius: 999px;
	background: var(--nft-lime); color: #0c1004; text-decoration: none; font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
}
.nft-acct__icon:hover { background: #b6e600; }
.nft-acct__icon:focus-visible { outline: 2px solid var(--nft-ink); outline-offset: 2px; }
.nft-acct__icon-label { display: none; }
@media (min-width: 40rem) {
	.nft-acct__icon { padding: 0 1rem 0 .8rem; }
	.nft-acct__icon-label { display: inline; }
}
a.nft-acct--compact.nft-acct__avatar { text-decoration: none; }
/* Very small phones: give the icon and menu button room. */
@media (max-width: 23.5rem) {
	.site-logo { width: 108px; }
	.search-form .search-field { width: 5.25rem; }
}
@media (max-width: 39.99rem) {
	.site-header .search-form + .nft-acct--compact { margin-left: -.15rem; }
}

.nft-acct__signin, .nft-acct__join {
	display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 .9rem; border-radius: 999px;
	font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
	transition: background .2s, color .2s;
}
.nft-acct__signin { color: rgba(0, 0, 0, .65); }
.nft-acct__signin:hover { color: #5a7800; }
.nft-acct__join { background: var(--nft-lime); color: #0c1004; }
.nft-acct__join:hover { background: #b6e600; }
.nft-acct__avatar {
	display: block; flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%; overflow: hidden; cursor: pointer; list-style: none; line-height: 0;
	box-shadow: 0 0 0 1px rgba(15, 23, 32, .12); transition: box-shadow .2s;
}
.nft-acct__avatar::-webkit-details-marker { display: none; }
.nft-acct__avatar:hover { box-shadow: 0 0 0 2px rgba(15, 23, 32, .3); }
details[open] > .nft-acct__avatar { box-shadow: 0 0 0 2px #14171c; }
/* Monogram avatar (inline SVG from nft_acc_avatar) */
.nft-av { display: block; width: 100%; height: 100%; }
.nft-av text { font-family: "Inter", ui-sans-serif, system-ui, sans-serif; font-weight: 500; letter-spacing: 0; }
.nft-acct__avatar:focus-visible, .nft-acct__item:focus-visible, .nft-acct__signin:focus-visible, .nft-acct__join:focus-visible, .nft-acct__chip:focus-visible { outline: 2px solid var(--nft-ink); outline-offset: 2px; }
.nft-acct__panel {
	position: absolute; right: 0; top: calc(100% + .5rem); z-index: 70; min-width: 15rem; padding: .5rem; border-radius: 1rem;
	background: #fff; box-shadow: 0 0 0 1px rgba(15, 23, 32, .09), 0 18px 40px rgba(15, 23, 32, .18);
}
.nft-acct__who { display: flex; align-items: center; gap: .7rem; margin: 0; padding: .6rem .75rem .7rem; border-bottom: 1px solid rgba(15, 23, 32, .08); }
.nft-acct__who-av { display: block; flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 1px rgba(15, 23, 32, .12); line-height: 0; }
.nft-acct__who-t { display: grid; gap: .1rem; min-width: 0; }
.nft-acct__who-t strong { font-size: .9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 11.5rem; }
.nft-acct__who-t span { font-size: .75rem; color: rgba(20, 23, 28, .6); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 11.5rem; }
.nft-acct__item { display: block; margin-top: .25rem; padding: .65rem .75rem; border-radius: .6rem; font-size: .875rem; font-weight: 600; color: var(--nft-ink); text-decoration: none; }
.nft-acct__item:hover { background: #f0f2f5; }
.nft-acct__chip {
	display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: 0 1.1rem; border-radius: 999px; background: var(--nft-lime); color: #0c1004;
	font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
}
.nft-acct__chip--ghost { background: transparent; box-shadow: inset 0 0 0 1px rgba(15, 23, 32, .2); color: var(--nft-ink); }
.nft-acct__dot { display: block; flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; overflow: hidden; line-height: 0; }

/* Dialog */
html.nft-auth-lock { overflow: hidden; }
dialog.nft-auth { border: 0; padding: 0; margin: auto; background: transparent; color: #14171c; width: min(26rem, calc(100vw - 1.5rem)); max-height: calc(100dvh - 1rem); overflow: visible; }
dialog.nft-auth::backdrop { background: rgba(12, 16, 20, .62); }
dialog.nft-auth[open] { animation: nft-auth-in .22s cubic-bezier(.16, 1, .3, 1); }
@keyframes nft-auth-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.nft-auth__card { position: relative; box-sizing: border-box; background: #fff; border-radius: 1.25rem; padding: 1.25rem 1.25rem 1.4rem; max-height: calc(100dvh - 1rem); overflow: auto; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); color: #14171c; }
.nft-auth__card *, .nft-auth__card *::before, .nft-auth__card *::after { box-sizing: border-box; }
.nft-auth--inline .nft-auth__card { box-shadow: 0 0 0 1px rgba(15, 23, 32, .09); max-height: none; overflow: visible; }
.nft-auth__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.nft-auth__close { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; margin: -.4rem -.5rem -.4rem 0; border: 0; border-radius: 50%; background: transparent; color: rgba(20, 23, 28, .6); cursor: pointer; }
.nft-auth__close:hover { background: #f0f2f5; color: #14171c; }

/* Plate headings (same look as "Trending topics") */
.nft-auth__title, .nft-box-title, .nft-account__h1 { --nft-plate-fs: 1.45rem; display: flex; align-items: center; gap: .75rem; margin: 0; font-size: 1rem; line-height: 1; min-width: 0; }
.nft-auth__title { flex: 1; }
.nft-auth__title::after, .nft-box-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(15, 23, 32, .28), transparent); }
.nft-auth__title > span, .nft-box-title > span, .nft-account__h1 > span {
	position: relative; z-index: 0; display: inline-block; padding: .3rem .8rem .22rem; max-width: 100%; color: #10151b;
	font-family: "Teko", ui-sans-serif, system-ui, sans-serif; font-size: var(--nft-plate-fs); font-weight: 700; line-height: 1; letter-spacing: .05em; text-transform: uppercase; overflow-wrap: anywhere;
}
.nft-auth__title > span::before, .nft-box-title > span::before, .nft-account__h1 > span::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: .35rem; background: #c8ff00; transform: skewX(-5deg); }

.nft-auth__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; padding: .25rem; margin-bottom: 1.1rem; border-radius: 999px; background: #f0f2f5; }
.nft-auth__tabs[hidden] { display: none; }
.nft-auth__tab { min-height: 2.5rem; border: 0; border-radius: 999px; background: transparent; color: rgba(20, 23, 28, .7); font: inherit; font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; transition: background .2s, color .2s; }
.nft-auth__tab[aria-pressed="true"] { background: #14171c; color: #c8ff00; }
.nft-auth__tab:focus-visible { outline: 2px solid #14171c; outline-offset: 2px; }
.nft-auth__panel[hidden] { display: none; }
.nft-auth__lead { margin: 0 0 1rem; font-size: .9375rem; line-height: 1.5; color: rgba(20, 23, 28, .75); }
.nft-auth__lead:focus { outline: none; }
.nft-auth__fine { margin: .9rem 0 0; font-size: .75rem; line-height: 1.5; color: rgba(20, 23, 28, .6); }
.nft-auth__fine a { color: inherit; }
.nft-auth__row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin: .1rem 0 1rem; }
.nft-auth__back, .nft-auth__resend { display: block; margin: .75rem auto 0; }
.nft-auth__ts { margin: 0 0 .9rem; }
.nft-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.nft-auth__msg { margin: 0 0 .9rem; padding: .65rem .85rem; border-radius: .6rem; background: #fdecea; color: #8a1c12; font-size: .875rem; line-height: 1.45; }
.nft-auth__msg[hidden] { display: none; }

/* Form kit */
.nft-field { margin: 0 0 .9rem; }
.nft-field__label { display: block; margin: 0 0 .35rem; font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: rgba(20, 23, 28, .7); }
.nft-field__wrap { position: relative; }
.nft-field__input {
	display: block; width: 100%; min-height: 2.9rem; padding: 0 .9rem; border: 1px solid rgba(15, 23, 32, .2); border-radius: .75rem;
	background: #fff; color: #14171c; font: inherit; font-size: 1rem; line-height: 1.4; transition: border-color .15s, box-shadow .15s;
}
.nft-field__input:hover { border-color: rgba(15, 23, 32, .4); }
.nft-field__input:focus { outline: none; border-color: #14171c; box-shadow: 0 0 0 3px rgba(200, 255, 0, .6); }
.nft-field__input[type="password"], .nft-field__input[data-pw] { padding-right: 2.9rem; }
.nft-field__wrap:has(.nft-field__eye) .nft-field__input { padding-right: 2.9rem; }
.nft-field__eye { position: absolute; top: 0; right: 0; display: grid; place-items: center; width: 2.9rem; height: 100%; border: 0; border-radius: 0 .75rem .75rem 0; background: transparent; color: rgba(20, 23, 28, .55); cursor: pointer; }
.nft-field__eye:hover, .nft-field__eye[aria-pressed="true"] { color: #14171c; }
.nft-field__eye:focus-visible { outline: 2px solid #14171c; outline-offset: -2px; }
.nft-field__hint { margin: .35rem 0 0; font-size: .75rem; color: rgba(20, 23, 28, .6); }
.nft-field__hint.is-ok { color: #3d6b00; }
.nft-field__hint.is-bad { color: #b42318; }
.nft-field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 .65rem; }
.nft-field-row > .nft-field { min-width: 0; }
.nft-field__wrap--pre .nft-field__input { padding-left: 1.9rem; }
.nft-field__pre { position: absolute; top: 0; left: .9rem; display: flex; align-items: center; height: 100%; font-weight: 700; color: rgba(20, 23, 28, .5); pointer-events: none; }
.nft-field__input[aria-invalid="true"] { border-color: #b42318; }
.nft-field__input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, .25); }
.nft-check { display: inline-flex; align-items: center; gap: .55rem; min-height: 2.75rem; font-size: .875rem; cursor: pointer; }
.nft-check input { width: 1.1rem; height: 1.1rem; accent-color: #5a7800; }
.nft-link { padding: .5rem 0; border: 0; background: none; color: #14171c; font: inherit; font-size: .8125rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.nft-link:hover { color: #5a7800; }
.nft-link[hidden] { display: none; }
.nft-btn {
	display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 3rem; padding: 0 1.25rem; border: 0; border-radius: .75rem;
	background: #c8ff00; color: #0c1004; font: inherit; font-size: .8125rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; cursor: pointer;
	transition: background .2s, transform .2s, opacity .2s;
}
.nft-btn:hover { background: #b6e600; }
.nft-btn:active { transform: translateY(1px); }
.nft-btn:focus-visible { outline: 2px solid #14171c; outline-offset: 2px; }
.nft-btn:disabled { opacity: .6; cursor: progress; }
.nft-btn--ghost { background: transparent; box-shadow: inset 0 0 0 1px rgba(15, 23, 32, .2); color: #14171c; }
.nft-btn--ghost:hover { background: #c8ff00; box-shadow: inset 0 0 0 1px #c8ff00; }
.nft-btn--danger { background: #b42318; color: #fff; }
.nft-btn--danger:hover { background: #8f1b12; }

@media (max-width: 30rem) {
	dialog.nft-auth { width: calc(100vw - 1rem); }
	.nft-auth__card { padding: 1.1rem 1rem 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
	dialog.nft-auth[open] { animation: none; }
	.nft-btn, .nft-auth__tab, .nft-field__input { transition: none; }
}
