/* Shared header, home page and category pages.
   Every class is prefixed nx- so nothing here collides with the older
   site.css / site-modern.css / studio.css rules still used by tool pages. */

:root {
  --nx-brand: #6547eb;
  --nx-brand-dark: #4a2fc4;
  --nx-ink: #17182e;
  --nx-soft: #55597a;
  --nx-line: #e6e7f2;
  --nx-bg: #f6f6fb;
  --nx-card: #ffffff;
  --nx-ok: #17714a;
  --nx-ok-bg: #e5f7ee;
  --nx-radius: 22px;
}

.nx-wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; box-sizing: border-box; }
.nx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header (every public page) ---------- */
body.studio-ui .nx-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--nx-line);
  font-family: Inter, system-ui, sans-serif;
}
.nx-header__inner {
  height: 70px; display: grid; align-items: center; gap: 24px;
  grid-template-columns: auto minmax(0, 560px) auto; justify-content: space-between;
}
.nx-logo {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  color: var(--nx-ink); font-weight: 800; font-size: 20px; letter-spacing: -.4px; white-space: nowrap;
}
.nx-logo:hover { color: var(--nx-ink); }
.nx-logo b { color: var(--nx-brand); font-weight: 800; }
.nx-header__search { position: relative; width: 100%; }
.nx-header__search .studio-header-search { width: 100%; max-width: none; margin: 0; }
body.studio-ui .nx-header__search .studio-header-search { height: 46px; border-radius: 14px; background: #f3f3f9; padding-right: 4px; }
body.studio-ui .nx-header__search .studio-header-search:focus-within { background: #fff; border-color: var(--nx-brand); box-shadow: 0 0 0 3px rgba(101, 71, 235, .15); }
body.studio-ui .nx-header__search .studio-header-search input { font-size: 15px; padding-left: 14px; padding-right: 70px; }
.nx-kbd {
  position: absolute; right: 50px; top: 50%; transform: translateY(-50%); pointer-events: none;
  font: 600 12px Inter, system-ui, sans-serif; color: var(--nx-soft);
  background: #fff; border: 1px solid var(--nx-line); border-radius: 6px; padding: 3px 7px;
}
.nx-nav { display: flex; align-items: center; gap: 4px; }
.nx-nav a {
  padding: 10px 14px; border-radius: 10px; color: var(--nx-ink); text-decoration: none;
  font-size: 15px; font-weight: 500;
}
.nx-nav a:hover, .nx-nav a[aria-current="page"] { background: #f1eeff; color: var(--nx-brand-dark); }
.nx-menu-btn {
  display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--nx-line);
  background: #fff; color: var(--nx-ink); align-items: center; justify-content: center; cursor: pointer;
}
.nx-mobile-nav { display: none; }

/* ---------- Home ---------- */
body.home-bento { background: var(--nx-bg); }
.nx-home { font-family: Inter, system-ui, sans-serif; color: var(--nx-ink); }
.nx-home h1, .nx-home h2, .nx-home h3 { font-family: Inter, system-ui, sans-serif; color: var(--nx-ink); }

/* Compact intro above the category directory */
.nx-intro { padding: 40px 0 8px; background: #fff; }
.nx-intro__inner { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 32px; }
.nx-intro h1 { margin: 0 0 10px; font-size: 40px; line-height: 1.1; letter-spacing: -1.2px; font-weight: 800; }
.nx-intro h1 span { color: var(--nx-brand); }
.nx-intro p { margin: 0; max-width: 640px; font-size: 17px; line-height: 1.6; color: var(--nx-soft); }
.nx-intro__badges { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.nx-intro__badges li { padding: 7px 12px; border-radius: 999px; background: #f1f1f7; color: var(--nx-soft); font-size: 13px; font-weight: 600; white-space: nowrap; }
.nx-intro__badges li.is-ok { background: var(--nx-ok-bg); color: var(--nx-ok); font-weight: 700; }
.nx-intro__badges li.is-ok::before { content: "● "; }

.nx-ico {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: var(--cat-bg, #ece6ff); color: var(--cat-fg, var(--nx-brand));
}
.nx-ico svg { width: 60%; height: 60%; }

/* Category directory section */
.nx-explore { padding: 28px 0 72px; background: #fff; }
.nx-explore__head { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; justify-content: space-between; margin-bottom: 20px; }
.nx-explore h2 { margin: 0; font-size: 32px; letter-spacing: -.8px; font-weight: 800; }
.nx-count { margin: 6px 0 0; font-size: 15px; color: var(--nx-soft); }
.nx-empty { padding: 40px; text-align: center; border: 1px dashed var(--nx-line); border-radius: 16px; color: var(--nx-soft); }

/* Focus visibility */
.nx-home a:focus-visible, .nx-home button:focus-visible, .nx-header a:focus-visible, .nx-header button:focus-visible {
  outline: 3px solid #9b86ff; outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nx-header__inner { grid-template-columns: auto auto; }
  .nx-header__search { grid-column: 1 / -1; grid-row: 2; padding-bottom: 12px; }
  .nx-header__inner { height: auto; padding-top: 12px; row-gap: 10px; }
  .nx-kbd { display: none; }
  .nx-nav { display: none; }
  .nx-menu-btn { display: inline-flex; justify-self: end; }
  .nx-mobile-nav.is-open { display: flex; flex-direction: column; padding: 4px 16px 14px; border-top: 1px solid var(--nx-line); }
  .nx-mobile-nav a { padding: 12px 4px; color: var(--nx-ink); text-decoration: none; font-weight: 500; border-bottom: 1px solid #f1f1f7; }
}
@media (max-width: 600px) {
  .nx-wrap { padding: 0 16px; }
  .nx-explore h2 { font-size: 26px; }
  .nx-logo { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .nx-cat__tool { transition: none; } .nx-cat__tool:hover { transform: none; } }

/* The header search input sits inside the bordered search box; strip the
   generic input chrome other stylesheets give type="search" fields. */
body.studio-ui .nx-header__search .studio-header-search input {
  border: 0; background: transparent; box-shadow: none; height: 100%; border-radius: 0;
}

/* Respect the hidden attribute even on elements given a display above. */
.nx-home [hidden], .nx-header [hidden] { display: none !important; }

/* studio.css absolutely positions the header search on small screens for
   the old header; in the Design B header it stays in normal flow. */
body.studio-ui .nx-header__search .studio-header-search {
  position: relative; left: auto; right: auto; top: auto; width: 100%; max-width: none;
}

/* Header search suggestions: full width of the search box (studio.css pins
   a 280px panel to the right edge, sized for the old small header search). */
body.studio-ui .nx-header__search .studio-search-suggestions {
  left: 0; right: 0; width: auto; max-width: none; top: calc(100% + 8px);
  padding: 6px; border-radius: 16px; border: 1px solid var(--nx-line); background: #fff;
  box-shadow: 0 22px 48px rgba(23, 24, 46, .14); max-height: min(70vh, 460px); overflow-y: auto; z-index: 60;
}
body.studio-ui .nx-header__search .studio-search-suggestions a {
  flex-direction: row; align-items: center; justify-content: space-between; gap: 16px;
  padding: 11px 14px; border-radius: 10px;
}
body.studio-ui .nx-header__search .studio-search-suggestions strong { font-size: 15px; font-weight: 600; color: var(--nx-ink); }
body.studio-ui .nx-header__search .studio-search-suggestions small {
  flex: none; font-size: 12px; font-weight: 600; color: var(--nx-soft); background: #f1f1f7; padding: 3px 9px; border-radius: 999px;
}
body.studio-ui .nx-header__search .studio-search-suggestions a:hover,
body.studio-ui .nx-header__search .studio-search-suggestions [aria-selected="true"] { background: #f1eeff; }
body.studio-ui .nx-header__search .studio-search-suggestions .studio-search-all {
  justify-content: flex-start; margin-top: 4px; border-top: 1px solid var(--nx-line); border-radius: 0 0 10px 10px;
  font-size: 14px; font-weight: 600; color: var(--nx-brand-dark);
}
body.studio-ui .nx-header__search .studio-search-suggestions p { padding: 12px 14px; font-size: 14px; color: var(--nx-soft); }
/* "Ctrl K" hint only while the search is idle. */
.nx-header__search:focus-within .nx-kbd { display: none; }
/* Never allow sideways page scrolling (clip keeps the sticky header working). */
html, body { overflow-x: clip; }

/* ---------- Home: category directory ---------- */
.nx-dir__clear { font-weight: 600; color: var(--nx-brand-dark); }
.nx-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.nx-jump a {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px 0 6px; border-radius: 999px;
  border: 1px solid var(--nx-line); background: #fff; color: var(--nx-ink); text-decoration: none;
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
}
.nx-jump a:hover { border-color: #c9bdfb; color: var(--nx-ink); }
.nx-jump .nx-ico { width: 24px; height: 24px; border-radius: 999px; }
.nx-dir__cols { columns: 3; column-gap: 18px; }
.nx-dir__card {
  break-inside: avoid; margin-bottom: 18px; background: #fff; border: 1px solid var(--nx-line);
  border-radius: 18px; padding: 20px 22px; scroll-margin-top: 90px;
}
.nx-dir__card header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; padding-bottom: 12px; border-bottom: 1px solid #eeeff6; }
.nx-dir__card .nx-ico { width: 38px; height: 38px; border-radius: 10px; }
.nx-dir__card h3 { flex: 1; margin: 0; font-size: 17px; font-weight: 700; }
.nx-dir__card h3 a { color: var(--nx-ink); text-decoration: none; }
.nx-dir__card h3 a:hover { color: var(--cat-fg); text-decoration: none; }
.nx-dir__count { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--cat-bg); color: var(--cat-fg); }
.nx-dir__list { list-style: none; margin: 0; padding: 0; }
.nx-dir__list--2 { columns: 2; column-gap: 20px; }
.nx-dir__list li { break-inside: avoid; }
.nx-dir__list a { display: block; padding: 5px 0; color: #2b2d4a; text-decoration: none; font-size: 14.5px; line-height: 1.35; transition: color .15s, transform .15s; }
.nx-dir__list a:hover { color: var(--cat-fg); text-decoration: none; transform: translateX(3px); }
.nx-dir__list a:focus-visible, .nx-dir__all:focus-visible, .nx-dir__card h3 a:focus-visible { outline: 2px solid var(--cat-fg); outline-offset: 2px; border-radius: 4px; }
.nx-dir__all { display: inline-block; margin-top: 10px; font-size: 13.5px; font-weight: 700; color: var(--cat-fg); text-decoration: none; }
.nx-dir__all:hover { color: var(--cat-fg); text-decoration: none; opacity: .8; }

/* ---------- Category pages (/tools/category/{slug}) ---------- */
.nx-cat__page { padding: 32px 0 72px; }
.nx-crumbs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 22px; padding: 0; font-size: 13.5px; color: var(--nx-soft); }
.nx-crumbs li + li::before { content: "›"; margin-right: 6px; color: #a3a6c2; }
.nx-crumbs a { color: var(--nx-soft); text-decoration: none; }
.nx-crumbs a:hover { color: var(--nx-brand-dark); text-decoration: underline; }
.nx-crumbs [aria-current] { color: var(--nx-ink); font-weight: 600; }
.nx-cat__layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }
.nx-cat__side { position: sticky; top: 90px; background: #fff; border: 1px solid var(--nx-line); border-radius: 16px; padding: 10px; }
.nx-cat__side-title { margin: 6px 10px 8px; font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: #8a8dab; }
.nx-cat__side ul { list-style: none; margin: 0; padding: 0; }
.nx-cat__side a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--nx-ink); text-decoration: none; font-size: 14px; }
.nx-cat__side a:hover { background: #f5f5fb; color: var(--nx-ink); }
.nx-cat__side a.is-active { background: var(--cat-bg); font-weight: 700; }
.nx-cat__side .nx-ico { width: 26px; height: 26px; border-radius: 7px; }
.nx-cat__side a.is-active .nx-ico { background: #fff; }
.nx-cat__side-name { flex: 1; min-width: 0; }
.nx-cat__side-count { font-size: 12px; color: #8a8dab; }
.nx-cat__head { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.nx-cat__icon { width: 56px; height: 56px; border-radius: 15px; }
.nx-cat__head h1 { margin: 0; font-size: 38px; line-height: 1.1; letter-spacing: -1px; font-weight: 800; }
.nx-cat__intro { margin: 0 0 8px; max-width: 680px; font-size: 16.5px; line-height: 1.6; color: var(--nx-soft); }
.nx-cat__meta { margin: 0 0 26px; font-size: 13.5px; font-weight: 600; color: var(--nx-ok); }
.nx-cat__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.nx-cat__tool {
  display: flex; gap: 14px; padding: 18px; border-radius: 16px; background: #fff; border: 1px solid var(--nx-line);
  text-decoration: none; color: var(--nx-ink); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.nx-cat__tool:hover { border-color: #c9bdfb; box-shadow: 0 8px 22px rgba(76, 52, 190, .1); transform: translateY(-1px); color: var(--nx-ink); }
.nx-cat__tool .nx-ico { width: 44px; height: 44px; border-radius: 12px; }
.nx-cat__tool strong { display: block; margin-bottom: 4px; font-size: 16px; }
.nx-cat__tool small { display: block; font-size: 13.5px; line-height: 1.5; color: var(--nx-soft); }

@media (max-width: 1180px) {
  .nx-dir__cols { columns: 2; }
}
@media (max-width: 900px) {
  .nx-cat__layout { grid-template-columns: 1fr; }
  .nx-cat__side { position: static; order: 2; }
}
@media (max-width: 700px) {
  .nx-dir__cols { columns: 1; }
  .nx-cat__grid { grid-template-columns: 1fr; }
  .nx-cat__head h1 { font-size: 28px; }
  .nx-cat__icon { width: 46px; height: 46px; }
  .nx-jump { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 22px; padding: 0 16px 4px; scrollbar-width: none; }
}

/* ---------- Randomizer tools ---------- */
.nx-rnd__split { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 28px; align-items: center; }
.nx-rnd__split textarea { width: 100%; box-sizing: border-box; }
.nx-rnd__result { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: #f7f4ff; }
.nx-rnd__label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: #5a3fd6; }
.nx-rnd__big { display: block; margin-top: 4px; font-size: 28px; font-weight: 800; overflow-wrap: anywhere; }
.nx-rnd__history { display: block; margin: 6px 0 0; font-size: 13px; color: var(--nx-soft); }
.nx-rnd__total { margin: 14px 0 0; font-size: 16px; }
.nx-rnd__total strong { font-size: 22px; }
.nx-rnd__hint { margin: 0; font-size: 13px; font-weight: 400; color: var(--nx-soft); }
.nx-rnd__center { text-align: center; }
.nx-rnd__center h2 { justify-content: center; }
.nx-rnd__letters { font-size: 1.4rem; letter-spacing: .08em; }

.nx-wheel { position: relative; max-width: 420px; width: 100%; margin: 0 auto; }
.nx-wheel svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 10px 24px rgba(23, 24, 46, .14)); }
.nx-wheel__pointer {
  position: absolute; top: -4px; left: 50%; transform: translateX(-50%); z-index: 1;
  width: 0; height: 0; border-left: 14px solid transparent; border-right: 14px solid transparent; border-top: 26px solid #17182e;
}
#np-rotor { transform-origin: 0 0; }

.nx-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.nx-team { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--nx-line); background: #fff; }
.nx-team h3 { margin: 0 0 8px; font-size: 15px; color: #5a3fd6; }
.nx-team ol { margin: 0; padding-left: 20px; line-height: 1.7; }

.nx-dice { display: flex; flex-wrap: wrap; gap: 12px; min-height: 64px; }
.nx-die {
  display: inline-flex; align-items: center; justify-content: center; min-width: 64px; height: 64px; padding: 0 8px; box-sizing: border-box;
  border-radius: 14px; background: #fff; border: 2px solid #17182e; font-size: 26px; font-weight: 800; box-shadow: 0 4px 0 #17182e;
}

.nx-coin, .nx-answer {
  display: inline-flex; align-items: center; justify-content: center; margin: 4px auto 0;
  width: 160px; height: 160px; border-radius: 50%; font-size: 30px; font-weight: 800;
  background: #f1f1f7; color: var(--nx-soft); border: 6px solid #e6e7f2;
}
.nx-coin.is-heads { background: #fff3d6; color: #8a5a00; border-color: #f5c451; }
.nx-coin.is-tails { background: #e4ecff; color: #2f55c9; border-color: #9bb4f5; }
.nx-answer { width: auto; min-width: 200px; height: 110px; padding: 0 28px; border-radius: 24px; font-size: 44px; }
.nx-answer.is-yes { background: var(--nx-ok-bg); color: var(--nx-ok); border-color: #9ed9bb; }
.nx-answer.is-no { background: #fde4e4; color: #b42318; border-color: #f4a9a9; }
.nx-answer.is-maybe { background: #fff3d6; color: #8a5a00; border-color: #f5c451; }

.nx-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.nx-swatch { display: flex; flex-direction: column; padding: 0; border: 1px solid var(--nx-line); border-radius: 14px; background: #fff; overflow: hidden; cursor: pointer; text-align: left; font: inherit; }
.nx-swatch:hover { border-color: #c9bdfb; }
.nx-swatch__chip { display: flex; align-items: flex-end; height: 90px; padding: 10px 12px; box-sizing: border-box; font: 700 15px ui-monospace, Menlo, Consolas, monospace; }
.nx-swatch__codes { padding: 10px 12px; font: 12px/1.6 ui-monospace, Menlo, Consolas, monospace; color: var(--nx-soft); white-space: pre-line; }

@media (max-width: 800px) {
  .nx-rnd__split { grid-template-columns: 1fr; }
  .nx-wheel { max-width: 320px; }
}
@media (prefers-reduced-motion: reduce) { #np-rotor { transition: none !important; } }

/* ---------- Islamic tools ---------- */
.nx-isl__result { margin-top: 4px; padding: 16px 18px; border-radius: 14px; background: #e3f4ec; }
.nx-isl__result .nx-rnd__label { color: #146c43; }
.nx-isl__arabic { display: block; margin-top: 6px; font-size: 22px; color: #2b2d4a; }
.nx-isl__today { margin: 0; font-size: 18px; font-weight: 700; }
.nx-isl__cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.nx-isl__card { padding: 16px 18px; border-radius: 14px; border: 1px solid var(--nx-line); background: #fff; }
.nx-isl__card .nx-rnd__label { color: #146c43; }
.nx-isl__days { display: block; margin: 4px 0; font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.nx-isl__table-wrap { overflow-x: auto; }
.nx-isl__table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.nx-isl__table th, .nx-isl__table td { padding: 10px 12px; border-bottom: 1px solid var(--nx-line); text-align: left; vertical-align: top; }
.nx-isl__table th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--nx-soft); }
.nx-isl__table td:nth-child(3) { font-weight: 700; white-space: nowrap; }
.nx-isl__table td:last-child { color: var(--nx-soft); font-size: 13.5px; }
.nx-isl__notes { margin: 14px 0; padding-left: 20px; color: #7c4a03; font-size: 14px; line-height: 1.6; }
/* Tool forms: respect the hidden attribute (site.css gives .field a display). */
.tool-panel [hidden] { display: none !important; }

/* New tool forms (.nx-form): fields fill their columns, 3 per row, tidy gaps. */
body.studio-ui .tool-panel.nx-form .field input:not([type="checkbox"]):not([type="radio"]),
body.studio-ui .tool-panel.nx-form .field select { width: 100%; max-width: none; box-sizing: border-box; }
body.studio-ui .tool-panel.nx-form .tool-fields-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
body.studio-ui.tool-page .tool-panel.nx-form .tool-fields-three > .field { width: 100% !important; max-width: none; min-width: 0; margin: 0; flex: none !important; }
body.studio-ui.tool-page .tool-panel.nx-form .panel-card > .field.nx-half { width: calc(50% - 8px) !important; flex: none !important; max-width: none; }
body.studio-ui .tool-panel.nx-form .nx-half { max-width: calc(50% - 8px); }
body.studio-ui .tool-panel.nx-form .nx-rnd__split .tool-fields-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) {
  body.studio-ui .tool-panel.nx-form .tool-fields-three { grid-template-columns: minmax(0, 1fr); }
  body.studio-ui .tool-panel.nx-form .nx-half { max-width: none; }
}
/* Even vertical rhythm between stacked fields and rows in the new tool forms. */
body.studio-ui.tool-page .tool-panel.nx-form .panel-card > .field,
body.studio-ui.tool-page .tool-panel.nx-form .panel-card > .tool-fields-three { margin: 0 0 18px; }

/* Advice that is not an error (password checker tips). */
.status-msg.warn { background: #fff7e6; color: #7c4a03; border-color: #f5d08a; }
/* Time card: one row per day with time inputs. */
.nx-timecard { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.nx-timecard th, .nx-timecard td { padding: 8px 8px; border-bottom: 1px solid var(--nx-line); text-align: left; }
.nx-timecard th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--nx-soft); }
.nx-timecard td:first-child { font-weight: 600; white-space: nowrap; }
.nx-timecard td:last-child { font-weight: 700; white-space: nowrap; text-align: right; }
body.studio-ui .tool-panel .nx-timecard input { width: 100%; min-width: 92px; box-sizing: border-box; }
.nx-timecard-wrap { overflow-x: auto; }
/* Date fields: input group with calendar icon (see js/date-fields.js). */
.nx-date { display: flex; align-items: stretch; width: 100%; height: 46px; background: #fff; border: 1px solid var(--nx-line, #e6e7f2); border-radius: 12px; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.nx-date:focus-within { border-color: #6547eb; box-shadow: 0 0 0 3px rgba(101, 71, 235, .15); }
.nx-date__icon { flex: 0 0 48px; display: flex; align-items: center; justify-content: center; border: 0; border-right: 1px solid var(--nx-line, #e6e7f2); background: #f1effd; color: #6547eb; cursor: pointer; padding: 0; }
.nx-date__icon:hover { background: #e7e2fc; }
body.studio-ui .tool-panel .nx-date input.nx-date__text,
.nx-date input.nx-date__text { flex: 1 1 auto; min-width: 0; width: auto; height: 100%; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: transparent !important; padding: 0 12px !important; font-size: 15px; outline: none; margin: 0; cursor: pointer; }
.nx-date__clear { flex: 0 0 38px; border: 0; background: transparent; color: #9a9db8; font-size: 20px; line-height: 1; cursor: pointer; visibility: hidden; }
.nx-date.has-value .nx-date__clear { visibility: visible; }
.nx-date__clear:hover { color: #17182e; }
/* Calendar popup in the site's colours. */
.datepicker.datepicker-dropdown { border: 1px solid #e6e7f2; border-radius: 16px; box-shadow: 0 18px 40px rgba(23, 24, 46, .16); padding: 10px; font-family: inherit; z-index: 2000 !important; }
.datepicker table tr td, .datepicker table tr th { width: 38px; height: 36px; border-radius: 10px; font-size: 14px; }
.datepicker table tr th.dow { font-size: 12px; font-weight: 700; color: #55597a; }
.datepicker .datepicker-switch { font-weight: 800; }
.datepicker table tr td.day:hover, .datepicker table tr td.focused, .datepicker table tr td span:hover { background: #f1effd; }
.datepicker table tr td.today { background: transparent !important; box-shadow: inset 0 0 0 1.5px #6547eb; color: #6547eb; font-weight: 700; }
.datepicker table tr td.active, .datepicker table tr td.active:hover, .datepicker table tr td.active.today,
.datepicker table tr td span.active, .datepicker table tr td span.active:hover { background: #6547eb !important; background-image: none !important; color: #fff !important; text-shadow: none; box-shadow: none; font-weight: 700; }
.datepicker table tr td.old, .datepicker table tr td.new { color: #c3c5d6; }
.datepicker tfoot th.today, .datepicker tfoot th.clear { font-size: 13px; font-weight: 600; padding-top: 8px; }
.datepicker tfoot th.today { color: #6547eb; }
.datepicker tfoot th.clear { color: #55597a; }
.datepicker-days tbody td.day:nth-child(n+6):not(.active):not(.today):not(.old):not(.new) { color: #9a9db8; }
@media (max-width: 600px) {
    .tool-panel .field-row > .field:has(.nx-date) { flex: 1 1 100% !important; min-width: 100% !important; }
    body.studio-ui .tool-panel.nx-form .tool-fields-three:has(.nx-date) { grid-template-columns: 1fr; }
}
/* Dropdown lists (select2): hovered option is purple with white text, chosen option light purple. */
body.studio-ui .select2-container--default .select2-results__option[aria-selected="true"],
body.studio-ui .select2-container--default .select2-results__option--selected { background: #f1effd; color: #6547eb !important; font-weight: 600; }
body.studio-ui .select2-container--default .select2-results__option--highlighted[aria-selected],
body.studio-ui .select2-container--default .select2-results__option--highlighted { background: #6547eb !important; color: #fff !important; }
/* Modern checkboxes (option C): rounded box, purple with a white tick when checked. */
body.studio-ui input[type="checkbox"]:not(.form-check-input) {
    -webkit-appearance: none; appearance: none; flex: 0 0 auto;
    width: 22px; height: 22px; min-width: 22px; margin: 0; padding: 0;
    border: 2px solid #cfd1e1; border-radius: 7px; background: #fff center / 14px 14px no-repeat;
    display: inline-block; vertical-align: middle; position: relative; cursor: pointer;
    transition: background-color .15s, border-color .15s, box-shadow .15s;
}
body.studio-ui input[type="checkbox"]:not(.form-check-input):hover { border-color: #6547eb; }
body.studio-ui input[type="checkbox"]:not(.form-check-input):checked {
    background-color: #6547eb; border-color: #6547eb;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
body.studio-ui input[type="checkbox"]:not(.form-check-input):focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(101, 71, 235, .25); }
body.studio-ui input[type="checkbox"]:not(.form-check-input):disabled { opacity: .5; cursor: not-allowed; }
body.studio-ui .checkbox-row { gap: 10px; cursor: pointer; }
.tool-panel .panel-card > .checkbox-row { margin-top: 16px; margin-bottom: 16px; }
.tool-panel .panel-card > .checkbox-row + .checkbox-row { margin-top: -4px; }
/* A checkbox sitting in a form row beside inputs lines up with the inputs, not the labels. */
.tool-panel .field:has(> .checkbox-row:only-child) { display: flex; flex-direction: column; justify-content: flex-end; align-self: stretch; }
.tool-panel .field > .checkbox-row:only-child { display: flex; align-items: center; min-height: 48px; margin: 0 !important; }
/* A row made only of checkboxes gets breathing room above and below. */
body.studio-ui .tool-panel .field-row:has(> .checkbox-row:first-child):not(:has(> .field)) { margin: 16px 0 20px !important; padding-top: 8px; column-gap: 24px !important; }
/* Scientific calculator */
.nx-calc { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.nx-calc__screen { background: #17182e; color: #fff; border-radius: 16px; padding: 14px 18px 16px; margin-bottom: 16px; }
.nx-calc__top { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; letter-spacing: .5px; color: #a9abd0; min-height: 16px; }
.nx-calc__top #sc-preview { font-weight: 500; letter-spacing: 0; }
body.studio-ui .tool-panel input.nx-calc__expr { width: 100%; background: transparent !important; border: 0 !important; box-shadow: none !important; color: #c9cbe8; font: 500 20px/1.3 "IBM Plex Mono", monospace; text-align: right; padding: 6px 0 0 !important; outline: none; }
.nx-calc__result { font: 700 40px/1.15 "IBM Plex Mono", monospace; text-align: right; overflow-x: auto; white-space: nowrap; }
.nx-calc__result.is-error { color: #ff9b9b; font-size: 22px; }
.nx-calc__keys { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.nx-key { height: 52px; border: 1px solid var(--nx-line); border-radius: 12px; background: #fff; color: var(--nx-ink); font: 600 17px Inter, sans-serif; cursor: pointer; transition: background .12s, transform .06s; }
.nx-key:hover { background: #f1effd; }
.nx-key:active { transform: scale(.96); }
.nx-key--num { background: #f6f6fb; font-size: 19px; }
.nx-key--fn { font-size: 15px; color: #4a4d63; }
.nx-key--fn.is-on { background: #6547eb; color: #fff; border-color: #6547eb; }
.nx-key--op { background: #f1effd; color: #6547eb; font-size: 20px; }
.nx-key--clear { color: #b4501e; }
.nx-key--eq { background: #6547eb; color: #fff; border-color: #6547eb; font-size: 22px; }
.nx-key--eq:hover { background: #5a3fd6; }
.nx-calc__history { list-style: none; padding: 0; margin: 0 0 14px; max-height: 360px; overflow-y: auto; }
.nx-calc__history li { padding: 9px 4px; border-bottom: 1px solid var(--nx-line); }
.nx-calc__history button { all: unset; display: block; width: 100%; cursor: pointer; text-align: right; font-family: "IBM Plex Mono", monospace; }
.nx-calc__history button:hover .h-res { color: #6547eb; }
.nx-calc__history .h-expr { display: block; font-size: 13px; color: #55597a; word-break: break-all; }
.nx-calc__history .h-res { display: block; font-size: 17px; font-weight: 700; }
@media (max-width: 860px) { .nx-calc { grid-template-columns: 1fr; } .nx-key { height: 48px; font-size: 15px; } }
/* Stopwatch & timer */
.nx-tabs { display: inline-flex; gap: 4px; padding: 4px; background: #eeedf7; border-radius: 14px; margin-bottom: 18px; }
.nx-tab { border: 0; background: transparent; padding: 10px 20px; border-radius: 10px; font: 600 15px Inter, sans-serif; color: #55597a; cursor: pointer; }
.nx-tab.is-active { background: #fff; color: #6547eb; box-shadow: 0 2px 6px rgba(23, 24, 46, .08); }
.nx-clock { font: 700 clamp(48px, 11vw, 96px)/1.1 "IBM Plex Mono", monospace; text-align: center; letter-spacing: -2px; margin: 18px 0; font-variant-numeric: tabular-nums; }
.nx-clock.is-done { color: #b4501e; animation: nx-blink 1s steps(2, start) infinite; }
@keyframes nx-blink { to { visibility: hidden; } }
.nx-clock-btns { display: flex; justify-content: center; gap: 12px; margin-bottom: 14px; }
.nx-clock-btns .btn { min-width: 120px; }
.nx-presets { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 6px; }
.nx-progress { height: 8px; border-radius: 4px; background: #eef0f5; overflow: hidden; margin: 0 auto 18px; max-width: 520px; }
.nx-progress > div { height: 100%; width: 100%; background: #6547eb; transition: width .25s linear; }
.nx-prayers td:last-child { font: 700 17px "IBM Plex Mono", monospace; }
.nx-prayers tr.is-next td { background: #e3f4ec; color: #146c43; }
.nx-prayers tr.is-sunrise td { color: #55597a; font-weight: 500; }
/* Footer links: colour change on hover, no underline. */
.site-footer a, .site-footer a:hover, .site-footer a:focus { text-decoration: none !important; }
.site-footer a { transition: color .15s; }
.site-footer a:focus-visible { outline: 2px solid #b8abd6; outline-offset: 2px; border-radius: 4px; }
.nx-contact-email a:not(.btn) { color: #6547eb; font-weight: 600; text-decoration: none; }
/* Typing speed test */
.nx-type { font: 500 22px/1.8 "IBM Plex Mono", monospace; background: #f6f6fb; border: 1px solid var(--nx-line); border-radius: 14px; padding: 18px 20px; height: calc(1.8em * 3 + 36px); overflow: hidden; color: #9a9db8; user-select: none; word-break: break-word; }
.nx-type span.ok { color: #17182e; }
.nx-type span.bad { color: #c0362c; background: #fde2df; border-radius: 3px; }
.nx-type span.cur { border-left: 2px solid #6547eb; margin-left: -2px; animation: nx-caret 1s steps(2, start) infinite; }
@keyframes nx-caret { to { border-left-color: transparent; } }
body.studio-ui .tool-panel textarea.nx-type__input { margin-top: 12px; width: 100%; font: 500 17px "IBM Plex Mono", monospace; resize: none; }
/* QR scanner */
.nx-scan { position: relative; margin-top: 14px; border-radius: 16px; overflow: hidden; background: #17182e; max-width: 520px; }
.nx-scan video { display: block; width: 100%; }
.nx-scan__frame { position: absolute; inset: 15%; border: 3px solid rgba(255, 255, 255, .85); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .25); }
.nx-np-bar { display: flex; justify-content: space-between; font-size: 13px; color: #55597a; margin-top: -4px; }
/* Fancy text */
.nx-fancy { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.nx-fancy button { all: unset; box-sizing: border-box; width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid var(--nx-line); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.nx-fancy button:hover, .nx-fancy button:focus-visible { border-color: #6547eb; background: #f6f4ff; }
.nx-fancy .t { font-size: 20px; overflow-wrap: anywhere; }
.nx-fancy .n { flex: 0 0 auto; font-size: 12px; font-weight: 600; color: #8a8db0; }
.nx-fancy button.copied .n { color: #1d7a52; }
.nx-morse-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.nx-morse-grid div { border: 1px solid var(--nx-line); border-radius: 10px; padding: 8px 10px; display: flex; justify-content: space-between; font: 600 15px "IBM Plex Mono", monospace; }
.nx-morse-grid b { font-family: Inter, sans-serif; }
body.studio-ui .tool-panel .nx-grades input { width: 100%; min-width: 80px; box-sizing: border-box; }
.nx-grades td:last-child { width: 44px; text-align: center !important; }
.nx-grades .gr-del { border: 0; background: none; color: #9a9db8; font-size: 20px; cursor: pointer; }
.nx-grades .gr-del:hover { color: #c0362c; }
.nx-sip-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin-top: 18px; background: #eef0f5; }
.nx-sip-bar span:first-child { background: #c9bdfb; } .nx-sip-bar span:last-child { background: #6547eb; }
.nx-sip-legend { display: flex; gap: 18px; font-size: 13px; color: #55597a; margin-top: 8px; }
.nx-sip-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
/* Webcam & mic test */
.nx-av-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 860px) { .nx-av-grid { grid-template-columns: 1fr; } }
.nx-av-video { position: relative; aspect-ratio: 16 / 9; background: #17182e; border-radius: 14px; overflow: hidden; display: flex; align-items: center; justify-content: center; color: #a9abd0; font-weight: 600; }
.nx-av-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.nx-av-meter { height: 22px; border-radius: 11px; background: #eef0f5; overflow: hidden; margin-top: 8px; }
.nx-av-meter div { height: 100%; width: 0; background: linear-gradient(90deg, #1d7a52, #6547eb 60%, #c0362c); transition: width .08s linear; }
.nx-av-label { display: flex; justify-content: space-between; font-size: 12px; color: #8a8db0; margin-top: 6px; }
.nx-av-label #av-db { font-weight: 700; color: #17182e; }
.nx-av-info { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: #f6f6fb; font-size: 14px; color: #2b2d4a; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
/* Image to text (OCR) */
.nx-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 34px 20px; border: 2px dashed #cfd1e1; border-radius: 16px; background: #fbfbfe; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.nx-drop:hover, .nx-drop:focus-visible, .nx-drop.is-over { border-color: #6547eb; background: #f6f4ff; outline: none; }
#ocr-preview { display: block; max-width: 100%; max-height: 320px; margin: 14px auto 0; border-radius: 12px; border: 1px solid var(--nx-line); }
#ocr-output[dir="rtl"] { text-align: right; }

/* ---------- Blog (/blog and /blog/{slug}) ---------- */
.nx-blog { font-family: Inter, system-ui, sans-serif; color: var(--nx-ink); padding: 34px 0 64px; }
.nx-blog a { text-decoration: none; }
.nx-blog__title { font-family: "Space Grotesk", Inter, sans-serif; font-size: clamp(32px, 4vw, 46px); letter-spacing: -1px; margin: 0 0 10px; }
.nx-blog__title span { color: var(--nx-brand); }
.nx-blog__intro { color: var(--nx-soft); font-size: 18px; max-width: 720px; margin: 0 0 24px; }
.nx-blog__empty { color: var(--nx-soft); font-size: 16px; }
.nx-blog__chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 30px; }
.nx-blog__chips a { padding: 8px 18px; border-radius: 999px; border: 1px solid var(--nx-line); color: var(--nx-ink); font-weight: 600; font-size: 14.5px; background: #fff; }
.nx-blog__chips a:hover { border-color: var(--nx-brand); color: var(--nx-brand); }
.nx-blog__chips a.is-active { background: var(--nx-brand); border-color: var(--nx-brand); color: #fff; }

.nx-blog-cover { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.nx-blog-cover--blank { display: flex; align-items: center; justify-content: center; }
.nx-blog-cover--blank span { color: #fff; font-family: "Space Grotesk", Inter, sans-serif; font-weight: 700; font-size: clamp(26px, 4vw, 46px); opacity: .95; }

.nx-blog-featured { display: grid; grid-template-columns: 1.3fr 1fr; gap: 0; border-radius: var(--nx-radius); overflow: hidden; border: 1px solid #e6e1fb; background: #f6f4ff; margin-bottom: 32px; color: var(--nx-ink); }
.nx-blog-featured .nx-blog-cover { height: 100%; aspect-ratio: auto; min-height: 280px; }
.nx-blog-featured__body { padding: 34px; display: flex; flex-direction: column; justify-content: center; }
.nx-blog-featured h2 { font-family: "Space Grotesk", Inter, sans-serif; font-size: 28px; line-height: 1.2; margin: 10px 0 12px; }
.nx-blog-featured p { color: var(--nx-soft); font-size: 16px; line-height: 1.55; margin: 0 0 16px; }
.nx-blog-featured:hover h2 { color: var(--nx-brand); }
.nx-blog-kicker { font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--nx-brand); }
.nx-blog-meta { font-size: 13.5px; color: #8a8db0; }

.nx-blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.nx-blog-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--nx-line); border-radius: 18px; overflow: hidden; color: var(--nx-ink); transition: transform .15s, box-shadow .15s; }
.nx-blog-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(23, 24, 46, .08); }
.nx-blog-card:hover h2, .nx-blog-card:hover h3 { color: var(--nx-brand); }
.nx-blog-card__body { padding: 18px 20px 22px; }
.nx-blog-card__top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.nx-blog-card h2, .nx-blog-card h3 { font-size: 18.5px; line-height: 1.3; margin: 0 0 8px; }
.nx-blog-card h3 { font-size: 16px; margin: 8px 0 0; }
.nx-blog-card p { color: var(--nx-soft); font-size: 14.5px; line-height: 1.5; margin: 0; }
.nx-blog-pill { display: inline-block; font-size: 12px; font-weight: 700; color: var(--nx-brand); background: #efeafe; border-radius: 999px; padding: 4px 11px; }

.nx-blog-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 36px; }
.nx-blog-pages a { min-width: 40px; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--nx-line); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; color: var(--nx-ink); background: #fff; }
.nx-blog-pages a.is-active { background: var(--nx-brand); border-color: var(--nx-brand); color: #fff; }

/* Article page */
.nx-blog-post { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.nx-blog-post__main { max-width: 780px; }
.nx-blog-post__main > h1 { font-family: "Space Grotesk", Inter, sans-serif; font-size: clamp(30px, 3.6vw, 42px); line-height: 1.15; letter-spacing: -.8px; margin: 14px 0; }
.nx-blog-post__main > .nx-blog-cover { border-radius: 20px; margin-bottom: 26px; }
.nx-blog-draft { background: #fff7e6; border: 1px solid #f2d28b; color: #7a5300; border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-bottom: 16px; }
.nx-blog-byline { display: flex; align-items: center; gap: 12px; color: var(--nx-soft); font-size: 15px; margin-bottom: 24px; }
.nx-blog-byline b { color: var(--nx-ink); }
.nx-blog-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--nx-brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.nx-blog-tool { display: flex; align-items: center; gap: 16px; border: 1px solid #e6e1fb; background: #f6f4ff; border-radius: 16px; padding: 16px 18px; margin: 0 0 28px; color: var(--nx-ink); }
.nx-blog-tool__icon { width: 46px; height: 46px; border-radius: 12px; background: var(--nx-brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.nx-blog-tool__icon svg { width: 22px; height: 22px; }
.nx-blog-tool__text { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--nx-soft); }
.nx-blog-tool__text b { color: var(--nx-ink); font-size: 16px; }
.nx-blog-tool__btn { padding: 10px 16px; border-radius: 11px; background: var(--nx-brand); color: #fff; font-weight: 700; white-space: nowrap; }
.nx-blog-tool:hover .nx-blog-tool__btn { background: var(--nx-brand-dark); }

.nx-blog-content { font-size: 18px; line-height: 1.75; color: #2b2d4a; }
.nx-blog-content h2 { font-family: "Space Grotesk", Inter, sans-serif; font-size: 27px; line-height: 1.25; color: var(--nx-ink); margin: 38px 0 12px; scroll-margin-top: 90px; }
.nx-blog-content h3 { font-size: 21px; color: var(--nx-ink); margin: 28px 0 10px; scroll-margin-top: 90px; }
.nx-blog-content h4 { font-size: 18px; color: var(--nx-ink); margin: 22px 0 8px; }
.nx-blog-content p { margin: 0 0 18px; }
.nx-blog-content a { color: var(--nx-brand); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.nx-blog-content ul, .nx-blog-content ol { margin: 0 0 18px; padding-left: 1.4em; }
.nx-blog-content li { margin-bottom: 6px; }
.nx-blog-content img { max-width: 100%; height: auto; border-radius: 14px; }
.nx-blog-content blockquote { margin: 0 0 18px; padding: 12px 18px; border-left: 4px solid var(--nx-brand); background: #f6f4ff; border-radius: 0 12px 12px 0; }
.nx-blog-content blockquote p { margin: 0; }
.nx-blog-content code { font-family: "IBM Plex Mono", monospace; font-size: .88em; background: #f1f1f7; border-radius: 6px; padding: 2px 6px; }
.nx-blog-content pre { background: #17182e; color: #e9e9f4; border-radius: 14px; padding: 18px 20px; overflow-x: auto; margin: 0 0 22px; font-size: 14.5px; line-height: 1.6; }
.nx-blog-content pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.nx-blog-content hr { border: 0; border-top: 1px solid var(--nx-line); margin: 32px 0; }
.nx-blog-table { overflow-x: auto; margin: 0 0 22px; border: 1px solid var(--nx-line); border-radius: 14px; }
.nx-blog-table table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
.nx-blog-table th, .nx-blog-table td { text-align: left; padding: 11px 16px; border-bottom: 1px solid #eef0f6; }
.nx-blog-table th { background: #f7f7fb; font-weight: 700; color: var(--nx-ink); }
.nx-blog-table tr:last-child td { border-bottom: 0; }
.nx-blog-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; }
.nx-blog-tags span { font-size: 13.5px; color: var(--nx-soft); border: 1px solid var(--nx-line); border-radius: 999px; padding: 4px 12px; }
.nx-blog-more { margin-top: 44px; }
.nx-blog-more h2 { font-family: "Space Grotesk", Inter, sans-serif; font-size: 24px; margin: 0 0 16px; }
.nx-blog-grid--small { grid-template-columns: repeat(3, 1fr); gap: 18px; }

.nx-blog-side { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 18px; }
.nx-blog-box { border: 1px solid var(--nx-line); border-radius: 16px; padding: 18px 20px; background: #fff; display: flex; flex-direction: column; }
.nx-blog-box__title { font-weight: 700; margin: 0 0 8px; }
.nx-blog-box a { font-size: 14.5px; color: var(--nx-soft); padding: 5px 0; line-height: 1.4; }
.nx-blog-box a.is-sub { padding-left: 14px; font-size: 13.5px; }
.nx-blog-box a:hover, .nx-blog-box a b { color: var(--nx-brand); }

@media (max-width: 1100px) {
  .nx-blog-post { grid-template-columns: 1fr; }
  .nx-blog-post__side { display: none; }
  .nx-blog-post__main { max-width: none; }
}
@media (max-width: 900px) {
  .nx-blog-grid, .nx-blog-grid--small { grid-template-columns: repeat(2, 1fr); }
  .nx-blog-featured { grid-template-columns: 1fr; }
  .nx-blog-featured .nx-blog-cover { min-height: 0; aspect-ratio: 16 / 9; }
}
@media (max-width: 600px) {
  .nx-blog-grid, .nx-blog-grid--small { grid-template-columns: 1fr; }
  .nx-blog-featured__body { padding: 22px; }
  .nx-blog-content { font-size: 17px; }
  .nx-blog-tool { flex-wrap: wrap; }
  .nx-blog-tool__btn { width: 100%; text-align: center; }
}
