/* NexGen Rank Tools */
.ngrt {
	--t-blue: var(--ngr-blue, #2459C2);
	--t-ink: var(--ngr-ink, #0B1F45);
	--t-text: var(--ngr-text, #33415C);
	--t-muted: #55637F;
	--t-line: var(--ngr-line, #D9E2F0);
	--t-mist: #F3F7FD;
	--t-amber: var(--ngr-amber, #FFB547);
	--t-navy: var(--ngr-navy, #0F2A5C);
	--t-r: 16px;
	background: #fff;
	border: 1px solid var(--t-line);
	border-radius: 24px;
	box-shadow: 0 24px 60px -30px rgba(15, 42, 92, .35);
	padding: 28px;
	color: var(--t-text);
	font-size: 1rem;
	line-height: 1.5;
	text-align: left;
}
.ngrt *, .ngrt *::before, .ngrt *::after { box-sizing: border-box; }
.ngrt-sr, .ngrt .screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ngrt [hidden] { display: none !important; }

/* Tabs */
.ngrt-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px; background: var(--t-mist); border-radius: 999px; margin: 0 0 24px; }
.ngrt .ngrt-tab { flex: 1 1 220px; border: 0; background: transparent; color: var(--t-ink); font: inherit; font-weight: 700; padding: 12px 18px; border-radius: 999px; cursor: pointer; min-height: 48px; }
.ngrt .ngrt-tab[aria-selected="true"] { background: var(--t-blue); color: #fff; box-shadow: 0 6px 16px -8px rgba(36, 89, 194, .8); }
.ngrt .ngrt-tab:focus-visible, .ngrt :focus-visible { outline: 3px solid var(--t-amber); outline-offset: 2px; }

/* Fields */
.ngrt-intro { margin: 0 0 16px; color: var(--t-muted); }
.ngrt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px 18px; }
.ngrt-field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }
.ngrt-grid .ngrt-field { margin: 0; }
.ngrt-field--wide { grid-column: 1 / -1; }
.ngrt label { font-weight: 700; color: var(--t-ink); font-size: .95rem; }
.ngrt input[type="text"], .ngrt input[type="url"], .ngrt input[type="tel"], .ngrt input[type="email"], .ngrt select, .ngrt textarea {
	width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; font-size: 1.05rem; color: var(--t-ink);
	background: #fff; border: 1.5px solid #B8C6DC; border-radius: 12px; box-shadow: none;
}
.ngrt textarea { min-height: 80px; resize: vertical; line-height: 1.45; }
.ngrt input:focus, .ngrt select:focus, .ngrt textarea:focus { border-color: var(--t-blue); box-shadow: 0 0 0 3px rgba(36, 89, 194, .18); outline: none; }
.ngrt input[type="color"] { width: 100%; height: 48px; padding: 4px; border: 1.5px solid #B8C6DC; border-radius: 12px; background: #fff; cursor: pointer; }
.ngrt input[type="file"] { font-size: .9rem; }
.ngrt-join { display: flex; align-items: stretch; }
.ngrt-join input { border-radius: 0 !important; flex: 1 1 auto; min-width: 0; }
.ngrt-join > :first-child { border-top-left-radius: 12px !important; border-bottom-left-radius: 12px !important; }
.ngrt-join > :last-child { border-top-right-radius: 12px !important; border-bottom-right-radius: 12px !important; }
.ngrt-join select { flex: 0 0 auto; width: auto; border-left: 0; background-color: var(--t-mist); font-weight: 600; }
.ngrt-prefix, .ngrt-suffix { display: inline-flex; align-items: center; padding: 0 14px; background: var(--t-mist); border: 1.5px solid #B8C6DC; color: var(--t-ink); font-weight: 700; }
.ngrt-prefix { border-right: 0; border-radius: 12px 0 0 12px; }
.ngrt-suffix { border-left: 0; border-radius: 0 12px 12px 0; }
.ngrt-help { margin: 0; font-size: .88rem; color: var(--t-muted); }
.ngrt .ngrt-help a, .ngrt .ngrt-note a { color: var(--t-blue); text-decoration: underline; text-underline-offset: 2px; }
.ngrt .ngrt-check { display: flex; flex-direction: row; align-items: center; gap: 10px; margin: 16px 0 0; }
.ngrt-check input { width: 22px; height: 22px; accent-color: var(--t-blue); flex: none; }
.ngrt-check label { font-weight: 600; }
.ngrt .ngrt-check--inline { margin: 0; align-self: end; min-height: 48px; }

/* Results */
.ngrt-result { margin: 24px 0 0; padding: 22px 24px; background: linear-gradient(135deg, #0F2A5C, #1B4FA8); border-radius: 20px; color: #E6EDF8; }
.ngrt-result__label { margin: 0; font-weight: 700; color: #C9D5EC; text-transform: uppercase; letter-spacing: .06em; font-size: .82rem; }
.ngrt-result__big { margin: 4px 0 14px; font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 800; color: #fff; line-height: 1.1; }
.ngrt .ngrt-table { width: 100%; border-collapse: collapse; margin: 0; font-size: 1rem; border: 0 !important; background: none; }
.ngrt .ngrt-table tr, .ngrt .ngrt-table tbody, .ngrt .ngrt-table thead { border: 0 !important; background: none !important; }
.ngrt .ngrt-table th, .ngrt .ngrt-table td { padding: 10px 0; border: 0 !important; border-bottom: 1px solid rgba(255, 255, 255, .14) !important; text-align: left; font-weight: 500; color: #E6EDF8; background: none; }
.ngrt .ngrt-table td { text-align: right; font-weight: 800; color: #fff; white-space: nowrap; padding-left: 12px; }
.ngrt .ngrt-table tr:last-child th, .ngrt .ngrt-table tr:last-child td { border-bottom: 0 !important; }
.ngrt-small { margin: 12px 0 0; font-size: .86rem; color: #C9D5EC; }
.ngrt-note { margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; background: #FFF4DE; color: #6B4A00; font-weight: 600; font-size: .92rem; }
.ngrt-link { margin: 6px 0 12px; padding: 12px 14px; background: rgba(255, 255, 255, .1); border-radius: 12px; color: #fff; font-weight: 700; word-break: break-all; font-size: .95rem; }

/* More (details) */
.ngrt-more { margin: 20px 0 0; border: 1px solid var(--t-line); border-radius: var(--t-r); background: #fff; }
.ngrt-more summary { cursor: pointer; padding: 14px 18px; font-weight: 700; color: var(--t-ink); }
.ngrt-more[open] summary { border-bottom: 1px solid var(--t-line); }
.ngrt-more > :not(summary) { padding: 16px 18px; }
.ngrt .ngrt-table--chart th, .ngrt .ngrt-table--chart td { color: var(--t-ink); border-bottom-color: var(--t-line) !important; text-align: left; padding: 8px 6px; }
.ngrt-table--chart thead th { font-weight: 800; }

/* Buttons */
.ngrt-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; }
.ngrt .ngrt-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 20px; border-radius: 999px; border: 2px solid var(--t-blue); background: var(--t-blue); color: #fff; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; line-height: 1.2; }
.ngrt .ngrt-btn:hover { background: var(--t-navy); border-color: var(--t-navy); color: #fff; }
.ngrt .ngrt-btn--ghost { background: #fff; color: var(--t-blue); }
.ngrt .ngrt-btn--ghost:hover { background: var(--t-mist); color: var(--t-navy); }
.ngrt .ngrt-btn:disabled, .ngrt .ngrt-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.ngrt-result .ngrt-btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }

/* QR */
.ngrt-types { border: 0; margin: 0 0 20px; padding: 0; }
.ngrt-types legend { font-weight: 800; color: var(--t-ink); margin: 0 0 10px; padding: 0; }
.ngrt-types__list { display: flex; flex-wrap: wrap; gap: 8px; }
.ngrt-types__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ngrt .ngrt-types__label { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1.5px solid var(--t-line); border-radius: 999px; cursor: pointer; font-weight: 700; background: #fff; }
.ngrt-types__input:checked + .ngrt-types__label { background: var(--t-blue); border-color: var(--t-blue); color: #fff; }
.ngrt-types__input:focus-visible + .ngrt-types__label { outline: 3px solid var(--t-amber); outline-offset: 2px; }
.ngrt-qr__cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, .9fr); gap: 28px; align-items: start; }
.ngrt-qr__preview { position: sticky; top: 100px; background: var(--t-mist); border-radius: 20px; padding: 20px; }
.ngrt-qr__box { background: #fff; border-radius: 16px; padding: 14px; text-align: center; border: 1px solid var(--t-line); }
.ngrt-qr__canvas { width: 100%; max-width: 280px; height: auto; aspect-ratio: 1 / 1; display: block; margin: 0 auto; }
.ngrt-qr__canvas.is-empty { background: repeating-linear-gradient(45deg, #F3F7FD, #F3F7FD 10px, #EAF0FA 10px, #EAF0FA 20px); border-radius: 12px; }
.ngrt-qr__data { margin: 8px 0 0; font-size: .82rem; color: var(--t-muted); word-break: break-all; min-height: 1.2em; }
.ngrt-qr__status { margin: 12px 0 0; font-weight: 600; color: var(--t-ink); font-size: .92rem; }
.ngrt-qr__preview .ngrt-actions .ngrt-btn { flex: 1 1 140px; }
.ngrt-sign { margin: 16px 0 8px; }
.ngrt-msgs { margin: 22px 0 0; }
.ngrt-h3 { font-size: 1.15rem; margin: 0 0 12px; color: var(--t-ink); }
.ngrt-privacy { margin: 18px 0 0; font-size: .85rem; color: var(--t-muted); text-align: center; }

/* Embed box and tools list */
.ngrt-embed { background: #fff; border: 1px solid var(--ngr-line, #D9E2F0); border-radius: 16px; padding: 18px; }
.ngrt-embed__label { display: block; font-weight: 700; margin: 0 0 8px; color: var(--ngr-ink, #0B1F45); }
.ngrt-embed__code { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; padding: 12px; border: 1.5px solid #B8C6DC; border-radius: 12px; margin: 0 0 12px; color: #0B1F45; }
.ngrt-embed .ngrt-btn { display: inline-flex; min-height: 48px; padding: 10px 20px; border-radius: 999px; border: 2px solid #2459C2; background: #fff; color: #2459C2; font-weight: 800; cursor: pointer; font-family: inherit; font-size: 1rem; }
.ngrt-live { display: inline-block; margin-left: 10px; font-weight: 600; color: #1E7A47; }
.ngrt-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.ngrt-list__item { margin: 0; }
.ngrt-list__link { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 22px; background: #fff; border: 1px solid var(--ngr-line, #D9E2F0); border-radius: 18px; text-decoration: none !important; transition: transform .15s ease, box-shadow .15s ease; }
.ngrt-list__link:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -24px rgba(15, 42, 92, .45); }
.ngrt-list__name { font-weight: 800; font-size: 1.15rem; color: var(--ngr-ink, #0B1F45); }
.ngrt-list__text { color: #55637F; font-size: .95rem; }
.ngrt-list__go { margin-top: auto; font-weight: 800; color: var(--ngr-blue, #2459C2); }

@media (max-width: 860px) {
	.ngrt-qr__cols { grid-template-columns: 1fr; }
	.ngrt-qr__preview { position: static; }
}
@media (max-width: 600px) {
	.ngrt { padding: 18px 14px; border-radius: 18px; }
	.ngrt-result { padding: 18px 16px; }
	.ngrt-tabs { border-radius: 18px; }
	.ngrt .ngrt-tab { flex-basis: 100%; }
}

/* Printing a QR sign */
#ngrt-print { display: none; }
@media print {
	body.ngrt-printing > *:not(#ngrt-print) { display: none !important; }
	body.ngrt-printing #ngrt-print { display: block; text-align: center; padding: 30mm 15mm; font-family: system-ui, sans-serif; color: #000; }
	.ngrt-print__title { font-size: 34pt; font-weight: 800; margin: 0 0 12mm; }
	.ngrt-print__qr { width: 120mm; height: 120mm; }
	.ngrt-print__details { font-size: 18pt; font-weight: 700; margin: 10mm 0 0; }
	.ngrt-print__tip { font-size: 13pt; margin: 8mm 0 0; }
}
