/* Nisha Harizan — GeneratePress child. Tokens live here only. */

:root {
  --nh-primary: #0F172A;
  --nh-secondary: #2563EB;
  --nh-accent: #0F766E;
  --nh-highlight: #B45309;
  --nh-background: #F4F1EA;
  --nh-surface: #FFFCF7;
  --nh-text: #1E293B;
  --nh-muted: #5B6573;
  --nh-border: #E4DDD0;
  --nh-success: #15803D;
  --nh-warning: #B45309;
  --nh-danger: #B91C1C;
  --nh-primary-foreground: #F8FAFC;
  --nh-accent-foreground: #F8FAFC;
  --nh-secondary-foreground: #FFFFFF;
  --nh-ad: #EEF2F6;
  --nh-paper-tint: #EBE4D6;
  --nh-font-sans: "Source Sans 3", "Noto Sans Devanagari", "Nirmala UI", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --nh-font-serif: "Source Serif 4", "Noto Serif Devanagari", Georgia, ui-serif, "Times New Roman", serif;
  --nh-shadow:
    0 0 0 1px color-mix(in srgb, var(--nh-primary) 7%, transparent),
    0 1px 2px -1px color-mix(in srgb, var(--nh-primary) 6%, transparent),
    0 4px 12px -4px color-mix(in srgb, var(--nh-primary) 6%, transparent);
  --nh-shadow-hover:
    0 0 0 1px color-mix(in srgb, var(--nh-accent) 28%, transparent),
    0 8px 20px -8px color-mix(in srgb, var(--nh-primary) 14%, transparent);
  --nh-radius-sm: 8px;
  --nh-radius-md: 12px;
  --nh-radius-lg: 18px;
  --nh-header-h: 64px;
  --nh-container: 1200px;
  --nh-article: 46rem;
  color-scheme: light;
}

.dark {
  --nh-primary: #E8EEF6;
  --nh-primary-foreground: #0B1220;
  --nh-secondary: #60A5FA;
  --nh-secondary-foreground: #0B1220;
  --nh-accent: #2DD4BF;
  --nh-accent-foreground: #042F2E;
  --nh-highlight: #FBBF24;
  --nh-background: #0B1220;
  --nh-surface: #141C2B;
  --nh-text: #E2E8F0;
  --nh-muted: #94A3B8;
  --nh-border: #243044;
  --nh-success: #4ADE80;
  --nh-warning: #FBBF24;
  --nh-danger: #F87171;
  --nh-ad: #1A2436;
  --nh-paper-tint: #101828;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not(.nh-force-light) {
    --nh-primary: #E8EEF6;
    --nh-primary-foreground: #0B1220;
    --nh-secondary: #60A5FA;
    --nh-secondary-foreground: #0B1220;
    --nh-accent: #2DD4BF;
    --nh-accent-foreground: #042F2E;
    --nh-highlight: #FBBF24;
    --nh-background: #0B1220;
    --nh-surface: #141C2B;
    --nh-text: #E2E8F0;
    --nh-muted: #94A3B8;
    --nh-border: #243044;
    --nh-success: #4ADE80;
    --nh-warning: #FBBF24;
    --nh-danger: #F87171;
    --nh-ad: #1A2436;
    --nh-paper-tint: #101828;
    color-scheme: dark;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body,
body.nh-theme {
  margin: 0;
  background: var(--nh-background);
  color: var(--nh-text);
  font-family: var(--nh-font-sans);
  line-height: 1.6;
  font-size: 16px;
}

body.nh-theme #page,
body.nh-theme .site { background: var(--nh-background); }

h1, h2, h3, h4 {
  font-family: var(--nh-font-serif);
  color: var(--nh-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

a { color: var(--nh-accent); }
a:hover { color: var(--nh-primary); }

img { max-width: 100%; height: auto; }

.nh-skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100000;
  background: var(--nh-primary);
  color: var(--nh-primary-foreground);
  padding: 0.5rem 0.9rem;
  border-radius: var(--nh-radius-sm);
}
.nh-skip-link:focus,
.nh-skip-link:focus-visible { top: 0.75rem; }

:focus-visible {
  outline: 2px solid var(--nh-accent);
  outline-offset: 3px;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  clip: auto;
  height: auto;
  width: auto;
  left: 1rem;
  top: 0.75rem;
  z-index: 100000;
  padding: 0.5rem 0.9rem;
  background: var(--nh-primary);
  color: var(--nh-primary-foreground);
}

.nh-container {
  --nh-gutter: 1rem;
  width: min(100% - (2 * var(--nh-gutter)), var(--nh-container));
  max-width: var(--nh-container);
  margin-inline: auto;
}
@media (min-width: 480px) {
  .nh-container { --nh-gutter: 1.25rem; }
}
@media (min-width: 768px) {
  .nh-container { --nh-gutter: 1.5rem; }
}
@media (min-width: 1024px) {
  .nh-container { --nh-gutter: 1.5rem; }
}

.nh-section { padding: 3rem 0; }
.nh-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--nh-accent);
}
.nh-hub-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}
.nh-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.4rem;
  padding: 0 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--nh-border);
  background: var(--nh-surface);
  color: var(--nh-primary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}
