/* Nusuk Key Codes – tool components */
:root {
	--nkc-green: #0F5132;
	--nkc-green-2: #0B3D26;
	--nkc-green-soft: #E7F1EC;
	--nkc-gold: #C9A227;
	--nkc-gold-2: #B08A17;
	--nkc-gold-soft: #FBF4DF;
	--nkc-ink: #1F2937;
	--nkc-muted: #5B6472;
	--nkc-line: #E7E2D6;
	--nkc-bg: #FAF7F0;
	--nkc-card: #FFFFFF;
	--nkc-radius: 18px;
	--nkc-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
}
.nkc-i { display: inline-flex; width: 1.1em; height: 1.1em; vertical-align: -0.18em; }
.nkc-i svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.nkc-card { background: var(--nkc-card); border: 1px solid var(--nkc-line); border-radius: var(--nkc-radius); padding: 22px; box-shadow: 0 1px 2px rgba(15, 81, 50, .04); }
.nkc-card h2, .nkc-card h3 { margin: 0 0 6px; font-size: 1.08rem; display: flex; align-items: center; gap: 8px; color: var(--nkc-ink); }
.nkc-small { font-size: .86rem; color: var(--nkc-muted); margin: 6px 0 0; line-height: 1.5; }
.nkc-empty { color: var(--nkc-muted); font-size: .9rem; list-style: none; padding: 14px; text-align: center; background: var(--nkc-bg); border-radius: 12px; }

