/* Lenci · Nawaa — Marketing tools (v3/nawaa-tools.js, v3/docs/NAWAA-TOOLS-CONTRACT.md). Builds on studio.css + nawaa.css tokens.
   Layout: the tool list (a sticky rail on desktop, a two-column card grid on phones) beside the panel (form → results). Logical properties
   only, so Arabic mirrors itself; results take dir="auto" so a mixed Arabic / English answer reads right in either interface language. */
.nw-tools { padding: 16px 22px 48px; max-width: 1360px; margin: 0 auto; animation: bootUp .5s var(--ease) both; }
.nt-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.nt-title-wrap { min-width: 0; flex: 1 1 320px; }
.nt-title { margin: 6px 0 4px; font-family: var(--display); font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.02em; line-height: 1.15; }
[dir="rtl"] .nt-title { letter-spacing: 0; }
.nt-sub { margin: 0; color: var(--muted); font-size: 13.5px; max-width: 70ch; }
.nt-top-actions { display: flex; gap: 8px; }
.nw-tools-btn svg { margin-inline-end: 5px; vertical-align: -2px; }
.nw-tools-btn[aria-pressed="true"] { color: #e0f7ff; border-color: rgba(34,211,238,.6); background: linear-gradient(180deg, rgba(34,211,238,.18), rgba(99,102,241,.08)); }

.nt-body { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; padding-top: 18px; align-items: start; }
.nt-grid { display: grid; gap: 8px; position: sticky; top: 12px; }
.nt-card { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(23,23,35,.8), rgba(14,14,22,.85)); color: var(--ink); text-align: start; cursor: pointer; font: inherit; transition: border-color .2s var(--ease), transform .2s var(--ease), background .2s var(--ease); animation: panelIn .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
.nt-card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.nt-card[aria-pressed="true"] { border-color: rgba(34,211,238,.55); background: linear-gradient(135deg, rgba(34,211,238,.14), rgba(99,102,241,.12) 60%, rgba(139,92,246,.1)); box-shadow: 0 0 0 1px rgba(34,211,238,.15), 0 10px 30px rgba(34,211,238,.08); }
.nt-card-text { display: grid; gap: 2px; min-width: 0; }
.nt-card-text strong { font-family: var(--display); font-size: 13.5px; font-weight: 700; }
.nt-card-text small { color: var(--muted); font-size: 11.5px; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.nt-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(34,211,238,.1); color: #67e8f9; border: 1px solid rgba(34,211,238,.25); }
.nt-ico svg { width: 19px; height: 19px; }
.nt-card[aria-pressed="true"] .nt-ico { background: var(--nw); color: #fff; border-color: transparent; box-shadow: 0 0 16px var(--nw-glow); }
.nt-ico.big { width: 46px; height: 46px; border-radius: 14px; flex: none; background: var(--nw); color: #fff; border: 0; box-shadow: 0 0 22px var(--nw-glow); }
.nt-ico.big svg { width: 22px; height: 22px; }
.nt-badge { font-family: var(--mono); font-size: 10px; color: var(--dim); white-space: nowrap; }

.nt-panel { min-width: 0; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(180deg, rgba(23,23,35,.88), rgba(14,14,22,.92)); box-shadow: var(--edge), 0 24px 70px rgba(0,0,0,.4); padding: 20px 22px 24px; scroll-margin-top: 12px; }
.nt-panel-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.nt-panel-title { margin: 0; font-family: var(--display); font-size: 20px; }
.nt-panel-lead { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.nt-form { display: grid; gap: 14px; padding-bottom: 18px; border-bottom: 1px dashed var(--line-2); }
.nt-row { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: flex-end; }
.nt-row > .nt-field { flex: 1 1 auto; min-width: 0; }
.nt-field { display: grid; gap: 6px; min-width: 0; }
.nt-label { font-family: var(--display); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
[dir="rtl"] .nt-label { letter-spacing: 0; text-transform: none; font-size: 12px; }
.nt-hint { color: var(--dim); font-size: 11.5px; line-height: 1.45; }
.nt-input { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line-2); background: rgba(10,10,16,.7); color: var(--ink); font: 14px/1.5 var(--latin); resize: vertical; transition: border-color .2s; }
[dir="rtl"] .nt-input, .nt-input:lang(ar) { font-family: var(--arabic); }
.nt-input:focus { outline: none; border-color: rgba(34,211,238,.6); box-shadow: 0 0 0 3px rgba(34,211,238,.12); }
.nt-select { appearance: auto; }
.nt-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.nt-seg .nw-chip { padding: 7px 12px; font-size: 12px; }
.nt-seg .nw-chip[aria-checked="true"] { color: #fff; border-color: rgba(34,211,238,.7); background: linear-gradient(180deg, rgba(34,211,238,.22), rgba(99,102,241,.14)); box-shadow: 0 0 12px rgba(34,211,238,.18); }
.nt-seg.plats .nw-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--pc, #8b5cf6); flex: none; }
.nt-run { justify-self: start; display: inline-flex; align-items: center; gap: 10px; padding: 11px 20px; font-size: 13px; }
.nt-run-cost { font-family: var(--mono); font-weight: 500; font-size: 10.5px; opacity: .85; padding: 2px 7px; border-radius: 999px; background: rgba(0,0,0,.25); }
.nt-run.loading span::after, .nt-ride-btn.loading span::after { content: ""; display: inline-block; width: 10px; height: 10px; margin-inline-start: 8px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: ntSpin .8s linear infinite; vertical-align: -1px; }
@keyframes ntSpin { to { transform: rotate(360deg); } }
.nt-note { margin: 0; padding: 10px 12px; border-radius: 11px; font-size: 12.5px; line-height: 1.5; color: #c9f3ff; background: rgba(34,211,238,.08); border: 1px solid rgba(34,211,238,.22); }
.nt-note.warn { color: #fde68a; background: rgba(245,176,65,.08); border-color: rgba(245,176,65,.3); }

.nt-results { display: grid; gap: 12px; padding-top: 18px; transition: opacity .2s; }
.nt-results.dim { opacity: .45; pointer-events: none; }
.nt-empty { margin: 0; color: var(--dim); font-size: 13px; text-align: center; padding: 18px 8px; border: 1px dashed var(--line-2); border-radius: 14px; }
.nt-meta { margin: 0; font-family: var(--mono); font-size: 11.5px; color: #8be9fd; }
.nt-card-res { position: relative; display: grid; gap: 8px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.025); min-width: 0; animation: panelIn .35s var(--ease) both; }
.nt-res-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.nt-res-head strong { font-family: var(--display); font-size: 14px; }
.nt-res-head small { color: var(--dim); font-size: 11.5px; }
.nt-res-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nt-res-foot .spacer { flex: 1; }
.nt-num { position: absolute; inset-inline-end: 12px; top: 10px; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.nt-text { margin: 0; font-size: 14.5px; line-height: 1.7; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; text-align: start; }
.nt-text:lang(ar), .nt-text[dir="rtl"] { font-family: var(--arabic); }
.nt-text.strong { font-weight: 700; }
.nt-text.small { font-size: 13px; color: var(--muted); }
.nt-text.muted { color: var(--dim); font-style: italic; }
.nt-chars { font-family: var(--mono); font-size: 10.5px; color: var(--dim); }
.nt-copy, .nt-res-foot .ghost, .nt-actionbar .ghost { padding: 6px 11px; font-size: 11px; }
.primary.small { padding: 7px 13px; font-size: 11.5px; }
.ghost.small { padding: 5px 10px; font-size: 11px; }
.nt-actionbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line); position: sticky; bottom: 8px; z-index: 2; backdrop-filter: blur(10px); }
.nt-actionbar.wrap { position: static; }
.nt-count { font-size: 12px; color: var(--muted); margin-inline-end: auto; }
.nt-tip { margin: 0; color: var(--muted); font-size: 12.5px; }

/* hashtags */
.nt-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.nt-legend .nt-hint { flex-basis: 100%; }
.nt-reach { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.nt-reach i, .nt-tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--rc); box-shadow: 0 0 6px var(--rc); flex: none; }
.nt .very_high { --rc: #f472b6; } .nt .high { --rc: #f5b041; } .nt .medium { --rc: #22d3ee; } .nt .niche { --rc: #34d399; }
.nt-sets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.nt-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.nt-tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255,255,255,.03); color: var(--ink); font: 500 12.5px/1.3 "Inter", "Cairo", system-ui, sans-serif; cursor: pointer; transition: all .15s var(--ease); unicode-bidi: plaintext; }
.nt-tag:hover { border-color: rgba(255,255,255,.3); }
.nt-tag[aria-pressed="true"] { border-color: rgba(34,211,238,.75); background: rgba(34,211,238,.16); color: #e0faff; }
.nt-avoid summary { cursor: pointer; color: var(--dim); font-size: 12px; }
.nt-avoid ul { margin: 6px 0 0; padding-inline-start: 18px; color: var(--muted); font-size: 12px; }
.nt-avoid code { font-family: var(--mono); color: #fca5a5; unicode-bidi: plaintext; }

/* alt text */
.nt-postprev { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.nt-postprev img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; flex: none; }
.nt-postprev > div { display: grid; gap: 4px; min-width: 0; }
.nt-libpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.nt-libitem { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--panel-2); cursor: pointer; aspect-ratio: 1; }
.nt-libitem img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nt-libitem[aria-pressed="true"] { border-color: #22d3ee; box-shadow: 0 0 12px rgba(34,211,238,.4); }

/* bio */
.nt-bio-prev { display: flex; gap: 12px; align-items: flex-start; }
.nt-avatar { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; font-family: var(--display); font-weight: 700; color: #fff; background: conic-gradient(from 200deg, var(--pc, #8b5cf6), #8b5cf6, var(--pc, #8b5cf6)); box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--pc, #8b5cf6); }
.nt-bio-prev > div { min-width: 0; display: grid; gap: 2px; }
.nt-meter { position: relative; height: 18px; border-radius: 999px; background: rgba(255,255,255,.05); overflow: hidden; display: flex; align-items: center; }
.nt-meter i { position: absolute; inset-block: 0; inset-inline-start: 0; background: linear-gradient(90deg, rgba(52,211,153,.35), rgba(52,211,153,.55)); border-radius: inherit; }
.nt-meter.near i { background: linear-gradient(90deg, rgba(245,176,65,.35), rgba(245,176,65,.6)); }
.nt-meter.over i { background: rgba(239,68,68,.55); }
.nt-meter small { position: relative; margin-inline-start: auto; padding-inline-end: 9px; font-family: var(--mono); font-size: 10.5px; color: var(--ink); }
.nt-guidance { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.nt-guidance li { display: flex; gap: 10px; font-size: 13px; color: var(--muted); }
.nt-guidance strong { color: var(--ink); }

/* e-mail */
.nt-email { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 16px; align-items: start; }
.nt-email-edit { display: grid; gap: 10px; max-height: 920px; overflow: auto; padding-inline-end: 6px; }
.nt-block-label { margin-top: 6px; font-family: var(--display); font-weight: 700; font-size: 12px; color: #8be9fd; border-top: 1px solid var(--line); padding-top: 10px; }
.nt-radio { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.nt-radio:has(input:checked) { border-color: rgba(34,211,238,.6); background: rgba(34,211,238,.08); }
.nt-email-prev { position: sticky; top: 12px; display: grid; gap: 8px; min-width: 0; }
.nt-prev-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.nt-preview { width: 100%; height: 640px; border: 1px solid var(--line-2); border-radius: 14px; background: #eeeef3; justify-self: center; transition: max-width .25s var(--ease); }
.nt-drafts { display: grid; gap: 6px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.nt-draft { display: flex; gap: 8px; align-items: center; }
.nt-draft-open { flex: 1; min-width: 0; display: grid; gap: 2px; text-align: start; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.nt-draft-open:hover { border-color: var(--line-2); }
.nt-draft-open small { color: var(--dim); font-size: 11px; }

/* trends */
.nt-today { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; background: linear-gradient(90deg, rgba(34,211,238,.1), rgba(139,92,246,.08)); border: 1px solid rgba(34,211,238,.2); }
.nt-today strong { font-family: var(--display); font-size: 15px; }
.nt-today span { color: #a5f3fc; font-size: 13px; }
.nt-trends { display: grid; gap: 14px; }
.nt-trend-cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.nt-col { display: grid; gap: 8px; min-width: 0; }
.nt-col-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.nt-col-head h3 { margin: 0; font-family: var(--display); font-size: 15px; }
.nt-col-head small { color: var(--dim); font-size: 11px; }
.nt-trend { display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.025); min-width: 0; }
.nt-trend-top { display: flex; gap: 12px; align-items: flex-start; }
.nt-rank { width: 26px; height: 26px; border-radius: 8px; flex: none; display: grid; place-items: center; font-family: var(--mono); font-size: 12px; color: #67e8f9; background: rgba(34,211,238,.1); border: 1px solid rgba(34,211,238,.25); }
.nt-trend-title { display: grid; gap: 3px; min-width: 0; }
.nt-trend-title strong { font-size: 14.5px; overflow-wrap: anywhere; }
.nt-trend-meta { display: flex; gap: 8px; flex-wrap: wrap; color: var(--dim); font-size: 11.5px; }
.nt-traffic { font-family: var(--mono); color: var(--rc, #a5f3fc); }
.nt-traffic.huge, .nt-traffic.very_high { --rc: #f472b6; } .nt-traffic.rising { --rc: #22d3ee; } .nt-traffic.emerging { --rc: #34d399; }
.nt-news { margin: 0; padding-inline-start: 18px; display: grid; gap: 3px; font-size: 12.5px; color: var(--muted); }
.nt-news a { color: #c7d2fe; text-decoration: none; }
.nt-news a:hover { text-decoration: underline; }
.nt-news small { color: var(--dim); }
.nt-days { flex: none; min-width: 54px; text-align: center; padding: 4px 8px; border-radius: 9px; font-family: var(--mono); font-size: 11px; color: #e9d5ff; background: rgba(139,92,246,.16); border: 1px solid rgba(139,92,246,.35); }
.nt-occ.now .nt-days { color: #052e16; background: #34d399; border-color: #34d399; }
.nt-ride { display: grid; gap: 8px; }
.nt-ride-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.nt-ride-btn { display: inline-flex; align-items: center; gap: 8px; }
.nt-ride-out { display: grid; gap: 8px; }
.nt-ride-out:empty { display: none; }
.nt-fit { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 6px 10px; border-radius: 10px; font-size: 12.5px; }
.nt-fit.good { background: rgba(52,211,153,.12); color: #a7f3d0; } .nt-fit.stretch { background: rgba(245,176,65,.12); color: #fde68a; } .nt-fit.avoid { background: rgba(239,68,68,.12); color: #fecaca; }
.nt-fit small { color: inherit; opacity: .8; }
.nt-idea { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(10,10,16,.45); }
.nt-cal-wrap { position: relative; display: inline-flex; }
.nt-cal-pop { position: absolute; z-index: 20; bottom: calc(100% + 6px); inset-inline-end: 0; width: min(280px, 82vw); display: grid; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel-2); box-shadow: 0 20px 50px rgba(0,0,0,.55); animation: panelIn .2s var(--ease) both; }
.nt-skel { display: grid; gap: 8px; } .nt-skel i { height: 64px; border-radius: 14px; background: linear-gradient(90deg, rgba(255,255,255,.03), rgba(255,255,255,.07), rgba(255,255,255,.03)); background-size: 200% 100%; animation: ntShimmer 1.2s linear infinite; }
@keyframes ntShimmer { to { background-position: -200% 0; } }

/* interactive */
.nt-ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.nt-ia { border-top: 3px solid var(--pc); }
.nt-kind { font-family: var(--display); font-weight: 700; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.06); color: var(--ink); }
.nt-sticker { display: grid; gap: 8px; padding: 14px; border-radius: 16px; background: #fff; color: #111; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.nt-st-q { font-weight: 800; font-size: 15px; text-align: center; overflow-wrap: anywhere; }
.nt-st-opts { display: grid; gap: 6px; }
.nt-sticker.poll .nt-st-opts, .nt-sticker.this_or_that .nt-st-opts { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); }
.nt-st-opt { padding: 9px 10px; border-radius: 10px; background: #f1f1f5; font-weight: 700; font-size: 13px; text-align: center; overflow-wrap: anywhere; }
.nt-st-opt.right { background: #d1fae5; color: #065f46; }
.nt-st-slider { position: relative; height: 26px; } .nt-st-slider i { position: absolute; inset-inline: 6px; top: 12px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, #f472b6, #f59e0b); } .nt-st-slider span { position: absolute; inset-inline-start: 62%; top: 0; font-size: 20px; }
.nt-st-ask { padding: 10px; border-radius: 10px; background: #f1f1f5; color: #888; font-size: 13px; text-align: center; }

/* the drawer hook (alt text + shortcuts) */
.nt-dr-alt { width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(10,10,16,.6); color: var(--ink); font: 13px/1.5 var(--latin); resize: vertical; }
.nt-dr-alt:lang(ar) { font-family: var(--arabic); }
.nt-dr-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.nt-dr-tools .nw-chip { padding: 5px 10px; font-size: 11px; }

@media (max-width: 1100px) {
  .nt-body { grid-template-columns: 240px minmax(0, 1fr); }
  .nt-sets { grid-template-columns: minmax(0, 1fr); }
  .nt-email { grid-template-columns: minmax(0, 1fr); }
  .nt-email-edit { max-height: none; overflow: visible; padding: 0; }
  .nt-email-prev { position: static; }
  .nt-trend-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .nw-tools { padding: 12px 16px 36px; }
  .nt-body { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .nt-grid { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nt-card { grid-template-columns: 32px minmax(0, 1fr); padding: 10px; gap: 8px; }
  .nt-card .nt-ico { width: 32px; height: 32px; border-radius: 9px; } .nt-card .nt-ico svg { width: 16px; height: 16px; }
  .nt-card-text small { display: none; }
  .nt-badge { grid-column: 2; }
  .nt-panel { padding: 16px 14px 18px; border-radius: 16px; }
  .nt-panel-head { gap: 10px; } .nt-ico.big { width: 40px; height: 40px; }
  .nt-top-actions { width: 100%; }
}
@media (max-width: 480px) {
  .nw-tools-btn span { display: none; } .nw-tools-btn svg { margin: 0; } .nw-tools-btn { padding: 7px 9px; }
  .nt-card-text strong { font-size: 12.5px; }
  .nt-run { justify-self: stretch; justify-content: center; }
  .nt-res-foot .spacer { display: none; }
  .nt-preview { height: 560px; }
}
/* Arabic never goes through the mono face (it has no Arabic: the letters would not join) */
[dir="rtl"] .nt-badge, [dir="rtl"] .nt-run-cost, [dir="rtl"] .nt-chars, [dir="rtl"] .nt-days, [dir="rtl"] .nt-traffic, [dir="rtl"] .nt-meta, [dir="rtl"] .nt-meter small { font-family: var(--arabic); letter-spacing: 0; }
.nt-avoid code { font-family: "Inter", "Cairo", system-ui, sans-serif; }
@media (max-width: 900px) { .nt-actionbar { position: static; backdrop-filter: none; } }
@media (prefers-reduced-motion: reduce) { .nw-tools, .nt-card, .nt-card-res, .nt-cal-pop { animation: none !important; } .nt-card:hover { transform: none; } .nt-skel i, .nt-run.loading span::after, .nt-ride-btn.loading span::after { animation: none !important; } }

/* ---- the hub (#tools): search, grouped rail, the overview of every tool, History and saved results ---- */
.nt-top-actions { align-items: center; flex-wrap: wrap; }
.nt-search { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(10,10,16,.7); min-width: 220px; transition: border-color .2s, box-shadow .2s; }
.nt-search:focus-within { border-color: rgba(34,211,238,.6); box-shadow: 0 0 0 3px rgba(34,211,238,.12); }
.nt-search svg { width: 15px; height: 15px; color: var(--dim); flex: none; }
.nt-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: 13px var(--latin); outline: none; }
[dir="rtl"] .nt-search input { font-family: var(--arabic); }
.nt-group { margin: 10px 4px 0; font-family: var(--display); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
[dir="rtl"] .nt-group { letter-spacing: 0; text-transform: none; font-size: 12px; }
.nt-grid { max-height: calc(100vh - 24px); overflow-y: auto; padding-inline-end: 2px; scrollbar-width: thin; }
.nt-card { position: relative; }
.nt-new { position: absolute; top: -6px; inset-inline-end: 10px; padding: 1px 7px; border-radius: 999px; font: 700 9.5px/1.6 var(--display); letter-spacing: .04em; color: #0b0b12; background: linear-gradient(120deg, #22d3ee, #a78bfa); }
.nt-home-card .nt-ico { background: rgba(167,139,250,.12); color: #c4b5fd; border-color: rgba(167,139,250,.3); }
.nt-panel.hub { padding: 22px 24px 28px; }
.nt-hub-hero { padding-bottom: 6px; }
.nt-hub-hero .nt-panel-title { font-size: clamp(20px, 2.2vw, 26px); }
.nt-hub-sec { padding-top: 18px; }
.nt-hub-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.nt-hub-h { margin: 0; font-family: var(--display); font-size: 15px; }
.nt-hub-head small { color: var(--dim); font-size: 12px; }
.nt-hub-sec > .nt-hub-h { margin-bottom: 10px; }
.nt-hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.nt-card.big { grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto; align-items: start; padding: 14px; min-height: 86px; }
.nt-card.big .nt-ico { width: 44px; height: 44px; border-radius: 13px; }
.nt-card.big .nt-ico svg { width: 21px; height: 21px; }
.nt-card.big .nt-card-text strong { font-size: 14.5px; }
.nt-card.big .nt-card-text small { font-size: 12px; -webkit-line-clamp: 3; }
.nt-card.big .nt-badge { grid-column: 2; justify-self: start; margin-top: 2px; }
.nt-card.big:hover { border-color: rgba(34,211,238,.45); box-shadow: 0 10px 30px rgba(34,211,238,.08); }
.nt-panel-titles { min-width: 0; }
.nt-lang { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.nt-more-lang { width: auto; min-width: 130px; padding: 6px 10px; font-size: 12px; border-radius: 999px; }
.nt-history { margin-top: 22px; padding-top: 16px; border-top: 1px dashed var(--line-2); display: grid; gap: 10px; }
.nt-history-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.nt-history-head h3 { margin: 0; font-family: var(--display); font-size: 14px; }
.nt-history-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; max-height: 300px; overflow-y: auto; }
.nt-hrow { display: flex; align-items: center; gap: 6px; min-width: 0; }
.nt-hopen { flex: 1; min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.02); color: var(--ink); text-align: start; cursor: pointer; font: inherit; }
.nt-hopen:hover { border-color: var(--line-2); background: rgba(255,255,255,.04); }
.nt-hopen strong { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.nt-hopen small { color: var(--dim); font-size: 11px; white-space: nowrap; flex: none; }
.nt-save { white-space: nowrap; }
.nt-nomatch { padding: 8px 4px; }
@media (max-width: 900px) {
  .nt-search { flex: 1 1 100%; min-width: 0; order: -1; }
  .nt-grid { display: flex; overflow-x: auto; overflow-y: hidden; max-height: none; gap: 8px; padding-bottom: 6px; scroll-snap-type: x proximity; }
  .nt-grid .nt-card { flex: 0 0 auto; width: auto; max-width: 220px; scroll-snap-align: start; grid-template-columns: 28px auto; padding: 8px 10px; }
  .nt-grid .nt-card .nt-badge, .nt-grid .nt-group { display: none; }
  .nt-grid .nt-card-text strong { white-space: nowrap; }
  .nw-tools[data-tool="hub"] .nt-grid { display: none; }
  .nt-hub-grid { grid-template-columns: minmax(0, 1fr); }
  .nt-card.big .nt-card-text small { display: -webkit-box; }
  .nt-panel.hub { padding: 16px; }
}