.nh-chip:hover { border-color: var(--nh-accent); color: var(--nh-accent); }
.nh-section-surface {
  background: var(--nh-surface);
  border-block: 1px solid var(--nh-border);
}
.nh-section-title {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2rem);
}
.nh-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.nh-section-lede {
  max-width: 40rem;
  color: var(--nh-muted);
  margin: 0.35rem 0 1.25rem;
}
.nh-link-more {
  color: var(--nh-accent);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
}
.nh-link-more:hover { text-decoration: underline; }

.nh-button,
.nh-button-accent,
.nh-button-outline,
.nh-button-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.nh-button:hover,
.nh-button-accent:hover,
.nh-button-outline:hover { filter: brightness(1.05); }

.nh-button,
.nh-button-accent {
  background: var(--nh-accent);
  color: var(--nh-accent-foreground);
}
.nh-button-outline {
  background: transparent;
  border-color: var(--nh-border);
  color: var(--nh-primary);
}
.nh-button-ghost {
  background: transparent;
  color: var(--nh-text);
}

.nh-icon { display: inline-flex; }
.nh-icon svg { width: 20px; height: 20px; display: block; }

/* Announcement */
.nh-announcement {
  background: var(--nh-primary);
  color: var(--nh-primary-foreground);
}
.nh-announcement-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 36px;
  padding: 0.35rem 0;
  text-align: center;
  font-size: 0.78rem;
}
.nh-announcement a { color: inherit; text-decoration: none; }
.nh-announcement a:hover { text-decoration: underline; }

/* Header */
.nh-header,
.nh-site-header {
  border-bottom: 1px solid var(--nh-border);
  background: color-mix(in srgb, var(--nh-surface) 95%, transparent);
  backdrop-filter: blur(10px);
}
.nh-header-sticky,
body.nh-sticky-header .nh-header,
body.nh-sticky-header .nh-site-header {
  position: sticky;
  top: 0;
  z-index: 40;
}
.admin-bar .nh-header-sticky,
.admin-bar.nh-sticky-header .nh-header { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .nh-header-sticky,
  .admin-bar.nh-sticky-header .nh-header { top: 46px; }
}

.nh-header-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--nh-header-h);
}

.nh-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--nh-primary);
  flex-shrink: 0;
}
.nh-logo-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--nh-primary);
  color: var(--nh-primary-foreground);
}
.nh-logo-name {
  display: block;
  font-family: var(--nh-font-serif);
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.nh-logo-sub {
  display: none;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nh-muted);
}
@media (min-width: 640px) {
  .nh-logo-sub { display: block; }
}

