/* Compact, selectable app-like explorer. This layer never edits the source content. */
.nhd-explore .nhc-menu-empty,
.nhd-explore .nhc-menu-hint {
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  border: 1px dashed rgba(125, 176, 234, .29); border-radius: 22px;
  background: radial-gradient(circle at 50% 0%, rgba(44, 119, 202, .11), transparent 64%), var(--nhd-menu-surface);
  color: var(--nhd-menu-muted); box-sizing: border-box;
}
.nhd-explore .nhc-menu-empty[hidden], .nhd-explore .nhc-menu-hint[hidden] { display: none !important; }
.nhd-explore .nhc-menu-empty { min-height: 238px; margin-block: 13px 5px; padding: 30px 20px; }
.nhd-explore .nhc-menu-hint { min-height: 310px; padding: 26px 18px; }
.nhd-explore .nhc-menu-empty strong, .nhd-explore .nhc-menu-hint strong { color: var(--nhd-menu-text); font-size: 17px; line-height: 1.7; }
.nhd-explore .nhc-menu-empty p, .nhd-explore .nhc-menu-hint p { margin: 8px 0 0; max-width: 45ch; font-size: 13px; line-height: 1.9; }
.nhd-explore .nhc-empty-signal { display: grid; place-items: center; margin-bottom: 14px; width: 48px; height: 48px; color: var(--nhd-menu-accent); background: var(--nhd-menu-active); border: 1px solid var(--nhd-menu-line); border-radius: 16px; font-size: 22px; }
.nhd-explore .nhc-menu-hint > span { color: var(--nhd-menu-accent); font-size: 25px; margin-bottom: 10px; }
.nhd-explore .nhd-menu-heading { align-items: center; margin-bottom: 18px; }
.nhd-explore .nhd-menu-heading h2 { font-size: clamp(21px, 2vw, 27px); line-height: 1.55; }
.nhd-explore .nhd-menu-layout { grid-template-columns: minmax(175px, 218px) minmax(0, 1fr); gap: 18px; }
.nhd-explore .nhd-menu-rail { padding: 5px; border-radius: 17px; gap: 4px; }
.nhd-explore .nhd-menu-rail button { min-height: 51px; padding: 8px 10px; gap: 9px; border-radius: 11px; line-height: 1.6; transition: background .2s ease, border-color .2s ease; }
.nhd-explore .nhd-menu-rail button:hover { background: var(--nhd-menu-active); color: var(--nhd-menu-text); }
.nhd-explore .nhd-menu-rail button[aria-selected='true'] { box-shadow: inset 3px 0 0 #57b3ff; }
.nhd-explore .nhc-menu-item-icon { display: grid; place-items: center; width: 33px; height: 33px; border: 1px solid var(--nhd-menu-line); border-radius: 10px; background: var(--nhd-menu-card); flex: none; color: var(--nhd-menu-accent); }
.nhd-explore .nhc-menu-item-icon svg { width: 18px; height: 18px; }
.nhd-explore .nhd-menu-rail button > span:not(.nhc-menu-item-icon) { font-size: 10px; opacity: .62; }
.nhd-explore .nhd-menu-panel { grid-template-columns: minmax(0, 1.06fr) minmax(210px, .86fr); gap: 18px; }
.nhd-explore .nhd-menu-copy { padding: 2px 0; min-width: 0; }
.nhd-explore .nhd-menu-kicker { font-size: 10px; letter-spacing: .09em; }
.nhd-explore .nhd-menu-copy h3 { font-size: clamp(20px, 2vw, 26px); line-height: 1.55; margin: 5px 0 6px; }
.nhd-explore .nhd-menu-copy > p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; font-size: 12.5px; line-height: 1.85; margin: 0 0 12px; min-height: 0; }
.nhd-explore .nhd-menu-links { margin-bottom: 12px; border-radius: 12px; }
.nhd-explore .nhd-menu-links li > a, .nhd-explore .nhd-menu-links li > span { min-height: 39px; padding: 7px 12px; font-size: 12.5px; line-height: 1.75; }
.nhd-explore .nhd-menu-view { font-size: 12.5px; padding-block: 7px; min-height: 40px; }
.nhd-explore .nhd-menu-feature { border-radius: 17px; }
.nhd-explore .nhd-menu-feature figure { height: 163px; }
.nhd-explore .nhd-menu-feature > div { padding: 13px 17px 17px; }
.nhd-explore .nhd-menu-feature strong { font-size: 14px; line-height: 1.6; }
.nhd-explore .nhd-menu-feature p { font-size: 11.5px; line-height: 1.75; margin: 7px 0 11px; }
.nhd-explore .nhd-menu-feature .nhd-action { font-size: 11.5px; min-height: 39px; padding: 8px 14px; }
.nhd-explore .nhd-menu-pages { margin-top: 22px; padding-top: 13px; }