/* Buttons */
.nkc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 12px 18px; font: inherit; font-weight: 700; font-size: .98rem; cursor: pointer; text-decoration: none !important; transition: transform .08s ease, background .15s ease, box-shadow .15s; line-height: 1.2; }
.nkc-btn:active { transform: scale(.98); }
.nkc-btn:focus-visible, .nkc-link:focus-visible { outline: 3px solid var(--nkc-gold); outline-offset: 2px; }
.nkc-btn-primary { background: var(--nkc-green); color: #fff !important; }
.nkc-btn-primary:hover { background: var(--nkc-green-2); }
.nkc-btn-gold { background: var(--nkc-gold); color: #1b1404 !important; }
.nkc-btn-gold:hover { background: #d8b23a; }
.nkc-btn-light { background: #fff; color: var(--nkc-green) !important; }
.nkc-btn-ghost { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.nkc-btn-ghost:hover { background: rgba(255,255,255,.16); }
.nkc-btn-ghost.is-done { background: var(--nkc-gold); color: #1b1404; border-color: var(--nkc-gold); }
.nkc-btn-ghost-dark { background: transparent; color: var(--nkc-green) !important; border: 1.5px solid var(--nkc-green); }
.nkc-btn-soft { background: var(--nkc-green-soft); color: var(--nkc-green) !important; }
.nkc-btn-soft.is-done { background: var(--nkc-gold); color: #1b1404 !important; }
.nkc-btn-block { width: 100%; }
.nkc-btn-sm { padding: 8px 12px; font-size: .86rem; border-radius: 10px; }
.nkc-btn[disabled] { opacity: .6; cursor: wait; }
.nkc-link { background: none; border: 0; padding: 4px 2px; font: inherit; font-size: .9rem; color: var(--nkc-green); font-weight: 600; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; text-decoration: underline; text-underline-offset: 3px; }

/* Stats */
.nkc-stats { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--nkc-card); border: 1px solid var(--nkc-line); border-radius: var(--nkc-radius); overflow: hidden; box-shadow: 0 10px 30px rgba(15, 81, 50, .10); }
.nkc-stat { padding: 16px 18px; border-left: 1px solid var(--nkc-line); display: flex; flex-direction: column; gap: 2px; }
.nkc-stat:first-child { border-left: 0; }
.nkc-stat-n { font-size: 1.6rem; font-weight: 800; color: var(--nkc-ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.nkc-stat-l { font-size: .8rem; color: var(--nkc-muted); }
@media (max-width: 700px) {
	.nkc-stats { grid-template-columns: repeat(2, 1fr); }
	.nkc-stat:nth-child(3) { border-left: 0; }
	.nkc-stat:nth-child(n+3) { border-top: 1px solid var(--nkc-line); }
	.nkc-stat-n { font-size: 1.3rem; }
}

/* Tool layout */
.nkc-tool { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px; align-items: start; margin: 8px 0 24px; }
.nkc-col-main, .nkc-col-side { display: grid; gap: 20px; }
@media (max-width: 900px) { .nkc-tool { grid-template-columns: 1fr; } }

/* Next code card */
.nkc-next { background: radial-gradient(120% 140% at 100% 0%, #1a6a45 0%, var(--nkc-green) 45%, var(--nkc-green-2) 100%); color: #fff; border: 0; padding: 24px; position: relative; overflow: hidden; }
.nkc-next::after { content: ""; position: absolute; right: -40px; top: -40px; width: 200px; height: 200px; background: conic-gradient(from 22.5deg, rgba(201,162,39,.18) 0 12.5%, transparent 0 25%, rgba(201,162,39,.18) 0 37.5%, transparent 0 50%, rgba(201,162,39,.18) 0 62.5%, transparent 0 75%, rgba(201,162,39,.18) 0 87.5%, transparent 0); border-radius: 50%; pointer-events: none; }
.nkc-next-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.nkc-chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.12); padding: 6px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.nkc-chip .nkc-i { color: var(--nkc-gold); }
.nkc-applied { font-size: .85rem; opacity: .85; }
.nkc-applied strong { color: var(--nkc-gold); }
.nkc-code { font-family: var(--nkc-mono); font-size: clamp(2rem, 6vw, 2.9rem); font-weight: 700; letter-spacing: .02em; margin: 18px 0 4px; word-break: break-all; user-select: all; }
.nkc-meta { font-size: .9rem; opacity: .82; min-height: 1.4em; }
.nkc-meta a { color: var(--nkc-gold); }
.nkc-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 18px; }
.nkc-actions .nkc-btn { padding: 15px 20px; font-size: 1.05rem; }
.nkc-next-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.15); flex-wrap: wrap; }
.nkc-next-foot .nkc-link { color: rgba(255,255,255,.85); }
.nkc-limit { background: rgba(255,255,255,.1); border-radius: 14px; padding: 16px; margin: 14px 0 0; line-height: 1.6; }
.nkc-limit .nkc-btn { margin: 10px 8px 0 0; }
.nkc-link-light { color: #fff; text-decoration: underline; }

/* Help */
.nkc-help summary { cursor: pointer; font-weight: 600; list-style: none; display: block; position: relative; padding-right: 28px; }
.nkc-help summary::after { content: "+"; font-size: 1.3rem; color: var(--nkc-green); position: absolute; right: 0; top: -4px; }
.nkc-help[open] summary::after { content: "–"; }
.nkc-help summary::-webkit-details-marker { display: none; }
.nkc-help ol { margin: 14px 0 0 1.2em; padding: 0; display: grid; gap: 8px; }

/* Copied today */
.nkc-copied ul, .nkc-feed ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.nkc-copied li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; background: var(--nkc-bg); border-radius: 10px; }
.nkc-copied code, .nkc-feed code, .nkc-list code { font-family: var(--nkc-mono); font-weight: 700; color: var(--nkc-ink); background: none; padding: 0; }
.nkc-reported { font-size: .8rem; color: var(--nkc-muted); }

/* Share form */
.nkc-share label { display: block; font-size: .85rem; font-weight: 600; margin: 14px 0 6px; color: var(--nkc-ink); }
.nkc-share label span { font-weight: 400; color: var(--nkc-muted); }
.nkc-share input[type=text], .nkc-share select, .nkc-share textarea { width: 100%; box-sizing: border-box; border: 1.5px solid var(--nkc-line); border-radius: 12px; padding: 12px 14px; font: inherit; font-size: 1rem; background: #fff; color: var(--nkc-ink); }
.nkc-share input[name=text], .nkc-share textarea { font-family: var(--nkc-mono); }
.nkc-share input:focus, .nkc-share select:focus, .nkc-share textarea:focus { outline: none; border-color: var(--nkc-green); box-shadow: 0 0 0 3px rgba(15,81,50,.12); }
.nkc-paste-row { display: flex; gap: 8px; }
.nkc-paste-row input { flex: 1; min-width: 0; }
.nkc-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .nkc-row2 { grid-template-columns: 1fr; } }
.nkc-share .nkc-btn-block { margin-top: 16px; padding: 14px; }
.nkc-hp { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); opacity: 0; pointer-events: none; }
.nkc-msg { font-size: .9rem; margin: 10px 0 0; min-height: 0; }
.nkc-msg.is-ok { color: var(--nkc-green); background: var(--nkc-green-soft); padding: 10px 12px; border-radius: 10px; }
.nkc-msg.is-err { color: #9b1c1c; background: #fdecec; padding: 10px 12px; border-radius: 10px; }

/* Feed */
.nkc-feed h2, .nkc-feed h3 { gap: 10px; }
.nkc-dot { width: 9px; height: 9px; border-radius: 50%; background: #22a45d; box-shadow: 0 0 0 0 rgba(34,164,93,.6); animation: nkc-pulse 1.8s infinite; }
@keyframes nkc-pulse { 70% { box-shadow: 0 0 0 8px rgba(34,164,93,0); } 100% { box-shadow: 0 0 0 0 rgba(34,164,93,0); } }
.nkc-feed li { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--nkc-green-soft); border-radius: 10px; }
.nkc-feed li span { font-size: .8rem; color: var(--nkc-muted); }
.nkc-feed li.nkc-empty { background: var(--nkc-bg); }

/* Codes list */
.nkc-list-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.nkc-list-bar label { font-weight: 600; font-size: .9rem; }
.nkc-list-bar select { border: 1.5px solid var(--nkc-line); border-radius: 10px; padding: 9px 12px; font: inherit; background: #fff; }
.nkc-list-items { list-style: none; margin: 0 0 14px; padding: 0; border: 1px solid var(--nkc-line); border-radius: var(--nkc-radius); background: #fff; overflow: hidden; }
.nkc-list-items > li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--nkc-line); }
.nkc-list-items > li:first-child { border-top: 0; }
.nkc-list-items > li.is-used { opacity: .5; }
.nkc-list-items small { display: block; color: var(--nkc-muted); font-size: .8rem; margin-top: 2px; }
.nkc-list-items code { font-size: 1.05rem; }
.nkc-row-actions { display: flex; gap: 6px; flex-shrink: 0; }
.nkc-list-items > li.nkc-empty { display: block; border: 0; margin: 10px; }

/* FAQ */
.nkc-faq { display: grid; gap: 10px; margin: 16px 0 28px; }
.nkc-faq details { background: #fff; border: 1px solid var(--nkc-line); border-radius: 14px; padding: 0 18px; }
.nkc-faq summary { cursor: pointer; padding: 16px 28px 16px 0; font-weight: 700; position: relative; list-style: none; color: var(--nkc-ink); }
.nkc-faq summary::-webkit-details-marker { display: none; }
.nkc-faq summary::after { content: "+"; position: absolute; right: 0; top: 12px; font-size: 1.4rem; color: var(--nkc-green); font-weight: 400; }
.nkc-faq details[open] summary::after { content: "–"; }
.nkc-faq details > div { padding: 0 0 16px; color: #374151; }
.nkc-faq details > div p { margin: 0; }

/* CTA, safety, steps */
.nkc-cta { background: var(--nkc-gold-soft); border: 1px solid #efe0b0; border-radius: var(--nkc-radius); padding: 22px; margin: 28px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.nkc-cta p { flex: 1 1 260px; margin: 0; font-weight: 700; font-size: 1.05rem; color: var(--nkc-ink); }
.nkc-safety { background: #FFF8EC; border: 1px solid #F3E2BD; border-radius: var(--nkc-radius); padding: 20px 22px; margin: 24px 0; }
.nkc-safety h3 { margin: 0 0 10px; display: flex; gap: 8px; align-items: center; font-size: 1.05rem; }
.nkc-safety h3 .nkc-i { color: var(--nkc-green); }
.nkc-safety ul { margin: 0; padding-left: 1.2em; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 28px; }
@media (max-width: 700px) { .nkc-safety ul { grid-template-columns: 1fr; } }
.nkc-steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 0; margin: 16px 0 24px; }
.nkc-steps li { counter-increment: s; background: #fff; border: 1px solid var(--nkc-line); border-radius: var(--nkc-radius); padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.nkc-steps li::before { content: counter(s); width: 34px; height: 34px; border-radius: 10px; background: var(--nkc-green); color: #fff; font-weight: 800; display: grid; place-items: center; margin-bottom: 6px; }
.nkc-steps span { color: var(--nkc-muted); font-size: .92rem; }
@media (max-width: 700px) { .nkc-steps { grid-template-columns: 1fr; } }

/* ---------- RTL + language fonts ---------- */
.nkc-code, .nkc-copied code, .nkc-feed code, .nkc-list code, .nkc-share input[name=text], .nkc-share textarea[name=text] { direction: ltr; unicode-bidi: isolate; }
.nkc-code.is-text { font-family: inherit; direction: inherit; font-size: clamp(1.6rem, 5vw, 2.2rem); }
[dir=rtl] .nkc-share input[name=text], [dir=rtl] .nkc-share textarea[name=text] { text-align: right; }
[dir=rtl] .nkc-next::after { right: auto; left: -40px; }
[dir=rtl] .nkc-help summary { padding-right: 0; padding-left: 28px; }
[dir=rtl] .nkc-help summary::after { right: auto; left: 0; }
[dir=rtl] .nkc-help ol { margin: 14px 1.2em 0 0; }
[dir=rtl] .nkc-faq summary { padding: 16px 0 16px 28px; }
[dir=rtl] .nkc-faq summary::after { right: auto; left: 0; }
[dir=rtl] .nkc-safety ul { padding-left: 0; padding-right: 1.2em; }
[dir=rtl] .nkc-stat { border-left: 0; border-right: 1px solid var(--nkc-line); }
[dir=rtl] .nkc-stat:first-child { border-right: 0; }
@media (max-width: 700px) { [dir=rtl] .nkc-stat:nth-child(3) { border-right: 0; } }
[dir=rtl] .nkc-i svg { transform: none; }
[dir=rtl] .nkc-btn .nkc-i, [dir=rtl] .nkc-link .nkc-i { order: 0; }
.lang-ur .nkc-btn, .lang-ur .nkc-card h2, .lang-ur .nkc-card h3, .lang-ur .nkc-faq summary { line-height: 1.9; }
.lang-ur .nkc-small, .lang-ur .nkc-meta, .lang-ur .nkc-stat-l { line-height: 2; }