.nh-nav,
.nh-nav-desktop {
  display: none;
  margin-left: auto;
}
.nh-menu {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nh-menu > li > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 550;
  text-decoration: none;
  color: var(--nh-text);
}
.nh-menu > li > a:hover,
.nh-menu > .current-menu-item > a {
  background: var(--nh-background);
  color: var(--nh-accent);
}
.nh-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 14rem;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  background: var(--nh-surface);
  border-radius: 10px;
  box-shadow: var(--nh-shadow);
  z-index: 20;
}
.nh-menu .menu-item-has-children { position: relative; }
.nh-menu .menu-item-has-children:hover > .sub-menu,
.nh-menu .menu-item-has-children:focus-within > .sub-menu,
.nh-menu .menu-item-has-children.is-open > .sub-menu { display: block; }
.nh-menu .sub-menu a {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--nh-text);
}
.nh-menu .sub-menu a:hover { background: var(--nh-background); }

.nh-header-actions {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
}
.nh-icon-btn,
button.nh-icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--nh-text);
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}
.nh-icon-btn:hover,
.nh-icon-btn:focus,
.nh-icon-btn:focus-visible,
button.nh-icon-btn:hover,
button.nh-icon-btn:focus,
button.nh-icon-btn:focus-visible {
  background: var(--nh-background);
  color: var(--nh-primary);
}

.nh-mobile-panel[hidden],
.nh-mobile-nav[hidden],
.nh-search-dialog[hidden] { display: none !important; }

.nh-mobile-panel:not([hidden]),
.nh-mobile-nav.is-open {
  display: block;
  border-top: 1px solid var(--nh-border);
  background: var(--nh-surface);
}
.nh-mobile-panel .nh-menu,
.nh-mobile-nav .nh-menu {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0.5rem 0 1rem;
}
.nh-mobile-panel .nh-menu > li > a,
.nh-mobile-nav .nh-menu > li > a { min-height: 48px; }
.nh-mobile-panel .sub-menu,
.nh-mobile-nav .sub-menu {
  position: static;
  display: block;
  box-shadow: none;
  background: transparent;
  padding-left: 0.75rem;
}

.nh-menu-toggle { display: grid; }
body.nh-menu-open { overflow: hidden; }

@media (min-width: 1024px) {
  .nh-nav,
  .nh-nav-desktop { display: block; }
  .nh-menu-toggle { display: none; }
  .nh-mobile-panel,
  .nh-mobile-panel:not([hidden]),
  .nh-mobile-nav,
  .nh-mobile-nav.is-open { display: none !important; }
  .nh-header-actions { margin-left: 0.35rem; }
}

.nh-search-dialog {
  position: fixed;
  inset: 0;
  z-index: 80;
}
.nh-search-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: color-mix(in srgb, var(--nh-primary) 45%, transparent);
  cursor: pointer;
}
.nh-search-dialog .nh-search-panel,
.nh-search-panel.is-dialog {
  display: block;
  position: relative;
  z-index: 1;
  width: calc(100% - 2rem);
  max-width: 36rem;
  margin: 12vh auto 0;
  padding: 1rem 1.15rem 1.2rem;
  background: var(--nh-surface);
  border: 1px solid var(--nh-border);
  border-radius: var(--nh-radius-md);
  box-shadow: var(--nh-shadow-hover);
}
.nh-search-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.nh-search-dialog-title {
  font-family: var(--nh-font-serif);
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--nh-primary);
}
.nh-search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.nh-search-inline {
  max-width: 34rem;
  margin-top: 1rem;
}
.nh-search-form input[type="search"] {
  flex: 1 1 14rem;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--nh-border);
  background: var(--nh-background);
  color: var(--nh-text);
  border-radius: 8px;
  padding: 0 0.9rem;
  font: inherit;
}

/* Cards */
.nh-card,
.nh-post-card,
.nh-category-card,
.nh-tool-card,
.nh-directory-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--nh-surface);
  border-radius: var(--nh-radius-md);
  box-shadow: var(--nh-shadow);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.nh-card:not(.is-list):hover,