/* Three-way theme picker: an iOS-inspired 42px track inside a 44px tap target. */
body.nahang-template-digital .nhd-header button[data-nh-theme-toggle].nhc-theme-switch {
  position: relative; display: flex; justify-content: flex-start; align-items: center;
  box-sizing: border-box; width: 44px; min-width: 44px; height: 44px; min-height: 44px;
  margin: 0; padding: 0 4px; border: 0; border-radius: 999px;
  background: transparent; box-shadow: none; cursor: pointer;
}
body.nahang-template-digital .nhd-header button[data-nh-theme-toggle].nhc-theme-switch::before {
  content: ''; position: absolute; inset-inline-start: 1px; top: 50%;
  width: 42px; height: 25px; box-sizing: border-box; transform: translateY(-50%);
  border-radius: 999px; border: 1px solid rgba(176,199,233,.2);
  background: #26364f; box-shadow: inset 0 1px 3px rgba(0,0,0,.12);
  transition: background-color .22s ease, border-color .22s ease;
}
body.nahang-template-digital .nhd-header .nhc-theme-switch > span {
  position: relative; z-index: 1; display: grid; place-items: center;
  box-sizing: border-box; width: 19px; height: 19px; flex: none; border-radius: 50%;
  background: #f9fbff; color: transparent; font-size: 0; line-height: 0;
  box-shadow: 0 1px 3px rgba(3,14,33,.22);
  transition: transform .22s cubic-bezier(.22,.61,.36,1);
}
html[data-nh-theme='light'] body.nahang-template-digital .nhd-header .nhc-theme-switch::before {
  background: #62aaf5; border-color: #62aaf5;
}
html[data-nh-theme='light'] body.nahang-template-digital .nhd-header .nhc-theme-switch > span {
  transform: translateX(-17px);
}
body.nahang-template-digital .nhd-header .nhc-theme-switch[data-nhc-theme-mode='auto']::after {
  content: ''; position: absolute; bottom: 2px; left: calc(50% - 1.5px);
  width: 3px; height: 3px; border-radius: 50%; background: #62b9ff;
}
body.nahang-template-digital .nhd-header .nhc-theme-switch:focus-visible {
  outline: 2px solid #69b6ff; outline-offset: 1px;
}
.nhc-theme-panel {
  --nhc-picker-bg: rgba(10,25,45,.94); --nhc-picker-text: #f3f8ff; --nhc-picker-muted: #adbfda; --nhc-picker-line: rgba(142,186,247,.22);
  position: fixed; z-index: 99999; width: min(272px, calc(100vw - 16px)); padding: 14px;
  border: 1px solid var(--nhc-picker-line); border-radius: 19px; color: var(--nhc-picker-text);
  background: var(--nhc-picker-bg); backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px);
  box-shadow: 0 20px 65px rgba(0,7,22,.4); font-family: Vazir,Vazirmatn,Tahoma,sans-serif;
}
.nhc-theme-panel[hidden] { display: none !important; }
.nhc-theme-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 3px 11px; border-bottom: 1px solid var(--nhc-picker-line); }
.nhc-theme-panel-head strong { font-size: 13px; }
.nhc-theme-panel-head small { color: var(--nhc-picker-muted); font: 700 9px system-ui,sans-serif; letter-spacing: .11em; }
.nhc-theme-choices { display: grid; gap: 5px; padding-top: 9px; }
.nhc-theme-choices button { display: flex; align-items: center; gap: 11px; min-height: 56px; width: 100%; padding: 9px 11px; border: 1px solid transparent; border-radius: 12px; text-align: right; font: inherit; cursor: pointer; color: var(--nhc-picker-text); background: transparent; }
.nhc-theme-choices button:hover { background: rgba(79,138,203,.13); }
.nhc-theme-choices button[aria-pressed='true'] { background: rgba(39,116,211,.19); border-color: rgba(95,168,247,.4); }
.nhc-theme-choices button svg { width: 20px; height: 20px; flex: none; color: #83c7ff; }
.nhc-theme-choices button span { display: grid; gap: 2px; }
.nhc-theme-choices strong { font-size: 13px; font-weight: 750; }
.nhc-theme-choices small { font-size: 10px; color: var(--nhc-picker-muted); }
.nhc-theme-future { border-top: 1px solid var(--nhc-picker-line); padding: 11px 3px 0; margin: 9px 0 0; font-size: 10.5px; line-height: 1.85; color: var(--nhc-picker-muted); }
.nhc-theme-panel :focus-visible { outline: 3px solid #62b5ff; outline-offset: 2px; }
html[data-nh-theme='light'] .nhc-theme-panel { --nhc-picker-bg: rgba(246,250,255,.96); --nhc-picker-text: #172c46; --nhc-picker-muted: #5c6f87; --nhc-picker-line: rgba(45,97,154,.2); box-shadow: 0 20px 70px rgba(16,44,82,.2); }
html[data-nh-theme='light'] .nhc-theme-choices button[aria-pressed='true'] { background: #e1efff; }

@media (max-width: 900px) {
  .nhd-explore .nhd-menu-layout { grid-template-columns: 1fr; gap: 12px; }
  .nhd-explore .nhc-menu-hint { min-height: 140px; }
  .nhd-explore .nhd-menu-panel { grid-template-columns: minmax(0,1fr) minmax(200px,.8fr); }
}
@media (max-width: 620px) {
  .nhd-explore .nhd-menu-heading { gap: 13px; margin-bottom: 16px; }
  .nhd-explore .nhc-menu-empty { min-height: 170px; padding: 25px 14px; }
  .nhd-explore .nhc-menu-empty strong, .nhd-explore .nhc-menu-hint strong { font-size: 15px; }
  .nhd-explore .nhc-menu-empty p, .nhd-explore .nhc-menu-hint p { font-size: 12px; }
  .nhd-explore .nhd-menu-layout { gap: 13px; }
  .nhd-explore .nhd-menu-rail { flex-direction: row; gap: 6px; border-radius: 15px; padding: 6px; }
  .nhd-explore .nhd-menu-rail button { min-height: 48px; padding: 7px 10px; gap: 7px; font-size: 12px; }
  .nhd-explore .nhc-menu-item-icon { width: 28px; height: 28px; border-radius: 8px; }
  .nhd-explore .nhc-menu-item-icon svg { width: 16px; height: 16px; }
  .nhd-explore .nhd-menu-panel { grid-template-columns: 1fr; gap: 12px; }
  .nhd-explore .nhd-menu-feature { display: grid; grid-template-columns: 115px minmax(0,1fr); }
  .nhd-explore .nhd-menu-feature figure { height: 150px; }
  .nhd-explore .nhd-menu-feature > div { padding: 11px; }
  .nhd-explore .nhd-menu-feature p { font-size: 11px; }
  .nhd-explore .nhd-menu-copy h3 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .nhd-explore .nhd-menu-rail button, .nhc-theme-switch, .nhc-theme-switch::before, .nhc-theme-switch > span { transition: none !important; }
}
