/* NinjaSolver Word Tools — scoped styles that sit inside any theme. */
.ns-tool, .ns-contact, .ns-cards, .ns-related, .ns-faq, .ns-crumbs, .ns-chart { --ns-brand: #1e7b34; --ns-brand-d: #17612a; --ns-amber: #fab005; --ns-ink: #1f2328; --ns-mute: #5c636a; --ns-line: #dee2e6; --ns-soft: #f8f9fa; box-sizing: border-box; }
.ns-tool *, .ns-contact * { box-sizing: border-box; }

.ns-crumbs { font-size: .875rem; color: var(--ns-mute); margin: 0 0 1rem; }
.ns-crumbs a { color: inherit; }

.ns-tool { border: 1px solid var(--ns-line); border-top: 6px solid var(--ns-brand); border-radius: 12px; box-shadow: inset 0 3px 0 var(--ns-amber); padding: 1.25rem; margin: 0 0 2rem; background: #fff; color: var(--ns-ink); }
.ns-label { display: block; font-weight: 700; margin-bottom: .5rem; }
.ns-label span { font-weight: 400; color: var(--ns-mute); }
.ns-row { display: flex; gap: .5rem; }
.ns-input { width: 100%; min-height: 48px; padding: .6rem .8rem; font-size: 1.125rem; border: 2px solid var(--ns-line); border-radius: 8px; background: #fff; color: var(--ns-ink); font-family: inherit; }
.ns-tool .ns-row .ns-input { text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.ns-tool .ns-row .ns-input::placeholder { text-transform: none; letter-spacing: normal; font-weight: 400; color: #868e96; }
.ns-actions[hidden] { display: none; }
.ns-input:focus { outline: none; border-color: var(--ns-brand); box-shadow: 0 0 0 3px rgba(30, 123, 52, .25); }
.ns-btn { min-height: 44px; padding: .55rem 1rem; border: 2px solid var(--ns-brand); border-radius: 8px; background: #fff; color: var(--ns-brand); font-weight: 700; font-size: 1rem; cursor: pointer; font-family: inherit; line-height: 1.2; }
.ns-btn:hover { background: #ebfbee; }
.ns-btn:focus-visible, .ns-filters summary:focus-visible, .ns-faq summary:focus-visible, .ns-cards a:focus-visible { outline: 3px solid var(--ns-ink); outline-offset: 2px; }
.ns-primary { background: var(--ns-brand); color: #fff; white-space: nowrap; }
.ns-primary:hover { background: var(--ns-brand-d); border-color: var(--ns-brand-d); }

.ns-filters { margin-top: .75rem; }
.ns-filters summary { cursor: pointer; color: var(--ns-mute); font-weight: 600; padding: .25rem 0; }
.ns-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin-top: .75rem; }
.ns-grid p { margin: 0; }
.ns-grid label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: .25rem; }
.ns-grid .ns-input { font-size: 1rem; min-height: 44px; }
.ns-checks { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: .75rem 0 0; font-size: .95rem; }
.ns-checks input { width: 18px; height: 18px; vertical-align: -3px; margin-right: .3rem; accent-color: var(--ns-brand); }

.ns-msg:empty, .ns-summary:empty { display: none; }
.ns-msg { color: #c92a2a; font-weight: 600; margin: .75rem 0 0; }
.ns-summary { margin: .75rem 0 0; font-weight: 600; }
.ns-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.ns-actions .ns-btn { font-size: .9rem; min-height: 40px; padding: .4rem .8rem; }

.ns-results { margin-top: 1rem; }
.ns-results[aria-busy="true"] { opacity: .5; }
.ns-group { margin-top: 1rem; }
.ns-group-title { font-size: 1.05rem !important; margin: 0 0 .5rem !important; }
.ns-words { list-style: none; margin: 0 !important; padding: 0 !important; display: flex; flex-wrap: wrap; gap: .4rem; }
.ns-word { margin: 0 !important; position: relative; display: inline-flex; align-items: center; min-width: 2.6rem; justify-content: center; padding: .35rem 1.05rem .35rem .65rem; border: 2px solid var(--ns-line); border-bottom-width: 4px; border-radius: 7px; background: #fff; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ns-ink); }
.ns-word:nth-child(3n+1) { border-color: #b2dfbf; border-bottom-color: var(--ns-brand); }
.ns-s { position: absolute; right: .3rem; bottom: .15rem; font-size: .68rem; font-weight: 700; color: var(--ns-brand); letter-spacing: 0; }
.ns-more { margin-top: .6rem; font-size: .9rem; }

.ns-chart { margin: 1.5rem 0; }
.ns-chart img { width: 100%; height: auto; border: 1px solid var(--ns-line); border-radius: 8px; }
.ns-chart figcaption { font-size: .875rem; color: var(--ns-mute); margin-top: .4rem; }

.ns-faq details { border: 1px solid var(--ns-line); border-radius: 8px; margin: 0 0 .6rem; background: #fff; }
.ns-faq summary { cursor: pointer; padding: .8rem 1rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.ns-faq summary::-webkit-details-marker { display: none; }
.ns-faq summary::after { content: "+"; font-size: 1.4rem; color: var(--ns-brand); line-height: 1; }
.ns-faq details[open] summary::after { content: "–"; }
.ns-faq summary h4 { margin: 0 !important; font-size: 1.05rem; display: inline; }
.ns-faq details p { padding: 0 1rem 1rem; margin: 0; }

.ns-cards { list-style: none; margin: 1.5rem 0 !important; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.ns-cards li { margin: 0 !important; }
.ns-cards a { display: block; height: 100%; padding: 1rem 1.1rem; border: 1px solid var(--ns-line); border-left: 4px solid var(--ns-brand); border-radius: 10px; text-decoration: none !important; color: var(--ns-ink) !important; background: #fff; transition: box-shadow .15s; }
.ns-cards a:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, .08); }
.ns-cards strong { display: block; font-size: 1.1rem; margin-bottom: .25rem; }
.ns-cards span { color: var(--ns-mute); font-size: .95rem; }

.ns-related { margin: 2rem 0 1rem; padding: 1rem 1.25rem; background: #f4faf5; border-left: 4px solid var(--ns-brand); border-radius: 10px; }
.ns-related h3 { margin-top: 0 !important; }
.ns-tm { font-size: .8rem; color: var(--ns-mute); margin-top: 1.5rem; }

.ns-contact p { margin: 0 0 1rem; }
.ns-contact label { display: block; font-weight: 600; margin-bottom: .3rem; }
.ns-contact .ns-input { font-size: 1rem; }
.ns-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ns-note { padding: .8rem 1rem; border-radius: 8px; font-weight: 600; }
.ns-ok { background: #ebfbee; color: #17612a; }
.ns-err { background: #fff5f5; color: #a51d1d; }

@media (max-width: 640px) {
	.ns-tool { padding: 1rem; }
	.ns-grid { grid-template-columns: 1fr 1fr; }
	.ns-primary { padding: .55rem .8rem; }
}