.nh-post-card:not(.is-list):hover,
.nh-category-card:hover,
.nh-tool-card:hover,
.nh-directory-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--nh-shadow-hover);
}
.nh-lead-article {
  background: var(--nh-surface);
  border-radius: var(--nh-radius-md);
  box-shadow: var(--nh-shadow);
  overflow: hidden;
}
.nh-lead-thumbnail {
  display: block;
  margin: 0;
  overflow: hidden;
}
.nh-lead-thumbnail img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.nh-lead-content {
  padding: 1.25rem 1.35rem 1.35rem;
}
.nh-lead-title {
  margin: 0.45rem 0 0.5rem;
  font-family: var(--nh-font-serif);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  line-height: 1.25;
  color: var(--nh-primary);
}
.nh-lead-title a {
  color: inherit;
  text-decoration: none;
}
.nh-lead-title a:hover { color: var(--nh-accent); }
.nh-lead-excerpt {
  margin: 0;
  color: var(--nh-muted);
  font-size: 0.96rem;
  line-height: 1.6;
}
.nh-stack {
  display: grid;
  gap: 0.85rem;
  margin: 0 0 1.15rem;
}
.nh-card-media { display: block; overflow: hidden; }
.nh-post-card img,
.nh-post-card .nh-thumb,
.nh-thumb {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
  display: block;
}
.nh-post-card:hover img { transform: none; }
.nh-thumb-fallback {
  display: block;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--nh-paper-tint), var(--nh-ad));
}
.nh-card-body,
.nh-post-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.05rem 1.15rem 1.2rem;
}
.nh-card-title,
.nh-post-card-title {
  margin: 0.35rem 0;
  font-family: var(--nh-font-serif);
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--nh-primary);
}
.nh-card-title a,
.nh-post-card-title a { color: inherit; text-decoration: none; }
.nh-card-title a:hover,
.nh-post-card:hover .nh-post-card-title a { color: var(--nh-accent); }
.nh-card-excerpt,
.nh-post-card-excerpt {
  margin: 0;
  color: var(--nh-muted);
  font-size: 0.92rem;
  flex: 1;
}
.nh-card-meta {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
  color: var(--nh-muted);
}
.nh-post-card.is-large .nh-card-title { font-size: 1.55rem; }
.nh-pills { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; }
.nh-pill,
.nh-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.6rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  background: var(--nh-background);
  color: var(--nh-muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
}
.nh-cat-mark {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 8px;
  background: var(--nh-primary);
  color: var(--nh-primary-foreground);
  font-family: var(--nh-font-serif);
  margin: 1rem 1.1rem 0;
}
.nh-category-card { padding-bottom: 1rem; }
.nh-category-card h3 { margin: 0.6rem 1.1rem 0.2rem; font-size: 1.1rem; }
.nh-category-card p { margin: 0 1.1rem; color: var(--nh-muted); font-size: 0.9rem; }
.nh-tool-card,
.nh-directory-card { padding: 1.1rem; }
.nh-tool-card .nh-button { margin-top: 0.85rem; align-self: flex-start; }
.nh-np-name { color: var(--nh-muted); margin: 0.2rem 0 0; }
.nh-loc { display: flex; gap: 0.3rem; align-items: center; color: var(--nh-muted); font-size: 0.85rem; }
.nh-text-link {
  color: var(--nh-accent);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  margin-top: 0.6rem;
}
.nh-text-link:hover { text-decoration: underline; }

.nh-grid { display: grid; gap: 1.25rem; }
.nh-grid-2, .nh-grid-3, .nh-grid-4 { grid-template-columns: 1fr; }
.nh-featured-layout { display: grid; gap: 2rem; }
.nh-featured-stack {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--nh-border);
}
.nh-featured-item {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--nh-border);
  align-items: start;
}
.nh-featured-num {
  font-family: var(--nh-font-serif);
  font-size: 1.05rem;
  color: var(--nh-accent);
  font-weight: 600;
  line-height: 1.4;
  padding-top: 0.15rem;
}
.nh-post-card.is-lead {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--nh-surface);
  box-shadow: none;
  border: 1px solid var(--nh-border);
}
@media (min-width: 640px) {
  .nh-post-card.is-lead { grid-template-columns: 10.5rem minmax(0, 1fr); }
}
.nh-post-card.is-lead .nh-card-media img {
  aspect-ratio: 4 / 3;
  height: 100%;
  object-fit: cover;
}
.nh-post-card.is-lead .nh-card-title { font-size: 1.45rem; }
.nh-post-card.is-list {
  display: block;
  background: transparent;
  box-shadow: none;
  border: 0;
  border-radius: 0;
}
.nh-post-card.is-list .nh-card-body { padding: 0; }
.nh-post-card.is-list .nh-card-title { font-size: 1.05rem; margin: 0.15rem 0; }
@media (min-width: 640px) {
  .nh-grid-2 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  .nh-grid-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .nh-featured-layout { grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr); align-items: start; }
}
@media (min-width: 1024px) {
  .nh-grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Hero */
.nh-hero { background: var(--nh-surface); border-bottom: 1px solid var(--nh-border); }
.nh-hero-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--nh-accent);
}
.nh-hero-panel {
  display: grid;
  gap: 2.5rem;
  padding: 2.5rem 0 3rem;
  align-items: center;
}
.nh-hero-panel h1 {
  margin: 0.4rem 0 0;
  font-size: clamp(2.1rem, 5vw, 3rem);
}
.nh-hero-panel .nh-hero-sub {
  font-family: var(--nh-font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--nh-muted);
  margin: 0.5rem 0 0;
}
.nh-hero-panel .nh-hero-intro { margin: 1rem 0 0; max-width: 38rem; }
.nh-hero-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.4rem; }
.nh-hero-panel figure { margin: 0; }
.nh-hero-panel img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--nh-radius-md);
  max-height: 22rem;
}
@media (min-width: 768px) {
  .nh-hero-panel { grid-template-columns: 1.2fr 0.8fr; }
}

/* Article */
.nh-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .nh-article-layout { grid-template-columns: minmax(0, 1fr) 18.5rem; }
  .nh-article-layout.nh-layout-no-aside { grid-template-columns: minmax(0, 1fr); }
  .nh-article-layout.nh-layout-has-toc-sidebar {
    display: flex;
    flex-wrap: nowrap;
    gap: 2rem;
    align-items: flex-start;
  }
}

.nh-article-left-sidebar {
  width: 100%;
  flex-shrink: 0;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@media (min-width: 1024px) {
  .nh-article-left-sidebar {
    width: 250px;
    position: sticky;
    top: calc(var(--nh-header-h) + 1.5rem);
  }
  .nh-article-left-sidebar.toc-is-closed { width: 44px; }
  .nh-article-left-sidebar.toc-is-closed .nh-toc-content-wrapper {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    height: 0;
    overflow: hidden;
  }
  .nh-article-left-sidebar.toc-is-closed .nh-toc-toggle-label { display: none; }
  .nh-article-left-sidebar.toc-is-closed .nh-toc-toggle-icon { transform: rotate(180deg); }
}

.nh-toc-toggle-btn,
button.nh-toc-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.25rem 0.5rem;
  margin-bottom: 0.35rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--nh-primary);
}
.nh-toc-toggle-btn:hover,
.nh-toc-toggle-btn:focus,
.nh-toc-toggle-btn:focus-visible,
button.nh-toc-toggle-btn:hover,
button.nh-toc-toggle-btn:focus,
button.nh-toc-toggle-btn:focus-visible {
  background: var(--nh-surface);
  border-color: var(--nh-border);
  color: var(--nh-accent);
}
.nh-toc-toggle-icon {
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.nh-article-main {
  flex: 1 1 auto;
  min-width: 0;
}
.nh-layout-has-toc-sidebar .nh-article-main .nh-prose,
.nh-layout-has-toc-sidebar .nh-article-main .nh-article-body {
  max-width: 100%;
}

.nh-article-aside {
  width: 100%;
  min-width: 0;
  flex-shrink: 0;
}
@media (min-width: 1024px) {
  .nh-article-aside {
    width: 18.5rem;
    position: sticky;
    top: calc(var(--nh-header-h) + 1.5rem);
  }
}

.nh-article-header h1 {
  margin: 0.35rem 0;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}
.nh-excerpt { font-size: 1.1rem; color: var(--nh-muted); }
.nh-byline { display: flex; flex-wrap: wrap; gap: 0.35rem; color: var(--nh-muted); font-size: 0.9rem; }
.nh-featured-media { margin: 0 0 1.35rem; }
.nh-featured-media img { width: 100%; border-radius: var(--nh-radius-md); aspect-ratio: 16 / 9; object-fit: cover; display: block; }

.nh-prose,
.nh-article-body {
  max-width: var(--nh-article);
  font-size: 1.05rem;
  line-height: 1.7;
}
.nh-prose > * + *,
.nh-article-body > * + * { margin-top: 1.1rem; }
.nh-prose h2,
.nh-article-body h2 {
  margin-top: 2.2rem;
  font-size: 1.55rem;
  scroll-margin-top: 5.5rem;
}
.nh-prose h3,
.nh-article-body h3 {
  margin-top: 1.65rem;
  font-size: 1.22rem;
  scroll-margin-top: 5.5rem;
}
.nh-prose a,
.nh-article-body a { text-underline-offset: 2px; }
.nh-prose ul, .nh-prose ol { padding-left: 1.35rem; }
.nh-prose li + li { margin-top: 0.35rem; }
.nh-prose blockquote {
  margin: 1.5rem 0;
  padding: 0.85rem 1.15rem;
  border-left: 3px solid var(--nh-accent);
  background: var(--nh-surface);
  border-radius: 0 var(--nh-radius-sm) var(--nh-radius-sm) 0;
  color: var(--nh-primary);
  font-family: var(--nh-font-serif);
  font-size: 1.08rem;
}
.nh-prose blockquote p:last-child { margin-bottom: 0; }
.nh-prose hr {
  border: 0;
  border-top: 1px solid var(--nh-border);
  margin: 2rem 0;
}
.nh-prose figcaption {
  margin-top: 0.45rem;
  font-size: 0.85rem;
  color: var(--nh-muted);
  text-align: center;
}

.nh-post-navigation {
  margin: 2rem 0 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--nh-border);
}
.nh-post-navigation .nav-links {
  display: grid;
  gap: 0.85rem;
}
@media (min-width: 640px) {
  .nh-post-navigation .nav-links { grid-template-columns: 1fr 1fr; }
}
.nh-post-navigation a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  height: 100%;
  padding: 0.9rem 1rem;
  background: var(--nh-surface);
  border: 1px solid var(--nh-border);
  border-radius: var(--nh-radius-md);
  text-decoration: none;
  color: var(--nh-primary);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.nh-post-navigation a:hover {
  border-color: var(--nh-accent);
  box-shadow: var(--nh-shadow);
}
.nh-post-navigation .nav-next a { text-align: right; }
.nh-post-nav-label {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nh-accent);
}
.nh-post-nav-title {
  font-family: var(--nh-font-serif);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.nh-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.nh-table-wrap table { width: 100%; border-collapse: collapse; min-width: 32rem; }
.nh-table-wrap th, .nh-table-wrap td {
  border: 1px solid var(--nh-border);
  padding: 0.55rem 0.7rem;
  text-align: left;
}
.nh-table-wrap th { background: var(--nh-surface); }

.nh-info-box, .is-style-nh-info,
.nh-warning-box, .is-style-nh-warning,
.nh-tip-box, .is-style-nh-tip,
.nh-step-box, .is-style-nh-step,
.nh-requirements-box, .is-style-nh-requirements {
  padding: 1rem 1.1rem;
  border-radius: 8px;
  border-left: 4px solid var(--nh-secondary);
  background: color-mix(in srgb, var(--nh-secondary) 10%, var(--nh-surface));
}
.nh-warning-box, .is-style-nh-warning {
  border-left-color: var(--nh-warning);
  background: color-mix(in srgb, var(--nh-warning) 12%, var(--nh-surface));
}
.nh-tip-box, .is-style-nh-tip {
  border-left-color: var(--nh-accent);
  background: color-mix(in srgb, var(--nh-accent) 12%, var(--nh-surface));
}
.nh-step-box, .is-style-nh-step {
  border-left-color: var(--nh-primary);
  background: var(--nh-surface);
}
.nh-requirements-box, .is-style-nh-requirements {
  border-left-color: var(--nh-highlight);
  background: color-mix(in srgb, var(--nh-highlight) 10%, var(--nh-surface));
}
.nh-faq details {
  border: 1px solid var(--nh-border);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  background: var(--nh-surface);
}
.nh-faq summary { cursor: pointer; font-weight: 650; min-height: 44px; display: flex; align-items: center; }

.nh-toc {
  background: var(--nh-surface);
  border-radius: var(--nh-radius-md);
  box-shadow: var(--nh-shadow);
  padding: 0.75rem 1rem 1rem;
  margin: 1.25rem 0;
}
.nh-toc-toggle,
button.nh-toc-toggle {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 650;
  color: var(--nh-primary);
  cursor: pointer;
}
.nh-toc-toggle:hover,
.nh-toc-toggle:focus,
button.nh-toc-toggle:hover,
button.nh-toc-toggle:focus {
  background: transparent;
  color: var(--nh-accent);
}
.nh-toc ol, .nh-toc-list { list-style: none; margin: 0; padding: 0; }
.nh-toc a {
  display: block;
  padding: 0.35rem 0;
  color: var(--nh-muted);
  text-decoration: none;
  font-size: 0.92rem;
}
.nh-toc a:hover, .nh-toc a.is-active { color: var(--nh-accent); }
.nh-toc .is-h3 { padding-left: 0.9rem; }

.nh-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 1.5rem 0;
}
.nh-share a, .nh-share button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--nh-border);
  background: var(--nh-surface);
  color: var(--nh-text);
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}
.nh-share a:hover, .nh-share button:hover { border-color: var(--nh-accent); }

.nh-author-box {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 1rem;
  padding: 1.1rem;
  background: var(--nh-surface);
  border-radius: var(--nh-radius-md);
  box-shadow: var(--nh-shadow);
  margin: 1.5rem 0;
}
.nh-author-box img { border-radius: 50%; }
.nh-author-box h2 { margin: 0.2rem 0; font-size: 1.15rem; }
.nh-author-box p { margin: 0.35rem 0 0; color: var(--nh-muted); }
.nh-related { margin: 2rem 0; }
.nh-disclaimer-note { margin-top: 1.5rem; font-size: 0.88rem; color: var(--nh-muted); }

/* Ads — hidden unless an admin opts into reserved slots */
.nh-ad-slot { display: none; }
.nh-ad-slot.has-code {
  display: block;
  position: relative;
  background: var(--nh-ad);
  border-radius: 8px;
  overflow: hidden;
  margin: 1rem 0;
  min-height: 0;
}
.nh-ad-slot[data-slot="in-article"],
.nh-ad-slot[data-slot="sidebar"],
.nh-ad-slot[data-slot="mid_content"],
.nh-ad-slot[data-nh-ad="in-article"],
.nh-ad-slot[data-nh-ad="sidebar"] { min-height: 250px; }
.nh-ad-slot.has-code {
  display: block;
  letter-spacing: 0;
  text-transform: none;
  color: inherit;
  padding: 0.5rem;
}
.nh-ad-slot.has-code .nh-ad-label,
.nh-ad-slot .nh-ad-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nh-muted);
  margin-bottom: 0.35rem;
  text-align: center;
}

/* Footer */
.nh-footer,
.nh-site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--nh-border);
  background: var(--nh-surface);
}
.nh-footer-grid {
  display: grid;
  gap: 2rem;
  padding: 3rem 0 2.25rem;
}
@media (min-width: 768px) {
  .nh-footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
.nh-footer h2,
.nh-site-footer h2 {
  font-family: var(--nh-font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.85rem;
  color: var(--nh-primary);
}
.nh-footer-about { max-width: 20rem; color: var(--nh-muted); font-size: 0.92rem; line-height: 1.55; margin: 0.85rem 0 0; }
.nh-footer-menu { list-style: none; margin: 0; padding: 0; }
.nh-footer-menu a {
  display: inline-block;
  padding: 0.22rem 0;
  color: var(--nh-muted);
  text-decoration: none;
  font-size: 0.92rem;
}
.nh-footer-menu a:hover { color: var(--nh-accent); }
.nh-footer-bottom {
  border-top: 1px solid var(--nh-border);
  padding: 1rem 0 1.15rem;
  font-size: 0.82rem;
  color: var(--nh-muted);
}
.nh-footer-bottom-inner,
.nh-footer-base {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
}
.nh-footer-legal { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; margin: 0; }
.nh-footer-legal a { color: inherit; text-decoration: none; }
.nh-footer-legal a:hover { color: var(--nh-text); }

.nh-archive-desc { max-width: 40rem; color: var(--nh-muted); }
.nh-empty { color: var(--nh-muted); padding: 2rem 0; }
.nh-article-header { padding-bottom: 1.25rem; }
.nh-article-aside .widget { margin-bottom: 1.5rem; }

.nh-dir-meta {
  display: grid;
  gap: 0.65rem;
  margin: 1.25rem 0;
  padding: 1rem;
  background: var(--nh-surface);
  border-radius: var(--nh-radius-md);
  box-shadow: var(--nh-shadow);
}
.nh-dir-meta dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--nh-muted);
}
.nh-dir-meta dd { margin: 0.15rem 0 0; }
@media (min-width: 640px) {
  .nh-dir-meta { grid-template-columns: 1fr 1fr; }
}

.nh-breadcrumb { font-size: 0.85rem; margin: 1.25rem 0 0.75rem; color: var(--nh-muted); }
.nh-breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nh-breadcrumb-list li:not(:last-child)::after {
  content: "/";
  margin-left: 0.4rem;
  opacity: 0.55;
}
.nh-breadcrumb a { color: var(--nh-muted); text-decoration: none; }
.nh-breadcrumb a:hover { color: var(--nh-text); text-decoration: underline; }

.nh-page-header { padding: 1.5rem 0 1.5rem; }
.nh-page-header h1 { margin: 0.25rem 0 0; font-size: clamp(1.7rem, 3vw, 2.2rem); }
.nh-page-header p { color: var(--nh-muted); }
.nh-tool-wrap { margin-top: 1.5rem; }
.nh-empty { padding: 2rem 0; }
.nh-404 { text-align: center; padding: 3rem 0; }
.nh-404 h1 { font-size: clamp(2rem, 5vw, 3rem); }
.nh-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 1.25rem 0 2rem;
}
.nh-pagination { margin: 2rem 0; }
.nh-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.nh-pagination a,
.nh-pagination span {
  display: inline-flex;
  min-width: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 0.7rem;
  border-radius: 8px;
  text-decoration: none;
  background: var(--nh-surface);
}
.nh-pagination .current {
  background: var(--nh-primary);
  color: var(--nh-primary-foreground);
}

.nh-tool-ui {
  background: var(--nh-surface);
  border-radius: var(--nh-radius-md);
  box-shadow: var(--nh-shadow);
  padding: 1.25rem;
}
.nh-tool-ui label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.3rem;
}
.nh-tool-ui input,
.nh-tool-ui select,
.nh-tool-ui textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--nh-border);
  background: var(--nh-background);
  color: var(--nh-text);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font: inherit;
  margin-bottom: 0.85rem;
}
.nh-tool-ui textarea { min-height: 8rem; }
.nh-tool-result {
  margin-top: 0.5rem;
  padding: 0.85rem 1rem;
  background: var(--nh-background);
  border-radius: 8px;
  font-weight: 650;
}
.nh-tool-grid { display: grid; gap: 0.75rem; }
@media (min-width: 640px) {
  .nh-tool-grid { grid-template-columns: 1fr 1fr; }
}

.nh-widget, .widget {
  background: var(--nh-surface);
  border-radius: var(--nh-radius-md);
  padding: 1.05rem 1.15rem;
  margin-bottom: 1rem;
  box-shadow: var(--nh-shadow);
}
.nh-widget .widget-title,
.widget .widget-title,
.nh-widget h2,
.widget h2 {
  font-size: 1.1rem;
  line-height: 1.3;
  margin: 0 0 0.75rem;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}
.inside-article { background: transparent; padding: 0; box-shadow: none; }
body.nh-theme .separate-containers .inside-article,
body.nh-theme .one-container .inside-article { background: transparent; }
body.nh-theme .site-header,
body.nh-theme .site-footer { background: transparent; }
.nh-content { padding-bottom: 2rem; }